psylopunk / pytonlib

Simple python client for The Open Network
https://pydocs.xton.me/
MIT License
93 stars 19 forks source link

Coin transferring / wallet activity state / wallet balance getting DON'T work #40

Open sergorl opened 5 months ago

sergorl commented 5 months ago

Hi, friends, I'm researching TON ecosystems via pytonlib and here is my code snippet about coin transferring from one wallet to another inside testnet:

import asyncio
from ton import TonlibClient

OTHER_WALLET = 'EQBFOvCfYbwqHa0wgynfp420irRQXehxYIgoxPQSUYj69BmL'

async def main():

    client = TonlibClient()

    TonlibClient.enable_unaudited_binaries()
    await client.init_tonlib()

    mnemonics = ['boost', 'federal', 'immense', 'youth', 'kind', 'depart', 'search', 'axis', 'scissors', 'accuse',
                 'trade', 'pink', 'blue', 'year', 'screen', 'luggage', 'core', 'dentist', 'wool', 'congress', 'seminar',
                 'diamond', 'either', 'fish']

    mnemonics = ' '.join(mnemonics)

    wallet = await client.import_wallet(mnemonics)

    address = wallet.address

    account = await client.find_account(address)
    balance = await account.get_balance()
    print(f'{account.account_address} balance = {balance}')

    # await wallet.transfer(OTHER_WALLET, client.to_nano(0.01), comment='test', allow_send_to_uninited=True)
    await wallet.transfer(OTHER_WALLET, client.to_nano(0.01), comment='test')

    # View account
    account = await client.find_account( wallet.address)
    # View transactions of an account
    txs = await account.get_transactions()  # Returns a list of TL Objects (transactions)

    print(txs)

if __name__ == '__main__':

    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())
    loop.close()

Active wallet source with non zero balance is here: image

Other wallet destination with non zero balance is here: image

Both wallets are active and each has a non zero balance.

And I discovered many things in wallet don't work inside testnet, e.g.:

More details:

