pub fn bytecode_root(contract_id: ContractId) -> b256 
Expand description

Get the root of the bytecode of the contract at ‘contract_id’.

Arguments

  • contract_id: [ContractId] - The contract of which the bytecode should be returned.

Returns

  • [b256] - The bytecode root of the contract.

Examples

use std::external::bytecode_root;

fn foo() {
    let root_of_this_contract = bytecode_root(ContractId::this());
    assert(root_of_this_contract != b256::zero());
}