Questions tagged [ligo]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

ListValidationError on interacting with contract using Taquito

I'm trying to interact with this entrypoint using taquito parameter pair token_assets list($token_assets_item) trigger_time timestamp token_assets_item pair amount nat asset_id string ...
user avatar
0 votes
1 answer
11 views

Ligo address being interpreted as string

I'm trying to initialise a contract that has an address option in its initial storage, but when I provide a valid address, it keeps being interpreted as a string; and compilation fails. I have here a ...
user avatar
  • 118
0 votes
1 answer
21 views

JSLigo Error: Invalid record field in record

I'm trying to write a smart contract with JSLigo. This contract has a storage type with a single string field and 2 functions, to update and reset this string: type storage = { name: string }; ...
user avatar
  • 23
0 votes
1 answer
39 views

error when deploying my smart contract

I created a smart contract it compiles without problem but I have an error when deploying, I don't know what this error can refer to... HttpResponse: Http error response: (500) [{"kind":&...
user avatar
  • 109
0 votes
0 answers
18 views

How to change storage price when transferring an nft?

I created a transfer function in this function I pass a price as a parameter, I would like this price to be updated on the storage of my nft... I don't really know how to do it (I'm new to tezos ) ...
user avatar
  • 109
0 votes
0 answers
15 views

I don't understand how the hashlock contract works in the LIGO IDE

I'm trying to understand the hashlock contract: https://gitlab.com/ligolangh/ligo/-/blob/e2672829484927b268c8ab0755247403e1f90675/src/test/examples/jsligo/hashlock.jsligo For me, in a hashlock ...
user avatar
0 votes
1 answer
13 views

is it necessary to implement the permissions_descriptor?

With FA2 NFT tokens, is it necessary to implement the permissions_descriptor? As far as I can see in tzkt, it doesn't look like it's actually being used. Are there any contracts that are actually used?...
user avatar
  • 1
0 votes
0 answers
27 views

Can I call FA1.2 token's transfer entrypoint & FA2.0 token's transfer entrypoint from the one contract?

I want to call FA1.2 token's transfer entrypoint & FA2.0 token's transfer entrypoint from the one contract using get_entrypoint_opt/get_contract_opt. But, Both interfaces use "Transfer" ...
user avatar
  • 1
0 votes
2 answers
73 views

Tezos Contracts Compiling Error

I am just days into learning how to build a dapp on Tezos for my thesis. I tried replicating the steps from Claude's tutorial - https://hackernoon.com/build-your-first-dapp-on-tezos-rwgl3ymb I ran ...
user avatar
2 votes
1 answer
49 views

Cannot get to initialize empty list in CameLIGO

I'm trying to write a smart contract in CameLIGO that looks like this parameters "Hello world" storage [{ text = "Blob"; voters = ["tz1TKc3zQBMv7Rez77sX4JNdqMvG33LQrURk"]}...
user avatar
  • 21
0 votes
2 answers
38 views

Do FA2 entrypoints need to be at the top level in order to comply with the spec?

Most of the example FA2 implementations I've found, as well as the deployed contracts I've investigated have the required FA2 entrypoints (transfer, balance_of, update_operators) buried in the second ...
user avatar
  • 131
0 votes
1 answer
33 views

How to check amount sent with transaction (like msg.value>6 in ethereum)

How do I check inside a contract entrypoint, that the user sent a particular amount with the transaction? In Frontend: const operation = await contractInstance.methods.methodName().send({amount:12}); ...
user avatar
0 votes
0 answers
35 views

Is there a more sensible way to convert an int to a string in Cameligo?

Is there a more sensible way to convert an int to a string in Cameligo? Alternatively, is there a way to concatenate an int or nat with a string? type lookup = (int, string) map let lookup: lookup = ...
user avatar
0 votes
0 answers
12 views

Difference between := (colon equals) and = (equals) in LIGO?

I'm working through https://tezosacademy.io/pascal/chapter-variables And it's walking me through how to assign values to const and var types. However, there's a note that says: Notice the assignment ...
user avatar
0 votes
0 answers
46 views

Can't run ligo on Windows

I just followed the steps provided in the guide, but it doesn't work. Docker version is v20.10.7 >cat ligo #!/bin/sh docker run --user=`id -u` -v $PWD:$PWD -w $PWD ligolang/ligo:next "$@" ...
user avatar
0 votes
1 answer
30 views

Compile multiple Ligo contracts at one go

I would like to compile all contracts in a folder at one go. I tried "compile all": "docker run --rm -v \"$PWD\":\"$PWD\" -w \"$PWD\" ligolang/ligo:0.24.0 ...
user avatar
  • 105
