Skip to content

Commit

Permalink
➕ Add World Chain Test and Main Network Configurations
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
  • Loading branch information
pcaversaccio committed Sep 28, 2024
1 parent 42834cc commit 3e8a995
Show file tree
Hide file tree
Showing 3 changed files with 251 additions and 216 deletions.
58 changes: 47 additions & 11 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ import "hardhat-gas-reporter";
import "hardhat-abi-exporter";
import "solidity-coverage";
import "hardhat-contract-sizer";
import * as tdly from "@tenderly/hardhat-tenderly";

// Turning off the automatic Tenderly verification
tdly.setup({ automaticVerifications: false });
// Uncomment if you want to use the Hardhat Tenderly module
// You must also uncomment the subsequent `tenderly` configuration in this file accordingly
// import "@tenderly/hardhat-tenderly";

const ethMainnetUrl = vars.get("ETH_MAINNET_URL", "https://rpc.ankr.com/eth");
const accounts = [
Expand Down Expand Up @@ -852,6 +851,24 @@ const config: HardhatUserConfig = {
accounts,
ledgerAccounts,
},
worldChainTestnet: {
chainId: 4801,
url: vars.get(
"WORLD_CHAIN_TESTNET_URL",
"https://worldchain-sepolia.g.alchemy.com/public",
),
accounts,
ledgerAccounts,
},
worldChainMain: {
chainId: 480,
url: vars.get(
"WORLD_CHAIN_MAINNET_URL",
"https://worldchain-mainnet.g.alchemy.com/public",
),
accounts,
ledgerAccounts,
},
},
xdeploy: {
contract: "BatchDistributor",
Expand Down Expand Up @@ -1048,6 +1065,9 @@ const config: HardhatUserConfig = {
// For Oasis Sapphire testnet & mainnet
sapphire: vars.get("SAPPHIRE_API_KEY", ""),
sapphireTestnet: vars.get("SAPPHIRE_API_KEY", ""),
// For World Chain testnet & mainnet
worldChain: vars.get("WORLD_CHAIN_API_KEY", ""),
worldChainTestnet: vars.get("WORLD_CHAIN_API_KEY", ""),
},
customChains: [
{
Expand Down Expand Up @@ -1688,15 +1708,31 @@ const config: HardhatUserConfig = {
browserURL: "https://explorer.oasis.io/testnet/sapphire",
},
},
{
network: "worldChain",
chainId: 480,
urls: {
apiURL: "https://worldchain-mainnet.explorer.alchemy.com/api",
browserURL: "https://worldchain-mainnet.explorer.alchemy.com",
},
},
{
network: "worldChainTestnet",
chainId: 4801,
urls: {
apiURL: "https://worldchain-sepolia.explorer.alchemy.com/api",
browserURL: "https://worldchain-sepolia.explorer.alchemy.com",
},
},
],
},
tenderly: {
username: "pcaversaccio",
project: "project",
forkNetwork: "",
privateVerification: false,
deploymentsDir: "deployments_tenderly",
},
// tenderly: {
// username: "pcaversaccio",
// project: "project",
// forkNetwork: "",
// privateVerification: false,
// deploymentsDir: "deployments_tenderly",
// },
};

export default config;
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@
"deploy:5irechainmain": "npx hardhat run --network 5ireChainMain scripts/deploy.ts",
"deploy:sapphiretestnet": "npx hardhat run --network sapphireTestnet scripts/deploy.ts",
"deploy:sapphiremain": "npx hardhat run --network sapphireMain scripts/deploy.ts",
"deploy:worldchaintestnet": "npx hardhat run --network worldChainTestnet scripts/deploy.ts",
"deploy:worldchainmain": "npx hardhat run --network worldChainMain scripts/deploy.ts",
"prettier:check": "npx prettier -c \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
"prettier:fix": "npx prettier -w \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
"solhint:check": "npx solhint \"contracts/**/*.sol\"",
Expand All @@ -163,13 +165,13 @@
"@nomicfoundation/hardhat-network-helpers": "^1.0.12",
"@nomicfoundation/hardhat-verify": "^2.0.11",
"@openzeppelin/contracts": "^5.0.2",
"@tenderly/hardhat-tenderly": "^2.3.2",
"@tenderly/hardhat-tenderly": "^2.4.0",
"@truffle/dashboard-hardhat-plugin": "^0.2.15",
"@typechain/ethers-v6": "^0.5.1",
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.3.20",
"@types/mocha": "^10.0.8",
"@types/node": "^22.7.1",
"@types/node": "^22.7.4",
"chai": "^4.5.0",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -186,7 +188,7 @@
"typechain": "^8.3.2",
"typescript": "^5.6.2",
"typescript-eslint": "^8.7.0",
"xdeployer": "^3.1.1",
"zksync-ethers": "^6.12.1"
"xdeployer": "^3.1.2",
"zksync-ethers": "^6.13.0"
}
}
Loading

0 comments on commit 3e8a995

Please sign in to comment.