Skip to content

About

Polkadot Cookbook recipe: Solidity smart contract interacting with Asset Hub precompiles

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Contracts Precompile Example

A minimal Hardhat project demonstrating how to interact with Asset Hub precompiles from Solidity smart contracts.

Overview

This recipe deploys a contract that interacts with the XCM precompile on Asset Hub at address 0x00000000000000000000000000000000000A0000.

Prerequisites

Usage

npm ci
npx hardhat compile
npx hardhat test --network localhost

What This Demonstrates

  • 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

License

MIT OR Apache-2.0

About

Polkadot Cookbook recipe: Solidity smart contract interacting with Asset Hub precompiles

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages