You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/tools/call/chain.rs
+47-39Lines changed: 47 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -35,21 +35,20 @@ pub struct CallChainParams {
35
35
#[schemars(description = "Arguments for the call as space-separated values")]
36
36
pubargs:Option<Vec<String>>,
37
37
38
-
/// Secret key URI for signing transactions.
39
-
#[schemars(
40
-
description = "Secret key URI for signing (e.g., '//Alice'). Required for transactions, not for queries/constants."
41
-
)]
42
-
pubsuri:Option<String>,
43
-
44
38
/// Execute with root origin via sudo pallet.
45
39
#[schemars(
46
40
description = "Execute with root origin via sudo pallet. Not allowed with metadata=true."
47
41
)]
48
42
pubsudo:Option<bool>,
49
43
44
+
/// Submit an extrinsic for on-chain execution.
45
+
/// Note: tool-level flag; not passed to Pop CLI.
46
+
#[schemars(description = "Submit an extrinsic for on-chain execution")]
47
+
pubexecute:Option<bool>,
48
+
50
49
/// Display chain metadata instead of executing a call.
51
50
#[schemars(
52
-
description = "Display chain metadata. Use alone to list all pallets, or with pallet to show pallet details (extrinsics, storage, constants). Cannot be used with function, args, suri, or sudo."
51
+
description = "Display chain metadata. Use alone to list all pallets, or with pallet to show pallet details (extrinsics, storage, constants). Cannot be used with function, args, sudo, or execute."
53
52
)]
54
53
pubmetadata:Option<bool>,
55
54
}
@@ -67,12 +66,12 @@ impl CallChainParams {
67
66
ifself.args.is_some(){
68
67
returnErr("Cannot use 'args' with metadata=true".to_owned());
69
68
}
70
-
ifself.suri.is_some(){
71
-
returnErr("Cannot use 'suri' with metadata=true".to_owned());
72
-
}
73
69
ifself.sudo.unwrap_or(false){
74
70
returnErr("Cannot use 'sudo' with metadata=true".to_owned());
75
71
}
72
+
ifself.execute.unwrap_or(false){
73
+
returnErr("Cannot use 'execute' with metadata=true".to_owned());
74
+
}
76
75
}else{
77
76
// In call mode, pallet and function are required
78
77
ifself.pallet.is_none(){
@@ -81,6 +80,9 @@ impl CallChainParams {
81
80
ifself.function.is_none(){
82
81
returnErr("'function' is required when metadata is not set".to_owned());
0 commit comments