mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Repot and introduce keccak-256 external.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#[macro_use]
|
||||
extern crate environmental;
|
||||
extern crate polkadot_state_machine;
|
||||
extern crate tiny_keccak;
|
||||
|
||||
pub use std::vec::Vec;
|
||||
pub use std::rc::Rc;
|
||||
@@ -75,6 +76,9 @@ pub fn chain_id() -> u64 {
|
||||
).unwrap_or(0)
|
||||
}
|
||||
|
||||
/// Conduct a Keccak-256 hash of the given data.
|
||||
pub use tiny_keccak::keccak256;
|
||||
|
||||
/// Execute the given closure with global function available whose functionality routes into the
|
||||
/// externalities `ext`. Forwards the value that the closure returns.
|
||||
pub fn with_externalities<R, F: FnOnce() -> R>(ext: &mut Externalities<Error=NoError>, f: F) -> R {
|
||||
|
||||
Reference in New Issue
Block a user