All Questions
11 questions
10
votes
2
answers
3k
views
What is the value of "address(this)" when delegate calling?
Suppose that you have an upgradeable proxy "Foo" that calls an implementation contract "Bar" via DELEGATECALL.
In "Bar", there is a function that uses the Solidity syntax ...
3
votes
1
answer
391
views
Delegatecall not working
I have deployed the following smart contract: 0x016d87b8c98e6ad0991d128CddA435FAfbC06792
//SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
contract Proxy {
uint256 public count;
address ...
2
votes
1
answer
182
views
Preserve msg.sender but not storage
In this particular scheme, we pass the address of the Attacker contract in Victim.foo.
By using delegatecall, we maintain the msg.sender field, but we are not using the storage of Storage but Attacker'...
1
vote
1
answer
845
views
Dynamic Delegate Proxy contract
I'm familiar with proxy contracts in solidity using the 'delegatecall' to separate out the proxy contract from the logic contract. Is there a simple way to choose the logic contract based on an ...
1
vote
1
answer
382
views
Contract A delegatecall function in contract B which calls function in contract c. msg.sender for function in contract c?
If Function in contract A delegatecall function in contract B which calls function in contract C. What will be the msg.sender for function in contract C?
1
vote
1
answer
1k
views
Delegatecall failing
I have this second-layer delegatecall (delegatecall on a contract that already did delegatecall) that continues to fail even after checking all the main reasons why it could fail (storage layout, uint ...
1
vote
0
answers
654
views
Does a proxy contract need to declare state variables?
There is no variable declaration in the proxy contract. Does the returned data from the delegate call auto-generate the variables for the proxy contract?
contract Logic {
uint256 varA;
...
0
votes
1
answer
58
views
Reason for Checking `msg.sender == _msgSender()` in OpenZeppelin's MulticallUpgradeable Contract
In the OpenZeppelin::MulticallUpgradeable contract, there's a validation that checks msg.sender == _msgSender(). Considering that msg.sender and _msgSender() typically return the same value, why is ...
0
votes
1
answer
150
views
How do you pause a Proxy-Logic pattern?
Suppose we have a Proxy contract that forwards to call to a Logic contract by using delegatecall.
If we pause the Proxy, users will still be able to directly interact with the Logic contract. While ...
0
votes
1
answer
451
views
Proxy Contract Not Updating Store Data
I want to setup a proxy contract that my users can interact with. The proxy contract is a store contract with stores the user's age for now. When I call writeData to update my age, I expect it to call ...
0
votes
1
answer
534
views
Upradeable proxy library throws on any function, how to connect proxy and maincontract
I'm trying to implement a proxy library through the techniques researched by openZeppelin using proxies.
I have 4 contracts
1. Library with logic
2. Library containing the interface for the logic
...