0 votes
2 answers
71 views

smart contract translation tool

Any known tool or website can translate the given online contract into ligo? For example, KT18fp5rcTW7mbWDmzFwjLDUhs5MeJmagDSZ, can I review the logic of this contract in ligo somewhere, however ...
user avatar
0 votes
0 answers
20 views

How to convert to Ligo type

I have this smart contract and was wondering how to convert to a ligo type transfer parameter list($transfer_item) transfer_item pair from_ address txs list($txs_item) txs_item pair to_ ...
user avatar
0 votes
0 answers
31 views

How to interact with a deployed smart contract ligo

It seems that my smart contract cannot find the transfer operation of my FA2 other smart contract. Here is where the error is being thrown. case (Tezos.get_entrypoint_opt("%transfer", ...
user avatar
0 votes
0 answers
53 views

is there an implementation of the FA1.2 template in ligo with metadata ( TZIP-016)?

I have find 2 implementations of the FA1.2 template, one in PascaLigo (https://gitlab.com/camlcase-dev/fa1.2/-/blob/master/ligo/fa1.2.ligo) and one in CameLigo https://gitlab.com/ligolang/ligo/-/blob/...
user avatar
1 vote
2 answers
79 views

what is the equivalent of ligo "compile-parameter" for smartpy?

The Smartpy compiler allow to compile a contract (compiling the code and the initial storage) but I don't see any "compile-parameter" option, that would allow to convert a smartpy command to ...
user avatar
0 votes
1 answer
51 views

tqtezos / minter-sdk installation issue

I am trying to run below command for minter-contract on my local machine and getting error npm i @tqtezos/minter-contracts no such file or directory, chmod ‘/node_modules/@tqtezos/minter-contracts/...
user avatar
0 votes
1 answer
67 views

Get entrypoint operation (get_entrypoint_opt) fails

I have some troubles to call a contract. This is the scenario: Contract B (Entrypoint method "transfer"): (pair %transfer (bytes %args1) (pair (string %args2) ...
user avatar
1 vote
2 answers
245 views

Best Language to Use with Tezos

There are a lot of options when it comes to coding Smart Contracts on Tezos. My question is simple, which of the supported languages is the best in terms of support, east of use, documentation, and ...
user avatar
2 votes
1 answer
57 views

Support for emojis in LIGO?

Is LIGO going to get native support for emojis? When I tried compiling a contract with the classic 🚀 (rocketship emoji) inside a string, I got the error Unexpected character '\240'. Honestly, without ...
user avatar
0 votes
1 answer
22 views

Does LIGO support parameterized types?

Does LIGO support parameterized types? Consider rcons, which is like cons (::) but with the arguments flipped. I'd like to be able to write something like: let rcons((xs, x): T list * T): T list = x ...
user avatar
0 votes
1 answer
37 views

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

What's an elegant way to write the classic take function in CameLIGO? take takes the first num elements of a list. This is how I'm writing it currently, and it's ugly. Here, message is a type I ...
user avatar
0 votes
1 answer
66 views

Cannot get transfer entrypoint

I'm trying to call an FA1.2 transfer function from another contract. Here is my endpoint in the FA1.2 contract: type action is | Transfer of michelson_pair(address, "from", michelson_pair(...
user avatar
0 votes
1 answer
21 views

Is SmartPy package inside All Michaelson Supported Languages?

I've discovered that Liquidity, LigoLang and Ocamel Support Tezos development, but I've only found 1 resource that states that SmartPy supports only LigoLang. I wanted to use the right language to ...
user avatar
0 votes
1 answer
178 views

proto.007-PsDELPH1.storage_exhausted.operation when originating contract (storage_limit is set)

I am trying to deploy a contract to delphinet with truffle. On a local sandbox the contract deploys just fine, but for the deployment on Delphi I am getting: proto.007-PsDELPH1.storage_exhausted....
user avatar
  • 11
0 votes
1 answer
84 views

"Invalid bytes error" on migration of PascalLigo contract

I am trying to write tests for my contract, which stores an user as follows: type userData is record [ addressSet : set(bytes); storedAmount : tez; ] My storage is a big_map as ...
user avatar
  • 11
0 votes
2 answers
57 views

Comments in LIGO

What is the syntax for comments in LIGO?
user avatar
1 vote
0 answers
80 views

Initialize a record storage with command line

I'm trying to initialize the storage of the record through the command line. I'm trying different variations of: "ligo compile-storage college.religo main 4 Adam 1600" For a record called ...
user avatar
2 votes
1 answer
115 views

Convert address to string in LIGO

How do I convert an address type to a string type in LIGO?
user avatar
0 votes
1 answer
82 views

Handling floating point numbers in decentralized exchanges

I am writing a contract in Ligo that manages FA2 fungible tokens with an interface that lets users easily create new tokens. I am building a very simple exchange where the users can create orders to ...
user avatar
0 votes
1 answer
33 views

Can I use escape characters in LIGO strings?

I would like to insert some special ASCII characters that I only know how to express as numbers. In Python I would for example be able to write the SYN control character as \x16 since 0x16 is SYN in ...
user avatar
1 vote
1 answer
68 views

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

Image if I have a smart contract with entry-point increment() that increments a counter. So if I call this entry-point for the first time and we know that it takes almost 1 minute for the operation to ...
user avatar
2 votes
0 answers
47 views

How to set `contract` as input argument

I have a method Token_metadata_registry which takes contract(address) as input parameter and I would like to call that method from ligo dry-run. How do I do that? ligo dry-run contracts/main/fa2.ligo ...
user avatar
1 vote
3 answers
97 views

Tezos.get_entrypoint_opt in Ligo issue

I am trying to replace get_contract with Tezos.get_entrypoint_opt I need to transfer FA1.2 tokens in Dex: https://github.com/madfish-solutions/quipuswap-core/blob/master/contracts/Dex.ligo#L21-L28 ...
user avatar
0 votes
1 answer
39 views

Error: ligo: generated. untyped BIG_MAP_EMPTY

In ligo for a smart-contract I have a big_map in my storage and I want to pass nothing in the map as intial_storage value. { name = "stablecoin"; symbol = "eur"; total_supply = ...
user avatar
1 vote
0 answers
23 views

Not able to get error msg generated by failWith using ConseilJS

I am trying to invoke my contract with conseiljs.TezosNodeWriter.sendContractInvocationOperation(). Everything works fine with a positive scenario but when I purposely fail the script with some error ...
user avatar
1 vote
1 answer
13 views

Error in dry : different keys in tuple and record

I am trying to dry-run one contract on online Ligo IDE, Access function : main Parameters : (10n, ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx" : address)) The logo code is compiling fine and I don't ...
user avatar
1 vote
1 answer
57 views

Pascaligo map iteration issue

I try to fetch a list of addresses with expired date by appending the address to list(address). However when doing map iteration, it encounters a persistent error says 'not True'. Hope someone can ...
user avatar
1 vote
1 answer
42 views

Pascaligo Compiling Error on Big_map.add

I encounter the below error message when compiling the code on LIGO Playground. Error: ligo: in file "tmp-1CAIKM1VUeRgb.ligo", line 29, characters 98-112. different kinds: {"a":"unit","b":"(...
user avatar
1 vote
2 answers
164 views

Deploy FA1.2 Ligo token contract

I'm deploying the FA1.2 contract with the online LIGO IDE, Here's a link to the SC: https://ide.ligolang.org/p/QZ85RIfszExxeDPEf_W52A and i'm initializing the storage this way: (Pair (Pair {} "...
user avatar
  • 444
1 vote
1 answer
51 views

How to add add a record to a map in CameLIGO

I'm using CameLIGO and want to add a record to a map. I keep getting this error: Error: ligo: : Parse error in file "tmp-1lMUlWlg5fktI.ligo", line 21, characters 45-46, after "{" and before "}": ...
user avatar
0 votes
1 answer
77 views

How do you update a map in Pascal Ligo?

I'm trying to learn how to write a smart contract and using Ligo. I'm struggling with quite a few things at the same time e.g. syntax, understand the documentation, best practices etc. Baby step is, ...
user avatar
5 votes
3 answers
1k views

Testing frameworks for tezos smart-contracts

I did few smart contracts with Ligo, but now looking for more productionize setup. Is there a test framework one can use for Tezos? I'm looking for something like waffle + mocha in Ethereum, or ...
user avatar
2 votes
1 answer
52 views

Ligo Lang "unbound variable fail"

When I try to compile this contract https://github.com/stove-labs/nft.stove-labs.com/blob/master/src/contracts/nft.ligo using the command ligo compile-contract nft.ligo main > nft.tz per the ...
user avatar
3 votes
1 answer
217 views

Does Ligo Lang run on OSX?

I tried installing ligo lang following the instructions here: https://ligolang.org/docs/intro/installation/ I have docker running, the bash install script runs fine, but I still get -bash: ligo: ...
user avatar