diff --git a/crates/iota-json-rpc-types/src/iota_transaction.rs b/crates/iota-json-rpc-types/src/iota_transaction.rs index 9a40e65bcb4..ad81534ecd3 100644 --- a/crates/iota-json-rpc-types/src/iota_transaction.rs +++ b/crates/iota-json-rpc-types/src/iota_transaction.rs @@ -13,7 +13,7 @@ use iota_types::{ base_types::{EpochId, IotaAddress, ObjectID, ObjectRef, SequenceNumber, TransactionDigest}, crypto::IotaSignature, digests::{ConsensusCommitDigest, ObjectDigest, TransactionEventsDigest}, - effects::{TransactionEffects, TransactionEffectsAPI, TransactionEvents}, + effects::{self, TransactionEffects, TransactionEffectsAPI, TransactionEvents}, error::{ExecutionError, IotaError, IotaResult}, execution_status::ExecutionStatus, gas::GasCostSummary, @@ -198,6 +198,40 @@ impl IotaTransactionBlockResponseOptions { pub fn only_digest(&self) -> bool { self == &Self::default() } + + pub fn default_profile() -> Self { + Self { + show_input: true, + show_effects: true, + show_events: true, + show_object_changes: true, + show_balance_changes: true, + show_raw_effects: true, + show_raw_input: false, + } + } + + pub fn from_cli(opts: Vec) -> Self { + // if no options are provided, return the default profile + if opts.is_empty() { + return Self::default_profile(); + } + + // effects should be there by default + let mut options = IotaTransactionBlockResponseOptions::new().with_effects(); + + for opt in opts { + match opt.as_str() { + "input" => options.show_input = true, + "events" => options.show_events = true, + "object_changes" => options.show_object_changes = true, + "balance_changes" => options.show_balance_changes = true, + "effects" => options.show_raw_effects = true, + _ => {} + } + } + options + } } #[serde_as] diff --git a/crates/iota-json-rpc/src/transaction_execution_api.rs b/crates/iota-json-rpc/src/transaction_execution_api.rs index e83bd2e1269..72322cab52e 100644 --- a/crates/iota-json-rpc/src/transaction_execution_api.rs +++ b/crates/iota-json-rpc/src/transaction_execution_api.rs @@ -205,7 +205,7 @@ impl TransactionExecutionApi { digest, transaction, raw_transaction, - effects: opts.show_effects.then_some(effects.effects.try_into()?), + effects: Some(effects.effects.try_into()?), events, object_changes, balance_changes, diff --git a/crates/iota-sdk/src/wallet_context.rs b/crates/iota-sdk/src/wallet_context.rs index 35eb62ed9f9..0639f509c86 100644 --- a/crates/iota-sdk/src/wallet_context.rs +++ b/crates/iota-sdk/src/wallet_context.rs @@ -299,9 +299,13 @@ impl WalletContext { pub async fn execute_transaction_must_succeed( &self, tx: Transaction, + response_opts: IotaTransactionBlockResponseOptions, ) -> IotaTransactionBlockResponse { tracing::debug!("Executing transaction: {:?}", tx); - let response = self.execute_transaction_may_fail(tx).await.unwrap(); + let response = self + .execute_transaction_may_fail(tx, response_opts) + .await + .unwrap(); assert!( response.status_ok().unwrap(), "Transaction failed: {:?}", @@ -317,18 +321,14 @@ impl WalletContext { pub async fn execute_transaction_may_fail( &self, tx: Transaction, + response_opts: IotaTransactionBlockResponseOptions, ) -> anyhow::Result { let client = self.get_client().await?; Ok(client .quorum_driver_api() .execute_transaction_block( tx, - IotaTransactionBlockResponseOptions::new() - .with_effects() - .with_input() - .with_events() - .with_object_changes() - .with_balance_changes(), + response_opts, Some(iota_types::quorum_driver_types::ExecuteTransactionRequestType::WaitForLocalExecution), ) .await?) diff --git a/crates/iota-surfer/src/surfer_state.rs b/crates/iota-surfer/src/surfer_state.rs index f41ebb6aec7..faabbc01b7a 100644 --- a/crates/iota-surfer/src/surfer_state.rs +++ b/crates/iota-surfer/src/surfer_state.rs @@ -10,7 +10,10 @@ use std::{ }; use indexmap::IndexSet; -use iota_json_rpc_types::{IotaTransactionBlockEffects, IotaTransactionBlockEffectsAPI}; +use iota_json_rpc_types::{ + IotaTransactionBlockEffects, IotaTransactionBlockEffectsAPI, + IotaTransactionBlockResponseOptions, +}; use iota_move_build::BuildConfig; use iota_protocol_config::ProtocolConfig; use iota_types::{ @@ -174,7 +177,10 @@ impl SurferState { match self .cluster .wallet - .execute_transaction_may_fail(tx.clone()) + .execute_transaction_may_fail( + tx.clone(), + IotaTransactionBlockResponseOptions::default_profile(), + ) .await { Ok(effects) => break effects, @@ -333,7 +339,10 @@ impl SurferState { match self .cluster .wallet - .execute_transaction_may_fail(tx.clone()) + .execute_transaction_may_fail( + tx.clone(), + IotaTransactionBlockResponseOptions::default_profile(), + ) .await { Ok(response) => { diff --git a/crates/iota-test-transaction-builder/src/lib.rs b/crates/iota-test-transaction-builder/src/lib.rs index 45efb327b8a..dab31fafed8 100644 --- a/crates/iota-test-transaction-builder/src/lib.rs +++ b/crates/iota-test-transaction-builder/src/lib.rs @@ -9,7 +9,7 @@ use iota_move_build::{BuildConfig, CompiledPackage}; use iota_sdk::{ rpc_types::{ get_new_package_obj_from_response, IotaTransactionBlockEffectsAPI, - IotaTransactionBlockResponse, + IotaTransactionBlockResponse, IotaTransactionBlockResponseOptions, }, wallet_context::WalletContext, }; @@ -528,7 +528,12 @@ pub async fn publish_package(context: &WalletContext, path: PathBuf) -> ObjectRe .publish(path) .build(), ); - let resp = context.execute_transaction_must_succeed(txn).await; + let resp = context + .execute_transaction_must_succeed( + txn, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await; get_new_package_obj_from_response(&resp).unwrap() } @@ -542,7 +547,12 @@ pub async fn publish_basics_package(context: &WalletContext) -> ObjectRef { .publish_examples("basics") .build(), ); - let resp = context.execute_transaction_must_succeed(txn).await; + let resp = context + .execute_transaction_must_succeed( + txn, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await; get_new_package_obj_from_response(&resp).unwrap() } @@ -560,7 +570,10 @@ pub async fn publish_basics_package_and_make_counter( .build(), ); let resp = context - .execute_transaction_must_succeed(counter_creation_txn) + .execute_transaction_must_succeed( + counter_creation_txn, + IotaTransactionBlockResponseOptions::default_profile(), + ) .await; let counter_ref = resp .effects @@ -599,7 +612,12 @@ pub async fn increment_counter( .call_counter_increment(package_id, counter_id, initial_shared_version) .build(), ); - context.execute_transaction_must_succeed(txn).await + context + .execute_transaction_must_succeed( + txn, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await } /// Executes a transaction to publish the `nfts` package and returns the package @@ -615,7 +633,12 @@ pub async fn publish_nfts_package( .publish_examples("nfts") .build(), ); - let resp = context.execute_transaction_must_succeed(txn).await; + let resp = context + .execute_transaction_must_succeed( + txn, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await; let package_id = get_new_package_obj_from_response(&resp).unwrap().0; (package_id, gas_id, resp.digest) } @@ -635,7 +658,12 @@ pub async fn create_devnet_nft( .call_nft_create(package_id) .build(), ); - let resp = context.execute_transaction_must_succeed(txn).await; + let resp = context + .execute_transaction_must_succeed( + txn, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await; let object_id = resp .effects @@ -668,5 +696,10 @@ pub async fn delete_devnet_nft( .call_nft_delete(package_id, nft_to_delete) .build(), ); - context.execute_transaction_must_succeed(txn).await + context + .execute_transaction_must_succeed( + txn, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await } diff --git a/crates/iota/src/client_commands.rs b/crates/iota/src/client_commands.rs index 0a461867f68..e8fbf65a715 100644 --- a/crates/iota/src/client_commands.rs +++ b/crates/iota/src/client_commands.rs @@ -85,7 +85,7 @@ mod profiler_tests; #[macro_export] macro_rules! serialize_or_execute { - ($tx_data:expr, $serialize_unsigned:expr, $serialize_signed:expr, $context:expr, $result_variant:ident) => {{ + ($tx_data:expr, $serialize_unsigned:expr, $serialize_signed:expr, $context:expr, $result_variant:ident, $opts:expr) => {{ assert!( !$serialize_unsigned || !$serialize_signed, "Cannot specify both --serialize-unsigned-transaction and --serialize-signed-transaction" @@ -107,7 +107,7 @@ macro_rules! serialize_or_execute { IotaClientCommandResult::SerializedSignedTransaction(sender_signed_data) } else { let transaction = Transaction::new(sender_signed_data); - let response = $context.execute_transaction_may_fail(transaction).await?; + let response = $context.execute_transaction_may_fail(transaction, $opts).await?; let effects = response.effects.as_ref().ok_or_else(|| { anyhow!("Effects from IotaTransactionBlockResult should not be empty") })?; @@ -178,7 +178,6 @@ pub enum IotaClientCommands { #[clap(long, num_args(1..))] args: Vec, /// ID of the gas object for gas payment, in 20 bytes Hex string - #[clap(long)] /// If not provided, a gas object with at least gas_budget value will be /// selected #[clap(long)] @@ -208,6 +207,13 @@ pub enum IotaClientCommands { /// `. #[clap(long, required = false)] serialize_signed_transaction: bool, + + /// Select which fields of the response to display. + /// If not provided, all fields are displayed. + /// The fields are: effects, input, events, object_changes, + /// balance_changes. + #[clap(long, required = false, value_delimiter = ',', num_args = 0.., value_parser = parse_emit_opts)] + emit: Vec, }, /// Query the chain identifier from the rpc endpoint. @@ -863,6 +869,16 @@ pub enum IotaClientCommands { }, } +/// Custom parser for emit options. +fn parse_emit_opts(s: &str) -> Result { + // Validate the input if necessary + // For instance, if you want to restrict to specific fields, add checks here. + match s { + "effects" | "input" | "events" | "object_changes" | "balance_changes" => Ok(s.to_string()), + _ => Err(format!("Invalid option: {}", s)), // Return an error if invalid + } +} + #[derive(serde::Deserialize)] struct FaucetResponse { error: Option, @@ -1099,7 +1115,8 @@ impl IotaClientCommands { serialize_unsigned_transaction, serialize_signed_transaction, context, - Upgrade + Upgrade, + IotaTransactionBlockResponseOptions::default_profile() ) } IotaClientCommands::Publish { @@ -1155,7 +1172,8 @@ impl IotaClientCommands { serialize_unsigned_transaction, serialize_signed_transaction, context, - Publish + Publish, + IotaTransactionBlockResponseOptions::default_profile() ) } @@ -1266,6 +1284,7 @@ impl IotaClientCommands { args, serialize_unsigned_transaction, serialize_signed_transaction, + emit, } => { let tx_data = construct_move_call_transaction( package, &module, &function, type_args, gas, gas_budget, gas_price, args, @@ -1277,7 +1296,8 @@ impl IotaClientCommands { serialize_unsigned_transaction, serialize_signed_transaction, context, - Call + Call, + IotaTransactionBlockResponseOptions::from_cli(emit) ) } @@ -1301,7 +1321,8 @@ impl IotaClientCommands { serialize_unsigned_transaction, serialize_signed_transaction, context, - Transfer + Transfer, + IotaTransactionBlockResponseOptions::default_profile() ) } @@ -1325,7 +1346,8 @@ impl IotaClientCommands { serialize_unsigned_transaction, serialize_signed_transaction, context, - TransferIota + TransferIota, + IotaTransactionBlockResponseOptions::default_profile() ) } @@ -1370,7 +1392,8 @@ impl IotaClientCommands { serialize_unsigned_transaction, serialize_signed_transaction, context, - Pay + Pay, + IotaTransactionBlockResponseOptions::default_profile() ) } @@ -1414,7 +1437,8 @@ impl IotaClientCommands { serialize_unsigned_transaction, serialize_signed_transaction, context, - PayIota + PayIota, + IotaTransactionBlockResponseOptions::default_profile() ) } @@ -1442,7 +1466,8 @@ impl IotaClientCommands { serialize_unsigned_transaction, serialize_signed_transaction, context, - PayAllIota + PayAllIota, + IotaTransactionBlockResponseOptions::default_profile() ) } @@ -1582,7 +1607,8 @@ impl IotaClientCommands { serialize_unsigned_transaction, serialize_signed_transaction, context, - SplitCoin + SplitCoin, + IotaTransactionBlockResponseOptions::default_profile() ) } IotaClientCommands::MergeCoin { @@ -1604,7 +1630,8 @@ impl IotaClientCommands { serialize_unsigned_transaction, serialize_signed_transaction, context, - MergeCoin + MergeCoin, + IotaTransactionBlockResponseOptions::default_profile() ) } IotaClientCommands::Switch { address, env } => { @@ -1660,7 +1687,12 @@ impl IotaClientCommands { } let transaction = Transaction::from_generic_sig_data(data, sigs); - let response = context.execute_transaction_may_fail(transaction).await?; + let response = context + .execute_transaction_may_fail( + transaction, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await?; IotaClientCommandResult::ExecuteSignedTx(response) } IotaClientCommands::ExecuteCombinedSignedTx { signed_tx_bytes } => { @@ -1671,7 +1703,12 @@ impl IotaClientCommands { .map_err(|_| anyhow!("Invalid Base64 encoding"))? ).map_err(|_| anyhow!("Failed to parse SenderSignedData bytes, check if it matches the output of iota client commands with --serialize-signed-transaction"))?; let transaction = Envelope::::new(data); - let response = context.execute_transaction_may_fail(transaction).await?; + let response = context + .execute_transaction_may_fail( + transaction, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await?; IotaClientCommandResult::ExecuteSignedTx(response) } IotaClientCommands::NewEnv { alias, rpc, ws } => { diff --git a/crates/iota/src/client_ptb/ptb.rs b/crates/iota/src/client_ptb/ptb.rs index f039a5e6b54..f2d8986e092 100644 --- a/crates/iota/src/client_ptb/ptb.rs +++ b/crates/iota/src/client_ptb/ptb.rs @@ -168,12 +168,28 @@ impl PTB { ); if program_metadata.serialize_unsigned_set { - serialize_or_execute!(tx_data, true, false, context, PTB).print(true); + serialize_or_execute!( + tx_data, + true, + false, + context, + PTB, + IotaTransactionBlockResponseOptions::default_profile() + ) + .print(true); return Ok(()); } if program_metadata.serialize_signed_set { - serialize_or_execute!(tx_data, false, true, context, PTB).print(true); + serialize_or_execute!( + tx_data, + false, + true, + context, + PTB, + IotaTransactionBlockResponseOptions::default_profile() + ) + .print(true); return Ok(()); } diff --git a/crates/iota/src/unit_tests/validator_tests.rs b/crates/iota/src/unit_tests/validator_tests.rs index dc0ac36a9dd..e079cfefe5c 100644 --- a/crates/iota/src/unit_tests/validator_tests.rs +++ b/crates/iota/src/unit_tests/validator_tests.rs @@ -4,6 +4,7 @@ use anyhow::Ok; use fastcrypto::encoding::{Base64, Encoding}; +use iota_json_rpc_types::IotaTransactionBlockResponseOptions; use iota_types::{ base_types::IotaAddress, crypto::{IotaKeyPair, Signature}, @@ -60,7 +61,12 @@ async fn test_print_raw_rgp_txn() -> Result<(), anyhow::Error> { keypair, ); let txn = Transaction::from_data(data, vec![signature]); - context.execute_transaction_must_succeed(txn).await; + context + .execute_transaction_must_succeed( + txn, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await; let (_, summary) = get_validator_summary(&iota_client, validator_address) .await? .unwrap(); diff --git a/crates/iota/tests/cli_tests.rs b/crates/iota/tests/cli_tests.rs index c24ab755557..58ea7b3914d 100644 --- a/crates/iota/tests/cli_tests.rs +++ b/crates/iota/tests/cli_tests.rs @@ -313,6 +313,7 @@ async fn test_ptb_publish_and_complex_arg_resolution() -> Result<(), anyhow::Err args: vec![], serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -660,6 +661,7 @@ async fn test_move_call_args_linter_command() -> Result<(), anyhow::Error> { gas_price: None, serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -700,6 +702,7 @@ async fn test_move_call_args_linter_command() -> Result<(), anyhow::Error> { gas_price: None, serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await; @@ -727,6 +730,7 @@ async fn test_move_call_args_linter_command() -> Result<(), anyhow::Error> { gas_price: None, serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await; @@ -751,6 +755,7 @@ async fn test_move_call_args_linter_command() -> Result<(), anyhow::Error> { gas_price: Some(1), serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await; @@ -784,6 +789,7 @@ async fn test_move_call_args_linter_command() -> Result<(), anyhow::Error> { gas_price: None, serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -805,6 +811,7 @@ async fn test_move_call_args_linter_command() -> Result<(), anyhow::Error> { gas_price: Some(12345), serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -962,6 +969,7 @@ async fn test_delete_shared_object() -> Result<(), anyhow::Error> { args: vec![], serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -985,6 +993,7 @@ async fn test_delete_shared_object() -> Result<(), anyhow::Error> { args: vec![IotaJsonValue::from_str(&shared_id.to_string()).unwrap()], serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -1071,6 +1080,7 @@ async fn test_receive_argument() -> Result<(), anyhow::Error> { args: vec![], serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -1113,6 +1123,7 @@ async fn test_receive_argument() -> Result<(), anyhow::Error> { ], serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -1199,6 +1210,7 @@ async fn test_receive_argument_by_immut_ref() -> Result<(), anyhow::Error> { args: vec![], serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -1241,6 +1253,7 @@ async fn test_receive_argument_by_immut_ref() -> Result<(), anyhow::Error> { ], serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -1327,6 +1340,7 @@ async fn test_receive_argument_by_mut_ref() -> Result<(), anyhow::Error> { args: vec![], serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; @@ -1369,6 +1383,7 @@ async fn test_receive_argument_by_mut_ref() -> Result<(), anyhow::Error> { ], serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: Vec::new(), } .execute(context) .await?; diff --git a/crates/iota/tests/data/simple_coin/Move.toml b/crates/iota/tests/data/simple_coin/Move.toml new file mode 100644 index 00000000000..2a5bb3a98af --- /dev/null +++ b/crates/iota/tests/data/simple_coin/Move.toml @@ -0,0 +1,37 @@ +[package] +name = "simple_coin" +edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move +# license = "" # e.g., "MIT", "GPL", "Apache 2.0" +# authors = ["..."] # e.g., ["Joe Smith (joesmith@noemail.com)", "John Snow (johnsnow@noemail.com)"] + +[dependencies] +Iota = { git = "https://github.com/iotaledger/iota.git", subdir = "crates/iota-framework/packages/iota-framework", rev = "framework/testnet" } + +# For remote import, use the `{ git = "...", subdir = "...", rev = "..." }`. +# Revision can be a branch, a tag, and a commit hash. +# MyRemotePackage = { git = "https://some.remote/host.git", subdir = "remote/path", rev = "main" } + +# For local dependencies use `local = path`. Path is relative to the package root +# Local = { local = "../path/to" } + +# To resolve a version conflict and force a specific version for dependency +# override use `override = true` +# Override = { local = "../conflicting/version", override = true } + +[addresses] +simple_coin = "0x0" + +# Named addresses will be accessible in Move as `@name`. They're also exported: +# for example, `std = "0x1"` is exported by the Standard Library. +# alice = "0xA11CE" + +[dev-dependencies] +# The dev-dependencies section allows overriding dependencies for `--test` and +# `--dev` modes. You can introduce test-only dependencies here. +# Local = { local = "../path/to/dev-build" } + +[dev-addresses] +# The dev-addresses section allows overwriting named addresses for the `--test` +# and `--dev` modes. +# alice = "0xB0B" + diff --git a/crates/iota/tests/data/simple_coin/sources/simple_coin.move b/crates/iota/tests/data/simple_coin/sources/simple_coin.move new file mode 100644 index 00000000000..a9146416a5f --- /dev/null +++ b/crates/iota/tests/data/simple_coin/sources/simple_coin.move @@ -0,0 +1,27 @@ +module simple_coin::mycoin { + use iota::coin::{Self, TreasuryCap}; + + /// The type identifier of coin. The coin will have a type + /// tag of kind: `Coin` + /// Make sure that the name of the type matches the module's name. + public struct MYCOIN has drop {} + + /// Module initializer is called once on module publish. A treasury + /// cap is sent to the publisher, who then controls minting and burning + fun init(witness: MYCOIN, ctx: &mut TxContext) { + let (treasury, metadata) = coin::create_currency(witness, 6, b"MYCOIN", b"", b"", option::none(), ctx); + transfer::public_freeze_object(metadata); + transfer::public_transfer(treasury, tx_context::sender(ctx)) + } + + + public fun mint( + treasury_cap: &mut TreasuryCap, + amount: u64, + recipient: address, + ctx: &mut TxContext, + ) { + let coin = coin::mint(treasury_cap, amount, ctx); + transfer::public_transfer(coin, recipient) + } +} \ No newline at end of file diff --git a/crates/test-cluster/src/lib.rs b/crates/test-cluster/src/lib.rs index 10905559749..25afe0fb541 100644 --- a/crates/test-cluster/src/lib.rs +++ b/crates/test-cluster/src/lib.rs @@ -21,7 +21,8 @@ use iota_core::{ authority_aggregator::AuthorityAggregator, authority_client::NetworkAuthorityClient, }; use iota_json_rpc_types::{ - IotaTransactionBlockEffectsAPI, IotaTransactionBlockResponse, TransactionFilter, + IotaTransactionBlockEffectsAPI, IotaTransactionBlockResponse, + IotaTransactionBlockResponseOptions, TransactionFilter, }; use iota_keys::keystore::{AccountKeystore, FileBasedKeystore, Keystore}; use iota_node::IotaNodeHandle; @@ -562,7 +563,12 @@ impl TestCluster { /// ExecutionStatus::Success. This function is recommended for /// transaction execution since it most resembles the production path. pub async fn execute_transaction(&self, tx: Transaction) -> IotaTransactionBlockResponse { - self.wallet.execute_transaction_must_succeed(tx).await + self.wallet + .execute_transaction_must_succeed( + tx, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await } /// Different from `execute_transaction` which returns RPC effects types, @@ -582,7 +588,13 @@ impl TestCluster { let results = self .submit_transaction_to_validators(tx.clone(), &self.get_validator_pubkeys()) .await?; - self.wallet.execute_transaction_may_fail(tx).await.unwrap(); + self.wallet + .execute_transaction_may_fail( + tx, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await + .unwrap(); Ok(results) } @@ -677,7 +689,12 @@ impl TestCluster { .transfer_iota(amount, funding_address) .build(), ); - context.execute_transaction_must_succeed(tx).await; + context + .execute_transaction_must_succeed( + tx, + IotaTransactionBlockResponseOptions::default_profile(), + ) + .await; context .get_one_gas_object_owned_by_address(funding_address)