From d7cc79080293129594215b90c0f4ab9ccbe14fd0 Mon Sep 17 00:00:00 2001 From: Adam Spofford <93943719+adamspofford-dfinity@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:13:52 -0700 Subject: [PATCH] fix: Remove usage of deprecated functions (#235) --- e2e/tests-quill/create_neuron.bash | 2 +- src/commands/account_balance.rs | 26 +++---- src/commands/neuron_manage.rs | 70 ++++++++++--------- src/commands/neuron_stake.rs | 43 ++++++------ src/commands/send.rs | 35 +--------- src/commands/sns/pay.rs | 8 +-- src/commands/transfer.rs | 13 ++-- src/lib/format/nns_governance.rs | 4 +- src/lib/ledger.rs | 2 +- .../output/default/account_balance/authed.txt | 5 +- .../output/default/account_balance/simple.txt | 4 +- .../default/neuron_manage/add_hot_key.txt | 6 +- .../additional_dissolve_delay_seconds.txt | 6 +- .../neuron_manage/auto_stake_disable.txt | 6 +- .../neuron_manage/auto_stake_enable.txt | 6 +- tests/output/default/neuron_manage/clear.txt | 6 +- .../disburse_somewhat_to_someone.txt | 6 +- .../disburse_stop_dissolving.txt | 12 ++-- tests/output/default/neuron_manage/follow.txt | 6 +- .../neuron_manage/join_community_fund.txt | 6 +- .../neuron_manage/leave_community_fund.txt | 6 +- tests/output/default/neuron_manage/merge.txt | 6 +- .../remove_hot_key_and_dissolve.txt | 18 +++-- tests/output/default/neuron_manage/spawn.txt | 6 +- tests/output/default/neuron_manage/split.txt | 6 +- .../default/neuron_manage/stake_maturity.txt | 6 +- .../neuron_manage/start_dissolving.txt | 6 +- .../default/neuron_manage/stop_dissolving.txt | 6 +- tests/output/default/neuron_manage/vote.txt | 12 ++-- .../default/neuron_stake/stake_only.txt | 18 +++-- .../output/default/neuron_stake/with_name.txt | 22 ++++-- .../default/neuron_stake/with_nonce.txt | 22 ++++-- tests/output/default/sns/swap/pay.txt | 4 +- .../sns/swap/pay_with_confirmation_text.txt | 4 +- tests/output/default/transfer/e8s-2.txt | 4 +- tests/output/default/transfer/e8s.txt | 4 +- tests/output/default/transfer/icp-and-e8s.txt | 4 +- tests/output/default/transfer/simple.txt | 4 +- .../default/transfer/with-fees-and-memo.txt | 4 +- tests/output/default/transfer/with-fees.txt | 4 +- .../output/ledger/account_balance/authed.txt | 5 +- .../output/ledger/account_balance/simple.txt | 4 +- .../additional_dissolve_delay_seconds.txt | 6 +- .../neuron_manage/auto_stake_disable.txt | 6 +- .../neuron_manage/auto_stake_enable.txt | 6 +- tests/output/ledger/neuron_manage/merge.txt | 6 +- tests/output/ledger/neuron_manage/spawn.txt | 6 +- tests/output/ledger/neuron_manage/split.txt | 6 +- .../ledger/neuron_manage/stake_maturity.txt | 6 +- .../ledger/neuron_manage/start_dissolving.txt | 6 +- .../ledger/neuron_manage/stop_dissolving.txt | 6 +- 51 files changed, 282 insertions(+), 219 deletions(-) diff --git a/e2e/tests-quill/create_neuron.bash b/e2e/tests-quill/create_neuron.bash index c8fa9e7c..5967f747 100644 --- a/e2e/tests-quill/create_neuron.bash +++ b/e2e/tests-quill/create_neuron.bash @@ -19,7 +19,7 @@ teardown() { SEND_OUTPUT="$(quill send stake.call --yes --insecure-local-dev-mode)" assert_command echo "$SEND_OUTPUT" # replay the output so string matches work echo "$SEND_OUTPUT" - assert_string_match "Method name: claim_or_refresh_neuron_from_account" + assert_string_match "Method name: manage_neuron" NEURON_ID="$(echo "$SEND_OUTPUT" | grep -E ' neuron ' | sed 's/[^0-9]//g')" echo "NEURON: $NEURON_ID" assert_string_match " diff --git a/src/commands/account_balance.rs b/src/commands/account_balance.rs index 65806e99..51970346 100644 --- a/src/commands/account_balance.rs +++ b/src/commands/account_balance.rs @@ -1,21 +1,18 @@ use crate::{ commands::{send::submit_unsigned_ingress, SendingOpts}, lib::{ - get_account_id, ledger_canister_id, AnyhowResult, AuthInfo, ParsedNnsAccount, - ROLE_ICRC1_LEDGER, ROLE_NNS_LEDGER, + ledger_canister_id, AnyhowResult, AuthInfo, ParsedNnsAccount, ROLE_ICRC1_LEDGER, + ROLE_NNS_LEDGER, }, AUTH_FLAGS, }; -use candid::{CandidType, Encode}; +use candid::Encode; use clap::Parser; +use icp_ledger::BinaryAccountBalanceArgs; +use icrc_ledger_types::icrc1::account::Account; use super::get_principal; -#[derive(CandidType)] -pub struct AccountBalanceArgs { - pub account: String, -} - /// Queries a ledger account balance. #[derive(Parser)] pub struct AccountBalanceOpts { @@ -33,18 +30,21 @@ pub async fn exec(auth: &AuthInfo, opts: AccountBalanceOpts, fetch_root_key: boo let account_id = if let Some(id) = opts.account_id { id } else { - let id = get_account_id(get_principal(auth)?, None)?; - ParsedNnsAccount::Original(id) + let account = Account { + owner: get_principal(auth)?, + subaccount: None, + }; + ParsedNnsAccount::Icrc1(account) }; match account_id { ParsedNnsAccount::Original(id) => { - let args = Encode!(&AccountBalanceArgs { - account: id.to_hex() + let args = Encode!(&BinaryAccountBalanceArgs { + account: id.to_address() })?; submit_unsigned_ingress( ledger_canister_id(), ROLE_NNS_LEDGER, - "account_balance_dfx", + "account_balance", args, opts.sending_opts, fetch_root_key, diff --git a/src/commands/neuron_manage.rs b/src/commands/neuron_manage.rs index 38663f78..d2418d8b 100644 --- a/src/commands/neuron_manage.rs +++ b/src/commands/neuron_manage.rs @@ -9,6 +9,7 @@ use candid::{CandidType, Encode, Principal}; use clap::{Parser, ValueEnum}; use ic_base_types::PrincipalId; use ic_nns_common::pb::v1::{NeuronId, ProposalId}; +use ic_nns_governance::pb::v1::manage_neuron::NeuronIdOrSubaccount; use ic_nns_governance::pb::v1::{ manage_neuron::{ configure::Operation, disburse::Amount, AddHotKey, ChangeAutoStakeMaturity, Command, @@ -142,60 +143,61 @@ Cannot use --ledger with these flags. This version of quill only supports the fo } let mut msgs = Vec::new(); - let id = Some(NeuronId { + let id = NeuronId { id: parse_neuron_id(opts.neuron_id)?, - }); + }; + let id = Some(NeuronIdOrSubaccount::NeuronId(id)); if opts.add_hot_key.is_some() { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Configure(Configure { operation: Some(Operation::AddHotKey(AddHotKey { new_hot_key: opts.add_hot_key.map(PrincipalId) })) })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); }; if opts.remove_hot_key.is_some() { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Configure(Configure { operation: Some(Operation::RemoveHotKey(RemoveHotKey { hot_key_to_remove: opts.remove_hot_key.map(PrincipalId) })) })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); }; if opts.stop_dissolving { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Configure(Configure { operation: Some(Operation::StopDissolving(StopDissolving {})) })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); } if opts.start_dissolving { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Configure(Configure { operation: Some(Operation::StartDissolving(StartDissolving {})) })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); } if let Some(additional_dissolve_delay_seconds) = opts.additional_dissolve_delay_seconds { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Configure(Configure { operation: Some(Operation::IncreaseDissolveDelay(IncreaseDissolveDelay { additional_dissolve_delay_seconds: match additional_dissolve_delay_seconds @@ -235,66 +237,66 @@ Cannot use --ledger with these flags. This version of quill only supports the fo } })) })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); }; if opts.disburse || opts.disburse_amount.is_some() || opts.disburse_to.is_some() { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Disburse(Disburse { to_account: opts.disburse_to.map(|to| to.into_identifier().into()), amount: opts.disburse_amount.map(|amount| Amount { e8s: amount.get_e8s() }), })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); }; if opts.spawn { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Spawn(Default::default())), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); }; if let Some(amount) = opts.split { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Split(Split { amount_e8s: amount * 100_000_000 })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); }; if opts.clear_manage_neuron_followees { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Follow(Follow { topic: 1, // Topic::NeuronManagement as i32, followees: Vec::new() })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); } if let Some(neuron_id) = opts.merge_from_neuron { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Merge(Merge { source_neuron_id: Some(NeuronId { id: parse_neuron_id(neuron_id)? }), })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); }; @@ -308,33 +310,33 @@ Cannot use --ledger with these flags. This version of quill only supports the fo bail!("Percentage to merge must be a number from 1 to 100"); } let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::StakeMaturity(StakeMaturity { percentage_to_stake: Some(percentage), })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); } if opts.join_community_fund { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Configure(Configure { operation: Some(Operation::JoinCommunityFund(JoinCommunityFund {})) })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); }; if opts.leave_community_fund { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Configure(Configure { operation: Some(Operation::LeaveCommunityFund(LeaveCommunityFund {})) })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); } @@ -342,12 +344,12 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if let Some(proposals) = opts.register_vote { for proposal in proposals { let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::RegisterVote(RegisterVote { vote: if opts.reject { 2 } else { 1 }, proposal: Some(ProposalId { id: proposal }), })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); } @@ -356,12 +358,12 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if let (Some(topic), Some(neuron_ids)) = (opts.follow_topic, opts.follow_neurons) { let followees = neuron_ids.into_iter().map(|x| NeuronId { id: x }).collect(); let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Follow(Follow { topic, // Topic::NeuronManagement as i32, followees, })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); } @@ -369,7 +371,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if let Some(enable) = opts.auto_stake_maturity { let requested_setting_for_auto_stake_maturity = matches!(enable, EnableState::Enabled); let args = Encode!(&ManageNeuron { - id, + id: None, command: Some(Command::Configure(Configure { operation: Some(Operation::ChangeAutoStakeMaturity( ChangeAutoStakeMaturity { @@ -377,7 +379,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo } )) })), - neuron_id_or_subaccount: None, + neuron_id_or_subaccount: id.clone(), })?; msgs.push(args); } diff --git a/src/commands/neuron_stake.rs b/src/commands/neuron_stake.rs index e2d69a90..cf5c32e5 100644 --- a/src/commands/neuron_stake.rs +++ b/src/commands/neuron_stake.rs @@ -1,27 +1,25 @@ use crate::{ - commands::{ - send::Memo, - transfer::{self, parse_tokens}, - }, + commands::transfer::{self, parse_tokens}, lib::{ - governance_canister_id, + get_principal, governance_canister_id, signing::{sign_ingress_with_request_status_query, IngressWithRequestId}, AnyhowResult, AuthInfo, ParsedNnsAccount, ParsedSubaccount, ROLE_NNS_GOVERNANCE, }, }; use anyhow::{anyhow, ensure}; -use candid::{CandidType, Encode, Principal}; +use candid::{Encode, Principal}; use clap::Parser; use ic_nns_constants::GOVERNANCE_CANISTER_ID; +use ic_nns_governance::pb::v1::{ + manage_neuron::{ + claim_or_refresh::{By, MemoAndController}, + ClaimOrRefresh, Command, + }, + ManageNeuron, +}; use icp_ledger::{AccountIdentifier, Subaccount, Tokens}; use sha2::{Digest, Sha256}; -#[derive(CandidType)] -pub struct ClaimOrRefreshNeuronFromAccount { - pub memo: Memo, - pub controller: Option, -} - /// Signs topping up of a neuron (new or existing). #[derive(Parser)] pub struct StakeOpts { @@ -85,17 +83,22 @@ pub fn exec(auth: &AuthInfo, opts: StakeOpts) -> AnyhowResult, - pub to: String, - pub created_at_time: Option, -} - /// Sends a signed message or a set of messages. #[derive(Parser)] pub struct SendOpts { diff --git a/src/commands/sns/pay.rs b/src/commands/sns/pay.rs index 1f456a7f..fd9e666b 100644 --- a/src/commands/sns/pay.rs +++ b/src/commands/sns/pay.rs @@ -2,7 +2,7 @@ use candid::Encode; use clap::Parser; use ic_base_types::PrincipalId; use ic_sns_swap::pb::v1::RefreshBuyerTokensRequest; -use icp_ledger::{AccountIdentifier, Memo, SendArgs, Subaccount, TimeStamp, Tokens}; +use icp_ledger::{AccountIdentifier, Memo, Subaccount, TimeStamp, Tokens, TransferArgs}; use crate::lib::ParsedSubaccount; use crate::lib::{ @@ -57,7 +57,7 @@ pub fn exec( let subaccount = Subaccount::from(&PrincipalId(controller)); let account_id = AccountIdentifier::new(sns_canister_ids.swap_canister_id.into(), Some(subaccount)); - let request = SendArgs { + let request = TransferArgs { amount: Tokens::from_e8s(opts.amount_icp_e8s.unwrap()), created_at_time: Some(TimeStamp::from_nanos_since_unix_epoch( opts.ticket_creation_time.unwrap(), @@ -65,13 +65,13 @@ pub fn exec( from_subaccount: opts.subaccount.map(|x| x.0), fee: Tokens::from_e8s(10_000), memo: Memo(opts.ticket_id.unwrap()), - to: account_id, + to: account_id.to_address(), }; messages.push(sign_ingress_with_request_status_query( auth, ledger_canister_id(), ROLE_NNS_LEDGER, - "send_dfx", + "transfer", Encode!(&request)?, )?); } diff --git a/src/commands/transfer.rs b/src/commands/transfer.rs index c8b05843..de4b7b0d 100644 --- a/src/commands/transfer.rs +++ b/src/commands/transfer.rs @@ -1,4 +1,3 @@ -use crate::commands::send::{Memo, SendArgs, TimeStamp}; use crate::lib::{ ledger_canister_id, signing::{sign_ingress_with_request_status_query, IngressWithRequestId}, @@ -10,7 +9,7 @@ use crate::lib::{ use anyhow::{anyhow, bail, Context}; use candid::Encode; use clap::Parser; -use icp_ledger::{Tokens, DEFAULT_TRANSFER_FEE}; +use icp_ledger::{Memo, TimeStamp, Tokens, TransferArgs, DEFAULT_TRANSFER_FEE}; use icrc_ledger_types::icrc1::transfer::TransferArg; /// Signs an ICP transfer transaction. @@ -43,22 +42,20 @@ pub fn exec(auth: &AuthInfo, opts: TransferOpts) -> AnyhowResult { - let args = Encode!(&SendArgs { + let args = Encode!(&TransferArgs { memo, amount, fee, from_subaccount: opts.from_subaccount.map(|x| x.0), - to: to.to_hex(), - created_at_time: Some(TimeStamp { - timestamp_nanos: now_nanos() - }), + to: to.to_address(), + created_at_time: Some(TimeStamp::from_nanos_since_unix_epoch(now_nanos())) })?; let msg = sign_ingress_with_request_status_query( auth, ledger_canister_id(), ROLE_NNS_LEDGER, - "send_dfx", + "transfer", args, )?; Ok(vec![msg]) diff --git a/src/lib/format/nns_governance.rs b/src/lib/format/nns_governance.rs index 1e5fbfda..1caa9a20 100644 --- a/src/lib/format/nns_governance.rs +++ b/src/lib/format/nns_governance.rs @@ -224,9 +224,9 @@ pub fn display_manage_neuron(blob: &[u8]) -> AnyhowResult { } Command::ClaimOrRefresh(c) => { if let Some(id) = c.refreshed_neuron_id { - format!("Successfully updated the stake of neuron {}", id.id) + format!("Successfully staked ICP in neuron {}", id.id) } else { - "Successfully updated the stake of unknown neuron".to_string() + "Successfully staked ICP in unknown neuron".to_string() } } Command::Merge(c) => { diff --git a/src/lib/ledger.rs b/src/lib/ledger.rs index d9755077..459ded3d 100644 --- a/src/lib/ledger.rs +++ b/src/lib/ledger.rs @@ -223,7 +223,7 @@ fn interpret_response<'a>( if let Ok(errcode) = response.error_code() { match errcode { APDUErrorCode::NoError => Ok(response.apdu_data()), - APDUErrorCode::DataInvalid if matches!(content, Some(EnvelopeContent::Call { method_name, .. }) if method_name == "send_dfx") => { + APDUErrorCode::DataInvalid if matches!(content, Some(EnvelopeContent::Call { method_name, .. }) if method_name == "send_dfx" || method_name == "transfer") => { Err(format!("Error {action}: Must use a principal or ICRC-1 account ID, not a legacy account ID")) } APDUErrorCode::DataInvalid if matches!(content, diff --git a/tests/output/default/account_balance/authed.txt b/tests/output/default/account_balance/authed.txt index 957f5878..11dab9a4 100644 --- a/tests/output/default/account_balance/authed.txt +++ b/tests/output/default/account_balance/authed.txt @@ -3,9 +3,10 @@ Sending message with Call type: update Sender: 2vxsx-fae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: account_balance_dfx + Method name: icrc1_balance_of Arguments: ( record { - account = "345f723e9e619934daac6ae0f4be13a7b0ba57d6a608e511a00fd0ded5866752"; + owner = principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; + subaccount = null; }, ) diff --git a/tests/output/default/account_balance/simple.txt b/tests/output/default/account_balance/simple.txt index f733e141..e15d5f86 100644 --- a/tests/output/default/account_balance/simple.txt +++ b/tests/output/default/account_balance/simple.txt @@ -3,9 +3,9 @@ Sending message with Call type: update Sender: 2vxsx-fae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: account_balance_dfx + Method name: account_balance Arguments: ( record { - account = "ec0e2456fb9ff6c80f1d475b301d9b2ab873612f96e7fd74e7c0c0b2d58e6693"; + account = blob "\ec\0e\24\56\fb\9f\f6\c8\0f\1d\47\5b\30\1d\9b\2a\b8\73\61\2f\96\e7\fd\74\e7\c0\c0\b2\d5\8e\66\93"; }, ) diff --git a/tests/output/default/neuron_manage/add_hot_key.txt b/tests/output/default/neuron_manage/add_hot_key.txt index 757fab65..005cc878 100644 --- a/tests/output/default/neuron_manage/add_hot_key.txt +++ b/tests/output/default/neuron_manage/add_hot_key.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { @@ -16,6 +16,8 @@ Sending message with }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/additional_dissolve_delay_seconds.txt b/tests/output/default/neuron_manage/additional_dissolve_delay_seconds.txt index 315e22bd..ac9df1c0 100644 --- a/tests/output/default/neuron_manage/additional_dissolve_delay_seconds.txt +++ b/tests/output/default/neuron_manage/additional_dissolve_delay_seconds.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { @@ -16,6 +16,8 @@ Sending message with }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/auto_stake_disable.txt b/tests/output/default/neuron_manage/auto_stake_disable.txt index d61aad29..5c7219db 100644 --- a/tests/output/default/neuron_manage/auto_stake_disable.txt +++ b/tests/output/default/neuron_manage/auto_stake_disable.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { @@ -16,6 +16,8 @@ Sending message with }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/auto_stake_enable.txt b/tests/output/default/neuron_manage/auto_stake_enable.txt index d1111c2e..0c988c5b 100644 --- a/tests/output/default/neuron_manage/auto_stake_enable.txt +++ b/tests/output/default/neuron_manage/auto_stake_enable.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { @@ -16,6 +16,8 @@ Sending message with }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/clear.txt b/tests/output/default/neuron_manage/clear.txt index 1933539a..988b1563 100644 --- a/tests/output/default/neuron_manage/clear.txt +++ b/tests/output/default/neuron_manage/clear.txt @@ -6,10 +6,12 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Follow = record { topic = 1 : int32; followees = vec {} } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/disburse_somewhat_to_someone.txt b/tests/output/default/neuron_manage/disburse_somewhat_to_someone.txt index b3d50f48..d2cbd61b 100644 --- a/tests/output/default/neuron_manage/disburse_somewhat_to_someone.txt +++ b/tests/output/default/neuron_manage/disburse_somewhat_to_someone.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Disburse = record { to_account = opt record { @@ -15,6 +15,8 @@ Sending message with amount = opt record { e8s = 5_731_000_000 : nat64 }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/disburse_stop_dissolving.txt b/tests/output/default/neuron_manage/disburse_stop_dissolving.txt index 1ab1b0db..9938aa8c 100644 --- a/tests/output/default/neuron_manage/disburse_stop_dissolving.txt +++ b/tests/output/default/neuron_manage/disburse_stop_dissolving.txt @@ -6,13 +6,15 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { StopDissolving = record {} }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) Sending message with @@ -23,10 +25,12 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Disburse = record { to_account = null; amount = null } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/follow.txt b/tests/output/default/neuron_manage/follow.txt index bbc1c194..7e67c73f 100644 --- a/tests/output/default/neuron_manage/follow.txt +++ b/tests/output/default/neuron_manage/follow.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Follow = record { topic = 0 : int32; @@ -16,6 +16,8 @@ Sending message with }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/join_community_fund.txt b/tests/output/default/neuron_manage/join_community_fund.txt index 6676bc20..cf8cef46 100644 --- a/tests/output/default/neuron_manage/join_community_fund.txt +++ b/tests/output/default/neuron_manage/join_community_fund.txt @@ -6,12 +6,14 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { JoinCommunityFund = record {} }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/leave_community_fund.txt b/tests/output/default/neuron_manage/leave_community_fund.txt index 89d7e9cc..415ba4e3 100644 --- a/tests/output/default/neuron_manage/leave_community_fund.txt +++ b/tests/output/default/neuron_manage/leave_community_fund.txt @@ -6,12 +6,14 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { LeaveCommunityFund = record {} }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/merge.txt b/tests/output/default/neuron_manage/merge.txt index 98224e8a..d3af4608 100644 --- a/tests/output/default/neuron_manage/merge.txt +++ b/tests/output/default/neuron_manage/merge.txt @@ -6,12 +6,14 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Merge = record { source_neuron_id = opt record { id = 380_519_530_470_538 : nat64 }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/remove_hot_key_and_dissolve.txt b/tests/output/default/neuron_manage/remove_hot_key_and_dissolve.txt index a86b2aea..91426e3f 100644 --- a/tests/output/default/neuron_manage/remove_hot_key_and_dissolve.txt +++ b/tests/output/default/neuron_manage/remove_hot_key_and_dissolve.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { @@ -16,7 +16,9 @@ Sending message with }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) Sending message with @@ -27,13 +29,15 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { StartDissolving = record {} }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) Sending message with @@ -44,7 +48,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { @@ -54,6 +58,8 @@ Sending message with }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/spawn.txt b/tests/output/default/neuron_manage/spawn.txt index 4f7bd884..af4cae52 100644 --- a/tests/output/default/neuron_manage/spawn.txt +++ b/tests/output/default/neuron_manage/spawn.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Spawn = record { percentage_to_spawn = null; @@ -14,6 +14,8 @@ Sending message with nonce = null; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/split.txt b/tests/output/default/neuron_manage/split.txt index 0bde66b3..33642691 100644 --- a/tests/output/default/neuron_manage/split.txt +++ b/tests/output/default/neuron_manage/split.txt @@ -6,10 +6,12 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Split = record { amount_e8s = 10_000_000_000 : nat64 } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/stake_maturity.txt b/tests/output/default/neuron_manage/stake_maturity.txt index 64135532..2177091a 100644 --- a/tests/output/default/neuron_manage/stake_maturity.txt +++ b/tests/output/default/neuron_manage/stake_maturity.txt @@ -6,10 +6,12 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { StakeMaturity = record { percentage_to_stake = opt (100 : nat32) } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/start_dissolving.txt b/tests/output/default/neuron_manage/start_dissolving.txt index 4e5cee0a..b48f4712 100644 --- a/tests/output/default/neuron_manage/start_dissolving.txt +++ b/tests/output/default/neuron_manage/start_dissolving.txt @@ -6,12 +6,14 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { StartDissolving = record {} }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/stop_dissolving.txt b/tests/output/default/neuron_manage/stop_dissolving.txt index fa1c20b1..23c4c724 100644 --- a/tests/output/default/neuron_manage/stop_dissolving.txt +++ b/tests/output/default/neuron_manage/stop_dissolving.txt @@ -6,12 +6,14 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { StopDissolving = record {} }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_manage/vote.txt b/tests/output/default/neuron_manage/vote.txt index acdf6845..d607c095 100644 --- a/tests/output/default/neuron_manage/vote.txt +++ b/tests/output/default/neuron_manage/vote.txt @@ -6,14 +6,16 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { RegisterVote = record { vote = 1 : int32; proposal = opt record { id = 123 : nat64 }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) Sending message with @@ -24,13 +26,15 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { RegisterVote = record { vote = 1 : int32; proposal = opt record { id = 456 : nat64 }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/default/neuron_stake/stake_only.txt b/tests/output/default/neuron_stake/stake_only.txt index 77ed1870..c8ef08ca 100644 --- a/tests/output/default/neuron_stake/stake_only.txt +++ b/tests/output/default/neuron_stake/stake_only.txt @@ -1,12 +1,22 @@ Sending message with Call type: update - Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae + Sender: 2vxsx-fae Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai - Method name: claim_or_refresh_neuron_from_account + Method name: manage_neuron Arguments: ( record { - controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; - memo = 7_888_422_419_985_231_726 : nat64; + id = null; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; + memo = 7_888_422_419_985_231_726 : nat64; + } + }; + } + }; + neuron_id_or_subaccount = null; }, ) diff --git a/tests/output/default/neuron_stake/with_name.txt b/tests/output/default/neuron_stake/with_name.txt index eac5c4af..5a172557 100644 --- a/tests/output/default/neuron_stake/with_name.txt +++ b/tests/output/default/neuron_stake/with_name.txt @@ -3,10 +3,10 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: transfer Arguments: ( record { - to = "9bc4e24ff90c6898938d5fb339e779cea4edad4de592e591b22429289851b563"; + to = blob "\9b\c4\e2\4f\f9\0c\68\98\93\8d\5f\b3\39\e7\79\ce\a4\ed\ad\4d\e5\92\e5\91\b2\24\29\28\98\51\b5\63"; fee = record { e8s = 10_000 : nat64 }; memo = 7_888_422_419_985_231_726 : nat64; from_subaccount = null; @@ -19,12 +19,22 @@ Sending message with Sending message with Call type: update - Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae + Sender: 2vxsx-fae Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai - Method name: claim_or_refresh_neuron_from_account + Method name: manage_neuron Arguments: ( record { - controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; - memo = 7_888_422_419_985_231_726 : nat64; + id = null; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; + memo = 7_888_422_419_985_231_726 : nat64; + } + }; + } + }; + neuron_id_or_subaccount = null; }, ) diff --git a/tests/output/default/neuron_stake/with_nonce.txt b/tests/output/default/neuron_stake/with_nonce.txt index 4abc5649..9dc8729e 100644 --- a/tests/output/default/neuron_stake/with_nonce.txt +++ b/tests/output/default/neuron_stake/with_nonce.txt @@ -3,10 +3,10 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: transfer Arguments: ( record { - to = "a0ea9002c2bc3d442050f4431f3732c91dbec13eff79f414b15255d60c4a324c"; + to = blob "\a0\ea\90\02\c2\bc\3d\44\20\50\f4\43\1f\37\32\c9\1d\be\c1\3e\ff\79\f4\14\b1\52\55\d6\0c\4a\32\4c"; fee = record { e8s = 10_000 : nat64 }; memo = 777 : nat64; from_subaccount = opt blob "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01"; @@ -19,12 +19,22 @@ Sending message with Sending message with Call type: update - Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae + Sender: 2vxsx-fae Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai - Method name: claim_or_refresh_neuron_from_account + Method name: manage_neuron Arguments: ( record { - controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; - memo = 777 : nat64; + id = null; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; + memo = 777 : nat64; + } + }; + } + }; + neuron_id_or_subaccount = null; }, ) diff --git a/tests/output/default/sns/swap/pay.txt b/tests/output/default/sns/swap/pay.txt index e6cfa9af..ba6bb586 100644 --- a/tests/output/default/sns/swap/pay.txt +++ b/tests/output/default/sns/swap/pay.txt @@ -3,10 +3,10 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: transfer Arguments: ( record { - to = "bff3218e708b09187a586a1f397edf081964e560a5a0f6435fac044c7f4a25e9"; + to = blob "\bf\f3\21\8e\70\8b\09\18\7a\58\6a\1f\39\7e\df\08\19\64\e5\60\a5\a0\f6\43\5f\ac\04\4c\7f\4a\25\e9"; fee = record { e8s = 10_000 : nat64 }; memo = 100 : nat64; from_subaccount = opt blob "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\e0\00\d8\01\01"; diff --git a/tests/output/default/sns/swap/pay_with_confirmation_text.txt b/tests/output/default/sns/swap/pay_with_confirmation_text.txt index 818b752f..3eccdf86 100644 --- a/tests/output/default/sns/swap/pay_with_confirmation_text.txt +++ b/tests/output/default/sns/swap/pay_with_confirmation_text.txt @@ -3,10 +3,10 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: transfer Arguments: ( record { - to = "bff3218e708b09187a586a1f397edf081964e560a5a0f6435fac044c7f4a25e9"; + to = blob "\bf\f3\21\8e\70\8b\09\18\7a\58\6a\1f\39\7e\df\08\19\64\e5\60\a5\a0\f6\43\5f\ac\04\4c\7f\4a\25\e9"; fee = record { e8s = 10_000 : nat64 }; memo = 100 : nat64; from_subaccount = null; diff --git a/tests/output/default/transfer/e8s-2.txt b/tests/output/default/transfer/e8s-2.txt index bbad9989..db95ff3f 100644 --- a/tests/output/default/transfer/e8s-2.txt +++ b/tests/output/default/transfer/e8s-2.txt @@ -3,10 +3,10 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: transfer Arguments: ( record { - to = "345f723e9e619934daac6ae0f4be13a7b0ba57d6a608e511a00fd0ded5866752"; + to = blob "\34\5f\72\3e\9e\61\99\34\da\ac\6a\e0\f4\be\13\a7\b0\ba\57\d6\a6\08\e5\11\a0\0f\d0\de\d5\86\67\52"; fee = record { e8s = 10_000 : nat64 }; memo = 0 : nat64; from_subaccount = opt blob "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01"; diff --git a/tests/output/default/transfer/e8s.txt b/tests/output/default/transfer/e8s.txt index 8408f6ad..92a69023 100644 --- a/tests/output/default/transfer/e8s.txt +++ b/tests/output/default/transfer/e8s.txt @@ -3,10 +3,10 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: transfer Arguments: ( record { - to = "345f723e9e619934daac6ae0f4be13a7b0ba57d6a608e511a00fd0ded5866752"; + to = blob "\34\5f\72\3e\9e\61\99\34\da\ac\6a\e0\f4\be\13\a7\b0\ba\57\d6\a6\08\e5\11\a0\0f\d0\de\d5\86\67\52"; fee = record { e8s = 10_000 : nat64 }; memo = 0 : nat64; from_subaccount = null; diff --git a/tests/output/default/transfer/icp-and-e8s.txt b/tests/output/default/transfer/icp-and-e8s.txt index 945fc73d..1688e3c6 100644 --- a/tests/output/default/transfer/icp-and-e8s.txt +++ b/tests/output/default/transfer/icp-and-e8s.txt @@ -3,10 +3,10 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: transfer Arguments: ( record { - to = "345f723e9e619934daac6ae0f4be13a7b0ba57d6a608e511a00fd0ded5866752"; + to = blob "\34\5f\72\3e\9e\61\99\34\da\ac\6a\e0\f4\be\13\a7\b0\ba\57\d6\a6\08\e5\11\a0\0f\d0\de\d5\86\67\52"; fee = record { e8s = 10_000 : nat64 }; memo = 0 : nat64; from_subaccount = null; diff --git a/tests/output/default/transfer/simple.txt b/tests/output/default/transfer/simple.txt index 2fd5671b..c2c9349c 100644 --- a/tests/output/default/transfer/simple.txt +++ b/tests/output/default/transfer/simple.txt @@ -3,10 +3,10 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: transfer Arguments: ( record { - to = "345f723e9e619934daac6ae0f4be13a7b0ba57d6a608e511a00fd0ded5866752"; + to = blob "\34\5f\72\3e\9e\61\99\34\da\ac\6a\e0\f4\be\13\a7\b0\ba\57\d6\a6\08\e5\11\a0\0f\d0\de\d5\86\67\52"; fee = record { e8s = 10_000 : nat64 }; memo = 0 : nat64; from_subaccount = null; diff --git a/tests/output/default/transfer/with-fees-and-memo.txt b/tests/output/default/transfer/with-fees-and-memo.txt index 6e3826e4..34b4c98c 100644 --- a/tests/output/default/transfer/with-fees-and-memo.txt +++ b/tests/output/default/transfer/with-fees-and-memo.txt @@ -3,10 +3,10 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: transfer Arguments: ( record { - to = "345f723e9e619934daac6ae0f4be13a7b0ba57d6a608e511a00fd0ded5866752"; + to = blob "\34\5f\72\3e\9e\61\99\34\da\ac\6a\e0\f4\be\13\a7\b0\ba\57\d6\a6\08\e5\11\a0\0f\d0\de\d5\86\67\52"; fee = record { e8s = 230_000 : nat64 }; memo = 777 : nat64; from_subaccount = null; diff --git a/tests/output/default/transfer/with-fees.txt b/tests/output/default/transfer/with-fees.txt index 3af196d2..57b9fdc0 100644 --- a/tests/output/default/transfer/with-fees.txt +++ b/tests/output/default/transfer/with-fees.txt @@ -3,10 +3,10 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: transfer Arguments: ( record { - to = "345f723e9e619934daac6ae0f4be13a7b0ba57d6a608e511a00fd0ded5866752"; + to = blob "\34\5f\72\3e\9e\61\99\34\da\ac\6a\e0\f4\be\13\a7\b0\ba\57\d6\a6\08\e5\11\a0\0f\d0\de\d5\86\67\52"; fee = record { e8s = 230_000 : nat64 }; memo = 0 : nat64; from_subaccount = null; diff --git a/tests/output/ledger/account_balance/authed.txt b/tests/output/ledger/account_balance/authed.txt index cc544adc..7bd5f4f6 100644 --- a/tests/output/ledger/account_balance/authed.txt +++ b/tests/output/ledger/account_balance/authed.txt @@ -3,9 +3,10 @@ Sending message with Call type: update Sender: 2vxsx-fae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: account_balance_dfx + Method name: icrc1_balance_of Arguments: ( record { - account = "4f3d4b40cdb852732601fccf8bd24dffe44957a647cb867913e982d98cf85676"; + owner = principal "5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe"; + subaccount = null; }, ) diff --git a/tests/output/ledger/account_balance/simple.txt b/tests/output/ledger/account_balance/simple.txt index f733e141..e15d5f86 100644 --- a/tests/output/ledger/account_balance/simple.txt +++ b/tests/output/ledger/account_balance/simple.txt @@ -3,9 +3,9 @@ Sending message with Call type: update Sender: 2vxsx-fae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: account_balance_dfx + Method name: account_balance Arguments: ( record { - account = "ec0e2456fb9ff6c80f1d475b301d9b2ab873612f96e7fd74e7c0c0b2d58e6693"; + account = blob "\ec\0e\24\56\fb\9f\f6\c8\0f\1d\47\5b\30\1d\9b\2a\b8\73\61\2f\96\e7\fd\74\e7\c0\c0\b2\d5\8e\66\93"; }, ) diff --git a/tests/output/ledger/neuron_manage/additional_dissolve_delay_seconds.txt b/tests/output/ledger/neuron_manage/additional_dissolve_delay_seconds.txt index 71148b7f..b2b17a08 100644 --- a/tests/output/ledger/neuron_manage/additional_dissolve_delay_seconds.txt +++ b/tests/output/ledger/neuron_manage/additional_dissolve_delay_seconds.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { @@ -16,6 +16,8 @@ Sending message with }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/ledger/neuron_manage/auto_stake_disable.txt b/tests/output/ledger/neuron_manage/auto_stake_disable.txt index 48ebfc2c..359507ce 100644 --- a/tests/output/ledger/neuron_manage/auto_stake_disable.txt +++ b/tests/output/ledger/neuron_manage/auto_stake_disable.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { @@ -16,6 +16,8 @@ Sending message with }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/ledger/neuron_manage/auto_stake_enable.txt b/tests/output/ledger/neuron_manage/auto_stake_enable.txt index 4b00d62b..1ac161ca 100644 --- a/tests/output/ledger/neuron_manage/auto_stake_enable.txt +++ b/tests/output/ledger/neuron_manage/auto_stake_enable.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { @@ -16,6 +16,8 @@ Sending message with }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/ledger/neuron_manage/merge.txt b/tests/output/ledger/neuron_manage/merge.txt index a9c0f698..b44de276 100644 --- a/tests/output/ledger/neuron_manage/merge.txt +++ b/tests/output/ledger/neuron_manage/merge.txt @@ -6,12 +6,14 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Merge = record { source_neuron_id = opt record { id = 380_519_530_470_538 : nat64 }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/ledger/neuron_manage/spawn.txt b/tests/output/ledger/neuron_manage/spawn.txt index 06111d66..858e7eac 100644 --- a/tests/output/ledger/neuron_manage/spawn.txt +++ b/tests/output/ledger/neuron_manage/spawn.txt @@ -6,7 +6,7 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Spawn = record { percentage_to_spawn = null; @@ -14,6 +14,8 @@ Sending message with nonce = null; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/ledger/neuron_manage/split.txt b/tests/output/ledger/neuron_manage/split.txt index ee235423..49a9390d 100644 --- a/tests/output/ledger/neuron_manage/split.txt +++ b/tests/output/ledger/neuron_manage/split.txt @@ -6,10 +6,12 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Split = record { amount_e8s = 10_000_000_000 : nat64 } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/ledger/neuron_manage/stake_maturity.txt b/tests/output/ledger/neuron_manage/stake_maturity.txt index 50a3ea41..8f3e2e3a 100644 --- a/tests/output/ledger/neuron_manage/stake_maturity.txt +++ b/tests/output/ledger/neuron_manage/stake_maturity.txt @@ -6,10 +6,12 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { StakeMaturity = record { percentage_to_stake = opt (100 : nat32) } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/ledger/neuron_manage/start_dissolving.txt b/tests/output/ledger/neuron_manage/start_dissolving.txt index 665c3ccf..e15f0480 100644 --- a/tests/output/ledger/neuron_manage/start_dissolving.txt +++ b/tests/output/ledger/neuron_manage/start_dissolving.txt @@ -6,12 +6,14 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { StartDissolving = record {} }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, ) diff --git a/tests/output/ledger/neuron_manage/stop_dissolving.txt b/tests/output/ledger/neuron_manage/stop_dissolving.txt index d7e405ff..78b8f6be 100644 --- a/tests/output/ledger/neuron_manage/stop_dissolving.txt +++ b/tests/output/ledger/neuron_manage/stop_dissolving.txt @@ -6,12 +6,14 @@ Sending message with Method name: manage_neuron Arguments: ( record { - id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + id = null; command = opt variant { Configure = record { operation = opt variant { StopDissolving = record {} }; } }; - neuron_id_or_subaccount = null; + neuron_id_or_subaccount = opt variant { + NeuronId = record { id = 2_313_380_519_530_470_538 : nat64 } + }; }, )