-
Notifications
You must be signed in to change notification settings - Fork 184
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
[EVM] Contract deploy change return value #5606
Merged
Merged
Changes from 16 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
fc3e408
update contract deploy to return result
a5c5217
update account type
794de19
update comments
0aa5fa7
return result on deploy
0ffb4d6
update deploy handler to return address as result
b7a5bfa
account fix comment
9e81add
update the test with new result type
dc70221
handler tests fix
5db7042
panic on error only
9745641
assign result in emulator
5ddbfb2
overwrite deployed address for call
9d3d855
update evm test
8819c86
handler test update
2c3a9ae
fix evm test assertion
04cf4c8
fix contract test
82520ec
update comment
a1e51e9
add contract address field
48445ed
update name
5bfcb86
add deployed contract address
d5f9a84
use deployed contract address field
1269e91
add init contract address
3fb8536
result to evm result
611156d
test the evm deploy result
bc60205
specify deployment contract
e0ff8fa
add empty address check for non-deploy
46bef61
fix deploy address test
403b9af
change result to be optional
904ee8c
fix name change
167bee1
change the result type for deployed contract to be pointer, so it can…
4a7b100
make the result deployed address pointer and optional
49b7f43
set optional if contract address not present
cc1e6a2
test changes with optional
0a0b559
additional check for contract addr
7be61a9
Merge branch 'master' into gregor/evm/deploy-result
devbugging 7458cfe
Merge branch 'master' into gregor/evm/deploy-result
devbugging File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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 have one concern about making this change here. Right now, a contract deployment results in the following
evm.TransactionExecuted
event payload:Where
returnedValue
holds the executed byte-code, basically what should be returned byeth_getCode
for the deployed contract address.With
res.ReturnedValue = to[:]
, we will basically return the deployed contract address for bothdeployedContractAddress
&returnedValue
.This results in less data being available in the emitted event. For example, the Gateway can use the current event payload and index the executed byte-code for each 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.
That is true and I would say the only way to resolve this would to add the deployed address value to the
EVM.Result
type, the other way is to revert to overwrite theReturnedValue
in the contract handler no in emulator. cc @ramtinmsThere 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.
@m-Peter I added deployed contract address as the new field on the result type
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.
Left a question in the FLIP: onflow/flips#225 (comment)