EVM Precompiled Contracts

Precompiled contracts in the EVM are special contracts at fixed addresses, offering advanced functions with specific gas costs. Most precompiles don’t have a solidity wrapper (with ecRecover being the sole exception), therefore you’ll have to call the address directly with addressOfPrecompile.staticcall(…) or use assembly.

EVM Precompiles Support in IoTeX

IoTeX supports all EVM precompiles and adds two more:

  • secp256r1, at address 0x8001, is a cryptographic function for elliptic curve operations, and scryptHash, commonly used in password hashing algorithms.

  • scryptHash, at address 0x8002, commonly used in password hashing algorithms.

For further details, developers can explore the IoTeX code at this link to contracts.go, where they can see the specific addresses, gas costs, and functions associated with each precompile.

Last updated

Logo

This documentation portal is currently undergoing updates to align with the IoTeX 2.0 Whitepaper release. Information provided here may be incomplete, or out-of-date. Please use this portal for preliminary reference only, and check out the official IoTeX 2.0 Whitepaper for updated information.

.

2024 | IoTeX