Skip to main content
4 votes
Accepted

Beacon contract contructor seems to call address 0x02?

address(2) hosts a precompiled contract ( a "smart contract" that is actually blent in the VM) that computes the sha256 hash of a number sent to it as argument. Actually, address 1 to 9 are ...
Foxxxey's user avatar
  • 4,307
2 votes

Solidity Proxy: why using initialiser instead of a constructor?

Proxies need to run instructions that are stored in a different address (the implementation) but using their own storage. That's why they run delegatecall instead of call. The constructor is a special ...
Mouradif's user avatar
  • 289
2 votes
Accepted

Solidity Proxy: why using initialiser instead of a constructor?

This was a question which was bothering me for a long time too and I also couldn't find a proper explanation. Let me summarise how I understood it: This is the difference between a Smart Contract and ...
Dakata's user avatar
  • 225
2 votes

Constructor Inheritance: : Wrong argument count for constructor call

Your code will work like this: contract CExt is C { constructor(uint value) C(value){} } contract CExtChild is CExt(1) { } Hope it helps!
donoso.eth's user avatar
  • 1,483
1 vote

Deploy upgradable contracts using Remix

I do not know how to do it. You might be better off using Truffle and this tutorial: https://forum.openzeppelin.com/t/openzeppelin-upgrades-step-by-step-tutorial-for-truffle/3579 And then connecting ...
Mars Robertson's user avatar
1 vote

Can ReentrancyGuard be used in Proxies?

Like @DiamondDust said, you can call __ReentrancyGuard_init() But when you check the contract ReentrancyGuardUpgradeable, you'll see that the modifier nonReentrant() checks _status first. require(...
damo's user avatar
  • 111
1 vote
Accepted

Incorrect use of constructor

remove public in constructor().
EthanOK's user avatar
  • 451
1 vote

Constructor Inheritance: : Wrong argument count for constructor call

The error occurs because CExt's constructor has an empty function signature and cannot accept arguments. The constructor of C is inherited by CExt, however,CExt doesn't have its own constructor ...
Danny B's user avatar
  • 323

Only top scored, non community-wiki answers of a minimum length are eligible