forked from lidofinance/lido-l2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Tests | ||
|
||
## Unit | ||
Unit tests for smart contracts. Due to their close relation, some tests create multiple real contract instances instead of using mocks. | ||
|
||
## Integration | ||
Run on forks only | ||
### Non-rebasable token (wstETH) bridging tests | ||
Testing the positive scenario of bridging the wstETH token. For `stETH on OP`, a series of tests were created to verify the state during the upgrade process. | ||
#### L1 and L2 has only wstETH bridging. Pre-stETH upgrade state. | ||
```bash | ||
npx hardhat test ./test/integration/bridging-non-rebasable-old_L1-old_L2.integration.test.ts | ||
``` | ||
#### State when L1 already upgraded and L2 isn't. Half-baked stETH on Op upgrade state. | ||
```bash | ||
npx hardhat test ./test/integration/bridging-non-rebasable-new_L1-old_L2.integration.test.ts | ||
``` | ||
#### State when both L1 and L2 are upgraded. | ||
```bash | ||
npx hardhat test ./test/integration/bridging-non-rebasable.integration.test.ts | ||
``` | ||
## managing-e2e | ||
These tests are designed to run on a real blockchain and modify some important state. Therefore, they should only be used on a testnet. | ||
|
||
## e2e | ||
These tests are designed to run on a real blockchain. However, due to the lengthy withdrawal process on Optimism, it is necessary to manually complete the withdrawals by first running the prove step | ||
```bash | ||
export TX_HASH=<take_it_from_bridging...e2e.test.ts> | ||
npx ts-node --files ./scripts/optimism/prove-message.ts | ||
``` | ||
and then finalizing it after 7 days. | ||
```bash | ||
export TX_HASH=<take_it_from_previouse_step> | ||
npx ts-node --files ./scripts/optimism/finalize-message.ts | ||
``` | ||
|
||
|
||
|