A minimal Hardhat project demonstrating how to interact with Asset Hub precompiles from Solidity smart contracts.
This recipe deploys a contract that interacts with the XCM precompile on Asset Hub at address 0x00000000000000000000000000000000000A0000.
- Node.js 22+
- A running Asset Hub parachain via Zombienet with eth-rpc bridging to
localhost:8545(see Polkadot Cookbook for CI setup)
npm ci
npx hardhat compile
npx hardhat test --network localhost- Defining a Solidity interface (
IXcm.sol) for the XCM precompile - Checking that a precompile exists at its expected address
- Calling precompile functions from a deployed contract
MIT OR Apache-2.0