Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions docs/background/precompiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ convention.

The `pallet-revive` ships with a number of precompiles that are enabled by default:

| Name | Address | Called via | Enabled by default? | Implemented in ink!? |
|----------------------------------------------------------------------------------------------------------------------------------|---------|--------------------|---------------------|----------------------|
| [EcRecover](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/ecrecover.rs) | 0x1 | Raw bytes | ✅ | ✅|
| [Sha256](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/sha256.rs) | 0x2 | Raw bytes | ✅ | ✅|
| [Ripemd160](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/ripemd160.rs) | 0x3 | Raw bytes | ✅ | Not yet |
| [Identity](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/identity.rs) | 0x4 | Raw bytes | ✅ | Not yet |
| [Modexp](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/modexp.rs) | 0x5 | Raw bytes | ✅ | Not yet |
| [Bn128Add](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/bn128.rs) | 0x6 | Raw bytes | ✅ | Not yet |
| [Bn128Mul](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/bn128.rs) | 0x7 | Raw bytes | ✅ | Not yet |
| [Bn128Pairing](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/bn128.rs) | 0x8 | Raw bytes | ✅ | Not yet |
| [Blake2F](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/blake2f.rs) | 0x9 | Raw bytes | ✅ | Not yet |
| [PointEval](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/point_eval.rs) | 0a | Raw bytes | ✅ | Not yet |
| [System](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/system.rs) | 0x900 | Solidity interface | ✅ | ✅|
| [Storage](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/storage.rs) | 0x901 | Solidity interface | ✅ | ✅|
| Name | Address | Called via | Enabled by default? | Implemented in ink!? |
|----------------------------------------------------------------------------------------------------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|---------------------|----------------------|
| [EcRecover](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/ecrecover.rs) | 0x1 | Raw bytes | ✅ | ✅|
| [Sha256](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/sha256.rs) | 0x2 | Raw bytes | ✅ | ✅|
| [Ripemd160](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/ripemd160.rs) | 0x3 | Raw bytes | ✅ | Not yet |
| [Identity](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/identity.rs) | 0x4 | Raw bytes | ✅ | Not yet |
| [Modexp](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/modexp.rs) | 0x5 | Raw bytes | ✅ | Not yet |
| [Bn128Add](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/bn128.rs) | 0x6 | Raw bytes | ✅ | Not yet |
| [Bn128Mul](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/bn128.rs) | 0x7 | Raw bytes | ✅ | Not yet |
| [Bn128Pairing](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/bn128.rs) | 0x8 | Raw bytes | ✅ | Not yet |
| [Blake2F](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/blake2f.rs) | 0x9 | Raw bytes | ✅ | Not yet |
| [PointEval](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/point_eval.rs) | 0a | Raw bytes | ✅ | Not yet |
| [System](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/system.rs) | 0x900 | [Solidity interface](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/uapi/src/precompiles/system.rs) | ✅ | ✅|
| [Storage](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/storage.rs) | 0x901 | [Solidity interface](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/uapi/src/precompiles/storage.rs) | ✅ | ✅|

The Polkadot SDK contains a number of additional precompiles that can be enabled at will:

| Name | Address | Called via | Enabled by default? | Implemented in ink!? |
|----------------------------------------------------------------------------------------------------------------|---------|--------------------|---------------------|----------------------|
| [AssetsPrecompile](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/assets/precompiles) | 0x0120 | Solidity interface | ✅ | Not yet |
| [XcmPrecompile](https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/pallet-xcm/precompiles/) | 0xA0000 | Raw bytes | ✅ | ✅ |
| Name | Address | Called via | Enabled by default? | Implemented in ink!? |
|----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|---------------------|----------------------|
| [AssetsPrecompile](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/assets/precompiles) | [0x120, 0x320](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs#L1192-L1196) | [Solidity interface](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/ethereum-standards/src/IERC20.sol) | ✅ | Not yet |
| [XcmPrecompile](https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/pallet-xcm/precompiles/) | 0xA0000 | Raw bytes | ✅ | ✅ |

## Add your own precompiles

Expand Down