For the complete documentation index, see llms.txt.
aztec-nr - protocol_types::contract_instance

Struct ContractInstance

pub struct ContractInstance {
    pub salt: Field,
    pub deployer: AztecAddress,
    pub original_contract_class_id: ContractClassId,
    pub initialization_hash: Field,
    pub immutables_hash: Field,
    pub public_keys: PublicKeys,
}

The complete preimage of an AztecAddress.

All of these values are hashed into the contract's AztecAddress (see Self::to_address), so they are fixed at deployment time and never change.

In particular, original_contract_class_id is the class the contract was deployed with. For upgradeable contracts which utilize the ContractInstanceRegistry this is NOT the class currently executing i.e. the 'current' class.

Fields

salt: Field
deployer: AztecAddress
original_contract_class_id: ContractClassId
initialization_hash: Field
immutables_hash: Field
public_keys: PublicKeys

Implementations

impl ContractInstance

pub fn to_address(self) -> AztecAddress

Trait implementations

impl Deserialize for ContractInstance

pub fn deserialize(fields: [Field; 12]) -> Self pub fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self

impl Eq for ContractInstance

pub fn eq(_self: Self, _other: Self) -> bool

impl Hash for ContractInstance

pub fn hash(self) -> Field

impl Serialize for ContractInstance

pub fn serialize(self) -> [Field; 12] pub fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>)