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

Commit

Permalink
incrementing gas limit for txv3
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerson2102 committed Jun 3, 2024
1 parent 6684f8b commit 2f1a23e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/pallets/starknet/src/tests/declare_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn create_declare_erc20_v3_transaction(
nonce: Option<Nonce>,
) -> BlockifierDeclareTransaction {
let sender_address = sender_address.unwrap_or_else(|| get_account_address(None, account_type));
let erc20_class = get_contract_class("ERC20.json", 0);
let erc20_class = get_contract_class("erc20.casm.json", 1);
let erc20_class_hash =
ClassHash(StarkFelt::try_from("0x057eca87f4b19852cfd4551cf4706ababc6251a8781733a0a11cf8e94211da95").unwrap());

Expand Down Expand Up @@ -60,7 +60,7 @@ fn create_declare_erc20_v3_transaction(
tx.signature = signature.unwrap_or_else(|| sign_message_hash(tx_hash));
}

BlockifierDeclareTransaction::new(tx, tx_hash, ClassInfo::new(&erc20_class, 0, 1).unwrap()).unwrap()
BlockifierDeclareTransaction::new(tx, tx_hash, ClassInfo::new(&erc20_class, 1, 1).unwrap()).unwrap()
}

fn create_declare_erc20_v1_transaction(
Expand Down Expand Up @@ -447,7 +447,7 @@ fn given_contract_declare_tx3_than_works() {

let transaction = create_declare_erc20_v3_transaction(
chain_id,
AccountType::V0(AccountTypeV0Inner::NoValidate),
AccountType::V1(AccountTypeV1Inner::NoValidate),
None,
None,
None,
Expand Down
2 changes: 1 addition & 1 deletion crates/pallets/starknet/src/tests/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub fn create_resource_bounds() -> starknet_api::transaction::ResourceBoundsMapp
let mut map = BTreeMap::new();
map.insert(
starknet_api::transaction::Resource::L1Gas,
starknet_api::transaction::ResourceBounds { max_amount: 10000, max_price_per_unit: 12000 },
starknet_api::transaction::ResourceBounds { max_amount: 150000, max_price_per_unit: 12000 },
);
map.insert(
starknet_api::transaction::Resource::L2Gas,
Expand Down

0 comments on commit 2f1a23e

Please sign in to comment.