Files
uma/ci/tests/test-integration.sh
2e14261599 feat(insured-bridge-e2e): add full lifecycle end to end tests (#3321)
* Init: add `ovm` to hardhat.config

* add demo test

Signed-off-by: Nick Pai <[email protected]>

* can compile from whitelist

Signed-off-by: Nick Pai <[email protected]>

* Update packages/common/src/hardhat/tasks/compile.js

Co-authored-by: Matt Rice <[email protected]>

* rename optimism to ovm; add optimism-node scripts

* remove hardhat ethers and waffle

Signed-off-by: Nick Pai <[email protected]>

* lockfile

Signed-off-by: Nick Pai <[email protected]>

* Use hardhat artifacts to import contract artifact

* don't test ovm tests on hardhat network

* Move deps to devdeps

* Add some files to compileWhitelist

* can't get Finder.js to work

Signed-off-by: Nick Pai <[email protected]>

* wip

Signed-off-by: Nick Pai <[email protected]>

* Update Finder.js

* Update Finder.js

* Make Finder test work with optimism network

* Update package.json

* revert yarn.lock

Signed-off-by: Nick Pai <[email protected]>

* revert yarn.lock

Signed-off-by: Nick Pai <[email protected]>

* Update yarn.lock

* wip

* wip

* wip

Signed-off-by: Christopher Maree <[email protected]>

* BROKEN WIP

Signed-off-by: Christopher Maree <[email protected]>

* WIP fix

Signed-off-by: Christopher Maree <[email protected]>

* Updated

Signed-off-by: Christopher Maree <[email protected]>

* revert

Signed-off-by: Christopher Maree <[email protected]>

* simplified packages

Signed-off-by: Christopher Maree <[email protected]>

* Updated core

Signed-off-by: Christopher Maree <[email protected]>

* clean

Signed-off-by: Christopher Maree <[email protected]>

* further package patching

Signed-off-by: Christopher Maree <[email protected]>

* removed a redundant package

Signed-off-by: Christopher Maree <[email protected]>

* Delete OVM_L2CrossDomainMessengerMock.sol

* Update packages/core/contracts/insured-bridge/implementation/L1_BridgeRouter.sol

Co-authored-by: nicholaspai <[email protected]>

* wip

Signed-off-by: Christopher Maree <[email protected]>

* clean

Signed-off-by: Christopher Maree <[email protected]>

* fix

Signed-off-by: Christopher Maree <[email protected]>

* improve(insured-bridge): Add state variables, events, and function interfaces to BridgeRouter

* Remove reference to NetId

* Add L1TokenRelationships struct

* Update L1_BridgeRouter.sol

* revert

* Update yarn.lock

* Implement admin functions

* updated to show how to deploy

Signed-off-by: Christopher Maree <[email protected]>

* add disputedDeposits struct and add unit test shim

Signed-off-by: Nick Pai <[email protected]>

* Rename

* Update compile.js

* Update compile.js

* Update names

* Update OVM_L2DepositBox.js

* rename test

* Rename files

* Update HardhatConfig.js

* ffix test

* Update compile.js

* Update compile.js

* feat(insured-bridge): Implement xchain messaging in WithdrawalBox

* Update BridgeRouter.sol

* WIP: Does not compile yet

* WIP

* wip

* WIP

* Add ancillary data creation

* Update BridgeRouter.sol

* Compiles successfully

* Finish BridgePoolFactory tests

* Finish tests

* fix tests post merge

Signed-off-by: Nick Pai <[email protected]>

* Update BridgePoolFactoryInterface.sol

* Update packages/core/contracts-ovm/insured-bridge/implementation/BridgePool.sol

Co-authored-by: Chris Maree <[email protected]>

* Update packages/core/contracts-ovm/insured-bridge/implementation/BridgePool.sol

Co-authored-by: Chris Maree <[email protected]>

* Update packages/core/contracts-ovm/insured-bridge/implementation/BridgePool.sol

Co-authored-by: Chris Maree <[email protected]>

* Update BridgePool.sol

* natspec

* Change deposit contract validation to modifier and update test

* Update InsuredBridge.e2e.js

* Remove BridgePoolFactoryInterface, update comments, other nits

* comment section headers: use all caps

* implement new relay administrator methods

* whitelistToken deploys new BridgePool

* Reduce uint256 --> uint64

* Update BridgePool.js

* Finish governance relay functions

* Update BridgePoolFactory.js

* wip: Map deposits to relay hash instead of deposit ID

Signed-off-by: Nick Pai <[email protected]>

* Update BridgePool.sol

* Don't store relay data in global state, provide helper methods to encode/decode hash

* Update BridgePool.sol

* Add demonstration test

* Update BridgePool.sol

* Update BridgePoolFactory.sol

* Rename to BridgeAdmin, don't deploy BridgePool in whitelist token

* Change event and rename Deposit to Relay

* Key by hash instead of bytes

* Update OVM_BridgeDepositBox.sol

* Update BridgePool.sol

* fix tests

* Update BridgeAdmin.sol

* Update BridgeAdmin.js

* Prevent withdraw recipients from being double paid after an instant relay is disputed

* Update BridgePool.js

* Finish tests and implement priceDisputed

* implement speedUpRelay + tests

* Implemented settle relay except for actual payout part

* fixed lint

Signed-off-by: Christopher Maree <[email protected]>

* Finish settle relay

* add comment

Signed-off-by: Nick Pai <[email protected]>

* additional comments in tests

Signed-off-by: Nick Pai <[email protected]>

* Update BridgePool.js

* fixed bridge admin

Signed-off-by: Christopher Maree <[email protected]>

* fixed broken tests

Signed-off-by: Christopher Maree <[email protected]>

* fixed implementation

Signed-off-by: Christopher Maree <[email protected]>

* cleaned up logic

Signed-off-by: Christopher Maree <[email protected]>

* Updated fees

Signed-off-by: Christopher Maree <[email protected]>

* updated tests

Signed-off-by: Christopher Maree <[email protected]>

* Update

Signed-off-by: Christopher Maree <[email protected]>

* refac

Signed-off-by: Christopher Maree <[email protected]>

* removed an interanl variable

Signed-off-by: Christopher Maree <[email protected]>

* Updated a comment

Signed-off-by: Christopher Maree <[email protected]>

* fixed admin tests

Signed-off-by: Christopher Maree <[email protected]>

* Added more e2e tests

Signed-off-by: Christopher Maree <[email protected]>

* fix

Signed-off-by: Christopher Maree <[email protected]>

* resolved another merge issue

Signed-off-by: Christopher Maree <[email protected]>

* nits

Signed-off-by: Christopher Maree <[email protected]>

* further nits

Signed-off-by: Christopher Maree <[email protected]>

* Added additional comment on size

Signed-off-by: Christopher Maree <[email protected]>

* move package to dev dep

Signed-off-by: Christopher Maree <[email protected]>

* reverted syntax sugar

Signed-off-by: Christopher Maree <[email protected]>

* fixed a typo

Signed-off-by: Christopher Maree <[email protected]>

* removed CI and added docs

Signed-off-by: Christopher Maree <[email protected]>

* fixed lint issue

Signed-off-by: Christopher Maree <[email protected]>

Co-authored-by: Nick Pai <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
Co-authored-by: Matt Rice <[email protected]>
2021-09-08 14:29:06 +02:00

28 lines
765 B
Bash

#!/bin/bash
cat << EOF
test-integration:
machine:
image: ubuntu-2004:202010-01
working_directory: ~/protocol
resource_class: xlarge
steps:
- restore_cache:
key: protocol-completed-build-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Install dependencies
command: |
sudo apt update
sudo apt install nodejs npm
sudo npm install --global yarn
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
nvm install 15.10.0
- run:
name: Run integration tests
command: |
nvm use 15.10.0
yarn optimism-up
sleep 120
yarn --cwd packages/core test-e2e
EOF