@hyperlane-xyz/sdk
Version:
The official SDK for the Hyperlane Network
53 lines • 3.25 kB
TypeScript
import { BigNumber } from 'ethers';
import { Address } from '@hyperlane-xyz/utils';
import { HyperlaneApp } from '../app/HyperlaneApp.js';
import { HyperlaneAddressesMap } from '../contracts/types.js';
import { MultiProvider } from '../providers/MultiProvider.js';
import { ChainName } from '../types.js';
import { IgpFactories } from './contracts.js';
export declare class HyperlaneIgp extends HyperlaneApp<IgpFactories> {
static fromAddressesMap(addressesMap: HyperlaneAddressesMap<any>, multiProvider: MultiProvider): HyperlaneIgp;
/**
* Calls the default ISM IGP's `quoteGasPayment` function to get the amount of native tokens
* required to pay for interchain gas.
* The default ISM IGP will add any gas overhead amounts related to the Mailbox
* and default ISM on the destination to the provided gasAmount.
* @param origin The name of the origin chain.
* @param destination The name of the destination chain.
* @param gasAmount The amount of gas to use when calling `quoteGasPayment`.
* The default IGP is expected to add any gas overhead related to the Mailbox
* or ISM, so this gas amount is only required to cover the usage of the `handle`
* function.
* @returns The amount of native tokens required to pay for interchain gas.
*/
quoteGasPayment(origin: ChainName, destination: ChainName, gasAmount: BigNumber): Promise<BigNumber>;
/**
* Calls the default ISM IGP's `quoteGasPayment` function to get the amount of native tokens
* required to pay for interchain gas.
* The default ISM IGP will add any gas overhead amounts related to the Mailbox
* and default ISM on the destination to the provided gasAmount.
* @param origin The name of the origin chain.
* @param destination The name of the destination chain.
* @param gasAmount The amount of gas to use when calling `quoteGasPayment`.
* The default IGP is expected to add any gas overhead related to the Mailbox
* or ISM, so this gas amount is only required to cover the usage of the `handle`
* function.
* @returns The amount of native tokens required to pay for interchain gas.
*/
quoteGasPaymentForDefaultIsmIgp(origin: ChainName, destination: ChainName, gasAmount: BigNumber): Promise<BigNumber>;
/**
* Calls the origin's default IGP's `quoteGasPayment` function to get the
* amount of native tokens required to pay for interchain gas.
* The default IGP is expected to add any gas overhead related to the Mailbox
* and ISM to the provided gasAmount.
* @param origin The name of the origin chain.
* @param destination The name of the destination chain.
* @param gasAmount The amount of gas to use when calling `quoteGasPayment`.
* The default IGP is expected to add any gas overhead related to the Mailbox
* or ISM, so this gas amount is only required to cover the usage of the `handle`
* function.
* @returns The amount of native tokens required to pay for interchain gas.
*/
protected quoteGasPaymentForIgp(origin: ChainName, destination: ChainName, gasAmount: BigNumber, interchainGasPaymasterAddress: Address): Promise<BigNumber>;
}
//# sourceMappingURL=HyperlaneIgp.d.ts.map