Skip to main content

All Questions

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
705 views

Anything like a static delegatecall from a view function?

let's say there are two contracts A and B, where A calls methods in B. I understand that A can modify and read storage in B with B.call() and B.staticcall(), ie. A can execute B's methods in the ...
hellopeach's user avatar
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
0 answers
94 views

How dangerous is this: number of contracts contain a function like "approveandcall" which lets anyone call any contract (some thoughts?)

The most common implementation is as follows: function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(...
Robert Ggg's user avatar
0 votes
1 answer
162 views

Delegatecall failing 'could not coalesce error'

I'm trying to set a message to my Contract setmsg through a proxy contract using delegatecall.Using hardhat. getting this error: error: { code: -32603, message: "Error: VM Exception ...
Loputocharlio's user avatar
0 votes
1 answer
39 views

How to build a 3 contract structure with delegatecall

I'm looking for help to build an intermediate contract using delegatecall. My challenge would be with 3 contracts. I need contract A to be the owner of Contract B, and contract B to have a ...
Leandro Loures's user avatar
0 votes
0 answers
244 views

EOA delegating call authority to a contract to interact with another contract

Actually, I want my contract (say A) to interact with a project's contract (say B). But, contract B's author has restricted calls by any contract. So with this, only one option is left i.e. an EOA ...
abhi3700's user avatar
  • 219
0 votes
1 answer
835 views

delegateCall in Solidity understanding case

pragma solidity ^0.8.10; /* HackMe is a contract that uses delegatecall to execute code. It it is not obvious that the owner of HackMe can be changed since there is no function inside HackMe to do so....
ege126's user avatar
  • 3
0 votes
0 answers
265 views

How does DELEGATECALL behave when calling other contracts?

I am trying to make a Parent-Contract which has a function which spends ERC-20 Tokens. I want to call this function from different Child-Contracts (which are deployed independently) using Delegatecall....
RPanic's user avatar
  • 35
0 votes
0 answers
46 views

Does delegatecall() use only the calling function?

Let me explain with the code: contract A { function f() public { [...] g(); } function g() private { [...] } } contract B { A a; function delegateA() public { (bool success, ) = address(...
slimad's user avatar
  • 1
0 votes
2 answers
967 views

How to use Role-Based Access Control via Proxy?

I have a PermissionsManager contract that uses OpenZeppelin's Role-Based Access Control (RBAC) template as a base. Currently function modifiers in my app call PermissionsManager directly to check for ...
Mike's user avatar
  • 113