I guess this instruction can help you. How to run ton sites
In step 3 you have to generate ADNL address for your domain
You can use pancakeswap API for get coin price in USD and convert it in your application
Simple example
const PANCAKESWAP_TONCOIN_ID = '0x76a797a59ba2c17726896976b7b3747bfd1d220f'
const PANCAKESWAP_URL = 'https://api.pancakeswap.info/api/v2/tokens'
const UPDATE_ERROR = "Can't update token price"
await new Axios({})
.get(`${PANCAKESWAP_URL}/${pancakeswapTokenId}`)
.then(async (response) => {
if (
response.status === 200 &&
response.data &&
parseJ...
You can try to check this links
- https://www.tonstake.com/ - common information with calculator for staking
- https://status.toncenter.com/d/BYgpEG74k/nodes-map?orgId=1&refresh=10s - map with validator nodes in world
- https://tonmon.xyz/ - dashboard with techical information of validators and blockchain
-
For generate private key from seed pharse you can use this library. From mnemonic you will recieve a secret(private) + public keys
-
It's impossible. You can't get seed phrase of pair keys.
You need to deploy a simple contract per user (who voted) and calculate address (deterministic) for store user vote. You main contract will store counts only.
Like:
yes - 313
no - 131
If user want to change vote than user should sent transaction to personal vote item (you can prepare it in your ddap) and that item will change vote on main contract
You can see simple example here - https://github.com/Tonstarter/simple-vote to understand how it can be work for a lot users without big ...
No it's not a same exit code. 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).
13 - Out of gas error. (it is not a negative number and means out of gas)
In short, yes, you should rewrite your smart contracts from scratch. How much you need to rewrite, it's based on project logic. I can share couple things for help you to make a decisio.
Firstly, FunC is not the same as Solidiy.You can find more details about this language and examples in the documentation.
Secondly, and I would say this is a very important point. Ton has a different architecture than ETH like chains. You can read this article to understand more how Ton wo...
Any string which was sign by secret key can be verify with public key. Some examples below
For sign a payload (nacl used from ton-crypto)
const signatureData = beginCell()
.storeUint(123, 32)
.storeCoins(toNano(123))
.endCell()
nacl.sign(signatureData.hash(), YOUR_SECRET_KEY)
For check signature on another side (js) it can be like this:
return nacl.sign.detached.verify(message, signature, pubkey)
...
In short, no (or I don't know it). Each transaction and contract has to pay the fee itself. You can only change the sendMode for transaction.
You can try to organise this. Some random ideas
-
Use contract B as proxy for all transactions to contract A and B will add some TONCOINS for payment. Also the surplus can be returned by contract A to contract B.
-
If contract A has any transaction with a small amount, then A will send the transaction to contract B (also attaching the payment b...
This is interface for getTransactions on typescript. You can use it for get more information how to parse response - github reference
Tonweb return has a same data. Thats both client use same API
Hello! If you mean ERC20 Toncoin then you can try to use official bridge https://ton.org/bridge/ for transfer Toncoins.