Index
Table of contents
Contracts
Libraries
- BinHelper
- BitMath
- DusaV0Library
- Hooks
- Math512Bits
- PersistentMap
- ReentrancyGuardUpgradeable
- SafeMath
- SafeMath256
- SafeMathU8
- SwapHelper
- TreeHelper
Interfaces
Structs
- Bin
- Debt
- FeeParameters
- FeesDistribution
- LBPairInformation
- LiquidityParameters
- MintInfo
- Oracle
- OracleParameters
- PairInformation
- Preset
- Sample
- HooksParameters
Variables
- AFTER_BURN_FLAG
- AFTER_FLASH_LOAN_FLAG
- AFTER_MINT_FLAG
- AFTER_SWAP_FLAG
- AFTER_TRANSFER_FLAG
- BALANCE_KEY_PREFIX_LENGTH
- BASIS_POINT_MAX
- BEFORE_BURN_FLAG
- BEFORE_FLASH_LOAN_FLAG
- BEFORE_MINT_FLAG
- BEFORE_SWAP_FLAG
- BEFORE_TRANSFER_FLAG
- DELIMITER
- EVENT_DELIMITER
- ID_ONE
- MAX
- MAX_BIN_STEP
- MAX_FEE
- MAX_PROTOCOL_SHARE
- MIN_BIN_STEP
- ONE
- ONE_COIN
- PRECISION
- REAL_ID_SHIFT
- SCALE_OFFSET
- STORAGE_BYTE_COST
- STORAGE_PREFIX_LENGTH
- THREE
- TWO
- ZERO
- ZERO_ADDRESS
- _KEY_ELEMENT_SUFFIX
Functions
- BinHelper__BinStepOverflows
- BinHelper__IdOverflows
- LBFactory__BinStepHasNoPreset
- LBFactory__BinStepRequirementsBreached
- LBFactory__DecreasingPeriods
- LBFactory__FactoryLockIsAlreadyInTheSameState
- LBFactory__FeesAboveMax
- LBFactory__FlashLoanFeeAboveMax
- LBFactory__FunctionIsLockedForUsers
- LBFactory__IdenticalAddresses
- LBFactory__LBPairAlreadyExists
- LBFactory__LBPairIgnoredIsAlreadyInTheSameState
- LBFactory__LBPairNotCreated
- LBFactory__ProtocolShareOverflows
- LBFactory__QuoteAssetAlreadyWhitelisted
- LBFactory__QuoteAssetNotWhitelisted
- LBFactory__ReductionFactorOverflows
- LBFactory__SameFeeRecipient
- LBFactory__SameFlashLoanFee
- LBFactory__SameHooksParameters
- LBPair__AddressZero
- LBPair__AddressZeroOrThis
- LBPair__BinStepNotSame
- LBPair__CompositionFactorFlawed
- LBPair__DistributionsOverflow
- LBPair__FlashLoanCallbackFailed
- LBPair__FlashLoanInvalidBalance
- LBPair__FlashLoanInvalidToken
- LBPair__InsufficientAmounts
- LBPair__InsufficientLiquidityBurned
- LBPair__InsufficientLiquidityMinted
- LBPair__OnlyFactory
- LBPair__OnlyFeeRecipient
- LBPair__OnlyStrictlyIncreasingId
- LBPair__OracleNewSizeTooSmall
- LBPair__WrongLengths
- LBQuoter_InvalidLength
- LBRouter__AmountSlippageCaught
- LBRouter__BrokenSwapSafetyCheck
- LBRouter__DeadlineExceeded
- LBRouter__IdDesiredOverflows
- LBRouter__IdOverflows
- LBRouter__IdSlippageCaught
- LBRouter__InsufficientAmountOut
- LBRouter__InvalidTokenPath
- LBRouter__LengthsMismatch
- LBRouter__MaxAmountInExceeded
- LBRouter__NotFactoryOwner
- LBRouter__SwapOverflows
- LBRouter__TooMuchTokensIn
- LBRouter__WrongAmounts
- LBRouter__WrongMasLiquidityParameters
- LBRouter__WrongTokenOrder
- LBToken__BurnExceedsBalance
- LBToken__LengthMismatch
- LBToken__SelfApproval
- LBToken__SpenderNotApproved
- LBToken__TransferExceedsBalance
- LBToken__TransferToSelf
- Math128x128__PowerUnderflow
- Math512Bits__MulDivOverflow
- Math512Bits__MulShiftOverflow
- Math512Bits__OffsetOverflows
- Oracle__LookUpTimestampTooOld
- Oracle__NotInitialized
- ReentrancyGuardUpgradeable__AlreadyInitialized
- ReentrancyGuardUpgradeable__ReentrantCall
- Storage__NotEnoughCoinsSent
- TreeMath__ErrorDepthSearch
- _sortTokens
- createEvent
- createKey
- spreadLiqudity
- transferRemaining
- u256ToString
Variables
AFTER_BURN_FLAG
• Const AFTER_BURN_FLAG: u32
Defined in
assembly/libraries/Hooks.ts:14
AFTER_FLASH_LOAN_FLAG
• Const AFTER_FLASH_LOAN_FLAG: u32
Defined in
assembly/libraries/Hooks.ts:10
AFTER_MINT_FLAG
• Const AFTER_MINT_FLAG: u32
Defined in
assembly/libraries/Hooks.ts:12
AFTER_SWAP_FLAG
• Const AFTER_SWAP_FLAG: u32
Defined in
AFTER_TRANSFER_FLAG
• Const AFTER_TRANSFER_FLAG: u32
Defined in
assembly/libraries/Hooks.ts:16
BALANCE_KEY_PREFIX_LENGTH
• Const BALANCE_KEY_PREFIX_LENGTH: 7
Defined in
assembly/libraries/Utils.ts:168
BASIS_POINT_MAX
• Const BASIS_POINT_MAX: u16 = 10_000
Defined in
assembly/libraries/Constants.ts:7
BEFORE_BURN_FLAG
• Const BEFORE_BURN_FLAG: u32
Defined in
assembly/libraries/Hooks.ts:13
BEFORE_FLASH_LOAN_FLAG
• Const BEFORE_FLASH_LOAN_FLAG: u32
Defined in
BEFORE_MINT_FLAG
• Const BEFORE_MINT_FLAG: u32
Defined in
assembly/libraries/Hooks.ts:11
BEFORE_SWAP_FLAG
• Const BEFORE_SWAP_FLAG: u32
Defined in
BEFORE_TRANSFER_FLAG
• Const BEFORE_TRANSFER_FLAG: u32
Defined in
assembly/libraries/Hooks.ts:15
DELIMITER
• Const DELIMITER: ":"
Defined in
assembly/libraries/Utils.ts:16
EVENT_DELIMITER
• Const EVENT_DELIMITER: ";?!"
Defined in
assembly/libraries/Utils.ts:101
ID_ONE
• Const ID_ONE: u32
Defined in
assembly/libraries/Constants.ts:6
MAX
• Const MAX: u256 = u256.Max
Defined in
assembly/libraries/Constants.ts:16
MAX_BIN_STEP
• Const MAX_BIN_STEP: 100
Defined in
assembly/libraries/Constants.ts:12
MAX_FEE
• Const MAX_FEE: u64
Defined in
assembly/libraries/Constants.ts:13
MAX_U128
• Const MAX_U128: u256
Defined in
assembly/libraries/Constants.ts:20
MIN_BIN_STEP
• Const MIN_BIN_STEP: 1
Defined in
assembly/libraries/Constants.ts:11
ONE
• Const ONE: u256 = u256.One
Defined in
assembly/libraries/Constants.ts:14
ONE_COIN
• Const ONE_COIN: u64
Defined in
assembly/libraries/Constants.ts:9
PRECISION
• Const PRECISION: u256
Defined in
assembly/libraries/Constants.ts:8
REAL_ID_SHIFT
• Const REAL_ID_SHIFT: i64
Defined in
assembly/libraries/Constants.ts:5
SCALE_OFFSET
• Const SCALE_OFFSET: 128
Defined in
assembly/libraries/Constants.ts:10
STORAGE_BYTE_COST
• Const STORAGE_BYTE_COST: 100000
Defined in
assembly/libraries/Utils.ts:166
STORAGE_PREFIX_LENGTH
• Const STORAGE_PREFIX_LENGTH: 4
Defined in
assembly/libraries/Utils.ts:167
THREE
• Const THREE: u256
Defined in
assembly/libraries/Constants.ts:18
TWO
• Const TWO: u256
Defined in
assembly/libraries/Constants.ts:17
ZERO
• Const ZERO: u256 = u256.Zero
Defined in
assembly/libraries/Constants.ts:15
ZERO_ADDRESS
• Const ZERO_ADDRESS: Address
Defined in
assembly/libraries/Constants.ts:19
_KEY_ELEMENT_SUFFIX
• Const _KEY_ELEMENT_SUFFIX: "::"
Defined in
assembly/libraries/PersistentMap.ts:17
Functions
BinHelper__BinStepOverflows
▸ BinHelper__BinStepOverflows(bp): string
BinHelper errors
Parameters
| Name | Type |
|---|---|
bp | u16 |
Returns
string
Defined in
assembly/libraries/Errors.ts:203
BinHelper__IdOverflows
▸ BinHelper__IdOverflows(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:205
LBFactory__BinStepHasNoPreset
▸ LBFactory__BinStepHasNoPreset(binStep): string
Parameters
| Name | Type |
|---|---|
binStep | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:150
LBFactory__BinStepRequirementsBreached
▸ LBFactory__BinStepRequirementsBreached(lowerBound, binStep, higherBound): string
Parameters
| Name | Type |
|---|---|
lowerBound | u64 |
binStep | u32 |
higherBound | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:134
LBFactory__DecreasingPeriods
▸ LBFactory__DecreasingPeriods(filterPeriod, decayPeriod): string
Parameters
| Name | Type |
|---|---|
filterPeriod | u32 |
decayPeriod | u32 |
Returns
string
Defined in
assembly/libraries/Errors.ts:116
LBFactory__FactoryLockIsAlreadyInTheSameState
▸ LBFactory__FactoryLockIsAlreadyInTheSameState(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:146
LBFactory__FeesAboveMax
▸ LBFactory__FeesAboveMax(baseFee, _maxVariableFee, maxFees): string
Parameters
| Name | Type |
|---|---|
baseFee | u64 |
_maxVariableFee | u64 |
maxFees | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:124
LBFactory__FlashLoanFeeAboveMax
▸ LBFactory__FlashLoanFeeAboveMax(fees, maxFees): string
Parameters
| Name | Type |
|---|---|
fees | u64 |
maxFees | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:130
LBFactory__FunctionIsLockedForUsers
▸ LBFactory__FunctionIsLockedForUsers(user): string
Parameters
| Name | Type |
|---|---|
user | Address |
Returns
string
Defined in
assembly/libraries/Errors.ts:144
LBFactory__IdenticalAddresses
▸ LBFactory__IdenticalAddresses(token): string
LBFactory errors
Parameters
| Name | Type |
|---|---|
token | Address |
Returns
string
Defined in
assembly/libraries/Errors.ts:102
LBFactory__LBPairAlreadyExists
▸ LBFactory__LBPairAlreadyExists(tokenX, tokenY, _binStep): string
Parameters
| Name | Type |
|---|---|
tokenX | Address |
tokenY | Address |
_binStep | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:110
LBFactory__LBPairIgnoredIsAlreadyInTheSameState
▸ LBFactory__LBPairIgnoredIsAlreadyInTheSameState(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:148
LBFactory__LBPairNotCreated
▸ LBFactory__LBPairNotCreated(tokenX, tokenY, binStep): string
Parameters
| Name | Type |
|---|---|
tokenX | Address |
tokenY | Address |
binStep | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:156
LBFactory__ProtocolShareOverflows
▸ LBFactory__ProtocolShareOverflows(protocolShare, max): string
Parameters
| Name | Type |
|---|---|
protocolShare | u32 |
max | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:140
LBFactory__QuoteAssetAlreadyWhitelisted
▸ LBFactory__QuoteAssetAlreadyWhitelisted(quoteAsset): string
Parameters
| Name | Type |
|---|---|
quoteAsset | Address |
Returns
string
Defined in
assembly/libraries/Errors.ts:107
LBFactory__QuoteAssetNotWhitelisted
▸ LBFactory__QuoteAssetNotWhitelisted(quoteAsset): string
Parameters
| Name | Type |
|---|---|
quoteAsset | Address |
Returns
string
Defined in
assembly/libraries/Errors.ts:104
LBFactory__ReductionFactorOverflows
▸ LBFactory__ReductionFactorOverflows(reductionFactor, max): string
Parameters
| Name | Type |
|---|---|
reductionFactor | u32 |
max | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:120
LBFactory__SameFeeRecipient
▸ LBFactory__SameFeeRecipient(feeRecipient): string
Parameters
| Name | Type |
|---|---|
feeRecipient | Address |
Returns
string
Defined in
assembly/libraries/Errors.ts:152
LBFactory__SameFlashLoanFee
▸ LBFactory__SameFlashLoanFee(flashLoanFee): string
Parameters
| Name | Type |
|---|---|
flashLoanFee | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:154
LBFactory__SameHooksParameters
▸ LBFactory__SameHooksParameters(hooksParameters): string
Parameters
| Name | Type |
|---|---|
hooksParameters | HooksParameters |
Returns
string
Defined in
assembly/libraries/Errors.ts:161
LBPair__AddressZero
▸ LBPair__AddressZero(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:170
LBPair__AddressZeroOrThis
▸ LBPair__AddressZeroOrThis(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:171
LBPair__BinStepNotSame
▸ LBPair__BinStepNotSame(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:199
LBPair__CompositionFactorFlawed
▸ LBPair__CompositionFactorFlawed(id): string
Parameters
| Name | Type |
|---|---|
id | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:173
LBPair__DistributionsOverflow
▸ LBPair__DistributionsOverflow(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:183
LBPair__FlashLoanCallbackFailed
▸ LBPair__FlashLoanCallbackFailed(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:193
LBPair__FlashLoanInvalidBalance
▸ LBPair__FlashLoanInvalidBalance(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:195
LBPair__FlashLoanInvalidToken
▸ LBPair__FlashLoanInvalidToken(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:197
LBPair__InsufficientAmounts
▸ LBPair__InsufficientAmounts(): string
LBPair errors
Returns
string
Defined in
assembly/libraries/Errors.ts:168
LBPair__InsufficientLiquidityBurned
▸ LBPair__InsufficientLiquidityBurned(id): string
Parameters
| Name | Type |
|---|---|
id | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:177
LBPair__InsufficientLiquidityMinted
▸ LBPair__InsufficientLiquidityMinted(id): string
Parameters
| Name | Type |
|---|---|
id | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:175
LBPair__OnlyFactory
▸ LBPair__OnlyFactory(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:182
LBPair__OnlyFeeRecipient
▸ LBPair__OnlyFeeRecipient(feeRecipient, sender): string
Parameters
| Name | Type |
|---|---|
feeRecipient | Address |
sender | Address |
Returns
string
Defined in
assembly/libraries/Errors.ts:185
LBPair__OnlyStrictlyIncreasingId
▸ LBPair__OnlyStrictlyIncreasingId(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:180
LBPair__OracleNewSizeTooSmall
▸ LBPair__OracleNewSizeTooSmall(newSize, oracleSize): string
Parameters
| Name | Type |
|---|---|
newSize | u64 |
oracleSize | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:189
LBPair__WrongLengths
▸ LBPair__WrongLengths(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:179
LBQuoter_InvalidLength
▸ LBQuoter_InvalidLength(): string
LBQuoter errors
Returns
string
Defined in
assembly/libraries/Errors.ts:251
LBRouter__AmountSlippageCaught
▸ LBRouter__AmountSlippageCaught(amountXMin, amountX, amountYMin, amountY): string
Parameters
| Name | Type |
|---|---|
amountXMin | u256 |
amountX | u256 |
amountYMin | u256 |
amountY | u256 |
Returns
string
Defined in
assembly/libraries/Errors.ts:30
LBRouter__BrokenSwapSafetyCheck
▸ LBRouter__BrokenSwapSafetyCheck(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:12
LBRouter__DeadlineExceeded
▸ LBRouter__DeadlineExceeded(deadline, currentTimestamp): string
Parameters
| Name | Type |
|---|---|
deadline | u64 |
currentTimestamp | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:43
LBRouter__IdDesiredOverflows
▸ LBRouter__IdDesiredOverflows(idDesired, idSlippage): string
Parameters
| Name | Type |
|---|---|
idDesired | u64 |
idSlippage | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:39
LBRouter__IdOverflows
▸ LBRouter__IdOverflows(id): string
Parameters
| Name | Type |
|---|---|
id | i64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:18
LBRouter__IdSlippageCaught
▸ LBRouter__IdSlippageCaught(activeIdDesired, idSlippage, activeId): string
Parameters
| Name | Type |
|---|---|
activeIdDesired | u64 |
idSlippage | u64 |
activeId | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:24
LBRouter__InsufficientAmountOut
▸ LBRouter__InsufficientAmountOut(amountOutMin, amountOut): string
Parameters
| Name | Type |
|---|---|
amountOutMin | u256 |
amountOut | u256 |
Returns
string
Defined in
assembly/libraries/Errors.ts:47
LBRouter__InvalidTokenPath
▸ LBRouter__InvalidTokenPath(wrongToken): string
Parameters
| Name | Type |
|---|---|
wrongToken | Address |
Returns
string
Defined in
assembly/libraries/Errors.ts:61
LBRouter__LengthsMismatch
▸ LBRouter__LengthsMismatch(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:20
LBRouter__MaxAmountInExceeded
▸ LBRouter__MaxAmountInExceeded(amountInMax, amountIn): string
Parameters
| Name | Type |
|---|---|
amountInMax | u256 |
amountIn | u256 |
Returns
string
Defined in
assembly/libraries/Errors.ts:54
LBRouter__NotFactoryOwner
▸ LBRouter__NotFactoryOwner(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:14
LBRouter__SwapOverflows
▸ LBRouter__SwapOverflows(id): string
Parameters
| Name | Type |
|---|---|
id | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:10
LBRouter__TooMuchTokensIn
▸ LBRouter__TooMuchTokensIn(excess): string
Parameters
| Name | Type |
|---|---|
excess | u256 |
Returns
string
Defined in
assembly/libraries/Errors.ts:16
LBRouter__WrongAmounts
▸ LBRouter__WrongAmounts(amount, reserve): string
LBRouter errors
Parameters
| Name | Type |
|---|---|
amount | u256 |
reserve | u256 |
Returns
string
Defined in
assembly/libraries/Errors.ts:8
LBRouter__WrongMasLiquidityParameters
▸ LBRouter__WrongMasLiquidityParameters(tokenX, tokenY, amountX, amountY, msgValue): string
Parameters
| Name | Type |
|---|---|
tokenX | Address |
tokenY | Address |
amountX | u256 |
amountY | u256 |
msgValue | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:63
LBRouter__WrongTokenOrder
▸ LBRouter__WrongTokenOrder(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:22
LBToken__BurnExceedsBalance
▸ LBToken__BurnExceedsBalance(from, id, amount): string
Parameters
| Name | Type |
|---|---|
from | Address |
id | u64 |
amount | u256 |
Returns
string
Defined in
assembly/libraries/Errors.ts:80
LBToken__LengthMismatch
▸ LBToken__LengthMismatch(accountsLength, idsLength): string
Parameters
| Name | Type |
|---|---|
accountsLength | u64 |
idsLength | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:86
LBToken__SelfApproval
▸ LBToken__SelfApproval(owner): string
Parameters
| Name | Type |
|---|---|
owner | Address |
Returns
string
Defined in
assembly/libraries/Errors.ts:90
LBToken__SpenderNotApproved
▸ LBToken__SpenderNotApproved(owner, spender): string
LBToken errors
Parameters
| Name | Type |
|---|---|
owner | Address |
spender | Address |
Returns
string
Defined in
assembly/libraries/Errors.ts:76
LBToken__TransferExceedsBalance
▸ LBToken__TransferExceedsBalance(from, id, amount): string
Parameters
| Name | Type |
|---|---|
from | Address |
id | u64 |
amount | u256 |
Returns
string
Defined in
assembly/libraries/Errors.ts:92
LBToken__TransferToSelf
▸ LBToken__TransferToSelf(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:98
Math128x128__PowerUnderflow
▸ Math128x128__PowerUnderflow(x, y): string
Math128x128 errors
Parameters
| Name | Type |
|---|---|
x | u256 |
y | i64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:209
Math512Bits__MulDivOverflow
▸ Math512Bits__MulDivOverflow(prod1, denominator): string
Math512Bits errors
Parameters
| Name | Type |
|---|---|
prod1 | u256 |
denominator | u256 |
Returns
string
Defined in
assembly/libraries/Errors.ts:214
Math512Bits__MulShiftOverflow
▸ Math512Bits__MulShiftOverflow(prod1, offset): string
Parameters
| Name | Type |
|---|---|
prod1 | u256 |
offset | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:221
Math512Bits__OffsetOverflows
▸ Math512Bits__OffsetOverflows(offset): string
Parameters
| Name | Type |
|---|---|
offset | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:225
Oracle__LookUpTimestampTooOld
▸ Oracle__LookUpTimestampTooOld(_minTimestamp, _lookUpTimestamp): string
Oracle errors
Parameters
| Name | Type |
|---|---|
_minTimestamp | u64 |
_lookUpTimestamp | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:230
Oracle__NotInitialized
▸ Oracle__NotInitialized(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:235
ReentrancyGuardUpgradeable__AlreadyInitialized
▸ ReentrancyGuardUpgradeable__AlreadyInitialized(): string
Returns
string
Defined in
assembly/libraries/Errors.ts:241
ReentrancyGuardUpgradeable__ReentrantCall
▸ ReentrancyGuardUpgradeable__ReentrantCall(): string
ReentrancyGuardUpgradeable errors
Returns
string
Defined in
assembly/libraries/Errors.ts:239
Storage__NotEnoughCoinsSent
▸ Storage__NotEnoughCoinsSent(spent, sent): string
Storage errors
Parameters
| Name | Type |
|---|---|
spent | u64 |
sent | u64 |
Returns
string
Defined in
assembly/libraries/Errors.ts:255
TreeMath__ErrorDepthSearch
▸ TreeMath__ErrorDepthSearch(): string
TreeMath errors
Returns
string
Defined in
assembly/libraries/Errors.ts:246
_sortTokens
▸ _sortTokens(_tokenA, _tokenB): SortTokensReturn
Parameters
| Name | Type | Description |
|---|---|---|
_tokenA | Address | The first token |
_tokenB | Address | The second token |
Returns
SortTokensReturn
SortTokensReturn: token0, token1
Notice
Private view function to sort 2 tokens in ascending order
Defined in
assembly/libraries/Utils.ts:34
createEvent
▸ createEvent(key, args): string
Parameters
| Name | Type | Description |
|---|---|---|
key | string | the string event key. |
args | string[] | the string array arguments. |
Returns
string
the stringified event.
Notice
Overrides Massa default createEvent function (use a custom delimiter to avoid collisions)
Constructs a pretty formatted event with given key and arguments.
Remarks
The result is meant to be used with the generateEvent function. It is useful to generate events from an array.
Defined in
assembly/libraries/Utils.ts:118
createKey
▸ createKey(args): string
Parameters
| Name | Type |
|---|---|
args | string[] |
Returns
string
Defined in
assembly/libraries/Utils.ts:17
spreadLiquidity
▸ spreadLiquidity(amountYIn, startId, numbersBins, gap, binStep): SpreadLiqudityReturn
Parameters
| Name | Type |
|---|---|
amountYIn | u256 |
startId | u32 |
numbersBins | u32 |
gap | u32 |
binStep | u32 |
Returns
SpreadLiqudityReturn
Defined in
assembly/libraries/Utils.ts:54
transferRemaining
▸ transferRemaining(balanceInit, balanceFinal, sent, to): void
Parameters
| Name | Type | Description |
|---|---|---|
balanceInit | u64 | Initial balance of the SC (transferred coins + balance of the SC) |
balanceFinal | u64 | Balance of the SC at the end of the call |
sent | u64 | Number of coins sent to the SC |
to | Address | Caller of the function to transfer the remaining coins to |
Returns
void
Notice
Function to transfer remaining Massa coins to a recipient at the end of a call
Defined in
assembly/libraries/Utils.ts:137
u256ToString
▸ u256ToString(u): string
Parameters
| Name | Type |
|---|---|
u | u256 |
Returns
string
Notice
Function to convert a u256 to a UTF-16 bytes then to a string
Dev
u256.toString() is too expensive in as-bignum so we use this instead