Skip to content

Commit

Permalink
adding another field for lsig disassembly (#3577)
Browse files Browse the repository at this point in the history
* adding another field for lsig disassembly

* generate oas3

* rename to match other keys

* adding trace, just to see

* nevermind

* fix w/jj comment
  • Loading branch information
barnjamin authored Feb 8, 2022
1 parent 5aad2e2 commit f00b072
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 220 deletions.
7 changes: 7 additions & 0 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1988,6 +1988,13 @@
"type": "string"
}
},
"logic-sig-disassembly": {
"description": "Disassembled lsig program line by line.",
"type": "array",
"items": {
"type": "string"
}
},
"logic-sig-trace": {
"type": "array",
"items": {
Expand Down
7 changes: 7 additions & 0 deletions daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,13 @@
},
"type": "array"
},
"logic-sig-disassembly": {
"description": "Disassembled lsig program line by line.",
"items": {
"type": "string"
},
"type": "array"
},
"logic-sig-messages": {
"items": {
"type": "string"
Expand Down
3 changes: 2 additions & 1 deletion daemon/algod/api/server/v2/dryrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ func doDryrunRequest(dr *DryrunRequest, response *generated.DryrunResponse) {
ep.Debugger = &debug
pass, err := logic.Eval(stxn.Lsig.Logic, ep)
var messages []string
result.Disassembly = debug.lines
result.Disassembly = debug.lines // Keep backwards compat
result.LogicSigDisassembly = &debug.lines // Also add to Lsig specific
result.LogicSigTrace = &debug.history
if pass {
messages = append(messages, "PASS")
Expand Down
74 changes: 37 additions & 37 deletions daemon/algod/api/server/v2/generated/private/routes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions daemon/algod/api/server/v2/generated/private/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f00b072

Please sign in to comment.