l2-base-bridging/README.md

39 lines
813 B
Markdown
Raw Normal View History

2023-08-20 18:53:59 +00:00
# L2 Optimism ERC-20 Bridging
2023-08-20 18:52:05 +00:00
2023-08-20 18:53:59 +00:00
This is for depositing L1 ERC-20 tokens to L2. Written for Base blockchain
originally.
2023-08-20 18:52:05 +00:00
This is a separate project from the token build/deploy project because there
is a dependency conflict between Hardhat and the Optimism SDK.
## Build
2023-08-20 18:53:59 +00:00
```
npm install #download dependencies
npx tsc # compile
```
2023-08-20 18:52:05 +00:00
## configure
2023-08-20 18:53:59 +00:00
create a file `.env.dev`:
2023-08-20 18:52:05 +00:00
2023-08-20 18:53:59 +00:00
```
MNEMONIC="special person entering our world egg yolks"
L1_TOKEN_ADDRESS=0xwhatever01
L2_TOKEN_ADDRESS=0xwhatever02
L1_RPC_URL="https://goerli.infura.io/v3/yourapikeyhere"
L2_RPC_URL=https://goerli.base.org
```
2023-08-20 18:52:05 +00:00
Tailor to your environment. You can create multiple with different suffixes,
they are loaded by the NODE_ENV environment variable below.
## Run
2023-08-20 18:53:59 +00:00
```
NODE_ENV=dev node dist/index.js weiamounthere
```
2023-08-20 18:52:05 +00:00
## License
MIT license.