const localChain = 'ethereum';
const signer = <YOUR_SIGNER>;
const localRouter: InterchainAccountRouter = InterchainAccountRouter__factory.connect(<ICA_ROUTER_ADDRESS>, signer);
const recipientAddress = <EXAMPLE_ADDRESS>; // use your own address here
const recipientF = new TestRecipient__factory.connect(recipientAddress, signer); // use your own contract here
const fooMessage = "Test";
const data = recipient.interface.encodeFunctionData("fooBar", [1, fooMessage]);
const call = {
to: recipientAddress,
data,
value: BigNumber.from("0"),
};
const quote = await local["quoteGasPayment(uint32)"](
multiProvider.getDomainId(remoteChain)
);
const config: AccountConfig = {
origin: localChain,
owner: signer.address,
localRouter: localRouter.address,
};
await localRouter.callRemote(localChain, remoteChain, [call], config);