Skip to content

Commit

Permalink
feat: add scroll testnet config
Browse files Browse the repository at this point in the history
  • Loading branch information
0xEillo committed Oct 12, 2023
1 parent d0b3281 commit 3b0fa6b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
1 change: 1 addition & 0 deletions contracts/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
INFURA_KEY=
PRIVATE_KEY=0000000000000000000000000000000000000000000000000000000000000001
ETHERSCAN_API_KEY=
SCROLL_API_KEY=

# Verax Testnet Config
ROUTER_ADDRESS=0x736c78b2f2cBf4F921E8551b2acB6A5Edc9177D5
Expand Down
19 changes: 16 additions & 3 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ const config: HardhatUserConfig = {
hardhat: {},
"linea-goerli": {
url: `https://linea-goerli.infura.io/v3/${process.env.INFURA_KEY ?? ""}`,
accounts: [process.env.PRIVATE_KEY ?? "0000000000000000000000000000000000000000000000000000000000000000"],
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
linea: {
url: `https://linea-mainnet.infura.io/v3/${process.env.INFURA_KEY ?? ""}`,
accounts: [process.env.PRIVATE_KEY ?? "0000000000000000000000000000000000000000000000000000000000000000"],
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_KEY ?? ""}`,
accounts: [process.env.PRIVATE_KEY ?? "0000000000000000000000000000000000000000000000000000000000000000"],
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
"scroll-sepolia": {
url: "https://sepolia-rpc.scroll.io/" || "",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
},
paths: {
Expand All @@ -41,6 +45,7 @@ const config: HardhatUserConfig = {
"linea-goerli": process.env.ETHERSCAN_API_KEY ?? "",
linea: process.env.ETHERSCAN_API_KEY ?? "",
sepolia: process.env.ETHERSCAN_API_KEY ?? "",
"scroll-sepolia": process.env.SCROLL_API_KEY ?? "",
},
customChains: [
{
Expand All @@ -59,6 +64,14 @@ const config: HardhatUserConfig = {
browserURL: "https://lineascan.build",
},
},
{
network: "scroll-sepolia",
chainId: 534351,
urls: {
apiURL: "https://sepolia-blockscout.scroll.io/api",
browserURL: "https://sepolia-blockscout.scroll.io/",
},
},
],
},
};
Expand Down
11 changes: 10 additions & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,36 @@
"check:upgradeability:ci": "cp .env.example .env && pnpm run check:upgradeability",
"check:upgradeable": "npx hardhat run --network linea script/upgrade/checkUpgradeable.ts",
"check:upgradeable:goerli": "npx hardhat run --network linea-goerli script/upgrade/checkUpgradeable.ts",
"check:upgradeable:scroll-sepolia": "npx hardhat run --network scroll-sepolia script/upgrade/checkUpgradeable.ts",
"clean": "rm -rf lcov.info coverage artifacts cache_hardhat cache out typechain-types",
"decode": "npx hardhat run script/decode.ts",
"deploy:CorrectModule": "npx hardhat run --network linea script/deploy/deployCorrectModule.ts",
"deploy:CorrectModule:goerli": "npx hardhat run --network linea-goerli script/deploy/deployCorrectModule.ts",
"deploy:CorrectModule:scroll-sepolia": "npx hardhat run --network scroll-sepolia script/deploy/deployCorrectModule.ts",
"deploy:IncorrectModule": "npx hardhat run --network linea script/deploy/deployIncorrectModule.ts",
"deploy:IncorrectModule:goerli": "npx hardhat run --network linea-goerli script/deploy/deployIncorrectModule.ts",
"deploy:IncorrectModule:scroll-sepolia": "npx hardhat run --network scroll-sepolia script/deploy/deployIncorrectModule.ts",
"deploy:MsgSenderModule": "npx hardhat run --network linea script/deploy/deployMsgSenderModule.ts",
"deploy:MsgSenderModule:goerli": "npx hardhat run --network linea-goerli script/deploy/deployMsgSenderModule.ts",
"deploy:MsgSenderModule:scroll-sepolia": "npx hardhat run --network scroll-sepolia script/deploy/deployMsgSenderModule.ts",
"deploy:all": "npx hardhat run --network linea script/deploy/deployEverything.ts",
"deploy:all:goerli": "npx hardhat run --network linea-goerli script/deploy/deployEverything.ts",
"deploy:all:scroll-sepolia": "npx hardhat run --network scroll-sepolia script/deploy/deployEverything.ts",
"deploy:post": "npx hardhat run --network linea script/deploy/postDeployment.ts",
"deploy:post:goerli": "npx hardhat run --network linea-goerli script/deploy/postDeployment.ts",
"deploy:post:scroll-sepolia": "npx hardhat run --network scroll-sepolia script/deploy/postDeployment.ts",
"encode": "npx hardhat run script/encode.ts",
"lint": "pnpm solhint \"{script,src,test}/**/*.sol\"",
"reimport": "npx hardhat run --network linea script/recreateNetworkFile.ts",
"reimport:goerli": "npx hardhat run --network linea-goerli script/recreateNetworkFile.ts",
"reimport:scroll-sepolia": "npx hardhat run --network scroll-sepolia script/recreateNetworkFile.ts",
"test": "forge test",
"upgrade:all": "npx hardhat run --network linea script/upgrade/upgradeEverything.ts",
"upgrade:all:force": "npx hardhat run --network linea script/upgrade/forceUpgradeEverything.ts",
"upgrade:all:goerli": "npx hardhat run --network linea-goerli script/upgrade/upgradeEverything.ts",
"upgrade:all:goerli:force": "npx hardhat run --network linea-goerli script/upgrade/forceUpgradeEverything.ts"
"upgrade:all:goerli:force": "npx hardhat run --network linea-goerli script/upgrade/forceUpgradeEverything.ts",
"upgrade:all:scroll-sepolia": "npx hardhat run --network scroll-sepolia script/upgrade/upgradeEverything.ts",
"upgrade:all:goerli:scroll-sepolia": "npx hardhat run --network scroll-sepolia script/upgrade/forceUpgradeEverything.ts"
},
"devDependencies": {
"@nomicfoundation/hardhat-ethers": "^3.0.4",
Expand Down

0 comments on commit 3b0fa6b

Please sign in to comment.