Questions tagged [smart-contracts]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 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"] | ["...
2 votes
3 answers
49 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: ...
  • 122
0 votes
1 answer
30 views

Liquidity Baking interactions from a DAPP - Error during estimation being returned from temple wallet

I'm working on building an interface for liquidity baking and am encountering the error: Error during estimation when I submit the calculations for the swap tokenToXtz or xtzToToken on the swap ...
0 votes
2 answers
27 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
  • 122
2 votes
2 answers
50 views

/run_script_view gives "RpcException: HTTP/1.1 404 Not Found" on ghostnet

So I am trying to run a view operation with a post method on ghostnet: https://rpc.ghostnet.teztnets.xyz/chains/main/blocks/head/helpers/scripts/run_script_view/ with this data: {“contract”:“...
  • 23
1 vote
1 answer
37 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
24 views

What are the differences between the chain view decorators in SmartPy?

Considering the following SmartPy decorators: @sp.utils.view @sp.onchain_view @sp.offchain_view What are the differences in use between them?
  • 3
1 vote
2 answers
48 views

Invalid Metadata on Smart Contract

I am in the middle of migrating my DApp from Ithacanet to Ghostnet, the majority of the migration is done, but I am unable to mint (it's a minting contract based off of hin) using the smart contract ...
4 votes
1 answer
67 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?
2 votes
1 answer
41 views

Calling balance_of via smart contract gives error A FAILWITH instruction was reached with 19

I am trying to call "balance_of" entrypoint of fxhash contract (in ghostnet). Deployed contract: https://better-call.dev/ghostnet/KT1FqmrtKA4Pz4cNDsikt8qrwEg8pdSCpYug/interact/check I used &...
  • 111
3 votes
3 answers
63 views

How to get fxhash token attributes with smartpy?

Want to obtain fxhash token attributes/metadata with smartpy, the problem is fxhash smart contract doesn't have entrypoint or views for it. There is "get_token_data" view but it returns ...
  • 111
2 votes
1 answer
42 views

Chest keys generated by @smartpy/timelock are not functional

The tool I use https://www.npmjs.com/package/@smartpy/timelock, https://github.com/RomarQ/tezos-timelock/ the tool works good on other functions such as openChest and createChestKey. I used node 14.14....
  • 111
3 votes
2 answers
38 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?
2 votes
1 answer
30 views

how to create a chest on client side?

Trying to build onchain guessing game using commit-reveal pattern pattern uses encryption, solidity example is // Check the hash to ensure the commitment is correct require(keccak256(abi.encodePacked(...
  • 111
1 vote
2 answers
33 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 ...
  • 122
1 vote
2 answers
49 views

FA2 view not working correctly

I've deployed an FA2 token that is supposed to use a token_metadata view to display the token metadata. The view is works fine if you call it directly, but it doesn't seem to be affecting the token ...
1 vote
3 answers
36 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?
0 votes
0 answers
13 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:...
2 votes
1 answer
38 views

How to simply store signed, hashed data on Tezos blockchain?

I'm new to Tezos. I'm wanting to store some signed, hashed data on the Tezos blockchain, most likely using Taquito/Batch API. Can anyone direct me to the correct method to simply send the data and get ...
  • 23
0 votes
1 answer
134 views

How to get all NFT(Non Fungible Token) which created on the specific smart contract of the Tezos blockchain?(getNftForContract)

I have a smart contract address and I want to get the list of all NFTs that exist on this smart contract! The goal is to get all NFTs data (Like its address, its visual, and its value) with the same ...
  • 187
0 votes
0 answers
43 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 ...
1 vote
1 answer
34 views

Technical questions about NFTs

I'm new to both blockchain and Tezos. I've created an NFT from a PNG just to try and I'm not sure I've understood all the concepts under the hood. As far as I understand, an NFT Collection (on Tezos) ...
1 vote
2 answers
49 views

Tezos - smart contract byte code to michelson

I am trying to figure out the SpicySwap swap fees. Since there is no public implementation available to my knowledge, I am studying the michelson code. For example: https://tzkt.io/...
  • 139
0 votes
1 answer
28 views

Tezos.amount>Tezos.balance is wrong?

is "if (Tezos.amount>Tezos.balance) then" wrong? Oddly, the condition is failwith when i sent more tez compared to the contract balance
1 vote
1 answer
39 views

How to initialize the storage while originating a contract with storage type (pair (address %administrator) (unit %dummy))?

The contract is meant to allow transfers only from the admin. I what to initialized the admin address at origination. parameter (or (unit %default) (pair %admin_transfer (address %destination) (mutez %...
  • 11
2 votes
1 answer
52 views

Pytezos for originating contracts

I am quite new to Pytezos and I have a few questions and would be very happy if you could help me. I want to make my script buy NFT, I know the smart contract address, how could I get from smart ...
  • 21
0 votes
2 answers
77 views

Tezos for Python

I am quite new to Python, using it for about half a year. I want to learn coding on Tezos blockchain and got some questions for you. Is there a chance to deploy smart contract using python? I know ...
  • 1
0 votes
2 answers
79 views

Alternative for faucet "Unfortunately the faucet has run dry message"

Is there any alternative for faucet as I am seeing "Unfortunately the faucet has run dry" message on the site. I don't understand what "faucet has run dry" means.
1 vote
0 answers
8 views

Suggestion more then question about tezos course on plural sight

There is a good course about BlockChain fundamentals on Plural sight but addressing ethereum. It could be great if someone can create similar curse there with targeting tezos with
0 votes
0 answers
12 views

Any possibility of writing smart contract in C#

I am exploring smart contract creation in .net C#. have successfully executed thing as per article https://www.c-sharpcorner.com/article/getting-started-with-smart-contracts-in-c-sharp/ for stratis ...
0 votes
1 answer
124 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":&...
  • 129
0 votes
0 answers
20 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 ) ...
  • 129
1 vote
1 answer
38 views

how to correctly enter the storage parameters?

I am trying to pass the correct storage parameters in json to be able to deploy my smart contract. Thank you for your attention... (pair (pair (pair (pair (address %admin) (big_map %ledger nat address)...
  • 129
0 votes
2 answers
81 views

How to change the storage to transfer of an NFT?

I would like to be able to change the price of an nft when transferring it, but I can't change it it gives me an error... (** Implementation of the FA2 interface for the NFT contract supporting ...
  • 129
1 vote
1 answer
44 views

how to fill storage parameters?

I am trying to pass the correct storage parameters in json to be able to deploy my smart contract. Thank you for your attention... (pair (pair (pair (pair (address %admin) (big_map %ledger nat ...
  • 129
0 votes
1 answer
37 views

Is it possible to delete an originated (e.g. KT1...) contract?

Is it possible to delete originated contracts? E.g., does Tezos have an analog of Ethereum's selfdestruct? I'm guessing "no" and that it's a deliberate design decision - this is mostly an ...
0 votes
0 answers
20 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 ...
1 vote
1 answer
31 views

Help understanding smart contract - why is this one different?

I'm trying to understand why this smart contract appears different compared to the majority that I've seen when viewing the code section of the smart contract on tzkt.io. I assume the smart contract ...
  • 11
0 votes
2 answers
52 views

How to raise or emit an event?

In Solidity there's emit keyword for raising an event. How to do it in Tezos in a smart contract? Namely, a) define b) emit an event ?
0 votes
0 answers
28 views

Is there a smartpy util to stringify JSON?

I see there's a good utils repo for strings here: https://github.com/RomarQ/tezos-sc-utils I'm just wondering whether there's one for stringifying JSON. Or an example that does this. Input: map or ...
  • 557
1 vote
1 answer
46 views

Using the token_metadata @offchain_view to load tzip-21 compliant metadata

Are there any downsides to how I'm declaring the token_metadata in the @offchain_view below? Loading the data from storage appears to work as expected when testing it on tzcomet and BCD, though I just ...
  • 557
1 vote
1 answer
114 views

NFT collection prices API?

I am building on Tezos (I am new here). I was wondering if there is an API for getting floor prices of NFT collections? For example getting the floor price of Tezzardz on OBJKT.com. If not how can I ...
1 vote
1 answer
46 views

Storage settings

I would like to deploy my smart contract but I don't know what to put as parameters in the storage (I'm new to tezos). Thank you very much to those who will take the time to help me :) //FA2 '(pair (...
  • 129
0 votes
1 answer
21 views

Missing private variable when using private lambda on offchain view

I'm getting the error Missing private variable string_of_nat Is it not possible to use private lambdas within off_chain_views? What could I do if I want to use them here? https://smartpy.io/ide?cid=...
  • 557
0 votes
1 answer
28 views

Declaration Error: Variable name "x" already in use

When calling a method that uses a local variable twice, I'm getting this error. Example smartpy link. In this linked code I added a new method test_string_of_nat2 which triggers this behavior. How ...
  • 557
2 votes
1 answer
106 views

How do I call an entrypoint of an existing contract using SmartPy?

How does one call an entrypoint of an existing contract using SmartPy? For example, I'd like to be able to write a contract that calls the getBalance method of the existing ETHtz FA1.2 contract and ...
0 votes
2 answers
208 views

When does a contract get gas locked?

Right now I'm iterating over a map (not a big_map) that would have at most 10,000 entries. I know big_map is recommended for a large number of entries, however, I'm testing the limitations of both ...
  • 557
1 vote
1 answer
54 views

Contract supplied an invalid parameter

I have a little problem because my mint does not pass because of invalid parameters, I don't quite understand why..., in the entrypoint call I deliberately did not put the token_id parameter because ...
  • 129
0 votes
1 answer
31 views

How does Tezos manage overflow in smart contracts (in 5-year old language please)?

If Tezos was to shorn their full code set into a small 56bit processor it would cause overflow due to the sheer amount of transactions and overriding gas limit. So it doesn't. So...what process is ...
  • 1
0 votes
1 answer
48 views

Branch contract calls

I'm trying to replicate the contracts call for the raw found below: { "branch": "BMLgLBqf6dxFBNMLBBDkVtNSJCfQMcNxLiEmUKRmE8bYFrKY1CW", "contents": ...
  • 1

1
2 3 4 5
7