Function std::call_frames::get_contract_id_from_call_frame
pub fn get_contract_id_from_call_frame(frame_pointer: raw_ptr) -> ContractId
Expand description
Get the value of ContractId
from any call frame on the stack.
Arguments
frame_pointer
: [raw_ptr] - The call frame for which the Contract Id is to be returned.
Returns
- [ContractId] - The Contract Id of for the call frame.
Examples
use std::{call_frames::get_contract_id_from_call_frame, registers::frame_ptr};
fn foo() {
let current_call_frame = frame_ptr();
let contract_id = get_contract_id_from_call_frame(current_call_frame);
}