This repository serves as a template for Ethereum smart contract development using Foundry, specifically designed for projects intending to utilize the Omni protocol for cross-chain interactions. The template features the XGreeter contract as an example to demonstrate how contracts can interact across different blockchain networks.
To use this template for your project, initialize a new project with Foundry by running the following within your project directory:
forge init --template https://github.com/omni-network/omni-forge-template.gitTo clone this template along with its dependencies, use the following command:
git clone --recursive https://github.com/omni-network/omni-forge-template.gitIf you've already cloned the repository without submodules, initialize and update them with:
git submodule update --init --recursiveAfter initializing your project with this template, compile the smart contracts using:
forge buildThis template includes tests for the XGreeter contract. Run these tests to ensure everything is set up correctly:
forge testContributions to this template are welcome. To contribute:
- Fork the repository.
- Create a new branch for your feature (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -am 'feat(dir): Add some amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a pull request.
- This template is designed for developers looking to explore cross-chain capabilities with the Omni protocol.
- Special thanks to the Foundry team for providing such a powerful tool for smart contract development.