Skip to content

FeeContractMethods

SIP Protocol API Reference v0.15.1


SIP Protocol API Reference / FeeContractMethods

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:4454

Fee contract methods

calculateFee(input): Promise<FeeCalculationResult>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:4456

Calculate fee for a transaction

FeeCalculationInput

Promise<FeeCalculationResult>


collectFee(amount, txHash): Promise<string>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:4458

Collect fee (called during swap)

bigint

string

Promise<string>


updateConfig(config): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:4460

Update fee configuration (owner only)

Partial<ChainFeeConfig>

Promise<void>


withdrawToTreasury(amount?): Promise<string>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:4462

Withdraw fees to treasury (owner only)

bigint

Promise<string>


getState(): Promise<FeeContractState>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:4464

Get contract state

Promise<FeeContractState>


pause(): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:4466

Pause fee collection (emergency)

Promise<void>


resume(): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:4468

Resume fee collection

Promise<void>