-
Notifications
You must be signed in to change notification settings - Fork 465
@0x/contracts-erc20-bridge-sampler
: LiquidityProviderRegistry
#2499
@0x/contracts-erc20-bridge-sampler
: LiquidityProviderRegistry
#2499
Conversation
d70ac86
to
4bc5106
Compare
@0x/contracts-erc20-bridge-sampler
: LiquidityProviderRegistry
takerToken, | ||
makerToken | ||
); | ||
|
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.
if a liquidity pool is not found, we should return an array of 0s
@@ -435,14 +436,14 @@ contract ERC20BridgeSampler is | |||
} | |||
|
|||
/// @dev Sample sell quotes from an arbitrary on-chain liquidity provider. | |||
/// @param providerAddress Address of the liquidity provider contract. | |||
/// @param registryAddress Address of the liquidity provider registry contract. | |||
/// @param takerToken Address of the taker token (what to sell). | |||
/// @param makerToken Address of the maker token (what to buy). | |||
/// @param takerTokenAmounts Taker token sell amount for each sample. | |||
/// @return makerTokenAmounts Maker amounts bought at each taker token | |||
/// amount. | |||
function sampleSellsFromLiquidityProvider( |
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.
As discussed, this should be sample(Sells|Buys)FromLiquidityProviderRegistry()
99d94b3
to
52bd73a
Compare
52bd73a
to
a47c031
Compare
) | ||
public | ||
view | ||
returns (address providerAddress) |
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.
by default, is providerAddress
set to address(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.
yep
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.
Looks good! Maybe regenerate contract wrappers to make Daniel's life a little easier.
Description
Updates the way the ERC20BridgeSampler samples from generic liquidity providers to route through a registry. This allows the owner of the registry to swap out the underlying liquidity providers without interruption for 0x API
Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.