Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 9f99151

Browse files
committed
fix: implement Default EVMoutput
success was always false due to its default value
1 parent bb9ce58 commit 9f99151

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

crates/ef-testing/src/evm_sequencer/utils.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,15 @@ pub fn to_broadcasted_starknet_transaction(
155155

156156
// Compute the hash on elements and sign it
157157
let transaction_hash = compute_hash_on_elements(&data_to_hash);
158-
let signature_starknet = RELAYER_SIGNING_KEY
158+
let signature_relayer = RELAYER_SIGNING_KEY
159159
.sign(&transaction_hash)
160160
.expect("Signature starknet failed");
161161

162-
let signature_starknet = vec![signature_starknet.r, signature_starknet.s];
162+
let signature_relayer = vec![signature_relayer.r, signature_relayer.s];
163163

164164
let request = BroadcastedInvokeTransaction::V1(BroadcastedInvokeTransactionV1 {
165165
max_fee: Felt::ZERO,
166-
signature: signature_starknet,
166+
signature: signature_relayer,
167167
nonce: relayer_nonce,
168168
sender_address: (*RELAYER_ADDRESS.0.key()).into(),
169169
calldata: execute_calldata,

crates/ef-testing/src/models/result.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use tracing::{error, info, warn};
99

1010
use std::convert::TryFrom;
1111

12-
#[derive(Default, Debug)]
12+
#[derive(Debug)]
1313
pub struct EVMOutput {
1414
pub return_data: Vec<u8>,
1515
pub gas_used: u64,
@@ -24,6 +24,16 @@ impl EVMOutput {
2424
}
2525
}
2626

27+
impl Default for EVMOutput {
28+
fn default() -> Self {
29+
Self {
30+
return_data: vec![],
31+
gas_used: 0,
32+
success: true,
33+
}
34+
}
35+
}
36+
2737
impl TryFrom<&EventData> for EVMOutput {
2838
type Error = eyre::Report;
2939

0 commit comments

Comments
 (0)