Imagine that Alice calls a contract method C1 and that method calls another method in contract C2.
Regularly msg.sender
equals the Alice Account in the C1 method. And msg.sender
equals the C1 contract address in the C2 method.
I would like to know if it is possible to call C2 in such a way that msg.sender
is still the Alice address instead of C1 address. And that C2 can access C2's state variables.
I have tried to use delegatecall
and callcode
, but those functions seems that C2 has only access to the C1 state but not the C2 state. I guess that those calls are more prepared for libraries.
It would be good to have an example of this call.