ic0.msg_caller_size : () β i32 and ic0.msg_caller_copy : (dst : i32, offset: i32, size : i32) β ()
The identity of the caller, which may be a canister id or a user id. During canister installation or upgrade, this is the id of the user or canister requesting the installation or upgrade. During a system task (heartbeat or global timer), this is the id of the management canister.
So if user U calls canister A which then in turn calls your dip20 token canister B then msg.caller will be A. There is no way for the token canister to figure out the identity of U (or if there even is a user U behind the call).
It will be the cnaister Id of the caller canister.
So imagine you have a canister and youβre calling the transfer func of a dip20 ledger from your canister, then in that case msg.caller will be your principal id of your canister(Canister ID)