Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: eth_send_raw_transaction #1357

Merged
merged 19 commits into from
Aug 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: use evm_address for eth_get_balance
  • Loading branch information
obatirou committed Aug 26, 2024
commit d5cf416e0205d32d5ce8134d56391e5716558584
3 changes: 2 additions & 1 deletion src/kakarot/eth_rpc.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ func eth_send_raw_unsigned_tx{
assert_le(tx.max_priority_fee_per_gas, tx.max_fee_per_gas);
}

let (balance) = eth_get_balance(caller_address);
let (evm_address) = IAccount.get_evm_address(caller_address);
let (balance) = eth_get_balance(evm_address);
let max_gas_fee = tx.gas_limit * tx.max_fee_per_gas;
let (max_fee_high, max_fee_low) = split_felt(max_gas_fee);
let (tx_cost, carry) = uint256_add(tx.amount, Uint256(low=max_fee_low, high=max_fee_high));
Expand Down