PrecompileUpdated
Event v238 → current #0Emitted when an EVM precompile's enabled status is changed.
View events on chainUseful for: developersvalidators
The Big Picture
EVM precompiles are special contracts at fixed addresses providing advanced functionality. This event tracks changes to which precompiles are active, important for EVM developers who may depend on specific precompile availability.
Use Cases
- Monitor EVM precompile configuration changes
- Track when new EVM features are enabled
- Alert when precompiles are disabled for security
How to Use This Event
- → Subscribe to monitor EVM feature availability
- → Index to track precompile configuration history
From Chain Metadata
Event emitted when a precompile operation is updated.
Triggers
Emitted by
Preconditions
- Caller is root account
- Valid precompile ID provided
Effects
Storage Modified
Postconditions
- PrecompileEnable storage updated for the precompile
- EVM behavior changes based on new status
Side Effects
- EVM contracts calling disabled precompiles will fail
- May affect EVM dApp functionality
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | precompile_id | PrecompileEnum | Identifier of the EVM precompile being configured |
| 1 | enabled | bool | Whether the precompile is now enabled (true) or disabled (false) |
Code Examples
import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Subscribe to PrecompileUpdated events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("AdminUtils") &&
event.method === "PrecompileUpdated"
)
.forEach(({ event }) => {
console.log("PrecompileUpdated:", event.data.toHuman());
});
});Runtime Info
View Source- Pallet Index
- 19
- Event Index
- 0
- First Version
- v238
- Current Version
- v393