Skip to content

Conversation

@skywardboundd
Copy link
Contributor

Copilot AI review requested due to automatic review settings November 27, 2025 23:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive examples demonstrating various TVM exit codes for the TON blockchain documentation. It creates a new standalone project in tvm/exit-codes/ that showcases how different error conditions manifest as exit codes during smart contract execution.

Key changes:

  • Introduces 13 Tolk smart contracts, each demonstrating a specific TVM exit code (compute phase: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -14; action phase: 33, 34)
  • Implements comprehensive test suite verifying correct exit code behavior
  • Provides complete project scaffolding with TypeScript wrappers, compilation configs, and documentation

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tvm/exit-codes/package.json Defines project dependencies and scripts for the exit codes examples
tvm/exit-codes/tsconfig.json TypeScript compiler configuration
tvm/exit-codes/jest.config.ts Jest test framework configuration
tvm/exit-codes/jest.setup.ts Jest setup to build Tact contracts before tests
tvm/exit-codes/.prettierrc Code formatting configuration
tvm/exit-codes/.prettierignore Files excluded from Prettier formatting
tvm/exit-codes/.gitignore Git ignore patterns for build artifacts and IDE files
tvm/exit-codes/README.md Documentation explaining the project structure and usage
tvm/exit-codes/contracts/2.tolk Demonstrates exit code 2 (stack underflow)
tvm/exit-codes/contracts/3.tolk Demonstrates exit code 3 (stack overflow)
tvm/exit-codes/contracts/4.tolk Demonstrates exit code 4 (integer overflow/division by zero)
tvm/exit-codes/contracts/5.tolk Demonstrates exit code 5 (integer out of expected range)
tvm/exit-codes/contracts/6.tolk Demonstrates exit code 6 (invalid opcode)
tvm/exit-codes/contracts/7.tolk Demonstrates exit code 7 (type check error)
tvm/exit-codes/contracts/8.tolk Demonstrates exit code 8 (cell overflow)
tvm/exit-codes/contracts/9.tolk Demonstrates exit code 9 (cell underflow)
tvm/exit-codes/contracts/10.tolk Demonstrates exit code 10 (dictionary error)
tvm/exit-codes/contracts/11.tolk Demonstrates exit code 11 (unknown opcode in compute phase)
tvm/exit-codes/contracts/-14.tolk Demonstrates exit code -14 (out of gas)
tvm/exit-codes/contracts/33.tolk Demonstrates exit code 33 (action list invalid)
tvm/exit-codes/contracts/34.tolk Demonstrates exit code 34 (action invalid or not supported)
tvm/exit-codes/wrappers/main.ts TypeScript wrapper class for SimpleContract
tvm/exit-codes/wrappers/*.compile.ts Compilation configurations for each contract
tvm/exit-codes/tests/main.spec.ts Comprehensive tests verifying correct exit codes for all contracts

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skywardboundd skywardboundd marked this pull request as ready for review November 27, 2025 23:43
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TVM > Exit codes] Change code samples to use Tolk

2 participants