Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
test: rename create_accout and make estimate_fee work
Browse files Browse the repository at this point in the history
  • Loading branch information
tdelabro committed Oct 11, 2023
1 parent 7fef8e8 commit 3f07518
Show file tree
Hide file tree
Showing 17 changed files with 67 additions and 58 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/starknet-rpc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler
- name: Run rpc test
- name: Run rpc native test
run: |-
./target/release/madara setup
./target/release/madara run --dev --alice --sealing=manual --execution=Native --tmp &
sleep 10
./target/release/madara run --dev --sealing=manual --execution=Native --tmp &
while ! echo exit | nc localhost 9944; do sleep 1; done
cd starknet-rpc-test
cargo test
- name: Run rpc wasm test
run: |-
./target/release/madara setup
./target/release/madara run --dev --sealing=manual --execution=Wasm --tmp &
while ! echo exit | nc localhost 9944; do sleep 1; done
cd starknet-rpc-test
cargo test
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions starknet-rpc-test/add_declare_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use starknet_ff::FieldElement;
use starknet_providers::{MaybeUnknownErrorCode, Provider, ProviderError, StarknetErrorWithMessage};
use starknet_rpc_test::constants::{ARGENT_CONTRACT_ADDRESS, FEE_TOKEN_ADDRESS, SIGNER_PRIVATE};
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};
use starknet_rpc_test::utils::{create_account, read_erc20_balance, AccountActions, U256};
use starknet_rpc_test::utils::{build_single_owner_account, read_erc20_balance, AccountActions, U256};
use starknet_rpc_test::{SendTransactionError, Transaction, TransactionResult};

#[rstest]
Expand All @@ -20,7 +20,7 @@ async fn fail_validation_step(madara: &ThreadSafeMadaraClient) -> Result<(), any

