-
Notifications
You must be signed in to change notification settings - Fork 74
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
feat: support zkSyncEra and zkSyndTestnet chains #1259
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new deploy/
folder could use some details: Why do we need it? What does it do compare to hardhat
? How to run the it?
@benjlevesque I was also hesitant to create a completely new folder just for this specific chain, but their hardhat deploy plugin has the /deploy name hardcoded 😢 it's here I'll add a zkSync section to the README. I don't know where else to explain this? |
Changes unknown |
@@ -96,7 +96,7 @@ describe('erc777-stream', () => { | |||
it.each([ | |||
{ network: 'goerli' }, | |||
{ network: 'matic' }, | |||
{ network: 'xdai' }, | |||
// { network: 'xdai' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
// An example of a basic deploy script | ||
// It will deploy a Greeter contract to selected network | ||
// as well as verify it on Block Explorer if possible for the network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// An example of a basic deploy script | |
// It will deploy a Greeter contract to selected network | |
// as well as verify it on Block Explorer if possible for the network |
@@ -0,0 +1,14 @@ | |||
import { deployContract } from './utils-zk'; | |||
|
|||
// An example of a basic deploy script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment
|
||
config(); | ||
|
||
const accounts = process.env.DEPLOYMENT_PRIVATE_KEY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems weird, no? Don't we just have 1 PK for deployment/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copied the logic from hardhat.config.ts file, we get the accounts the same way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be simplified with the only key you need for deployment.
For example the DEPLOYER_MASTER_KEY
is never used in this context.
I think you can also remove DEPLOYMENT_PRIVATE_KEY, and only use ADMIN_PRIVATE_KEY. Both of them exists in the original hardhat config, as we needed a distinction when we deployed the contract with the scripts not using CREATE2
.
symbol: 'ETH-zksync-testnet', | ||
decimals: 18, | ||
name: 'Ether', | ||
network: 'zkSyncEraTestnet', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why we don't keep the usual format (zk-sync-era-testnet
) ?
|
||
config(); | ||
|
||
const accounts = process.env.DEPLOYMENT_PRIVATE_KEY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be simplified with the only key you need for deployment.
For example the DEPLOYER_MASTER_KEY
is never used in this context.
I think you can also remove DEPLOYMENT_PRIVATE_KEY, and only use ADMIN_PRIVATE_KEY. Both of them exists in the original hardhat config, as we needed a distinction when we deployed the contract with the scripts not using CREATE2
.
For posterity, here's the zkSync Era Explorer links: zkSync Era: zkSync Goerli Testnet |
Description of the changes
Deployed ERC20FeeProxy, EthereumFeeProxy and BatchConversionPayments contracts to zkSyncEra.
Added the new chains and contracts to our configs.
Wrote a separate deploy script, based on their docs, that uses their own native Deployer contract.