Skip to content

Commit

Permalink
Revert "include nonces for failing tests inside single_owner_account"
Browse files Browse the repository at this point in the history
This reverts commit caee37d.
  • Loading branch information
thetheveloper committed Jul 16, 2024
1 parent caee37d commit 5f0b3f1
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions starknet-accounts/tests/single_owner_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,20 +309,15 @@ async fn can_execute_eth_transfer_invoke_v1_inner<P: Provider + Send + Sync>(
Felt::from_hex("049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7").unwrap();

let mut account =
SingleOwnerAccount::new(&provider, signer, address, CHAIN_ID, ExecutionEncoding::New);
SingleOwnerAccount::new(provider, signer, address, CHAIN_ID, ExecutionEncoding::New);
account.set_block_id(BlockId::Tag(BlockTag::Pending));

let nonce = provider
.get_nonce(BlockId::Tag(BlockTag::Latest), address)
.await
.unwrap();
let result = account
.execute_v1(vec![Call {
to: eth_token_address,
selector: get_selector_from_name("transfer").unwrap(),
calldata: vec![Felt::from_hex("0x1234").unwrap(), Felt::ONE, Felt::ZERO],
}])
.nonce(nonce)
.max_fee(Felt::from_dec_str("1000000000000000000").unwrap())
.send()
.await
Expand Down Expand Up @@ -350,20 +345,15 @@ async fn can_execute_eth_transfer_invoke_v3_inner<P: Provider + Send + Sync>(
Felt::from_hex("049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7").unwrap();

let mut account =
SingleOwnerAccount::new(&provider, signer, address, CHAIN_ID, ExecutionEncoding::New);
SingleOwnerAccount::new(provider, signer, address, CHAIN_ID, ExecutionEncoding::New);
account.set_block_id(BlockId::Tag(BlockTag::Pending));

let nonce = provider
.get_nonce(BlockId::Tag(BlockTag::Latest), address)
.await
.unwrap();
let result = account
.execute_v3(vec![Call {
to: eth_token_address,
selector: get_selector_from_name("transfer").unwrap(),
calldata: vec![Felt::from_hex("0x1234").unwrap(), Felt::ONE, Felt::ZERO],
}])
.nonce(nonce)
.gas(200000)
.gas_price(500000000000000)
.send()
Expand All @@ -389,13 +379,9 @@ async fn can_execute_eth_transfer_invoke_v3_with_manual_gas_inner<P: Provider +
Felt::from_hex("049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7").unwrap();

let mut account =
SingleOwnerAccount::new(&provider, signer, address, CHAIN_ID, ExecutionEncoding::New);
SingleOwnerAccount::new(provider, signer, address, CHAIN_ID, ExecutionEncoding::New);
account.set_block_id(BlockId::Tag(BlockTag::Pending));

let nonce = provider
.get_nonce(BlockId::Tag(BlockTag::Latest), address)
.await
.unwrap();
let result = account
.execute_v3(vec![Call {
to: eth_token_address,
Expand All @@ -406,7 +392,6 @@ async fn can_execute_eth_transfer_invoke_v3_with_manual_gas_inner<P: Provider +
Felt::ZERO,
],
}])
.nonce(nonce)
.gas(200000)
.send()
.await
Expand Down

0 comments on commit 5f0b3f1

Please sign in to comment.