1

is it possible to call a function in deployed contract B from contract A while preserving msg.sender to be original sender that invoked contract A. I know there is delegatecall method but also passes the entire context. I only need to pass the msg.sender.

For example, I want to invoke transfer function in my contract A that sets balance of addr of my contract B to X when I deploy my secondary contract B. Since I created and deployed both contracts I can do this but only if I do 2 tx calls.

0

1 Answer 1

3

Don't think that's possible. Essentially, it's asking for tx.origin, which is already a security vulnerability: https://github.com/ethereum/solidity/issues/683

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