26 Commits

Author SHA1 Message Date
Xianny
f14b6f2ba2
Fix/erc20 sampler/uniswap v2 buys (#2603)
* `@0x/contracts-erc20-bridge-sampler`: Fix `sampleBuysFromUniswapV2()`

* fix uniswapV2 buys

* redeploy ERC20BridgeSampler to fix Uniswap buys

* fix changelog, move artifact to correct dir

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2020-06-12 15:54:19 -07:00
Michael Zhu
44262bf747 MultiBridge support in AssetSwapper 2020-06-11 11:14:48 -07:00
xianny
b8d51fc4e8 rename contract to UniswapV2Router01
https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/UniswapV2Router01.sol
2020-06-03 12:08:08 -07:00
Lawrence Forman
4066c17a0f @0x/contracts-erc20-bridge-sampler: Add UniswapV2. 2020-06-03 14:01:09 -04:00
Jacob Evans
fb0311e675
feat: ERC20BridgeSampler Unlock Kyber collisions (#2575)
* feat: ERC20BridgeSampler Unlock Kyber collisions

* Updated fallback strategy

* Address comments

* Eth2Dai hop sampler

* Update packages/asset-swapper/src/utils/market_operation_utils/index.ts

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>

* Set DFB expiry to 2hr

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2020-05-07 07:56:03 +10:00
Jacob Evans
a458e81f8d
ERC20BridgeSampler: Additional Buy support (#2551)
* ERC20BridgeSampler: Sample Curve Buy

* Fake Buy Kyber/PLP

* Deploy mainnet

* Add Kyber rates for buy tests

* CHANGELOGs

* Provide maxIterations and targetSlippage as options

* Cleanup ERC20BridgeSampler for re-use

* Redeploy Mainnet Kovan

* Feedback fixes

* Handle OOG/revert 0s

* Redeploy Mainnet refactor
2020-04-21 13:26:12 +10:00
Daniel Pyrathon
659e8991de Completed feedback 2020-03-06 12:02:36 -08:00
Daniel Pyrathon
36c457f483 added unit tests for the Liquidity Provider 2020-03-06 09:47:17 -08:00
Daniel Pyrathon
77d7afe505 created DummyPLPRegistry and DummyPLP + generated wrappers for these new contracts and their respective interfaces 2020-02-27 12:52:13 -08:00
Michael Zhu
817049456c Get liquidity provider from registry in the sampler 2020-02-27 11:05:56 -08:00
mzhu25
9a7c4b21a9
@0x/contracts-erc20-bridge-sampler: Generic liquidity provider sampling (#2487)
* Add methods to Sampler contract to plug into generic on-chain liquidity provider
2020-02-26 11:54:48 -08:00
Jacob Evans
e05a03a842
Curve ERC20Bridge (#2480)
* Curve ERC20Bridge

* ERC20BridgeSampler Curve (#2483)

* ERC20Sampler Curve

* Use Bridge Sources for each Curve

* Support multiple versions of the Curve contract

* CHANGELOG and redeployed Curve (mainnet)

* Fix Market ops utils test

* Added Curve DAI USDC USDT TUSD

* Bump sampler gas limit default

* Decode the Curve in tests

* Disable Curve in Buy tests

* blockchainTests.fork.resets Curve and Sampler
2020-02-15 17:02:19 +11:00
Lawrence Forman
12e65bbf26 @0x/contracts-erc20-bridge-sampler: Fix failing tests. 2020-02-11 12:08:15 -07:00
Lawrence Forman
6273a1ca73 @0x/contracts-erc20-bridge-sampler: Remove wrapper functions and introduce batchCall(). 2020-02-11 12:07:48 -07:00
Lawrence Forman
cb69921202
ERC20BridgeSampler: Unlock full sampling on Kovan (#2459)
* `@0x/contracts-utils`: Update kovan addresses in `DeploymentConstants`

* `@0x/contracts-erc20-bridge-sampler`: Make source IDs static on all networks, not inherited from `DeploymentConstants`.

* `@0x/contract-addresses`: Update `ERC20BridgeSampler` addresses on mainnet and kovan.

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-01-31 11:27:28 -05:00
Lawrence Forman
0cf3ff8209
@0x/contracts-erc20-bridge-sampler: Increase gas forwarded to kyber and eth2dai.
`@0x/contracts-erc20-bridge-sampler`: Bail as soon as any quote from a DEX fails.

`@0x/contracts-erc20-bridge-sampler`: Fix broken tests.
2020-01-20 13:30:57 +10:00
Lawrence Forman
70870ffcd2
Swallow reverts in ERC20BridgeSampler (#2395)
* `@0x/erc20-bridge-sampler`: Do not query empty/unsigned orders. Swallow revets on DEX quotes.

* `@0x/contracts-utils`: Add `DEV_UTILS_ADDRESS` and `KYBER_ETH_ADDRESS` to `DeploymentConstants`.

* `@0x/contracts-erc20-bridge-sampler`: Address review comments.
2019-12-13 10:53:25 -08:00
Xianny
fcbcbac889
Remove assetDataUtils everywhere (#2373)
* remove assetDataUtils everywhere

* export IAssetDataContract from @0x/contract-wrappers to allow @0x/instant to decode asset data  synchronously

* export generic function `decodeAssetDataOrThrow` and add ERC20Bridge support

* export `hexUtils` from order-utils instead of contracts-test-utils
2019-12-04 13:08:08 -08:00
Michael Zhu
2232870b09 address comments 2019-12-03 10:35:59 -08:00
Lawrence Forman
1462ab08de @0x/contracts-erc20-bridge-sampler: Clean up linter workaround in tests. 2019-11-25 17:55:12 -05:00
Lawrence Forman
a8e93a594d @0x/contracts-erc20-bridge-sampler: Throw sampling two of the same tokens.
`@0x/contracts-erc20-bridge-sampler`: Address review comments.
2019-11-25 17:48:53 -05:00
Lawrence Forman
57731be689 @0x/contracts-erc20-bridge-sampler: Remove gitkeep files 2019-11-25 17:48:53 -05:00
Lawrence Forman
fa768dc112 @0x/contracts-erc20-bridge-sampler: Finish off tests. 2019-11-25 17:48:53 -05:00
Lawrence Forman
d02db3864e @0x/contracts-erc20-bridge-sampler: Fix kyber bug and add test contract. 2019-11-25 17:48:53 -05:00
Lawrence Forman
a26c3036a7 @0x/contracts-erc20-bridge-sampler: Get contracts compiling. 2019-11-25 17:48:53 -05:00
Lawrence Forman
0af346aad8 @0x/contracts-erc20-bridge-aggregator: Create package.
`@0x/contracts-erc20`: Add `decimals()` to `LibERC20Token`.

`@0x/contracts-erc20-bridge-sampler`: Created package.
2019-11-25 17:48:53 -05:00