Function ink_env::random[][src]

pub fn random<T>(subject: &[u8]) -> Result<T::Hash> where
    T: Environment

Returns a random hash seed.

Note

  • The subject buffer can be used to further randomize the hash.
  • Within the same execution returns the same random hash for the same subject.

Errors

If the returned value cannot be properly decoded.