From 7b4887ba7a41806c9b6959422d915283628fdf92 Mon Sep 17 00:00:00 2001 From: Elias Tazartes <66871571+Eikix@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:04:14 +0100 Subject: [PATCH] chore: bump kakarot (#759) --- lib/kakarot | 2 +- src/eth_provider/provider.rs | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/kakarot b/lib/kakarot index 76a16ca10..ab68ac11f 160000 --- a/lib/kakarot +++ b/lib/kakarot @@ -1 +1 @@ -Subproject commit 76a16ca10f43aafec65f1e85b8dbab8859d641a9 +Subproject commit ab68ac11f68d9aaf3105258b0b4d3effe17ef377 diff --git a/src/eth_provider/provider.rs b/src/eth_provider/provider.rs index 6f04d82e4..55dc9d77d 100644 --- a/src/eth_provider/provider.rs +++ b/src/eth_provider/provider.rs @@ -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::{ @@ -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());