Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: zksync networks names to lowercase #1261

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/currency/src/chains/evm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ export const chains: Record<CurrencyTypes.EvmChainName, EvmChain> = {
sokol: SokolDefinition,
tombchain: TombchainDefinition,
xdai: XDaiDefinition,
zkSyncEraTestnet: ZkSyncEraTestnetDefinition,
zkSyncEra: ZkSyncEraDefinition,
zksynceratestnet: ZkSyncEraTestnetDefinition,
zksyncera: ZkSyncEraDefinition,
};
4 changes: 2 additions & 2 deletions packages/currency/src/native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ export const nativeCurrencies: Record<RequestLogicTypes.CURRENCY.ETH, NativeEthC
symbol: 'ETH-zksync',
decimals: 18,
name: 'Ether',
network: 'zkSyncEra',
network: 'zksyncera',
},
{
symbol: 'ETH-zksync-testnet',
decimals: 18,
name: 'Ether',
network: 'zkSyncEraTestnet',
network: 'zksynceratestnet',
},
],
[RequestLogicTypes.CURRENCY.BTC]: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const networks: Record<string, ethers.providers.Network> = {
mantle: { chainId: 5000, name: 'mantle' },
'mantle-testnet': { chainId: 5001, name: 'mantle-testnet' },
core: { chainId: 1116, name: 'core' },
zkSyncEraTestnet: { chainId: 280, name: 'zkSyncEraTestnet' },
zkSyncEra: { chainId: 324, name: 'zkSyncEra' },
zksynceratestnet: { chainId: 280, name: 'zksynceratestnet' },
zksyncera: { chainId: 324, name: 'zksyncera' },
};

