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

Updated: removed Rinkeby/ Goerli, updated Sepolia & added Holesky #268

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion deployment/testV1ToV2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ deploy:testnet:v1ToV2:localhost
- `pendingStateTimeout`: uint64, Once a pending state exceeds this timeout it can be consolidated by everyone
- `emergencyCouncilAddress`:address, Emergency council addres
- `polTokenAddress`: address, Matic token address, only if deploy on testnet can be left blank and will fullfilled by the scripts.
- `zkEVMDeployerAddress`: address, Address of the `PolygonZkEVMDeployer`. Can be left blank, will be fullfilled automatically with the `deploy:deployer:ZkEVM:goerli` script.
- `zkEVMDeployerAddress`: address, Address of the `PolygonZkEVMDeployer`. Can be left blank, will be fullfilled automatically with the `deploy:deployer:ZkEVM:sepolia` script.

- `realVerifier`: bool, Indicates whether deploy a real verifier or not for the new created
- `trustedSequencerURL`: string, trustedSequencer URL
Expand Down
10 changes: 5 additions & 5 deletions deployment/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ The value is on `100 gweis`, if it's necessary to update it go to `helpers/deplo
Note that this operation will change all the deterministic address deployed.

```
npm run deploy:deployer:ZkEVM:goerli
npm run verify:deployer:ZkEVM:goerli
npm run deploy:deployer:ZkEVM:sepolia
npm run verify:deployer:ZkEVM:sepolia
```

To deploy on testnet is necessary a token MATIC contract, therefore, there's another script that previously to the actual deployment, deploys a matic contracts and adds it automatically to the `deploy_parameters.json`
Expand All @@ -41,14 +41,14 @@ To deploy on testnet use:`deploy:testnet:ZkEVM:${network}`
In other cases use fullfill `maticTokenAddress` in the `deploy_parameters.json` and run `deploy:ZkEVM:${network}`

```
npm run deploy:testnet:ZkEVM:goerli
npm run deploy:testnet:ZkEVM:sepolia

```

To verify contracts use `npm run verify:ZkEVM:${network}`

```
npm run verify:ZkEVM:goerli
npm run verify:ZkEVM:sepolia
```