let txs = {
// using incorrect private key to generate the wrong signature
let account = create_account(&rpc, "0x1234", ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, "0x1234", ARGENT_CONTRACT_ADDRESS, true);
let (declare_tx, _, _) =
account.declare_contract("./contracts/Counter.sierra.json", "./contracts/Counter.casm.json");

Expand Down Expand Up @@ -50,7 +50,7 @@ async fn fail_validation_step(madara: &ThreadSafeMadaraClient) -> Result<(), any
async fn fail_execution_step_with_no_storage_change(madara: &ThreadSafeMadaraClient) -> Result<(), anyhow::Error> {
let rpc = madara.get_starknet_client().await;

let account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let (declare_tx, expected_class_hash, _) =
account.declare_contract("./contracts/Counter.sierra.json", "./contracts/Counter.casm.json");

Expand Down Expand Up @@ -92,7 +92,7 @@ async fn fail_execution_step_with_no_storage_change(madara: &ThreadSafeMadaraCli
async fn works_with_storage_change(madara: &ThreadSafeMadaraClient) -> Result<(), anyhow::Error> {
let rpc = madara.get_starknet_client().await;

let account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let (declare_tx, expected_class_hash, _) =
account.declare_contract("./contracts/Counter.sierra.json", "./contracts/Counter.casm.json");

Expand Down Expand Up @@ -133,7 +133,7 @@ async fn fails_already_declared(madara: &ThreadSafeMadaraClient) -> Result<(), a
let rpc = madara.get_starknet_client().await;

// first declaration works
let account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let (declare_tx, _, _) =
account.declare_contract("./contracts/Counter.sierra.json", "./contracts/Counter.casm.json");

Expand Down
6 changes: 4 additions & 2 deletions starknet-rpc-test/add_deploy_account_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ use starknet_rpc_test::constants::{
ARGENT_CONTRACT_ADDRESS, CAIRO_1_ACCOUNT_CONTRACT_CLASS_HASH, MAX_FEE_OVERRIDE, SIGNER_PRIVATE,
};
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};
use starknet_rpc_test::utils::{build_deploy_account_tx, build_oz_account_factory, create_account, AccountActions};
use starknet_rpc_test::utils::{
build_deploy_account_tx, build_oz_account_factory, build_single_owner_account, AccountActions,
};
use starknet_rpc_test::{Transaction, TransactionResult};

#[rstest]
Expand Down Expand Up @@ -61,7 +63,7 @@ async fn works_with_storage_change(madara: &ThreadSafeMadaraClient) -> Result<()
let account_deploy_txn = build_deploy_account_tx(&oz_factory, FieldElement::ONE);
let account_address = account_deploy_txn.address();

let funding_account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let funding_account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);

let (mut txs, block_number) = {
let mut madara_write_lock = madara.write().await;
Expand Down
8 changes: 4 additions & 4 deletions starknet-rpc-test/add_invoke_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use starknet_ff::FieldElement;
use starknet_providers::{MaybeUnknownErrorCode, Provider, ProviderError, StarknetErrorWithMessage};
use starknet_rpc_test::constants::{ARGENT_CONTRACT_ADDRESS, FEE_TOKEN_ADDRESS, SIGNER_PRIVATE};
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};
use starknet_rpc_test::utils::{create_account, read_erc20_balance, AccountActions, U256};
use starknet_rpc_test::utils::{build_single_owner_account, read_erc20_balance, AccountActions, U256};
use starknet_rpc_test::{SendTransactionError, Transaction};

#[rstest]
Expand All @@ -21,7 +21,7 @@ async fn fail_validation_step(madara: &ThreadSafeMadaraClient) -> Result<(), any
let txs = {
let mut madara_write_lock = madara.write().await;
// using incorrect private key to generate the wrong signature
let account = create_account(&rpc, "0x1234", ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, "0x1234", ARGENT_CONTRACT_ADDRESS, true);

madara_write_lock
.create_block_with_txs(vec![Transaction::Execution(account.transfer_tokens(
Expand Down Expand Up @@ -53,7 +53,7 @@ async fn fail_validation_step(madara: &ThreadSafeMadaraClient) -> Result<(), any
async fn works_with_storage_change(madara: &ThreadSafeMadaraClient) -> Result<(), anyhow::Error> {
let rpc = madara.get_starknet_client().await;

let funding_account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let funding_account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let recipient_account = FieldElement::from_hex_be("0x123").unwrap();

let fee_token_address = FieldElement::from_hex_be(FEE_TOKEN_ADDRESS).unwrap();
Expand Down Expand Up @@ -98,7 +98,7 @@ async fn fail_execution_step_with_no_storage_change(madara: &ThreadSafeMadaraCli

let fee_token_address = FieldElement::from_hex_be(FEE_TOKEN_ADDRESS).unwrap();

let funding_account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let funding_account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);

let (block_number, initial_balance, final_balance, txs) = {
let mut madara_write_lock = madara.write().await;
Expand Down
12 changes: 7 additions & 5 deletions starknet-rpc-test/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use starknet_ff::FieldElement;
use starknet_providers::{MaybeUnknownErrorCode, Provider, ProviderError, StarknetErrorWithMessage};
use starknet_rpc_test::constants::{ARGENT_CONTRACT_ADDRESS, FEE_TOKEN_ADDRESS, SIGNER_PRIVATE};
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};
use starknet_rpc_test::utils::{create_account, AccountActions};
use starknet_rpc_test::utils::{build_single_owner_account, AccountActions};
use starknet_rpc_test::Transaction;

#[rstest]
Expand Down Expand Up @@ -144,7 +144,7 @@ async fn works_on_mutable_call_without_modifying_storage(madara: &ThreadSafeMada

{
let mut madara_write_lock = madara.write().await;
let account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);

let (declare_tx, class_hash, _) =
account.declare_contract("./contracts/Counter.sierra.json", "./contracts/Counter.casm.json");
Expand All @@ -161,10 +161,12 @@ async fn works_on_mutable_call_without_modifying_storage(madara: &ThreadSafeMada
let deploy_tx =
Execution::from(&contract_factory.deploy(vec![], FieldElement::ZERO, true).max_fee(max_fee).nonce(nonce));

println!("before declare");
// declare and deploy contract
madara_write_lock
.create_block_with_txs(vec![Transaction::Declaration(declare_tx), Transaction::Execution(deploy_tx)])
.await?;
madara_write_lock.create_block_with_txs(vec![Transaction::Declaration(declare_tx)]).await?;
println!("before execute");
madara_write_lock.create_block_with_txs(vec![Transaction::Execution(deploy_tx)]).await?;
println!("after block");
}

// address of deployed contract (will always be the same for 0 salt)
Expand Down
21 changes: 8 additions & 13 deletions starknet-rpc-test/estimate_fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ use starknet_ff::FieldElement;
use starknet_providers::ProviderError::StarknetError as StarknetProviderError;
use starknet_providers::{MaybeUnknownErrorCode, Provider, StarknetErrorWithMessage};
use starknet_rpc_test::constants::ACCOUNT_CONTRACT;
use starknet_rpc_test::fixtures::madara;
use starknet_rpc_test::MadaraClient;
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};

#[rstest]
#[tokio::test]
async fn fail_non_existing_block(#[future] madara: MadaraClient) -> Result<(), anyhow::Error> {
let madara = madara.await;
let rpc = madara.get_starknet_client();
async fn fail_non_existing_block(madara: &ThreadSafeMadaraClient) -> Result<(), anyhow::Error> {
let rpc = madara.get_starknet_client().await;

let ok_invoke_transaction = BroadcastedTransaction::Invoke(BroadcastedInvokeTransaction {
max_fee: FieldElement::ZERO,
Expand All @@ -41,11 +39,8 @@ async fn fail_non_existing_block(#[future] madara: MadaraClient) -> Result<(), a

#[rstest]
#[tokio::test]
async fn fail_if_one_txn_cannot_be_executed(#[future] madara: MadaraClient) -> Result<(), anyhow::Error> {
let madara = madara.await;
let rpc = madara.get_starknet_client();

madara.create_empty_block().await?;
async fn fail_if_one_txn_cannot_be_executed(madara: &ThreadSafeMadaraClient) -> Result<(), anyhow::Error> {
let rpc = madara.get_starknet_client().await;

let bad_invoke_transaction = BroadcastedTransaction::Invoke(BroadcastedInvokeTransaction {
max_fee: FieldElement::default(),
Expand Down Expand Up @@ -86,9 +81,8 @@ async fn fail_if_one_txn_cannot_be_executed(#[future] madara: MadaraClient) -> R

#[rstest]
#[tokio::test]
async fn works_ok(#[future] madara: MadaraClient) -> Result<(), anyhow::Error> {
let madara = madara.await;
let rpc = madara.get_starknet_client();
async fn works_ok(madara: &ThreadSafeMadaraClient) -> Result<(), anyhow::Error> {
let rpc = madara.get_starknet_client().await;

// from mainnet tx: 0x000c52079f33dcb44a58904fac3803fd908ac28d6632b67179ee06f2daccb4b5
// https://starkscan.co/tx/0x000c52079f33dcb44a58904fac3803fd908ac28d6632b67179ee06f2daccb4b5
Expand All @@ -110,6 +104,7 @@ async fn works_ok(#[future] madara: MadaraClient) -> Result<(), anyhow::Error> {
let estimate =
rpc.estimate_fee(&vec![invoke_transaction.clone(), invoke_transaction], BlockId::Tag(BlockTag::Latest)).await?;

// TODO: instead execute the tx and check that the actual fee are the same as the estimated ones
assert_eq!(estimate.len(), 2);
assert_eq!(estimate[0].overall_fee, 410);
assert_eq!(estimate[1].overall_fee, 410);
Expand Down
4 changes: 2 additions & 2 deletions starknet-rpc-test/get_block_transaction_count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use starknet_ff::FieldElement;
use starknet_providers::{Provider, ProviderError};
use starknet_rpc_test::constants::{ARGENT_CONTRACT_ADDRESS, MINT_AMOUNT, SIGNER_PRIVATE};
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};
use starknet_rpc_test::utils::{create_account, AccountActions};
use starknet_rpc_test::utils::{build_single_owner_account, AccountActions};
use starknet_rpc_test::Transaction;

#[rstest]
Expand Down Expand Up @@ -45,7 +45,7 @@ async fn work_ok_with_block_one_tx(madara: &ThreadSafeMadaraClient) -> Result<()
let rpc = madara.get_starknet_client().await;

let mut madara_write_lock = madara.write().await;
let account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let token_transfer_tx = account.transfer_tokens(
account.address(),
FieldElement::from_hex_be(MINT_AMOUNT).expect("Invalid Mint Amount"),
Expand Down
4 changes: 2 additions & 2 deletions starknet-rpc-test/get_block_with_tx_hashes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use starknet_ff::FieldElement;
use starknet_providers::{MaybeUnknownErrorCode, Provider, ProviderError, StarknetErrorWithMessage};
use starknet_rpc_test::constants::{ARGENT_CONTRACT_ADDRESS, SIGNER_PRIVATE};
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};
use starknet_rpc_test::utils::{create_account, AccountActions};
use starknet_rpc_test::utils::{build_single_owner_account, AccountActions};
use starknet_rpc_test::Transaction;

#[rstest]
Expand All @@ -37,7 +37,7 @@ async fn works_with_correct_block(madara: &ThreadSafeMadaraClient) -> Result<(),

let block = {
let mut madara_write_lock = madara.write().await;
let account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);

madara_write_lock
.create_block_with_txs(vec![Transaction::Execution(account.transfer_tokens(
Expand Down
13 changes: 8 additions & 5 deletions starknet-rpc-test/get_block_with_txs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use anyhow::anyhow;
use rstest::rstest;
use starknet_accounts::Account;
use starknet_core::types::{
BlockId, BlockTag, DeclareTransaction, InvokeTransaction, MaybePendingBlockWithTxs, StarknetError,
BlockId, BlockStatus, BlockTag, DeclareTransaction, InvokeTransaction, MaybePendingBlockWithTxs, StarknetError,
Transaction as StarknetTransaction,
};
use starknet_core::utils::get_selector_from_name;
Expand All @@ -18,7 +18,9 @@ use starknet_rpc_test::constants::{
ARGENT_CONTRACT_ADDRESS, CAIRO_1_ACCOUNT_CONTRACT_CLASS_HASH, FEE_TOKEN_ADDRESS, MAX_FEE_OVERRIDE, SIGNER_PRIVATE,
};
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};
use starknet_rpc_test::utils::{build_deploy_account_tx, build_oz_account_factory, create_account, AccountActions};
use starknet_rpc_test::utils::{
build_deploy_account_tx, build_oz_account_factory, build_single_owner_account, AccountActions,
};
use starknet_rpc_test::Transaction;

#[rstest]
Expand All @@ -45,7 +47,7 @@ async fn works_with_invoke_txn(madara: &ThreadSafeMadaraClient) -> Result<(), an
let recipient = FieldElement::from_hex_be("0x1234").unwrap();
let (current_nonce, block) = {
let mut madara_write_lock = madara.write().await;
let account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let nonce = rpc.get_nonce(BlockId::Tag(BlockTag::Latest), account.address()).await?;

madara_write_lock
Expand Down Expand Up @@ -104,7 +106,7 @@ async fn works_with_deploy_account_txn(madara: &ThreadSafeMadaraClient) -> Resul
let oz_factory = build_oz_account_factory(&rpc, "0x123", class_hash).await;
let account_deploy_txn = build_deploy_account_tx(&oz_factory, FieldElement::ONE);

let funding_account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let funding_account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account_address = account_deploy_txn.address();
let deploy_nonce = rpc.get_nonce(BlockId::Tag(BlockTag::Latest), account_deploy_txn.address()).await?;

Expand Down Expand Up @@ -158,7 +160,7 @@ async fn works_with_declare_txn(madara: &ThreadSafeMadaraClient) -> Result<(), a
let (current_nonce, class_hash, compiled_class_hash, block) = {
let mut madara_write_lock = madara.write().await;

let account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let nonce = rpc.get_nonce(BlockId::Tag(BlockTag::Latest), account.address()).await?;
let (declare_tx, class_hash, compiled_class_hash) =
account.declare_contract("./contracts/Counter.sierra.json", "./contracts/Counter.casm.json");
Expand All @@ -174,6 +176,7 @@ async fn works_with_declare_txn(madara: &ThreadSafeMadaraClient) -> Result<(), a
(nonce, class_hash, compiled_class_hash, block)
};

assert_eq!(block.status, BlockStatus::AcceptedOnL2);
assert_eq!(block.transactions.len(), 1);
let tx = match &block.transactions[0] {
StarknetTransaction::Declare(DeclareTransaction::V2(tx)) => tx,
Expand Down
4 changes: 2 additions & 2 deletions starknet-rpc-test/get_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use starknet_providers::jsonrpc::HttpTransport;
use starknet_providers::{JsonRpcClient, MaybeUnknownErrorCode, Provider, ProviderError, StarknetErrorWithMessage};
use starknet_rpc_test::constants::{ARGENT_CONTRACT_ADDRESS, FEE_TOKEN_ADDRESS, SEQUENCER_ADDRESS, SIGNER_PRIVATE};
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};
use starknet_rpc_test::utils::{assert_eq_emitted_event, create_account, AccountActions};
use starknet_rpc_test::utils::{assert_eq_emitted_event, build_single_owner_account, AccountActions};
use starknet_rpc_test::{MadaraClient, Transaction, TransactionResult};

async fn transfer_tokens(
Expand All @@ -19,7 +19,7 @@ async fn transfer_tokens(
recipient: FieldElement,
transfer_amount: FieldElement,
) -> (FieldElement, FieldElement) {
let account = create_account(rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let mut txs = madara_write_lock
.create_block_with_txs(vec![Transaction::Execution(account.transfer_tokens(recipient, transfer_amount, None))])
.await
Expand Down
4 changes: 2 additions & 2 deletions starknet-rpc-test/get_nonce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use starknet_rpc_test::constants::{
ARGENT_CONTRACT_ADDRESS, CONTRACT_ADDRESS, MINT_AMOUNT, SIGNER_PRIVATE, TEST_CONTRACT_ADDRESS,
};
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};
use starknet_rpc_test::utils::{create_account, AccountActions};
use starknet_rpc_test::utils::{build_single_owner_account, AccountActions};
use starknet_rpc_test::Transaction;

#[rstest]
Expand Down Expand Up @@ -75,7 +75,7 @@ async fn work_ok_account_with_tx(madara: &ThreadSafeMadaraClient) -> Result<(),
let rpc = madara.get_starknet_client().await;

let mut madara_write_lock = madara.write().await;
let account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let current_nonce = rpc.get_nonce(BlockId::Tag(BlockTag::Latest), account.address()).await?;

madara_write_lock
Expand Down
4 changes: 2 additions & 2 deletions starknet-rpc-test/get_transaction_by_blockid_and_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use starknet_providers::ProviderError::StarknetError as StarknetProviderError;
use starknet_providers::{MaybeUnknownErrorCode, Provider, StarknetErrorWithMessage};
use starknet_rpc_test::constants::{ARGENT_CONTRACT_ADDRESS, MINT_AMOUNT, SIGNER_PRIVATE, TEST_CONTRACT_CLASS_HASH};
use starknet_rpc_test::fixtures::{madara, ThreadSafeMadaraClient};
use starknet_rpc_test::utils::{create_account, AccountActions};
use starknet_rpc_test::utils::{build_single_owner_account, AccountActions};
use starknet_rpc_test::Transaction as TransactionEnum;

#[rstest]
Expand Down Expand Up @@ -53,7 +53,7 @@ async fn work_ok_by_compare_with_get_block_with_tx(madara: &ThreadSafeMadaraClie

let (tx_1, tx_2, block_with_txs, argent_account_address, base_nonce) = {
let mut madara_write_lock = madara.write().await;
let account = create_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let account = build_single_owner_account(&rpc, SIGNER_PRIVATE, ARGENT_CONTRACT_ADDRESS, true);
let argent_account_address = account.address();
let nonce = rpc.get_nonce(BlockId::Tag(BlockTag::Latest), account.address()).await?;

Expand Down
Loading

0 comments on commit 3f07518

Please sign in to comment.