Skip to content

denisglotov/substrate-event-hash-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Substrate event hash calculator

Build status

Substrate event is identified with the value from Topic[0].

Calculate it with this tool as following: cargo run Erc20::Transfer - will give you the id of the #[ink(event)] 'Transfer' of the contract impl 'Erc20'.

To calculate the hash of #[ink(topic)] update main.rs to

let hash = encoded_into_hash(&PrefixedValue {
    prefix: b"Erc20::Transfer::from",
    value: &expected_from,
}),

Based on the https://substrate.stackexchange.com/a/8376/4146 answer.

About

Substrate event hash calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages