New answers tagged

1 vote

Any updated marketplace and nft contract based on SmartPy and Taquito

You are probably referring to this tutorial: https://tezos.com/developers/tutorials/nft-markeplace/ You'll find the whole code here. The smart contract's code is here. I don't understand the question ...
1 vote
Accepted

Missing item in map error

No need to check if a key exists before deleting it. To check if a map contains a key you have the .contains(key) instruction. Example: sp.verify(self.data.links.contains(link))
0 votes
Accepted

How to implement try & catch in smaryPy?

There is no way to catch exceptions on Tezos. SmartPy (and Michelson, the language into which it is compiled) is using Some/None system, also known as option. The sp.contract(<type>, <address&...
2 votes
Accepted

How to write enum in smartPy?

SmartPy offers the variant system (see doc for new and legacy syntax). It's more powerful than enum as they associate a value with a type so you can create enum with them and even more. Basically an ...
1 vote
Accepted

How to make a call of struct in smartPy

In SmartPy you don't call a structure, you simply create a record. Two records with the same field names and associated value types are of the same type. Naming a type doesn't make it different and is ...
0 votes
Accepted

SmartPy, File "smartML/tools/compiler.ml", line 2210, characters 18-24: Assertion failed

In the legacy syntax sp.big_map(...) does not create a big_map. It only returns an expression that, when evaluated, creates a big_map. If you want to modify a variable you have to use a sp.local. As ...

Top 50 recent answers are included