IFactory
Table of contents
Constructors
Properties
Methods
- addQuoteAsset
- createLBPair
- getAllLBPairs
- getAvailableLBPairBinSteps
- getLBPairInformation
- getOwner
- getPreset
- init
- setPreset
Constructors
constructor
• new IFactory(at
): IFactory
Wraps a smart contract exposing standard token FFI.
Parameters
Name | Type | Description |
---|---|---|
at | Address | Address of the smart contract. |
Returns
Defined in
assembly/interfaces/IFactory.ts:21
Properties
_origin
• _origin: Address
Defined in
assembly/interfaces/IFactory.ts:14
Methods
addQuoteAsset
▸ addQuoteAsset(_asset
): void
Parameters
Name | Type |
---|---|
_asset | Address |
Returns
void
Defined in
assembly/interfaces/IFactory.ts:123
createLBPair
▸ createLBPair(_tokenA
, _tokenB
, _activeId
, _binStep
, _masToSend
): Address
Parameters
Name | Type | Description |
---|---|---|
_tokenA | Address | address of the first token |
_tokenB | Address | address of the second token |
_activeId | u32 | active id disired |
_binStep | u32 | bin step disired |
_masToSend | u64 | Massa to send for storage |
Returns
Address
the address of the new LBPair
Dev
Create a new LBPair
Defined in
assembly/interfaces/IFactory.ts:83
getAllLBPairs
▸ getAllLBPairs(_tokenX
, _tokenY
): LBPairInformation
[]
Parameters
Name | Type |
---|---|
_tokenX | Address |
_tokenY | Address |
Returns
Defined in
assembly/interfaces/IFactory.ts:46
getAvailableLBPairBinSteps
▸ getAvailableLBPairBinSteps(_tokenA
, _tokenB
): u32
[]
Parameters
Name | Type |
---|---|
_tokenA | Address |
_tokenB | Address |
Returns
u32
[]
Defined in
assembly/interfaces/IFactory.ts:128
getLBPairInformation
▸ getLBPairInformation(_tokenA
, _tokenB
, _binStep
): LBPairInformation
Parameters
Name | Type |
---|---|
_tokenA | Address |
_tokenB | Address |
_binStep | u64 |
Returns
Defined in
assembly/interfaces/IFactory.ts:36
getOwner
▸ getOwner(): Address
Returns
Address
Defined in
assembly/interfaces/IFactory.ts:134
getPreset
▸ getPreset(binstep
): Preset
Parameters
Name | Type |
---|---|
binstep | u32 |
Returns
Defined in
assembly/interfaces/IFactory.ts:138
init
▸ init(_feeRecipient
, _flashLoanFee?
): void
Initialize the factory. This function must be called before any other function.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
_feeRecipient | Address | undefined | The address of the fee recipient |
_flashLoanFee | u256 | u256.Zero | The value of the fee for flash loan |
Returns
void
Defined in
assembly/interfaces/IFactory.ts:31
setPreset
▸ setPreset(_binStep
, _baseFactor
, _filterPeriod
, _decayPeriod
, _reductionFactor
, _variableFeeControl
, _protocolShare
, _maxVolatilityAccumulated
, _sampleLifeTime
): void
Parameters
Name | Type |
---|---|
_binStep | u32 |
_baseFactor | u32 |
_filterPeriod | u32 |
_decayPeriod | u32 |
_reductionFactor | u32 |
_variableFeeControl | u32 |
_protocolShare | u32 |
_maxVolatilityAccumulated | u32 |
_sampleLifeTime | u32 |
Returns
void