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.git
git clone --recursive https://github.com/omni-network/hello-world-template.git
git submodule update --init --recursive
- Run
make build
to build the smart contracts. - Run
make test
to run tests.
If you want to deploy the contracts agains a local devnet:
- Run
make ensure-deps
to ensure you've installed theomni
cli. - Run
make devnet-start
to deploy a local instance of Omni, which includes local deployments of Omni, Arbitrum, and Optimism. - Run
make deploy
to 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