-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add additional info and formatting to transaction command #403
Conversation
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.
Generally looks good to me. The questions above are minor.
cmd/teleporter-cli/transaction.go
Outdated
|
||
for _, log := range receipt.Logs { | ||
printTeleporterLogs(cmd, log) | ||
printWarpLogs(cmd, log) |
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.
Did printWarpLogs(cmd,log)
portion get tested? It looks like the cli-output.txt includes logs from the printTeleporterLogs
portion only.
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.
Generally makes sense to me. I left a few minor comments.
Co-authored-by: bernard-avalabs <[email protected]> Signed-off-by: Geoff Stuart <[email protected]>
Why this should be merged
Closes #400
How this works
Formats outputs using
json.MarshalIndent
and prints them usingcmd.Println
, sincelogger.Info
can only output to a single line.Adds an optional
-d
or--debug
flag to thetransaction
command in the Teleporter CLI. This will output the transaction info and the transaction trace.How this was tested
Manually using
go build && ./teleporter-cli transaction --rpc 'https://testnet-qr0606t3tp-xe0ed.avax-test.network/ext/bc/rtLueJ1R8vQ7yGe3QdveWJB1VAnvusy6PPp7TrA5suhUmgbnB/rpc?token=<REDACTED>' -d --teleporter-address "0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf" "0x23a6ab766838c3e0536e6630b8b07297716aaa2773869a80b62b2285b378007e"
Output:
cli-output.txt (updated)
How is this documented
Adding info for command help