Skip to main content

Questions tagged [events]

Questions that relate to pallets and disptachables that emit specific events, including decoding events.

Filter by
Sorted by
Tagged with
5 votes
1 answer
139 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 ...
Denis Glotov's user avatar
7 votes
2 answers
427 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?
Minh Mốc's user avatar
  • 1,009
6 votes
2 answers
133 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: ...
Pablo Buitrago's user avatar
5 votes
2 answers
139 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 ...
Bedeho Mender's user avatar
3 votes
1 answer
103 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 ...
Denis Glotov's user avatar
3 votes
2 answers
266 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 ...
Bedeho Mender's user avatar
3 votes
1 answer
162 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 ...
frkmnt's user avatar
  • 55
2 votes
1 answer
134 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 ...
Gabriel Crispino's user avatar
2 votes
1 answer
152 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 ...
llvm_ninja's user avatar