如何仅通过钱包地址来创建坚固的功能(不是合同)
我想确保无法通过另一份智能合约以编程方式调用我的功能。
是否有一种方法可以在我的合同中创建一个函数,而这些函数不允许其他合同调用,同时仍允许普通钱包调用该功能?
I want to make sure that my function isn't able to be called programmatically by another smart contract.
Is there a way to create a function in my contract that doesn't allow it to be called by other contracts while still allowing ordinary wallets to call the function?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,
msg.sender
返回称为您方法的地址,tx.origin
返回发送交易的帐户的地址。So,
msg.sender
returns the address who called your method, andtx.origin
returns the address of the account that sent the transaction.