Hot answers tagged

11 votes
Accepted

Ethereum/Solidity dev here, looking to migrate some Solidity contracts onto Tezos. Was hoping to have some light shed on a few questions

In response to question 4: Reuse and modularity We discuss reuse and modularity, of which inheritance is one of many mechanisms: Michelson has no mechanism for code reuse, except for calling existing ...
arvidj's user avatar
  • 2,378
7 votes

Ethereum/Solidity dev here, looking to migrate some Solidity contracts onto Tezos. Was hoping to have some light shed on a few questions

Here is a complement to Arvid's answer regarding Archetype: Reuse and modularity Indeed Archetype's extensions are reusable codes to add features to a contract. For example, using the 'transferable' ...
Benoit Rognier's user avatar
6 votes

Testing frameworks for tezos smart-contracts

Ad 1. I am not sure whether it is what you look for, but look at: https://smartpy.io/demo/ SmartPy offers different tools: Analytics: elements of the UI in SmartPy.io to analyse smart contracts and ...
Tomasz Waszczyk's user avatar
5 votes

Ethereum/Solidity dev here, looking to migrate some Solidity contracts onto Tezos. Was hoping to have some light shed on a few questions

Do Archetype/Ligo provide everything that Michelson can currently do, or are there limitations with either? I think if something is possible in Michelson and not in Ligo, it is probably a bug worth ...
Raphaël Cauderlier's user avatar
4 votes
Accepted

Testing frameworks for tezos smart-contracts

Here is the preview version of truffle tools for working with smart contacts in Tezos: https://www.trufflesuite.com:8443/docs/tezos/truffle/quickstart
Groxan's user avatar
  • 2,701
4 votes
Accepted

Best Language to Use with Tezos

First of all, Fi is no longer updated and Liquidity no longer supports Tezos, which leaves Ligo, SmartPy, Michelson and Morley. To this list, I would also add Archetype. All of these languages can be ...
arvidj's user avatar
  • 2,378
4 votes

Ethereum/Solidity dev here, looking to migrate some Solidity contracts onto Tezos. Was hoping to have some light shed on a few questions

With respect to question 3, following @ezy remark, SmartPy has some inlining capabilities including with new opcodes as shown in the Inline Michelson template (of the new version, currently https://...
FFF's user avatar
  • 3,260
3 votes
Accepted

Understanding Calling limit of entry-point in Tezos smart-contract until the previous request to the contract is confirmed (block backed)

In your example, you send a transaction that calls the increment entry point of the contract. For that to happen, the transaction will have to be included in a block and, as you mention, blocks come ...
Arthur B's user avatar
  • 4,599
3 votes
Accepted

Convert address to string in LIGO

You cannot convert an address to a string in Michelson. You could cheat by going through pack and inspecting the binary representation but it is unlikely something you would want to do.
FFF's user avatar
  • 3,260
3 votes
Accepted

Error: ligo: generated. untyped BIG_MAP_EMPTY

You should type the Big_map.empty. For instance (I do not know the type of your big map): (Big_map.empty : (nat , token) big_map)
Gabriel Alfour's user avatar
3 votes
Accepted

Calling contract without knowing contract parameter type

I believe this is not possible, one solution would be to use a parameter of type bytes that would be the result of a pack, then your unknown future contracts will know how to unpack this param.
catsoup's user avatar
  • 106
3 votes

Smart contract availability and diversity on Tezos

We can confirm that LigoLANG is used by the following open-source projects: Quipuswap, Yupana, cTez, Juster, Vortex DEX, Flame DeFi, Deku Sidechain, TzPortal Bridge.
Marigold_Dev's user avatar
3 votes
Accepted

Convert bytes to string in CameLIGO?

If you are using literal bytes i don't think you can do it from the standard lib of Ligo. You need to build your bytes to string function. If you are using bytes create from a Michelson string you can ...
Thomas's user avatar
  • 380
2 votes
Accepted

How to add add a record to a map in CameLIGO

Here is the corrected version of createArtwork: let createArtwork (store, id, ihash : artwork_storage * artworkId * ipfsHash) : artwork_storage = Map.update (id : artworkId) (Some ({ artist = ...
arvidj's user avatar
  • 2,378
2 votes

Deploy FA1.2 Ligo token contract

Here's the parameter values to initialize storage for the fa1.2 contract. It is working well on my side. If you want to more look at pascaligo syntax, you can visit ligolang doc pages on https://...
technomad21c's user avatar
2 votes
Accepted

What's an elegant way to write "take" in CameLIGO?

Accumulating the results to a linked list, and reversing the result would be more concise (and efficient, because your implementation traverses the entire input list, while this only looks at the ...
utdemir's user avatar
  • 136
2 votes

Is SmartPy package inside All Michaelson Supported Languages?

SmartPy is a smart-contract programming language on its own. You can use the Online IDE or use your local IDE and test the contracts with the CLI. You can find more information here: Help Section ...
Rodrigo Quelhas's user avatar
2 votes

Cannot get to initialize empty list in CameLIGO

If you want the voters to be optional then you need to initialize it with either the Some or None value constructors: voters = Some ([] : address list) or voters = (None : address list option)
Nox's user avatar
  • 131
2 votes
Accepted

Support for emojis in LIGO?

Unfortunately, the string type in Michelson is restricted to : [...] the printable subset of 7-bit ASCII, namely characters with codes from within [32, 126] range, plus the following escape ...
arvidj's user avatar
  • 2,378
2 votes
Accepted

Ligo address being interpreted as string

The address itself should be annotated as address, like this: { host = Some ("tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" : address); } See successful deployment: https://ide.ligolang.org/p/...
Aharon Lando's user avatar
2 votes
Accepted

In List.fold, does accumulator have to be the same type as list?

The type signature for List.fold_left is val fold_left : ('acc * 'item -> 'acc) -> 'acc -> 'item list -> 'acc That means 'acc can be of any type, e.g. let fn = fun (acc, a: (int, int) map ...
Melwyn Saldanha's user avatar
2 votes

Size of Big_map or Big_map is empty?

You can use this RPC endpoint to retrieve big_map size in bytes: /chains/main/blocks/${level}/context/raw/json/big_maps/index/${big_map_id}/total_bytes
Michael Zaikin's user avatar
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 ...
Rodrigo Quelhas's user avatar
2 votes

Smart contract availability and diversity on Tezos

I can confirm that SmartPy is used by the following dApps (I restrict to the TOP 10 most used): objkt.com, fx hash, Hic et Nunc (repos), Teia (contract), Versum, Plenty, Kolibri (harbinger contracts), ...
Jordan_tez's user avatar
  • 1,055
2 votes

Taqueria/Ligo install problems

I cannot reproduce it locally so it's hard to find the solution. FYI You are using docker, esy is directly installed inside so you should not have to install esy before. Some clues : When you run this ...
Laurent Canis's user avatar
1 vote
Accepted

JSLigo Error: Invalid record field in record

The problem came from the [store]:[storage] which is accepted but not well managed by the compiler. An issue has been open for this purpose. Anyway if you want your code to compile remove the opening ...
Didier Plaindoux's user avatar
1 vote
Accepted

Does LIGO support parameterized types?

Not yet. This is in the works though, and you are welcome to help if you are interested :)
Gabriel Alfour's user avatar
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.
Raphaël Cauderlier's user avatar
1 vote
Accepted

Compile multiple Ligo contracts at one go

Try cd contracts for i in *.ligo; do docker run --rm -v \"$PWD\":\"$PWD\" -w \"$PWD\" \ ligolang/ligo:0.24.0 compile-contract \ contracts/$i main &...
arvidj's user avatar
  • 2,378

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