-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
90 upgradable contracts #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huge job !
Look good for me into src
, protostar upgrade and good initiative to insert testnet-2.
In addition, I like the rework of the test/integrations
because there is less code duplication event if it creates a library
file huge.
I approve of the PR because I have no complaints about the src section and the script and uprgade. Thus, in view of the structuring changes, this must be merged in order not to create a conflict for the other PRs.
However, here is an important note that I would like to discuss in this thread:
In the tests (unit like integrations), I did not find any trace of tests of the upgrade
function
(from offseter, yielder, minter, project SC) in order to test the proper functioning and implementation of the Proxy pattern.
Maybe, we should create a directory tests/integrations/migration
or tests/integrations/upgradable
or tests/integrations/sc-management
where we are testing :
- upgradable of smart-contract
- changing of ownership
- try to access/execute contracts without going through the proxy
What do you think @bal7hazar ?
I think, if we are agree to do this, put it in another PR because it only impacts the tests.
There is not point to unit test the proxy since we didn't implemented any logic for this. |
It can make sense to add some more integration tests such as upgrade a contract or change he admin. However if a contract is deployed as an implementation through a proxy we cannot access it directly since there is no real contract. Since we want them upgradable, I don't think we need to e2e test them without proxy. |
Agreed about the non-necessity to redo unit tests in this specific case, because it would be, as you say, reimplement the OZ tests. Understood about the impossibility of accessing a contract without going through the proxy. Indeed, I was not talking about testing them without going through the proxy, but about making sure that the proxy is the owner of the contracts and that we cannot do anything with the contracts without going through the Proxy. As I said in my preview comment, for me, we can merge in the PR state. |
Fix #90 #94