File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed
async_substrate_interface Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,8 @@ def process_events(self):
258258 and event ["event" ]["event_id" ] == "ExtrinsicFailed"
259259 ) or (
260260 event ["event" ]["module_id" ] == "MevShield"
261- and event ["event" ]["event_id" ] == "DecryptedRejected"
261+ and event ["event" ]["event_id" ]
262+ in ("DecryptedRejected" , "DecryptionFailed" )
262263 ):
263264 possible_success = False
264265 self .__is_success = False
@@ -269,13 +270,23 @@ def process_events(self):
269270 self .__weight = dispatch_info ["weight" ]
270271 else :
271272 # MEV shield extrinsics
272- dispatch_info = event ["event" ]["attributes" ]["reason" ][
273- "post_info"
274- ]
275- dispatch_error = event ["event" ]["attributes" ]["reason" ]["error" ]
276- self .__weight = event ["event" ]["attributes" ]["reason" ][
277- "post_info"
278- ]["actual_weight" ]
273+ if event ["event" ]["event_id" ] == "DecryptedRejected" :
274+ dispatch_info = event ["event" ]["attributes" ]["reason" ][
275+ "post_info"
276+ ]
277+ dispatch_error = event ["event" ]["attributes" ]["reason" ][
278+ "error"
279+ ]
280+ self .__weight = event ["event" ]["attributes" ]["reason" ][
281+ "post_info"
282+ ]["actual_weight" ]
283+ else :
284+ self .__error_message = {
285+ "type" : "MevShield" ,
286+ "name" : "DecryptionFailed" ,
287+ "docs" : event ["event" ]["attributes" ]["reason" ],
288+ }
289+ continue
279290
280291 if "Module" in dispatch_error :
281292 if isinstance (dispatch_error ["Module" ], tuple ):
You can’t perform that action at this time.
0 commit comments