diff --git a/hardhat.config.ts b/hardhat.config.ts index 68f1c3d..99d62b6 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -36,8 +36,30 @@ const config: HardhatUserConfig = { }, gasPrice: 1000000000, }, + "eth-goerli": { + url: `https://goerli.infura.io/v3/${process.env.INFURA_KEY}`, + accounts: { + mnemonic: process.env.MNEMONIC as string + }, + gasPrice: 1000000000, + }, + }, + defaultNetwork: "base-local", + etherscan: { + apiKey: { + "base-goerli": "PLACEHOLDER_STRING" + }, + customChains: [ + { + network: "base-goerli", + chainId: 84531, + urls: { + apiURL: "https://api-goerli.basescan.org/api", + browserURL: "https://goerli.basescan.org" + } + } + ] }, - defaultNetwork: "hardhat", }; export default config; diff --git a/scripts/deploy-dev.sh b/scripts/deploy-dev.sh new file mode 100755 index 0000000..2a6ff23 --- /dev/null +++ b/scripts/deploy-dev.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +NODE_ENV=dev +export NODE_ENV + +npx hardhat compile + +npx hardhat --network eth-goerli run scripts/deploy-l1.ts + +if [ "$?" -eq 0 ] +then + npx hardhat --network base-goerli run scripts/deploy-l2.ts +else + echo "deploy to L1 failed so aborting L2" >&2 + exit 1 +fi