-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Begin implementing a list-neurons subcommand * fix queries * implements query response parsing * reduce the scope to the list of controller's neurons * version bump * clippy Co-authored-by: Christian Müller <[email protected]>
- Loading branch information
Showing
10 changed files
with
96 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "quill" | ||
version = "0.2.3" | ||
version = "0.2.4" | ||
authors = ["DFINITY Team"] | ||
edition = "2018" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use crate::{ | ||
commands::sign::sign_ingress, | ||
lib::{governance_canister_id, sign::signed_message::Ingress, AnyhowResult}, | ||
}; | ||
use candid::{CandidType, Encode}; | ||
|
||
#[derive(CandidType)] | ||
pub struct ListNeurons { | ||
pub neuron_ids: Vec<u64>, | ||
pub include_neurons_readable_by_caller: bool, | ||
} | ||
|
||
// We currently only support a subset of the functionality. | ||
pub async fn exec(pem: &Option<String>) -> AnyhowResult<Vec<Ingress>> { | ||
let args = Encode!(&ListNeurons { | ||
neuron_ids: Vec::new(), | ||
include_neurons_readable_by_caller: true, | ||
})?; | ||
Ok(vec![ | ||
sign_ingress(pem, governance_canister_id(), "list_neurons", args).await?, | ||
]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../target/debug/quill --pem-file - list-neurons | ../target/debug/quill send --dry-run - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/bash | ||
|
||
PEM=`cat ./identity.pem` | ||
|
||
for f in `ls -1 ./commands/`; do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Sending message with | ||
|
||
Call type: query | ||
Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae | ||
Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai | ||
Method name: list_neurons | ||
Arguments: (record { neuron_ids = vec {}; include_neurons_readable_by_caller = true }) |