You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEPLOYMENT.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ To deploy to a different network execute:
40
40
yarn deploy -- --network {networkName}
41
41
42
42
# Example
43
-
yarn deploy -- --network kovan
43
+
yarn deploy -- --network goerli
44
44
```
45
45
46
46
The network must be configured in the `hardhat.config.ts` as explained in https://hardhat.org/config.
@@ -100,7 +100,7 @@ Some contracts require the address from previously deployed contracts. For that
100
100
### Deploying a new testnet
101
101
102
102
1. Make sure contracts are up to date as you please.
103
-
2.`yarn deploy-rinkeby` to deploy to Rinkeby. This will create new contracts with new addresses in `addresses.json`.
103
+
2.`yarn deploy-goerli` to deploy to Goerli. This will create new contracts with new addresses in `addresses.json`.
104
104
3. Update the `package.json` and `package-lock.json` files with the new package version and publish a new npm package with `npm publish`. You can dry-run the files to be uploaded by running `npm publish --dry-run`.
105
105
4. Merge this update into master, branch off and save for whatever version of the testnet is going on, and then tag this on the github repo, pointing to your branch (ex. at `testnet-phase-1` branch). This way we can always get the contract code for testnet, while continuing to do work on mainnet.
106
106
5. Pull the updated package into the subgraph, and other apps that depend on the package.json.
Copy file name to clipboardExpand all lines: TESTING.md
+30-37Lines changed: 30 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -33,37 +33,52 @@ There are several types of e2e tests which can be run separately:
33
33
- Read and write interactions with the blockchain. _Requires an account with sufficient balance!_
34
34
- Example: a test validating that a user can add signal to a subgraph.
35
35
36
-
### Hardhat local node
36
+
### Hardhat local node (L1)
37
37
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:
39
39
40
40
```bash
41
-
yarn test:e2e
41
+
L1_NETWORK=localhost yarn test:e2e
42
42
```
43
43
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
45
49
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:
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.
53
68
54
69
### Other networks
55
70
56
71
To run tests against a live testnet or even mainnet run:
@@ -82,26 +97,4 @@ Scenarios are defined by an optional script and a test file:
82
97
- They run before the test file.
83
98
- Test file
84
99
- 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.
0 commit comments