Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EVM] Precompile admin toggles #1079

Open
gztensor opened this issue Dec 6, 2024 · 0 comments
Open

[EVM] Precompile admin toggles #1079

gztensor opened this issue Dec 6, 2024 · 0 comments
Assignees

Comments

@gztensor
Copy link
Contributor

gztensor commented Dec 6, 2024

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()),
            });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants