This project implements an EIP5164 adapter for hyperlane and adheres to the ERC5164 standard. The sender NFT contract inherits from hyperlaneSenderAdapter which implements the MessageDispatch interface and the adapter also inherits all the interfaces from hyperlane necessary for cross chain message passing. The receiver NFT contract inherits from hyperlaneReceiverAdapter which implements the MessageExecutor interface and the adapter inherits all the interfaces from hyperlane necessary for cross chain message passing as well. When someone wants to mint an NFT on the remote chain, the user can call "mintRemote" passing a string "uri" to be used to mint the NFT on the destination chain, and this function makes a cross chain call by calling dispatch on the hyperlaneSenderAdapter which encodes a function "mintLocal" to be called on remote chain, now this message is going to be transported by the hyperlane bridge, and it will be received by the hyperlaneReceiverAdapter, which then decodes the message and executes "mintLocal" on the destination chain, thereby minting the NFT on the remote chain. This is just an example use case of the hyperlane EIP 5164 adapter in action using an NFT bridge as the usecase.
This project uses solidity, typescript, react.js, chakra, rainbowtoolkit, hyperlane utilities, hardhat, ethers. The project is divided into three main parts, with sub-parts within. The sender NFT contract, the receiver NFT contract and the hyperlane adapter kit. The hyperlane adapter is divided into it's own member contracts and interfaces as well. The sender NFT contract and receiver NFT contract are meant to be deployed together to whatever chains that we support. We used hyperlane as the sponsor technology and it benefitted our project because it easily helped us to achieve not just cross chain interoperability but easy enforcement of the ERC5164 standard.