Skip to content
This repository was archived by the owner on Jun 30, 2026. It is now read-only.
This repository was archived by the owner on Jun 30, 2026. It is now read-only.

Invalid parsing of PUSHINT #8

Description

@ProgramCrafter

PUSHINT 10 is shown as -6 PUSHINT.

Example contract: https://tonscan.org/address/EQArNPVIjXw_ffWPuGp_61zWtIH3tzBTBnHe9ToZ4m8OkoNf#source
Code displayed on tonscan:

SETCP0
(:methods
  recv_internal: 

  recv_external: 
    3 BLKDROP
    10000000 PUSHINT
    LESS
    IFRET
    ACCEPT
    0 PUSHINT
    -6 PUSHINT
...

Code displayed on dton.io:

SETCP 0
DICTPUSHCONST 19, (xC_)
DICTIGETJMPZ {
  -1 => <{
    BLKDROP 3
    PUSHINT 10000000
    LESS
    IFRET
    ACCEPT
    PUSHINT 0
    PUSHINT 10
...

The relevant part of contract code uses only 10 and not -6:

() recv_external(int balance, int msg_value, cell msg_full, slice in_msg) {
  if (balance < 10 * 1000 * 1000) { return (); }
  accept_message();
  
  send_raw_message(begin_cell()
    .store_uint(0xA, 4)
  ...

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions