pub fn compute_contract_hash(
sender_le: [u8; 20],
nef_checksum: u32,
name: &str,
) -> [u8; 20]Expand description
Compute the Neo N3 contract hash for a deployment transaction.
Neo derives the deployed contract hash from:
- the deploy transaction sender (UInt160)
- the NEF checksum (u32)
- the manifest name (string)
This matches Neo.SmartContract.Helper.GetContractHash(sender, nefChecksum, name) in the
Neo node implementation:
- ScriptBuilder emits:
ABORT,PUSH sender,PUSH nefChecksum,PUSH name - Contract hash is
Hash160(script)(RIPEMD160(SHA256(script))) interpreted as UInt160.
Inputs and outputs use the VM byte order for UInt160 (little-endian 20 bytes).