Hello is there anyone I can talk to about contract testing ?
Whenever I use invoke method my test fails with error code 2 , even the tutorial tests
Jun 7, 2023, 1:14 PM
Anyone managed to test a smart contract function with toncil?
I am just trying to run the https://github.com/romanovichim/TonFunClessons_Eng/blob/main/11lesson/11lesson.md
Shouldn’t the examples just run correctly ?
Jun 7, 2023, 1:51 PM
If you have an environment set up correctly, this should work. Toncli tests support executing any contract function, not just recv_internal/recv_external.
Jun 7, 2023, 1:56 PM
Nope I got error code 2 on all of them
Jun 7, 2023, 2:00 PM
Do you have Asm.fif and similar files matching your toncli and binaries versions?
Jun 7, 2023, 2:00 PM
Jun 7, 2023, 2:02 PM
I have toncli v0.0.43, Fift+FunC+lite-server v0.4.4 (toncli-local branch, commit 8ddfb0eadd5fa0401fa0eb560bae940e5a941b1b).
pip show toncli
fift -V
fift -V
Jun 7, 2023, 2:02 PM
Toncil v0.0.43
ift build information: [ Commit: 8537dd60e6341474967f8e9d04a7b7f6a060ec36, Date: 2022-06-13 20:02:32 +0300]
FunC semantic version: v0.2.0
Build information: [ Commit: 8537dd60e6341474967f8e9d04a7b7f6a060ec36, Date: 2022-06-13 20:02:32 +0300]
lite-client build information: [ Commit: 8537dd60e6341474967f8e9d04a7b7f6a060ec36, Date: 2022-06-13 20:02:32 +0300]
ift build information: [ Commit: 8537dd60e6341474967f8e9d04a7b7f6a060ec36, Date: 2022-06-13 20:02:32 +0300]
FunC semantic version: v0.2.0
Build information: [ Commit: 8537dd60e6341474967f8e9d04a7b7f6a060ec36, Date: 2022-06-13 20:02:32 +0300]
lite-client build information: [ Commit: 8537dd60e6341474967f8e9d04a7b7f6a060ec36, Date: 2022-06-13 20:02:32 +0300]
Jun 7, 2023, 2:04 PM
Probably you have to upgrade the binaries.
Jun 7, 2023, 2:04 PM
Any pip comment for upgrade ? Or have to manually ?
Jun 7, 2023, 2:04 PM
Manually. See https://github.com/disintar/toncli/blob/master/INSTALLATION.md.
And here are the Fift libs working with that version of binaries.
Jun 7, 2023, 2:05 PM
The binaries are expired I can’t download them https://github.com/SpyCheese/ton/actions/runs/4055187491
I find it in another commit let me try it
Updated the binaries still failing
Jun 7, 2023, 3:08 PM
The strangest thing is that code gets actually executed, as you may see in "total gas used". Could you try to replace invoke_method(fn, [a, b, ...]) with fn(a, b, ...)?
Jun 7, 2023, 3:10 PM
Let me try
Jun 7, 2023, 3:11 PM
Also, you may use build.py script to get a bit nicer logs.
Jun 7, 2023, 3:11 PM
Yeah that doesn’t compile
Fift build information: [ Commit: 89c6e5216136549eea3093aeb3917eb804ecf015, Date: 2023-06-07 14:01:23 +0300]
FunC semantic version: v0.4.4
Build information: [ Commit: 89c6e5216136549eea3093aeb3917eb804ecf015, Date: 2023-06-07 14:01:23 +0300]
lite-client build information: [ Commit: 89c6e5216136549eea3093aeb3917eb804ecf015, Date: 2023-06-07 14:01:23 +0300]
FunC semantic version: v0.4.4
Build information: [ Commit: 89c6e5216136549eea3093aeb3917eb804ecf015, Date: 2023-06-07 14:01:23 +0300]
lite-client build information: [ Commit: 89c6e5216136549eea3093aeb3917eb804ecf015, Date: 2023-06-07 14:01:23 +0300]
Jun 7, 2023, 3:16 PM
Have you loaded binaries from branch toncli-local? Other branches don't support opcodes like RESETLOADEDCELLS and some others, and those opcodes are used by testing utilities.
Jun 7, 2023, 3:20 PM
You are a legend I was getting from wrong branch
Jun 7, 2023, 3:34 PM
Does everything work now?
Jun 7, 2023, 3:35 PM
Yes
Thanks
Jun 7, 2023, 3:35 PM
To authors of TVM upgrade
It seems that currently TVM does not support Merkle proof cells at the level needed for proving blocks/transactions. In particular, it is only possible to get cell hash of infinite level (cell and hash levels: https://ton.org/tvm.pdf#Hfootnote.12) via TVM instructions, and it seems that in order to check Merkle proof one needs to get some lower-level hash of cell.
It seems that currently TVM does not support Merkle proof cells at the level needed for proving blocks/transactions. In particular, it is only possible to get cell hash of infinite level (cell and hash levels: https://ton.org/tvm.pdf#Hfootnote.12) via TVM instructions, and it seems that in order to check Merkle proof one needs to get some lower-level hash of cell.
To authors of TVM upgrade
Currently, multisig wallets based on BLS12-381 curve are hard to create because of external message gas credit, which is only 10'000 gas (signature checking requires at least 61'424 gas). Can this issue be addressed somehow?
Currently, multisig wallets based on BLS12-381 curve are hard to create because of external message gas credit, which is only 10'000 gas (signature checking requires at least 61'424 gas). Can this issue be addressed somehow?
Jun 8, 2023, 4:59 AM
You can sign message with regular signature and check it first? Then accept and do expensive check
Jun 8, 2023, 8:27 AM
Alright, then I have an interesting idea of multisig wallet v5)
Jun 8, 2023, 8:28 AM
multisig is better to create separately from versioning simple wallets
Jun 8, 2023, 8:55 AM