Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试制作一个测试应用程序,其中帐户只能调用一次函数。这可能吗?我所需要的只是一种获取调用我的函数的帐户/地址的方法,也就是“发件人”部分。
谢谢
如果从帐户调用,则使用msg.sender. 如果从合约调用,您可以查看tx.origin.
msg.sender
tx.origin
https://ethereum.stackexchange.com/questions/1891/whats-the-difference-between-msg-sender-and-tx-origin