Lawrence Forman
5946d32a7d
Berlin wrappers ( #212 )
...
* `@0x/contract-wrappers`: Regenerate wrappers using updated abi-gen
Update tools deps
* update deps to hopefully fix doc gen
2021-04-27 12:16:08 -04:00
Alex Kroeger
9a17ce1383
add registerAllowedSigner to NativeOrdersFeature ( #195 )
...
* add registerAllowedSigner to NativeOrdersFeature
* fix PR reference in changelog
* prettier
* add cancel pair orders functions for signers
* refactored cancelPairOrders logic, changed naming of signerRegistry to orderSigner registry everywhere, cleaned up tests
* updated changelog for protocol-utils, made batchCancelPairOrders functions more efficient
* clean up function documentation
* added additional tests for batchCancelPairsWithSigner functions, added additional checks for events being emitted correctly
* fix typos in function documentation
* fix typo in function documentation
* update docs
* update comments on cancel functions, small tweaks to docs
2021-04-26 14:32:35 -07:00
Kim Persson
3adfcdffa8
Maker PSM integration [TKR-2] ( #150 )
...
* ADDS basic boilerplate for PSM bridge WIP
* ADDS integrate the MakerPSM mixin and fix incorrect naming
* fix: take into account PSM fee when buying USDC from PSM
* feat: intial stab at a PSM sampler WIP
* feat: integrate MakerPsm into AS WIP
* refactor: get VAT contract address from PSM instead of passing it in
* fix: hardcode PSM Gemtoken to USDC
* fix: remove passing in authGem, get from PSM contract instead
* fix: use constant modified to avoid using storage variables
* fix: incorrect num decimals after multiplication in sampler
* fix: PSM buy sampling
* fix: use fillData to estimate gas schedule
* Rebased on latest development
* Guard and use latest Curve LiquidityProvider
* `@0x/contract-addresses`: Redeploy FQT on mainnet and ropsten
Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2021-04-01 15:45:06 -04:00
Lawrence Forman
164a5d44d9
bsc<->development rebase ( #189 )
...
* FQT: Pack Protocol/source name into source ID (#162 )
* `@0x/contracts-zero-ex`: Encode protocol ID and source name in bridge source ID
`@0x/asset-swapper`: Use new bridge source ID encoding.
* fix linter issues
* contracts cleanup (#164 )
* `@0x/contracts-zero-ex`: Add PancakeSwapFeature
* `@0x/contracts-zero-ex`: Remove tokenspender/allowance target/greedy tokens stuff.'
`@0x/contract-addresses`: Add BSC addresses. Remove exchangeProxyAllowanceTarget.
`@0x/migrations`: Remove exchangeProxyAllowanceTarget.
* Update contracts/zero-ex/contracts/src/features/IPancakeSwapFeature.sol
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
* `@0x/contracts-zero-ex`: Add sushiswap support to PancakeSwap
* `@0x/contract-artifacts`: Regenerate artifacts
`@0x/contract-wrappers`: Regenerate wrappers
* `@0x/contract-addresses`: Add BSC addresses
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
* feat: Better chain support (#163 )
* feat: Better chain support
* feat: better chain support refactor deployment constants (#166 )
* proliferate the chainId
* Refactor sampler to remove DeploymentConstants dependency and fixed addresses
* Rework WETH out, replacing with address(0)
* wat
* hack DeploymentConstants for now
* proliferate the chainId
* Refactor sampler to remove DeploymentConstants dependency and fixed addresses
* remove duped network addresses
* Rework the bridge source encoder
* Use the constants NATIVE_FEE_TOKEN in EP consumer
* `@0x/contract-addresses`: Fix WBNB address (#170 )
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
* multichain enable cakez vip (#171 )
* feat: Better chain support
* feat: better chain support refactor deployment constants (#166 )
* proliferate the chainId
* Refactor sampler to remove DeploymentConstants dependency and fixed addresses
* Rework WETH out, replacing with address(0)
* wat
* hack DeploymentConstants for now
* proliferate the chainId
* Refactor sampler to remove DeploymentConstants dependency and fixed addresses
* remove duped network addresses
* `asset-swapper`: enable pancake VIP route generation
Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
* `@0x/contracts-zero-ex`: Fix `PancakeSwapFeature` sushi values (#172 )
* `@0x/contracts-zero-ex`: Fix `PancakeSwapFeature` sushi values
* `@0x/contracts-zero-ex`: I am a bad protocologist
Co-authored-by: Lawrence Forman <me@merklejerk.com>
* feat: BSC Nerve + Dodo + Nerve + Ellipsis (#181 )
* feat: BSC Nerve + DODO v1
* CHANGELOGs
* Remove extra balance fetch
* Add Belt
* Added Ellipsis
* Update FQT address
* `@0x/contracts-zero-ex`: Delete TokenSpenderFeature and get stuff compiling
* `@0x/asset-swapper`: fix compilation
* prettier
* `@0x/asset-swapper`: Truncate LiquidityProvider source ID name
* Update packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts
Co-authored-by: Jacob Evans <jacob@dekz.net>
* Update packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts
Co-authored-by: Jacob Evans <jacob@dekz.net>
* `@0x/contracts-zero-ex`: Fix BakerySwap on PackageSwapFeature (#190 )
* address review comments
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-03-31 18:49:44 -04:00
Xianny
7bf009fbf6
Upgrade to typescript v4.2.2 ( #188 )
...
* upgrade to typescript v4.2.2
* prettier; remove outdated test
2021-03-30 13:26:05 -07:00
mzhu25
3cc639c8d0
MultiplexFeature and BatchFillNativeOrdersFeature ( #140 )
...
* WrappedFillFeature
* Address internal feedback
* create features/interfaces/ directory
* Split NativeOrdersFeature into mixins
* Rename mixins to use NativeOrders namespace
* Add BatchFillNativeOrdersFeature
* Rename WrapperFillFeature => MultiplexFeature and add natspec comments
* Emit LiquidityProviderSwap event
* post-rebase fixes
* Multiplex mainnet fork tests
* lint
* Add tests for batch fill functions
* Remove market functions
* Addres PR feedback
* Remove nested _batchFill calls from _multiHopFill
* Add BatchFillIncompleteRevertError type
* Use call{value: amount}() instead of transfer(amount)
* Remove outdated comment
* Update some comments
* Add events
* Address spot-check recommendations
* Remove-top level events, add ExpiredRfqOrder event
* Update changelog
* Change ExpiredRfqOrder event
* Update IZeroEx artifact and contract wrapper
2021-03-08 15:45:49 -08:00
Lawrence Forman
1a6759820a
Mooniswap LP ( #143 )
...
* `@0x/asset-swapper`: Fix compiler error on `ILiquidityProvider` call
`@0x/protocol-utils`: Add VIP utils.
* `@0x/asset-swapper`: Clean up curve VIP integration
* `@0x/contracts-zero-ex`: Add `MooniswapLiquidityProvider`.
`@0x/asset-swapper`: Add Mooniswap "vip" to EP quote consumer.
* rebase and prettier
* fix linter error
* `@0x/contracts-zero-ex`: Add `MooniswapLiquidityProvider` tests.
* review feedback
* `@0x/contracts-zero-ex`: Emit `LiquidityProviderFill` events in LPs
* `@0x/asset-swapper`: Fix compilation error
* `@0x/asset-swapper`: Add EP gas overhead to Curve and Mooni LP bridge routes
* `@0x/asset-swapper`: Remove consumer gas overhead for LP VIPs
* `@0x/contracts-zero-ex`: Add more params to `LiquidityProviderFill` event
* `@0x/contracts-zero-ex`: Address review comments.
* `@0x/asset-swapper`: Update deployed Curve and Mooni LPs
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-03-02 16:50:37 -05:00
Romain Butteaud
f98609686d
feat: opt-in positive slippage fee for integrators ( #101 )
...
* feat: Positive Slippage Fee
* fix: rename ethToTakerAssetRate to takerAssetPriceForOneEth
* fix: rename takerAssetPriceForOneEth to takerAssetsPerEth
* fix: export AffiliateFeeType
* rebased off development
* Add a gasOverhead for non-deterministic operations
* CHANGELOGs
* rename outputTokens to outputAmount
* Confirm transformer addresses on Mainnet and Ropsten
* fix import
Co-authored-by: Jacob Evans <jacob@dekz.net>
2021-02-24 12:51:58 +10:00
Jacob Evans
49cb00a9ab
feat: DODO V2, Linkswap ( #152 )
...
* feat: DODO V2
* Fix typo
* feat: Linkswap (#153 )
* fix: intermediate hops WBTC (#154 )
* feat: Linkswap
* fix: Re-add WBTC in default hop tokens
* Update review changes
* FQT deploy + no gas limit ETH refund (#155 )
* `@0x/contracts-zero-ex`: refund ETH with no gas limit in FQT
`@0x/contract-addresses`: Deploy FQT
* Update packages/contract-addresses/CHANGELOG.json
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
2021-02-24 12:19:26 +10:00
Lawrence Forman
a74a3450eb
@0x/contracts-zero-ex
: Add CurveLiquidityProvider
and misc refactors (#127 )
...
* `@0x/contracts-zero-ex`: Add `CurveLiquidityProvider` and misc refactors
* `@0x/asset-swapper`: Fix compiler error on `ILiquidityProvider` call
`@0x/protocol-utils`: Add VIP utils.
* `@0x/contracts-zero-ex`: Rebase and fix comiler warnings
* `@0x/asset-swapper`: Clean up curve VIP integration
* `@0x/protocol-utils`: Update changelog
* `@0x/protocol-utils`: tsdoc new functions
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-02-11 19:13:17 -05:00
Jacob Evans
3f4bb933d1
feat: v4 final ( #136 )
...
* v4 FillQuoteTransformer (#104 )
* Update FQT to support v4 orders
* `@0x/contracts-zero-ex`: Tweak FQT
`@0x/contracts-zero-ex`: Drop `ERC20BridgeTransfer` event and add `PartialQuoteFill` event.
* `@0x/contracts-utils`: Add `LibSafeMathV06.downcastToUint128()`
* `@0x/protocol-utils`: Update transformer utils for V4 FQT
* `@0x/contracts-zero-ex`: Fixing FQT tests...
* `@0x/contracts-zero-ex`: rename FQT bridge event
* `@0x/contracts-zero-ex`: Un-`only` tests
* `@0x/migrations`: Update `BridgeAdapter` deployment
* `@0x/contracts-integrations`: Delete `mtx_tests`
* `@0x/protocol-utils`: Address review comments
* `@0x/contracts-zero-ex`: Address review comments
* `@0x/migrations`: Update migrations
Co-authored-by: Michael Zhu <mchl.zhu.96@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
* v4: Asset-swapper (main branch) (#113 )
* refactor quote_requestor
* WIP v4/asset-swapper: Clean up SwapQuoter and remove @0x/orderbook
* Start replacing SignedOrder everywhere
* wip: new order type
* wip
* remove order-utils from most places
* hack: Play around with VerboseX types (#119 )
* hack: Play around with VerboseX types
* More hacks
* Fix up the bridgeData encodings
* Rework Orderbook return type
* feat: Don't charge a protocol fee for RFQ orders WIP (#121 )
* fix simple build errors
* simplify types a little
* remove SwapQuoteCalculator: unnecessary abstraction
* Fix all ./src build errors; make types consistent
* export more types for use in 0x API; modify Orderbook interface
* stop overriding APIOrder
* feat: RFQ v4 + consolidated bridge encoders (#125 )
* feat: check if taker address is contract
* Rework bridge data
* Worst case adjustments
* RFQT v4
* Future/v4 validate orders (#126 )
* RFQT v4
* v4 validate native orders
* use default invalid signature
* refactor rfqt validations in swap quoter
* fix types
* fix RFQT unlisted api key
* remove priceAwareRFQFlag
* adjust maker/taker amounts
* update JSON schemas
* filter zero fillable orders
Co-authored-by: xianny <xianny@gmail.com>
* fix type export
Co-authored-by: xianny <xianny@gmail.com>
* remove order-utils as much as possible
* work on tests compile
* Comment out quote reporter test
* updated tests
* restore order-utils accidental changes
* some lints
* Remove old fill_test
* ts lint disable for now
* update quote report
* Re-enable quote report tests
* make fill data required field
* fix lint
* type guards
* force fillData as required
* fix lint
* fix naming
* exports
* adjust MultiBridge by slippage
* cleanups (checkpoint 1)
* cleanup types (checkpoint #2 )
* remove unused deps
* `@0x/contract-addresses`: Deploy new FQT (#129 )
Co-authored-by: Lawrence Forman <me@merklejerk.com>
* commit bump to republish
* DRY up the rfqt mocker
* fix: Balancer load top pools (#131 )
* fix: Balancer load top 250 pools
* refetch top pools on an interval
Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
* Update post rebase
* prettier
* Remove test helpers exported in asset-swapper
* Clean up from review comments
* prettier
* lint
* recreate rfqt mocker
* change merge and INVALID_SIGNATURE
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
Co-authored-by: Michael Zhu <mchl.zhu.96@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Xianny <8582774+xianny@users.noreply.github.com>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
2021-02-10 19:20:15 +10: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
50068750f5
EP: Swallow reverts in batchGetLimit/RfqRelevantStates()
( #117 )
...
* `@0x/contracts-zero-ex`: Swallow reverts in `batchGetLimit/RfqRelevantStates()`.
* `@0x/contracts-zero-ex`: Fix typos
* `@0x/contracts-zero-ex`: Fix misleading RFQ typehash comment in `LibNativeOrder.sol`
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-01-20 00:25:48 -05:00
Lawrence Forman
72a74e7c66
Panettone cleanup ( #109 )
...
* `@0x/contracts-zero-ex`: Updates for panettone release
* `@0x/contract-addresses`: Update ganache snapshot addresses
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-01-12 10:53:50 -08:00
Lawrence Forman
5083fab06a
That time DevUtils wouldn't die ( #97 )
...
* `@0x/contracts-utils`: Allow for excess return data in `LibERC20TokenV06` compat* functions
* `@0x/contracts-zero-ex`: Add DevUtils-like functions to `NativeOrdersFeature`
* `@0x/contract-artifacts`: Update IZeroEx artifact
* `@0x/contract-wrappers`: Update IZeroExContract wrapper
* `@0x/contracts-zero-ex`: Address review feedback
* `@0x/contracts-utils`: Add `LibSafeMathV06.safeDowncastToUint128()`
* `@0x/contracts-zero-ex`: Fix changelog and add cancelled get relevant state tests
* `@0x/contracts-utils`: Fix changelog
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-01-04 17:52:29 -05:00
mzhu25
fb437551c9
Bancor FQT rollup ( #91 )
...
* Add MixinBancor for BridgeAdapter
* Update changelog
* Use 0.6 call value syntax
* `@0x/contract-addresses`: Deploy new FQT
* feat: Rollup CoFiX (#92 )
* `@0x/contract-addreses`: update FQT addresses
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Jacob Evans <jacob@dekz.net>
2020-12-17 17:12:40 -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
437a3b048d
EP: Address audit feedback ( #82 )
...
* `@0x/contracts-zero-ex`: Address audit feedback (1/2)
* `@0x/contracts-zero-ex`: Cap the ETH transfer amount to a liquidity provider to `msg.value`
* `@0x/contracts-zero-ex`: Bump feature contract versions
* `@0x/contracts-zero-ex`: Always transfer msg.value to the liqudity provider in LiquiidityProviderFeature
* Remove PLP backwards-compatibility (#85 )
* Remove backwards-compatibility from MixinZeroExBridge and LiquidityProviderSandbox
* `@0x/contracts-zero-ex`: Update CHANGELOG
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
2020-12-16 01:37:39 -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
mzhu25
e5eee96487
Add naive selector collision test ( #74 )
2020-12-07 19:49:37 -08:00
Lawrence Forman
475b608338
EP: FeeCollectorController ( #59 )
...
* `@0x/contracts-zero-ex`: Govern `FeeCollector`s through a separate `FeeCollectorController` contract.
* `@0x/contracts-integrations`: Fix broken EP protocol fees test.
`@0x/contracts-integrations`: Make this package private.
* `@0x/contract-addresses`: Update ganache snapshot addresses.
* Update contracts/zero-ex/contracts/src/external/FeeCollectorController.sol
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
* Apply suggestions from code review
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
* rebase
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
2020-12-01 12:17:21 -05:00
Jacob Evans
f698721484
feat: [asset-swapper] Add Crypto.com as a source ( #43 )
...
* feat: [asset-swapper] Add Crypto.com as a source
* Exclude in tests
* Disable hop sources to avoid excess inaccuracy
* Added CryptoCom Bridge and FQT rollup
* update test
* Deploy CryptoCom bridge
* Update package.json
* CHANGELOGs
2020-12-01 12:52:48 +10:00
Steve Marx
012fff46f6
add permissionless transformer deployer ( #55 )
...
* add permissionless transformer deployer
2020-11-27 18:21:49 -05:00
Greg Hysz
6307ebc3a2
Replace PairOrdersCancelled
event with PairCancelledLimitOrders
and PairCancelledRfqOrders
( #54 )
2020-11-27 13:31:12 -08:00
Steve Marx
88d7e73eba
remove calldata signing ( #51 )
2020-11-25 16:55:12 -05:00
Steve Marx
9653eb9e70
RFQ order with 0 txOrigin is INVALID ( #50 )
2020-11-25 14:15:59 -05:00
Steve Marx
ad337271d3
Miscellaneous fixes to RFQ origin registration ( #48 )
...
* Contracts can no longer call registerAllowedRfqOrigins()
* registerAllowedRfqOrigins() is now plural, registers an array of
addresses
2020-11-25 14:08:15 -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
Lawrence Forman
ca20df4752
@0x/contracts-zero-ex
: Fix TransformERC20Feature
reverting when selling taker's entire balance when input token is ETH (#46 )
...
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-11-24 17:52:22 -05:00
Steve Marx
841e4ee666
require txOrigin for RFQ orders, allow origins to register alternate … ( #47 )
...
require txOrigin for RFQ orders, allow origins to register alternate addresses that can fill orders
2020-11-24 16:53:32 -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
Lawrence Forman
ab698cec14
EP: misc fixes ( #38 )
...
* `@0x/contracts-zero-ex`: Fix NativeOrdersFeature order hash cancellation not emitting proper maker.
`@0x/contracts-zero-ex`: Revert to original (deployed) ZeroEx/EP proxy implementation. Optimized one is now at `ZeroExOptimized.sol`.
`@0x/contracts-zero-ex`: Add gas limits to first `transferFrom()` call in `LibTokenSpender` and `UniswapFeature`.
* `@0x/contracts-zero-ex`: Update changelog
* disable `no-empty-blocks` solidity linter rule
* `@0x/contracts-zero-ex`: Use bloom filters of greedy tokens in token transfer logic
`@0x/contracts-zero-ex`: Turn `LibTokenSpender` into `FixinTokenSpender`.
`@0x/contracts-zero-ex`: Misc renames for consistency.
* `@0x/contracts-zero-ex`: Export `GREEDY_TOKENS` list
* rebase and update changelog
* `@0x/contracts-zero-ex`: Change bloom filter hash algo based on discussions
* `@0x/contracts-zero-ex`: Fix changelog
* update orders docs
* `@0x/contracts-zero-ex`: revert if allowance call fails in uniswap feature
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-11-23 12:59:02 -05:00
mzhu25
89948b360c
Add checkAllowance flag to LibTokenSpender.spendERC20Tokens ( #39 )
2020-11-18 12:23:13 -08:00
Lawrence Forman
561b60a24d
EP Native Orders ( #27 )
...
* `@0x/contracts-zero-ex`: add limit orders feature
`@0x/contracts-utils`: add `uint128` functions to `LibSafeMathV06`
* `@0x/contract-addresses`: Update ganache snapshot addresses
* `@0x/contracts-zero-ex`: Mask EIP712 struct hash values.
* `@0x/contracts-zero-ex`: Add more limit order tests
* `@0x/contracts-zero-ex`: Fix typos
* `@0x/contracts-zero-ex`: Compute fee collector address after protocol fee zero check.
* `@0x/contracts-zero-ex`: Remove WETH payment logic from fee collector fixin
* `@0x/contracts-zero-ex`: Convert all ETH to WETH in `FeeCollector`.
* `@0x/contracts-zero-ex`: Address review feedback
* `@0x/contracts-zero-ex`: Export more utils
* `@0x/contracts-zero-ex`: Rename `LimitOrdersFeatures`, `LibLimitOrders`, etc. into `*NativeOrders*`.
`@0x/contracts-zero-ex`: Emit `protocolFeePaid` in native order fill events.
`@0x/contracts-zero-ex`: Refactor to get around stack limits.
`@0x/contracts-zero-ex`: Use different storage mappings for RFQ and limit order pair cancellations.
* `@0x/contracts-zero-ex`: Add `getProtocolFeeMultiplier()` and `transferProtocolFeesForPools()` to `NativeOrdersFeature`.
* `@0x/contracts-zero-ex`: Fix broken tests
* update orders docs
* `@0x/contracts-zero-ex`: Add more tests to `NativeOrdersFeature`
* rebuild after rebase
* `@0x/contract-addresses`: Fix changelog booboo
* `@0x/contracts-zero-ex`: Add method selectors output to generated artifacts
* `@0x/contracts-zero-ex`: Add maker address to order cancel events.
`@0x/contracts-zreo-ex`: Remove `UpTo` suffix from order pair cancellation functions.
`@0x/contracts-zreo-ex`: Address misc review comments.
* `@0x/contracts-zero-ex`: More SafeMath in native orders
* update orders docs
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-11-17 15:39:40 -05:00
mzhu25
7403c0255a
Feature/liquidity provider sandbox ( #16 )
...
* Update liquidity provider feature to use sandbox
* add support for liquidity provider feature in the exchange proxy swap quote consumer
* Move to off-chain liquidity provider registry
* Update ILiquidityProvider interface
* Remove some unused artifacts and wrappers
* Consolidate ILiquidityProvider
* prettier
* lint
* Address PR feedback
* Add failover to sandbox
* Add test for failover behavior in LiquidityProviderSandbox
* Update changelogs
* Emit events for the new LiquidityProvider scenarios
* Fix swap quote consumer bug
* post-rebase fixes
* `@0x/contracts-zero-ex`: bump feature versions
* Add default field to TokenAdjacencyGraph
* update addresses
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-11-13 12:22:21 -08:00
Steve Marx
75dcd687e2
better protocol fee tests ( #25 )
...
* better protocol fee tests
2020-11-09 12:44:52 -05:00
Steve Marx
afd4805421
rewrite ZeroEx in Yul ( #23 )
...
rewrite ZeroEx in Yul
2020-11-06 22:03:07 -05:00
Lawrence Forman
48e7a391c8
Deploy new FQT ( #28 )
...
* `@0x/contracts-zero-ex`: Change `ProtocolFeeUnfunded` event in FQT
`@0x/contracts-zero-ex`: Use new PLP interface in FQT.
* `@0x/contract-addresses`: Deploy new FQT
* fix failing FQT test
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-11-02 21:47:25 -05:00
Lawrence Forman
f4709ed1cb
EP: Add LibSignature
library ( #21 )
...
* `@0x/contracts-zero-ex`: Add `LibSignature` library
* `@0x/contracts-zero-ex`: Update package.json scripts
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-10-29 17:47:17 -04:00
Jacob Evans
717db99b38
fix: Support Multiple Shells ( #17 )
...
* fix: Support Multiple Shells
* CHANGEGLOG
2020-10-29 17:09:23 +10:00
Steve Marx
9816019bc5
add protocol fees fixin ( #2 )
2020-10-28 17:10:59 -04:00
Jacob Evans
99f5be8378
chore: [asset swapper] sampler Solidity 0.6 + Bridge addresses in AS ( #4 )
...
* Refactor excess interfaces
* Compiles on 0.6
* Refactored into try/catch
* Rebase and Refactored to v06
* Handle invalid registry in LP
* Update packages/asset-swapper/contracts/src/LiquidityProviderSampler.sol
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
* chore: [asset-swapper] Move Bridge Addresses and Gas schedule
* curve->pool
* lint
* Refactor to fix module load order
* Move FEE Schedule
* rollup: Swerve/Sushi/SnowSwap/DODO (#7 )
* rollup: Swerve/Sushi
* DODO Rollup + Snowswap Swerve
* hardcode addresses temporarily
* rebase
* rename to SUSHISWAP_ROUTER
* CHANGELOGs
* CHANGELOGs
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2020-10-27 15:16:09 +10: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
Alex Kroeger
c72aa653e8
Integrated CREAM into asset-swapper
2020-10-13 20:27:08 -07:00
Jacob Evans
7698f21517
feat: [asset-swapper] Shell 🐚 ( #2722 )
...
* feat: [asset-swapper] Shell
* Deployed and Changelogs
* Glue up the deployed address
* Glue for FQT rollup
2020-10-06 15:55:51 +10:00
Michael Zhu
1c15ecacb0
add tests for LiquidityProviderFeature
2020-10-05 10:09:06 -07:00
Michael Zhu
78e3cd39d1
@0x/contracts-zero-ex
: Add LiquidityProviderFeature contracts
2020-10-05 09:43:19 -07:00
Lawrence Forman
f84b375cde
UniswapFeature ( #2703 )
...
* Minimal Uniswap accessor.
* Add comments
* Safe math
* mainnet gas benchmark
* Assembler Uniswap
* Selectors and addresses
* Fix bugs in ABI encoders
* Typo
* AsmUniswap test
* Fix wantAmount computation
* Golfing
* Bypass AllowanceTarget
* Generalized asm uniswapper
* Implement ordering
* Fix pair computation
* #6 Golfing Iron
* Remove 'to' argument (saves 377 gas)
* New contract api
* `@0x/contracts-zero-ex`: Add `UniswapFeature`
* `@0x/contract-artifacts`: Regenerate artifacts
* `@0x/contract-wrappers`: Regenerate wrappers
* `@0x/asset-swapper`: Add Uniswap VIP support.
`@0x/asset-swapper`: Add `includeSources` support.
* `@0x/contracts-zero-ex`: Fix misleading comments in `UniswapFeature`.
`@0x/asset-swapper`: Fix linter errors.
* `@0x/asset-swapper`: Fix source filter bugs.
* `@0x/contracts-zero-ex`: `UniswapFeature`: Reduce calldata size for AllowanceTarget call
`@0x/asset-swapper`: Fix failing test.
* `@0x/contracts-zero-ex`: Fix ETH buy tokens not being normalized to WETH.
* `@0x/asset-swapper`: Fix multi-hop weirdness with source filters.
* `@0x/asset-swapper`: Fix failing test.
* `@0x/asset-swapper`: Really fix that broken AS test.
* `@0x/asset-swapper`: use filter objects instead of source array for valid buy and sell sources/
* `@0x/asset-swapper`: Move some source filtering logic into the sampler operations.
* `@0x/contracts-zero-ex`: Address PR feedback
* `@0x/contracts-zero-ex`: Fix feature version bug.
* `@0x/asset-swapper`: Did I actually fix AS tests this time? Who knows.
Co-authored-by: Remco Bloemen <remco@0x.org>
Co-authored-by: Michael Zhu <mchl.zhu.96@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-09-23 16:27:48 +10:00
Lawrence Forman
3733d503db
@0x/contracts-zero-ex
: Remove mooniswapRegistry
from BridgeAdapter
addreses
2020-09-03 01:21:09 -04:00