Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Profile picture
Jeremy
  USA
Administrator Moderator
1 Question, 84 Answers
  Active since 27 January 2023
  Last activity one year ago
projk.net/

Reputation

404 + 10 this December 3 53

Badges 5

Editor Freshman Enthusiast Supporter Newbie
0 Votes
1 Answers
4K Views
0 Votes 1 Answers 4K Views
One of the primary differentiators of TON is the fact that it is an asynchronous block chain. This introduces concepts such as lamport time and crazy orderin...
one year ago
0 Is there an upgradeable standard for TON contracts?

There is no need for Ethereum-like proxy contracts in TON. Contracts in TON can upgrade its code without changing its address.

one year ago
0 How can I transfer TON in PHP?

I believe that other TVM projects use PHP heavily, but TON does not. There are PHP community extensions that are available for you to use, but they are still in development:

https://github.com/olifanton/ton

It will allow you to interact with wallets:

https://github.com/olifanton/ton/blob/main/src/Olifanton/Ton/Contracts/Wallets/V4/WalletV4.php

For example, where variable $kp is the keypair and variable $transport is a structure defined by the SDK that essentially acts as a provid...

one year ago
1 It there a way to create a "pretty" wallet address?

It is possible to do this, but you would have to generate thousands of different private and public key pairs. I have yet to see one configured specifically for TON, though.

Essentially, you would generate thousands of random mnemonics and filter for ones that are like the parameters that you want.

You can generate key pairs with TonWeb:

        const nacl = TonWeb.utils.nacl; // use nacl library for key pairs
        const tonweb = new TonWeb();

        const key...
one year ago
0 Is the jetton-wallet.fc file necessary for a minimal jetton contract?

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.

one year ago
1 How can you use the TON payment via a Telegram bot?

There is a Telegram payments bot, but it has yet to integrate TON:

There are some community example projects of TON bots that accept TON payments:
https://github.com/Gusarich/ton-bot-example
https://github.com/LevZed/ton-payments-in-telegram-bot

But if you want something better, you'll have to develop one yourself. You can try starting here:
https://ton.org/docs/develop/dapps/asset-processing/

one year ago
0 Are there TON explorers that can show on-chain NFT images?

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!

one year ago
0 Are there subscription-based payment services on TON?

I'm not aware of one from a smart contract perspective, though it could be a very cool idea.

TON Rocket Pay has a few services which might be what you're looking for:
https://pay.ton-rocket.com/api/#/subscriptions

one year ago
3 How do you send jettons programmatically?

The following is from a test file in tonweb. Here's the entire file. https://github.com/toncenter/tonweb/blob/master/src/test-jetton.js

