Batched Transactions and expose original caller as metadata

Hi, I would very much like to see the IC expose something like msg.original_caller, as metadata in the call. This may be an optional field.

Doing away with this means that composing functions on the IC is much more difficult. Suppose we want to execute a call to swap token a for b and then another call to swap token b for c. At the moment both methods would have to be executed from the front-end, going through consensus, which would be slower than doing so in a canister.

To batch transactions in a canister, we would want to know who the original caller was. Thus why we would want the field.

From the point of view of wallets, without batching transactions we have to go through a lot of hoops to approve function calls.

1 Like

In the meantime, could you add an explicit “original caller” argument to the functions you’re working with and manually pass it along?

You’d probably still want to check the actual message caller to make sure you can trust the value provided in the argument.