Network-Goods / hypercerts-protocol

MIT License
13 stars 5 forks source link

removes base contract dependency on hardhat / fixes initializer modifiers #49

Closed elmariachi111 closed 1 year ago

elmariachi111 commented 1 year ago

Since this is a base primitive I wouldn't recommend to make it dependent on hardhat. The code itself doesn't explicitly use any log directive anyhow (and it breaks when used inside a foundry setup :) )

Also replaced initializer with the onlyInitializing modifier in the base ERC3525 primitive which essentially guards the function the same way as before but allows it to be deployed in an UUPS context. See OZ's token primitives as a reference:

https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/token/ERC721/ERC721Upgradeable.sol#L45 or https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/token/ERC1155/ERC1155Upgradeable.sol#L36

bitbeckers commented 1 year ago

Added it to refactor project board. Also moving to Foundry so hardhat won't be in scope at those parts any more (still for OZ UUPS deployment). But we should make sure that the principe of a primitive being non-dependent is still applied

bitbeckers commented 1 year ago

Fix in #62

elmariachi111 commented 1 year ago

nice!