-
Notifications
You must be signed in to change notification settings - Fork 314
/
package.json
114 lines (114 loc) · 10.4 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
"name": "@0xpolygonhermez/zkevm-contracts",
"description": "Core contracts for the Polygon Hermez zkEVM",
"version": "3.0.0",
"repository": {
"type": "git",
"url": "git+https://github.com/0xPolygonHermez/contracts-zkEVM.git"
},
"main": "index.js",
"keywords": [
"zkevm",
"snark",
"polygon",
"hermez",
"stark",
"EVM",
"ethereum",
"blockchain"
],
"author": "0xPolygonHermez",
"files": [
"contracts",
"index.js",
"compiled-contracts",
"src"
],
"bugs": {
"url": "https://github.com/0xPolygonHermez/contracts-zkEVM/issues"
},
"homepage": "https://github.com/0xPolygonHermez/contracts-zkEVM#readme",
"license": "pending",
"devDependencies": {
"@0xpolygonhermez/zkevm-commonjs": "github:0xPolygonHermez/zkevm-commonjs#main",
"@nomicfoundation/hardhat-toolbox": "^3.0.0",
"@openzeppelin/contracts": "4.8.2",
"@openzeppelin/contracts-upgradeable": "4.8.2",
"@openzeppelin/contracts5": "npm:@openzeppelin/contracts@^5.0.0",
"@openzeppelin/hardhat-upgrades": "2.5.0",
"@types/yargs": "^17.0.28",
"circomlibjs": "0.1.1",
"dotenv": "^8.6.0",
"eslint": "^8.51.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-mocha": "^9.0.0",
"ethereum-waffle": "^3.4.4",
"ffjavascript": "^0.2.60",
"hardhat": "2.20.0",
"hardhat-dependency-compiler": "^1.1.3",
"prettier": "^2.8.8",
"prettier-plugin-solidity": "^1.1.3",
"solc-0.8": "npm:solc@0.8.20",
"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",
"upgrade:timelock:mainnet": "npx hardhat run upgrade/timeLockUpgrade.js --network mainnet",
"verify:ZkEVM:mainnet": "npx hardhat run deployment/verifyContracts.js --network mainnet",
"lint": "npx eslint ./test && npx eslint ./docker/scripts && npx eslint ./deployment && npx eslint ./src",
"lint:fix": "npx eslint ./test --fix && npx eslint ./docker/scripts --fix && npx eslint ./deployment --fix && npx eslint ./src --fix",
"compile": "npx hardhat compile",
"docker:contracts": "./docker/scripts/v2/deploy-docker.sh",
"dockerv2:contracts": "sudo ./docker/scripts/v2/deploy-dockerv2.sh",
"push:docker:contracts": "docker push hermeznetwork/geth-zkevm-contracts",
"update:genesis": "node deployment/1_createGenesis.js && node deployment/1_createGenesis.js --test --input ../docker/scripts/deploy_parameters_docker.json --out ../docker/scripts/genesis_docker.json",
"coverage": "npx hardhat coverage --testfiles \"test/contractsv2/*.ts\"",
"gas:report": "REPORT_GAS=true npx hardhat test",
"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",
"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:testnet:v2:sepolia": "npx hardhat compile && rm -f deployment/v2/deploy_ongoing.json && npm run prepare:testnet:ZkEVM:sepolia && npm run deploy:v2:sepolia",
"verify:v2:sepolia": "npx hardhat run deployment/v2/verifyContracts.js --network sepolia",
"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)",
"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",
"upgradev2:timelock:sepolia": "npx hardhat run upgrade/upgradeToV2/upgradeToV2.ts --network sepolia && npm run saveUpgradeV2:sepolia",
"verify:upgradeV2:sepolia": "npx hardhat run upgrade/upgradeToV2/verifyContracts.ts --network sepolia",
"verify:upgradeV2:goerli": "npx hardhat run upgrade/upgradeToV2/verifyContracts.ts --network goerli",
"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)",
"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",
"verify:upgradeV2:mainnet": "npx hardhat run upgrade/upgradeToV2/verifyContracts.ts --network mainnet",
"saveUpgradeV2:mainnet": "mkdir -p upgrade/upgradeToV2/mainnet_$(date +%s) && cp -r upgrade/upgradeToV2/upgrade_*.json upgrade/upgradeToV2/mainnet_$(date +%s) && cp -r upgrade/upgradeToV2/deploy_*.json upgrade/upgradeToV2/mainnet_$(date +%s) && cp .openzeppelin/mainnet.json upgrade/upgradeToV2/mainnet_$(date +%s)"
}
}