Skip to content

Commit

Permalink
chore: bump kakarot (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eikix committed Feb 6, 2024
1 parent 7a9b429 commit 7b4887b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/eth_provider/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ use super::database::types::{
transaction::StoredTransactionHash,
};
use super::database::Database;
use super::starknet::kakarot_core;
use super::starknet::kakarot_core::core::{KakarotCoreReader, Uint256};
use super::starknet::kakarot_core::to_starknet_transaction;
use super::starknet::kakarot_core::{
Expand Down Expand Up @@ -484,8 +485,12 @@ where
let starknet_block_id: StarknetBlockId = eth_block_id.try_into()?;

// unwrap option
let to = call.to.unwrap_or_default();
let to = into_via_wrapper!(to);
let to: kakarot_core::core::Option = {
match call.to {
Some(to) => kakarot_core::core::Option { is_some: FieldElement::ONE, value: into_via_wrapper!(to) },
None => kakarot_core::core::Option { is_some: FieldElement::ZERO, value: FieldElement::ZERO },
}
};

// Here we check if CallRequest.origin is None, if so, we insert origin = address(0)
let from = into_via_wrapper!(call.from.unwrap_or_default());
Expand Down

0 comments on commit 7b4887b

Please sign in to comment.