Precompiled Smart Contracts
Precompiles are built-in Ethereum functions designed to handle heavy cryptographic tasks more efficiently than standard smart contracts. By residing at predefined addresses, these native implementations reduce gas costs and execution time for operations that are normally too computationally intensive for the runtime environment to process.
Below is the list of precompiled smart contracts supported by Creditcoin3:
| Precompile | Address | Description | Supported on |
|---|---|---|---|
| ECRecover | 0x0000000000000000000000000000000000000001 | Recovers the public key associated with a signature | Mainnet + Testnet |
| Sha256 | 0x0000000000000000000000000000000000000002 | Implements the SHA-256 hash function | Mainnet + Testnet |
| Ripemd160 | 0x0000000000000000000000000000000000000003 | Implements the RIPEMD-160 hash function | Mainnet + Testnet |
| Identity | 0x0000000000000000000000000000000000000004 | Data copy function (returns input as output) | Mainnet + Testnet |
| Modexp | 0x0000000000000000000000000000000000000005 | Modular exponentiation | Mainnet + Testnet |
| Bn128Add | 0x0000000000000000000000000000000000000006 | Addition on the alt_bn128 curve | Mainnet + Testnet |
| Bn128Mul | 0x0000000000000000000000000000000000000007 | Multiplication on the alt_bn128 curve | Mainnet + Testnet |
| Bn128Pairing | 0x0000000000000000000000000000000000000008 | Pairing check on the alt_bn128 curve | Mainnet + Testnet |
| Sha3FIPS256 | 0x0000000000000000000000000000000000000400 | Implements the SHA3-256 standard as specified in FIPS202 | Mainnet + Testnet |
ECRecoverPublicKey | 0x0000000000000000000000000000000000000401 | Similar to ECRecover, but returns the pubkey (not the corresponding Ethereum address) | Mainnet + Testnet |
| SubstrateTransfer | 0x0000000000000000000000000000000000000Fd1 | Precompile exposing a pallet_balance as an ERC20. | Mainnet + Testnet |
| Sr25519Verifier | 0x00000000000000000000000000000000000013B9 | Precompile for verifying Substrate sr25519 signatures. | Mainnet + Testnet |
| Ed25519Verifier | 0x00000000000000000000000000000000000013BA | Precompile for verifying ed25519 signatures. | Mainnet + Testnet |