Home > @primitivefi/rmm-sdk > parseCalibration
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;
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 entity of the parameters.
Designed to work easily with PrimitiveManager.uri(poolId)
.