-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Include option for outputting arc56 json files
- Loading branch information
1 parent
7df6574
commit dfad42c
Showing
16 changed files
with
1,862 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
190 changes: 190 additions & 0 deletions
190
tests/approvals/out/abi-decorators/AbiDecorators.arc56.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
{ | ||
"name": "AbiDecorators", | ||
"structs": {}, | ||
"methods": [ | ||
{ | ||
"name": "justNoop", | ||
"args": [], | ||
"returns": { | ||
"type": "void" | ||
}, | ||
"actions": { | ||
"create": [], | ||
"call": [ | ||
"NoOp" | ||
] | ||
}, | ||
"readonly": false, | ||
"events": [], | ||
"recommendations": {} | ||
}, | ||
{ | ||
"name": "createMethod", | ||
"args": [], | ||
"returns": { | ||
"type": "void" | ||
}, | ||
"actions": { | ||
"create": [ | ||
"NoOp" | ||
], | ||
"call": [] | ||
}, | ||
"readonly": false, | ||
"events": [], | ||
"recommendations": {} | ||
}, | ||
{ | ||
"name": "allActions", | ||
"args": [], | ||
"returns": { | ||
"type": "void" | ||
}, | ||
"actions": { | ||
"create": [], | ||
"call": [ | ||
"NoOp", | ||
"OptIn", | ||
"CloseOut", | ||
"DeleteApplication", | ||
"UpdateApplication" | ||
] | ||
}, | ||
"readonly": false, | ||
"events": [], | ||
"recommendations": {} | ||
}, | ||
{ | ||
"name": "overrideReadonlyName", | ||
"args": [], | ||
"returns": { | ||
"type": "uint64" | ||
}, | ||
"actions": { | ||
"create": [], | ||
"call": [ | ||
"NoOp" | ||
] | ||
}, | ||
"readonly": true, | ||
"events": [], | ||
"recommendations": {} | ||
}, | ||
{ | ||
"name": "methodWithDefaults", | ||
"args": [ | ||
{ | ||
"type": "uint64", | ||
"name": "a", | ||
"defaultValue": { | ||
"source": "global", | ||
"data": "Z2xvYmFsVmFsdWU=", | ||
"type": "AVMString" | ||
} | ||
}, | ||
{ | ||
"type": "uint64", | ||
"name": "b", | ||
"defaultValue": { | ||
"source": "method", | ||
"data": "readonly()uint64" | ||
} | ||
}, | ||
{ | ||
"type": "uint64", | ||
"name": "c" | ||
} | ||
], | ||
"returns": { | ||
"type": "uint64" | ||
}, | ||
"actions": { | ||
"create": [], | ||
"call": [ | ||
"NoOp" | ||
] | ||
}, | ||
"readonly": false, | ||
"events": [], | ||
"recommendations": {} | ||
} | ||
], | ||
"arcs": [ | ||
22, | ||
28 | ||
], | ||
"networks": {}, | ||
"state": { | ||
"schema": { | ||
"global": { | ||
"ints": 1, | ||
"bytes": 0 | ||
}, | ||
"local": { | ||
"ints": 0, | ||
"bytes": 0 | ||
} | ||
}, | ||
"keys": { | ||
"global": { | ||
"globalValue": { | ||
"keyType": "AVMString", | ||
"valueType": "AVMUint64", | ||
"key": "Z2xvYmFsVmFsdWU=" | ||
} | ||
}, | ||
"local": {}, | ||
"box": {} | ||
}, | ||
"maps": { | ||
"global": {}, | ||
"local": {}, | ||
"box": {} | ||
} | ||
}, | ||
"bareActions": { | ||
"create": [], | ||
"call": [] | ||
}, | ||
"sourceInfo": { | ||
"approval": { | ||
"sourceInfo": [ | ||
{ | ||
"pc": [ | ||
108, | ||
123, | ||
148, | ||
168 | ||
], | ||
"errorMessage": "OnCompletion is not NoOp" | ||
}, | ||
{ | ||
"pc": [ | ||
128 | ||
], | ||
"errorMessage": "can only call when creating" | ||
}, | ||
{ | ||
"pc": [ | ||
113, | ||
138, | ||
153, | ||
173 | ||
], | ||
"errorMessage": "can only call when not creating" | ||
} | ||
], | ||
"pcOffsetMethod": "none" | ||
}, | ||
"clear": { | ||
"sourceInfo": [], | ||
"pcOffsetMethod": "none" | ||
} | ||
}, | ||
"source": { | ||
"approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWJpLWRlY29yYXRvcnMuYWxnby50czo6QWJpRGVjb3JhdG9ycy5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6OkFiaURlY29yYXRvcnMuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hYmktZGVjb3JhdG9ycy5hbGdvLnRzOjQKICAgIC8vIGV4cG9ydCBkZWZhdWx0IGNsYXNzIEFiaURlY29yYXRvcnMgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hYmktZGVjb3JhdG9ycy5hbGdvLnRzOjE2CiAgICAvLyBnbG9iYWxWYWx1ZSA9IEdsb2JhbFN0YXRlKHsgaW5pdGlhbFZhbHVlOiBVaW50NjQoMTIzKSB9KQogICAgcHVzaGJ5dGVzICJnbG9iYWxWYWx1ZSIKICAgIHB1c2hpbnQgMTIzIC8vIDEyMwogICAgYXBw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gLy8gNQogICAgcmV0c3ViCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6OkFiaURlY29yYXRvcnMubWV0aG9kV2l0aERlZmF1bHRzKGE6IHVpbnQ2NCwgYjogdWludDY0LCBjOiB1aW50NjQpIC0+IHVpbnQ2NDoKbWV0aG9kV2l0aERlZmF1bHRzOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6MTgtMTkKICAgIC8vIEBhYmltZXRob2QoeyBkZWZhdWx0QXJndW1lbnRzOiB7IGE6IHsgZnJvbTogJ2dsb2JhbFZhbHVlJyB9LCBiOiB7IGZyb206ICdyZWFkb25seScgfSwgYzogeyBjb25zdGFudDogMTQ1IH0gfSB9KQogICAgLy8gcHVibGljIG1ldGhvZFdpdGhEZWZhdWx0cyhhOiB1aW50NjQsIGI6IHVpbnQ2NCwgYzogdWludDY0KTogdWludDY0IHsKICAgIHByb3RvIDMgMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6MjAKICAgIC8vIHJldHVybiBhICogYiArIGMKICAgIGZyYW1lX2RpZyAtMwogICAgZnJhbWVfZGlnIC0yCiAgICAqCiAgICBmcmFtZV9kaWcgLTEKICAgICsKICAgIHJldHN1Ygo=", | ||
"clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWJpLWRlY29yYXRvcnMuYWxnby50czo6QWJpRGVjb3JhdG9ycy5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" | ||
}, | ||
"events": [], | ||
"templateVariables": {} | ||
} |
Oops, something went wrong.