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 Greeter and GreetingBook contracts as examples to demonstrate how contracts can interact across different blockchain networks.
To use this template for your project, initialize a new project either by using forge init or cloning this repo::
forge init --template https://github.com/omni-network/hello-world-template.gitgit clone --recursive https://github.com/omni-network/hello-world-template.git
git submodule update --init --recursive- Run
make buildto build the smart contracts. - Run
make testto run tests.
If you want to deploy the contracts agains a local devnet:
- Run
make ensure-depsto ensure you've installed theomnicli. - Run
make devnet-startto deploy a local instance of Omni, which includes local deployments of Omni, Arbitrum, and Optimism. - Run
make deployto deploy your smart contracts.
Note: you'll need to have docker installed to run the local devnet.
When finished, you can run:
make devnet-clean