-
Notifications
You must be signed in to change notification settings - Fork 465
Conversation
return samplerOperations.getKyberSellQuotes(makerToken, takerToken, takerFillAmounts); | ||
batchedOperation = samplerOperations.getKyberSellQuotes(makerToken, takerToken, takerFillAmounts); | ||
} else if (source === ERC20BridgeSource.Curve) { | ||
// TODO(dekz) best way to pass this data around, in the world of multiple curves at once? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not happy with this at the moment, there can be multiple Curve sources with the same tokens, like right now there is USDC/DAI and USDT/USDC/DAI. So it is not easy to tell the create_order
which curveAddress
should be used.
@dorothy-zbornak any thoughts on the right abstraction here? Pass it through DexSample
? What will PLP look like as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems legit! Just small changes then g2g.
.sampleSellsFromCurve(curveAddress, daiTokenIdx, usdcTokenIdx, [toBaseUnitAmount(1)]) | ||
.callAsync(); | ||
expect(samples.length).to.be.bignumber.greaterThan(0); | ||
expect(samples[0]).to.be.bignumber.greaterThan(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess one of the things I get paranoid about is whether these endpoints are expressing the correct units. So maybe we can check that samples[0] > 0 && samples[0] < toBaseUnitAmount(2, 6)
packages/asset-swapper/src/utils/market_operation_utils/create_order.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still good
* 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
* 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
* 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
Description
Samples the CurveBridge
#2480