mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-07-25 23:23:11 +00:00
Merge branch 'main' into Pravdyvy/various-updates
This commit is contained in:
@@ -36,3 +36,4 @@ path = "../common"
|
||||
|
||||
[dependencies.nssa]
|
||||
path = "../nssa"
|
||||
features = ["no_docker"]
|
||||
|
||||
@@ -1402,6 +1402,36 @@ pub async fn test_pinata() {
|
||||
info!("Success!");
|
||||
}
|
||||
|
||||
pub async fn test_authenticated_transfer_initialize_function() {
|
||||
info!("test initialize account for authenticated transfer");
|
||||
let command = Command::AuthenticatedTransferInitializePublicAccount {};
|
||||
|
||||
let SubcommandReturnValue::RegisterAccount { addr } =
|
||||
wallet::execute_subcommand(command).await.unwrap()
|
||||
else {
|
||||
panic!("Error creating account");
|
||||
};
|
||||
|
||||
info!("Checking correct execution");
|
||||
let wallet_config = fetch_config().await.unwrap();
|
||||
let seq_client = SequencerClient::new(wallet_config.sequencer_addr.clone()).unwrap();
|
||||
let account = seq_client
|
||||
.get_account(addr.to_string())
|
||||
.await
|
||||
.unwrap()
|
||||
.account;
|
||||
|
||||
let expected_program_owner = Program::authenticated_transfer_program().id();
|
||||
let expected_nonce = 1;
|
||||
let expected_balance = 0;
|
||||
|
||||
assert_eq!(account.program_owner, expected_program_owner);
|
||||
assert_eq!(account.balance, expected_balance);
|
||||
assert_eq!(account.nonce, expected_nonce);
|
||||
assert!(account.data.is_empty());
|
||||
info!("Success!");
|
||||
}
|
||||
|
||||
pub async fn test_pinata_private_receiver() {
|
||||
info!("test_pinata_private_receiver");
|
||||
let pinata_addr = "cafe".repeat(16);
|
||||
@@ -1606,6 +1636,9 @@ pub async fn main_tests_runner() -> Result<()> {
|
||||
"test_pinata" => {
|
||||
test_cleanup_wrap!(home_dir, test_pinata);
|
||||
}
|
||||
"test_authenticated_transfer_initialize_function" => {
|
||||
test_cleanup_wrap!(home_dir, test_authenticated_transfer_initialize_function);
|
||||
}
|
||||
"test_pinata_private_receiver" => {
|
||||
test_cleanup_wrap!(home_dir, test_pinata_private_receiver);
|
||||
}
|
||||
@@ -1634,6 +1667,7 @@ pub async fn main_tests_runner() -> Result<()> {
|
||||
test_cleanup_wrap!(home_dir, test_success_move_to_another_account);
|
||||
test_cleanup_wrap!(home_dir, test_success);
|
||||
test_cleanup_wrap!(home_dir, test_failure);
|
||||
test_cleanup_wrap!(home_dir, test_get_account);
|
||||
test_cleanup_wrap!(home_dir, test_success_two_transactions);
|
||||
test_cleanup_wrap!(home_dir, test_success_token_program);
|
||||
test_cleanup_wrap!(
|
||||
@@ -1660,9 +1694,12 @@ pub async fn main_tests_runner() -> Result<()> {
|
||||
home_dir,
|
||||
test_success_private_transfer_to_another_owned_account_claiming_path
|
||||
);
|
||||
test_cleanup_wrap!(home_dir, test_success_token_program_shielded_owned);
|
||||
test_cleanup_wrap!(home_dir, test_pinata);
|
||||
test_cleanup_wrap!(home_dir, test_authenticated_transfer_initialize_function);
|
||||
test_cleanup_wrap!(home_dir, test_pinata_private_receiver);
|
||||
test_cleanup_wrap!(home_dir, test_success_token_program_private_owned);
|
||||
test_cleanup_wrap!(home_dir, test_success_token_program_deshielded_owned);
|
||||
test_cleanup_wrap!(home_dir, test_success_token_program_private_claiming_path);
|
||||
test_cleanup_wrap!(home_dir, test_pinata_private_receiver_new_account);
|
||||
test_cleanup_wrap!(
|
||||
|
||||
Reference in New Issue
Block a user