Questions tagged [ligo]
The ligo tag has no usage guidance.
21
questions with no upvoted or accepted answers
2
votes
0
answers
48
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 ...
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 ...
1
vote
0
answers
107
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 ...
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 ...
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
0
answers
37
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:
...
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
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
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
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
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
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
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
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
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 = ...
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/...
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
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
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
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 ...