SwapUtils
Last updated
Last updated
SwapUtils library
A library to be used within Swap.sol. Contains functions responsible for custody and AMM functionalities.
Contracts relying on this library must initialize SwapUtils.Swap struct then use this library for SwapUtils.Swap struct. Note that this library contains both functions called by users and admins. Admin functions should be protected within contracts using this library.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_0
uint256
undefined
_0
uint256
undefined
_0
uint8
undefined
provider indexed
address
undefined
tokenAmounts
uint256[]
undefined
fees
uint256[]
undefined
invariant
uint256
undefined
lpTokenSupply
uint256
undefined
newAdminFee
uint256
undefined
newSwapFee
uint256
undefined
provider indexed
address
undefined
tokenAmounts
uint256[]
undefined
lpTokenSupply
uint256
undefined
provider indexed
address
undefined
tokenAmounts
uint256[]
undefined
fees
uint256[]
undefined
invariant
uint256
undefined
lpTokenSupply
uint256
undefined
provider indexed
address
undefined
lpTokenAmount
uint256
undefined
lpTokenSupply
uint256
undefined
boughtId
uint256
undefined
tokensBought
uint256
undefined
buyer indexed
address
undefined
tokensSold
uint256
undefined
tokensBought
uint256
undefined
soldId
uint128
undefined
boughtId
uint128
undefined