23 Commits

Author SHA1 Message Date
Jacob Evans
4425c316a3
chore: update packages (#553)
* Update package.jsons to latest tools packages

* Skip tests relying on gasPrice > 0

* Yarn.lock

* Fix linter

* Update Balance checker, new ganache gets more ETH

* Fix new Ganache insufficient assertion string

* Temporarily set QuoteRequestor to skip

* Fix headers Axios now requests with
2022-08-22 14:55:42 +10:00
Lawrence Forman
4b3d98f43c
@0x/contracts-zero-ex: Prevent EP ETH balance from reducing when executin mtxs (#365)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-11-09 22:11:36 -05: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
Lawrence Forman
3557a5e5a9
@0x/contracts-zero-ex: Update tests to work with ganache chainId of 1337 (#123)
* `@0x/contracts-zero-ex`: Update tests to work with ganache chainId of 1337

* `update org deps

* `@0x/protocol-utils`: Use `Web3Wrapper.signTypedDataAsync()` instead of removed `Web3Wrapper.signTypedDataV4Async()` (#124)

Co-authored-by: Lawrence Forman <me@merklejerk.com>

* `update org deps
`@0x/order-utils`: Fix broken tests

* remove lingering console.logs

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-01-26 02:50:09 -05:00
Lawrence Forman
682c07cb73
Add mtx tooling to @0x/protocol-utils (#90)
* `@0x/contracts-zero-ex`: Use the `MetaTransaction` class from `@0x/protocol-utils` in tests.

* `@0x/protocol-utils`: Add the `MetaTransaction` class for EP mtxs + refactors

* update changelogs

* `@0x/protocol-utils`: Add mtx tests

* `@0x/protocol-utils`: Rename `mtx.ts` to `meta_transactions.ts` and misc review feedback

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-12-16 14:22:00 -05:00
Lawrence Forman
edda1edc50
@0x/protocol-utils (#76)
* add new packages

* `@0x/protocol-utils`: Update with latest code from `@0x/contracs-zero-ex` + misc stuff

* @0x/contracts-zero-ex`: Switch to using `@0x/protocol-utils` in most places

* @0x/protocol-types`: Delete this package.

* regen yarn lock

* `@0x/contracts-zero-ex`: Unpin `@0x/protocol-utils` dep.

* `@0x/contracts-integrations`: Fix borken test

* update changelogs

* `@0x/protocol-utils`: Update deps

* `@0x/protocol-utils`: add tests

* `@0x/protocol-utils`: More tests

* `@0x/protocol-utils`: Update readme.

* update deps

* run prettier

* `@0x/contract-artifacts`: Regenerate artifacts

* `@0x/contract-wrappers`: Regenerate wrappers

* `@0x/protocol-utils`: Update changelog

* `@0x/contract-wrappers`: Export stuff for doc gen

* `@0x/protocol-utils`: Use `Web3Wrapper.signTypedDataV4Async()` for MM compatibility.

* upgrade org deps

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-12-08 22:08:52 -05:00
Steve Marx
88d7e73eba
remove calldata signing (#51) 2020-11-25 16:55:12 -05:00
Lawrence Forman
7591e99316
Remove protocol fees from RFQ orders (#45)
* `@0x/contracts-zero-ex`: Remove protocol fees from native orders in certain scenarios.

* `@0x/contracts-zero-ex`: update changelog

* `@0x/contracts-zero-ex`: Add `taker` field to RFQ orders.`
`@0x/contracts-zero-ex`: Introduce protocol fees to all limit orders again.

* `@0x/contracts-zero-ex`: Rebase.

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-11-24 18:24:06 -05:00
Steve Marx
e2ee3414ea
limit order metatransactions (#44) 2020-11-24 13:39:40 -05:00
Steve Marx
5306cc03e9
Convert MetaTransactionsFeature to use the new LibSignature (#31) 2020-11-23 16:14:09 -05:00
Steve Marx
861871134b
add LibTokenSpender and convert to using that (#3)
add LibTokenSpender and convert to using that

This skips the allowance target. Allowances are instead just set on the
exchange proxy itself. There is a fallback, though, to try spending from
the allowance target if the original transfer fails.
2020-10-23 10:45:46 -04:00
Lawrence Forman
d8844f6970 @0x/contracts-integrations: Fix broken tests. 2020-09-01 17:32:29 -04:00
Lawrence Forman
1d6aef5cd6 @0x/contracts-zero-ex: Remove UniswapFeature
`@0x/contracts-zero-ex`: Fix broken tests.
2020-09-01 16:05:14 -04:00
Lawrence Forman
228246089e Merge branch 'feat/exchange-proxy/vip-uniswap' into fix/ep/meta-transactions 2020-09-01 11:59:44 -04:00
Lawrence Forman
2636384ead Merge remote-tracking branch 'origin/feat/exchange-proxy/post-cd-audit' into fix/ep/meta-transactions 2020-09-01 09:48:17 -04:00
Lawrence Forman
9cda9f69cd @0x/contracts-zero-ex: Add reentrancy guard to mtx functions
`@0x/contracts-zero-ex`: Add refund mechanism to mtxs
`@0x/contracts-zero-ex`: Pass sender to transfomers.
`@0x/contracts-zero-ex`: Refund protocol fees to `refundReceiver` in FQT.
`@0x/utils`: Add EP flavor of `IllegalReentrancyError`
`@0x/order-utils`: Add `refundReceiver` to FQT transform data.
`@0x/asset-swapper`: Add `refundReceiver` support to EP swap quote consumer.
2020-09-01 09:40:58 -04:00
Lawrence Forman
e7ad7c3af7 @0x/contracts-zero-ex: Add IUniswapV2Feature.
`@0x/contracts-zero-ex`: Rename all feature contracts to have `Feature` suffix.
`@0x/contracts-zero-ex`: Return an `IZeroExContract` instance from `fullMigrateAsync()`.
2020-08-20 16:54:50 -04:00
Michael Zhu
e078f3d479 Appease CI 2020-08-19 09:50:39 -07:00
Lawrence Forman
5dd686f22f @0x/contracts-zero-ex: Add reentrancy guard to mtx functions
`@0x/contracts-zero-ex`: Add refund mechanism to mtxs
`@0x/contracts-zero-ex`: Pass sender to transfomers.
`@0x/contracts-zero-ex`: Refund protocol fees to `refundReceiver` in FQT.
`@0x/utils`: Add EP flavor of `IllegalReentrancyError`
`@0x/order-utils`: Add `refundReceiver` to FQT transform data.
`@0x/asset-swapper`: Add `refundReceiver` support to EP swap quote consumer.
2020-08-06 22:28:35 -04:00
Lawrence Forman
5f5a158060 @0x/contracts-zero-ex: Update TransformERC20 and MetaTransactions to handle signed calldata. 2020-07-22 22:18:39 -04:00
Lawrence Forman
a55e8b268c @0x/contracts-zero-ex: Fix linter errors. 2020-07-10 02:36:25 -04:00
Lawrence Forman
e8106f04b5 @0x/contracts-zero-ex: Address review feedback. 2020-07-10 02:36:25 -04:00
Lawrence Forman
297ff10c14 @0x/contracts-zero-ex: add SignatureValidator and MetaTransactions features. 2020-07-10 02:36:00 -04:00