Questions tagged [ligo]

The tag has no usage guidance.

26 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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
0 answers
81 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
1 vote
0 answers
24 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
59 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
0 answers
30 views

Split function contract template

Is there a code template for a simple contract which splits the incoming funds and sends them proportionally to a list of pre-registered addresses? Example: Contract has the following functions: ...
user avatar
  • 835
0 votes
0 answers
8 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?
user avatar
  • 76
0 votes
0 answers
13 views

Tezos.get_contract fails even though contract exists

I have a view caller that calls the view of my main contract. I'm not sure why this is happening, but the contract fails at get_contract_with_error. Also, Tezos.call_view returns None. Here's what my ...
user avatar
0 votes
0 answers
10 views

Ill-formed block of statements

type investment is record [ amount:tez; deadline:timestamp ] type investor is map (address,investment) type user_data is record [ balance:tez; is_invested:bool; investment:...
user avatar
0 votes
0 answers
33 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
0 answers
19 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
  • 129
0 votes
0 answers
17 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
30 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
77 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
0 votes
1 answer
35 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
43 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
47 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
0 answers
21 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
33 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
55 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
0 votes
1 answer
52 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
68 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
0 votes
1 answer
67 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
180 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
83 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