5
votes
Accepted
FA2 from/to serialization
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 ...
4
votes
Accepted
Pytezos: structuring call for FA2
As @Groxan pointed out, update_operators entrypoint expects a list:
add_op = token.update_operators([{
"add_operator": {
"owner": 'tz1...',
"operator":...
4
votes
Accepted
How to store and load custom FA2 NFT metadata?
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 ...
3
votes
Accepted
How to retrive parameters from a Michelson function?
I don't know Dart, Flutter, or this library so my help will be limited. From looking at your code you have 2 sets of Michelson that is decided based on whether its FA1 or 2
final parameters = token....
2
votes
Accepted
How do I call the FA2 balance_of endpoint through Truffle?
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 ...
2
votes
Accepted
I can't import my nft into my temple wallet
The entrypoint balance_of does not respect the specification.
Your contract has: (Does not match the specification)
(pair %balance_of
(contract %callback
(list
(pair
...
2
votes
Accepted
How to get the owner of an FA2 token on chain
The specification does not enforce an implementation for this. You can only verify if a given address owns the token by calling balance_of callback view. In the case of an NFT, balance 1 would mean ...
2
votes
How to retrive parameters from a Michelson function?
In addition to @simon-mcloughlin's answer, if you don't know how to build Michelson parameters you can use a helper endpoint in TzKT API: https://api.tzkt.io/#operation/...
2
votes
Accepted
How to monitor RPC block responses for token transfers?
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 ...
2
votes
Creation of a FA2 Token (Fungible) and not an NFT
FA2.0 standard doesn't describe how to distinguish NFT from non-NFT, so there is actually no way to precisely tell what your token is.
TzKT uses heuristics to classify tokens. In particular, it ...
2
votes
Accepted
Is operator support required for standard NFTs?
Setting an Operator allows another wallet / contract address to transfer or make use of the asset that was given to it.
This is how all dApps work. If you want to sell something on objkt.com, you have ...
1
vote
Call FA2 transfer from another smart-contract with archertype
I just typed const transaction as a transfer_param type and used the name of the field you defined. Also, %transfer takes a list of transfer_param as input, so [transaction] instead of just ...
1
vote
Accepted
Creation of a FA2 Token (Fungible) and not an NFT
There are two Token Standards on Tezos. FA1.2 and FA2. There is no separate standard for NFTs. So this is indeed correct, FA2 standard is an Multi-Asset Interface, also the NFT abbreviation stands for ...
1
vote
Accepted
Problem for creating smart contract NFT marketplace
The tutorial at https://tezos.com/developers/tutorials/nft-markeplace is using the SmartPy legacy syntax.
You can still use it at https://legacy.smartpy.io/ide. You also need to update the URL from ...
1
vote
Accepted
Trying to give a custom metadata but still it is using the default base metadata mentioned in class Common
In the constructor of Fa2Nft, it takes both metadata and metadata_base arguments
def __init__(
self, metadata, token_metadata=[], ledger={}, policy=None, metadata_base=None
):
ledger, ...
1
vote
Accepted
Smartpy 0.18.0 FA2 template
The whole library exists with the new syntax: https://smartpy.io/ide?template=fa2_lib.py
There are tests with the three base classes with all available policies and mixins:
https://smartpy.io/ide?...
1
vote
Accepted
changing from transfer to NoTransfer on FA2
I'm guessing you've deployed the smartpy FA2 template.
I'm not very familiar with the template (in fact just now I went to have a look at it and discovered that they have a new template that I wasn't ...
1
vote
Accepted
TzKt not recognising the tokens of my contract
In short: in your particular case the tokens will be recognized after the first transfer call.
Why? Your contract doesn't fully implement the FA standard (in particular, according to the standard, you ...
1
vote
Accepted
Clarifications on FA2 operator
Is it possible to have more than 1 operator per tokenID?
Operators are stored in a big-map, there can be as many entries in it as there needs to be. For example here is the contents of the operators ...
1
vote
FA2 view not working correctly
I would guess Temple doesn't recognize the metadata as they don't seem valid.
You can get more information about formatting the token metadata here => https://gitlab.com/tezos/tzip/-/blob/master/...
1
vote
How to change the storage to transfer of an NFT?
One more thing, the storage update
{
s with
price = _price;
}
is misplaced. You should take it out of the make_transfer lambda, which doesn't return a storage. I've reproduced your code and ...
1
vote
How to change the storage to transfer of an NFT?
Change the commas in let { _price, amount, to_, token_id } = p in to semicolons.
It is difficult to tell which line is line 421 that generates the error, but I think this is it.
1
vote
Accepted
Is there a "standard" way to load off-chain metadata for all tokens from a single off-chain data source in an FA2 contract?
Yes, there is no standard way to do that. However, there is a "URI-pattern" approach, which is non-standard, but I believe it will be, eventually.
The idea is to place the string %...
1
vote
Do FA2 entrypoints need to be at the top level in order to comply with the spec?
You don't need to know the position of an entrypoint to call it. For this reason, the position does not matter much so it is not imposed by the standard.
1
vote
Best way to duplicate/sync private database with FA2 contract transactions & balances
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 ...
1
vote
Calling contract entrypoint having complex parameters
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
fa2 × 36smartpy × 14
smart-contracts × 12
nft × 11
transfer × 5
ligo × 4
michelson × 3
contract × 3
tzkt × 3
tezos-client × 2
rpc × 2
fa1.2 × 2
tokens × 2
transactions × 1
wallets × 1
taquito × 1
javascript × 1
block × 1
blockchain × 1
testing × 1
dapps × 1
truffle × 1
testnet × 1
python × 1
micheline × 1