Vault6551 is a demonstration repository showcasing how to integrate ERC-6551 Token Bound Accounts (TBAs) with Wormhole to facilitate cross-chain NFT vaults and token staking, particularly bridging Ethereum (Sepolia testnet) and Solana (devnet/testnet).
[EVM TBA]
│
│ postMessage(payload)
▼
[Wormhole] ── Guardians verify ──▶ VAA generated
│ │
│ │ VAA
▼ ▼
[Solana Anchor Program] ── parses VAA ──▶ creates PDA using TBA seed info
│
│
▼
[Solana PDA controlled by TBA]
- ERC-6551 Token Bound Accounts (TBAs): Allow NFTs to act as wallets or vaults, holding other assets.
- Cross-chain integration: Utilize Wormhole for secure and verifiable cross-chain message passing and asset transfers.
- Solana PDA integration: Demonstrate how a TBA on Ethereum can control Program Derived Accounts (PDAs) on Solana.
- Token staking on Solana: Showcase how tokens can be staked via PDAs controlled by an Ethereum TBA.
-
ERC-6551 Token Bound Account:
- Deployed on Ethereum (Sepolia testnet).
- Manages asset custody and control linked to NFTs.
-
Wormhole Integration:
- Facilitates cross-chain messages and token transfers.
- Utilizes VAA (Verifiable Action Approval) mechanism for secure communication.
-
Solana Program Derived Account (PDA):
- Created dynamically on Solana (devnet/testnet) based on the Ethereum TBA seed.
- Acts as a vault or staking contract controlled by Ethereum-based TBA.
- Anchor framework
- Solana CLI
- Wormhole CLI
- Foundry (Cast & Anvil)
git clone <repository-url>
cd vault6551
npm install
cargo build
Configure your environment variables in .env
:
PRIVATE_KEY=<Ethereum private key>
SEPOLIA_RPC_URL=<Sepolia RPC URL>
MY_WALLET_ADDRESS=<Ethereum wallet address>
ERC721_ADDRESS=<ERC-721 contract address>
REGISTRY_ADDRESS=<ERC-6551 registry address>
ACCOUNT_IMPL_ADDRESS=<ERC-6551 account implementation>
WORMHOLE_PORTAL=<Wormhole portal address>
WETH_ADDRESS=<WETH contract address>
SOLANA_CHAIN_ID=1
SOLANA_RECIPIENT_HEX=<Solana recipient address (hex)>
SOLANA_PRIVATE_KEY_JSON=<Path to Solana private key JSON>
VAA submission for the following transaction is still under development: 0x0adf6a5b32d2923780c0c4554670dcab2111260699dc78bb618665cae7492d66
This repository is part of my research and experiments conducted at ORAKLE blockchain research group, focusing on cross-chain interoperability.
Contributions are welcome! Please create a pull request or open an issue to discuss any improvements or ideas.
This project is licensed under the MIT License - see the LICENSE file for details.