Warning
This is a proof of concept developed for the Wormhole Hackathon. This is a project driven by personal interest and is currently in an experimental stage (Although people are using it). Mainnet deployment is still under active development.
Worm-Deployer: A Multi-Chain Smart Contract Deployment Tool with Single-Transaction Execution and Deterministic Addressing
Video Demo
- Single-transaction Multi-chain Deployment: Deploy to multiple chains from a single source transaction.
- Deterministic Addressing via CREATE2: Same contract address across all target chains.
- Source Chain Gas Payment: Pay gas only on the source chain.
- Flexible Chain Selection: Support for various source and destination chain combinations. (supported chains)
- Ethereum Sepolia
0xB6C636Fc86B4d008faEE98C0c7c493D41fa483e9
- Base Sepolia
0xB6C636Fc86B4d008faEE98C0c7c493D41fa483e9
- Optimism Sepolia
0xB6C636Fc86B4d008faEE98C0c7c493D41fa483e9
- Arbitrum Sepolia
0xB6C636Fc86B4d008faEE98C0c7c493D41fa483e9
- Celo Alfajores
0xB6C636Fc86B4d008faEE98C0c7c493D41fa483e9
- Avalanche Fuji
0xB6C636Fc86B4d008faEE98C0c7c493D41fa483e9
- Binance Smart Chain Testnet
0xB6C636Fc86B4d008faEE98C0c7c493D41fa483e9
Important
Need to install node v21.1.0
on your system (steps here using nvm).
npx worm-deployer@latest
Then follow the prompts to deploy the contracts.
- Clone the repository:
git clone https://github.com/startup-dreamer/worm-deployer.git
- Install dependencies:
cd worm-deployer
npm install
- Link the package:
npm link
- Run the command:
worm-deployer
- Then follow the prompts to deploy the contracts.
Test deployment contract: https://wormholescan.io/#/tx/0xb94edd9a6358ae42357cb1752ce0fe3f93214c6b5618ed9cecca6b099211a6a8
- Standard Relaying for EVM chains message passing through Wormhole protocol.
- Wormhole Solidity SDK to connect wormdeployer contract with relayer interface.
- Wormhole Base SDK to get the wormhole specific chain parameters for configuring the deployment.
- Implemented as an NPX package compatible with both Hardhat and Foundry projects.
- User runs the worm-deployer package in their project directory.
- Selects the contract to deploy.
- worm-deployer compiles the contract using appropriate build tools.
- Extracts bytecode from contract artifacts.
- User provides custom salt for deterministic address generation.
- Calls
deployAcrossChains
function on source chain's WormholeDeployer contract. - Wormhole relayer sends transaction to destination chains.
receiveWormholeMessages
function deploys the contract on destination chains using CREATE2 opcode.
- Mainnet readiness
- Multi-chain support expansion
- Batch deployments
- Deploy multiple contracts in a single transaction
- Optimize gas fees and simplify complex deployments
- Automatic contract verification
- Integrate with block explorers across supported chains
-
Cross-chain contract interaction
- Allow initialization and configuration of newly deployed contracts
- Support interaction with deployed contracts on other chains
-
Upgrade Mechanism
- Contract upgradeability across multiple chains, Using proxy patterns.
-
Specialized relayer integration
Twitter - @Krieger
Mail - [email protected]
Contributions are more than welcome! Please open an issue for any bugs or feature requests and maybe submit a PR as well.
Thanks to Encode Club for making the Wormhole Hackathon possible, and to the Wormhole Foundation for providing the innovative and user-friendly framework for cross-chain messaging that inspired me to create Worm-Deployer. I would greatly appreciate any feedback or guidance from the judges.
- Wormhole Docs: Docs
- Foundry Create2 Tutorial: Tutorial
- OpenZeppelin Create2 Library: Library
- Wormhole Architecture: Architecture
- Wormhole SDK: SDK
- Wormhole Solidity SDK: Solidity SDK