From 733e7f0a22c2af67ee25c16d2ab6a093b31e325f Mon Sep 17 00:00:00 2001 From: Tin Chung <56880684+chungquantin@users.noreply.github.com> Date: Wed, 24 Jul 2024 20:30:00 +0800 Subject: [PATCH] Update mod.rs --- pop-api/src/v0/mod.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pop-api/src/v0/mod.rs b/pop-api/src/v0/mod.rs index 20369154..5fbb6cab 100644 --- a/pop-api/src/v0/mod.rs +++ b/pop-api/src/v0/mod.rs @@ -25,9 +25,10 @@ impl From for Error { /// Helper method to build `ChainExtensionMethod` for version `v0` /// -/// - `function`: The ID of the function -/// - `module`: The index of the runtime module -/// - `dispatchable`: The index of the module dispatchable functions +/// Parameters: +/// - 'function': The ID of the function +/// - 'module': The index of the runtime module +/// - 'dispatchable': The index of the module dispatchable functions fn build_extension_method_v0( function: u8, module: u8, @@ -38,16 +39,18 @@ fn build_extension_method_v0( /// Helper method to build a dispatch call `ChainExtensionMethod` /// -/// - `module`: The index of the runtime module -/// - `dispatchable`: The index of the module dispatchable functions +/// Parameters: +/// - 'module': The index of the runtime module +/// - 'dispatchable': The index of the module dispatchable functions fn build_dispatch(module: u8, dispatchable: u8) -> ChainExtensionMethod<(), (), (), false> { build_extension_method_v0(DISPATCH, module, dispatchable) } /// Helper method to build a dispatch call `ChainExtensionMethod` /// -/// - `module`: The index of the runtime module -/// - `state_query`: The index of the runtime state query +/// Parameters: +/// - 'module': The index of the runtime module +/// - 'state_query': The index of the runtime state query fn build_read_state(module: u8, state_query: u8) -> ChainExtensionMethod<(), (), (), false> { build_extension_method_v0(READ_STATE, module, state_query) }