10 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
010a926d79
Upgrade prettier-plugin-solidity to stable v1 (#622)
* Upgrade prettier-plugin-solidity to stable v1

* Prettier format contracts
2022-11-23 11:53:40 +02:00
Elena
ca0b074893
Add Solidity linter (#608)
* Add solhint and basic configuration

* Add solhint-plugin-prettier to run prettier via solhint

* Remove all solhint-disable rules in contracts

* Turn off compiler version errors

* Fix max-line-length linter errors

* Fix linting and prettier issues in contracts

* Add global lint command to run both ts and solidity linter
2022-11-08 16:12:42 +02:00
Elyas
b04455c36f
chore: Configure prettier-solidity and run prettier-solidity [TKR-532] (#592)
* add prettier-solidity + config

* run prettier

* update lockfile

* run prettier again

* Prettier missed one /:

* keep bridge adapter the same

* yarn prettier
2022-10-06 11:44:57 -04:00
mzhu25
2c187c7e85
Add Proposal 2 and test (#339) 2021-10-08 13:04:09 -07:00
Cece Z
d7dbc0576d
Support cast vote by signature in ZrxTreasury (#297)
* Support cast vote by signature in ZrxTreasury

* Address comments and fix existing tests

* test that doesnt work

* test file format

* updates

* address some of the comments

* Remove unused const

* get rid of vote_factory

* unit test for castVoteBySignature p1

* unit test for castVoteBySignature p2

* Add version to domain, and one more test

* unit test for castVoteBySignature p3

* unit test for castVoteBySignature p4

* bump utils version

* remove debug code

* address some comments

* address more pr comments

* move Vote class to protocol-utils

* Address pr comments and update changelogs
2021-09-14 16:12:51 -04:00
mzhu25
b46eeadc64
Feat/multiplex/v2 (#263)
* Refactor Multiplex into multiple files

* Pull UniswapV3 into separate file

* Add support for multihop nested within batch sell

* Add useSelfBalance and recipient to _fillRfqOrder

* Expose onlySelf variant in UniswapV3Feature for Multiplex

* Add useSelfBalance and recipient to _transformERC20

* Add support for proportional fill amounts in batchSell

* Comments and renaming

* Unit tests

* Use caps for immutables

* Rename taker -> recipient in TransformContext and SettleOrderInfo

* lint

* Address nits

* Swallow reverts for LiquidityProvider and UniswapV2 batch sells

* Address spot-check findings (#279)

* Check didSucceed in _callWithOptionalBooleanResult

* Add takerToken=ETH support to OtcOrdersFeature (#287)

* Add takerToken=ETH support to OtcOrdersFeature

* Add batchFillTakerSignedOtcOrders

* Add support for OTC to Multiplex

* Address PR feedback

* Update TransformERC20Feature (#303)

* remove multiplex_utils

* Update changelog

* unbreak tests
2021-08-12 17:09:46 -07:00
mzhu25
fe0c26387c
Fix treasury voting power calculation (#214)
* Fix treasury voting power calculation

* Update changelog
2021-04-28 10:22:52 -07:00
mzhu25
22c8e0b6db
Make the proposal/quorum thresholds updatable (#165)
* Make the proposal/quorum thresholds updatable

* Test threshold updating
2021-03-04 10:56:37 -08:00
mzhu25
e544a804c2
ZrxTreasury (#120)
* `@0x/contracts-treasury` (squashed)

Fix @0x/contracts-zero-ex readme

Create package for governance contracts

Rename @0x/contracts-governance to @0x/contracts-treasury and write contracts

Write tests and such

Missed a few places where "governance" should be "treasury"`

Update changelog with PR number

Appease CI

Arbitrary treasury actions

Export treasury artifacts and wrappers

Continue to do battle with CI

Address PR feedback

* More PR feedback
2021-01-26 09:33:14 -08:00