Skip to main content

IFactory

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new IFactory(at): IFactory

Wraps a smart contract exposing standard token FFI.

Parameters

NameTypeDescription
atAddressAddress of the smart contract.

Returns

IFactory

Defined in

assembly/interfaces/IFactory.ts:21

Properties

_origin

_origin: Address

Defined in

assembly/interfaces/IFactory.ts:14

Methods

addQuoteAsset

addQuoteAsset(_asset): void

Parameters

NameType
_assetAddress

Returns

void

Defined in

assembly/interfaces/IFactory.ts:123


createLBPair

createLBPair(_tokenA, _tokenB, _activeId, _binStep, _masToSend): Address

Parameters

NameTypeDescription
_tokenAAddressaddress of the first token
_tokenBAddressaddress of the second token
_activeIdu32active id disired
_binStepu32bin step disired
_masToSendu64Massa 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

NameType
_tokenXAddress
_tokenYAddress

Returns

LBPairInformation[]

Defined in

assembly/interfaces/IFactory.ts:46


getAvailableLBPairBinSteps

getAvailableLBPairBinSteps(_tokenA, _tokenB): u32[]

Parameters

NameType
_tokenAAddress
_tokenBAddress

Returns

u32[]

Defined in

assembly/interfaces/IFactory.ts:128


getLBPairInformation

getLBPairInformation(_tokenA, _tokenB, _binStep): LBPairInformation

Parameters

NameType
_tokenAAddress
_tokenBAddress
_binStepu64

Returns

LBPairInformation

Defined in

assembly/interfaces/IFactory.ts:36


getOwner

getOwner(): Address

Returns

Address

Defined in

assembly/interfaces/IFactory.ts:134


getPreset

getPreset(binstep): Preset

Parameters

NameType
binstepu32

Returns

Preset

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

NameTypeDefault valueDescription
_feeRecipientAddressundefinedThe address of the fee recipient
_flashLoanFeeu256u256.ZeroThe 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

NameType
_binStepu32
_baseFactoru32
_filterPeriodu32
_decayPeriodu32
_reductionFactoru32
_variableFeeControlu32
_protocolShareu32
_maxVolatilityAccumulatedu32
_sampleLifeTimeu32

Returns

void

Defined in

assembly/interfaces/IFactory.ts:99