File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,14 @@ pub fn lookup_reserved_variable(
5858 {
5959 match variable {
6060 NativeVariables :: TxSender => {
61+ // This `NoSenderInContext` is **unreachable** in standard Clarity VM execution.
62+ // - Every function call (public, private, or trait) is executed with a valid caller context.
6163 let sender = env. sender . clone ( ) . ok_or ( RuntimeError :: NoSenderInContext ) ?;
6264 Ok ( Some ( Value :: Principal ( sender) ) )
6365 }
6466 NativeVariables :: ContractCaller => {
67+ // This `NoCallerInContext` is **unreachable** in standard Clarity VM execution.
68+ // - Every on-chain transaction and contract-call has a well-defined sender.
6569 let caller = env. caller . clone ( ) . ok_or ( RuntimeError :: NoCallerInContext ) ?;
6670 Ok ( Some ( Value :: Principal ( caller) ) )
6771 }
You can’t perform that action at this time.
0 commit comments