add cfg for zk sync testnet

This commit is contained in:
CounterFire2023 2023-07-13 10:27:49 +08:00
parent 62a2cd9af8
commit c91d36cb33
2 changed files with 47 additions and 22 deletions

View File

@ -15,6 +15,7 @@
"deploy:kcctest": "truffle migrate --network kcc_testnet --compile-none", "deploy:kcctest": "truffle migrate --network kcc_testnet --compile-none",
"deploy:polygon_testnet": "truffle migrate --network polygon_testnet --compile-none", "deploy:polygon_testnet": "truffle migrate --network polygon_testnet --compile-none",
"deploy:dev:arbitrum_testnet": "DEPLOY_ENV=dev truffle migrate --network arbitrum_testnet --compile-none", "deploy:dev:arbitrum_testnet": "DEPLOY_ENV=dev truffle migrate --network arbitrum_testnet --compile-none",
"deploy:dev:zk_testnet": "DEPLOY_ENV=dev truffle migrate --network zk_testnet --compile-none",
"deploy:release:arbitrum_testnet": "DEPLOY_ENV=release truffle migrate --network arbitrum_testnet --compile-none", "deploy:release:arbitrum_testnet": "DEPLOY_ENV=release truffle migrate --network arbitrum_testnet --compile-none",
"update:nft_setting": "npx truffle exec --network arbitrum_testnet ./init_scripts/update_nft_setting.js", "update:nft_setting": "npx truffle exec --network arbitrum_testnet ./init_scripts/update_nft_setting.js",
"mint_presale:dev": "npx truffle exec --network development ./init_scripts/generate_presalebox.js", "mint_presale:dev": "npx truffle exec --network development ./init_scripts/generate_presalebox.js",

View File

@ -30,17 +30,18 @@ const mnemonic = fs.readFileSync(".secret").toString().trim();
const kccTestnetKey = const kccTestnetKey =
"d9ed33809372932059c1ba7b336a33f406b4c55e7430daef8297134c67429d60"; "d9ed33809372932059c1ba7b336a33f406b4c55e7430daef8297134c67429d60";
const arbOneKey = fs.readFileSync(".key").toString().trim(); // const arbOneKey = fs.readFileSync(".key").toString().trim();
const arbOneAddr = fs.readFileSync(".addr").toString().trim(); // const arbOneAddr = fs.readFileSync(".addr").toString().trim();
module.exports = { module.exports = {
plugins: [ plugins: [
"truffle-plugin-stdjsonin", // "truffle-plugin-stdjsonin",
"truffle-contract-size", // "truffle-contract-size",
"truffle-plugin-verify", "truffle-plugin-verify",
], ],
api_keys: { api_keys: {
etherscan: "ZI9HI3VFZRD346JSRET35Y6AAVGYFGNZ85", etherscan: "ZI9HI3VFZRD346JSRET35Y6AAVGYFGNZ85",
arbiscan: "XN5KKU7YNBPXKKSJ1TI43JZVNSY4AKWV5F",
}, },
/** /**
* Networks define how you connect to your ethereum client and let you set the * Networks define how you connect to your ethereum client and let you set the
@ -123,6 +124,23 @@ module.exports = {
production: true, production: true,
from: "0x565edA4ef351EB78F03B8AfCb6dCF02E29cAD62e", from: "0x565edA4ef351EB78F03B8AfCb6dCF02E29cAD62e",
}, },
zk_testnet: {
provider: () =>
new HDWalletProvider({
privateKeys: [kccTestnetKey],
providerOrUrl: "https://testnet.era.zksync.dev",
pollingInterval: 8000,
}),
network_id: 280,
confirmations: 6,
timeoutBlocks: 5000,
networkCheckTimeout: 10000000,
deploymentPollingInterval: 8000,
skipDryRun: true,
production: true,
disableConfirmationListener: true,
from: "0x50A8e60041A206AcaA5F844a1104896224be6F39",
},
arbitrum_testnet: { arbitrum_testnet: {
provider: () => provider: () =>
new HDWalletProvider({ new HDWalletProvider({
@ -140,25 +158,31 @@ module.exports = {
production: true, production: true,
disableConfirmationListener: true, disableConfirmationListener: true,
from: "0x50A8e60041A206AcaA5F844a1104896224be6F39", from: "0x50A8e60041A206AcaA5F844a1104896224be6F39",
verify: {
apiUrl: "https://api-goerli.arbiscan.io/api",
network_id: 421613,
apiKey: "XN5KKU7YNBPXKKSJ1TI43JZVNSY4AKWV5F",
explorerUrl: "https://goerli.arbiscan.io/address",
},
}, },
arbitrum_one: { // arbitrum_one: {
provider: () => // provider: () =>
new HDWalletProvider({ // new HDWalletProvider({
privateKeys: [arbOneKey], // privateKeys: [arbOneKey],
// providerOrUrl: `https://arbitrum-goerli.public.blastapi.io`, // // providerOrUrl: `https://arbitrum-goerli.public.blastapi.io`,
providerOrUrl: "https://arbitrum-one.public.blastapi.io", // providerOrUrl: "https://arbitrum-one.public.blastapi.io",
pollingInterval: 8000, // pollingInterval: 8000,
}), // }),
network_id: 42161, // network_id: 42161,
confirmations: 6, // confirmations: 6,
timeoutBlocks: 5000, // timeoutBlocks: 5000,
networkCheckTimeout: 10000000, // networkCheckTimeout: 10000000,
deploymentPollingInterval: 8000, // deploymentPollingInterval: 8000,
skipDryRun: true, // skipDryRun: true,
production: true, // production: true,
disableConfirmationListener: true, // disableConfirmationListener: true,
from: arbOneAddr, // from: arbOneAddr,
}, // },
kcc_testnet: { kcc_testnet: {
provider: () => provider: () =>
new HDWalletProvider(kccTestnetKey, `https://rpc-testnet.kcc.network`), new HDWalletProvider(kccTestnetKey, `https://rpc-testnet.kcc.network`),