[WIP] Add more methods to _Deployments contract allowing for multiple versions#182
Open
[WIP] Add more methods to _Deployments contract allowing for multiple versions#182
Conversation
9b8601e to
d28cf75
Compare
d28cf75 to
35cc850
Compare
ronnno
reviewed
Nov 27, 2019
Contributor
ronnno
left a comment
There was a problem hiding this comment.
If we avoid dealing with state upgrades, I'd at least leave some hooks for manual upgrade code in case it's needed:
- specify that state persists across contract versions
- define some callback hook in each contract that can perform state upgrades if needed
?
| * Read code from state key `<name>.Code.<counter>` by calling `State.ReadUint32ByKey`. | ||
| * Returns `0` if the contract was not deployed | ||
|
|
||
| ## `allowVersioning` (method) |
Contributor
There was a problem hiding this comment.
is there a sense in separating governance concerns to a separate contract? this way a chain owner could deploy the policy contract so that each chain can be configured with different upgrade policy (ie, upgrade delays, upgrade by voting, upgrade appeals, permissions etc..)
Contributor
Author
There was a problem hiding this comment.
Yeah, I think policy contract is a great idea.
scutuatua-crypto
approved these changes
Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed new methods:
In this model there is no way to completely remove versioning that might be a bit tricky.
Also, there is no migration method in the contract, which also might be problematic.
This PR is a preparation for brainstorming meeting with OdedW