Skip to content

Commit

Permalink
➕ Add Oasis Sapphire Test and Main Networks
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Marco Caversaccio <[email protected]>
  • Loading branch information
pcaversaccio committed Sep 24, 2024
1 parent b08b0d8 commit e6c6f53
Show file tree
Hide file tree
Showing 3 changed files with 304 additions and 225 deletions.
34 changes: 34 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,21 @@ const config: HardhatUserConfig = {
accounts,
ledgerAccounts,
},
sapphireTestnet: {
chainId: 23295,
url: vars.get(
"SAPPHIRE_TESTNET_URL",
"https://testnet.sapphire.oasis.io",
),
accounts,
ledgerAccounts,
},
sapphireMain: {
chainId: 23294,
url: vars.get("SAPPHIRE_MAINNET_URL", "https://sapphire.oasis.io"),
accounts,
ledgerAccounts,
},
},
xdeploy: {
// Change this name to the name of your main contract
Expand Down Expand Up @@ -1061,6 +1076,9 @@ const config: HardhatUserConfig = {
// For 5ireChain testnet & mainnet
"5ireChain": vars.get("5IRE_CHAIN_API_KEY", ""),
"5ireChainTestnet": vars.get("5IRE_CHAIN_API_KEY", ""),
// For Oasis Sapphire testnet & mainnet
sapphire: vars.get("SAPPHIRE_API_KEY", ""),
sapphireTestnet: vars.get("SAPPHIRE_API_KEY", ""),
},
customChains: [
{
Expand Down Expand Up @@ -1685,6 +1703,22 @@ const config: HardhatUserConfig = {
browserURL: "https://testnet.5irescan.io",
},
},
{
network: "sapphire",
chainId: 23294,
urls: {
apiURL: "https://explorer.oasis.io/mainnet/sapphire/api",
browserURL: "https://explorer.oasis.io/mainnet/sapphire",
},
},
{
network: "sapphireTestnet",
chainId: 23295,
urls: {
apiURL: "https://explorer.oasis.io/testnet/sapphire/api",
browserURL: "https://explorer.oasis.io/testnet/sapphire",
},
},
],
},
tenderly: {
Expand Down
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@
"deploy:zetachainmain": "npx hardhat run --network zetaChainMain scripts/deploy.ts",
"deploy:5irechaintestnet": "npx hardhat run --network 5ireChainTestnet scripts/deploy.ts",
"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",
"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 @@ -156,7 +158,7 @@
"lint:fix": "pnpm prettier:fix && pnpm solhint:fix && npx eslint . --fix"
},
"devDependencies": {
"@eslint/js": "^9.11.0",
"@eslint/js": "^9.11.1",
"@matterlabs/hardhat-zksync-deploy": "^1.5.0",
"@matterlabs/hardhat-zksync-ethers": "1.2.1",
"@matterlabs/hardhat-zksync-solc": "^1.2.4",
Expand All @@ -171,15 +173,15 @@
"@nomicfoundation/hardhat-verify": "^2.0.11",
"@nomicfoundation/ignition-core": "^0.15.5",
"@openzeppelin/contracts": "^5.0.2",
"@tenderly/hardhat-tenderly": "^2.3.0",
"@tenderly/hardhat-tenderly": "^2.3.1",
"@truffle/dashboard-hardhat-plugin": "^0.2.15",
"@typechain/ethers-v6": "^0.5.1",
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.3.19",
"@types/mocha": "^10.0.8",
"@types/node": "^22.5.5",
"@types/node": "^22.6.1",
"chai": "^4.5.0",
"eslint": "^9.11.0",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
"ethers": "^6.13.2",
"hardhat": "^2.22.11",
Expand All @@ -193,8 +195,8 @@
"ts-node": "^10.9.2",
"typechain": "^8.3.2",
"typescript": "^5.6.2",
"typescript-eslint": "^8.6.0",
"xdeployer": "^3.1.0",
"typescript-eslint": "^8.7.0",
"xdeployer": "^3.1.1",
"zksync-ethers": "^6.12.1"
}
}
Loading

0 comments on commit e6c6f53

Please sign in to comment.