v2
Search
⌃K

Computing addresses

It may be useful to know the remote address of your ICA before sending a message. For example, you may want to first fund the address with tokens. The getRemoteInterchainAccount function can be used to get the address of an ICA given the destination chain and owner address.
An example is included below of a contract precomputing its own remote ICA address.
address myRemoteIca = IInterchainAccountRouter(...).getRemoteInterchainAccount(
destination,
address(this)
);
If you are using Overrides to specify remote chains or Interchain security modules, pass those overrides when computing the remote ICA address.
address myRemoteIca = IInterchainAccountRouter(...).getRemoteInterchainAccount(
address(this),
remoteRouterOverride,
remoteIsmOverride
);