Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.72 KB

rmm-sdk.parsecalibration.md

File metadata and controls

53 lines (39 loc) · 1.72 KB

Home > @primitivefi/rmm-sdk > parseCalibration

parseCalibration() function

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.

Constructs a Calibration entity from on-chain data.

Signature:

export declare function parseCalibration(factory: string, risky: {
    address: string;
    decimals: string | number;
    name?: string;
    symbol?: string;
}, stable: {
    address: string;
    decimals: string | number;
    name?: string;
    symbol?: string;
}, cal: {
    strike: string;
    sigma: string;
    maturity: string;
    gamma: string;
    lastTimestamp?: string;
}, chainId?: number): Calibration;

Parameters

Parameter Type Description
factory string Address of the factory contract, used to compute Engine.
risky { address: string; decimals: string | number; name?: string; symbol?: string; } ERC-20 token metadata and address of risky asset.
stable { address: string; decimals: string | number; name?: string; symbol?: string; } ERC-20 token metadata and address of stable asset.
cal { strike: string; sigma: string; maturity: string; gamma: string; lastTimestamp?: string; } On-chain data of calibration, converted to strings.
chainId number An optional chainId for the Token entity, defaults to 1.

Returns:

Calibration

calibration entity of the parameters.

Remarks

Designed to work easily with PrimitiveManager.uri(poolId).