Skip to main content
Precompiles are EVM smart contracts with fixed addresses and predefined functionality. Their code is part of the blockchain runtime instead of being deployed as bytecode, so they execute specific tasks more efficiently than the same logic written in EVM bytecode.

Precompiles on peaq

peaq is built on a Substrate-based framework and runs its core logic in pallets, the modular components that handle different parts of the chain. peaq also supports an EVM environment. Precompiles bridge the two: they let a smart contract reach the functions that live in the native pallets.

How precompiles work

Each precompile wraps a set of operations (decentralized identities, storage, role-based access control, token standards like ERC-20, vesting) as an EVM-compatible contract. It converts an EVM call into a Substrate extrinsic. You call it through a familiar EVM interface, and the underlying pallet does the work.

Benefits

  1. Efficiency: running inside the runtime is faster than equivalent logic implemented entirely in EVM bytecode.
  2. Security and stability: the functionality is defined at the protocol level, so it is tested and maintained with the runtime itself.
  3. Interoperability: EVM contracts can use native Substrate features, which widens what you can build on peaq.

Precompile modules

The next pages cover these precompiles in detail:
  • DID precompile: manages decentralized identities (also called directly from the SDK).
  • Storage precompile: handles storage operations (also called directly from the SDK).
  • RBAC precompile: implements role-based access control (also called directly from the SDK).
  • ERC-20 precompile: provides standard ERC-20 token operations for native peaq.
  • Vesting precompile: manages token vesting schedules.
For the full list, see the peaq network node repository.