tact-lang / tact-docs

Tact main documentation
https://docs.tact-lang.org
54 stars 41 forks source link

Re-write `exit-codes.mdx` into an article of the Book #106

Open novusnota opened 6 months ago

novusnota commented 6 months ago

Great tact-fireworks may suit as a starting point. Furthermore, the Fireworks contract should be split into many smaller contracts (or receive() functions) to showcase one error and exit code per one transaction, as suggested by @anton-trunov.

Additional things to fix:

Additional links:

Also — describe what "cannot be faked" means for exit code -14, see: https://github.com/ton-blockchain/ton/blob/20758d6bdd0c1327091287e8a620f660d1a9f4da/crypto/vm/vm.cpp#L492.

Also, describe what they are in general and how they occur.

Related issue: #101

anton-trunov commented 5 months ago

Tact generates exit codes for require depending on the concrete error message string and thus the exit codes can be arbitrary