Skip to content

Conversation

@DanielOneSinger
Copy link

add V5R1 support

@spookyahell
Copy link

spookyahell commented Sep 2, 2024

This looks like it might be related to W5, am I right?

Weird how the versioning is so confusing on the consumer/end-user's side.
I guess they're trying to transition to something more simple with the W5 naming scheme.

Presumably the next iteration would be W6; if it's not we need to start marching on the streets and demand answers.

@sann05
Copy link

sann05 commented Sep 8, 2024

I'm not so deep into the TON understanding, but I tried to send Jettons using your code for V5 R1 and it failed. I tested the same code for V4 R2, and it runs correctly.

PS. Yes, I use TonTools in the example, but it uses tonsdk under the hood.

Lib versions:

  • ToonTools: yungwine:master (sha: 030fb8e7cd56dc3bcb392b171a4546bb3ad5f6de)
  • tonsdk: your branch: DanielOneSinger:v5r1 (sha: 14fbe9967564f188b495e2508984ec76446ff9c3)

Here is the code:

JETTON_MASTER = 'EQBjVEEbSy59Tx5mKB-f1FNxgVE8yu6Pv5bTcQZxM17zrG9N'
DESITNATION_ADDRESS = 'kQAWYoF6lJd_Iom0E2XErBFXbq5143F7JfebDKEenX8jUW57'
MNEMONICS = [...]
API_KEY = ""

async def test_send_jetton():
    from TonTools.Contracts.Wallet import Wallet
    from TonTools.Contracts.Jetton import Jetton


    client = TonCenterClient(
        key=API_KEY,
        orbs_access=True,
        testnet=True
    )

    jetton = Jetton(JETTON_MASTER, provider=client)
    my_wallet = Wallet(
        provider=client,
        mnemonics=MNEMONICS,
        version="v5r1")

    response = await my_wallet.transfer_jetton(
        destination_address=DESITNATION_ADDRESS,
        jetton_master_address=jetton.address,
        jettons_amount=500,
        fee=0.16)
    response_dict = await response.json()
    pprint(response_dict)


if __name__ == '__main__':
    import asyncio

    asyncio.run(test_send_jetton())

The error

{'code': 500,
 'error': 'LITE_SERVER_UNKNOWN: cannot apply external message to current state '
          ': External message was not accepted\n'
          'Cannot run message on account: inbound external message rejected by '
          'transaction '
          '0D4DFE6B7513159853DC247BDA6B18A8951244ACC2D6E05F21CF11FABD2B82C2:\n'
          'exitcode=138, steps=9, gas_used=0\n'
          'VM Log (truncated):\n'
          '...execute SETCP 0\n'
          'execute DICTPUSHCONST 19 (xC_,1)\n'
          'execute DICTIGETJMPZ\n'
          'execute implicit JMPREF\n'
          'execute DUP\n'
          'execute PLDU 32\n'
          'execute PUSHINT 1936287598\n'
          'execute EQUAL\n'
          'execute THROWIFNOT 138\n'
          'default exception handler, terminating vm with exit code 138\n',
 'ok': False}

@DanielOneSinger
Copy link
Author

I'll take a look,wil update later time

@MujurID
Copy link

MujurID commented Sep 16, 2024

🚀

2 similar comments
@irhamdz
Copy link

irhamdz commented Oct 8, 2024

🚀

@NabiKAZ
Copy link

NabiKAZ commented Nov 9, 2024

🚀

@SP-l33t
Copy link

SP-l33t commented Nov 24, 2024

Any updates on this?

@t311me t311me mentioned this pull request Feb 5, 2025
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.

7 participants