Function ethers_rs::hash_struct

source ·
pub fn hash_struct(
    primary_type: &str,
    data: &Value,
    types: &BTreeMap<String, Vec<Eip712DomainType, Global>, Global>
) -> Result<[u8; 32], Eip712Error>
Expand description

Hashes an object

  • primary_type: The root type to encode.
  • data: The object to hash.
  • types: All type definitions.

Returns the hash of the primary_type object