Router architecture

MarginlyRouter

constructor

constructor(struct AdapterInput[] _adapters) public

swapExactInput

function swapExactInput(uint256 swapCalldata, address tokenIn, address tokenOut, uint256 amountIn, uint256 minAmountOut) external returns (uint256 amountOut)

swap with exact input

Parameters

swapExactOutput

function swapExactOutput(uint256 swapCalldata, address tokenIn, address tokenOut, uint256 maxAmountIn, uint256 amountOut) external returns (uint256 amountIn)

swap with exact output

Parameters

RouterActions

addDexAdapters

function addDexAdapters(struct AdapterInput[] _adapters) external

add dex adapters to router

Parameters

transferMarginlyRouterOwnership

function transferMarginlyRouterOwnership(address to) external

Set a new owner of a Marginly router contract. Allowed only for MarginlyPoolAdmin owner

Parameters

acceptMarginlyRouterOwnership

function acceptMarginlyRouterOwnership() external

Accepts Marginly router contract ownership

Last updated