Reputation
Badges 5
Editor Freshman Enthusiast Supporter NewbieA boc is not limited in size, in fact the whole blockchain state is a cell with a bunch of cells wrapped within them. Everything is a cell!
An external message is limited by 64kb, which may limit the size of a boc that you're trying to create with your smart contract logic. You can see this defined in the lite client, but it is subject to change:
Do not attempt to deserialize/serialize a reference value like you would an integer. Instead, use load_ref
:
(slice, cell) load_ref(slice s) asm( -> 1 0) "LDREF";
The following is copied from the Tonkeeper News, which is relevant to the question at hand:
End-to-end security with TON Connect
Blockchains directly enable people to control their financial assets by using a so-called “non-custodial” or “unhosted” wallet: an application that keeps a cryptographic key securely on your device. This key is used to authorize transfers of coins and tokens, protecting your account from unexpected or fraudulent charges. Your account exists solely on the b...
Try installing via GitHub instead of pip:
Don't remove it!
The minter contract is the parent and wallet is the child. There is one minter instance and N wallet instances (N is the number of holders of your token). Getting rid of the wallet would mean that your users wouldn't own or be able to do anything with your jettons.
You can find them in the following GitHub repository, but they were written in Fift:
https://github.com/ton-blockchain/ton/tree/master/crypto/smartcont
This particular issue makes it look like there isn't a specific piece of tech called OpenSSL installed on your device. If you have homebrew installed, you can install with the following:
brew install openssl
Easiest way to resolve this is by simply downloading a precompiled binary:
If you mean the blockchain nodes themselves, then nodes will not display this data. This is really a market question, not a question that the blockchain protocol itself should answer. Every market has their own answer to what the price of TON is, and arbitrage will slowly balance it out.
There are services that aggregate many markets' prices together to get a simple answer for you, though. tonapi.io does allow for this:
https://tonapi.io/v2/rates?tokens=ton¤cies=usd
...
If you are anonymous on Ethereum, then you can buy wrapped TON on Uniswap and bridge them over.
You can use send_raw_message(cell msg, int mode)
within the smart contract to act as the deletion of the smart contract.
This is because mode 128 will "carry all the remaining balance of the current smart contract instead of the value originally indicated in the message", essentially removing all of the TON from the smart contract. Mode 32 will cause the "current account must be destroyed if its resulting balance is zero", wh...
You can use store_ref(b, c)
: https://docs.ton.org/develop/func/stdlib/#store_ref
It stores a reference to cell c into builder b. You should be able to use references to store any amount of cells, but for a single cell there can only be 4 refs. This still allows for a tree of cells to read from.
https://answers.ton.org/question/1539108146436378624/does-store-slice-act-like-store-ref
There is a difference between technically possible and realistically possible. As long as you fulfill all of the tech requirements of a validator, then yes you could technically run a validator.
However, a realistic long-term solution requires a proper server and a data-center. Consumer PCs are not designed for such workload and stability. You do not want to pay for downtime with your TON stake.
There are TON NFT explorers. For example, the following explorer is linked on the official TEP-62 NFT standard page:
https://explorer.tonnft.tools/
As for explorers that parse on-chain data, I don't know of any. There are many ways to store data on-chain, but URLs are the most prevalent. Would be a cool project for anyone willing to try it!
It depends on whether or not a transaction is internal or external.
If a transaction is internal, it depends on the bounce flag. If the address that the internal transaction is directed to is bounceable, then that 10 TON amount minus gas will be returned to the original address. The transaction will still be recoreded in the blockchain.
If a transaction is external, then it depends on the accept call in the code. If the t...
This is the right track, you do need to check 0
. And you are loading in op
correctly. But the way that you work with the comment is incorrect.
The characters are coded within UTF-8, so using load_uint
will not work as expected, since it expects binary encoding.
Instead, you will have to parse it:
() recv_internal(int balance, int msg_value, cell in_msg_full, slice in_msg_body) {
int op = in_msg_body~load_uint(32);
if (op == 0) {
;; load in the first 8 bits b...
For users who are unfamiliar, TON Proxy is the "entrypoint" for conencting with the TON Network's sites. The website has some documentation here:
https://docs.ton.org/participate/web3/setting-proxy
Generally, the idea is to connect to one of the public entry TON Proxies:
in1.ton.org:8080
in2.ton.org:8080
in3.ton.org:8080
And then add a manual HTTP proxy to your browser/device with said proxy.
If you want to learn how to set up your own proxy, the documentation i...
Here is one example of how the Kotlin package does so:
import org.ton.crypto.base64
import org.ton.crypto.base64url
fun convert(address: String): String {
val raw = try {
base64url(address)
} catch (E: Exception) {
base64(address)
}
return raw;
}
There is no need for Ethereum-like proxy contracts in TON. Contracts in TON can upgrade its code without changing its address.
There is one community led solution called pytonlib that I have found to send a transaction in Python. Please note that I have not tried it myself so I cannot in good faith recommend it, but the community members who work on it are quite active.
Install with:
pip install ton
Here is an example of how it is used to send a transaction.
from .init import client
from .wallet import wallet
# Viewing transactions
txs =...
You can use the raw address: 0:0000000000000000000000000000000000000000000000000000000000000000
Just make sure that you turn off the bounce flag, whose address is: UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ
I used the TON address converter to help answer this question: https://ton.org/address/
There are two things that you could be talking about. The first are payment channels, which is a statement channel solution that is good if you have many small payments between two parties.
You can find information on payment channels here:
https://github.com/ton-blockchain/payment-channels
https://github.com/toncenter/tonweb/tree/master/src/contract/payments
If you're just trying to send TON from one wallet to another, you could just write a python or node script.
I believe this question was more or less answered in another question by
Vladimir Plotvinov. You can view it here:
https://answers.ton.org/question/1538089852979908608/
For sake of visibility, I'll repost his answer:
You recieve a "-13" exit code. API called lite-server and receive some result it's why you got 200 OK. -13 exit code I would say it means method_id not found on smartcontract (but I can't find this remark in documentation).
The idea behind most blockchain dapps (not specific to TON), is to make the entire backend on-chain as smart contracts. It is recommended to avoid any servers for remote calculations. This is possible because the validators/nodes of the blockchain act as the remote servers. They are incentivized to act as remote servers because you pay gas with the TON currency.