Skip to content

Commit

Permalink
Added token-bridge-contracts submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
yahgwai committed Dec 21, 2022
1 parent 0e5df15 commit 92978fe
Show file tree
Hide file tree
Showing 16 changed files with 37 additions and 4,270 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ jobs:
cp ./.env-sample ./.env
- name: Compile contracts
run: npx hardhat compile
run: yarn build

- name: Generate network file
run: make gen-network
run: yarn gen:network

- name: Generate nova network file
run: yarn gen:nova:network
Expand Down Expand Up @@ -138,8 +138,11 @@ jobs:
run: |
cp ./.env-sample ./.env
- name: Compile contracts
run: yarn build

- name: Generate network file
run: make gen-network
run: yarn gen:network

- name: Run integration tests
run: make test-integration
run: yarn test:integration
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "token-bridge-contracts"]
path = token-bridge-contracts
url = https://github.com/OffchainLabs/token-bridge-contracts.git
branch = reverse-bridge-2
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ This project contains smart contracts for Arbitrum token and governance. Please

## Run Foundry unit tests

Install dependencies
```
yarn
```

If not already installed, install [Foundry](https://github.com/foundry-rs/foundry#installation).

Make sure Foundry is up-to-date
Expand Down Expand Up @@ -64,15 +69,25 @@ Set the env variables (you can use the ones from .env-sample)
cp .env-sample .env
```

Install dependencies
```
yarn
```

Compile contracts
```
yarn build
```

Deploy Nitro contracts to the local node
```
make gen-network
yarn gen:network
```

Addresses for deployed contracts are stored to `localNetwork.json`

Finally run integration tests against local node
```
make test-integration
yarn test-integration
```

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"author": "Offchain Labs",
"license": "MIT",
"scripts": {
"build": "yarn build:governance && yarn build:token-bridge-types",
"build:governance": "hardhat compile",
"build:token-bridge-types": "cd token-bridge-contracts && yarn && yarn build",
"gen:network": "ts-node ./scripts/genNetwork.ts",
"gen:nova:network": "ts-node ./scripts/genNetworkNova.ts",
"gen:recipients": "ts-node ./scripts/genRecipients.ts",
Expand Down
4 changes: 2 additions & 2 deletions scripts/governanceDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import {
L1ForceOnlyReverseCustomGateway__factory,
L2CustomGatewayToken,
L2CustomGatewayToken__factory,
L2ReverseCustomGateway__factory,
} from "../typechain-types-imported/index";
L2ReverseCustomGateway__factory
} from "../lib/token-bridge-contracts/build/types"
import {
DeployedEventObject as L1DeployedEventObject,
L1GovernanceFactory,
Expand Down
4 changes: 2 additions & 2 deletions scripts/governanceDeploymentVerifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import {
L2CustomGatewayToken,
L2CustomGatewayToken__factory,
L2ReverseCustomGateway,
L2ReverseCustomGateway__factory,
} from "../typechain-types-imported";
L2ReverseCustomGateway__factory
} from "../lib/token-bridge-contracts/build/types"
import { getDeployerAddresses, getProviders, isDeployingToNova } from "./providerSetup";
import { Address, L2Network } from "@arbitrum/sdk";
import { parseEther } from "ethers/lib/utils";
Expand Down
1 change: 1 addition & 0 deletions token-bridge-contracts
Submodule token-bridge-contracts added at 5cd156
Loading

0 comments on commit 92978fe

Please sign in to comment.