hello guys, i have a problem with ownership: does anyone know a way to set the owner during a cloning and prevent the new cloned contract from having owner = 0x000...
I did not want to use the "upgradeable", I would like a solution by modifying the opcode of the clone ... can someone help me?
any suggest are accepted !

Dec 3, 2021, 7:20 PM
what do you mean cloning?
Dec 3, 2021, 7:50 PM
clone like this
https://github.com/optionality/clone-factory/blob/master/contracts/CloneFactory.sol
Dec 3, 2021, 7:51 PM
I don't think you can do anything about it unless if you can initialize after cloning (factory) operation is complete.
Dec 3, 2021, 7:53 PM
i'm just study solidity and smart contract, i see if i want implement a factory-clone system for deploy new contract i must use a upgradeables contract for set ownership after clone with init function.
but i just try to understand if there is another way, for example with opcode of with a one-shot set owner function
this way you can do if you use this https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
Dec 3, 2021, 7:55 PM

© 2024 Draquery.com All rights reserved.