diff --git a/hardhat.config.ts b/hardhat.config.ts index 91457b3..68f1c3d 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -17,17 +17,23 @@ const config: HardhatUserConfig = { networks: { "base-mainnet": { url: "https://mainnet.base.org", - accounts: [process.env.WALLET_KEY as string], + accounts: { + mnemonic: process.env.MNEMONIC as string + }, gasPrice: 1000000000, }, "base-goerli": { url: "https://goerli.base.org", - accounts: [process.env.WALLET_KEY as string], + accounts: { + mnemonic: process.env.MNEMONIC as string + }, gasPrice: 1000000000, }, "base-local": { url: "http://localhost:8545", - accounts: [process.env.WALLET_KEY as string], + accounts: { + mnemonic: process.env.MNEMONIC as string + }, gasPrice: 1000000000, }, }, diff --git a/scripts/deploy-local.sh b/scripts/deploy-local.sh new file mode 100755 index 0000000..09cf29b --- /dev/null +++ b/scripts/deploy-local.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +NODE_ENV=local +export NODE_ENV + +nc -z "127.0.0.1" 8545 >/dev/null 2>&1 +if [ "$?" -ne 0 ] +then + echo "local node not running" >&2 + exit 1 +fi + +npx hardhat compile + +# Same network, for testing reasons only +npx hardhat --network base-local run scripts/deploy-l1.ts +npx hardhat --network base-local run scripts/deploy-l2.ts