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
Back to post

Revisions 2

7 months ago
Jeremy
384 × 5 Administrator
What specifies the price of a jetton?
What specifies the price of a jetton?
When added to a liquidity pool protocol, a jetton is defined by supply and demand. If you are looking for a way to sell a jetton at a single fixed price, then you're likely looking for an ICO smart contract: https://github.com/ton-blockchain/token-contract/blob/main/ft/jetton-minter-ICO.fc#L56 Where the amount of TON sent with the transaction is multiplied by some value of jetton to mint to the sender. ```clike int jetton_amount = buy_amount; ;; rate 1 jetton = 1 toncoin; multiply to price here ;; additional code mint_tokens(sender_address, jetton_wallet_code, amount, master_msg); ```
When added to a liquidity pool protocol, a jetton is defined by supply and demand. If you are looking for a way to sell a jetton at a single fixed price, then you're likely looking for an ICO smart contract: https://github.com/ton-blockchain/token-contract/blob/main/ft/jetton-minter-ICO.fc#L56 Where the amount of TON sent with the transaction is multiplied by some value of jetton to mint to the sender. ```clike int jetton_amount = buy_amount; ;; rate 1 jetton = 1 toncoin; multiply to price here var master_msg = begin_cell() .store_uint(op::internal_transfer(), 32) .store_uint(0, 64) ;; quert_id .store_coins(jetton_amount) .store_slice(my_address()) ;; from_address .store_slice(sender_address) ;; response_address .store_coins(0) ;; no forward_amount .store_uint(0, 1) ;; forward_payload in this slice, not separate cell .end_cell(); mint_tokens(sender_address, jetton_wallet_code, amount, master_msg); ```
7 months ago
Original
Jeremy
384 × 5 Administrator
What specifies the price of a jetton?

When added to a liquidity pool protocol, a jetton is defined by supply and demand. If you are looking for a way to sell a jetton at a single fixed price, then you're likely looking for an ICO smart contract: https://github.com/ton-blockchain/token-contract/blob/main/ft/jetton-minter-ICO.fc#L56 Where the amount of TON sent with the transaction is multiplied by some value of jetton to mint to the sender. ```clike int jetton_amount = buy_amount; ;; rate 1 jetton = 1 toncoin; multiply to price here var master_msg = begin_cell() .store_uint(op::internal_transfer(), 32) .store_uint(0, 64) ;; quert_id .store_coins(jetton_amount) .store_slice(my_address()) ;; from_address .store_slice(sender_address) ;; response_address .store_coins(0) ;; no forward_amount .store_uint(0, 1) ;; forward_payload in this slice, not separate cell .end_cell(); mint_tokens(sender_address, jetton_wallet_code, amount, master_msg); ```