Skip to content

Commit

Permalink
add l1 rpc url env var to deploy instructions; add check in instantia…
Browse files Browse the repository at this point in the history
…te bridge
  • Loading branch information
DZGoldman authored and hkalodner committed Oct 26, 2021
1 parent 7cce402 commit 2b628f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/arb-ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Bridging new a token to L2 (i.e., deploying a new token contract) through the st

1. Set `PRIVKEY` environmental variable (you can use .env) to the key of the account from which you'll be deploying (account should have some balance of the token you're bridging).

1. Set MAINNET_RPC environmental variable to L1 RPC endpoint (i.e., https://mainnet.infura.io/v3/my-infura-key)

1. `yarn bridgeStandardToken`

Required CL params:
Expand Down
7 changes: 7 additions & 0 deletions packages/arb-ts/scripts/instantiate_bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ export const instantiateBridge = async (
: network
const l2Network = networks[l1Network.partnerChainID]

if (!l1Network.rpcURL) {
throw new Error('L1 rpc url not set (see .env.sample or networks.ts)')
}
if (!l2Network.rpcURL) {
throw new Error('L2 rpc url not set (see .env.sample or networks.ts)')
}
const ethProvider = new JsonRpcProvider(l1Network.rpcURL)

const arbProvider = new JsonRpcProvider(l2Network.rpcURL)

const l1Signer = (() => {
Expand Down

0 comments on commit 2b628f8

Please sign in to comment.