Home > @primitivefi/rmm-sdk > Engine
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Engine base class implementation of IEngine
Signature:
export declare class Engine extends Token implements IEngine
Extends: Token
Implements: IEngine
Constructor | Modifiers | Description |
---|---|---|
(constructor)(factory, risky, stable) | (BETA) Creates a typescript instance of the PrimitiveEngine contract. |
Property | Modifiers | Type | Description |
---|---|---|---|
ABI | static |
any | (BETA) PrimitiveEngine abi. |
BUFFER | static |
number | (BETA) Engine constant for the seconds after a pool expires in which swaps are still possible. |
BYTECODE | static |
string | (BETA) PrimitiveEngine bytecode. |
factory | string | (BETA) Primitive Factory address. Should be deployer of this instantiated Engine. | |
INTERFACE | static |
Interface | (BETA) PrimitiveEngine interface instantiated from abi. |
MIN_LIQUIDITY_FACTOR | static |
(not declared) | (BETA) Used to calculate minimum liquidity based on lowest decimals of risky/stable. |
MIN_LIQUIDITY | number | (BETA) Minimum amount of liquidity of every pool. | |
PRECISION | static |
Wei | (BETA) Engine constant value which all values are scaled to for any math. |
risky | Token | (BETA) Risky token class entity. | |
scaleFactorRisky | Wei | (BETA) Multiplier to scale risky token amounts to the base PRECISION . |
|
scaleFactorStable | Wei | (BETA) Multiplier to scale stable token amounts to the base PRECISION . |
|
stable | Token | (BETA) Stable token class entity. |
Method | Modifiers | Description |
---|---|---|
involvesToken(token) | (BETA) Checks to see if token is a token of this Engine. |