JJJ
  • Member for 9 months
  • Last seen this week
How should a contract check whether an address owns a FA2 token created in another contract?
Accepted answer
3 votes

To make the LandManager the only address with permission to do this, when creating the FA2 contract the administrator should be set to LandManager.address. (hicetnuncDAO example) This way no one can ...

View answer
How are royalties programmed in an FA2 contract?
Accepted answer
2 votes

As far as I can tell, the royalties are stored as metadata and then it's up to the marketplace to support that. Tezzard example: "royalties": { "decimals": 2, "...

View answer
error Type sp.TInt / sp.TNat mismatch
Accepted answer
2 votes

Doing math on nats casts them to an int. The value needs to be casted back to a nat after the subtraction: self.data.shop_items[item_to_purchase.key].amount = sp.as_nat(self.data.shop_items[...

View answer
unhandledRejection {} when using smartpy cli compile/test
1 votes

I had the same issue and it was fixed as soon as I updated Node to the newer LTS version 16.13.1 # download latest nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash # ...

View answer
Is it possible to dynamically generate FA2 token metadata?
Accepted answer
0 votes

I tried this and it is possible. The only thing is, it only partially does what I want. Also, it introduces confusion because we can't do string concatenation for the name, thus it would have to be a ...

View answer
Is it possible to optimize FA2 NFT storage to create 10,000+ without expensive storage fees?
Accepted answer
0 votes

By storing all tokens' metadata off-chain, the max I was able to push it was to create 425 NFTs in one transaction. In subsequent transactions, the limit is around 250 NFTs per transaction. class ...

View answer
How do I transfer tez while invoking a smart contract using Taquito?
Accepted answer
0 votes

Need to include the amount in the send call const op = await contract.methods .buy(contractParams?.height, contractParams?.width) .send({ amount: 1});

View answer