1

assuming the following scenario:

a user A calls a function in contract CA which in turn calls a function in contract CB which call a function in contract CC

I would like to discover who called CB within CC. User a is the tx.origin. Is there a way to get the call stack from within a function?

Micha Roon
  • 2,203
  • 21
  • 36

1 Answers1

1

No, unfortunately Solidity can't provide the caller of the caller.

If you control CB you could of course have it pass its msg.sender as a parameter of its call to CC.

Edmund Edgar
  • 16,897
  • 1
  • 29
  • 58