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

No hooks found for pallet metadata #838

Open
chungquantin opened this issue Feb 26, 2025 · 1 comment
Open

No hooks found for pallet metadata #838

chungquantin opened this issue Feb 26, 2025 · 1 comment

Comments

@chungquantin
Copy link

Hi maintainers, I try to extract the metadata of a Substrate WASM binary using ac-node-api::Metadata::try_from. The result looks great but seems like there are no hooks included in the returned data. Am I missing anything or this is not added in the current feature yet?

{"Timestamp": ["set"], "ParachainSystem": ["sudo_send_upward_message", "set_validation_data"], "XcmpQueue": ["update_suspend_threshold", "update_resume_threshold", "update_drop_threshold", "suspend_xcm_execution", "resume_xcm_execution"], "Session": ["set_keys", "purge_keys"], "System": ["set_storage", "set_heap_pages", "set_code_without_checks", "set_code", "remark_with_event", "remark", "kill_storage", "kill_prefix", "authorize_upgrade_without_checks", "authorize_upgrade", "apply_authorized_upgrade"], "CollatorSelection": ["update_bond", "take_candidate_slot", "set_invulnerables", "set_desired_candidates", "set_candidacy_bond", "remove_invulnerable", "register_as_candidate", "leave_intent", "add_invulnerable"], "MessageQueue": ["reap_page", "execute_overweight"], "ParachainInfo": [], "Balances": ["upgrade_accounts", "transfer_keep_alive", "transfer_allow_death", "transfer_all", "force_unreserve", "force_transfer", "force_set_balance", "force_adjust_total_issuance", "burn"], "CumulusXcm": [], "PolkadotXcm": ["transfer_assets_using_type_and_then", "transfer_assets", "teleport_assets", "send", "reserve_transfer_assets", "limited_teleport_assets", "limited_reserve_transfer_assets", "force_xcm_version", "force_unsubscribe_version_notify", "force_suspension", "force_subscribe_version_notify", "force_default_xcm_version", "execute", "claim_assets"], "Sudo": ["sudo_unchecked_weight", "sudo_as", "sudo", "set_key", "remove_key"]}

As can be seen in the above returned metadata. The pallet Timestamp does no have on_finalize() which is the hook of the pallet.

@chungquantin chungquantin changed the title No hooks found for metadata No hooks found for pallet metadata Feb 26, 2025
@haerdib
Copy link
Contributor

haerdib commented Feb 26, 2025

Hello chungquantin

I will check this tomorrow or the day after. Just to make sure: What is your use case? I'm guessing you don't want to simply print them, but also extract the hooks to use them in your code, is that correct?

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