Questions tagged [events]
Questions that relate to pallets and disptachables that emit specific events, including decoding events.
9
questions
5
votes
1
answer
118
views
How to identify received contract event?
My contract emits several [ink(event)] events. My application subscribes to the events and receives Contracts_ContractEmitted data (from centrifuge go-substrate-rpc-client). How may I understand which ...
7
votes
2
answers
340
views
How to decode ink smart contract call and event data?
I want to decode the contract call data and event data saved in a block. How can I do that?
6
votes
2
answers
117
views
How to parse/match a specific frame_system event?
From the following function I can read the frame_system events:
let events = frame_system::Pallet::<T>::read_events_no_consensus();
the above provides me the following example array:
...
5
votes
2
answers
120
views
Large event payloads unsafe?
Premise
Substrate will, by default, store every event in a block in a storage value Event of type Vec<EventRecord> in the system module, which involves reading & writing this full vector ...
3
votes
1
answer
80
views
How to filter the subscribed contracts events with their topics?
I need to subscribe to my smart-contract events (#[ink(event)]). So I state_subscribeStorage to "System.Events" storage key. But then I get all system events of all smart contracts in my ...
3
votes
1
answer
132
views
Problem running assert_last_event in tests.rs
As the title suggests, I've been trying to call assert_last_event on the tests.rs class without success. The problem first happened when developing the kitties tutorial and after several toolchain ...
2
votes
1
answer
137
views
Emit Events from hooks like on_initialize()
Is it okay to emit event from hooks like on_initialize()?
For example, I have ~1000 items in storage and in a loop in on_initialize() I want to emit an event if certain process is completed, then is ...
2
votes
2
answers
206
views
Why are events stored?
The documentation around emitting events states that events are written to storage, and then cleared next block.
This has considerable costs
You add extra db write/read overhead to practically every ...
2
votes
1
answer
115
views
What does the Staking.EraPaid event mean?
According to Polkadot's events description page, the Staking.EraPaid event means the following:
The era payout has been set; the first balance is the validator-payout; the second is the remainder ...