Skip to content

Commit

Permalink
feat: add error codes to reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
ex3ndr committed Feb 18, 2023
1 parent 9fc405a commit 59a0666
Show file tree
Hide file tree
Showing 70 changed files with 935 additions and 35 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## Added
- Error codes in reports

## Changed
- Change repository locations

## [0.9.2] - 2023-02-05

## Added
Expand Down
25 changes: 25 additions & 0 deletions examples/output/echo_Echo.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,28 @@ Total Get Methods: 1

## hello
Argument: src

# Error Codes
2: Stack undeflow
3: Stack overflow
4: Integer overflow
5: Integer out of expected range
6: Invalid opcode
7: Type check error
8: Cell overflow
9: Cell underflow
10: Dictionary error
13: Out of gas error
32: Method ID not found
34: Action is invalid or not supported
37: Not enough TON
38: Not enough extra-currencies
128: Null reference exception
129: Invalid serialization prefix
130: Invalid incoming message
131: Constraints error
132: Access denied
133: Contract stopped
134: Invalid argument
135: Code of a contract was not found
136: Invalid address
2 changes: 1 addition & 1 deletion examples/output/echo_Echo.pkg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"Echo","code":"te6ccgECDgEAAkoAART/APSkE/S88sgLAQIBYgIDA+TQ7aLt+3Ah10nCH5UwINcLH94C0NMDAXGwwAGRf5Fw4gH6QCJQZm8E+GECkVvgwACPMCDXScIfjyjtRNDUAfhigQEB1wABMQGAINch2zzbPMj4QgHMAQGBAQHPAMntVNsx4N7tRNDUAfhigQEB1wABMQEEBwUCAVgKCwFCyHAByx9vAAFvjG1vjAHbPG8iAcmTIW6zlgFvIlnMyegxDQIm2zzbPMj4QgHMAQGBAQHPAMntVAYHAArIAc8WyQEk+EFvJBAjXwN/AnCAQlhtbds8CAH2yHEBygFQBwHKAHABygJQBc8WUAP6AnABymgjbrMlbrOxjkx/AcoAyHABygBwAcoAJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4iRus51/AcoABCBu8tCAUATMljQDcAHKAOJwAcoAAn8BygACyVjMlzMzAXABygDiIW6zCQAwnH8BygABIG7y0IABzJUxcAHKAOLJAfsAAE27vRgnBc7D1dLK57HoTsOdZKhRtmgnCd1jUtK2R8syLTry398WI5gBJ7g2LtRNDUAfhigQEB1wABMQHbPIDAJUMchvAAFvjG1vjIt0hlbGxvLCCNs8Ads8byIByZMhbrOWAW8iWczJ6DHQDQ0AuiDXSiHXSZcgwgAiwgCxjkoDbyKAfyLPMasCoQWrAlFVtgggwgCcIKoCFdcYUDPPFkAU3llvAlNBocIAmcgBbwJQRKGqAo4SMTPCAJnUMNAg10oh10mScCDi4uhfAw==","abi":"{\"name\":\"Echo\",\"types\":[{\"name\":\"StateInit\",\"header\":null,\"fields\":[{\"name\":\"code\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":false}},{\"name\":\"data\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":false}}]},{\"name\":\"Context\",\"header\":null,\"fields\":[{\"name\":\"bounced\",\"type\":{\"kind\":\"simple\",\"type\":\"bool\",\"optional\":false}},{\"name\":\"sender\",\"type\":{\"kind\":\"simple\",\"type\":\"address\",\"optional\":false}},{\"name\":\"value\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"raw\",\"type\":{\"kind\":\"simple\",\"type\":\"slice\",\"optional\":false}}]},{\"name\":\"SendParameters\",\"header\":null,\"fields\":[{\"name\":\"bounce\",\"type\":{\"kind\":\"simple\",\"type\":\"bool\",\"optional\":false}},{\"name\":\"to\",\"type\":{\"kind\":\"simple\",\"type\":\"address\",\"optional\":false}},{\"name\":\"value\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"mode\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"body\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}},{\"name\":\"code\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}},{\"name\":\"data\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}}]}],\"receivers\":[{\"receiver\":\"internal\",\"message\":{\"kind\":\"text\"}},{\"receiver\":\"internal\",\"message\":{\"kind\":\"any\"}}],\"getters\":[{\"name\":\"hello\",\"arguments\":[{\"name\":\"src\",\"type\":{\"kind\":\"simple\",\"type\":\"string\",\"optional\":false}}],\"returnType\":{\"kind\":\"simple\",\"type\":\"string\",\"optional\":false}}],\"errors\":{\"2\":{\"message\":\"Stack undeflow\"},\"3\":{\"message\":\"Stack overflow\"},\"4\":{\"message\":\"Integer overflow\"},\"5\":{\"message\":\"Integer out of expected range\"},\"6\":{\"message\":\"Invalid opcode\"},\"7\":{\"message\":\"Type check error\"},\"8\":{\"message\":\"Cell overflow\"},\"9\":{\"message\":\"Cell underflow\"},\"10\":{\"message\":\"Dictionary error\"},\"13\":{\"message\":\"Out of gas error\"},\"32\":{\"message\":\"Method ID not found\"},\"34\":{\"message\":\"Action is invalid or not supported\"},\"37\":{\"message\":\"Not enough TON\"},\"38\":{\"message\":\"Not enough extra-currencies\"},\"128\":{\"message\":\"Null reference exception\"},\"129\":{\"message\":\"Invalid serialization prefix\"},\"130\":{\"message\":\"Invalid incoming message\"},\"131\":{\"message\":\"Constraints error\"},\"132\":{\"message\":\"Access denied\"},\"133\":{\"message\":\"Contract stopped\"},\"134\":{\"message\":\"Invalid argument\"},\"135\":{\"message\":\"Code of a contract was not found\"},\"136\":{\"message\":\"Invalid address\"}}}","init":{"code":"te6ccgEBBgEAMAABFP8A9KQT9LzyyAsBAgFiAgMCAs4EBQAJoUrd4AUAAUgAGUcAHIzAEBgQEBzwDJg=","args":[],"deployment":{"kind":"system-cell","system":"te6cckECEAEAAlQAAQHAAQEFoB5RAgEU/wD0pBP0vPLICwMCAWIIBAIBWAcFASe4Ni7UTQ1AH4YoEBAdcAATEB2zyAYCVDHIbwABb4xtb4yLdIZWxsbywgjbPAHbPG8iAcmTIW6zlgFvIlnMyegx0A8PAE27vRgnBc7D1dLK57HoTsOdZKhRtmgnCd1jUtK2R8syLTry398WI5gD5NDtou37cCHXScIflTAg1wsf3gLQ0wMBcbDAAZF/kXDiAfpAIlBmbwT4YQKRW+DAAI8wINdJwh+PKO1E0NQB+GKBAQHXAAExAYAg1yHbPNs8yPhCAcwBAYEBAc8Aye1U2zHg3u1E0NQB+GKBAQHXAAExAQ4LCQIm2zzbPMj4QgHMAQGBAQHPAMntVAoLAArIAc8WyQEk+EFvJBAjXwN/AnCAQlhtbds8DAH2yHEBygFQBwHKAHABygJQBc8WUAP6AnABymgjbrMlbrOxjkx/AcoAyHABygBwAcoAJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4iRus51/AcoABCBu8tCAUATMljQDcAHKAOJwAcoAAn8BygACyVjMlzMzAXABygDiIW6zDQAwnH8BygABIG7y0IABzJUxcAHKAOLJAfsAAULIcAHLH28AAW+MbW+MAds8byIByZMhbrOWAW8iWczJ6DEPALog10oh10mXIMIAIsIAsY5KA28igH8izzGrAqEFqwJRVbYIIMIAnCCqAhXXGFAzzxZAFN5ZbwJTQaHCAJnIAW8CUEShqgKOEjEzwgCZ1DDQINdKIddJknAg4uLoXwPxGNzp"}},"compiler":{"name":"tact","version":"0.9.1"}}
{"name":"Echo","code":"te6ccgECDgEAAkoAART/APSkE/S88sgLAQIBYgIDA+TQ7aLt+3Ah10nCH5UwINcLH94C0NMDAXGwwAGRf5Fw4gH6QCJQZm8E+GECkVvgwACPMCDXScIfjyjtRNDUAfhigQEB1wABMQGAINch2zzbPMj4QgHMAQGBAQHPAMntVNsx4N7tRNDUAfhigQEB1wABMQEEBwUCAVgKCwFCyHAByx9vAAFvjG1vjAHbPG8iAcmTIW6zlgFvIlnMyegxDQIm2zzbPMj4QgHMAQGBAQHPAMntVAYHAArIAc8WyQEk+EFvJBAjXwN/AnCAQlhtbds8CAH2yHEBygFQBwHKAHABygJQBc8WUAP6AnABymgjbrMlbrOxjkx/AcoAyHABygBwAcoAJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4iRus51/AcoABCBu8tCAUATMljQDcAHKAOJwAcoAAn8BygACyVjMlzMzAXABygDiIW6zCQAwnH8BygABIG7y0IABzJUxcAHKAOLJAfsAAE27vRgnBc7D1dLK57HoTsOdZKhRtmgnCd1jUtK2R8syLTry398WI5gBJ7g2LtRNDUAfhigQEB1wABMQHbPIDAJUMchvAAFvjG1vjIt0hlbGxvLCCNs8Ads8byIByZMhbrOWAW8iWczJ6DHQDQ0AuiDXSiHXSZcgwgAiwgCxjkoDbyKAfyLPMasCoQWrAlFVtgggwgCcIKoCFdcYUDPPFkAU3llvAlNBocIAmcgBbwJQRKGqAo4SMTPCAJnUMNAg10oh10mScCDi4uhfAw==","abi":"{\"name\":\"Echo\",\"types\":[{\"name\":\"StateInit\",\"header\":null,\"fields\":[{\"name\":\"code\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":false}},{\"name\":\"data\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":false}}]},{\"name\":\"Context\",\"header\":null,\"fields\":[{\"name\":\"bounced\",\"type\":{\"kind\":\"simple\",\"type\":\"bool\",\"optional\":false}},{\"name\":\"sender\",\"type\":{\"kind\":\"simple\",\"type\":\"address\",\"optional\":false}},{\"name\":\"value\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"raw\",\"type\":{\"kind\":\"simple\",\"type\":\"slice\",\"optional\":false}}]},{\"name\":\"SendParameters\",\"header\":null,\"fields\":[{\"name\":\"bounce\",\"type\":{\"kind\":\"simple\",\"type\":\"bool\",\"optional\":false}},{\"name\":\"to\",\"type\":{\"kind\":\"simple\",\"type\":\"address\",\"optional\":false}},{\"name\":\"value\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"mode\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"body\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}},{\"name\":\"code\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}},{\"name\":\"data\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}}]}],\"receivers\":[{\"receiver\":\"internal\",\"message\":{\"kind\":\"text\"}},{\"receiver\":\"internal\",\"message\":{\"kind\":\"any\"}}],\"getters\":[{\"name\":\"hello\",\"arguments\":[{\"name\":\"src\",\"type\":{\"kind\":\"simple\",\"type\":\"string\",\"optional\":false}}],\"returnType\":{\"kind\":\"simple\",\"type\":\"string\",\"optional\":false}}],\"errors\":{\"2\":{\"message\":\"Stack undeflow\"},\"3\":{\"message\":\"Stack overflow\"},\"4\":{\"message\":\"Integer overflow\"},\"5\":{\"message\":\"Integer out of expected range\"},\"6\":{\"message\":\"Invalid opcode\"},\"7\":{\"message\":\"Type check error\"},\"8\":{\"message\":\"Cell overflow\"},\"9\":{\"message\":\"Cell underflow\"},\"10\":{\"message\":\"Dictionary error\"},\"13\":{\"message\":\"Out of gas error\"},\"32\":{\"message\":\"Method ID not found\"},\"34\":{\"message\":\"Action is invalid or not supported\"},\"37\":{\"message\":\"Not enough TON\"},\"38\":{\"message\":\"Not enough extra-currencies\"},\"128\":{\"message\":\"Null reference exception\"},\"129\":{\"message\":\"Invalid serialization prefix\"},\"130\":{\"message\":\"Invalid incoming message\"},\"131\":{\"message\":\"Constraints error\"},\"132\":{\"message\":\"Access denied\"},\"133\":{\"message\":\"Contract stopped\"},\"134\":{\"message\":\"Invalid argument\"},\"135\":{\"message\":\"Code of a contract was not found\"},\"136\":{\"message\":\"Invalid address\"}}}","init":{"code":"te6ccgEBBgEAMAABFP8A9KQT9LzyyAsBAgFiAgMCAs4EBQAJoUrd4AUAAUgAGUcAHIzAEBgQEBzwDJg=","args":[],"deployment":{"kind":"system-cell","system":"te6cckECEAEAAlQAAQHAAQEFoB5RAgEU/wD0pBP0vPLICwMCAWIIBAIBWAcFASe4Ni7UTQ1AH4YoEBAdcAATEB2zyAYCVDHIbwABb4xtb4yLdIZWxsbywgjbPAHbPG8iAcmTIW6zlgFvIlnMyegx0A8PAE27vRgnBc7D1dLK57HoTsOdZKhRtmgnCd1jUtK2R8syLTry398WI5gD5NDtou37cCHXScIflTAg1wsf3gLQ0wMBcbDAAZF/kXDiAfpAIlBmbwT4YQKRW+DAAI8wINdJwh+PKO1E0NQB+GKBAQHXAAExAYAg1yHbPNs8yPhCAcwBAYEBAc8Aye1U2zHg3u1E0NQB+GKBAQHXAAExAQ4LCQIm2zzbPMj4QgHMAQGBAQHPAMntVAoLAArIAc8WyQEk+EFvJBAjXwN/AnCAQlhtbds8DAH2yHEBygFQBwHKAHABygJQBc8WUAP6AnABymgjbrMlbrOxjkx/AcoAyHABygBwAcoAJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4iRus51/AcoABCBu8tCAUATMljQDcAHKAOJwAcoAAn8BygACyVjMlzMzAXABygDiIW6zDQAwnH8BygABIG7y0IABzJUxcAHKAOLJAfsAAULIcAHLH28AAW+MbW+MAds8byIByZMhbrOWAW8iWczJ6DEPALog10oh10mXIMIAIsIAsY5KA28igH8izzGrAqEFqwJRVbYIIMIAnCCqAhXXGFAzzxZAFN5ZbwJTQaHCAJnIAW8CUEShqgKOEjEzwgCZ1DDQINdKIddJknAg4uLoXwPxGNzp"}},"compiler":{"name":"tact","version":"0.9.2"}}
26 changes: 26 additions & 0 deletions examples/output/increment_IncrementContract.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,29 @@ Total Get Methods: 2
## counters

