Skip to content

Latest commit

 

History

History
318 lines (287 loc) · 11.9 KB

ISwapsImpl.md

File metadata and controls

318 lines (287 loc) · 11.9 KB

ISwapsImpl.sol

View Source: contracts/swaps/ISwapsImpl.sol

↘ Derived Contracts: SwapsImplLocal, SwapsImplSovrynSwap

ISwapsImpl contract

Functions


internalSwap

⤿ Overridden Implementation(s): SwapsImplLocal.internalSwap,SwapsImplSovrynSwap.internalSwap

function internalSwap(address sourceTokenAddress, address destTokenAddress, address receiverAddress, address returnToSenderAddress, uint256 minSourceTokenAmount, uint256 maxSourceTokenAmount, uint256 requiredDestTokenAmount) external payable
returns(destTokenAmountReceived uint256, sourceTokenAmountUsed uint256)

Arguments

Name Type Description
sourceTokenAddress address
destTokenAddress address
receiverAddress address
returnToSenderAddress address
minSourceTokenAmount uint256
maxSourceTokenAmount uint256
requiredDestTokenAmount uint256
Source Code
function internalSwap(
        address sourceTokenAddress,
        address destTokenAddress,
        address receiverAddress,
        address returnToSenderAddress,
        uint256 minSourceTokenAmount,
        uint256 maxSourceTokenAmount,
        uint256 requiredDestTokenAmount
    ) external payable returns (uint256 destTokenAmountReceived, uint256 sourceTokenAmountUsed);

internalExpectedRate

⤿ Overridden Implementation(s): SwapsImplLocal.internalExpectedRate,SwapsImplSovrynSwap.internalExpectedRate

function internalExpectedRate(address sourceTokenAddress, address destTokenAddress, uint256 sourceTokenAmount, address optionalContractAddress) external view
returns(uint256)

Arguments

Name Type Description
sourceTokenAddress address
destTokenAddress address
sourceTokenAmount uint256
optionalContractAddress address
Source Code
function internalExpectedRate(
        address sourceTokenAddress,
        address destTokenAddress,
        uint256 sourceTokenAmount,
        address optionalContractAddress
    ) external view returns (uint256);

internalExpectedReturn

⤿ Overridden Implementation(s): SwapsImplLocal.internalExpectedReturn,SwapsImplSovrynSwap.internalExpectedReturn

function internalExpectedReturn(address sourceTokenAddress, address destTokenAddress, uint256 sourceTokenAmount, address sovrynSwapContractRegistryAddress, IERC20[] defaultPath) external view
returns(expectedReturn uint256)

Arguments

Name Type Description
sourceTokenAddress address
destTokenAddress address
sourceTokenAmount uint256
sovrynSwapContractRegistryAddress address
defaultPath IERC20[]
Source Code
function internalExpectedReturn(
        address sourceTokenAddress,
        address destTokenAddress,
        uint256 sourceTokenAmount,
        address sovrynSwapContractRegistryAddress,
        IERC20[] calldata defaultPath
    ) external view returns (uint256 expectedReturn);

Contracts