delegateUpdateIDX(address _contractB, uint _IDX) external returns(bool _success) (bool b,)=_contractB.delegatecallA.delegateUpdateIDX(B.address,1) (should update A.storage and set A.arr[1] to 'X')
but the delegateCallA.arr[1] doesn't c
pragma solidity ^0.8.10;
HackMe is a contract that uses delegatecall to execute code.However an attacker can hijack the
1.HackMe forwards the call to Lib using delegatecall.Delegatecall runs the co
pragma solidity ^0.8.10;
HackMe is a contract that uses delegatecall to execute code.However an attacker can hijack the
1.HackMe forwards the call to Lib using delegatecall.Delegatecall runs the co
我部署了两个契约“WalletLibrary”和“Wallet”:Wallet delegateCall()中的大多数函数--来自WalletLibrary的函数。根据我的理解,当我在Wallet中更新一些变量时,它也应该在WalletLibrary中被更新,因为delegateCall()保留了上下文,对吗?我的问题是,为什么它不起作用。deploy time walletLibrary.
因为我想“转发”实际调用者的地址,所以我需要使用delegatecall调用外部函数 function callExternalFunction(address_calleeAddr){}
如您所见,在这种情况下不需要接口现在我的问题是,是否有一种方法可以通过调用外部函数的“接口方式”来使用delegatecall?