Work on integration with python counterpart
This commit is contained in:
@@ -15,7 +15,7 @@ import "interfaces/IPairFunctionsTypes.sol";
|
||||
/// @dev Last but not least, the price function is the derivative of the swap
|
||||
/// @dev function. It represents the best possible price a user can get from a
|
||||
/// @dev pair after swapping x of the specified token.
|
||||
/// @dev During calls to price, swap and getLimits, the caller can be assumed to
|
||||
/// @dev During calls to swap and getLimits, the caller can be assumed to
|
||||
/// @dev have the required sell or buy token balance as well as unlimited approvals
|
||||
/// @dev to this contract.
|
||||
interface IPairFunctions is IPairFunctionTypes {
|
||||
@@ -46,7 +46,11 @@ interface IPairFunctions is IPairFunctionTypes {
|
||||
/// @dev the swap and change the state of the evm accordingly.
|
||||
/// @dev Please include a gas usage estimate for each amount. This can be achieved
|
||||
/// @dev e.g. by using the `gasleft()` function.
|
||||
/// @dev
|
||||
/// @dev The return type trade, has a price attribute which should contain the
|
||||
/// value of `price(specifiedAmount)`. As this is optional, defined via
|
||||
/// `Capability.PriceFunction`, it is valid to return a zero value for this
|
||||
/// price in that case it will be estimated numerically. To return zero use
|
||||
/// Fraction(0, 1).
|
||||
/// @param pairId The ID of the trading pair.
|
||||
/// @param sellToken The token being sold.
|
||||
/// @param buyToken The token being bought.
|
||||
@@ -79,10 +83,6 @@ interface IPairFunctions is IPairFunctionTypes {
|
||||
external
|
||||
returns (Capabilities[] memory);
|
||||
|
||||
/// @notice Minimum gas usage of exchange logic excluding transfers.
|
||||
/// @return gasUsage the amount of gas used by the exchange logic
|
||||
function minGasUsage() external view returns (uint256);
|
||||
|
||||
/// @notice Retrieves the tokens in the selected pair.
|
||||
/// @dev Mainly used for testing as this is redundant with the required substreams
|
||||
/// @dev implementation.
|
||||
|
||||
@@ -12,9 +12,9 @@ interface IPairFunctionTypes {
|
||||
}
|
||||
|
||||
/// @dev The Capabilities enum represents possible features of a trading pair.
|
||||
enum Capabilities
|
||||
// Support SwapSide.Sell values (required)
|
||||
{
|
||||
enum Capabilities {
|
||||
Unset,
|
||||
// Support SwapSide.Sell values (required)
|
||||
SellSide,
|
||||
// Support SwapSide.Buy values (optional)
|
||||
BuySide,
|
||||
|
||||
Reference in New Issue
Block a user