File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
examples/starknet-wasm/src Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 11#![ allow( clippy:: unused_unit) ]
2+ #![ allow( unexpected_cfgs) ]
23
34use starknet_crypto:: Felt ;
45use wasm_bindgen:: prelude:: * ;
Original file line number Diff line number Diff line change @@ -614,6 +614,17 @@ impl TransactionReceipt {
614614 Self :: DeployAccount ( receipt) => & receipt. execution_result ,
615615 }
616616 }
617+
618+ /// Gets a reference to the transaction's emitted events.
619+ pub fn events ( & self ) -> & [ Event ] {
620+ match self {
621+ Self :: Invoke ( receipt) => & receipt. events ,
622+ Self :: L1Handler ( receipt) => & receipt. events ,
623+ Self :: Declare ( receipt) => & receipt. events ,
624+ Self :: Deploy ( receipt) => & receipt. events ,
625+ Self :: DeployAccount ( receipt) => & receipt. events ,
626+ }
627+ }
617628}
618629
619630impl L1HandlerTransaction {
You can’t perform that action at this time.
0 commit comments