This repository demonstrates cross-chain messaging between Algorand and EVM blockchains using Wormhole as GMP. The core functionality is implemented as a simple ping/pong application where messages can be sent from one chain and received on another.
- Cross-chain message sending between Algorand and EVM chains
- Demonstration of Wormhole's messaging protocol
- Smart contracts implementation in both Algorand and Solidity
- Example scripts for deployment and interaction
The project consists of two main components:
-
Algorand Implementation:
- Smart contracts written in Python Algorand
- Message emitter and receiver contract
- Helper scripts for deployment and interaction
-
EVM Implementation:
- Smart contracts written in Solidity
- Integration with Wormhole Solidity SDK
- Helper scripts for deployment and interaction
git clone https://github.com/your-username/algorand-wormhole-example.git
cd algorand-wormhole-examplepython3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txtpnpm installInstall Foundry if you haven't already:
curl -L https://foundry.paradigm.xyz | bash
foundryupInstall dependencies and build:
forge install --no-commit wormhole-foundation/wormhole-solidity-sdk
forge build
pnpm compile:evmCreate a .env file in the root directory with the following variables:
# Development only - NEVER use production mnemonics in code or version control
MAINNET_ACCOUNT="your_avm_mnemonic_here"
EMV_MNEMONIC="your_evm_mnemonic_here"
- A message is sent from the source chain (Ping)
- Wormhole guardians observe and sign the message
- The signed message (VAA) is delivered to the target chain
- The target chain contract verifies and processes the message (Pong)
Wormhole provides APIs to query message history:
https://api.wormholescan.io/api/v1/vaas/:chain_id/:emitter_addr
You can also view messages on the Wormhole Explorer:
https://wormholescan.io/#/tx/{transaction_id}