Skip to main content

All Questions

Tagged with
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
0 votes
1 answer
89 views

Events in Chained Fallback Function Cause VirtualMachineError

I’m working on an upgradeable contract that uses fallback functions with inline assembly delegatecall and call calls (using calldatacopy and returndatacopy) to route internal and external function ...
rbinnun's user avatar
  • 136
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
268 views

Why does this call to DSProxy fail?

Take these two contracts, both deployed on Kovan and with the source code verified: DSProxy: 0xa92Bed719071A4d33B0B348513E7e866a6ff6B3F TargetContract: 0xE3CD2e7a628b57d3e50c5f7B921182f676721bDF And ...
Paul Razvan Berg's user avatar
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
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
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
3 votes
2 answers
774 views

Solidity CALL and DELEGATECALL: messages and data format

I have some questions about Solidity CALL and DELEGATECALL. I have already read some related threads (link), but found no answers to my doubts. 1) Is there any difference in performing a CALL to a ...
user3352382's user avatar
1 vote
1 answer
740 views

Contract call from a contract from a contract?

As I understand it, it is possible for a contract to call another contract by using othercontractaddress.call(gas_amount).value(eth amount)(tx data). Or in this case sender -> contract A -> ...
Bobo Amitheson'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