Skip to main content

generate_contract_group_id

Function generate_contract_group_id 

Source
pub fn generate_contract_group_id(
    owner_id: &Identifier,
    identity_nonce: IdentityNonce,
) -> Identifier
Expand description

Derives the id of the contract group registered by a data contract create transition.

The id is hash_double("contract_group" || owner id || identity nonce (big endian)). The contract created by the same transition has id hash_double(owner id || identity nonce), so both ids are known to the client before broadcasting and can never collide.