I want to create upgradeable contracts and I would love to use OpenZeppelin to that.
However, I have mappings in my smart contract and as far as I understood it is not possible with dynamic-size data structures unless using [Unstructured storage. However, in this case the solution involves a lot of assembly code. I would prefer to use ERC930 to data storage and a simple proxy without assembly to logic . What do you think?
2 Likes
Hi @Suzana_Maranhao welcome to the community
With the OpenZeppelin SDK your upgradeable contracts can include mappings.
See the OpenZeppelin SDK Upgrades Pattern documentation:
https://docs.openzeppelin.com/sdk/2.5/pattern
The OpenZeppelin implementations of ERC20 and ERC721 both contain mappings and are available in potentially upgradeable versions in OpenZeppelin Contracts Ethereum Package
You could try your contract with OpenZeppelin SDK, it is quick to create a project: https://docs.openzeppelin.com/sdk/2.5/first
Feel free to ask all the questions that you need.
I wanted to check in with you to see how it was going. Do you have any more questions?