substrate-api-client icon indicating copy to clipboard operation
substrate-api-client copied to clipboard

No hooks found for pallet metadata

Open chungquantin opened this issue 8 months ago • 3 comments

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 avatar Feb 26 '25 05:02 chungquantin