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: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: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",
"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",

View File

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