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, call_frames::contract_id, constants::ZERO_B256};

fn foo() {
    let root_of_this_contract = bytecode_root(contract_id());
    assert(root_of_this_contract != ZERO_B256);
}