Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@
| [SHA3FIPS256](/builders/ethereum/precompiles/utility/eth-mainnet/#hashing-with-sha3fips256){target=\_blank} | 0x0000000000000000000000000000000000000400 |
| Dispatch [Removed] | 0x0000000000000000000000000000000000000401 |
| [ECRecoverPublicKey](https://polkadot-evm.github.io/frontier/rustdocs/pallet_evm_precompile_simple/struct.ECRecoverPublicKey.html){target=\_blank} | 0x0000000000000000000000000000000000000402 |
| [StorageCleaner](https://polkadot-evm.github.io/frontier/rustdocs/pallet_evm_precompile_storage_cleaner/struct.StorageCleanerPrecompile.html){target=\_blank} | 0x0000000000000000000000000000000000000403 |
10 changes: 2 additions & 8 deletions builders/ethereum/precompiles/utility/non-specific.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Non-Network Specific Precompiles
description: Learn how to use precompiled contracts, which are not specific to Ethereum or Moonbeam, yet are supported for use in your application.
keywords: ethereum, moonbeam, StorageCleaner, ECRecoverPublicKey, sha3FIPS256
keywords: ethereum, moonbeam, ECRecoverPublicKey, sha3FIPS256
---

# Non-Network Specific Precompiled Smart Contracts
Expand All @@ -12,16 +12,10 @@ A precompiled contract, or precompile, is a set of programmed functionalities ha

Precompile functionality is bundled and shared under a smart contract address, which allows interactions similar to those of a traditional smart contract. Some precompiled contracts are not specific to Ethereum or Moonbeam, but are supported for use in your Moonbeam application.

The nonspecific precompiles currently included in this category include `StorageCleaner`, `ECRecoverPublicKey`, and `SHA3FIPS256`.
The nonspecific precompiles currently included in this category are the `ECRecoverPublicKey` and `SHA3FIPS256` precompiles.

In the next section, you will learn more about the functionalities included in these precompiles.

## Clear Storage Entries with StorageCleaner {: #clear-storage-with-storagecleaner }

The primary function of the `StorageCleaner` precompile is to clear storage entry key-value pairs for a smart contract marked as self-destructed, previously referred to as 'suicided.' `StorageCleaner` includes functionality to iterate over a list of addresses to identify self-destructed contracts and delete the appropriate storage entries associated with identified addresses. You can also input a numeric limit to prevent the precompile from consuming too much gas.

With the implementation of [EIP-6780: SELFDESTRUCT](https://eips.ethereum.org/EIPS/eip-6780){target=\_blank} as part of the Ethereum Cancun/Dencun upgrade, contracts can only be self-destructed in the same transaction where they are created. This limitation keeps storage entries small and allows them to be automatically deleted during destruction. The `StorageCleaner` precompile remains available when a legacy contract needs storage entries cleared.

## Retrieve a Public Key with ECRecoverPublicKey {: verifying-signatures-ecrecoverpublickey }

The primary function of the `ECRecoverPublicKey` precompile is to recover the public key used to create a digital signature from a given message hash and signature. This precompile is similar to [ECRecover](/builders/ethereum/precompiles/utility/eth-mainnet/#verify-signatures-with-ecrecover/){target=\_blank}, with the exception of returning the public key of the account that signed the message rather than the account address.
Expand Down
12 changes: 2 additions & 10 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,6 @@ There are a set of precompiled contracts included on Moonbeam, Moonriver, and Mo
| [SHA3FIPS256](/builders/ethereum/precompiles/utility/eth-mainnet/#hashing-with-sha3fips256){target=\_blank} | 0x0000000000000000000000000000000000000400 |
| Dispatch [Removed] | 0x0000000000000000000000000000000000000401 |
| [ECRecoverPublicKey](https://polkadot-evm.github.io/frontier/rustdocs/pallet_evm_precompile_simple/struct.ECRecoverPublicKey.html){target=\_blank} | 0x0000000000000000000000000000000000000402 |
| [StorageCleaner](https://polkadot-evm.github.io/frontier/rustdocs/pallet_evm_precompile_storage_cleaner/struct.StorageCleanerPrecompile.html){target=\_blank} | 0x0000000000000000000000000000000000000403 |

### Moonbeam-Specific Precompiles {: #moonbeam-specific-precompiles }

Expand Down Expand Up @@ -16435,7 +16434,6 @@ The precompiled contracts are categorized by address and based on the origin net
| [SHA3FIPS256](/builders/ethereum/precompiles/utility/eth-mainnet/#hashing-with-sha3fips256){target=\_blank} | 0x0000000000000000000000000000000000000400 |
| Dispatch [Removed] | 0x0000000000000000000000000000000000000401 |
| [ECRecoverPublicKey](https://polkadot-evm.github.io/frontier/rustdocs/pallet_evm_precompile_simple/struct.ECRecoverPublicKey.html){target=\_blank} | 0x0000000000000000000000000000000000000402 |
| [StorageCleaner](https://polkadot-evm.github.io/frontier/rustdocs/pallet_evm_precompile_storage_cleaner/struct.StorageCleanerPrecompile.html){target=\_blank} | 0x0000000000000000000000000000000000000403 |

### Moonbeam Specific Precompiles {: #moonbeam-specific-precompiles }

Expand Down Expand Up @@ -17038,7 +17036,7 @@ Doc-Content: https://docs.moonbeam.network/builders/ethereum/precompiles/utility
---
title: Non-Network Specific Precompiles
description: Learn how to use precompiled contracts, which are not specific to Ethereum or Moonbeam, yet are supported for use in your application.
keywords: ethereum, moonbeam, StorageCleaner, ECRecoverPublicKey, sha3FIPS256
keywords: ethereum, moonbeam, ECRecoverPublicKey, sha3FIPS256
---

# Non-Network Specific Precompiled Smart Contracts
Expand All @@ -17049,16 +17047,10 @@ A precompiled contract, or precompile, is a set of programmed functionalities ha

Precompile functionality is bundled and shared under a smart contract address, which allows interactions similar to those of a traditional smart contract. Some precompiled contracts are not specific to Ethereum or Moonbeam, but are supported for use in your Moonbeam application.

The nonspecific precompiles currently included in this category include `StorageCleaner`, `ECRecoverPublicKey`, and `SHA3FIPS256`.
The nonspecific precompiles currently included in this category are the `ECRecoverPublicKey` and `SHA3FIPS256` precompiles.

In the next section, you will learn more about the functionalities included in these precompiles.

## Clear Storage Entries with StorageCleaner {: #clear-storage-with-storagecleaner }

The primary function of the `StorageCleaner` precompile is to clear storage entry key-value pairs for a smart contract marked as self-destructed, previously referred to as 'suicided.' `StorageCleaner` includes functionality to iterate over a list of addresses to identify self-destructed contracts and delete the appropriate storage entries associated with identified addresses. You can also input a numeric limit to prevent the precompile from consuming too much gas.

With the implementation of [EIP-6780: SELFDESTRUCT](https://eips.ethereum.org/EIPS/eip-6780){target=\_blank} as part of the Ethereum Cancun/Dencun upgrade, contracts can only be self-destructed in the same transaction where they are created. This limitation keeps storage entries small and allows them to be automatically deleted during destruction. The `StorageCleaner` precompile remains available when a legacy contract needs storage entries cleared.

## Retrieve a Public Key with ECRecoverPublicKey {: verifying-signatures-ecrecoverpublickey }

The primary function of the `ECRecoverPublicKey` precompile is to recover the public key used to create a digital signature from a given message hash and signature. This precompile is similar to [ECRecover](/builders/ethereum/precompiles/utility/eth-mainnet/#verify-signatures-with-ecrecover/){target=\_blank}, with the exception of returning the public key of the account that signed the message rather than the account address.
Expand Down