FeeContractMethods
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / FeeContractMethods
Interface: FeeContractMethods
Section titled “Interface: FeeContractMethods”Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4393
Fee contract methods
Methods
Section titled “Methods”calculateFee()
Section titled “calculateFee()”calculateFee(
input):Promise<FeeCalculationResult>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4395
Calculate fee for a transaction
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<FeeCalculationResult>
collectFee()
Section titled “collectFee()”collectFee(
amount,txHash):Promise<string>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4397
Collect fee (called during swap)
Parameters
Section titled “Parameters”amount
Section titled “amount”bigint
txHash
Section titled “txHash”string
Returns
Section titled “Returns”Promise<string>
updateConfig()
Section titled “updateConfig()”updateConfig(
config):Promise<void>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4399
Update fee configuration (owner only)
Parameters
Section titled “Parameters”config
Section titled “config”Partial<ChainFeeConfig>
Returns
Section titled “Returns”Promise<void>
withdrawToTreasury()
Section titled “withdrawToTreasury()”withdrawToTreasury(
amount?):Promise<string>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4401
Withdraw fees to treasury (owner only)
Parameters
Section titled “Parameters”amount?
Section titled “amount?”bigint
Returns
Section titled “Returns”Promise<string>
getState()
Section titled “getState()”getState():
Promise<FeeContractState>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4403
Get contract state
Returns
Section titled “Returns”Promise<FeeContractState>
pause()
Section titled “pause()”pause():
Promise<void>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4405
Pause fee collection (emergency)
Returns
Section titled “Returns”Promise<void>
resume()
Section titled “resume()”resume():
Promise<void>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:4407
Resume fee collection
Returns
Section titled “Returns”Promise<void>