It should be enough for your needs!

    const transfer = async () => {
        const seqno = (await wallet.methods.seqno().call()) || 0;
        console.log({seqno})

        console.log(
            await wallet.methods.transfer({
                secretKey: keyPair.secretKey,
                toAddress: JETTON_WALLET_ADDRESS,
    ...
one year ago
1 Is it possible to delete an NFT?

It really depends on the smart contract code. The standard for NFTs (TEP-62) does not include deletion, however.

https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md

You could always just transfer it to the null address, or if that doesn't work, some other random address.

one year ago
0 How do I dump values when developing via toncli?

Probably not through using the CLI, but you can debug directly within the script using dump_stack:

() dump_stack() impure asm "DUMPSTK";

https://ton.org/docs/develop/func/stdlib/#debug-primitives

one year ago
2 Can't deploy a FunC smart contract: failing with exit code 34.

Two issues:

  1. You should read address from slice via load_msg_addr, not load_bits
  2. Store address to builder via Addr, not addr

addr, is an alias for 256uint. Meanwhile full address serialization with Addr also includes address format tag, workchain, 256bit part and some additional fields.

one year ago
0 Where can I find wallet v3r1 and v3r2 FunC code?

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

one year ago
0 Is the ADNL address supposed to be private data?

Any node in the TON network has its own ADNL address. It's like IP addresses on the Internet; they are public keys for the network to utilize. It's more like personal information.

You can read more here:

https://ton.org/docs/learn/networking/adnl#:~:text=An%20ADNL%20Address%20is%20essentially,intended%20for%20the%20recipient%20address

one year ago
1 How do I store a string in FunC?

Slices are the way to store strings. At the end of the day, strings are just a bunch of bytes that are interpreted in an ASCII format. You'll have to interpret strings as such when working with them in the smart contract.

https://ton.org/docs/develop/func/literals_identifiers#string-literals

You can define strings with quotation marks like in other languages, but they are stored in such a way that they become a slice of bytes.

one year ago
1 What's the best way to debug unexpected test failures in FunC?

You're looking for the dump_stack() function.

https://ton.org/docs/develop/func/stdlib/#dump_stack

It dumps the last 255 values in the stack and shows the total stack depth.

() dump_stack() impure asm "DUMPSTK";

There's also the ~dump and ~strdump built-ins.

https://ton.org/docs/develop/func/builtins#dump-variable

one year ago
0 How do I install a smart contract development environment on an Apple M1 Mac?

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
one year ago
1 How can I use *.ton as a domain?

The documentation surrounding TON DNS is here:
https://ton.org/docs/participate/web3/dns

Its official site is here:
https://dns.ton.org/

I must stress that this is not the same DNS as what you would find when registering a .com domain address on a typical domain registrar. There is currently no ".ton" nameserver that can be connected to the rest of the world wide web. Instead, these are essentially nicknames for addresses. This is helpful because addresses are hard to memorize, bu...

one year ago
0 Is Windows suitable for developing TON smart contracts?

To a certain degree you can attempt to develop smart contracts on Windows, yes. You can install the TON CLI on Windows with python:

pip install toncli

https://ton.org/docs/develop/smart-contracts/sdk/toncli#windows

Remember that TON is by-and-large a community led project, with much of the infrastructure being decentralized. Unix based systems are nearly the norm in many developer communities. I strongly recommend using WSL (Windows Subsystem for Linux) if you intend ...

one year ago
0 If I declare logic on the blockchain, do I need a server to perform a remote calculation?

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.

one year ago
1 Is it possible to manage files on a server with a TON smart contract?

The answer is likely "no". Smart contracts are for on-chain logic, and the server is off-chain. The actions taking place on a smart contract will not be determined solely by the TVM.

You could have a smart contract act as an interface for the server to listen to: for example, account A communicates with smart contract B, and sends an event to delete a file of ID C on server D. But there is nothing that guarantees that file C exists, or that the server D's logic will listen to B.

one year ago
one year ago
1 How much logic can be feasibly put on-chain?

It is definitely feasible to implement the logic of your game as a smart contact and then it’s guaranteed to be secure for all users.

Each transaction to change the game state will cost a few cents as gas. If this cost is an issue (for example your game has tens of thousands of transactions per player), then you can use payment channels to reduce this cost.

One of the interesting things mentioned is randomness, which is difficult in the Web3 space. A verifiable randomness function (VRF)...

one year ago
0 How is a reference serialized in FunC?

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";

https://ton.org/docs/develop/func/stdlib/#load_ref

one year ago
1 How do you generate the public address of a TON wallet from its mnemonic?

This post has JS code that does it as well as explanations how it all works: https://ton-community.github.io/tutorials/01-wallet/

You should be able to get the wallet address like so:

import { mnemonicToWalletKey } from "ton-crypto";
import { WalletContractV4 } from "ton";

async function main() {
  // open wallet v4 (notice the correct wallet version here)
  const mnemonic = "unfold sugar water ..."; // your 24 secret words (replace ... with the rest of the words)
...
one year ago
0 Where can I read about the TON Wallet extension?

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...

one year ago
0 How do you update tlo files with the update-tlo.sh file? It can't find the tl-parser utility.

The tl-parser utility can be found here:

https://github.com/vysheng/tl-parser

You'll have to compile and install it, but the bash script should work afterwards.

one year ago
0 Is there a way to launch a lightserver of TON for testing smart contracts?

If you mean running your own node, then there are multiple flavors of API:

https://toncenter.com/api/v2/

https://github.com/ton-foundation/ton-api-v4

https://tonapi.io/swagger-ui

If you mean something like Ganache for TON, then there's the TON contract executor:

https://github.com/ton-community/ton-contract-executor

one year ago
Show more results compactanswers
0 Votes
1 Answers
11K Views
0 Votes 1 Answers 11K Views
How do I send jettons with TonWeb? Is there any other way to do it programmatically? --- > This question was imported from Telegram Chat: https://t.me/tondev...
one year ago