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

feat: add tvm-debugger json output #43

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

ilyar
Copy link
Contributor

@ilyar ilyar commented Oct 13, 2024

Changes are backward compatible

 ./target/release/tvm-debugger -i tvm_debugger/tests/contract/contract.tvc -a tvm_debugger/tests/contract/contract.abi.json -m counter
TVM terminated with exit code 0
Computing phase is success: true
Gas used: 4065

--- Post-execution stack state ---------
0
----------------------------------------

--- Control registers ------------------
0: Continuation x24bfa6ede47d53c9ee64e8092c83551cb05eb1be4baeaa7263b6924a8d8530ae
1: Continuation x0000000000000000000000000000000000000000000000000000000000000000
3: Continuation x7f6b335302de33db4c2c9a98a5088a0b6956725f3aae40737edec2fa0041c01b
4: Cell x5c00170d89e7700b1ab33bbd438ae613a868bc7b2c5fbf66a97f061a1ee98281 x467047e81d6a8461d2377daca513c54a3e2c38ba202d50eae00cbfd7bf3f577000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004_
5: Cell xd7ac5f7c59e1047f656730d1e0acb63a55713c691419f70f719184c16d9734e9 x0ec3c86d00
7: Tuple (12)["Tuple (14)", "Null", "31860282553879950199035741648495377296566513688950141184983206852133432285040", "0", "Null", "Null", "0", "Null", "Null", "Null", "0", "0"]
----------------------------------------

Output actions:
----------------
Action(SendMsg):
message header
   source      : 
   destination : 
   created_lt  : 0
   created_at  : 0
init  : None
body  : bits: 288   refs: 0   data: fc1216300000000000000000000000000000000000000000000000000000000000000000
body_hex: b5ee9c72010101010026000048fc1216300000000000000000000000000000000000000000000000000000000000000000
body_base64: te6ccgEBAQEAJgAASPwSFjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
boc_base64: te6ccgEBAQEAMwAAYsAAAAAAAAAAAAAAAAD8EhYwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=

{"counter":"0x0000000000000000000000000000000000000000000000000000000000000000"}
Contract persistent data updated
EXECUTION COMPLETED

Added option --json

$ ./target/release/tvm-debugger -i tvm_debugger/tests/contract/contract.tvc -a tvm_debugger/tests/contract/contract.abi.json -m counter -j

Output

{
  "exit_code": 0,
  "vm_success": true,
  "gas_used": 4065,
  "response": {
    "counter": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  "messages": []
}

@ilyar ilyar force-pushed the add-tvm-debugger-json-output branch 3 times, most recently from 7f7b891 to 619071b Compare October 13, 2024 19:45
@ilyar ilyar marked this pull request as ready for review October 13, 2024 20:09
@ilyar ilyar force-pushed the add-tvm-debugger-json-output branch from 30c9355 to 703d64f Compare October 19, 2024 01:04
Copy link
Contributor

@SilkovAlexander SilkovAlexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other cases LGTM

tvm_debugger/Cargo.toml Outdated Show resolved Hide resolved
tvm_debugger/Cargo.toml Outdated Show resolved Hide resolved
@ilyar ilyar force-pushed the add-tvm-debugger-json-output branch from 703d64f to 8668585 Compare October 21, 2024 14:52
@ilyar ilyar force-pushed the add-tvm-debugger-json-output branch from 8668585 to 5a4a4c4 Compare October 21, 2024 16:02
@elasticLove1 elasticLove1 merged commit 7685850 into tvmlabs:main Oct 24, 2024
@ilyar ilyar deleted the add-tvm-debugger-json-output branch October 26, 2024 17:18
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.

3 participants