Questions tagged [smart-contracts]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 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: ...
0 votes
1 answer
126 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. ...
0 votes
1 answer
190 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....
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 %...
2 votes
3 answers
115 views

Originate contract with init

I have a contract of type: pair (pair (list nat) (pair mutez (map address (list nat)))) (pair address (pair address bool)) What is an example of a valid initial storage that can be passed to ...
0 votes
2 answers
95 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
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
1 answer
37 views

triggering outside actions from tezos

assuming I am running a tezos node, is there any way to create a smart contract in tezos that is capable of triggering outside actions? For example, sending an email to an address, or turning lights ...
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
-1 votes
1 answer
34 views

List inside of Map, or equivalent?

I want to have a list of data in a map so I can find it with the key which is associated with a user, but I get: Error: Type Error sp.TIntOrNat is not sp.TList(sp.TUnknown()) bad type for map value (...
0 votes
2 answers
88 views

How can I save the gas cost of operations when running contracts in sandbox pytest?

I am testing smart contracts in sandbox mode using python scripts. I want to be able to store how much an operation cost. So for example when I get the output of a contract origination after baking a ...
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”:“...
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 ...
1 vote
1 answer
91 views

error: Public Cannot be exposed!

const address = 'tz1Qzi4iMowq8z4BEihyU1HvFFxAUXc9PbAF' tezbridge.request({method: 'post_source'}) taquito.Tezos.setProvider({rpc: 'https://rpc.tzkt.io/mainnet', signer: new ...
1 vote
2 answers
114 views

Send tezos to contract address after origination using conseiljs

I am trying to send tez from my tz1-AAA account to KT1-AAA contract address means I want my contract address to hold some tez. Disclaimer - I have knowingly replaced some part of address with "....(s)...
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 ...
2 votes
1 answer
70 views

Calling contract invocation operation in loop

I have some set of data which I am trying to push to my smart contract in loop. I use conseiljs to send data to smart contract. Here is the code depicting what I am trying to do. async function ...
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?
0 votes
1 answer
78 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) ...
1 vote
2 answers
81 views

In Michelson, is it possible to get the balance of an arbitrary contract?

In Michelson, is it possible to get the balance of a contract other than the current one? According to the Michelson reference, it's possible for a contract to get its own balance. But, is it possible ...
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 ?
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 ...
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 ...
1 vote
2 answers
166 views

Implementing Contract Metadata (tzip-16) on an already originated FA1.2 Smart Contract

Referring to the documents and examples of tzip-16, how would one implement the contract metadata on a Fa1.2 contract on SmartPy? In order to provide balance updates and offchain events.
2 votes
1 answer
225 views

Tezos on a ERC20 Wallet

Sorry in advanced, my english is not the best. but i have to try. Situation: I bought Tezos on the Binance App. Then i sent all the Tezos to my Wallet (ERC20 Wallet). Now its not showing on the wallet,...
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....
4 votes
1 answer
68 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 &...
0 votes
1 answer
73 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(...
1 vote
2 answers
124 views

Read another contract's storage without making a transaction?

Is it possible for contract X to read the storage of contract Y without making a transaction? I think I understand how I can make X call a function on Y using a callback pattern. But since I only want ...
0 votes
1 answer
57 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
80 views

How to create a contract which would delegate XTZs and receive rewards?

I am trying to write a contract that receives rewards from the baker using a default entry point and should only allow me to change the baker from a different entry point. I am using the smartpy tool ...
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 ...
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(...
0 votes
1 answer
96 views

Calling contract deployed on Tezos sandbox using Taquito

I've a simple contract deployed on Tezos sandbox (https://assets.tqtezos.com/docs/setup/2-sandbox/) and I'm using Taquito in frontend to call this contract. Earlier, I deployed the contract to global ...
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": ...
0 votes
1 answer
105 views

Initiate a field in the storage of a contract with the source address of origination

I have the following smart contract where I pass admin address in the init function of the smart contract: (you can run it on smartPy online editor) class SC(sp.Contract): def __init__(self, ...
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?
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 ...
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
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 ...
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:...
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 ...
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 ...
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 ...
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/...

1
2 3 4 5
7