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?


1 Answer 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.