[OTHER] PropertyFactory should be used Clones.clone
aggre opened this issue · 1 comments
aggre commented
What would you like to share?
Clones.clone
effectively reduces the waste of redeploying the "same implementation" by leveraging the Proxy pattern.
PropertyFactory.create
contains Property.sol
and it calls new
each time it is executed. Therefore, it consumes a lot of gas fees.
Replacing the implementation of PropertyFactory.create
with Clones.clone
would require the following changes:
- Deploy
Property.sol
as an implementation contract - PropertyFactory adds a setter such as
setPropertyImpl(address impl)
to store the address of the implementation contract - Increase the Solidity compiler for PropertyFactory to 0.8.x. (it needs to split the Truffle configuration file into two: https://ethereum.stackexchange.com/questions/73662/using-two-solc-versions-within-the-same-truffle-project)
Additional information
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
aggre commented
I've wrote the same issue on dev-protocol/protocol-v2#373