Skip to content

Commit

Permalink
Merge pull request #35 from celestiaorg/jcs/bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
jcstein authored May 4, 2023
2 parents c33c5a0 + 320b34a commit ccee67b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,26 @@ Read through [CONTRIBUTING.md](./CONTRIBUTING.md) for a general overview of our
Use the [Developer Quick Start](./CONTRIBUTING.md#development-quick-start) to get your development environment set up to start working on the Optimism Monorepo.
Then check out our list of [good first issues](https://github.com/ethereum-optimism/optimism/contribute) to find something fun to work on! -->

## Bridging

If you have the OP Stack + Celestia setup running, you can test out bridging from the L1
to the L2.

To do this, first navigate to the `packages/contracts-bedrock` directory and create a
`.env` file with the following contents:

```bash
L1_PROVIDER_URL=http://localhost:8545
L2_PROVIDER_URL=http://localhost:9545
PRIVATE_KEY=bf7604d9d3a1c7748642b1b7b05c2bd219c9faa91458b370f85e5a40f3b03af7
```

Then, run the following from the same directory:

```bash
npx hardhat deposit --network devnetL1 --l1-provider-url http://localhost:8545 --l2-provider-url http://localhost:9545 --amount-eth <AMOUNT> --to <ADDRESS>
```

## Directory Structure

<pre>
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/tasks/deposits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ task('deposit', 'Deposits funds onto L2.')
)
.setAction(async (args, hre) => {
const { l1ProviderUrl, l2ProviderUrl, to, amountEth, privateKey } = args
const proxy = await hre.deployments.get('OptimismPortalProxy')
// const proxy = await hre.deployments.get('OptimismPortalProxy')

const OptimismPortal = await hre.ethers.getContractAt(
'OptimismPortal',
proxy.address
'0x6900000000000000000000000000000000000001'
)

const l1Provider = new providers.JsonRpcProvider(l1ProviderUrl)
Expand Down

0 comments on commit ccee67b

Please sign in to comment.