Skip to content

L2Vista/CCIP-Mockup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CCIPMockup Contract

The CCIPMockup contract serves as a mock representation of cross-chain interaction processes, allowing users to simulate the sending and receiving of messages across chains.

Methods:

  1. sendMessage(uint32 _destinationDomain, bytes calldata _messageBody):
  • For simulating the process of sending a message to another chain.
  • Emits a CCIPSendRequested event upon request.
  1. receiveMessage(bytes32 messageId):
  • To simulate the message receipt from another chain.
  • Emits an ExecutionStateChanged event to signify a successful message receipt.

Dependencies

  • Client.sol: Contains definitions related to client-side functionalities.
  • Internal.sol: Holds internal data structures and enumerations for the functioning of the mockup contract.

Setup and Usage

  1. Installation:
npm install
  • Clone the repository to your local system.
  • Ensure you have the necessary dependencies installed.
  1. Deployment:
npx hardhat run scripts/deploy.js
  • Compile the contracts using the Solidity compiler.
  • Deploy the CCIPMockup contract to your desired Ethereum network.
  1. Interaction:
npx hardhat run scripts/sendTransaction.js
  • Use the sendMessage function to simulate cross-chain message sending.
  • Use the receiveMessage function to simulate the receipt of a cross-chain message.

Conclusion

If you'd like to contribute to the project, please fork the repository, make your changes, and submit a pull request. We appreciate all contributions and feedback!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published