All Questions
11 questions
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 ...
1
vote
1
answer
1k
views
What exactly is each parameter for assembly delegatecall?
I've been searching everywhere but I'm still not clear what each of the parameters are for delegatecall. What I have found is this delegatecall(g, a, in, insize, out, outsize), where g is gas and a is ...
1
vote
1
answer
285
views
Assembly vs solidity delegatecall
Is there a real difference nowadays, performance-wise, between using assembly delegatecall and the high-level solidity version?
I know that in the past assembly was used so you could get the returned ...
3
votes
1
answer
1k
views
What does "caller()" return in Yul when DELEGATECALL is used?
While browsing the Solidity docs, I noticed this instruction available in assembly:
caller(): call sender (excluding delegatecall)
What do the docs mean by "excluding delegatecall"? Is it ...
2
votes
1
answer
1k
views
Factory contract to clone existing contracts
I am researching about Factory contract to clone existing contracts, First is the implementation present at https://github.com/optionality/clone-factory/blob/master/contracts/CloneFactory.sol. I don't ...
1
vote
0
answers
275
views
delegatecall (assembly) didn't change state variable in Remix with Web3 Provider
I am trying to test proxy pattern in Remix, which connected to my private chain with Web3 Provider. By the way, miner is working all the time. After invoking add function of Proxy contract, the state ...
4
votes
1
answer
1k
views
Difference in "delegate call via assembly"
I came across different versions of delegatecall via assembly and I tried all of them - no different result so far. How do they differ and which is the best version to use?
OpenZeppelin version:
...
1
vote
0
answers
297
views
out of gas error by assembly delegatecall
I want to get a return value from current contract call other contract by delegatecall, but got a error of out-of-gas. I try to add gas limit to 3000000000, but it doesn't work. please help me. And i ...
2
votes
1
answer
3k
views
Can I use delegatecall in a transaction?
I'm interested in techniques to perform multiple sends/contract calls inside of a single transaction but with the EOA that originates the transaction still being the sender for all operations (not a ...
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 ...
3
votes
1
answer
1k
views
How do I use delegatecall assembly with a storage pointer to a struct
I am trying to call a library function using assembly and the delegatecall opcode. The library function accepts two parameters, the state object storage pointer and an address, it returns a single ...