-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revisit EIP1167 for IPNFT Tokenization #149
Conversation
WIP: Revisit EIP1167 for IPNFT Tokenization
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
test/Tokenizer.t.sol
Outdated
|
||
vm.startPrank(mainnetOwner); // Owner address on mainnet | ||
tokenizer11 = Tokenizer11(mainnetTokenizer); | ||
tokenizer11.upgradeTo(address(new Tokenizer())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's a little dangerous here is that the Tokenizer's IPToken implementation is undefined between these two transactions. I'm wondering if upgradeToAndCall might help (calling the setIPTokenImplementation
during the upgrade step)
d7582cf
to
fb6c882
Compare
dd56cac
to
ab49b7e
Compare
src/Tokenizer.sol
Outdated
@@ -27,12 +27,18 @@ contract Tokenizer is UUPSUpgradeable, OwnableUpgradeable { | |||
string symbol | |||
); | |||
|
|||
event IPTokenUpgraded( | |||
address indexed oldAddress, | |||
address indexed newAddress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could include version number for brevity
test/Tokenizer.t.sol
Outdated
tokenizer = Tokenizer(address(new ERC1967Proxy(address(new Tokenizer()), ""))); | ||
tokenizer.initialize(ipnft, blindPermissioner); | ||
tokenizer.setIPTokenImplementation(address(ipToken)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be placed inside the initialise function as well
src/Tokenizer.sol
Outdated
/** | ||
* @dev called after an upgrade to reinitialize a new permissioner impl. This is 4 for görli compatibility | ||
* @param _permissioner the new TermsPermissioner | ||
*/ | ||
function reinit(IPermissioner _permissioner) public onlyOwner reinitializer(4) { | ||
function reinit(IPermissioner _permissioner) public onlyOwner reinitializer(5) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needed to be bumped one to set the blind permissioner
5060c6b
to
5753c04
Compare
…izer attempting to upgrade tokenizer
forgot console import
fixes old tests configures gh env vars to run the tests cleans up some comments, tokenizer version bump hardhat test command add in ignore comment
* adds a setter for the permissioner * uses contracts instead of addresses * adds a address(0) check to setters Signed-off-by: stadolf <stefan@molecule.to> --------- Signed-off-by: stadolf <stefan@molecule.to>
readded ignore comment settable permissioners / revert reinit (#150) * adds a setter for the permissioner * uses contracts instead of addresses * adds a address(0) check to setters Signed-off-by: stadolf <stefan@molecule.to> --------- Signed-off-by: stadolf <stefan@molecule.to>
mocks it by code injection instead Signed-off-by: stadolf <stefan@molecule.to>
pseudo code for upgrade minimal changes to upgradetokenizer natspec / whitespace updates Signed-off-by: stadolf <stefan@molecule.to>
impl in readme more README :) Signed-off-by: stadolf <stefan@molecule.to>
updates new addresses Signed-off-by: stadolf <stefan@molecule.to>
Signed-off-by: stadolf <stefan@molecule.to>
strips down unnecessary initialization code reinits real permissioner on crowdsale test again Signed-off-by: stadolf <stefan@molecule.to>
new mainnet iptoken impl address Signed-off-by: stadolf <stefan@molecule.to>
755a5ef
to
4a77522
Compare
https://www.notion.so/moleculeto/revisit-EIP1167-for-IPNFT-Tokenization-ceaaa1f64c024d12a8ba402bc109ee6e