Skip to main content

RangeContract

@bidask-protocol/sdk


@bidask-protocol/sdk / RangeContract

Class: RangeContract

Defined in: contracts/RangeContract.ts:3

Implements

  • Contract

Properties

address

address: Address

Defined in: contracts/RangeContract.ts:8

Implementation of

Contract.address

Methods

getBinsDicts()

getBinsDicts(provider): Promise<{ lpSupplyDict: Record<number, bigint>; totalLiquidityDict: Record<number, bigint>; }>

Defined in: contracts/RangeContract.ts:86

Parameters

provider

ContractProvider

Returns

Promise<{ lpSupplyDict: Record<number, bigint>; totalLiquidityDict: Record<number, bigint>; }>


getBinStep()

getBinStep(provider): Promise<bigint>

Defined in: contracts/RangeContract.ts:80

Parameters

provider

ContractProvider

Returns

Promise<bigint>


getCurrentBin()

getCurrentBin(provider): Promise<number>

Defined in: contracts/RangeContract.ts:74

Parameters

provider

ContractProvider

Returns

Promise<number>


getLpMultitokenWallet()

getLpMultitokenWallet(provider, userAddress): Promise<Address>

Defined in: contracts/RangeContract.ts:66

Parameters

provider

ContractProvider

userAddress

Address

Returns

Promise<Address>


getSqrtPrice()

getSqrtPrice(provider): Promise<bigint>

Defined in: contracts/RangeContract.ts:60

Parameters

provider

ContractProvider

Returns

Promise<bigint>


getStorage()

getStorage(provider): Promise<{ baseFee: bigint; binStep: bigint; currentBin: number; dynamicFeeFactor: bigint; firstBin: number; isMain: boolean; leftRangeAddress: null | Address; lpSupplyDict: Record<number, bigint>; poolAddress: null | Address; precalculated: boolean; rightRangeAddress: null | Address; sqrtPrice: bigint; timeDecay: bigint; timeFilter: bigint; totalLiquidityDict: Record<number, bigint>; }>

Defined in: contracts/RangeContract.ts:10

Parameters

provider

ContractProvider

Returns

Promise<{ baseFee: bigint; binStep: bigint; currentBin: number; dynamicFeeFactor: bigint; firstBin: number; isMain: boolean; leftRangeAddress: null | Address; lpSupplyDict: Record<number, bigint>; poolAddress: null | Address; precalculated: boolean; rightRangeAddress: null | Address; sqrtPrice: bigint; timeDecay: bigint; timeFilter: bigint; totalLiquidityDict: Record<number, bigint>; }>


create()

static create(address): RangeContract

Defined in: contracts/RangeContract.ts:4

Parameters

address

Address

Returns

RangeContract