/**
Expand Down Expand Up @@ -68,9 +68,9 @@ export class MultichainExplorerApiProvider extends ethers.providers.EtherscanPro
return 'https://explorer.testnet.mantle.xyz/api';
case 'core':
return 'https://openapi.coredao.org/';
case 'zkSyncEraTestnet':
case 'zksynceratestnet':
return 'https://goerli.explorer.zksync.io/';
case 'zkSyncEra':
case 'zksyncera':
return 'https://explorer.zksync.io/';
default:
return super.getBaseUrl();
Expand Down
6 changes: 3 additions & 3 deletions packages/smart-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ yarn hardhat deploy-live-payments --network private --force --dry-run
To compile the contracts with the zkSync compiler, we use the same compile task but with the zkSync network specified.

```bash
yarn hardhat compile --network zkSyncEra
yarn hardhat compile --network zksyncera
```

The compiled results go in separate directories build-zk and cache-zk.
Expand All @@ -238,13 +238,13 @@ We deploy with the following commands:
First deploy the Proxy contracts:

```bash
yarn hardhat deploy-zksync --script deploy-zk-proxy-contracts --network zkSyncEra
yarn hardhat deploy-zksync --script deploy-zk-proxy-contracts --network zksyncera
```

Then deploy the Batch contract:

```bash
yarn hardhat deploy-zksync --script deploy-zk-batch-contracts --network zkSyncEra
yarn hardhat deploy-zksync --script deploy-zk-batch-contracts --network zksyncera
```

We don't have deploy scripts for our Conversion proxy because there is no Chainlink feed yet on this chain.
Expand Down
8 changes: 4 additions & 4 deletions packages/smart-contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@ export default {
chainId: 1116,
accounts,
},
zkSyncEraTestnet: {
url: url('zkSyncEraTestnet'),
zksynceratestnet: {
url: url('zksynceratestnet'),
ethNetwork: 'goerli',
zksync: true,
verifyURL: 'https://zksync2-testnet-explorer.zksync.dev/contract_verification',
accounts,
},
zkSyncEra: {
url: url('zkSyncEra'),
zksyncera: {
url: url('zksyncera'),
ethNetwork: 'mainnet',
zksync: true,
verifyURL: 'https://zksync2-mainnet-explorer.zksync.io/contract_verification',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ export const batchConversionPaymentsArtifact = new ContractArtifact<BatchConvers
creationBlockNumber: 19856206,
},
// Caution: no ETHConversion, ERC20Conversion, and chainlinkConversionPath proxies on zkSyncEra
zkSyncEra: {
zksyncera: {
address: '0x0C41700ee1B363DB2ebC1a985f65cAf6eC4b1023',
creationBlockNumber: 19545614,
},
zkSyncEraTestnet: {
zksynceratestnet: {
address: '0x9959F193498e75A2a46A04647fC15a031e308a0b',
creationBlockNumber: 13769945,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ export const batchPaymentsArtifact = new ContractArtifact<BatchPayments>(
address: '0x0DD57FFe83a53bCbd657e234B16A3e74fEDb8fBA',
creationBlockNumber: 35498688,
},
zkSyncEra: {
zksyncera: {
address: '0x0C41700ee1B363DB2ebC1a985f65cAf6eC4b1023',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Why is this address identical to the one listed for zkSync Era BatchConversionPayments

  2. Why does the zkSync Era explorer show the contract name "BatchConversionPayments" instead of "BatchPayments"?
    image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BatchConversionPayments is the contract that is used in production, so that's why that one is deployed.

At the time I thought BatchPayments was the one we were using but if we see the block explorer on mainnet: https://etherscan.io/address/0x0dd57ffe83a53bcbd657e234b16a3e74fedb8fba it hasn't been used for more than a year.

So if you want to clean things up, we can just remove the entries from BatchPayments/index.ts for both prod and test zksync.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added issue to fix 👍 #1303

creationBlockNumber: 19545614,
},
zksynceratestnet: {
address: '0x276A92F78aA527b8e157B0E47cEB63b4239dfa0b',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the zkSync Era Goerli explorer show the contract name "BatchConversionPayments" instead of "BatchPayments"?
image

creationBlockNumber: 13814862,
},
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ export const erc20FeeProxyArtifact = new ContractArtifact<ERC20FeeProxy>(
address: '0x399F5EE127ce7432E4921a61b8CF52b0af52cbfE',
creationBlockNumber: 8317450,
},
zkSyncEraTestnet: {
zksynceratestnet: {
address: '0xb4E10de047b72Af2a44F64892419d248d58d9dF5',
creationBlockNumber: 13616167,
},
zkSyncEra: {
zksyncera: {
address: '0x6e28Cc56C2E64c9250f39Cb134686C87dB196532',
creationBlockNumber: 19545285,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ export const ethereumFeeProxyArtifact = new ContractArtifact<EthereumFeeProxy>(
address: '0xe11BF2fDA23bF0A98365e1A4c04A87C9339e8687',
creationBlockNumber: 8317446,
},
zkSyncEraTestnet: {
zksynceratestnet: {
address: '0x0de6a1FB56a141086E0192269399af8b8a9e334A',
creationBlockNumber: 13616655,
},
zkSyncEra: {
zksyncera: {
address: '0xE9A708db0D30409e39810C44cA240fd15cdA9b1a',
creationBlockNumber: 19545294,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/currency-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export type EvmChainName =
| 'sokol'
| 'tombchain'
| 'xdai'
| 'zkSyncEraTestnet'
| 'zkSyncEra';
| 'zksynceratestnet'
| 'zksyncera';

/**
* List of supported BTC chains
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const networkRpcs: Record<string, string> = {
mantle: 'https://rpc.mantle.xyz/',
'mantle-testnet': 'https://rpc.testnet.mantle.xyz/',
core: 'https://rpc.coredao.org/',
zkSyncEraTestnet: 'https://testnet.era.zksync.dev',
zkSyncEra: 'https://mainnet.era.zksync.io',
zksynceratestnet: 'https://testnet.era.zksync.dev',
zksyncera: 'https://mainnet.era.zksync.io',
};

/**
Expand Down
Loading