delegatecall 调用失败 #454
Unanswered
superwildboy
asked this question in
Q&A
Replies: 1 comment
-
我试了下没报错,这样用没问题,可能你是想调用call来改变另一个合约的值,delegatecall和call是有区别的 |
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