Routers
This section contains a full API reference of all public functions & events related to routers and router liquidity management.
Events
RouterAdded
Emitted when a new router is added
Parameters
RouterRemoved
Emitted when an existing router is removed
Parameters
RouterRecipientSet
Emitted when the recipient of router is updated
Parameters
RouterOwnerProposed
Emitted when the owner of router is proposed
Parameters
RouterOwnerAccepted
Emitted when the owner of router is accepted
Parameters
RouterLiquidityAdded
Emitted when a router adds liquidity to the contract
Parameters
RouterLiquidityRemoved
Emitted when a router withdraws liquidity from the contract
Parameters
Getters
getRouterApproval
Returns the approval status of a router for the given router address.
Parameters
Return Values
getRouterRecipient
Returns the recipient for the specified router
The recipient (if set) receives all funds when router liquidity is removed
Parameters
Return Values
getRouterOwner
Returns the router owner if it is set, or the router itself if not
Uses logic function here to handle the case where router owner is not set. Other getters within this interface use explicitly the stored value
Parameters
Return Values
getProposedRouterOwner
Returns the currently proposed router owner
All routers must wait for the delay timeout before accepting a new owner
Parameters
Return Values
getProposedRouterOwnerTimestamp
Returns the currently proposed router owner timestamp
All routers must wait for the delay timeout before accepting a new owner
Parameters
Return Values
routerBalances
Gets balance of asset for the specified router.
Parameters
Return Values
Functions
setupRouter
Used to set router initial properties
Parameters
removeRouter
Used to remove routers that can transact crosschain
Parameters
setRouterRecipient
Sets the designated recipient for a router
Router should only be able to set this once otherwise if router key compromised, no problem is solved since attacker could just update recipient
Parameters
proposeRouterOwner
Current owner or router may propose a new router owner
Parameters
acceptProposedRouterOwner
New router owner must accept role, or previous if proposed is 0x0
Parameters
addRouterLiquidityFor
This is used by anyone to increase a router's available liquidity for a given asset.
The liquidity will be held in the local asset, which is the representation if you are not on the canonical domain, and the canonical asset otherwise.
Parameters
addRouterLiquidity
This is used by any router to increase their available liquidity for a given asset.
The liquidity will be held in the local asset, which is the representation if you are not on the canonical domain, and the canonical asset otherwise.
Parameters
removeRouterLiquidityFor
This is used by any router owner to decrease their available liquidity for a given asset.
Parameters
removeRouterLiquidity
This is used by any router to decrease their available liquidity for a given asset.
Parameters
Last updated