Deploy with Foundry

Foundry is a fast, portable, and modular toolkit for Ethereum application development written in Rust. Since Omega is fully EVM-compatible, deploying contracts using Foundry is seamless and developer-friendly.


πŸš€ Why Use Foundry?

  • ⚑ Blazing-fast compilation and deployment

  • βœ… Integrated testing, fuzzing, and scripting

  • πŸ§ͺ Excellent for CI/CD pipelines

  • πŸ› οΈ Works great with Solidity 0.8+


πŸ“¦ Prerequisites

Install Foundry if you haven’t already:

curl -L https://foundry.paradigm.xyz | bash
foundryup

πŸ”§ Configure Omega Network

In your project root, create or update .env:

RPC_URL=https://0x4e454228.rpc.aurora-cloud.dev
PRIVATE_KEY=your_private_key
CHAIN_ID=1313161768

Update your foundry.toml:


✍️ Example: Simple Contract

Create a contract in src/Counter.sol:


πŸ§ͺ Compile and Deploy

Compile the contract:

Deploy using cast send:


πŸ’‘ Post-Deployment Tips

  • βœ… Use cast call to read state

  • πŸš€ Use cast send to interact with your contract

  • πŸ’° Make sure your deployer wallet has $OMEGA for gas

Example read:


Last updated