App Abstraction
Interact with your application on multiple chains
The Hyperlane SDK simplifies the interface for smart contract applications deployed across multiple chains. It provides utilties for invoking a contract's methods on a target chain and a MultiProvider
for managing chain connections.
Implement
The HyperlaneApp
abstraction is a mapping that resolves a chain to a collection of ethers Contracts. Developers should extend HyperlaneApp
and can add methods for different kinds of contract calls/transactions they would like to initiate.
A simple HyperlaneApp
extension could look like this:
See the Hyperlane Hello World app for an example of how to extend HyperlaneApp
.
Interact
Once a HyperlaneApp
implementation is defined, it can be instantiated using the output generated from the HyperlaneAppDeployer
and an instance of the MultiProvider
.
To interact with contracts on a particular network, simply provide the namespace to the app.
Last updated