Skip to main content

All Questions

Tagged with
6 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
600 views

Solidity assembly code - calldatacopy, delegatecall

I have been trying to understand how assembly code works,spending lots of hours, but I could not. Please help me Basically, I am digging into a proxy contract, and I do not really understand ...
DHC's user avatar
  • 387
2 votes
0 answers
564 views

Proxy contract DELEGATECALL to pass a DYNAMIC array to a function in the target contract

I'm trying to get a Proxy contract to correctly do a delegatecall to a function in another 'target' contract. The problem is, that I need to pass a dynamic array as the parameter to this function. Q: ...
Michael Connor's user avatar
2 votes
0 answers
718 views

Call vs Delegate Call call data format

I'm using both call and delegatecall within an assembly block and i've noticed that when issuing a call I need to provide 4 bytes (sig) + any arguments, whereas for delegatecall I need to provide 4 ...
slothbag's user avatar
  • 443
1 vote
0 answers
224 views

How to manually generate calldata

Here's my code snippet: function getCalldata(string calldata _func, string calldata _param1, uint256 _param2) public pure returns (bytes memory) { return abi.encodeWithSignature(_func, _param1,...
ATRUES's user avatar
  • 31
1 vote
1 answer
746 views

pass storage through interface to library

Here is what am i doing: There is a library, accept storage argument as parameter, then do some math and return the result. And there is a contract to call the function in the library, and an extra ...
user2214060's user avatar
1 vote
0 answers
117 views

delegatecall for Smart Contract versioning

I've a state variable address public current; which stores the address of the latest updated contract. This value can be modified with a function. Then, I've a function of this kind function ...
Bruce Wayne's user avatar