How to get the value corresponding to solidity "tx.origin" in substrate ink?

64 Views Asked by At
  • I'm implementing a contract that calls contract B from contract A.
  • Now alice called contract B through contract A. I would like to know that it was alice who called this contract B. Can I get it?
let caller = self.env().caller();
  • If you get caller in contract B like above, its value will be the contract address of contract A.
tx.origin
  • I would like to get a value similar to solidity's "tx.origin".Is it possible?
1

There are 1 best solutions below

1
Alexander Theißen On BEST ANSWER

This function does not exist in ink!. Reason is that is considered unsafe and its addition a mistake in Solidity.