A new folder will be created witth the following name `deployments/${network}_$(date +%s)` with all the output information and the OZ proxy information.
Expand All @@ -66,7 +66,7 @@ A new folder will be created witth the following name `deployments/${network}_$(
- `pendingStateTimeout`: uint64, Once a pending state exceeds this timeout it can be consolidated by everyone
- `emergencyCouncilAddress`:address, Emergency council addres
- `polTokenAddress`: address, Matic token address, only if deploy on testnet can be left blank and will fullfilled by the scripts.
- `zkEVMDeployerAddress`: address, Address of the `PolygonZkEVMDeployer`. Can be left blank, will be fullfilled automatically with the `deploy:deployer:ZkEVM:goerli` script.
- `zkEVMDeployerAddress`: address, Address of the `PolygonZkEVMDeployer`. Can be left blank, will be fullfilled automatically with the `deploy:deployer:ZkEVM:sepolia` script.

## create_rollup_parameters.json

Expand Down
30 changes: 10 additions & 20 deletions docker/scripts/v1ToV2/hardhat.example.paris
Original file line number Diff line number Diff line change
Expand Up @@ -150,32 +150,21 @@ const config: HardhatUserConfig = {
count: 20,
},
},
ropsten: {
url: process.env.ROPSTEN_PROVIDER
? process.env.ROPSTEN_PROVIDER
: `https://ropsten.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
sepolia: {
url: process.env.SEPOLIA_PROVIDER
? process.env.SEPOLIA_PROVIDER
: `https://sepolia.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
goerli: {
url: process.env.GOERLI_PROVIDER
? process.env.GOERLI_PROVIDER
: `https://goerli.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
rinkeby: {
url: process.env.RINKEBY_PROVIDER
? process.env.RINKEBY_PROVIDER
: `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
holesky: {
url: process.env.HOLESKY_PROVIDER
? process.env.HOLESKY_PROVIDER
: `https://holesky.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
Expand Down Expand Up @@ -231,7 +220,8 @@ const config: HardhatUserConfig = {
apiKey: {
polygonZKEVMTestnet: `${process.env.ETHERSCAN_ZKEVM_API_KEY}`,
polygonZKEVMMainnet: `${process.env.ETHERSCAN_ZKEVM_API_KEY}`,
goerli: `${process.env.ETHERSCAN_API_KEY}`,
holesky: `${process.env.ETHERSCAN_API_KEY}`,
sepolia: `${process.env.ETHERSCAN_API_KEY}`,
mainnet: `${process.env.ETHERSCAN_API_KEY}`,
},
customChains: [
Expand Down
30 changes: 10 additions & 20 deletions docker/scripts/v2/hardhat.example.paris
Original file line number Diff line number Diff line change
Expand Up @@ -150,32 +150,21 @@ const config: HardhatUserConfig = {
count: 20,
},
},
ropsten: {
url: process.env.ROPSTEN_PROVIDER
? process.env.ROPSTEN_PROVIDER
: `https://ropsten.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
sepolia: {
url: process.env.SEPOLIA_PROVIDER
? process.env.SEPOLIA_PROVIDER
: `https://sepolia.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
goerli: {
url: process.env.GOERLI_PROVIDER
? process.env.GOERLI_PROVIDER
: `https://goerli.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
rinkeby: {
url: process.env.RINKEBY_PROVIDER
? process.env.RINKEBY_PROVIDER
: `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
holesky: {
url: process.env.HOLESKY_PROVIDER
? process.env.HOLESKY_PROVIDER
: `https://holesky.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
Expand Down Expand Up @@ -231,7 +220,8 @@ const config: HardhatUserConfig = {
apiKey: {
polygonZKEVMTestnet: `${process.env.ETHERSCAN_ZKEVM_API_KEY}`,
polygonZKEVMMainnet: `${process.env.ETHERSCAN_ZKEVM_API_KEY}`,
goerli: `${process.env.ETHERSCAN_API_KEY}`,
holesky: `${process.env.ETHERSCAN_API_KEY}`,
sepplia: `${process.env.ETHERSCAN_API_KEY}`,
mainnet: `${process.env.ETHERSCAN_API_KEY}`,
},
customChains: [
Expand Down
40 changes: 9 additions & 31 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,43 +151,21 @@ const config: HardhatUserConfig = {
count: 20,
},
},
ropsten: {
url: process.env.ROPSTEN_PROVIDER
? process.env.ROPSTEN_PROVIDER
: `https://ropsten.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
goerli: {
url: process.env.GOERLI_PROVIDER
? process.env.GOERLI_PROVIDER
: `https://goerli.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
rinkeby: {
url: process.env.RINKEBY_PROVIDER
? process.env.RINKEBY_PROVIDER
: `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
sepolia: {
url: process.env.SEPOLIA_PROVIDER
? process.env.SEPOLIA_PROVIDER
: `https://sepolia.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
sepolia: {
url: process.env.SEPOLIA_PROVIDER
? process.env.SEPOLIA_PROVIDER
: `https://sepolia.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
holesky: {
url: process.env.HOLESKY_PROVIDER
? process.env.HOLESKY_PROVIDER
: `https://holesky.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
Expand Down Expand Up @@ -252,7 +230,7 @@ const config: HardhatUserConfig = {
apiKey: {
polygonZKEVMTestnet: `${process.env.ETHERSCAN_ZKEVM_API_KEY}`,
polygonZKEVMMainnet: `${process.env.ETHERSCAN_ZKEVM_API_KEY}`,
goerli: `${process.env.ETHERSCAN_API_KEY}`,
holesky: `${process.env.ETHERSCAN_API_KEY}`,
sepolia: `${process.env.ETHERSCAN_API_KEY}`,
mainnet: `${process.env.ETHERSCAN_API_KEY}`,
zkevmDevnet: `${process.env.ETHERSCAN_API_KEY}`,
Expand Down
24 changes: 9 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,12 @@
"solidity-docgen": "^0.5.17"
},
"scripts": {
"saveDeployment:goerli": "mkdir -p deployments/goerli_$(date +%s) && cp -r deployment/v2/deploy_*.json deployments/goerli_$(date +%s) && cp .openzeppelin/goerli.json deployments/goerli_$(date +%s) && cp deployment/v2/genesis.json deployments/goerli_$(date +%s) && cp deployment/v2/create_rollup_output.json deployments/goerli_$(date +%s)",
"saveDeployment:mainnet": "mkdir -p deployments/mainnet_$(date +%s) && cp -r deployment/v2/deploy_*.json deployments/mainnet_$(date +%s) && cp .openzeppelin/mainnet.json deployments/mainnet_$(date +%s) && cp deployment/v2/genesis.json deployments/mainnet_$(date +%s) && cp deployment/v2/create_rollup_output.json deployments/mainnet_$(date +%s)",
"test": "npx hardhat test test/contractsv2/*ts",
"docgen": "npx solidity-docgen --solc-module solc-0.8 -t ./docs/templates -e ./contracts/verifiers,./contracts/mocks",
"prepare:testnet:ZkEVM:localhost": "npx hardhat run deployment/testnet/prepareTestnet.ts --network localhost",
"deploy:ZkEVM:localhost": "rm -f .openzeppelin/unknown-*.json && node deployment/1_createGenesis.js && npx hardhat run deployment/2_deployPolygonZKEVMDeployer.js --network localhost && npx hardhat run deployment/3_deployContracts.js --network localhost",
"deploy:testnet:ZkEVM:localhost": "npm run prepare:testnet:ZkEVM:localhost && npm run deploy:ZkEVM:localhost",
"prepare:testnet:ZkEVM:goerli": "npx hardhat run deployment/testnet/prepareTestnet.ts --network goerli",
"deploy:ZkEVM:goerli": "node deployment/1_createGenesis.js && npx hardhat run deployment/3_deployContracts.js --network goerli && npm run saveDeployment:goerli",
"deploy:deployer:ZkEVM:goerli": "npx hardhat run deployment/2_deployPolygonZKEVMDeployer.js --network goerli",
"verify:deployer:ZkEVM:goerli": "npx hardhat run deployment/verifyzkEVMDeployer.js --network goerli",
"deploy:testnet:ZkEVM:goerli": "npm run prepare:testnet:ZkEVM:goerli && npm run deploy:ZkEVM:goerli",
"upgrade:timelock:goerli": "npx hardhat run upgrade/timeLockUpgrade.js --network goerli",
"verify:ZkEVM:goerli": "npx hardhat run deployment/verifyContracts.js --network goerli",
"deploy:deployer:ZkEVM:mainnet": "npx hardhat run deployment/2_deployPolygonZKEVMDeployer.js --network mainnet",
"verify:deployer:ZkEVM:mainnet": "npx hardhat run deployment/verifyzkEVMDeployer.js --network mainnet",
"deploy:ZkEVM:mainnet": "node deployment/1_createGenesis.js && npx hardhat run deployment/3_deployContracts.js --network mainnet && npm run saveDeployment:mainnet",
Expand All @@ -83,28 +75,30 @@
"gas:report:file": "rm -f .openzeppelin/unknown-*.json && REPORT_GAS=true REPORT_GAS_FILE=true npx hardhat test",
"deploy:v2:localhost": "npx hardhat compile && rm -f .openzeppelin/unknown-*.json && npx ts-node deployment/v2/1_createGenesis.ts --test && npx hardhat run deployment/v2/2_deployPolygonZKEVMDeployer.ts --network localhost && npx hardhat run deployment/v2/3_deployContracts.ts --network localhost && npx hardhat run deployment/v2/4_createRollup.ts --network localhost",
"deploy:testnet:v2:localhost": "npx hardhat compile && rm -f deployment/v2/deploy_ongoing.json && npm run prepare:testnet:ZkEVM:localhost && npm run deploy:v2:localhost",
"deploy:v2:goerli": "npx hardhat compile && npx ts-node deployment/v2/1_createGenesis.ts && npx hardhat run deployment/v2/2_deployPolygonZKEVMDeployer.ts --network goerli && npx hardhat run deployment/v2/3_deployContracts.ts --network goerli && npx hardhat run deployment/v2/4_createRollup.ts --network goerli && npm run saveDeployment:goerli",
"deploy:testnet:v2:goerli": "npx hardhat compile && rm -f deployment/v2/deploy_ongoing.json && npm run prepare:testnet:ZkEVM:goerli && npm run deploy:v2:goerli",
"verify:v2:goerli": "npx hardhat run deployment/v2/verifyContracts.js --network goerli",
"prepare:testnet:ZkEVM:sepolia": "npx hardhat run deployment/testnet/prepareTestnet.ts --network sepolia",
"prepare:testnet:ZkEVM:holesky": "npx hardhat run deployment/testnet/prepareTestnet.ts --network holesky",
"deploy:v2:sepolia": "npx hardhat compile && npx ts-node deployment/v2/1_createGenesis.ts && npx hardhat run deployment/v2/2_deployPolygonZKEVMDeployer.ts --network sepolia && npx hardhat run deployment/v2/3_deployContracts.ts --network sepolia && npx hardhat run deployment/v2/4_createRollup.ts --network sepolia && npm run saveDeployment:sepolia",
"deploy:v2:holesky": "npx hardhat compile && npx ts-node deployment/v2/1_createGenesis.ts && npx hardhat run deployment/v2/2_deployPolygonZKEVMDeployer.ts --network holesky && npx hardhat run deployment/v2/3_deployContracts.ts --network holesky && npx hardhat run deployment/v2/4_createRollup.ts --network holesky && npm run saveDeployment:holesky",
"deploy:testnet:v2:sepolia": "npx hardhat compile && rm -f deployment/v2/deploy_ongoing.json && npm run prepare:testnet:ZkEVM:sepolia && npm run deploy:v2:sepolia",
"deploy:testnet:v2:holesky": "npx hardhat compile && rm -f deployment/v2/deploy_ongoing.json && npm run prepare:testnet:ZkEVM:sepolia && npm run deploy:v2:holesky",
"verify:v2:sepolia": "npx hardhat run deployment/v2/verifyContracts.js --network sepolia",
"verify:v2:holesky": "npx hardhat run deployment/v2/verifyContracts.js --network holesky",
"prepare:testV1ToV2:ZkEVM:localhost": "npx hardhat run deployment/testV1ToV2/prepareTestnet.ts --network localhost",
"deploy:testV1ToV2:localhost": "npx hardhat compile && rm -f .openzeppelin/unknown-*.json && npx ts-node deployment/testV1ToV2/1_createGenesis.ts --test && npx hardhat run deployment/testV1ToV2/2_deployPolygonZKEVMDeployer.ts --network localhost && npx hardhat run deployment/testV1ToV2/3_deployContracts.ts --network localhost",
"deploy:testnet:testV1ToV2:localhost": "npx hardhat compile && rm -f deployment/testV1ToV2/deploy_ongoing.json && npm run prepare:testV1ToV2:ZkEVM:localhost && npm run deploy:testV1ToV2:localhost",
"docker:testV1ToV2:contracts": "./docker/scripts/testV1ToV2/deploy-docker.sh",
"dockerv2:testV1ToV2:contracts": "sudo ./docker/scripts/testV1ToV2/deploy-dockerv2.sh",
"saveDeployment:sepolia": "mkdir -p deployments/sepolia_$(date +%s) && cp -r deployment/v2/deploy_*.json deployments/sepolia_$(date +%s) && cp .openzeppelin/sepolia.json deployments/sepolia_$(date +%s) && cp deployment/v2/genesis.json deployments/sepolia_$(date +%s) && cp deployment/v2/create_rollup_output.json deployments/sepolia_$(date +%s)",
"saveDeployment:holesky": "mkdir -p deployments/holesky$(date +%s) && cp -r deployment/v2/deploy_*.json deployments/holesky_$(date +%s) && cp .openzeppelin/holesky.json deployments/holesky_$(date +%s) && cp deployment/v2/genesis.json deployments/holesky_$(date +%s) && cp deployment/v2/create_rollup_output.json deployments/holesky_$(date +%s)",
"testnetPol:upgradeV2:sepolia": "npx hardhat run upgrade/upgradeToV2/testnet/deployTestnetPol.ts --network sepolia",
"testnetPol:upgradeV2:goerli": "npx hardhat run upgrade/upgradeToV2/testnet/deployTestnetPol.ts --network goerli",
"upgradev2:timelock:goerli": "npx hardhat run upgrade/upgradeToV2/upgradeToV2.ts --network goerli && npm run saveUpgradeV2:goerli",
"testnetPol:upgradeV2:holesky": "npx hardhat run upgrade/upgradeToV2/testnet/deployTestnetPol.ts --network holesky",
"upgradev2:timelock:sepolia": "npx hardhat run upgrade/upgradeToV2/upgradeToV2.ts --network sepolia && npm run saveUpgradeV2:sepolia",
"upgradev2:timelock:holesky": "npx hardhat run upgrade/upgradeToV2/upgradeToV2.ts --network holesky && npm run saveUpgradeV2:holesky",
"verify:upgradeV2:sepolia": "npx hardhat run upgrade/upgradeToV2/verifyContracts.ts --network sepolia",
"verify:upgradeV2:goerli": "npx hardhat run upgrade/upgradeToV2/verifyContracts.ts --network goerli",
"verify:upgradeV2:holesky": "npx hardhat run upgrade/upgradeToV2/verifyContracts.ts --network holesky",
"upgradev2L2:timelock:zkevmDevnet": "npx hardhat run upgrade/upgradeToV2/upgradeL2ToV2.ts --network zkevmDevnet",
"saveUpgradeV2:sepolia": "mkdir -p upgrade/upgradeToV2/sepolia_$(date +%s) && cp -r upgrade/upgradeToV2/upgrade_*.json upgrade/upgradeToV2/sepolia_$(date +%s) && cp -r upgrade/upgradeToV2/deploy_*.json upgrade/upgradeToV2/sepolia_$(date +%s) && cp .openzeppelin/sepolia.json upgrade/upgradeToV2/sepolia_$(date +%s)",
"saveUpgradeV2:goerli": "mkdir -p upgrade/upgradeToV2/goerli_$(date +%s) && cp -r upgrade/upgradeToV2/upgrade_*.json upgrade/upgradeToV2/goerli_$(date +%s) && cp -r upgrade/upgradeToV2/deploy_*.json upgrade/upgradeToV2/goerli_$(date +%s) && cp .openzeppelin/goerli.json upgrade/upgradeToV2/goerli_$(date +%s)",
"saveUpgradeV2:holesky": "mkdir -p upgrade/upgradeToV2/holesky_$(date +%s) && cp -r upgrade/upgradeToV2/upgrade_*.json upgrade/upgradeToV2/holesky_$(date +%s) && cp -r upgrade/upgradeToV2/deploy_*.json upgrade/upgradeToV2/holesky_$(date +%s) && cp .openzeppelin/holesky.json upgrade/upgradeToV2/holesky_$(date +%s)",
"upgradev2L2:timelock:polygonZKEVMTestnet": "npx hardhat run upgrade/upgradeToV2/upgradeL2ToV2.ts --network polygonZKEVMTestnet",
"upgradev2L2:timelock:polygonZKEVMMainnet": "npx hardhat run upgrade/upgradeToV2/upgradeL2ToV2.ts --network polygonZKEVMMainnet",
"upgradev2:timelock:mainnet": "npx hardhat run upgrade/upgradeToV2/upgradeToV2.ts --network mainnet && npm run saveUpgradeV2:mainnet",
Expand Down