C:\Users\sorlyanskiy\AppData\Local\anaconda3\python.exe C:\repositories\ton-research\wallet-3.py 
C:\repositories\ton-research\wallet-3.py:42: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
[ 4][t 1][2024-06-11 09:05:14.8409833][TonlibClient.cpp:1479][!Tonlib][&tonlib_query]   Tonlib got query [id:1] init {
  options = options {
    config = config {
      config = "{"@type": "config.global", "dht": {"@type": "dht.config.global", "k": 6, "a": 3, "static_nodes": {"@type": "dht.nodes", "nodes": [{"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "6PGkPQSbyFp12esf1NqmDOaLoFA8i9+Mp5+cAx5wtTU="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -1185526007, "port": 22096}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "L4N1+dzXLlkmT5iPnvsmsixzXU0L6kPKApqMdcrGP5d9ssMhn69SzHFK+yIzvG6zQ9oRb4TnqPBaKShjjj2OBg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "4R0C/zU56k+x2HGMsLWjX2rP/SpoTPIHSSAmidGlsb8="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -1952265919, "port": 14395}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "0uwWyCFn2KjPnnlbSFYXLZdwIakaSgI9WyRo87J3iCGwb5TvJSztgA224A9kNAXeutOrXMIPYv1b8Zt8ImsrCg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "/YDNd+IwRUgL0mq21oC0L3RxrS8gTu0nciSPUrhqR78="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -1402455171, "port": 14432}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "6+oVk6HDtIFbwYi9khCc8B+fTFceBUo1PWZDVTkb4l84tscvr5QpzAkdK7sS5xGzxM7V7YYQ6gUQPrsP9xcLAw=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "DA0H568bb+LoO2LGY80PgPee59jTPCqqSJJzt1SH+KE="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -1402397332, "port": 14583}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "cL79gDTrixhaM9AlkCdZWccCts7ieQYQBmPxb/R7d7zHw3bEHL8Le96CFJoB1KHu8C85iDpFK8qlrGl1Yt/ZDg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "MJr8xja0xpu9DoisFXBrkNHNx1XozR7HHw9fJdSyEdo="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -2018147130, "port": 6302}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "XcR5JaWcf4QMdI8urLSc1zwv5+9nCuItSE1EDa0dSwYF15R/BtJoKU5YHA4/T8SiO18aVPQk2SL1pbhevuMrAQ=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "Fhldu4zlnb20/TUj9TXElZkiEmbndIiE/DXrbGKu+0c="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -2018147075, "port": 6302}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "nUGB77UAkd2+ZAL5PgInb3TvtuLLXJEJ2icjAUKLv4qIGB3c/O9k/v0NKwSzhsMP0ljeTGbcIoMDw24qf3goCg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "gzUNJnBJhdpooYCE8juKZo2y4tYDIQfoCvFm0yBr7y0="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": 89013260, "port": 54390}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "LCrCkjmkMn6AZHW2I+oRm1gHK7CyBPfcb6LwsltskCPpNECyBl1GxZTX45n0xZtLgyBd/bOqMPBfawpQwWt1BA=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "jXiLaOQz1HPayilWgBWhV9xJhUIqfU95t+KFKQPIpXg="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": 94452896, "port": 12485}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "fKSZh9nXMx+YblkQXn3I/bndTD0JZ1yAtK/tXPIGruNglpe9sWMXR+8fy3YogPhLJMdjNiMom1ya+tWG7qvBAQ=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "vhFPq+tgjJi+4ZbEOHBo4qjpqhBdSCzNZBdgXyj3NK8="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": 85383775, "port": 36752}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "kBwAIgJVkz8AIOGoZcZcXWgNmWq8MSBWB2VhS8Pd+f9LLPIeeFxlDTtwAe8Kj7NkHDSDC+bPXLGQZvPv0+wHCg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "sbsuMcdyYFSRQ0sG86/n+ZQ5FX3zOWm1aCVuHwXdgs0="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": 759132846, "port": 50187}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "9FJwbFw3IECRFkb9bA54YaexjDmlNBArimWkh+BvW88mjm3K2i5V2uaBPS3GubvXWOwdHLE2lzQBobgZRGMyCg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "aeMgdMdkkbkfAS4+n4BEGgtqhkf2/zXrVWWECOJ/h3A="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -1481887565, "port": 25975}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "z5ogivZWpQchkS4UR4wB7i2pfOpMwX9Nd/USxinL9LvJPa+/Aw3F1AytR9FX0BqDftxIYvblBYAB5JyAmlj+AA=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "rNzhnAlmtRn9rTzW6o2568S6bbOXly7ddO1olDws5wM="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -2134428422, "port": 45943}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "sn/+ZfkfCSw2bHnEnv04AXX/Goyw7+StHBPQOdPr+wvdbaJ761D7hyiMNdQGbuZv2Ep2cXJpiwylnZItrwdUDg=="}]}}, "liteservers": [{"ip": 84478511, "port": 19949, "id": {"@type": "pub.ed25519", "key": "n4VDnSCUuSpjnCyUk9e3QOOd6o0ItSWYbTnW3Wnn8wk="}}], "validator": {"@type": "validator.config.global", "zero_state": {"workchain": -1, "shard": -9223372036854775808, "seqno": 0, "root_hash": "F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=", "file_hash": "XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24="}, "init_block": {"root_hash": "VpWyfNOLm8Rqt6CZZ9dZGqJRO3NyrlHHYN1k1oLbJ6g=", "seqno": 34835953, "file_hash": "8o12KX54BtJM8RERD1J97Qe1ZWk61LIIyXydlBnixK8=", "workchain": -1, "shard": -9223372036854775808}, "hardforks": [{"file_hash": "t/9VBPODF7Zdh4nsnA49dprO69nQNMqYL+zk5bCjV/8=", "seqno": 8536841, "root_hash": "08Kpc9XxrMKC6BF/FeNHPS3MEL1/Vi/fQU/C9ELUrkc=", "workchain": -1, "shard": -9223372036854775808}]}}"
      blockchain_name = ""
      use_callbacks_for_network = false
      ignore_cache = false
    }
    keystore_type = keyStoreTypeDirectory {
      directory = ".keystore"
    }
  }
}
[ 4][t 0][2024-06-11 09:05:14.8410403][Client.cpp:78][&tonlib_requests] Begin to wait for updates with timeout 0.100000
[ 4][t 1][2024-06-11 09:05:14.8462842][TonlibClient.cpp:4376][!Tonlib]  loading libraries from disk cache
[ 3][t 1][2024-06-11 09:05:14.8511325][TonlibClient.cpp:2093][!Tonlib]  Use blockchain name from MASTER config: 'mainnet' (was '')
[ 4][t 1][2024-06-11 09:05:14.8512053][LastBlockStorage.cpp:54][!Tonlib][&last_block]   Save to cache: [last_block:(-1,8000000000000000,38297676):7BA50CEA643B51B4823744080C41173CED6C9837B428CB7CAC1F98A87596F21C:981DF1B6A95EF21959455D95600DB5E5CBFF879FB2D9C533D3D9690189685114][last_key_block:(-1,8000000000000000,38286476):B32CE94EE9EF8A515AF2C30745405D2A58444AFDA64C63BB533EA59E56E2F0C0:547E79257649A91013323D633AD37813CEF0079524FD6E7F7C97987295FE4F7C][utime:1718094240][init_block:(-1,8000000000000000,34835953):5695B27CD38B9BC46AB7A09967D7591AA2513B7372AE51C760DD64D682DB27A8:F28D76297E7806D24CF111110F527DED07B565693AD4B208C97C9D9419E2C4AF]
[ 4][t 1][2024-06-11 09:05:14.8547038][LastBlock.cpp:58][!Tonlib][&last_block]  State: [last_block:(-1,8000000000000000,38286476):B32CE94EE9EF8A515AF2C30745405D2A58444AFDA64C63BB533EA59E56E2F0C0:547E79257649A91013323D633AD37813CEF0079524FD6E7F7C97987295FE4F7C][last_key_block:(-1,8000000000000000,38286476):B32CE94EE9EF8A515AF2C30745405D2A58444AFDA64C63BB533EA59E56E2F0C0:547E79257649A91013323D633AD37813CEF0079524FD6E7F7C97987295FE4F7C][utime:1718094240][init_block:(-1,8000000000000000,34835953):5695B27CD38B9BC46AB7A09967D7591AA2513B7372AE51C760DD64D682DB27A8:F28D76297E7806D24CF111110F527DED07B565693AD4B208C97C9D9419E2C4AF]
[ 4][t 1][2024-06-11 09:05:14.8547688][LastConfig.cpp:44][!Tonlib][&last_block] State: 
[ 4][t 1][2024-06-11 09:05:14.8548044][TonlibClient.cpp:1456][!Tonlib][&tonlib_query id != 0]   Tonlib answer query [id:1] options_info {
  config_info = options_configInfo {
    default_wallet_id = 698983191
    default_rwallet_init_public_key = "Puasxr0QfFZZnYISRphVse7XHKfW7pZU5SJarVHXvQ+rpzkD"
  }
}
[ 4][t 0][2024-06-11 09:05:14.8548180][Client.cpp:84][&tonlib_requests] End to wait for updates, returning object 1 000001ECFD6844A0
[ 4][t 1][2024-06-11 09:05:14.8556418][TonlibClient.cpp:1479][!Tonlib][&tonlib_query]   Tonlib got query [id:2] setLogVerbosityLevel {
  new_verbosity_level = 0
}
[ 4][t 0][2024-06-11 09:05:14.8556436][Client.cpp:78][&tonlib_requests] Begin to wait for updates with timeout 0.100000
[ 4][t 1][2024-06-11 09:05:14.8556662][TonlibClient.cpp:1518][!Tonlib][&tonlib_query]   Tonlib got static query setLogVerbosityLevel {
  new_verbosity_level = 0
}
{
    "@type": "accountAddress",
    "account_address": "EQDux15PgHF1MzuOqtF0v3oJ-GSClp4ogr7uQDqauK57L9xn"
} balance = -1
Traceback (most recent call last):
  File "C:\repositories\ton-research\wallet-3.py", line 43, in <module>
    loop.run_until_complete(main())
  File "C:\Users\sorlyanskiy\AppData\Local\anaconda3\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
  File "C:\repositories\ton-research\wallet-3.py", line 30, in main
    await wallet.transfer(OTHER_WALLET, client.to_nano(0.01), comment='test')
  File "C:\Users\sorlyanskiy\AppData\Local\anaconda3\lib\site-packages\ton\account\wallet_methods.py", line 86, in transfer
    return await self.send_messages(messages, **kwargs)
  File "C:\Users\sorlyanskiy\AppData\Local\anaconda3\lib\site-packages\ton\account\wallet_methods.py", line 51, in send_messages
    query_id = (await self.client.execute(query)).id
  File "C:\Users\sorlyanskiy\AppData\Local\anaconda3\lib\site-packages\ton\client\tonlib_methods.py", line 36, in execute
    result = await self.tonlib_wrapper.execute(query, timeout=(timeout or self.default_timeout))
  File "C:\Users\sorlyanskiy\AppData\Local\anaconda3\lib\site-packages\ton\tonlibjson.py", line 175, in execute
    result = await self._execute(query, timeout=timeout)
