Skip to content

Commit e9cab36

Browse files
committed
chore: update README.md
Signed-off-by: Tomás Migone <[email protected]>
1 parent ad11bdf commit e9cab36

File tree

1 file changed

+26
-33
lines changed

1 file changed

+26
-33
lines changed

TESTING.md

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,38 @@ There are several types of e2e tests which can be run separately:
3333
- Read and write interactions with the blockchain. _Requires an account with sufficient balance!_
3434
- Example: a test validating that a user can add signal to a subgraph.
3535

36-
### Hardhat local node
36+
### Hardhat local node (L1)
3737

38-
To run all e2e tests against a hardhat local node run:
38+
It can be useful to run E2E tests against a fresh protocol deployment on L1, this can be done with the following:
3939

4040
```bash
4141
yarn test:e2e
4242
```
4343

44-
The command will perform the following actions:
44+
The command will:
45+
- start a hardhat local node
46+
- deploy the L1 protocol
47+
- configure the new L1 deployment
48+
- Run all L1 e2e tests
4549

46-
- Start a hardhat node (localhost)
47-
- Run `migrate:accounts` hardhat task to create keys for all protocol roles (deployer, governor, arbiter, etc). This currently doesn't support multisig accounts.
48-
- Run `migrate` hardhat task to deploy the protocol
49-
- Run `migrate:ownership` hardhat task to transfer ownership of governed contracts to the governor
50-
- Run `migrate:unpause` to unpause the protocol
51-
- Run `e2e` hardhat task to run all deployment tests (config and init)
52-
- Run `e2e:scenario` hardhat task to run a scenario
50+
### Arbitrum Nitro testnodes (L1/L2)
51+
52+
If you want to test the protocol on an L1/L2 setup, you can run:
53+
54+
```bash
55+
L1_NETWORK=localnitrol1 L2_NETWORK=localnitrol2 yarn test:e2e
56+
```
57+
58+
In this case the command will:
59+
- deploy the L1 protocol
60+
- configure the new L1 deployment
61+
- deploy the L2 protocol
62+
- configure the new L2 deployment
63+
- configure the L1/L2 bridge
64+
- Run all L1 e2e tests
65+
- Run all L2 e2e tests
66+
67+
Note that you'll need to setup the testnodes before running the tests. See [Quick Setup](https://github.com/edgeandnode/nitro#quick-setup) for details on how to do this.
5368

5469
### Other networks
5570

@@ -82,26 +97,4 @@ Scenarios are defined by an optional script and a test file:
8297
- They run before the test file.
8398
- Test file
8499
- Should be named e2e/scenarios/{scenario-name}.test.ts.
85-
- Standard chai/mocha/hardhat/ethers test file.
86-
87-
## Setting up Arbitrum's testnodes
88-
89-
Arbitrum provides a quick way of setting up L1 and L2 testnodes for local development and testing. The following steps will guide you through the process of setting them up. Note that a local installation of Docker and Docker Compose is required.
90-
91-
```bash
92-
git clone https://github.com/offchainlabs/nitro
93-
cd nitro
94-
git submodule update --init --recursive
95-
96-
# Apply any changes you might want, see below for more info, and then start the testnodes
97-
./test-node.bash --init
98-
```
99-
100-
**Useful information**
101-
- L1 RPC: [http://localhost:8545](http://localhost:8545/)
102-
- L2 RPC: [http://localhost:8547](http://localhost:8547/)
103-
- Blockscout explorer (L2 only): [http://localhost:4000/](http://localhost:4000/)
104-
- Prefunded genesis key (L1 and L2): `e887f7d17d07cc7b8004053fb8826f6657084e88904bb61590e498ca04704cf2`
105-
106-
**Enable automine on L1**
107-
In `docker-compose.yml` file edit the `geth` service command by removing the `--dev.period 1` flag.
100+
- Standard chai/mocha/hardhat/ethers test file.

0 commit comments

Comments
 (0)