-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: use creation init on self destruct #1954
feat: use creation init on self destruct #1954
Conversation
Pull Request Test Coverage Report for Build 1449cb44-eff0-4edb-806f-5419b32bed8d
💛 - Coveralls |
b1ac255
to
83a920d
Compare
83a920d
to
908c8f5
Compare
apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex
Outdated
Show resolved
Hide resolved
|
||
def contract_creation_code(%Address{ | ||
contract_code: %Data{bytes: <<>>}, | ||
contracts_creation_internal_transaction: %InternalTransaction{init: init} |
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.
you're only checking contracts_creation_internal_transaction
. should we also check contracts_creation_transaction
if an address is created in the main transaction?
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.
This case is only possible if the contract was self destructed in the transaction that created it (self destructs in its constructor), so the main transaction in this case will always be the constructing transaction, and the create
will always be an internal transaction. I'm pretty sure this is the case.
908c8f5
to
0fe0fe7
Compare
0fe0fe7
to
6c85f8b
Compare
Resolves #1949 and #1950
Changelog
Enhancements
init
of the creating internal transaction in the case thatdata
is<<>>
due to a self destruct. Display it on the code page, and disable contract verification for those contracts.Bug Fixes
Use
Data.to_string/1
when rendering a raw trace of a create transaction.CHANGELOG.md
with this PR