TON Дев Чат
() recv_external(slice in_msg)
, но вообще не знаю, никогда не пользовался больше чем одним аргументом
cannot apply external message to current state : External message was not accepted
Cannot run message on account: inbound external message rejected by transaction
cannot apply external message to
дальше должно отдавать дополнительную инфу почему не эплаится.
CE22450E6953B87582358EC4A2E802254E667F37BAEBD6B569A4B4AAAC48DC5:
exitcode=33, steps=33, gas_used=0
VM Log (truncated):
...OW
execute XCHG s1,s3
execute LEQ
execute THROWIF 35
execute PUSH c4
execute CTOS
execute LDU 32
execute LDU 32
execute LDU 256
execute ENDS
execute XCPU s3,s2
execute EQUAL
execute THROWIFNOT 33
default exception handler, terminating vm with exit code 33
вот это отдает
raw.getTransactions
- нужен адрес, lt и hash. Возвращает 10 транзакций начиная с твоей, тебе нужна первая.
The dictionary must have uri key with a value containing the URI pointing to the JSON document with token metadata.
A‹›B‹›C‹›D‹›E
B‹›C
и C‹›D
)?B‹›D
. Так ли это?A‹›B‹›C‹›D‹›E
это не какой-то статичный канал, а просто конкретный путь. A‹›B‹›C‹›D‹›E
, а завтра канала C-D не будет и путь пойдет через другие хопы.
А‹›Е
?
toHexString(keyPair.publicKey);
// -> "8c8dfc9f9f58badd76151775ff0699bb2498939f669eaef2de16f95a52888c65"
toHexString(keyPair.secretKey);
// -> "b75abbb599feed077c8e11cc8cadecfce4945a7869a56d3d38b59cce057a3e0f8c8dfc9f9f58badd76151775ff0699bb2498939f669eaef2de16f95a52888c65"
-
в +
и _
в /
надо сделать.function base64url_decode($data) {
return base64_decode(str_replace(array('-', '_'), array('+', '/'), $data));
}
-DTON_ARCH=
[1] 2517 illegal hardware instruction testbin/crypto/func
А просто в инструкции написано "Follow official docs to compile sources", у меня там раньше была куча проблем с зависимостями и пока не лез, но неудобно это. Ща видимо буду собирать так, если нигде нету собранного списочка с этими зависимостями или рабочего бинарника
#11 89.62 [ 63%] Linking CXX static library librocksdb.a
#11 92.71 [ 63%] Built target rocksdb
#11 92.71 make[1]: *** [CMakeFiles/Makefile2:8909: crypto/CMakeFiles/fift.dir/rule] Error 2
#11 92.71 make: *** [Makefile:2177: fift] Error 2
------
executor failed running [/bin/sh -c mkdir build && cd build && cmake .. && cmake --build . --parallel $(nproc) -j $(nproc) --target fift && cmake --build . --parallel $(nproc) -j $(nproc) --target func && cmake --build . --parallel $(nproc) -j $(nproc) --target lite-client]: exit code: 2
'TonLib' object has no attribute '_tonlib_json_client_destroy'
{
"method": "getMasterchainInfo",
"params": {},
"id": "string",
"jsonrpc": "string"
}
slice msg = cell.begin_parse().load_world_of_pain()
slice msg = begin_parse( <имя TL-B конструктора>)
build/main.cell.fif
: main.cell.fif:1: include:cannot locate file Asm.fif
/home/dmitrij/liteclient-build/crypto/func -VПочему то при выполнении любой команды. Например этой:
FunC semantic version: v0.2.0
toncli get hello_worldПолучаю следующее:
INFO: 🚀 You want to interact with your contracts ['contract'] in testnet - that's great!Т.е. видно, что toncli формирует команду запроса к func с параметрами, которые не предусмотрены..
/home/dmitrij/liteclient-build/crypto/func: invalid option -- '-'
usage: /home/dmitrij/liteclient-build/crypto/func [-vIAPSR][-O<level>][-i<indent-spc>][-o<output-filename>][-W<boc-filename>] {<func-source-filename> ...}
Generates Fift TVM assembler code from a funC source
-I Enables interactive mode (parse stdin)
-o<fift-output-filename> Writes generated code into specified file instead of stdout
-v Increases verbosity level (extra information output into stderr)
-i<indent> Sets indentation for the output code (in two-space units)
-A Prefix code with `"Asm.fif" include` preamble
-O<level> Sets optimization level (2 by default)
-P Envelope code into PROGRAM{ ... }END>c
-S Include stack layout comments in the output code
-R Include operation rewrite comments in the output code
-W<output-boc-file> Include Fift code to serialize and save generated code into specified BoC file. Enables -A and -P.
-s Output semantic version of FunC and exit
-V<version> Show func build information
ERROR: 😢 Error running /home/dmitrij/liteclient-build/crypto/func -v 3 --timeout 3 -C /home/dmitrij/.config/toncli/testnet.json -v 0 -c getaccount kQB7MH92l1MWuiTNneOV0WDrcvXWwmBdiE81J2fm6R5NMYOT
Traceback (most recent call last):
File "/home/dmitrij/.local/bin/toncli", line 8, in <module>
sys.exit(main())
ERROR: 😢 Error running /home/dmitrij/liteclient-build/crypto/func -v 3 --timeout 3 -C /home/dmitrij/.config/toncli/testnet.json -v 0 -c getaccount kQB7MH92l1MWuiTNneOV0WDrcvXWwmBdiE81J2fm6R5NMYOTКак вообще такое может быть? Не та версия FunC? Или toncli формирует неправильно команду запроса.
load_coins
и store_coins
из nft контракта от load_grams
и store_grams
?
10
надо вначале добавить вот так?
version_output[0].startswith("FunC")`
Ну или
я чего-то не догоняю опять
PROC:<{:procedure already defined
toncli send -a 0.1 --body ./fift/utils/send_message.fif --no-bounce 1 -c marketplace -n mainnet
тип такого. В любой контракт можно всякие сообщения кидать))
<bвот так можно)
"https://cloudflare-ipfs.com/ipfs/blablablabla/" $>B B, // nft content base
b>
.store_slice("my cool string")
. А еще строки бывают разные. Только 🤫
toncli run_testsВыдает это сообщение:
include:cannot locate file `../build/contract_tests.fif`Этот файл и вправду не создался.. Хотя, судя по документации должен.. Подскажите где искать? (OS Manjaro, linux)
TypeError: Cannot read property 'authenticator' of nullПодскажите, пожалуйста, в чем может быть проблема, куда копать?
at TonConnectServerV1.decodeResponse (/var/www/www-root/data/www/web3ton.pro/node_modules/@tonapps/tonconnect-server/build/TonConnectServerV1.js:53:67)
at /var/www/www-root/data/www/web3ton.pro/src/server.ts:58:35
at Layer.handle [as handle_request] (/var/www/www-root/data/www/web3ton.pro/node_modules/express/lib/router/layer.js:95:5)
at next (/var/www/www-root/data/www/web3ton.pro/node_modules/express/lib/router/route.js:144:13)
at Route.dispatch (/var/www/www-root/data/www/web3ton.pro/node_modules/express/lib/router/route.js:114:3)
at Layer.handle [as handle_request] (/var/www/www-root/data/www/web3ton.pro/node_modules/express/lib/router/layer.js:95:5)
at /var/www/www-root/data/www/web3ton.pro/node_modules/express/lib/router/index.js:284:15
at Function.process_params (/var/www/www-root/data/www/web3ton.pro/node_modules/express/lib/router/index.js:346:12)
at next (/var/www/www-root/data/www/web3ton.pro/node_modules/express/lib/router/index.js:280:10)
at cors (/var/www/www-root/data/www/web3ton.pro/node_modules/cors/lib/index.js:188:7)
TonUtil.fif
возвращает wc как 32bit signed int, а адрес как 256bit unsigned int?
recv_internal
— баланс контракта, нужно в тестах передавать в стеке и еще дополнительно записывать в c7, иначе get_balance
работать не будет? А чтобы получить баланс с учетом входного amount надо руками складывать msg_value с первым аргументом recv_internal
?
`
include (S – ), loads and interprets a Fift source file from the path
given by String S. If the filename S does not begin with a slash, the Fift
include search path, typically taken from the FIFTPATH environment
variable or the -I command-line argument of the Fift interpreter (and
equal to /usr/lib/fift if both are absent), is used to locate S
`
{
"description": "Friendly OpenSea Creature that enjoys long swims in the ocean.",
"external_url": "https://openseacreatures.io/3",
"image": "https://storage.googleapis.com/opensea-prod.appspot.com/puffs/3.png",
"name": "Dave Starbelly",
"attributes": [{
"trait_type": "Base",
"value": "Starfish"
},
{
"trait_type": "Eyes",
"value": "Big"
},
]],
}
#!/bin/bashПример:
dir=$(realpath .)
docker run --rm -it -v $dir:/code -v $dir/conf:/root/.config toncli-local ${@}
./docker-toncli.sh run_tests* Файл положить в корень проекта
Cannot run message on account: inbound external message rejected by transaction`
Чего такое может быть?
Body of transfer message is x{}
что странно
cell deploy_list = in_msg_body~load_ref();? на любом языке
var (item_index, item, f?) = deploy_list~udict::delete_get_min(64);
toncli build
компилит func в fift, а что дальше?
toncli fift run
то получаюbuild/contract.fif
: contract.fif:47: PROCINLINE:<{:-?
В
начале build/contract.fif нужно добавить "Asm.fif" include
boc>B "my.boc" B>file
['build/contract', 'kQCCpAHCGzapoMfOG2LKcgPc84FkxRsF_TMfs9bFpRsyeqnf', '0', '0', '0.05', '--no-bounce']
А долж
но же быть наверное:`build/contract.fif` в первом эллементе или нет?
Wallet v4R2
, Wallet v3R2
, Wallet highload
, ...), но при этом это один и тот же кошелёкhighload
можно отправлять только на другой highload
, а с адреса Wallet v4R2
на Wallet v3R2
(к примеру) отправить нельзя