## counters2

# Error Codes
2: Stack undeflow
3: Stack overflow
4: Integer overflow
5: Integer out of expected range
6: Invalid opcode
7: Type check error
8: Cell overflow
9: Cell underflow
10: Dictionary error
13: Out of gas error
32: Method ID not found
34: Action is invalid or not supported
37: Not enough TON
38: Not enough extra-currencies
128: Null reference exception
129: Invalid serialization prefix
130: Invalid incoming message
131: Constraints error
132: Access denied
133: Contract stopped
134: Invalid argument
135: Code of a contract was not found
136: Invalid address
52777: Empty counter
2 changes: 1 addition & 1 deletion examples/output/increment_IncrementContract.pkg

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions examples/output/jetton_JettonDefaultWallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,32 @@ Signature: `Mint{amount:int257}`
Total Get Methods: 1

## get_wallet_data

# Error Codes
2: Stack undeflow
3: Stack overflow
4: Integer overflow
5: Integer out of expected range
6: Invalid opcode
7: Type check error
8: Cell overflow
9: Cell underflow
10: Dictionary error
13: Out of gas error
32: Method ID not found
34: Action is invalid or not supported
37: Not enough TON
38: Not enough extra-currencies
128: Null reference exception
129: Invalid serialization prefix
130: Invalid incoming message
131: Constraints error
132: Access denied
133: Contract stopped
134: Invalid argument
135: Code of a contract was not found
136: Invalid address
4429: Invalid sender
13650: Invalid bounced message
16059: Invalid value
62972: Invalid balance
Loading

0 comments on commit 59a0666

Please sign in to comment.