ton.tonlibjson.TonlibError: DANGEROUS_TRANSACTION: Transfer to uninited wallet

Process finished with exit code 1
C:\repositories\ton-research\wallet-3.py:42: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
[ 4][t 0][2024-06-11 09:13:30.6743831][Client.cpp:78][&tonlib_requests] Begin to wait for updates with timeout 0.100000
[ 4][t 1][2024-06-11 09:13:30.6832067][TonlibClient.cpp:1479][!Tonlib][&tonlib_query]   Tonlib got query [id:1] init {
  options = options {
    config = config {
      config = "{"@type": "config.global", "dht": {"@type": "dht.config.global", "k": 6, "a": 3, "static_nodes": {"@type": "dht.nodes", "nodes": [{"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "6PGkPQSbyFp12esf1NqmDOaLoFA8i9+Mp5+cAx5wtTU="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -1185526007, "port": 22096}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "L4N1+dzXLlkmT5iPnvsmsixzXU0L6kPKApqMdcrGP5d9ssMhn69SzHFK+yIzvG6zQ9oRb4TnqPBaKShjjj2OBg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "4R0C/zU56k+x2HGMsLWjX2rP/SpoTPIHSSAmidGlsb8="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -1952265919, "port": 14395}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "0uwWyCFn2KjPnnlbSFYXLZdwIakaSgI9WyRo87J3iCGwb5TvJSztgA224A9kNAXeutOrXMIPYv1b8Zt8ImsrCg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "/YDNd+IwRUgL0mq21oC0L3RxrS8gTu0nciSPUrhqR78="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -1402455171, "port": 14432}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "6+oVk6HDtIFbwYi9khCc8B+fTFceBUo1PWZDVTkb4l84tscvr5QpzAkdK7sS5xGzxM7V7YYQ6gUQPrsP9xcLAw=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "DA0H568bb+LoO2LGY80PgPee59jTPCqqSJJzt1SH+KE="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -1402397332, "port": 14583}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "cL79gDTrixhaM9AlkCdZWccCts7ieQYQBmPxb/R7d7zHw3bEHL8Le96CFJoB1KHu8C85iDpFK8qlrGl1Yt/ZDg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "MJr8xja0xpu9DoisFXBrkNHNx1XozR7HHw9fJdSyEdo="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -2018147130, "port": 6302}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "XcR5JaWcf4QMdI8urLSc1zwv5+9nCuItSE1EDa0dSwYF15R/BtJoKU5YHA4/T8SiO18aVPQk2SL1pbhevuMrAQ=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "Fhldu4zlnb20/TUj9TXElZkiEmbndIiE/DXrbGKu+0c="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -2018147075, "port": 6302}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "nUGB77UAkd2+ZAL5PgInb3TvtuLLXJEJ2icjAUKLv4qIGB3c/O9k/v0NKwSzhsMP0ljeTGbcIoMDw24qf3goCg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "gzUNJnBJhdpooYCE8juKZo2y4tYDIQfoCvFm0yBr7y0="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": 89013260, "port": 54390}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "LCrCkjmkMn6AZHW2I+oRm1gHK7CyBPfcb6LwsltskCPpNECyBl1GxZTX45n0xZtLgyBd/bOqMPBfawpQwWt1BA=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "jXiLaOQz1HPayilWgBWhV9xJhUIqfU95t+KFKQPIpXg="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": 94452896, "port": 12485}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "fKSZh9nXMx+YblkQXn3I/bndTD0JZ1yAtK/tXPIGruNglpe9sWMXR+8fy3YogPhLJMdjNiMom1ya+tWG7qvBAQ=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "vhFPq+tgjJi+4ZbEOHBo4qjpqhBdSCzNZBdgXyj3NK8="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": 85383775, "port": 36752}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "kBwAIgJVkz8AIOGoZcZcXWgNmWq8MSBWB2VhS8Pd+f9LLPIeeFxlDTtwAe8Kj7NkHDSDC+bPXLGQZvPv0+wHCg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "sbsuMcdyYFSRQ0sG86/n+ZQ5FX3zOWm1aCVuHwXdgs0="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": 759132846, "port": 50187}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "9FJwbFw3IECRFkb9bA54YaexjDmlNBArimWkh+BvW88mjm3K2i5V2uaBPS3GubvXWOwdHLE2lzQBobgZRGMyCg=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "aeMgdMdkkbkfAS4+n4BEGgtqhkf2/zXrVWWECOJ/h3A="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -1481887565, "port": 25975}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "z5ogivZWpQchkS4UR4wB7i2pfOpMwX9Nd/USxinL9LvJPa+/Aw3F1AytR9FX0BqDftxIYvblBYAB5JyAmlj+AA=="}, {"@type": "dht.node", "id": {"@type": "pub.ed25519", "key": "rNzhnAlmtRn9rTzW6o2568S6bbOXly7ddO1olDws5wM="}, "addr_list": {"@type": "adnl.addressList", "addrs": [{"@type": "adnl.address.udp", "ip": -2134428422, "port": 45943}], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0}, "version": -1, "signature": "sn/+ZfkfCSw2bHnEnv04AXX/Goyw7+StHBPQOdPr+wvdbaJ761D7hyiMNdQGbuZv2Ep2cXJpiwylnZItrwdUDg=="}]}}, "liteservers": [{"ip": 84478511, "port": 19949, "id": {"@type": "pub.ed25519", "key": "n4VDnSCUuSpjnCyUk9e3QOOd6o0ItSWYbTnW3Wnn8wk="}}], "validator": {"@type": "validator.config.global", "zero_state": {"workchain": -1, "shard": -9223372036854775808, "seqno": 0, "root_hash": "F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=", "file_hash": "XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24="}, "init_block": {"root_hash": "VpWyfNOLm8Rqt6CZZ9dZGqJRO3NyrlHHYN1k1oLbJ6g=", "seqno": 34835953, "file_hash": "8o12KX54BtJM8RERD1J97Qe1ZWk61LIIyXydlBnixK8=", "workchain": -1, "shard": -9223372036854775808}, "hardforks": [{"file_hash": "t/9VBPODF7Zdh4nsnA49dprO69nQNMqYL+zk5bCjV/8=", "seqno": 8536841, "root_hash": "08Kpc9XxrMKC6BF/FeNHPS3MEL1/Vi/fQU/C9ELUrkc=", "workchain": -1, "shard": -9223372036854775808}]}}"
      blockchain_name = ""
      use_callbacks_for_network = false
      ignore_cache = false
    }
    keystore_type = keyStoreTypeDirectory {
      directory = ".keystore"
    }
  }
}
[ 4][t 1][2024-06-11 09:13:30.6882911][TonlibClient.cpp:4376][!Tonlib]  loading libraries from disk cache
[ 3][t 1][2024-06-11 09:13:30.6928515][TonlibClient.cpp:2093][!Tonlib]  Use blockchain name from MASTER config: 'mainnet' (was '')
[ 4][t 1][2024-06-11 09:13:30.6929298][LastBlockStorage.cpp:54][!Tonlib][&last_block]   Save to cache: [last_block:(-1,8000000000000000,38298321):521BB89D042C03A9C7C81C5CA3269EB6195D28B9755BD7DFAE6FBCD67CDD9BE1:35CA6FDA6E3BD2CAFEE09A1E021FF5D21B48DFAE2EECAEEBCC3EFFD905EDC9AF][last_key_block:(-1,8000000000000000,38286476):B32CE94EE9EF8A515AF2C30745405D2A58444AFDA64C63BB533EA59E56E2F0C0:547E79257649A91013323D633AD37813CEF0079524FD6E7F7C97987295FE4F7C][utime:1718097196][init_block:(-1,8000000000000000,34835953):5695B27CD38B9BC46AB7A09967D7591AA2513B7372AE51C760DD64D682DB27A8:F28D76297E7806D24CF111110F527DED07B565693AD4B208C97C9D9419E2C4AF]
[ 4][t 1][2024-06-11 09:13:30.6962913][LastBlock.cpp:58][!Tonlib][&last_block]  State: [last_block:(-1,8000000000000000,38286476):B32CE94EE9EF8A515AF2C30745405D2A58444AFDA64C63BB533EA59E56E2F0C0:547E79257649A91013323D633AD37813CEF0079524FD6E7F7C97987295FE4F7C][last_key_block:(-1,8000000000000000,38286476):B32CE94EE9EF8A515AF2C30745405D2A58444AFDA64C63BB533EA59E56E2F0C0:547E79257649A91013323D633AD37813CEF0079524FD6E7F7C97987295FE4F7C][utime:1718097196][init_block:(-1,8000000000000000,34835953):5695B27CD38B9BC46AB7A09967D7591AA2513B7372AE51C760DD64D682DB27A8:F28D76297E7806D24CF111110F527DED07B565693AD4B208C97C9D9419E2C4AF]
[ 4][t 1][2024-06-11 09:13:30.6963370][LastConfig.cpp:44][!Tonlib][&last_block] State: 
[ 4][t 1][2024-06-11 09:13:30.6963662][TonlibClient.cpp:1456][!Tonlib][&tonlib_query id != 0]   Tonlib answer query [id:1] options_info {
  config_info = options_configInfo {
    default_wallet_id = 698983191
    default_rwallet_init_public_key = "Puasxr0QfFZZnYISRphVse7XHKfW7pZU5SJarVHXvQ+rpzkD"
  }
}
[ 4][t 0][2024-06-11 09:13:30.6963789][Client.cpp:84][&tonlib_requests] End to wait for updates, returning object 1 0000016EE4F6BDF0
[ 4][t 0][2024-06-11 09:13:30.6970119][Client.cpp:78][&tonlib_requests] Begin to wait for updates with timeout 0.100000
[ 4][t 1][2024-06-11 09:13:30.6971345][TonlibClient.cpp:1479][!Tonlib][&tonlib_query]   Tonlib got query [id:2] setLogVerbosityLevel {
  new_verbosity_level = 0
}
[ 4][t 1][2024-06-11 09:13:30.6971573][TonlibClient.cpp:1518][!Tonlib][&tonlib_query]   Tonlib got static query setLogVerbosityLevel {
  new_verbosity_level = 0
}
{
    "@type": "accountAddress",
    "account_address": "EQDux15PgHF1MzuOqtF0v3oJ-GSClp4ogr7uQDqauK57L9xn"
} balance = -1
Traceback (most recent call last):
  File "C:\repositories\ton-research\wallet-3.py", line 43, in <module>
    loop.run_until_complete(main())
  File "C:\Users\sorlyanskiy\AppData\Local\anaconda3\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
  File "C:\repositories\ton-research\wallet-3.py", line 29, in main
    await wallet.transfer(OTHER_WALLET, client.to_nano(0.01), comment='test', allow_send_to_uninited=True)
  File "C:\Users\sorlyanskiy\AppData\Local\anaconda3\lib\site-packages\ton\account\wallet_methods.py", line 86, in transfer
    return await self.send_messages(messages, **kwargs)
  File "C:\Users\sorlyanskiy\AppData\Local\anaconda3\lib\site-packages\ton\account\wallet_methods.py", line 51, in send_messages
    query_id = (await self.client.execute(query)).id
  File "C:\Users\sorlyanskiy\AppData\Local\anaconda3\lib\site-packages\ton\client\tonlib_methods.py", line 36, in execute
    result = await self.tonlib_wrapper.execute(query, timeout=(timeout or self.default_timeout))
  File "C:\Users\sorlyanskiy\AppData\Local\anaconda3\lib\site-packages\ton\tonlibjson.py", line 175, in execute
    result = await self._execute(query, timeout=timeout)
ton.tonlibjson.TonlibError: NOT_ENOUGH_FUNDS

Process finished with exit code 1

Friends, how to fix it? I appreciate any help :)

P.S.: By the way, I also tried python ton sdk for my experiment about coin transferring inside testnet and it seems python ton sdk aslo doesn't work correct...

andreykanava commented 5 months ago

Have the same problem. IDK what to do.