@hyperlane-xyz/sdk
Version:
The official SDK for the Hyperlane Network
18 lines • 761 B
JavaScript
import { InterchainAccountRouter__factory } from '@hyperlane-xyz/core';
import { EvmRouterReader } from '../router/EvmRouterReader.js';
export class EvmIcaRouterReader extends EvmRouterReader {
async deriveConfig(address) {
const icaRouterInstance = InterchainAccountRouter__factory.connect(address, this.provider);
const commitmentIsmAddress = await icaRouterInstance.CCIP_READ_ISM();
const [routerConfig, commitmentIsm] = await Promise.all([
this.readRouterConfig(address),
this.evmIsmReader.deriveOffchainLookupConfig(commitmentIsmAddress),
]);
return {
address,
...routerConfig,
commitmentIsm,
};
}
}
//# sourceMappingURL=EvmIcaReader.js.map