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.
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
Contract supporting migration staging path #14
Contract supporting migration staging path #14
Changes from 32 commits
fc5a63b
12c2eb9
6b1fb68
e73e244
d246278
17a987d
1a10aca
3603d0f
6e9f8d2
dc2c672
631df33
d69f40e
7a31e20
3d850a2
f0fe3a6
561944b
92bf719
c17eaec
64fb140
e4657ea
47b03ad
ddbed96
d5de4de
5c50a3b
1a9479c
4be1303
7d2e56a
484ca2b
60af686
c02a435
171f507
0c707bf
c502c5f
d01818e
d107b21
7ad772d
26216ba
f2eeb19
9110c72
9551380
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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.
🧡
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.
Should this guard against using a host that is not saved? Or is it not possible to get a ref to a host with it not beeing saved?
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.
Correct, the
Host
must be saved ashost.address()
panics ifowner == nil
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.
See above: Refactor into a getter function
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.
Code should be staged as-is, as a
String
, there is no need to keep it hex-encoded.The hex-encoding used to be done done when sending the code in a transaction, because how inefficient it is to send a
[UInt8]
, but even that is no longer necessary, see onflow/sdks#17.Simply remove the function and use the
code
field.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.
Do you mean that code should be staged as human-readable Cadence?
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.
See above:
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.
The format makes sense since we're no longer hex-encoding the contract code. However, with
code
now being a Cadence code string, what are your thoughts about the emitted value here? I originally modeled the event on the existingBut here it looks like you're suggesting it be the Cadence code as passed in to
replaceCode
. What do you think about emittingcode.utf8
?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.
See above