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.

user21934
  • 11
  • 1

1 Answers1

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

Linmao Song
  • 2,357
  • 1
  • 13
  • 35