diff --git a/execution/executor-benchmark/src/lib.rs b/execution/executor-benchmark/src/lib.rs index 9e8d76edcc1e..d1bd8e9c503e 100644 --- a/execution/executor-benchmark/src/lib.rs +++ b/execution/executor-benchmark/src/lib.rs @@ -39,7 +39,6 @@ use storage_interface::{DbReader, DbReaderWriter}; use storage_service::start_storage_service_with_db; use transaction_builder::{ encode_create_testing_account_script, encode_peer_to_peer_with_metadata_script, - encode_testnet_mint_script, }; struct AccountData { @@ -151,7 +150,13 @@ impl TransactionGenerator { (i * block_size + j) as u64, &self.genesis_key, self.genesis_key.public_key(), - encode_testnet_mint_script(coin1_tag(), account.address, init_account_balance), + encode_peer_to_peer_with_metadata_script( + coin1_tag(), + account.address, + init_account_balance, + vec![], + vec![], + ), ); transactions.push(txn); } diff --git a/execution/executor-test-helpers/src/integration_test_impl.rs b/execution/executor-test-helpers/src/integration_test_impl.rs index 29915096df6a..b77d1cb82d43 100644 --- a/execution/executor-test-helpers/src/integration_test_impl.rs +++ b/execution/executor-test-helpers/src/integration_test_impl.rs @@ -31,7 +31,6 @@ use std::{convert::TryFrom, sync::Arc}; use storage_interface::{DbReaderWriter, Order}; use transaction_builder::{ encode_create_testing_account_script, encode_peer_to_peer_with_metadata_script, - encode_testnet_mint_script, }; pub fn test_execution_with_storage_impl() -> Arc { @@ -112,7 +111,13 @@ pub fn test_execution_with_storage_impl() -> Arc { /* sequence_number = */ 0, genesis_key.clone(), genesis_key.public_key(), - Some(encode_testnet_mint_script(coin1_tag(), account1, 2_000_000)), + Some(encode_peer_to_peer_with_metadata_script( + coin1_tag(), + account1, + 2_000_000, + vec![], + vec![], + )), ); // Create account2 with 1.2M coins. @@ -121,7 +126,13 @@ pub fn test_execution_with_storage_impl() -> Arc { /* sequence_number = */ 1, genesis_key.clone(), genesis_key.public_key(), - Some(encode_testnet_mint_script(coin1_tag(), account2, 1_200_000)), + Some(encode_peer_to_peer_with_metadata_script( + coin1_tag(), + account2, + 1_200_000, + vec![], + vec![], + )), ); // Create account3 with 1M coins. @@ -130,7 +141,13 @@ pub fn test_execution_with_storage_impl() -> Arc { /* sequence_number = */ 2, genesis_key.clone(), genesis_key.public_key(), - Some(encode_testnet_mint_script(coin1_tag(), account3, 1_000_000)), + Some(encode_peer_to_peer_with_metadata_script( + coin1_tag(), + account3, + 1_000_000, + vec![], + vec![], + )), ); // Transfer 20k coins from account1 to account2. diff --git a/execution/executor/tests/db_bootstrapper_test.rs b/execution/executor/tests/db_bootstrapper_test.rs index 687b9a22c871..03e205b80bc7 100644 --- a/execution/executor/tests/db_bootstrapper_test.rs +++ b/execution/executor/tests/db_bootstrapper_test.rs @@ -48,7 +48,6 @@ use std::{convert::TryFrom, sync::Arc}; use storage_interface::{DbReader, DbReaderWriter}; use transaction_builder::{ encode_create_testing_account_script, encode_peer_to_peer_with_metadata_script, - encode_testnet_mint_script, }; #[test] @@ -137,7 +136,13 @@ fn get_mint_transaction( /* sequence_number = */ libra_root_seq_num, libra_root_key.clone(), libra_root_key.public_key(), - Some(encode_testnet_mint_script(coin1_tag(), *account, amount)), + Some(encode_peer_to_peer_with_metadata_script( + coin1_tag(), + *account, + amount, + vec![], + vec![], + )), ) } diff --git a/language/e2e-tests/src/tests/transaction_builder.rs b/language/e2e-tests/src/tests/transaction_builder.rs index 6fcc5f65b77b..1d361e8ed029 100644 --- a/language/e2e-tests/src/tests/transaction_builder.rs +++ b/language/e2e-tests/src/tests/transaction_builder.rs @@ -196,10 +196,12 @@ fn create_child_vasp_all_currencies() { // mint to the parent VASP executor.execute_and_apply( dd.transaction() - .script(encode_testnet_mint_script( + .script(encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), *parent.address(), amount, + vec![], + vec![], )) .sequence_number(0) .sign(), @@ -276,10 +278,12 @@ fn create_child_vasp_with_balance() { // mint to the parent VASP executor.execute_and_apply( dd.transaction() - .script(encode_testnet_mint_script( + .script(encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), *parent.address(), amount, + vec![], + vec![], )) .sequence_number(0) .sign(), @@ -572,7 +576,6 @@ fn dual_attestation_payment() { .sequence_number(3) .sign(), ); - println!("{:?}", output); assert_aborted_with(output, MISMATCHED_METADATA_SIGNATURE_ERROR_CODE) } } @@ -585,11 +588,7 @@ fn create_dual_attestation_payment( ref_id: Vec, receiver_compliance_private_key: &Ed25519PrivateKey, ) -> Script { - // UTF8-encoded string "@@$$LIBRA_ATTEST$$@@" without length prefix - let mut domain_separator = vec![ - 0x40, 0x40, 0x24, 0x24, 0x4C, 0x49, 0x42, 0x52, 0x41, 0x5F, 0x41, 0x54, 0x54, 0x45, 0x53, - 0x54, 0x24, 0x24, 0x40, 0x40, - ]; + let mut domain_separator = b"@@$$LIBRA_ATTEST$$@@".to_vec(); let message = { let mut msg = ref_id.clone(); msg.append(&mut lcs::to_bytes(&sender_address).unwrap()); @@ -1110,10 +1109,12 @@ fn account_limits() { // mint money to both vasp A & B executor.execute_and_apply( dd.transaction() - .script(encode_testnet_mint_script( + .script(encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), *vasp_a.address(), 2 * mint_amount, + vec![], + vec![], )) .sequence_number(0) .ttl(ttl) @@ -1121,10 +1122,12 @@ fn account_limits() { ); executor.execute_and_apply( dd.transaction() - .script(encode_testnet_mint_script( + .script(encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), *vasp_b.address(), 2 * mint_amount, + vec![], + vec![], )) .sequence_number(1) .ttl(ttl) @@ -1266,10 +1269,12 @@ fn account_limits() { // DD deposit fails since vasp A is at inflow limit let output = executor.execute_transaction( dd.transaction() - .script(encode_testnet_mint_script( + .script(encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), *vasp_a_child.address(), 1, + vec![], + vec![], )) .sequence_number(2) .ttl(ttl) @@ -1285,10 +1290,12 @@ fn account_limits() { // DD deposit now succeeds since window is reset let output = executor.execute_transaction( dd.transaction() - .script(encode_testnet_mint_script( + .script(encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), *vasp_a_child.address(), 1, + vec![], + vec![], )) .sequence_number(2) .ttl(ttl) @@ -1564,10 +1571,12 @@ fn account_limits() { // DD deposit fails since vasp A is at holding limit let output = executor.execute_transaction( dd.transaction() - .script(encode_testnet_mint_script( + .script(encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), *vasp_a_child.address(), 1, + vec![], + vec![], )) .sequence_number(2) .ttl(ttl) @@ -1584,10 +1593,12 @@ fn account_limits() { // and because holdings are not reset from one window to the next. let output = executor.execute_transaction( dd.transaction() - .script(encode_testnet_mint_script( + .script(encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), *vasp_a_child.address(), 1, + vec![], + vec![], )) .sequence_number(2) .ttl(ttl) diff --git a/language/e2e-tests/src/tests/transaction_fees.rs b/language/e2e-tests/src/tests/transaction_fees.rs index 00d29a1859ec..c4783858ecd9 100644 --- a/language/e2e-tests/src/tests/transaction_fees.rs +++ b/language/e2e-tests/src/tests/transaction_fees.rs @@ -14,9 +14,7 @@ use move_core_types::{ language_storage::{StructTag, TypeTag}, }; use std::convert::TryFrom; -use transaction_builder::{ - encode_burn_txn_fees_script, encode_create_testing_account_script, encode_testnet_mint_script, -}; +use transaction_builder::*; #[test] fn burn_txn_fees() { @@ -41,10 +39,12 @@ fn burn_txn_fees() { executor.execute_and_apply( dd.transaction() - .script(encode_testnet_mint_script( + .script(encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), *sender.address(), 10_000_000, + vec![], + vec![], )) .sequence_number(0) .sign(), diff --git a/language/stdlib/compiled/src/transaction_scripts.rs b/language/stdlib/compiled/src/transaction_scripts.rs index b8a7842aa0d3..46502cd7bc9b 100644 --- a/language/stdlib/compiled/src/transaction_scripts.rs +++ b/language/stdlib/compiled/src/transaction_scripts.rs @@ -51,7 +51,6 @@ pub enum StdlibScript { UpdateAccountLimitWindowInfo, SetValidatorConfigAndReconfigure, SetValidatorOperator, - TestnetMint, TieredMint, UnfreezeAccount, UnmintLbr, @@ -99,7 +98,6 @@ impl StdlibScript { UpdateAccountLimitWindowInfo, SetValidatorConfigAndReconfigure, SetValidatorOperator, - TestnetMint, TieredMint, UnfreezeAccount, UnmintLbr, @@ -211,7 +209,6 @@ impl fmt::Display for StdlibScript { CreateValidatorAccount => "create_validator_account", CreateValidatorOperatorAccount => "create_validator_operator_account", FreezeAccount => "freeze_account", - TestnetMint => "testnet_mint", MintLbr => "mint_lbr", ModifyPublishingOption => "modify_publishing_option", PeerToPeerWithMetadata => "peer_to_peer_with_metadata", diff --git a/language/stdlib/compiled/transaction_scripts/abi/peer_to_peer_with_metadata.abi b/language/stdlib/compiled/transaction_scripts/abi/peer_to_peer_with_metadata.abi index 292c90a705fe..d0837d974132 100644 Binary files a/language/stdlib/compiled/transaction_scripts/abi/peer_to_peer_with_metadata.abi and b/language/stdlib/compiled/transaction_scripts/abi/peer_to_peer_with_metadata.abi differ diff --git a/language/stdlib/compiled/transaction_scripts/abi/testnet_mint.abi b/language/stdlib/compiled/transaction_scripts/abi/testnet_mint.abi deleted file mode 100644 index f8b39d8d9820..000000000000 Binary files a/language/stdlib/compiled/transaction_scripts/abi/testnet_mint.abi and /dev/null differ diff --git a/language/stdlib/compiled/transaction_scripts/testnet_mint.mv b/language/stdlib/compiled/transaction_scripts/testnet_mint.mv deleted file mode 100644 index 988a112293f0..000000000000 Binary files a/language/stdlib/compiled/transaction_scripts/testnet_mint.mv and /dev/null differ diff --git a/language/stdlib/transaction_scripts/doc/peer_to_peer_with_metadata.md b/language/stdlib/transaction_scripts/doc/peer_to_peer_with_metadata.md index 74116124eb8f..6b90c0989f5a 100644 --- a/language/stdlib/transaction_scripts/doc/peer_to_peer_with_metadata.md +++ b/language/stdlib/transaction_scripts/doc/peer_to_peer_with_metadata.md @@ -36,8 +36,9 @@ The amount >= DualAttestation::get_cur_microlibra_limit LBR and payer and -payee are distinct entities -(e.g., different VASPs, or a VASP and a DesignatedDealer). +payee are distinct VASPs. +However, a transaction sender can opt in to dual attestation even when it is not required (e.g., a DesignatedDealer -> VASP payment) by providing a non-empty +metadata_signature. Standardized metadata LCS format can be found in libra_types::transaction::metadata::Metadata. diff --git a/language/stdlib/transaction_scripts/doc/testnet_mint.md b/language/stdlib/transaction_scripts/doc/testnet_mint.md deleted file mode 100644 index 593096e8651a..000000000000 --- a/language/stdlib/transaction_scripts/doc/testnet_mint.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# Script `testnet_mint.move` - -### Table of Contents - -- [Function `testnet_mint`](#SCRIPT_testnet_mint) - - - - - -## Function `testnet_mint` - -Send -amount coins of type -Token to -payee. - - -
public fun testnet_mint<Token>(payer: &signer, payee: address, amount: u64)
-
- - - -
-Implementation - - -
fun testnet_mint<Token>(payer: &signer, payee: address, amount: u64) {
-  assert(LibraAccount::exists_at(payee), 8000971);
-  assert(Signer::address_of(payer) == 0xDD, 8000972);
-  // Each mint amount must be under the dual attestation threshold. This is because the "minter" is
-  // is a DesignatedDealer account, and the recipient (at least in the current testnet) will always
-  // be a DesignatedDealer or VASP.
-  assert(
-      Libra::approx_lbr_for_value<Token>(amount) < DualAttestation::get_cur_microlibra_limit(),
-      8000973
-  );
-  let payer_withdrawal_cap = LibraAccount::extract_withdraw_capability(payer);
-  LibraAccount::pay_from<Token>(&payer_withdrawal_cap, payee, amount, x"", x"");
-  LibraAccount::restore_withdraw_capability(payer_withdrawal_cap);
-}
-
- - - -
diff --git a/language/stdlib/transaction_scripts/peer_to_peer_with_metadata.move b/language/stdlib/transaction_scripts/peer_to_peer_with_metadata.move index 2dcd882aec2c..e97e1e1e7ec2 100644 --- a/language/stdlib/transaction_scripts/peer_to_peer_with_metadata.move +++ b/language/stdlib/transaction_scripts/peer_to_peer_with_metadata.move @@ -13,8 +13,8 @@ use 0x1::VASP; /// `metadata` and an (optional) `metadata_signature` on the message /// `metadata` | `Signer::address_of(payer)` | `amount` | `DualAttestation::DOMAIN_SEPARATOR`. /// The `metadata` and `metadata_signature` parameters are only required if `amount` >= -/// `DualAttestation::get_cur_microlibra_limit` LBR and `payer` and `payee` are distinct entities -/// (e.g., different VASPs, or a VASP and a DesignatedDealer). +/// `DualAttestation::get_cur_microlibra_limit` LBR and `payer` and `payee` are distinct VASPs. +/// However, a transaction sender can opt in to dual attestation even when it is not required (e.g., a DesignatedDealer -> VASP payment) by providing a non-empty `metadata_signature`. /// Standardized `metadata` LCS format can be found in `libra_types::transaction::metadata::Metadata`. /// /// ## Events diff --git a/language/stdlib/transaction_scripts/testnet_mint.move b/language/stdlib/transaction_scripts/testnet_mint.move deleted file mode 100644 index 4a98c3aa6d38..000000000000 --- a/language/stdlib/transaction_scripts/testnet_mint.move +++ /dev/null @@ -1,22 +0,0 @@ -script { -use 0x1::DualAttestation; -use 0x1::Libra; -use 0x1::LibraAccount; -use 0x1::Signer; - -/// Send `amount` coins of type `Token` to `payee`. -fun testnet_mint(payer: &signer, payee: address, amount: u64) { - assert(LibraAccount::exists_at(payee), 8000971); - assert(Signer::address_of(payer) == 0xDD, 8000972); - // Each mint amount must be under the dual attestation threshold. This is because the "minter" is - // is a DesignatedDealer account, and the recipient (at least in the current testnet) will always - // be a DesignatedDealer or VASP. - assert( - Libra::approx_lbr_for_value(amount) < DualAttestation::get_cur_microlibra_limit(), - 8000973 - ); - let payer_withdrawal_cap = LibraAccount::extract_withdraw_capability(payer); - LibraAccount::pay_from(&payer_withdrawal_cap, payee, amount, x"", x""); - LibraAccount::restore_withdraw_capability(payer_withdrawal_cap); -} -} diff --git a/language/transaction-builder/generated/src/stdlib.rs b/language/transaction-builder/generated/src/stdlib.rs index 8c4b719226e3..4d548c3e5dec 100644 --- a/language/transaction-builder/generated/src/stdlib.rs +++ b/language/transaction-builder/generated/src/stdlib.rs @@ -189,8 +189,8 @@ pub enum ScriptCall { /// `metadata` and an (optional) `metadata_signature` on the message /// `metadata` | `Signer::address_of(payer)` | `amount` | `DualAttestation::DOMAIN_SEPARATOR`. /// The `metadata` and `metadata_signature` parameters are only required if `amount` >= - /// `DualAttestation::get_cur_microlibra_limit` LBR and `payer` and `payee` are distinct entities - /// (e.g., different VASPs, or a VASP and a DesignatedDealer). + /// `DualAttestation::get_cur_microlibra_limit` LBR and `payer` and `payee` are distinct VASPs. + /// However, a transaction sender can opt in to dual attestation even when it is not required (e.g., a DesignatedDealer -> VASP payment) by providing a non-empty `metadata_signature`. /// Standardized `metadata` LCS format can be found in `libra_types::transaction::metadata::Metadata`. /// /// ## Events @@ -319,13 +319,6 @@ pub enum ScriptCall { operator_account: AccountAddress, }, - /// Send `amount` coins of type `Token` to `payee`. - TestnetMint { - token: TypeTag, - payee: AccountAddress, - amount: u64, - }, - /// Mint 'mint_amount' to 'designated_dealer_address' for 'tier_index' tier. /// Max valid tier index is 3 since there are max 4 tiers per DD. /// Sender should be treasury compliance account and receiver authorized DD. @@ -604,11 +597,6 @@ impl ScriptCall { operator_name, operator_account, } => encode_set_validator_operator_script(operator_name, operator_account), - TestnetMint { - token, - payee, - amount, - } => encode_testnet_mint_script(token, payee, amount), TieredMint { coin_type, sliding_nonce, @@ -979,8 +967,8 @@ pub fn encode_modify_publishing_option_script(args: Vec) -> Script { /// `metadata` and an (optional) `metadata_signature` on the message /// `metadata` | `Signer::address_of(payer)` | `amount` | `DualAttestation::DOMAIN_SEPARATOR`. /// The `metadata` and `metadata_signature` parameters are only required if `amount` >= -/// `DualAttestation::get_cur_microlibra_limit` LBR and `payer` and `payee` are distinct entities -/// (e.g., different VASPs, or a VASP and a DesignatedDealer). +/// `DualAttestation::get_cur_microlibra_limit` LBR and `payer` and `payee` are distinct VASPs. +/// However, a transaction sender can opt in to dual attestation even when it is not required (e.g., a DesignatedDealer -> VASP payment) by providing a non-empty `metadata_signature`. /// Standardized `metadata` LCS format can be found in `libra_types::transaction::metadata::Metadata`. /// /// ## Events @@ -1226,18 +1214,6 @@ pub fn encode_set_validator_operator_script( ) } -/// Send `amount` coins of type `Token` to `payee`. -pub fn encode_testnet_mint_script(token: TypeTag, payee: AccountAddress, amount: u64) -> Script { - Script::new( - TESTNET_MINT_CODE.to_vec(), - vec![token], - vec![ - TransactionArgument::Address(payee), - TransactionArgument::U64(amount), - ], - ) -} - /// Mint 'mint_amount' to 'designated_dealer_address' for 'tier_index' tier. /// Max valid tier index is 3 since there are max 4 tiers per DD. /// Sender should be treasury compliance account and receiver authorized DD. @@ -1619,14 +1595,6 @@ fn decode_set_validator_operator_script(script: &Script) -> Option { }) } -fn decode_testnet_mint_script(script: &Script) -> Option { - Some(ScriptCall::TestnetMint { - token: script.ty_args().get(0)?.clone(), - payee: decode_address_argument(script.args().get(0)?.clone())?, - amount: decode_u64_argument(script.args().get(1)?.clone())?, - }) -} - fn decode_tiered_mint_script(script: &Script) -> Option { Some(ScriptCall::TieredMint { coin_type: script.ty_args().get(0)?.clone(), @@ -1815,10 +1783,6 @@ static SCRIPT_DECODER_MAP: once_cell::sync::Lazy = once_cell::sync:: SET_VALIDATOR_OPERATOR_CODE.to_vec(), Box::new(decode_set_validator_operator_script), ); - map.insert( - TESTNET_MINT_CODE.to_vec(), - Box::new(decode_testnet_mint_script), - ); map.insert( TIERED_MINT_CODE.to_vec(), Box::new(decode_tiered_mint_script), @@ -2209,28 +2173,6 @@ const SET_VALIDATOR_OPERATOR_CODE: &[u8] = &[ 0, 10, 2, 17, 1, 2, ]; -const TESTNET_MINT_CODE: &[u8] = &[ - 161, 28, 235, 11, 1, 0, 0, 0, 8, 1, 0, 8, 2, 8, 4, 3, 12, 37, 4, 49, 4, 5, 53, 40, 7, 93, 193, - 1, 8, 158, 2, 16, 6, 174, 2, 22, 0, 0, 0, 1, 0, 2, 0, 3, 2, 7, 1, 0, 0, 4, 0, 1, 0, 3, 5, 2, 3, - 0, 1, 6, 1, 1, 1, 1, 2, 8, 3, 4, 0, 2, 9, 2, 5, 0, 2, 10, 6, 0, 1, 1, 2, 11, 5, 0, 0, 2, 9, 5, - 9, 0, 1, 3, 1, 6, 12, 1, 5, 1, 1, 1, 8, 0, 5, 6, 8, 0, 5, 3, 10, 2, 10, 2, 3, 6, 12, 5, 3, 7, - 8, 0, 1, 3, 1, 3, 1, 3, 1, 9, 0, 15, 68, 117, 97, 108, 65, 116, 116, 101, 115, 116, 97, 116, - 105, 111, 110, 5, 76, 105, 98, 114, 97, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111, 117, 110, - 116, 6, 83, 105, 103, 110, 101, 114, 24, 103, 101, 116, 95, 99, 117, 114, 95, 109, 105, 99, - 114, 111, 108, 105, 98, 114, 97, 95, 108, 105, 109, 105, 116, 10, 97, 100, 100, 114, 101, 115, - 115, 95, 111, 102, 20, 97, 112, 112, 114, 111, 120, 95, 108, 98, 114, 95, 102, 111, 114, 95, - 118, 97, 108, 117, 101, 18, 87, 105, 116, 104, 100, 114, 97, 119, 67, 97, 112, 97, 98, 105, - 108, 105, 116, 121, 9, 101, 120, 105, 115, 116, 115, 95, 97, 116, 27, 101, 120, 116, 114, 97, - 99, 116, 95, 119, 105, 116, 104, 100, 114, 97, 119, 95, 99, 97, 112, 97, 98, 105, 108, 105, - 116, 121, 8, 112, 97, 121, 95, 102, 114, 111, 109, 27, 114, 101, 115, 116, 111, 114, 101, 95, - 119, 105, 116, 104, 100, 114, 97, 119, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 221, 10, 2, 1, 0, 1, 1, 7, 8, 43, 10, 1, 17, 3, 12, 4, 11, 4, 3, 9, 11, 0, 1, 6, 203, 21, 122, - 0, 0, 0, 0, 0, 39, 10, 0, 17, 1, 7, 0, 33, 12, 6, 11, 6, 3, 20, 11, 0, 1, 6, 204, 21, 122, 0, - 0, 0, 0, 0, 39, 10, 2, 56, 0, 17, 0, 35, 12, 8, 11, 8, 3, 31, 11, 0, 1, 6, 205, 21, 122, 0, 0, - 0, 0, 0, 39, 11, 0, 17, 4, 12, 3, 14, 3, 10, 1, 10, 2, 7, 1, 7, 1, 56, 1, 11, 3, 17, 6, 2, -]; - const TIERED_MINT_CODE: &[u8] = &[ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 21, 7, 38, 60, 8, 98, 16, 0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 1, 1, 1, 4, 2, 6, 12, 3, 0, 4, 6, 12, 5, 3, 3, 5, 6, 12, diff --git a/testsuite/cli/src/client_proxy.rs b/testsuite/cli/src/client_proxy.rs index 8f0d9ae34e53..5fbcc68be6ee 100644 --- a/testsuite/cli/src/client_proxy.rs +++ b/testsuite/cli/src/client_proxy.rs @@ -500,10 +500,12 @@ impl ClientProxy { println!(">> Sending coins from faucet"); match self.testnet_designated_dealer_account { Some(_) => { - let script = transaction_builder::encode_testnet_mint_script( + let script = transaction_builder::encode_peer_to_peer_with_metadata_script( type_tag_for_currency_code(currency_code), receiver, num_coins, + vec![], + vec![], ); self.association_transaction_with_local_testnet_dd_account( TransactionPayload::Script(script), diff --git a/testsuite/cluster-test/src/tx_emitter.rs b/testsuite/cluster-test/src/tx_emitter.rs index cacc6a011b01..1ac0deeab536 100644 --- a/testsuite/cluster-test/src/tx_emitter.rs +++ b/testsuite/cluster-test/src/tx_emitter.rs @@ -615,10 +615,12 @@ fn gen_submit_transaction_request( fn gen_mint_request(faucet_account: &mut AccountData, num_coins: u64) -> SignedTransaction { let receiver = faucet_account.address; gen_submit_transaction_request( - transaction_builder::encode_testnet_mint_script( + transaction_builder::encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), receiver, num_coins, + vec![], + vec![], ), faucet_account, ) @@ -682,10 +684,12 @@ fn gen_mint_txn_request( num_coins: u64, ) -> SignedTransaction { gen_submit_transaction_request( - transaction_builder::encode_testnet_mint_script( + transaction_builder::encode_peer_to_peer_with_metadata_script( account_config::coin1_tag(), *receiver, num_coins, + vec![], + vec![], ), sender, )