Skip to content

Commit

Permalink
Merge branch 'main' into add-e2e-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gvladika committed Jan 8, 2024
2 parents 6e5ceea + eebc6ac commit fae20e6
Show file tree
Hide file tree
Showing 25 changed files with 3,174 additions and 873 deletions.
27 changes: 19 additions & 8 deletions .env-sample
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
## RPC endpoint
BASECHAIN_RPC=""

## Deployer key used for deploying creator or creating token bridge
BASECHAIN_DEPLOYER_KEY=""

## WETH address on the basechain. It will be set and used in the TokenBridgeCreator
BASECHAIN_WETH=""

## Gas limit for deploying child chain factory needs to be provided to the TokenBridgeCreator when templates are set.
## If this param is not provided then gas limit will be estimated using SDK from child chain (specified by ORBIT_RPC and ROLLUP_ADDRESS)
GAS_LIMIT_FOR_L2_FACTORY_DEPLOYMENT=6000000

## Contract verification
ARBISCAN_API_KEY=""

### Vars for creating token bridge from existing TokenBridgeCreator
## Rollup on top of which token bridge will be created
ROLLUP_ADDRESS=""
ORBIT_RPC=""
ROLLUP_OWNER=""
L1_TOKEN_BRIDGE_CREATOR=""
# needed for verification
L1_RETRYABLE_SENDER=""

## RPC endpoints
BASECHAIN_RPC=""
ORBIT_RPC=""

## Deployer key used for deploying creator and creating token bridge
BASECHAIN_DEPLOYER_KEY=""
L1_RETRYABLE_SENDER=""
25 changes: 25 additions & 0 deletions .env.arb1.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## RPC endpoint
BASECHAIN_RPC="https://arb1.arbitrum.io/rpc"

## Deployer key used for deploying creator or creating token bridge
BASECHAIN_DEPLOYER_KEY=""

## WETH address on the basechain. It will be set and used in the TokenBridgeCreator
BASECHAIN_WETH="0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"

## Gas limit for deploying child chain factory needs to be provided to the TokenBridgeCreator when templates are set.
## If this param is not provided then gas limit will be estimated using SDK from child chain (specified by ORBIT_RPC and ROLLUP_ADDRESS)
GAS_LIMIT_FOR_L2_FACTORY_DEPLOYMENT=6000000

## Contract verification
ARBISCAN_API_KEY=""


### Vars for creating token bridge from existing TokenBridgeCreator
## Rollup on top of which token bridge will be created
# ROLLUP_ADDRESS=""
# ORBIT_RPC=""
# ROLLUP_OWNER=""
# L1_TOKEN_BRIDGE_CREATOR=""
# # needed for verification
# L1_RETRYABLE_SENDER=""
73 changes: 73 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,76 @@ jobs:

- name: Test Storage Layouts
run: yarn run test:storage

test-e2e:
name: Test e2e
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: OffchainLabs/actions/run-nitro-test-node@main
with:
nitro-testnode-ref: bump-nitro
l3-node: true
no-token-bridge: true

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Install packages
run: yarn

- name: Compile contracts
run: yarn build

- name: Deploy creator and create token bridge
run: yarn deploy:local:token-bridge

- name: Verify deployed token bridge
run: yarn test:tokenbridge:deployment

- name: Verify creation code generation
run: yarn test:creation-code

test-e2e-custom-fee-token:
name: Test e2e on custom fee token chain
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: OffchainLabs/actions/run-nitro-test-node@main
with:
nitro-testnode-ref: bump-nitro
l3-node: true
args: --l3-fee-token
no-token-bridge: true

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Install packages
run: yarn

- name: Compile contracts
run: yarn build

- name: Deploy creator and create token bridge
run: yarn deploy:local:token-bridge

- name: Verify deployed token bridge
run: yarn test:tokenbridge:deployment

- name: Verify creation code generation
run: yarn test:creation-code
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
[submodule "lib/nitro-contracts"]
path = lib/nitro-contracts
url = [email protected]:OffchainLabs/nitro-contracts.git
branch = feature-orbit-bridge
branch = v1.1.0
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ See security audit reports [here](./audits).

This repository is offered under the Apache 2.0 license. See LICENSE for details.

## Deployment
Check [this doc](./docs/deployment.md) for instructions on deployment and verification of token bridge.

## Contact

Discord - [Arbitrum](https://discord.com/invite/5KE54JwyTs)
Expand Down
Loading

0 comments on commit fae20e6

Please sign in to comment.