TON Dev Chat
getnextkey: [Error : 651 : not inited]
download-state.cpp:232][!downloadstatereq(-1,8000000000000000,19935509)] failed to download state : [Error : 651 : state not found]
let res = await tonweb.call(address, "get_wallet_address", [["cell", address]]);
slice get_wallet_address(slice owner_address) method_id
let res = await tonweb.call(address, "get_wallet_address", [["cell_slice", address]]);
task-1-playground
with tests/example.fc
tests code. throw_if(101, ds~load_uint(64) != 10); ;; check if counter has been changed
writeAddress()
with undefined value.
let res = new TonWeb.token.jetton.JettonWallet(tonweb.provider, {What -13 error code?
ownerAddress: new TonWeb.Address(address),
jettonAddress: new TonWeb.Address(address2)
});
res = await res.getData();
undefined function invoke_method, defining a global function of unknown type
with toncli, ive updated the tool, what could be the issue?
Local validator out of sync
value), would appreciate this help much.
ton://transfer/${user.wallet_address}?amount=1&text=${uuidv4()}
postinstall
100%deploy:testnet
will also break
Contract
as an abstract class. It must be implemented properly, before it can be used. You will need to define your own methods in your sub-class.
toString()
arguments to change the address format.
const address = new Address('0:633fb2745de8be631343a8500814d17a3c52c021fdadd78bf83baa782fb7509b');
// This would be the most common format: user-friendly, URL-safe and with bounceable flag set.
console.log(address.toString(true, true, true));
const tx_ret = await wallet.methods.transfer({
secretKey,
toAddress: to,
amount: TonWeb.
utils.toNano(amount),
seqno: sequence,
payload: memo,
sendMode: mod,
}).getQuery()
const txHash = await tx_ret.hash()
const boc = await tx_ret.toBoc(false)
const txMsg= {
"hash": TonWeb.
utils.bytesToBase64(txHash),
"tx": TonWeb.
utils.bytesToBase64(boc)
}
createSigningMessage(seqno) {
seqno = seqno || 0;
const message = new Cell();
message.bits.writeUint(this.options.walletId, 32);
if (seqno === 0) {
// message.bits.writeInt(-1, 32);// todo: dont workfor (let i = 0; i < 32; i++) {
message.bits.writeBit(1);
}
} else {
const date = new Date();
const timestamp = Math.floor(date.getTime() / 1e3);
message.bits.writeUint(timestamp + 60, 32);
}
message.bits.writeUint(seqno, 32);
return message;
}
tonweb-mnemonic
as example) and wallets not compatible with seed phrases in other blockchains?
CMake Error at /opt/homebrew/Cellar/cmake/3.23.1/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler
"/Library/Developer/CommandLineTools/usr/bin/clang"
is not able to compile a simple test program.
✗ clang -v 11.05.22 19:49
Apple clang version 13.0.0 (clang-1300.0.27.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
CC="clang -mcpu=apple-a14" CXX="clang++ -mcpu=apple-a14" cmake .. -DCMAKE_BUILD_TYPE=Release -DTON_ARCH= -Wno-dev -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3 -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/
```
testgiver-bot
didn’t work recently and not sure if here is the right channel to ask. I’ve received some coins from it several times, but now nothing from there for almost 2 days.
ton-blockchain
repository, cool features have been delivered to the master :)
RawSendMessage
method. There are several reference implementation for BoC serializer:Build information
)) {
slice_empty?
undefined )begin_parse
undefined )get_data
undefined )https://github.com/ton-blockchain/ton/actions?query=branch%3Amaster+is%3Acompleted
It would also be cool to give separate links for each OS. Because it's hard for users not familiar with GHA to find something.
a smart contract and an account are the same thing in the context of the TON Blockchain
.account state is empty
instead of description. is it correct behaivour?
Address
utility class for this. It can parse and format addresses for you. Namely the toString()
method has the flag that I've mentioned.
Straight-forward serialization of the message would be as follows:
toncli deploy -n testnet
INFO:
🚀 You want to interact with your contracts ['contract'] in testnet - that's great!
[ 0][t 1][2022-06-02 10:31:08.616418][lite-client.cpp:425][!testnode] fatal: masterchain zero state id suddenly changed: expected -1:58FB12D488918D3D0C483E97BF2B38418421EEBADCF71D326F35E88F0278807D:07381F469160C8D8C723B691E4A421AB85ADAF6C0DFAC5F32DA5BEADF1EF3F90, found -1:823F81F306FF02694F935CF5021548E3CE2B86B529812AF6A12148879E95A128:67E20AC184B9E039A62667ACC3F9C00F90F359A76738233379EFA47604980CE8EQBppqtdVg9Iv0OAyYcln8GFXwPot1IVa1lT5maP_zwz9dmN
error: undefined function `slice_empty?`, defining a global function of unknown type
if (slice_empty?(in_msg)) {
^
( function `slice_empty?` undefined )
./crypto/func -APSR -o ./new_pr/build/compiled.fif ./new_pr/code.fc
kQC4bxyk8pkfrZ0wc4j5shxwoPxo5BHiOb_GpKBqumYdr4xY
const int op::mint = 21
in some cases and the same in others. When you write expressions like op::mint + 1
when op::mint is const it will be compilled to PUSHINT 22
, whe op::mint()
is asm code - it will be compilled to PUSHINT 21 INC
int op::mint() asm "21 PUSHINT";
is more optimized thanint op::mint() { return 21; }
var msg = begin_cell()
.store_uint(0, 1) ;; tag
.store_uint(1, 1) ;; ihr_disabled
.store_uint(1, 1) ;; allow bounces
.store_uint(0, 1) ;; not bounced itself
.store_slice(source)
.store_slice(destination)
;; serialize CurrencyCollection (see below)
.store_coins(amount)
.store_dict(extra_currencies)
.store_coins(0) ;; ihr_fee
.store_coins(fwd_value) ;; fwd_fee
.store_uint(cur_lt(), 64) ;; lt of transaction
.store_uint(now(), 32) ;; unixtime of transaction
.store_uint(0, 1) ;; no init-field flag (Maybe)
.store_uint(0, 1) ;; inplace message body flag (Either)
.store_slice(msg_body)
.end_cell();