import type { Logger } from 'pino'; import { type ChainName, type InterchainGasQuote, type MultiProvider, type Token, TokenStandard } from '@hyperlane-xyz/sdk'; /** * Fallback gas limit for transferRemote when eth_estimateGas fails. * Conservative estimate for cross-chain token transfers. */ export declare const FALLBACK_TRANSFER_REMOTE_GAS_LIMIT = 300000n; /** * Cost multiplier for minimum viable transfer. * A transfer must be worth at least this multiple of its cost to be worthwhile. */ export declare const MIN_VIABLE_COST_MULTIPLIER = 2n; /** * Transfer cost estimate for native token transfers. * Contains all cost components needed for transfer decisions. */ export interface TransferCostEstimate { /** IGP cost for the Hyperlane message */ igpCost: bigint; /** Estimated gas cost for the transferRemote transaction (with buffer) */ gasCost: bigint; /** Token fee cost (native denom only) */ tokenFeeCost: bigint; /** Total cost = igpCost + gasCost + tokenFeeCost */ totalCost: bigint; /** Maximum transferable amount after reserving costs (availableInventory - totalCost) */ maxTransferable: bigint; /** Minimum viable transfer (totalCost * MIN_VIABLE_COST_MULTIPLIER) */ minViableTransfer: bigint; /** Gas quote from adapter (for passing to executeTransferRemote) */ gasQuote?: InterchainGasQuote; } /** * Estimate gas for a transferRemote transaction using eth_estimateGas. * Falls back to conservative estimate if estimation fails. * * @param originChain - Chain where transferRemote will be called * @param destinationChain - Chain where the Hyperlane message goes * @param amount - Amount to transfer * @param multiProvider - MultiProvider for chain access * @param warpCoreMultiProvider - MultiProvider from WarpCore for adapter access * @param getTokenForChain - Function to get token for a chain * @param inventorySigner - Address of the inventory signer * @param logger - Logger instance * @returns Estimated gas limit for the transaction */ export declare function estimateTransferRemoteGas(originChain: ChainName, destinationChain: ChainName, amount: bigint, multiProvider: MultiProvider, warpCoreMultiProvider: any, getTokenForChain: (chain: ChainName) => Token | undefined, inventorySigner: string, logger: Logger): Promise; /** * Calculate all transfer costs for a transferRemote operation. * Consolidates IGP costs, gas costs, and derived values (max transferable, min viable). * * @param originChain - Chain to transfer from (where transferRemote is called) * @param destinationChain - Chain to transfer to (Hyperlane message destination) * @param availableInventory - Available token balance on origin chain * @param requestedAmount - Requested transfer amount * @param multiProvider - MultiProvider for chain access * @param warpCoreMultiProvider - MultiProvider from WarpCore for adapter access * @param getTokenForChain - Function to get token for a chain * @param inventorySigner - Address of the inventory signer * @param isNativeTokenStandard - Function to check if token standard is native * @param logger - Logger instance * @returns Cost estimate with all components and derived values */ export declare function calculateTransferCosts(originChain: ChainName, destinationChain: ChainName, availableInventory: bigint, requestedAmount: bigint, multiProvider: MultiProvider, warpCoreMultiProvider: any, getTokenForChain: (chain: ChainName) => Token | undefined, inventorySigner: string, isNativeTokenStandard: (standard: TokenStandard) => boolean, logger: Logger): Promise; //# sourceMappingURL=gasEstimation.d.ts.map