Ethereum Compatibility
ink! smart contracts can be made compatible with Ethereum tooling and libraries through Solidity ABI generation. This allows you to use familiar Ethereum development tools like MetaMask, Hardhat, Wagmi, and ethers.js with your ink! contracts.
What's Covered
This section provides step-by-step guides for:
- Setting up Solidity ABI: Configure your ink! contract to generate Solidity-compatible ABI
- MetaMask Setup: Connect MetaMask wallet to Polkadot networks
- Hardhat Deployment: Deploy and interact with ink! contracts using Hardhat
- Wagmi Integration: Build frontend dApps using Wagmi and React
Important Considerations
Known Limitations
The Rust/ink! to Solidity ABI type mapping is still a work in progress. Some limitations are known - see details here.
To ensure compatibility with the latest updates:
- Install the latest
cargo-contract
from GitHub:
cargo install --locked --git https://github.com/use-ink/cargo-contract
- Import
ink!
from the latest GitHub branch in yourCargo.toml
:
ink = { git = "https://github.com/use-ink/ink.git", branch = "master", default-features = false, features = ["unstable-hostfn"] }