Skip to content

FeeContractMethods

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / FeeContractMethods

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4393

Fee contract methods

calculateFee(input): Promise<FeeCalculationResult>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4395

Calculate fee for a transaction

FeeCalculationInput

Promise<FeeCalculationResult>


collectFee(amount, txHash): Promise<string>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4397

Collect fee (called during swap)

bigint

string

Promise<string>


updateConfig(config): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4399

Update fee configuration (owner only)

Partial<ChainFeeConfig>

Promise<void>


withdrawToTreasury(amount?): Promise<string>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4401

Withdraw fees to treasury (owner only)

bigint

Promise<string>


getState(): Promise<FeeContractState>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4403

Get contract state

Promise<FeeContractState>


pause(): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4405

Pause fee collection (emergency)

Promise<void>


resume(): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4407

Resume fee collection

Promise<void>