mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
reintroduce slicable to primitives
This commit is contained in:
@@ -40,6 +40,7 @@ extern crate uint as uint_crate;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
extern crate core;
|
||||
extern crate polkadot_runtime_codec as codec;
|
||||
#[cfg(test)]
|
||||
extern crate polkadot_serializer;
|
||||
#[cfg(test)]
|
||||
@@ -50,6 +51,16 @@ extern crate pretty_assertions;
|
||||
#[macro_use]
|
||||
extern crate alloc;
|
||||
|
||||
// TODO: factor out to separate crate.
|
||||
macro_rules! try_opt {
|
||||
($e: expr) => {
|
||||
match $e {
|
||||
Some(x) => x,
|
||||
None => return None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mod bytes;
|
||||
pub mod block;
|
||||
pub mod contract;
|
||||
@@ -95,6 +106,12 @@ pub type Hash = [u8; 32];
|
||||
/// Alias to 520-bit hash when used in the context of a signature.
|
||||
pub type Signature = hash::H512;
|
||||
|
||||
/// A balance in the staking subsystem.
|
||||
pub type Balance = u64;
|
||||
|
||||
/// A timestamp.
|
||||
pub type Timestamp = u64;
|
||||
|
||||
/// A hash function.
|
||||
pub fn hash(data: &[u8]) -> hash::H256 {
|
||||
blake2_256(data).into()
|
||||
|
||||
Reference in New Issue
Block a user