script to deploy locally
This commit is contained in:
parent
f19428e409
commit
1b8ecb5c37
|
@ -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,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue