8 Commits

Author SHA1 Message Date
Elena
9f30823d70
Migrate erc20-contracts to foundry (#664)
* Strip erc20 package of legacy nonsense and add foundry basics

* Make foundry build

* Remove obsoleted test/UntransferrableDummyERC20Token.sol contract

* Remove obsoleted ERC20 lib variant contracts

* Remove obsoleted DummyMultipleReturnERC20Token and DummyNoReturnERC20Token contracts

* Move test contract to dedicated folder
and remove obsoleted TypeScript contract wrappers

* Remove src/interfaces/IEtherToken.sol only used in
v3 staking which is being obsoleted [skip ci]

* Add foundry test for token

* Migrate ZRX token tests to foundry

* Fix paths to erc20 contracts

* Remove obsoleted references

* Pin erc20-contracts package on treasury

* Ignore foundry imports in link checker

* Run only forge tests for erc20 contracts

* Remove DummyERC20Token and its dependencies

* Merge IERC20TokenV06 and IERC20TokenV08
into range pragma to cover solidity 0.6.5 to 0.8.x

* Merge IEtherTokenV06 and IEtherTokenV08
into range pragma to cover solidity 0.6.5 to 0.8.x

* Migrate weth9 tests to foundry

* Upload code coverage for erc20 package

* Update changelog

* Fix review comments

Co-authored-by: duncancmt <1207590+duncancmt@users.noreply.github.com>

---------

Co-authored-by: duncancmt <1207590+duncancmt@users.noreply.github.com>
2023-02-19 20:04:24 +02:00
Elena
f2f835591e
Code coverage improvements (#656)
* Add check for coverage threshold

* Rename WrapEth foundry test file to .t.sol
2023-02-08 09:04:17 +02:00
Elena
4d7df00d5a
Fix path to foundry base test (#657) 2023-02-07 10:17:27 +02:00
Jacob Evans
80193215e3
feat: Migrate PositiveSlippage tests [LIT-804] (#650)
* feat: PositiveSlippageTransformer tests

* Remove old tests

* Affilite fee tests

* Create mintable erc20 token for v06

* Update MintableERC20TokenV06 name
2023-02-07 08:22:02 +10:00
Noah Khamliche
3a7a5d22a2
Feat: 🛠️ fix protocol release action (#652)
* 🔧 fix  and clean up foundry tests

* fix foundry tests import paths
2023-01-30 12:45:40 -05:00
Noah Khamliche
f87f5a40c0
Feat/Add Foundry Testing Environment s[TKR-525] (#555)
* added initial foundry transformERC20 tests

* added foundry tests into CircleCI flow

* add verbosity for failing tests in CI

* revert wrong CI commands

* feat: Foundry, added some more deployments (#558)

* Added some more deployments

* Rename WETH9 to WETH9V06

* Set to 0.6.x

* fix typo

* remove commit with bad prettier changes

* working bridge Fills through weth transformer

* remove unused reference

* clean up tests

* added working otc fill through transformERC20 in FQT

* resolve file imports, add samplers, arbitrumBridgeAdatper, and new FQT version

* add extra 'v' for debugging verbosity

* add extra 'v' for debugging verbosity in circleci config

* remove old traces

* refactor rpc's out of foundry.toml and into .env for CI compatibility

* remove verbosity from CI command as its now defined in foundry.toml

* setup rpc's

* ignore foundry artifacts in prettier

* change naming in prettierignore

* move /samplers to the tests subdirectory, modify remappings to reflext change

* one more try 🤞

* change CI steps

* remove yarn from CI step

* get to the right directory

* update foundry before tests

* fix tip() deprecation and use deal()

* use deal() instead of vm.deal()

* try to get foundry to have the right directory structure by updating it

* I HATE THIS

* remove foundryup

* Fix prettier issues

* Remove obsoleted import

* Use forge native commands to
install deps and test and add the --root option

* Try using forge with working-directory flag in CI

* Use nightly foundry docker image

* Update rpc endpoints config in foundry

* move tests into /forked and /local

* rename tests

* add foundry profiles to CI

* try to fix CI

* 🔧 add foundry local and forked tests to workflow

* prettier and lint

* revert deps update

* remove all samplers and add uniswapV2 sampler to ForkUtils

* address jacobs comments

* cleanup and comment

* prettier and lint

* bump contracts-zero-ex version

* set func-name-mixedcase to off in solhint for elenas new changes

* max line length to warn

* add --fix for check-md

* Update ci.yml

* fix some nitpcks and leftover code

* fix inconsistent naming

* fix bridge adapter reverts and foundry cache

* migrate foundry integration tests to /tests

* refactor contract-addresses to use the contract-addresses package style nested json

* fix solhint

* fix contract linting errors

* dont check broken links in libraries

* move forge order in gh action for testing

* add env instead of vars

* try again

* fix github actions ordering

* update licence and address comments

* remove verbosity from foundry.toml

* fix contract lint

* move back to emitting an event until samplers can be integrated as some chains dont have uniswap as a source

* add uniswap v3 sampling code for future use

* remove uniswap v3 code as its not used

* fix lint

Co-authored-by: Noah Khamliche <0xnoah@Noahs-MacBook-Pro-2.local>
Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: elenadimitrova <elena@arenabg.com>
2023-01-26 20:11:16 -05:00
Elena
c4097e4203
Migrate ZeroEx proxy tests to foundry (#638)
* Implement base instantiation of the ZeroEx proxy in foundry
and move TestZeroExFeature contract to the foundry mocks

* Migrate zero-ex tests to foundry

* Update copyright year

* Update contracts/zero-ex/tests/mocks/TestZeroExFeature.sol

Co-authored-by: Jacob Evans <jacob@dekz.net>

Co-authored-by: Jacob Evans <jacob@dekz.net>
2023-01-12 11:45:33 +02:00
Elena
b33fc27220
Migrate FlashWallet tests to foundry (#637)
* Remove contracts/zero-ex/contracts/test/TestBridge.sol

* Move foundry tests to their default location

* Wire up base foundry test and start moving
FlashWallet tests and mocks to foundry

* Move remaining FlashWallet contract tests to foundry

* Switch to foundry default cache config
2023-01-10 15:47:25 +02:00