-
Notifications
You must be signed in to change notification settings - Fork 314
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
C++: Add convenient result constructors #660
Conversation
Codecov Report
@@ Coverage Diff @@
## master #660 +/- ##
==========================================
- Coverage 93.05% 93.02% -0.03%
==========================================
Files 25 25
Lines 3655 3657 +2
Branches 379 379
==========================================
+ Hits 3401 3402 +1
- Misses 144 145 +1
Partials 110 110 |
include/evmc/evmc.hpp
Outdated
/// | ||
/// @param _status_code The status code. | ||
/// @param _gas_left The amount of gas left. | ||
/// @param _create_address The address of the possibly created account. This can be valid |
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.
How is the address valid in creation failure?
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.
Check now.
* (evmc_result::status_code is ::EVMC_SUCCESS). | ||
* The create address may be provided even though the contract creation has failed | ||
* (evmc_result::status_code is not ::EVMC_SUCCESS). This is useful in situations | ||
* when the address is observable, e.g. access to it remains warm. |
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, in what case does the address remain warm?
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.
In most cases of failing contact creation, but not all. Obviously.
New constructors are added based on the usage in state transition implementation in evmone.