Skip to content
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: Transaction result included in getTransaction #97

Merged
merged 5 commits into from
Dec 11, 2018

Conversation

orogvany
Copy link
Collaborator

@orogvany orogvany commented Nov 19, 2018

If you request an individual transaction, we'll return the full object with transactionResult included.

if you are retrieving a block, we just leave it as a simple transaction without results as before. We can change this in the future, but seems preferrable to prefer lighter weight calls unless necessary.

Also add gas information (gas, gasPrice, gasUsed) so that blockchain explorers can accurately show this along with calculating out actual fee (gasUsed*gasPrice)

For now, we'll just add it if you get a transaction directly.

If you are receiving a block, we'll just return the transaction itself

still need to make sure we have non-null marshalling, or bifurcate the
result type, so WIP
@orogvany orogvany changed the title [WIP] Transaction result api [WIP] API: Transaction result included in getTransaction Nov 19, 2018
@orogvany
Copy link
Collaborator Author

@honeycrypto if you use this code, should allow you to get further with chain explorer changes

@orogvany orogvany changed the title [WIP] API: Transaction result included in getTransaction API: Transaction result included in getTransaction Nov 20, 2018
@honeycrypto
Copy link
Contributor

Status of the CALL seems to be always code: 'SUCCESS' even when I'm trying to transfer your tokens from your address which should obviously fail

@honeycrypto
Copy link
Contributor

Testnet explorer now shows Gas Used / Gas Limit, Gas Price and Actual TX Cost SEM/USD:
https://testnet.semux.info/explorer/transaction/0x2aec2fd2ef5a1309fd36ad2e2ed2303e9132fd9ad015fa0c6a5c1bd7039ed5dd

@orogvany
Copy link
Collaborator Author

orogvany commented Nov 21, 2018

Yeah. It's weird. The contract does succeed and not throw error even if it fails. Not sure if that's by design for erc20, or just a bad demo contract. Will dig deeper. Did verify the VM says it's a success (but did not transfer anything)

@orogvany orogvany merged commit 50cee8e into semuxproject:develop Dec 11, 2018
@semuxgo semuxgo mentioned this pull request Apr 21, 2019
@orogvany orogvany deleted the transactionResult_api branch May 30, 2019 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants