Questions tagged [events]
Questions that relate to pallets and disptachables that emit specific events, including decoding events.
62
questions
7
votes
2
answers
110
views
Should events only be emitted in extrinsics?
Suppose my pallet implements a trait MyTrait so that it can be loosely coupled with another pallet. Suppose also that MyTrait::my_function() makes storage modifications, which I would like to notify ...
6
votes
2
answers
110
views
Are there any event patterns for pallets to communicate within the runtime?
Could I have one pallet emit an event that other pallets are aware of?
For example:
assets-pallet emits an AssetCreated event
market-pallet listens for the AssetCreated event
So the assets-pallet is ...
4
votes
2
answers
210
views
How to build prefixed key for rocksdb
I would like to know how can the key for the state System Events storage can be built for a given block hash/height
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 ...
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:
...
7
votes
2
answers
105
views
How to verify upward teleport on Relay Chain?
I performed an upward teleport from Encointer-Parachain to Kusama- Relay Chain.
The parachain confirmed the XCM extrinsic polkadotXcm.limitedTeleportAssets and an Event was disposed: polkadotXcm....
4
votes
2
answers
106
views
error[E0599]: no function or associated item named `events` found for struct `frame_system::Pallet` in the current scope [closed]
When writing:
let events = frame_system::Pallet::<T>::events();
I get the error:
error[E0599]: no function or associated item named `events` found for struct `frame_system::Pallet` in the ...
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 ...
7
votes
1
answer
163
views
Filter Events with subxt over multiple threads
I'm working on a project that uses Substrate in the backend. The System I am working on is written with Elixir and so I have a rustler NIF (Erlang/Elixir Native Function interface) for interacting ...
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?
5
votes
1
answer
59
views
Which data to put in a Pallet Event?
In other blockchains I practiced extreme frugality with event data, since it is expensive.
For example only putting an ID into an event which can then be looked up with lookup(ID) -> ...
4
votes
1
answer
138
views
Correlate events with extrinsics in a utility.batch call in Polkadot
In Polkadot and Kusama emitted module events has the phase property so we can correlate them with the extrinsic that triggered that event but I can not do the same when the extrinsic is included in a ...