Skip to content

[EVM] Precompile admin toggles #1079

@gztensor

Description

@gztensor

Create admin pallet methods (callable by sudo only) that will allow to toggle precompiles on and off. In order to avoid admin pallet pollution, implement it as a single sudo_toggle_evm_precompile extrinsic that accepts two parameters:

  1. Precompile ID (emun)
  2. Boolean to enable / disable

Precompile ID should be the enum with following options:

  • BalanceTransfer
  • Staking
  • Subnets
  • Neurons

If a precompile is disabled, any call to the precompile should fail with following error:

            return Err(PrecompileFailure::Error {
                exit_status: ExitError::Other("Precompile is disabled".into()),
            });

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions