what should I pay attention to?
Hi @Tamir,
Welcome to the community
I suggest you look at the Migrating from ZeppelinOS to the OpenZeppelin SDK section of Announcing the OpenZeppelin SDK
Feel free to ask specific questions too.
Hi @Tamir,
How did you get on with upgrading?
- mkdir .openzeppelin in root dir
- mv zos.{netowork}.json to .openzeppelin/{network}.json
- replace 'openzeppelin-eth' to '@openzeppelin/contracts-ethereum-package' in all-files(contract dirăjsonăjs)
- replace to 'zos-lib' to '@openzeppelin/upgrades' in all-files(contract dirăjsonăjs)
then i am re-runing test now, i will response you if it's finished
I can passed all the contract tests.
then i got a few of warns when run npx openzeppelin push --network rinkeby
@abcoathup
warn:
- enum automatically checked
how to fix the warn?
Hi @Tamir,
OpenZeppelin SDK automatically checks for storage compatibility, though the current version doesnât have automatic checks for variables with struct or enums. So there isnât a way to remove the warnings.
The warnings are to get you to check that the order in which the contract state variables are declared, and their type are not changed between upgrades for the following variables:
- _whitelistAdmins in WhitelistAdminRole
- _whitelisteds in WhitelistedRole
- _pausers in PauserRole
- calls in AssetERC721
You should check the original version of each of the variables with the upgraded version to ensure the order they are declared and the type hasnât changed.
Assuming you upgraded from a recent version of openzeppelin-eth
then I wouldnât expect issues with the variables in Roles.
See the documentation for more information on this:
https://docs.openzeppelin.com/sdk/2.5/writing-contracts#modifying-your-contracts
It is also recommended to test your upgrade locally before running the upgrade in production.