Questions tagged [smart-contracts]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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 ?
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 ...
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 ...
1 vote
2 answers
163 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
218 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
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....
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?
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 &...
0 votes
1 answer
71 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
114 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
56 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
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?
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(...
0 votes
1 answer
90 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
44 views

Branch contract calls

I'm trying to replicate the contracts call for the raw found below: { "branch": "BMLgLBqf6dxFBNMLBBDkVtNSJCfQMcNxLiEmUKRmE8bYFrKY1CW", "contents": ...
0 votes
1 answer
98 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
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?
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 ...
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 ...
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
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:...
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. ...
0 votes
1 answer
183 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
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 %...
2 votes
3 answers
107 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
88 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
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 ...
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 ...
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 ...
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 ...
0 votes
1 answer
34 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
1 answer
31 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
85 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 ...
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) ...
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 ...
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
113 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
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/...
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
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 ...
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 ...
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 ...
0 votes
1 answer
72 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
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.
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
1 vote
2 answers
77 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
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 ...
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 ...

1
2 3 4 5
7