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
api: /{runtime}/accounts/{addr}: Show contract runtime bytecode, show eth address of originating tx #452
Conversation
api/spec/v1.yaml
Outdated
format: byte | ||
description: | | ||
The runtime bytecode of the smart contract. This is the code stored on-chain that | ||
descibes a smart contract. This field is normally present, except for contracts |
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.
Missing line?
Also, since the runtime bytecode analyzer might be behind/stalled, the field will be missing for contract accounts that haven't been processed yet. Do you think it's worth checking the evm_contract_analysis
table and providing something akin to pending
if is_contract == NULL
? Or perhaps amending the description is sufficient in this case
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.
Thank you, finished the sentence now. What I wanted to say there was essentially what you wrote. I don't think we need an explicit pending
; null
essentially takes that role.
[analyzer] store contract address and tx [openapi] add contract information to /runtime/accounts/{addr} [api] add contract fields to /runtime/accounts/{addr} [analyzer] store contract creation bytecode [api] show contract creation bytecode [db] add creation/runtime bytecode for evm contract accounts nit [db] standardize pkey format; remove evm contract fields [openapi] address comments address comments; simplify fields fix bad rebase linter update description
@mitjat can you please consider this? 7e2fa47#r118274739 |
e67076c
to
195378b
Compare
type: string | ||
description: | | ||
The Ethereum transaction hash of the transaction in `creation_tx`. | ||
Encoded as a lowercase hex string. |
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 the "Can be omitted for contracts..." note is naturally implied by the descrption of creation_tx
so it can be omitted.
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.
😁 yeah I figured this is better than repeating the whole description of when it can be omitted, especially since the condition might change in the (far-ish) future if we implement contract execution tracing.
2e5a620
to
746a171
Compare
195378b
to
aeae282
Compare
aeae282
to
2da9ca0
Compare
e2e_regression: Fix expected output after #452
This PR exposes two new fields in the contracts API:
Testing: Manually ran the new analyzer, then visited a contract address and a non-contract address and verified that the new field is as expected.