@@ -20,12 +20,12 @@ impl ConsensusTxReceipt {
20
20
Ok ( ConsensusTxReceipt ( envelope) )
21
21
}
22
22
23
- pub fn success ( & self ) -> bool {
23
+ pub fn status ( & self ) -> & Eip658Value {
24
24
match & self . 0 {
25
- ReceiptEnvelope :: Legacy ( receipt) => receipt. receipt . status ( ) ,
26
- ReceiptEnvelope :: Eip2930 ( receipt) => receipt. receipt . status ( ) ,
27
- ReceiptEnvelope :: Eip1559 ( receipt) => receipt. receipt . status ( ) ,
28
- ReceiptEnvelope :: Eip4844 ( receipt) => receipt. receipt . status ( ) ,
25
+ ReceiptEnvelope :: Legacy ( receipt) => receipt. receipt . status_or_post_state ( ) ,
26
+ ReceiptEnvelope :: Eip2930 ( receipt) => receipt. receipt . status_or_post_state ( ) ,
27
+ ReceiptEnvelope :: Eip1559 ( receipt) => receipt. receipt . status_or_post_state ( ) ,
28
+ ReceiptEnvelope :: Eip4844 ( receipt) => receipt. receipt . status_or_post_state ( ) ,
29
29
_ => todo ! ( ) ,
30
30
}
31
31
}
@@ -71,7 +71,7 @@ impl TryFrom<RpcTxReceipt> for ConsensusTxReceipt {
71
71
TxType :: Legacy => {
72
72
let res = ReceiptEnvelope :: Legacy ( ReceiptWithBloom {
73
73
receipt : Receipt {
74
- status : Eip658Value :: Eip658 ( tx. success ( ) ) ,
74
+ status : Eip658Value :: from ( tx. status ( ) ) ,
75
75
cumulative_gas_used : tx. cumulative_gas_used ( ) ,
76
76
logs : tx. logs ( ) ,
77
77
} ,
@@ -82,7 +82,7 @@ impl TryFrom<RpcTxReceipt> for ConsensusTxReceipt {
82
82
TxType :: Eip2930 => {
83
83
let res = ReceiptEnvelope :: Eip2930 ( ReceiptWithBloom {
84
84
receipt : Receipt {
85
- status : Eip658Value :: Eip658 ( tx. success ( ) ) ,
85
+ status : Eip658Value :: from ( tx. status ( ) ) ,
86
86
cumulative_gas_used : tx. cumulative_gas_used ( ) ,
87
87
logs : tx. logs ( ) ,
88
88
} ,
@@ -93,7 +93,7 @@ impl TryFrom<RpcTxReceipt> for ConsensusTxReceipt {
93
93
TxType :: Eip1559 => {
94
94
let res = ReceiptEnvelope :: Eip1559 ( ReceiptWithBloom {
95
95
receipt : Receipt {
96
- status : Eip658Value :: Eip658 ( tx. success ( ) ) ,
96
+ status : Eip658Value :: from ( tx. status ( ) ) ,
97
97
cumulative_gas_used : tx. cumulative_gas_used ( ) ,
98
98
logs : tx. logs ( ) ,
99
99
} ,
@@ -104,7 +104,7 @@ impl TryFrom<RpcTxReceipt> for ConsensusTxReceipt {
104
104
TxType :: Eip4844 => {
105
105
let res = ReceiptEnvelope :: Eip4844 ( ReceiptWithBloom {
106
106
receipt : Receipt {
107
- status : Eip658Value :: Eip658 ( tx. success ( ) ) ,
107
+ status : Eip658Value :: from ( tx. status ( ) ) ,
108
108
cumulative_gas_used : tx. cumulative_gas_used ( ) ,
109
109
logs : tx. logs ( ) ,
110
110
} ,
@@ -121,12 +121,12 @@ impl RpcTxReceipt {
121
121
Ok ( self . 0 . transaction_type ( ) )
122
122
}
123
123
124
- fn success ( & self ) -> bool {
124
+ fn status ( & self ) -> bool {
125
125
self . 0 . status ( )
126
126
}
127
127
128
128
fn cumulative_gas_used ( & self ) -> u128 {
129
- self . 0 . gas_used
129
+ self . 0 . inner . cumulative_gas_used ( )
130
130
}
131
131
132
132
fn logs ( & self ) -> Vec < alloy:: primitives:: Log < LogData > > {
@@ -136,7 +136,6 @@ impl RpcTxReceipt {
136
136
let result = rpc_log. inner ;
137
137
logs. push ( result) ;
138
138
}
139
-
140
139
logs
141
140
}
142
141
0 commit comments