Hot answers tagged

5

In the FA2.0 standard the sender and receiver is send as Bytes (vs. send as string for FA1.2). Both token standards say that sender and receiver are Michelson addresses. Michelson addresses have two allowed representations, as strings (readable representation) and as bytes (optimized representation). What is the extra byte used for? The extra byte is used ...


4

Your code above has some issues that I will describe below. Also, you are confusing off-chain metadata with on-chain metadata, tzip16 and tzip21 allow those structures because they were designed to be stored off-chain. (Only possible to store onchain with stringified JSON or in bytes.) In make_metadata you are trying to create a map with different value ...


2

As far as I know, you cannot check if the entrypoint returns the balance with JavaScript, because the entrypoint doesn't return a value but emits a transaction. I didn't try it for a FA2 token contract but to test a FA1.2 token contract with Truffle, I wrote a simple contract that would call the FA1.2 balance_of entrypoint and receive the balance on a ...


2

An example of a token I may want to track is tzBTC, which does call transfer internally - and it does show up in the RPC response. That is the answer, isn't that? :) So, you need to iterate over transactions in a block and check for those where destination is {tzBTC} and parameters.entrypoint is "transfer". Then you need to analyze the parameters....


1

tzkt.io offers a websocket based listener that can be used for the scenario mentioned by you. Alternatively, you can run a cron job that checks for changes in the contract storage (tzkt's API can be used once again) and records the same in the DB.


1

First of all, there is an error in your Javascript, you cannot name the array indices and assign them a value, instead of [from_ = sender ...], just write [sender ...]. Then, the argument for the creation of an FA2 token through Taquito is formatted in this way: [{ from_: sender, txs: [{to_: recipient, token_id: token_id, amount: amountOfTokens}]}]. This is ...


Only top voted, non community-wiki answers of a minimum length are eligible