OpenZeppelin / openzeppelin-labs

A space for the community to interact and exchange ideas on the OpenZeppelin platform. Do not use in production!
https://openzeppelin.com/
MIT License
376 stars 116 forks source link

Some confused about `upgradeability_using_inherited_storage` #138

Closed Skyge closed 5 years ago

Skyge commented 5 years ago

As a matter of fact, I am always confused with this part : upgradeability_using_inherited_storage, I find there is a test file Upgradeable.js, but I think if we change it to an upgradeable contract, we should try to call approve() and transferFrom from contract TokenV1_1, I know if I want to write an upgradeable contract, I can use ZeppelinOS:Upgrading your project, but it just gives a wrapper, I do not know what happen in it I can use this pattern upgradeability_using_inherited_storage,, but the doc is a little hard for me, cause I find there is some contracts, and I do not know the order to call them, I know that there is a default function, if a contract function does not exit, the default function will be triggered, this is what happens in Proxy.sol, but what is the function of the contract Registry.sol, and what is the correct order?

Skyge commented 5 years ago

Finally I get what I want from this file Upgradeable.js