Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nodes/rust/duniter-v2s
  • llaq/lc-core-substrate
  • pini-gh/duniter-v2s
  • vincentux/duniter-v2s
  • mildred/duniter-v2s
  • d0p1/duniter-v2s
  • bgallois/duniter-v2s
  • Nicolas80/duniter-v2s
8 results
Show changes
Commits on Source (2)
This project is tracked on our hosted gitlab server at: https://git.duniter.org/nodes/typescript/duniter/gitlab
This project is tracked on our hosted gitlab server at: https://git.duniter.org/nodes/rust/duniter-v2s
The current github repository is a simple clone taken up to date at each push on the main gitlab repository.
......
{
"editor.formatOnSave": true,
"editor.rulers": [100],
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.rulers": [
100
],
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
......@@ -19,4 +15,4 @@
"port_rpc": 19932,
"port_ws": 19933
}
}
}
\ No newline at end of file
......@@ -31,7 +31,9 @@ Please read [Developer documentation] before contribute.
2. Ensure that you respect the [commit naming conventions].
3. Ensure that all automated tests pass with the `npm test` command.
3. Ensure that all automated tests pass with the `cargo test` command.
3. Ensure that the code is well formated `cargo fmt` and comply with the good practices `cargo clippy`. If you have been working on tests, check everything with `cargo clippy --all --tests`.
4. Update the documentation with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
......
......@@ -8,6 +8,7 @@ the transactor. This is the only call category that can be submitted with an ext
through on-chain governance mechanisms.
1. Inherent calls: This kind of call is invoked by the author of the block itself
(usually automatically by the node).
1. Disabled calls: These calls are disabled for different reasons (to be documented).
## User calls
......@@ -2151,3 +2152,169 @@ call: Box<<T as Config>::Call>
</p>
</details>
## Disabled calls
There are **7** disabled calls organized in **4** pallets.
### 0: System
<details><summary>1: remark(remark)</summary>
<p>
### Index
`1`
### Documentation
Make some on-chain remark.
### Types of parameters
```rust
remark: Vec<u8>
```
</p>
</details>
<details><summary>8: remark_with_event(remark)</summary>
<p>
### Index
`8`
### Documentation
Make some on-chain remark and emit event.
### Types of parameters
```rust
remark: Vec<u8>
```
</p>
</details>
### 14: Session
<details><summary>0: set_keys(keys, proof)</summary>
<p>
### Index
`0`
### Documentation
Sets the session key(s) of the function caller to `keys`.
Allows an account to set its session key prior to becoming a validator.
This doesn't take effect until the next session.
The dispatch origin of this function must be signed.
### Types of parameters
```rust
keys: T::Keys,
proof: Vec<u8>
```
</p>
</details>
<details><summary>1: purge_keys()</summary>
<p>
### Index
`1`
### Documentation
Removes any session key(s) of the function caller.
This doesn't take effect until the next session.
The dispatch origin of this function must be Signed and the account must be either be
convertible to a validator ID using the chain's typical addressing system (this usually
means being a controller account) or directly convertible into a validator ID (which
usually means being a stash account).
</p>
</details>
### 42: Membership
<details><summary>2: claim_membership(maybe_idty_id)</summary>
<p>
### Index
`2`
### Documentation
### Types of parameters
```rust
maybe_idty_id: Option<T::IdtyId>
```
</p>
</details>
<details><summary>4: revoke_membership(maybe_idty_id)</summary>
<p>
### Index
`4`
### Documentation
### Types of parameters
```rust
maybe_idty_id: Option<T::IdtyId>
```
</p>
</details>
### 52: SmithsMembership
<details><summary>2: claim_membership(maybe_idty_id)</summary>
<p>
### Index
`2`
### Documentation
### Types of parameters
```rust
maybe_idty_id: Option<T::IdtyId>
```
</p>
</details>
......@@ -4,7 +4,7 @@ description = "Duniter-v2s xtask"
edition = "2018"
license = "AGPL-3.0"
name = "xtask"
repository = "https://git.duniter.org/nodes/typescript/duniter"
repository = "https://git.duniter.org/nodes/rust/duniter-v2s"
version = "0.1.0"
[[bin]]
......
......@@ -76,6 +76,9 @@ impl CallCategory {
fn is_user(pallet_name: &str, call_name: &str) -> bool {
matches!(Self::is(pallet_name, call_name), Self::User)
}
fn is_disabled(pallet_name: &str, call_name: &str) -> bool {
matches!(Self::is(pallet_name, call_name), Self::Disabled)
}
}
#[derive(Clone)]
......@@ -224,6 +227,23 @@ fn print_runtime_calls(pallets: RuntimeCalls) -> String {
}
})
.collect();
let mut disabled_calls_counter = 0;
let disabled_calls_pallets: RuntimeCalls = pallets
.iter()
.cloned()
.filter_map(|mut pallet| {
let pallet_name = pallet.name.clone();
pallet
.calls
.retain(|call| CallCategory::is_disabled(&pallet_name, &call.name));
if pallet.calls.is_empty() {
None
} else {
disabled_calls_counter += pallet.calls.len();
Some(pallet)
}
})
.collect();
let mut output = String::new();
......@@ -242,6 +262,10 @@ through on-chain governance mechanisms.
output.push_str(
r#"1. Inherent calls: This kind of call is invoked by the author of the block itself
(usually automatically by the node).
"#,
);
output.push_str(
r#"1. Disabled calls: These calls are disabled for different reasons (to be documented).
"#,
);
......@@ -259,6 +283,13 @@ through on-chain governance mechanisms.
root_calls_pallets,
));
output.push_str("\n\n## Disabled calls\n\n");
output.push_str(&print_calls_category(
disabled_calls_counter,
"disabled",
disabled_calls_pallets,
));
output
}
......