disintar / toncli

TON Command Line Interface - easy smart contract manipulation
https://disintar.io/
Apache License 2.0
166 stars 34 forks source link

FIFT parameters are read as TONCLI parameters #16

Closed SpeedK closed 2 years ago

SpeedK commented 2 years ago

.fif files can be configured via positional parameters + nominal parameters. Positional parameters work well. Nominal parameters of FIFT dont work in toncli. Looking at the output, toncli thinks they're part of toncli nominal parameters while I want them to be FIFT parameters. Example: fift run .\fift\transaction.fif .\build\contract address 0 0 0.01 -C "test" Transaction Gives usage: toncli [-h] [-v] {start,deploy,get,send,tointeger,run_transaction,f,fc,lc,run,build,fift,lite-client,sendboc,wallet,run_tests,update_libs,func} ... toncli: error: unrecognized arguments: -C

tvorogme commented 2 years ago

Try to use --fift-args "..."

SpeedK commented 2 years ago
>toncli fift run .\fift\transaction.fif .\build\contract kQCMSwlKGQv5nQxGG5ci0M1i3_2yp4GiwjTEi6Mq7oNEhIWK 0 0 0.01 Transaction --fift-args "-c test"
[ 4][t 0][2022-04-18 03:00:55.7492550][words.cpp:3115]  import_cmdlist_args(.\fift\transaction.fif,6)
[ 1][t 0][2022-04-18 03:00:55.7494717][fift-main.cpp:180]       Error interpreting standard preamble file `Fift.fif`: cannot locate file `Fift.fif`
Check that correct include path is set by -I or by FIFTPATH environment variable, or disable standard preamble by -n.

I use fift without problems but using --fift-args looks like requires me to configure FIFTPATH which i never did on windows. Idk if it is a bug or no so I report it

tvorogme commented 2 years ago

14 duplication

SpeedK commented 2 years ago

14 duplication

I can execute without problems toncli run_tests. It's probably a different thing

tvorogme commented 2 years ago

@SpeedK I guess this is global problem of FIFTPATH in windows version of toncli. As you said:

 --fift-args looks like requires me to configure FIFTPATH which i never did on windows

On linux I have no problem with fift-args it's not necessary to add path to fift libs