Skip to main content

Interface: EstimateBridgeFeeParams

GalaChain core SDK 1.0.0-rc.8


GalaChain core SDK 1.0.0-rc.8 / bridge / EstimateBridgeFeeParams

Interface: EstimateBridgeFeeParams

Defined in: packages/gala-core-sdk/dist/bridge.d.ts:442

Parameters for estimating bridge fees

Examples​

Using string tokenId (pipe-delimited)

const fee = await sdk.estimateBridgeFee({
tokenId: 'GALA|Unit|none|none',
destinationChain: 'Ethereum',
});

Using TokenClassKey object

const fee = await sdk.estimateBridgeFee({
tokenId: { collection: 'GALA', category: 'Unit', type: 'none', additionalKey: 'none' },
destinationChain: 'Ethereum',
});

Properties​

destinationChain​

destinationChain: ExternalNetwork

Defined in: packages/gala-core-sdk/dist/bridge.d.ts:451

Destination chain (the fee is a per-transfer cost: it does not depend on the amount)


tokenId​

tokenId: TokenClassKeyInput

Defined in: packages/gala-core-sdk/dist/bridge.d.ts:449

Token identifier - accepts pipe-delimited string or TokenClassKey object.

Get from fetchAllBridgeableTokensByNetwork() result's stringifiedTokenClassKey field, or construct manually: { collection: 'GALA', category: 'Unit', type: 'none', additionalKey: 'none' }