You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to request a feature to expand env::caller() by env::nth_caller() or eq.
There are use cases (such as the burn function of a Stablecoin) where I would like to be able to match the immediate caller and depending on the result traverse the callstack further to get the user's account.
Example call stack
User -> Burn Contract -> Stablecoin Contract
If the Burn Contract is the immediate caller of the Stablecoin Contract, then tokens are burned from the Stablecoin Contract's account.
If the immediate caller is anything but the Burn Contract, then I would like to burn from the User's account. Therefore I need to traverse the callstack by n-2, not n-1.
Thanks for considering this feature request.\
The text was updated successfully, but these errors were encountered:
I would like to request a feature to expand env::caller() by env::nth_caller() or eq.
There are use cases (such as the burn function of a Stablecoin) where I would like to be able to match the immediate caller and depending on the result traverse the callstack further to get the user's account.
Example call stack
User -> Burn Contract -> Stablecoin Contract
If the Burn Contract is the immediate caller of the Stablecoin Contract, then tokens are burned from the Stablecoin Contract's account.
If the immediate caller is anything but the Burn Contract, then I would like to burn from the User's account. Therefore I need to traverse the callstack by n-2, not n-1.
Thanks for considering this feature request.\
The text was updated successfully, but these errors were encountered: