diff --git a/Cargo.lock b/Cargo.lock index 0bdb24a..4a5916f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -400,13 +400,11 @@ dependencies = [ [[package]] name = "aurora-workspace-eth-connector" version = "0.3.0" -source = "git+https://github.com/aurora-is-near/aurora-workspace.git#bed983f46213920aa5bd581dbc19ee760810ae51" +source = "git+https://github.com/aurora-is-near/aurora-workspace.git?rev=7510af1bfd0c70713c7a48891e4a448ce0571cca#7510af1bfd0c70713c7a48891e4a448ce0571cca" dependencies = [ "anyhow", "aurora-engine-types 1.0.0 (git+https://github.com/aurora-is-near/aurora-engine.git?branch=develop)", - "aurora-workspace-types", "aurora-workspace-utils", - "borsh 0.9.3", "near-contract-standards", "near-sdk", "near-units", @@ -415,29 +413,13 @@ dependencies = [ "workspaces", ] -[[package]] -name = "aurora-workspace-types" -version = "0.3.0" -source = "git+https://github.com/aurora-is-near/aurora-workspace.git#bed983f46213920aa5bd581dbc19ee760810ae51" -dependencies = [ - "aurora-engine-types 1.0.0 (git+https://github.com/aurora-is-near/aurora-engine.git?branch=develop)", - "ethereum-types", - "near-account-id 0.15.0", - "near-sdk", - "rlp", - "serde", - "thiserror", - "workspaces", -] - [[package]] name = "aurora-workspace-utils" version = "0.3.0" -source = "git+https://github.com/aurora-is-near/aurora-workspace.git#bed983f46213920aa5bd581dbc19ee760810ae51" +source = "git+https://github.com/aurora-is-near/aurora-workspace.git?rev=7510af1bfd0c70713c7a48891e4a448ce0571cca#7510af1bfd0c70713c7a48891e4a448ce0571cca" dependencies = [ "anyhow", - "aurora-workspace-types", - "borsh 0.9.3", + "aurora-engine-types 1.0.0 (git+https://github.com/aurora-is-near/aurora-engine.git?branch=develop)", "near-sdk", "near-units", "serde", diff --git a/eth-connector-tests/Cargo.toml b/eth-connector-tests/Cargo.toml index ff62321..a6f7d22 100644 --- a/eth-connector-tests/Cargo.toml +++ b/eth-connector-tests/Cargo.toml @@ -27,8 +27,8 @@ hex = "0.4.3" ethabi = "18.0" rlp = { version = "0.5.0", default-features = false } aurora-engine-migration-tool = { git = "https://github.com/aurora-is-near/aurora-engine-migration-tool.git" } -aurora-workspace-eth-connector = { git = "https://github.com/aurora-is-near/aurora-workspace.git", ref = "e9ddcc0bc4634509299695d3df6ebcc2e4f86c94" } -aurora-workspace-utils = { git = "https://github.com/aurora-is-near/aurora-workspace.git", ref = "e9ddcc0bc4634509299695d3df6ebcc2e4f86c94" } +aurora-workspace-eth-connector = { git = "https://github.com/aurora-is-near/aurora-workspace.git", rev = "7510af1bfd0c70713c7a48891e4a448ce0571cca" } +aurora-workspace-utils = { git = "https://github.com/aurora-is-near/aurora-workspace.git", rev = "7510af1bfd0c70713c7a48891e4a448ce0571cca" } [features] migration-tests = [] diff --git a/eth-connector-tests/src/connector.rs b/eth-connector-tests/src/connector.rs index e96da4e..6d168ff 100644 --- a/eth-connector-tests/src/connector.rs +++ b/eth-connector-tests/src/connector.rs @@ -443,8 +443,6 @@ async fn test_ft_transfer_call_user_message() { .contract .is_engine_account_exist(receiver_id) .await - .transact() - .await .unwrap(); assert!(is_exist.result); @@ -503,8 +501,6 @@ async fn test_set_and_check_engine_account() { .contract .is_engine_account_exist(contract.contract.id()) .await - .transact() - .await .unwrap(); assert!(is_exist.result); } @@ -1275,14 +1271,12 @@ async fn test_storage_deposit() { .contract .storage_balance_bounds() .await - .transact() - .await .unwrap() .result; let res = contract .contract - .storage_deposit(Some(user_acc.id().clone()), None) + .storage_deposit(Some(&user_acc.id().clone()), None) .max_gas() .deposit(bounds.min.0) .transact() @@ -1297,8 +1291,6 @@ async fn test_storage_deposit() { .contract .storage_balance_of(contract.contract.id().clone()) .await - .transact() - .await .unwrap() .result; assert_eq!(balance.available.0, 0); @@ -1491,13 +1483,11 @@ async fn test_engine_storage_deposit() { .contract .storage_balance_bounds() .await - .transact() - .await .unwrap() .result; let res = user_acc - .engine_storage_deposit(user_acc.id().clone(), Some(user_acc.id().clone()), None) + .engine_storage_deposit(user_acc.id().clone(), Some(&user_acc.id().clone()), None) .max_gas() .deposit(bounds.min.0) .transact() @@ -1513,7 +1503,7 @@ async fn test_engine_storage_deposit() { let res = contract .contract - .engine_storage_deposit(user_acc.id().clone(), Some(user_acc.id().clone()), None) + .engine_storage_deposit(user_acc.id().clone(), Some(&user_acc.id().clone()), None) .max_gas() .deposit(bounds.min.0) .transact() @@ -1528,8 +1518,6 @@ async fn test_engine_storage_deposit() { .contract .storage_balance_of(contract.contract.id().clone()) .await - .transact() - .await .unwrap() .result; assert_eq!(balance.available.0, 0); @@ -1545,8 +1533,6 @@ async fn test_engine_storage_withdraw() { .contract .storage_balance_bounds() .await - .transact() - .await .unwrap() .result; @@ -1568,7 +1554,7 @@ async fn test_engine_storage_withdraw() { let res = contract .contract - .engine_storage_deposit(user_acc.id().clone(), Some(user_acc.id().clone()), None) + .engine_storage_deposit(user_acc.id().clone(), Some(&user_acc.id().clone()), None) .max_gas() .deposit(bounds.min.0) .transact() @@ -1600,8 +1586,6 @@ async fn test_engine_storage_unregister() { .contract .storage_balance_bounds() .await - .transact() - .await .unwrap() .result; @@ -1621,7 +1605,7 @@ async fn test_engine_storage_unregister() { let res = contract .contract - .engine_storage_deposit(user_acc.id().clone(), Some(user_acc.id().clone()), None) + .engine_storage_deposit(user_acc.id().clone(), Some(&user_acc.id().clone()), None) .max_gas() .deposit(bounds.min.0) .transact() @@ -1681,16 +1665,12 @@ async fn test_manage_engine_accounts() { .contract .is_engine_account_exist(&acc1) .await - .transact() - .await .unwrap(); assert!(is_exist.result); let is_exist = contract .contract .is_engine_account_exist(&acc2) .await - .transact() - .await .unwrap(); assert!(is_exist.result); @@ -1706,8 +1686,6 @@ async fn test_manage_engine_accounts() { .contract .is_engine_account_exist(&acc1) .await - .transact() - .await .unwrap(); assert!(!is_exist.result); } diff --git a/eth-connector-tests/src/migration.rs b/eth-connector-tests/src/migration.rs index 1bd7492..79ac953 100644 --- a/eth-connector-tests/src/migration.rs +++ b/eth-connector-tests/src/migration.rs @@ -168,8 +168,6 @@ async fn test_migration_state() { .contract .check_migration_correctness(args) .await - .transact() - .await .unwrap() .result; assert_eq!(res, MigrationCheckResult::Success); @@ -186,8 +184,6 @@ async fn test_migration_state() { .contract .check_migration_correctness(args) .await - .transact() - .await .unwrap() .result; assert_eq!(res, MigrationCheckResult::Success); @@ -208,8 +204,6 @@ async fn test_migration_state() { .contract .check_migration_correctness(args) .await - .transact() - .await .unwrap() .result; assert_eq!(res, MigrationCheckResult::Success); diff --git a/eth-connector-tests/src/utils.rs b/eth-connector-tests/src/utils.rs index 794ddc3..787eb75 100644 --- a/eth-connector-tests/src/utils.rs +++ b/eth-connector-tests/src/utils.rs @@ -127,8 +127,6 @@ impl TestContract { .contract .is_used_proof(proof) .await - .transact() - .await .expect("call_is_used_proof") .result) } @@ -152,8 +150,6 @@ impl TestContract { .contract .ft_balance_of(account.clone()) .await - .transact() - .await .expect("get_eth_on_near_balance") .result) } @@ -163,8 +159,6 @@ impl TestContract { .contract .ft_total_supply() .await - .transact() - .await .expect("total_supply") .result) } @@ -183,17 +177,11 @@ impl TestContract { pub async fn register_user(&self, user: &str) -> anyhow::Result { let account_id = AccountId::try_from(user.to_string())?; - let bounds = self - .contract - .storage_balance_bounds() - .await - .transact() - .await? - .result; + let bounds = self.contract.storage_balance_bounds().await?.result; let res = self .contract - .storage_deposit(Some(account_id.clone()), None) + .storage_deposit(Some(&account_id.clone()), None) .max_gas() .deposit(bounds.min.into()) .transact() @@ -214,15 +202,15 @@ impl TestContract { anyhow::bail!("set_access_right failed"); } - let res = self + let res: String = self .contract .get_account_with_access_right() - .await - .transact() .await? - .result; + .result + .into(); + let acc_id = AccountId::try_from(res.clone())?; - if &res != acc { + if &acc_id != acc { anyhow::bail!("check access_right fail: {res:?} != {acc:?}"); } Ok(())