Questions tagged [smart-contracts]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
32 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 ...
user avatar
4 votes
1 answer
41 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?
user avatar
2 votes
1 answer
25 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 &...
user avatar
  • 101
2 votes
3 answers
49 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 ...
user avatar
  • 101
2 votes
1 answer
39 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....
user avatar
  • 101
3 votes
2 answers
35 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?
user avatar
2 votes
1 answer
29 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(...
user avatar
  • 101
1 vote
2 answers
30 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 ...
user avatar
  • 38
1 vote
2 answers
44 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 ...
user avatar
1 vote
3 answers
31 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?
user avatar
0 votes
0 answers
11 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
2 votes
1 answer
37 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 ...
user avatar
  • 23
0 votes
1 answer
95 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 ...
user avatar
  • 165
0 votes
0 answers
38 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
1 vote
1 answer
31 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) ...
user avatar
1 vote
2 answers
42 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/...
user avatar
  • 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
user avatar
1 vote
1 answer
26 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 %...
user avatar
  • 11
2 votes
1 answer
46 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 ...
user avatar
  • 21
0 votes
2 answers
68 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 ...
user avatar
  • 1
0 votes
2 answers
75 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.
user avatar
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
user avatar
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 ...
user avatar
0 votes
1 answer
83 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
  • 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 ) ...
user avatar
  • 129
1 vote
1 answer
34 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)...
user avatar
  • 129
0 votes
2 answers
69 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 ...
user avatar
  • 129
1 vote
1 answer
43 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 ...
user avatar
  • 129
0 votes
1 answer
34 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 ...
user avatar
0 votes
0 answers
19 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
1 vote
1 answer
30 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 ...
user avatar
  • 11
0 votes
2 answers
47 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 ?
user avatar
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 ...
user avatar
  • 557
1 vote
1 answer
42 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 ...
user avatar
  • 557
1 vote
1 answer
88 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 ...
user avatar
1 vote
1 answer
44 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 (...
user avatar
  • 129
0 votes
1 answer
20 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=...
user avatar
  • 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 ...
user avatar
  • 557
2 votes
1 answer
82 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 ...
user avatar
0 votes
2 answers
205 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 ...
user avatar
  • 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 ...
user avatar
  • 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 ...
user avatar
  • 1
0 votes
1 answer
44 views

Branch contract calls

I'm trying to replicate the contracts call for the raw found below: { "branch": "BMLgLBqf6dxFBNMLBBDkVtNSJCfQMcNxLiEmUKRmE8bYFrKY1CW", "contents": ...
user avatar
  • 1
2 votes
1 answer
67 views

Why does `sp.pack('some string')` prepend `0x05010000002e` before the actual bytes?

If I pass in the string QmbPAr5RcCZZDRsNKnf2p1t6GK3Qu7oDH39HCK3aewUq3w to the sp.pack method in an entrypoint and perform and sp.trace in smartpy I expect to get the following bytes: ...
user avatar
  • 439
1 vote
1 answer
39 views

What guarantees do on-chain views provide?

A couple of months back, I asked this about off-chain views (here). Now, on the Hangzhou testnet, synchronous on-chain views are supported. (smartpy documentation). Do these views provide ...
user avatar
  • 557
2 votes
2 answers
141 views

How are royalties programmed in an FA2 contract?

I see some contracts (Dogami) say they take royalty fees even when they're sold on a 3rd party marketplace. How does that work? As far as I can tell, this would require the FA2 contract to have an ...
user avatar
  • 557
0 votes
0 answers
36 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
1 vote
1 answer
29 views

How much overhead is there when calling another contract?

How much worse would it be to call an entry point 100x vs calling a bulk operation entry point with a list[0-99] 1x?
user avatar
  • 557
0 votes
1 answer
102 views

RPC error when using @templewallet/dapp

I'm getting this error when trying to execute a contract using temple wallet in my Dapp. Failed to send request to https://hangzhounet.smartpy.io/chains/main/blocks/head/helpers/forge/operations. ...
user avatar
0 votes
2 answers
71 views

Any Tezos RPC alternatives suggestions

The open tezos docs suggest using RPC URL: "https://florencenet.smartpy.io/". It does not work. What alternatives RPC URLs do you use. It seems that when you use the mainnet RPC URL - things ...
user avatar
  • 5

1
2 3 4 5
7