We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
以下這一段內容 是不是可能有漏洞 你可以使用 (tx.origin == msg.sender) 来检测调用者是否为合约。如果调用者为 EOA,那么tx.origin和msg.sender相等;如果它们俩不相等,调用者为合约。
你可以使用 (tx.origin == msg.sender) 来检测调用者是否为合约。如果调用者为 EOA,那么tx.origin和msg.sender相等;如果它们俩不相等,调用者为合约。
假設背景設定為:
操作為:
那我在合約B看到的 tx.origin 與 msg.sender 都為我的 EOA 這樣是否就繞開合約檢查了呢?
當然這麼做可能意義不大,因為語境在合約A,合約B的資料理應不受影響。 但還是可以繞開檢查
The text was updated successfully, but these errors were encountered:
Delegatecall合约B不会改变B的状态,而是改变A(恶意合约)。 你再看看delegatecall章节
Sorry, something went wrong.
No branches or pull requests
以下這一段內容 是不是可能有漏洞
你可以使用 (tx.origin == msg.sender) 来检测调用者是否为合约。如果调用者为 EOA,那么tx.origin和msg.sender相等;如果它们俩不相等,调用者为合约。
假設背景設定為:
操作為:
那我在合約B看到的 tx.origin 與 msg.sender 都為我的 EOA
這樣是否就繞開合約檢查了呢?
當然這麼做可能意義不大,因為語境在合約A,合約B的資料理應不受影響。
但還是可以繞開檢查
The text was updated successfully, but these errors were encountered: