Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add guide on deposits and workaround in deposits.ts #35

Merged
merged 6 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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