-
Notifications
You must be signed in to change notification settings - Fork 161
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
Metagraph contract #1043
Metagraph contract #1043
Conversation
runtime/src/precompiles/metagraph.rs
Outdated
|
||
match method_id { | ||
id if id == get_method_id("getUidCount(uint16)") => Self::get_uid_count(&method_input), | ||
id if id == get_method_id("getIsSubnetRegistered(uint16)") => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this method to subnets precompile. It will be implemented in the issue #1067
@@ -13,10 +13,12 @@ use pallet_evm_precompile_simple::{ECRecover, ECRecoverPublicKey, Identity, Ripe | |||
// Include custom precompiles | |||
mod balance_transfer; | |||
mod ed25519; | |||
mod metagraph; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
METAGRAPH_PRECOMPILE_INDEX
also needs to be in used_addresses
so that is_precompile
works correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Description
The pr will close #1032 , create a precompile contract to get the metagraph data via eth rpc.
Related Issue(s)
Type of Change
Breaking Change
If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.
Checklist
cargo fmt
andcargo clippy
to ensure my code is formatted and linted correctlyScreenshots (if applicable)
Please include any relevant screenshots or GIFs that demonstrate the changes made.
Additional Notes
Please provide any additional information or context that may be helpful for reviewers.