* `@0x/contracts-erc20-bridge-sampler`: Add TwoHopSampler + refactor * `@0x/asset-swapper`: Refactor + add two-hop skeleton * Round out two-hop support in asset-swapper * Add BalancerSampler, use it for two-hop quotes * Fix bugs discovered from simbot * rebases are hard * Add intermediate token to MultiHop source breakdown * Fix market buy bugs * Use hybrid on-chain/off-chain sampling for Balancer * Another day, another rebase * Update changelogs * Address PR feedback, CI fixes * Address more PR feedback
38 lines
1.1 KiB
Solidity
38 lines
1.1 KiB
Solidity
pragma solidity ^0.5.9;
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
|
|
contract DummyLiquidityProvider
|
|
{
|
|
/// @dev Quotes the amount of `makerToken` that would be obtained by
|
|
/// selling `sellAmount` of `takerToken`.
|
|
/// @param sellAmount Amount of `takerToken` to sell.
|
|
/// @return makerTokenAmount Amount of `makerToken` that would be obtained.
|
|
function getSellQuote(
|
|
address, /* takerToken */
|
|
address, /* makerToken */
|
|
uint256 sellAmount
|
|
)
|
|
external
|
|
view
|
|
returns (uint256 makerTokenAmount)
|
|
{
|
|
makerTokenAmount = sellAmount - 1;
|
|
}
|
|
|
|
/// @dev Quotes the amount of `takerToken` that would need to be sold in
|
|
/// order to obtain `buyAmount` of `makerToken`.
|
|
/// @param buyAmount Amount of `makerToken` to buy.
|
|
/// @return takerTokenAmount Amount of `takerToken` that would need to be sold.
|
|
function getBuyQuote(
|
|
address, /* takerToken */
|
|
address, /* makerToken */
|
|
uint256 buyAmount
|
|
)
|
|
external
|
|
view
|
|
returns (uint256 takerTokenAmount)
|
|
{
|
|
takerTokenAmount = buyAmount + 1;
|
|
}
|
|
} |