-
Notifications
You must be signed in to change notification settings - Fork 12
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
Upgradeable contracts using proxies. #39
base: master
Are you sure you want to change the base?
Conversation
name = "implementation" | ||
|
||
[proxy] | ||
enabled = true # Undecided if we really need this flag yet. |
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.
I think removing this makes sense, as absence or existence of [proxy]
table can be used to deduce this
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.
I guess setting this to false would allow you to deploy the contract for testing purposes before generating and committing to the proxy contract.
Users could always comment out [proxy]
but this might make that more explicit?
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.
Hmm you mean to test the implementation contract right? if so sounds good to me. Another option to infer the enabled = true
if the table is there, and for testing users can use enabled = false
or we can explicitly require the field to be there.
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.
fwiw I think having them comment it out for that behavior (or run a specific flag) looks more correct.
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.
I'm not sure if address = #
is valid TOML.
Some blockchains make things like this explicit by pointing to well-known values like addresss = 0x0000000000000000000000000000000000000000
. I personally don't like this because you have to count the number of 0
for no good reason and is also error-prone.
Maybe an enum here or a shorter value as a placeholder could make sense:
address = 0x0
address = ""
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.
If the proxy will only ever be a single value, would it make sense to move this to the project
table?
- **Storage Layout Consistency**: Ensure that the storage layout between the proxy and the implementation contracts is identical. | ||
|
||
### **Example Contract Syntax** | ||
@IGI-111 to fill out. |
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.
Can we fill this in?
[rendered]