Skip to content

Commit

Permalink
Merge pull request #61 from Entropy-Foundation/issue-60
Browse files Browse the repository at this point in the history
#60 Applied aptos_account -> supra_account naming changes on top of aptosvm-v1.16_supra-v0.3.3.
  • Loading branch information
isaacdoidge authored Aug 28, 2024
2 parents 1fa2a7f + 8559c60 commit dc89aaf
Show file tree
Hide file tree
Showing 58 changed files with 1,823 additions and 570 deletions.
2 changes: 1 addition & 1 deletion aptos-move/aptos-release-builder/src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl NetworkConfig {
let args = vec![
"",
"--function-id",
"0x1::aptos_coin::mint",
"0x1::supra_coin::mint",
"--sender-account",
"0xa550c18",
"--args",
Expand Down
4 changes: 2 additions & 2 deletions aptos-move/aptos-sdk-builder/src/golang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ pub fn output(
if let EntryABI::EntryFunction(sf) = abi {
sf.module_name().name().as_str() != "code"
&& sf.name() != "publish_package_txn"
&& sf.module_name().name().as_str() != "aptos_account"
&& sf.module_name().name().as_str() != "supra_account"
&& sf.name() != "batch_transfer"
&& sf.module_name().name().as_str() != "aptos_account"
&& sf.module_name().name().as_str() != "supra_account"
&& sf.name() != "batch_transfer_coins"
} else {
true
Expand Down
4 changes: 2 additions & 2 deletions aptos-move/e2e-move-tests/src/tests/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use crate::MoveHarness;
use aptos_cached_packages::aptos_stdlib::aptos_account_transfer;
use aptos_cached_packages::aptos_stdlib::supra_account_transfer;
use aptos_language_e2e_tests::account::Account;
use claims::assert_err_eq;
use move_core_types::vm_status::StatusCode;
Expand All @@ -16,7 +16,7 @@ fn non_existent_sender() {

let txn = sender
.transaction()
.payload(aptos_account_transfer(*receiver.address(), 10))
.payload(supra_account_transfer(*receiver.address(), 10))
.sequence_number(0)
.sign();

Expand Down
6 changes: 3 additions & 3 deletions aptos-move/e2e-move-tests/src/tests/fee_payer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fn test_account_not_exist_with_fee_payer() {
assert!(alice_start.is_none());
let bob_start = h.read_aptos_balance(bob.address());

let payload = aptos_stdlib::aptos_account_set_allow_direct_coin_transfers(true);
let payload = aptos_stdlib::supra_account_set_allow_direct_coin_transfers(true);
let transaction = TransactionBuilder::new(alice.clone())
.fee_payer(bob.clone())
.payload(payload)
Expand Down Expand Up @@ -339,7 +339,7 @@ fn test_account_not_exist_with_fee_payer_without_create_account() {
h.read_resource::<CoinStoreResource>(alice.address(), CoinStoreResource::struct_tag());
assert!(alice_start.is_none());

let payload = aptos_stdlib::aptos_account_set_allow_direct_coin_transfers(true);
let payload = aptos_stdlib::supra_account_set_allow_direct_coin_transfers(true);
let transaction = TransactionBuilder::new(alice.clone())
.fee_payer(bob.clone())
.payload(payload)
Expand Down Expand Up @@ -368,7 +368,7 @@ fn test_normal_tx_with_fee_payer_insufficient_funds() {
let alice = h.new_account_at(AccountAddress::from_hex_literal("0xa11ce").unwrap());
let bob = h.new_account_with_balance_and_sequence_number(1, 0);

let payload = aptos_stdlib::aptos_account_set_allow_direct_coin_transfers(true);
let payload = aptos_stdlib::supra_account_set_allow_direct_coin_transfers(true);
let transaction = TransactionBuilder::new(alice.clone())
.fee_payer(bob.clone())
.payload(payload)
Expand Down
4 changes: 2 additions & 2 deletions aptos-move/e2e-move-tests/src/tests/gas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ fn test_gas() {
&mut harness,
"CreateAccount",
account_1,
aptos_stdlib::aptos_account_create_account(
aptos_stdlib::supra_account_create_account(
AccountAddress::from_hex_literal("0xcafe1").unwrap(),
),
);
run(
&mut harness,
"CreateTransfer",
account_1,
aptos_stdlib::aptos_account_transfer(
aptos_stdlib::supra_account_transfer(
AccountAddress::from_hex_literal("0xcafe2").unwrap(),
1000,
),
Expand Down
8 changes: 4 additions & 4 deletions aptos-move/e2e-move-tests/src/tests/state_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn test_metadata_tracking() {
// Create and fund account2
harness.run_transaction_payload(
&account1,
aptos_cached_packages::aptos_stdlib::aptos_account_transfer(address2, 100),
aptos_cached_packages::aptos_stdlib::supra_account_transfer(address2, 100),
);
// Observe that metadata is not tracked for address2 resources
assert_eq!(
Expand All @@ -54,7 +54,7 @@ fn test_metadata_tracking() {
// Create and fund account3
harness.run_transaction_payload(
&account1,
aptos_cached_packages::aptos_stdlib::aptos_account_transfer(address3, 100),
aptos_cached_packages::aptos_stdlib::supra_account_transfer(address3, 100),
);

// Observe that metadata is tracked for address3 resources
Expand All @@ -69,7 +69,7 @@ fn test_metadata_tracking() {
harness.new_epoch();
harness.run_transaction_payload(
&account1,
aptos_cached_packages::aptos_stdlib::aptos_account_transfer(address3, 100),
aptos_cached_packages::aptos_stdlib::supra_account_transfer(address3, 100),
);
let meta3b = harness
.read_resource_metadata(&address3, coin_store.clone())
Expand All @@ -79,7 +79,7 @@ fn test_metadata_tracking() {
// However, enabling refundable_bytes does make StateValueMetadata::None automatically upgrade
harness.run_transaction_payload(
&account1,
aptos_cached_packages::aptos_stdlib::aptos_account_transfer(address2, 100),
aptos_cached_packages::aptos_stdlib::supra_account_transfer(address2, 100),
);
assert_eq!(
harness
Expand Down
4 changes: 2 additions & 2 deletions aptos-move/e2e-move-tests/src/tests/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use crate::MoveHarness;
use aptos_cached_packages::aptos_stdlib::aptos_account_transfer;
use aptos_cached_packages::aptos_stdlib::supra_account_transfer;
use aptos_types::{
state_store::state_key::StateKey, transaction::ExecutionStatus, write_set::WriteOp,
};
Expand All @@ -24,7 +24,7 @@ fn failed_transaction_cleanup_charges_gas(status_code: StatusCode) {
.transaction()
.sequence_number(10)
.max_gas_amount(max_gas_amount)
.payload(aptos_account_transfer(*receiver.address(), 1))
.payload(supra_account_transfer(*receiver.address(), 1))
.sign();

let state_view = h.executor.get_state_view();
Expand Down
2 changes: 1 addition & 1 deletion aptos-move/e2e-tests/src/common_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub fn create_account_txn(
) -> SignedTransaction {
sender
.transaction()
.payload(aptos_stdlib::aptos_account_create_account(
.payload(aptos_stdlib::supra_account_create_account(
*new_account.address(),
))
.sequence_number(seq_num)
Expand Down
Loading

0 comments on commit dc89aaf

Please sign in to comment.