-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: test utils and abi code generator (#1013)
* test: add test utils * test: fix userdoc vs. devdoc interpretation * test: starting to add fund setup helpers * test: policy prototyping * test: more fund setup utils * test: resolve promises for convenience * test: add capability to easily deploy contracts * test: add codegen step to travis.yml * test: organize imports * test: code formatting * test: add typecheck command * test: ignore code formatting for generated code * test: add test snapshots and unit testing utils * test: remove static method * test: cleanup * test: finish general walkthrough example * test: cleanup * test: remove generated code from git * test: refactor on top of crestproject * test: restructure directories * test: new command for new tests * test: fix yarn.lock * test: fix test preset * fix: test imports * test: use tx var for convenience and test readability * test: update crestproject dependency * test: add WIP of new kyberAdapter unit test suite and KyberTakeOrder util * test: add WIP of new valueInterpreter unit test suite and prices util * test: upgrade crestproject * test: upgrade crestproject and implement simplifications * test: update valueInterpreter unit test suite and prices util * test: add WIP for shares unit test suite * test: add WIP for vault unit test suite * test: upgrade to latest crestproject version * feat: update crestproject * test: add event assertions * test: update kyberAdapter test with boilerplate for forwarding * test: add snapshot utils for infrastructural components * test: update registry unit test to use new snapshot helpers * test: update IIntegrationAdapter type * test: renaming and cleanup * test: add WIP for engine unit test suite * test: add deployment script * test: fix imports * test: refactor tests * test: add more deployment utils * chore: fix PolicyManagerFactory in deployment script * test: update kyberAdapter test * test: add IERC20 to contracts * test: remove console logs * chore: add token approval to requestShares * test: fix event parsing in fund setup * test: update kyberAdapter test with new tests and to handle fund creation * test: fix kyber adapter test * test: refactor kyber adapter test * test: better argument names * test: refactor cleaner usage of ethers imports * test: add a test to check expected incoming asset amount reverts * test: add tests for trading back and forth * test: remove old tests and refactor and cleanup repo * chore: fix readme * chore: directory cleanup * test: fixing tests * fix: prettier ignore path * fix: ignore ganache-core * fix: use caret dependencies * test: use different jest matchers * chore: add DS_Store to gitignore * test: add a base contract for mock integratees, and a kyber mock integratee implementation * fix: fix spdx license warnings * test: use new integratee mock * fix: crestproject history tracking * test: upgrade nomiclabs buidler * test: rename directory * fix: move openzeppelin contracts do dependencies * feat: add linting to travis Co-authored-by: Sean Casey <[email protected]> Co-authored-by: luongnt95 <[email protected]>
- Loading branch information
1 parent
c31ea3a
commit fb5c31c
Showing
115 changed files
with
5,476 additions
and
17,507 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,2 @@ | ||
# Ignore generated contracts | ||
/tests/contracts/codegen |
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,7 @@ | ||
{ | ||
"printWidth": 80, | ||
"semi": true, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"bracketSpacing": true | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,23 +1,27 @@ | ||
language: node_js | ||
sudo: required | ||
os: | ||
- linux | ||
dist: bionic | ||
services: | ||
- docker | ||
|
||
node_js: | ||
- '12' | ||
- '13' | ||
- '14' | ||
|
||
install: yarn --frozen-lockfile | ||
script: | ||
- node --version | ||
- yarn --version | ||
- yarn build | ||
- yarn test | ||
- yarn typecheck | ||
- yarn lint | ||
|
||
notifications: | ||
email: | ||
on_failure: change | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- node_modules | ||
install: | ||
- yarn install | ||
before_script: | ||
- yarn devchain > ganache.log & | ||
- until curl 127.0.0.1:8545 -X POST --data '{"method":"net_listening"}' >/dev/null 2>&1; do :; done | ||
script: | ||
- yarn compile | ||
- yarn deploy | ||
- yarn test | ||
after_failure: | ||
- cat ganache.log |
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
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
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,2 @@ | ||
// This file simply exists to allow using the buidler evm. | ||
module.exports = {}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity 0.6.8; | ||
|
||
import "./ISpoke.sol"; | ||
|
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
1 change: 1 addition & 0 deletions
1
contracts/fund/policies/utils/BuySharesPreValidatePolicyBase.sol
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity 0.6.8; | ||
|
||
import "./PolicyBase.sol"; | ||
|
1 change: 1 addition & 0 deletions
1
contracts/fund/policies/utils/CallOnIntegrationPostValidatePolicyBase.sol
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity 0.6.8; | ||
|
||
import "./PolicyBase.sol"; | ||
|
1 change: 1 addition & 0 deletions
1
contracts/fund/policies/utils/CallOnIntegrationPreValidatePolicyBase.sol
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity 0.6.8; | ||
|
||
import "./PolicyBase.sol"; | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity 0.6.8; | ||
|
||
import "../../../registry/Registry.sol"; | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.