Questions tagged [ligo]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
49 views

Taqueria/Ligo install problems

I'm trying to run through this tutorial on DApp development with Ligo (https://tezos.com/developers/tutorials/nft-ligo-marketplace/) and am running into an error. TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 ...
0 votes
2 answers
31 views

Contract compile error in Dapp tutorial (wine collection marketplace)

I'm trying to run through this tutorial on dapp development with ligo (https://tezos.com/developers/tutorials/nft-ligo-marketplace/) and am running into an error. In the "NFT Marketplace Contract&...
0 votes
1 answer
203 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....
0 votes
2 answers
114 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 ...
0 votes
1 answer
50 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}); ...
0 votes
1 answer
93 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) ...
0 votes
1 answer
28 views

how to input data of type maps

This is a multiasset holding contract with code to mint and burn FA2 tokens but I am confused ion how to provide the inputs as it is getting errored token_info is the metadata section I want to put ...
0 votes
1 answer
90 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(...
0 votes
1 answer
64 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/...
1 vote
1 answer
27 views

How to test that an error is raised in ligo?

I would like to know if there is some way of testing for error raised with failwith in ligo using the testing framework? There doesn’t seem to be any documented try-catch mechanism yet, or am I ...
0 votes
1 answer
16 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?...
0 votes
1 answer
12 views

Is there a way to extend existing signature?

I have a question regarding new module signatures. Is there a way to extend existing signature? module type S1 = sig type t val v : t end module type S2 = sig include S1 val v2 : t end ...
0 votes
1 answer
10 views

Is it possible to pack a js object with specific types for its properties that can be unpacked in a smart contract

Is it possible to pack a javascript object with specific types for its properties that can be unpacked in a smart contract (for example Bytes.unpack in ligo)? I've come to the same point as the ...
0 votes
1 answer
98 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 ...
0 votes
0 answers
10 views

After compiling a jsligo contract, the resulting michelson contract has errors and cannot be deployed

After compiling a jsligo contract, the resulting michelson contract has errors and cannot be deployed. The error is "invalid primitive name". Has anyone ever gotten this error ? Do you know ...
0 votes
1 answer
11 views

How can I call a contract using : Tezos.transaction(`parameter, tez, contract<`parameter>)

Since declaration of entrypoint with @entry How can I call a contract using : Tezos.transaction(`parameter, tez, contract<`parameter>) I mean in doc the example is : let contract = match (...
0 votes
1 answer
7 views

How can I assert that a contract transfer fails with a particular error message?

How can I assert that a contract transfer fails with a particular error message? Tried a couple things, including this: match call_as pledger1 Get_refund 1tz taddr with | Success _ -> ...
0 votes
1 answer
5 views

Does anyone have template code calling balance_of entrypoint using JSLigo?

Does anyone have template code calling balance_of entrypoint using JSLigo? I want sth similar to Tezos.get_balance() but getting FA2 token balance instead of tez.
0 votes
1 answer
6 views

Stuck trying to pass a partial object to an entrypoint in Ligo

I was hoping for a little guidance for jsligo. I am writing a simple contract that I am trying to make into a teaching tool. However I am stuck trying to pass a partial object to an entrypoint. type ...
1 vote
1 answer
64 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 ...
1 vote
3 answers
34 views

How do you generate your initial storage for deployment in ligo?

I'm curious about your strategies regarding the following questions: How do you generate your initial storage for deployment ? Where do you store your storage types ? Do you keep your storage ...
0 votes
1 answer
18 views

How to compile a LigoLang jsLigo written smart contract on Windows + vsCode?

I'm beginning to learn to write Tezos smart contracts with LigoLang using jsLigo as programming language and Windows as operating system. For IDE I'm using vsCode. I've followed the Getting Started ...
0 votes
0 answers
18 views

Unable to interact with other contracts because Tezos.get_contract_opt got None

I tried to interact with other contracts but failed because Tezos.get_contract_opt always returns None. Here's the demo code (ligo v0.60.0): receiver.jsligo - A contract that the "broadcaster&...
0 votes
2 answers
12 views

Merkle Tree implementation in Ligo

I am looking for an implementation of a merkle tree, in ligo. Could somebody help me please? From Slack, to share the answers for others its posted on Stackexchange.
1 vote
1 answer
52 views

Writing SmartPy tests along with LIGO contracts

I have a set of smart contracts coded in SmartPy. They are heavily interdependent and some of them also interact with cTez contracts. I need to write SmartPy tests to check if everything is working ...
1 vote
1 answer
36 views

Convert bytes to string in CameLIGO?

I would like to convert a bytes type to a string type. How can this be done in pure CameLIGO?: let data: bytes = [%bytes "hello"] in let str: string = ??? Thank you, Edward
3 votes
3 answers
123 views

Smart contract availability and diversity on Tezos

I am researching about Tezos to what smart contract language there are available to use. When I look at the TezosWiki and other sources I came up to with this list: Tezos Smart Contract Languages: ...
0 votes
0 answers
27 views

"Cannot unify set with unit" error

I am trying to write a simple contract in which I am using set of records as storage. type data = { message : string, did: address }; type parameter = | ["Published"] | ["...
0 votes
2 answers
45 views

TransferOwnership in Tezos

Is there an analog of transferOwnership in Tezos? It looks like it's possible to make custom FA2 contract and change owner. Is this correct? Looking for an authorative answer
1 vote
1 answer
53 views

Tezos Smart Contract Language Specifications

Is there an equivalent "interface" keyword in any of the Tezos smart contract languages (i.e. smartpy, archetype, ligo) that is similar to solidity's keyword "interface". If there ...
0 votes
1 answer
44 views

How does Tezos Checker work?

I am looking at Tezos Checker and wondering if there is a visualization of the process flow how it works? Specifically something like this for example?
2 votes
1 answer
157 views

How to get the owner of an FA2 token on chain

For an FA2 nft contract, how can I get the address of the owner of token_id 0 from inside another contract?
1 vote
2 answers
68 views

Can I create a smart contract from inside another smart contract in LIGO?

Through a parent contract, I want to be able to originate multiple child contracts. How can I do this in LIGO?
0 votes
3 answers
46 views

Size of Big_map or Big_map is empty?

Is it possible to find the size of a Big_map, or to find out whether a Big_map is empty?
1 vote
2 answers
40 views

Truffle is not working for compiling and deploying

Is anybody here still using Truffle in order to compile and deploy Tezos projects? I created a project with it over a year ago and wanted to update the environment. After dowloading the latest Ligo ...
0 votes
1 answer
107 views

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

I'm trying to loop through a mapping list (type_a) and update a different mapping list (type_b). Both lists are different. For List.fold, does the accumulator have to be the same type as list? ie, if ...
0 votes
1 answer
76 views

How to write function that uses polymorphic types

I'm trying to write some functions in (came)ligo that compare several values as long as they are ints, strings, or nats. compare_equal is one of them. This errors out with Only composed types of not ...
1 vote
1 answer
134 views

Calling contract without knowing contract parameter type

If I wanted my contract to be able to call different types of contracts, with different parameters and parameter types, and I didn't know what those parameters were going to be ahead of time... I have ...
0 votes
0 answers
74 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 ...
0 votes
1 answer
39 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 ...
0 votes
1 answer
36 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 }; ...
0 votes
1 answer
207 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":&...
0 votes
2 answers
58 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 ...
2 votes
1 answer
63 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"]}...
0 votes
0 answers
77 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 = ...
3 votes
1 answer
244 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: ...
0 votes
1 answer
37 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 ...
0 votes
2 answers
94 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 ...
1 vote
2 answers
100 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 ...
1 vote
1 answer
50 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":"(...