delegatecall 调用失败 #454
Replies: 2 comments
-
我试了下没报错,这样用没问题,可能你是想调用call来改变另一个合约的值,delegatecall和call是有区别的 |
Beta Was this translation helpful? Give feedback.
0 replies
-
暂时无法提供更多的信息,就先关闭了,如有需求,请补全你的问题信息,重新打开讨论。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
##练习23 delegatecall 调用合约C失败
function delegatecallSetVars(address _addr, uint _num) external payable{
// delegatecall setVars()
(bool success, bytes memory data) = _addr.delegatecall(
abi.encodeWithSignature("setVars(uint256)", _num)
);
if(!success){
num = _num;
}
}
Beta Was this translation helpful? Give feedback.
All reactions