Macro caller
Source macro_rules! caller {
() => { ... };
}
Expand description
Get the ContractId of the calling contract
§Result
The result of execution is &[u8] ContractId
If the returned slice is empty, then the contract was called from a transaction
§Usage
use we_cdk::*;
#[action]
fn _constructor() {
let caller: Binary = caller!();
}