0
  • 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?
s.Takahashi
  • 469
  • 4
  • 15

1 Answers1

1

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

Alexander Theißen
  • 3,799
  • 4
  • 28
  • 35
  • I do not know that Ethereum stop using "tx.origins".I recognized not enough studying. I study hard about Smart Contract. Thank you. – s.Takahashi Aug 31 '22 at 22:06