TON Dev Chat
in_msg
and out_msgs
values when I run getTransactions
API request?
toncli
is a CLI (what made me think so?) 😁toncli
can be used as a library, I would suggest to extract this SDK part into a separate repository or to provide an additional manual from the library perspective.
https://toncenter.com/api/v2/getTransactions?address=UQDqDHsF9FNi-_GqodxGvgcnOwFcfZXP007OQBbNjIllPVFJ&limit=10&to_lt=0&archival=trueGot first returned transaction unixtime (1639393650) and searching for a block seqno in the basechain:
https://toncenter.com/api/v2/lookupBlock?workchain=0&shard=-9223372036854775808&unixtime=1639393650Than I found my initial transaction with the same lt and hash as fifth in the block:
https://toncenter.com/api/v2/getBlockTransactions?workchain=0&shard=-9223372036854775808&seqno=21694181But initial transaction address (base64 - UQDqDHsF9FNi-_GqodxGvgcnOwFcfZXP007OQBbNjIllPVFJ) is not the same as the returned one (hex - 0:ea0c7b05f45362fbf1aaa1dc46be07273b015c7d95cfd34ece4016cd8c89653d). Base64url to hex converting of the first transaction gives me 5100ea0c7b05f45362fbf1aaa1dc46be07273b015c7d95cfd34ece4016cd8c89653d5149, which is similar to returned one, but there are additional 2 bytes of data in the beginning and in the end of the address. Moreover, combination of hex to Base64 encoding of the returned address with /getTransactions method returns me "error": "Incorrect address" and absolutely other address (6gx7BfRTYvvxqqHcRr4HJzsBXH2Vz9NOzkAWzYyJZT0=). I thought that Base64 wallet address string equality check is enough, but it seems that I am wrong. Can you explain me such behaviour, please?
private/ton_keystore
. I forgot to create it automatically.
systemctl
restart validator
to restart validator but it doesn’t seems to work (process falis to start).sudo bash /usr/src/mytonctrl/scripts/uninstall.sh
sudo bash install.sh -m full -c https://newton-blockchain.github.io/testnet-global.config.json
`
async function ...`
// This will do the trick
(async () => {
await doSomethnig();
})();
Uint8Array
.
nacl
will give you the keys in the correct format already.
const secretKey = TonWeb.utils.hexToBytes('YOUR HEX');
const keyPair = TonWeb.utils.nacl.sign.keyPair.fromSecretKey(secretKey);
.mjs
extension and it must be compiled to ESM. It is rarely used in practice, so I've generalized.
const secretKey = TonWeb.utils.hexToBytes('229715B35FE31CD0EC2DFCCEFDB381C2F9E6B284BE36D7D12B3933AD26E7B540');
const keyPair = TonWeb.utils.nacl.sign.keyPair.fromSecretKey(secretKey);
sudo bash install.sh -m full?
wallet.methods.seqno().call();
. Then i send the transaction to a standard wallet. It works well. In the code of a standard wallet (recipient), it checks the seqno sent from the sender with the local seqno(msg_seqno == stored_seqno
). My question is: How could be storedseqno
and msg_seqno
the same if, the sender attached his own seqno and the recipient checks the SENDER seqno with his own stored_seqno? Shouldn't the transaction include RECIPIENT seqno in order to this to work well? I'm asking this because the seqno of my contract increases when I send a transaction, not when i receive one. And then the wallet receives, it doesnt increase the seqno. (Im watching the seqno on the explorer test-dot-tonwhales) Where can I read how this works? Is there a documentation or explaination of this kind of stuff?
0x00000000 + comment_in_hex
store_slice(msg_body)
and store comment directly:.store_uint(0, 32)
.store_slice(comment)
.store_uint(0, 1)
.store_uint(1, 1)
.store_ref(msg_body_cell)
getTransactions
endpoint of Toncenter (testnet).100
of the first slice stand for addr_extern
?1000100
stands for 10
-tag 00
- addr_none 100
part of the addr_std
10
- addr_std tag, addional 0
- is from Maybe Anycast. zero means that there is no anycast (check Maybe
definition)
EQCkR1cGmnsE45N4K0otPl5EnxnRakmGqeJUNua5fkWhales
(ends in Whales)
curl -X 'POST' \
'https://testnet.toncenter.com/api/v2/runGetMethod' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"address": "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N",
"method": "get_wallet_address",
"stack": [
[
"tvm.Slice", {"data":{"b64":"te6ccsEBAQEAJAAAAEOAEHv6qlzG5TaOX5eZGIvXmM0i4EqxbR2OpPw3SAdB5jUQkykYFg=="}}
]
]
}'
does not contain a CMakeLists.txt file.
Tonox Dex.
Here you can find the source code.Mytoncore status: working
Local validator status: working
Local validator out of sync: 1650520294 s
Local validator database size: 0.05 Gb
Anyone have this problem before?
import TonWeb from 'tonweb';
const keyPair = TonWeb.utils.nacl.sign.keyPair.fromSeed(/** seed */);
const { publicKey, secretKey } = keyPair;
ton://transfer/<wallet_address>?amount=<amount_in_nano>&text=<uuid>
int gas_consumption() asm "10000000 PUSHINT";
"Ef8E9kxq-_890Q2LpnB3kKyWcNVA83qUSLAze6pqWpKsrB5K' $>smca 2drop Addr"
; ton://transfer/<wallet_address>?amount=<amount_in_nano>