Skip to main content

Factory

Table of contents

Functions

Functions

acceptOwnership

acceptOwnership(_): void

Accept the ownership of the contract.

Parameters

NameTypeDescription
_StaticArray<u8>unused

Returns

void

Defined in

assembly/contracts/Factory.ts:753


addQuoteAsset

addQuoteAsset(bs): void

Function to add an asset to the whitelist of quote assets

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments

Returns

void

Defined in

assembly/contracts/Factory.ts:683


constructor

constructor(bs): void

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments containing: - _feeRecipient The address of the fee recipient - _flashLoanFee The value of the fee for flash loan

Returns

void

Notice

Constructor

Defined in

assembly/contracts/Factory.ts:89


createLBPair

createLBPair(bs): StaticArray<u8>

Create a liquidity bin LBPair for _tokenX and _tokenY

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments -_tokenX The address of the first token -_tokenY The address of the second token -_activeId The id of the active bin -_binStep The bin step of the LBPair

Returns

StaticArray<u8>

The address of the newly created LBPair

Defined in

assembly/contracts/Factory.ts:351


forceDecay

forceDecay(bs): void

Parameters

NameType
bsStaticArray<u8>

Returns

void

Defined in

assembly/contracts/Factory.ts:724


getAllBinSteps

getAllBinSteps(_): StaticArray<u8>

Parameters

NameType
_StaticArray<u8>

Returns

StaticArray<u8>

Defined in

assembly/contracts/Factory.ts:188


getAllLBPairs

getAllLBPairs(bs): StaticArray<u8>

View function to return all the LBPair of a pair of tokens

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments

Returns

StaticArray<u8>

Defined in

assembly/contracts/Factory.ts:236


getAvailableLBPairBinSteps

getAvailableLBPairBinSteps(bs): StaticArray<u8>

View function to return the list of available binStep for a pair of tokens

Parameters

NameTypeDescription
bsStaticArray<u8>the serialized arguments containing: - _tokenA The address of the first token of the pair - _tokenB The address of the second token of the pair

Returns

StaticArray<u8>

Available bin steps for a pair of tokens

Defined in

assembly/contracts/Factory.ts:210


getLBPairInformation

getLBPairInformation(bs): StaticArray<u8>

Returns the LBPairInformation if it exists

Parameters

NameType
bsStaticArray<u8>

Returns

StaticArray<u8>

Defined in

assembly/contracts/Factory.ts:137


getPreset

getPreset(bs): StaticArray<u8>

View function to return the different parameters of the preset

Parameters

NameType
bsStaticArray<u8>

Returns

StaticArray<u8>

Defined in

assembly/contracts/Factory.ts:171


proposeNewOwner

proposeNewOwner(bs): void

Propose to transfer the ownership of the contract to a new account (newOwner).

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments containing the new owner address

Returns

void

Defined in

assembly/contracts/Factory.ts:737


receiveCoins

receiveCoins(_): void

Parameters

NameTypeDescription
_StaticArray<u8>unused

Returns

void

Notice

Function used by an SC to receive Massa coins

Defined in

assembly/contracts/Factory.ts:865


removePreset

removePreset(bs): void

Remove the preset linked to a binStep

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments

Returns

void

Defined in

assembly/contracts/Factory.ts:540


removeQuoteAsset

removeQuoteAsset(bs): void

Function to remove an asset from the whitelist of quote assets

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments

Returns

void

Defined in

assembly/contracts/Factory.ts:705


setFactoryLockedState

setFactoryLockedState(bs): void

Function to set the creation restriction of the Factory

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments

Returns

void

Defined in

assembly/contracts/Factory.ts:664


setFeeRecipient

setFeeRecipient(bs): void

Function to set the recipient of the fees. This address needs to be able to receive ERC20s

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments

Returns

void

Defined in

assembly/contracts/Factory.ts:626


setFeesParametersOnPair

setFeesParametersOnPair(bs): void

Function to set the fee parameter of a LBPair

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments

Returns

void

Defined in

assembly/contracts/Factory.ts:561


setFlashLoanFee

setFlashLoanFee(bs): void

Function to set the flash loan fee

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments

Returns

void

Defined in

assembly/contracts/Factory.ts:639


setLBPairIgnored

setLBPairIgnored(bs): void

Function to set whether the pair is ignored or not for routing, it will make the pair unusable by the router

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments -_tokenA The address of the first token -_tokenB The address of the second token -_binStep The bin step of the LBPair -Whether to ignore (true) or not (false) the pair for routing

Returns

void

Defined in

assembly/contracts/Factory.ts:440


setPreset

setPreset(bs): void

Sets the preset parameters of a bin step

Parameters

NameTypeDescription
bsStaticArray<u8>The serialized arguments

Returns

void

Defined in

assembly/contracts/Factory.ts:479