Skip to content

Commit

Permalink
Merge eth-prover-0.2.2 branch (#891)
Browse files Browse the repository at this point in the history
* `EthProver`: fix log_index conversion.
* `EthProver`: update res file.
  • Loading branch information
sept-en authored Apr 10, 2023
1 parent c465fcc commit a5f3c91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/near/eth-prover/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use admin_controlled::Mask;
use borsh::{BorshDeserialize, BorshSerialize};
use core::convert::TryFrom;
use eth_types::*;
use near_sdk::{env, ext_contract, near_bindgen, Gas, PanicOnDefault, PromiseOrValue};
use rlp::Rlp;
Expand Down Expand Up @@ -112,7 +113,8 @@ impl EthProver {
let header: BlockHeader = rlp::decode(header_data.as_slice()).unwrap();

// Verify log_entry included in receipt
assert_eq!(receipt.logs[log_index as usize], log_entry);
let log_index_usize = usize::try_from(log_index).expect("Invalid log_index");
assert_eq!(receipt.logs[log_index_usize], log_entry);

// Verify receipt included into header
let data =
Expand Down
Binary file modified contracts/near/res/eth_prover.wasm
Binary file not shown.

0 comments on commit a5f3c91

Please sign in to comment.