@hyperlane-xyz/sdk
Version:
The official SDK for the Hyperlane Network
63 lines • 3.36 kB
TypeScript
import { Address, ProtocolType } from '@hyperlane-xyz/utils';
import { HyperlaneModule, HyperlaneModuleParams } from '../core/AbstractHyperlaneModule.js';
import { ContractVerifier } from '../deploy/verify/ContractVerifier.js';
import { MultiProvider } from '../providers/MultiProvider.js';
import { AnnotatedEV5Transaction } from '../providers/ProviderType.js';
import { ChainNameOrId } from '../types.js';
import { EvmTokenFeeDeployer } from './EvmTokenFeeDeployer.js';
import { DerivedTokenFeeConfig, EvmTokenFeeReader, TokenFeeReaderParams } from './EvmTokenFeeReader.js';
import { ResolvedTokenFeeConfigInput, TokenFeeConfig, TokenFeeConfigInput } from './types.js';
type TokenFeeModuleAddresses = {
deployedFee: Address;
};
export declare class EvmTokenFeeModule extends HyperlaneModule<ProtocolType.Ethereum, TokenFeeConfigInput, TokenFeeModuleAddresses> {
protected readonly multiProvider: MultiProvider;
protected readonly contractVerifier?: ContractVerifier | undefined;
static protocols: ProtocolType[];
protected readonly logger: import("pino").default.Logger<never>;
protected readonly deployer: EvmTokenFeeDeployer;
protected readonly reader: EvmTokenFeeReader;
protected readonly chainName: string;
protected readonly chainId: number;
constructor(multiProvider: MultiProvider, params: HyperlaneModuleParams<TokenFeeConfigInput, TokenFeeModuleAddresses>, contractVerifier?: ContractVerifier | undefined);
static create({ multiProvider, chain, config, contractVerifier, }: {
multiProvider: MultiProvider;
chain: ChainNameOrId;
config: TokenFeeConfig;
contractVerifier?: ContractVerifier;
}): Promise<EvmTokenFeeModule>;
static expandConfig(params: {
config: ResolvedTokenFeeConfigInput;
multiProvider: MultiProvider;
chainName: string;
}): Promise<TokenFeeConfig>;
private deploy;
read(params?: Partial<TokenFeeReaderParams>): Promise<DerivedTokenFeeConfig>;
private deriveReadParams;
private shouldRedeploy;
/**
* Updates the fee configuration to match the target config.
*
* IMPORTANT: This method may deploy new contracts as a side effect when:
* - Any non-owner diff is detected (triggers redeploy)
*
* These deployments are executed immediately and are NOT included in the returned
* transaction array. The returned transactions only include configuration changes
* (ownership transfers) that callers need to execute.
*
* This behavior is consistent with other Hyperlane SDK modules (EvmIsmModule, EvmHookModule).
*
* @param targetConfig - The desired fee configuration
* @param params - Optional parameters including routingDestinations for reading sub-fees.
* If not provided for RoutingFee configs, destinations are derived from
* targetConfig.feeContracts keys.
* @returns Transactions to execute for configuration updates (does not include deployments)
*/
update(targetConfig: TokenFeeConfigInput, params?: Partial<TokenFeeReaderParams>): Promise<AnnotatedEV5Transaction[]>;
private updateCrossCollateralRoutingFee;
private updateRoutingFee;
private createQuoteSignerUpdateTxs;
private createOwnershipUpdateTxs;
}
export {};
//# sourceMappingURL=EvmTokenFeeModule.d.ts.map