Questions tagged [smart-contracts]

The tag has no usage guidance.

49 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
72 views

"Unhandled error: Failure backtracked" while trying to creating a contract

I'm trying to work with the example code from the liquidity documentation for Contract.create(). The code compiles and tests on the online-editor properly. It also deploys using the editor. But when I ...
4
votes
0answers
31 views

Checking contract against contract type in Liquidity

With the example below, is it possible to get liquidity to check that the type of the contract C matches C_intf? contract type C_intf = sig type storage val%entry check_balance : nat -> _ end ...
4
votes
0answers
30 views

How to split a string in Liquidity?

I'm attempting to split apart a string by "." so that "my.name" returns {"my", "name"}. However, I can't seem to find an in-built method of performing this operation in Liquidity. Lately, I've tried ...
4
votes
0answers
79 views

How to implement a signature checker for the signature scheme BLS?

We are willing to implement a signature checker for the signature scheme BLS (or BLS12-381). To the best of our knowledge, it may not be too painful since the smart contract language already supports ...
4
votes
0answers
26 views

Michelson_v1_printer.unparse error with originate contract

I am trying to use tezos client to deploy contract on alphanet but I get error Michelson_v1_printer.unparse Command: tezos-client -l -A $TEZOS_NODE originate contract controller_v6 for $MANAGER ...
3
votes
0answers
24 views

In sandbox mode, can you bake a block with a specific timestamp?

I am testing a smart contract that enforces time delays on state transitions. I want to be able to run the bake command and have the latest block have a particular Unix timestamp (e.g. for 1 day ahead ...
3
votes
0answers
41 views

getting off chain data on chain to smart contracts

Currently 80+% of smart contracts need off chain data, is there a solution to bring off chain data on chain to trigger for smart contracts? (oracles related)
2
votes
1answer
110 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
1answer
63 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
0answers
47 views

how can i call specific smartpy tezos contract entrypoint using ConseilJs?

I am trying to set UI that allow users to interact with tezos smart contract by pressing some buttons that have to call the corresponding function in the smart contract with relative arguments
2
votes
0answers
24 views

Unable to deploy a Liquidity smart contract directly (without offline signature / forged operation)

I'm trying to deploy a contract directly as specified in Liquidity docs, but the CLI fails with: Failure: edsk3gUfUPyBSfrS9CCgmCiQsTCHGkviBDusMxDJstFtojtc1zcpsh is not a valid private key I have ...
2
votes
3answers
73 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 ...
1
vote
0answers
67 views

Random # Generating Smart Contracts

I've had an idea about being able to utilize effectively random #s on tezos, but I don't know if it's totally stupid and impossible to utilize, or a possible and really simple solution: I need to ...
1
vote
2answers
113 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.
1
vote
1answer
62 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
0answers
43 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
0answers
29 views

Try to confirm fundamental mechanism about the shielded pool

Can we say, in a nutshell, the shielded pool is the integration of the FA1.2 token protocol and the PGP tech? Many thanks!
1
vote
1answer
32 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
1answer
72 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
0answers
51 views

I got this error from conseil js TezosNodeWriter.sendContractOriginationOperation. What could be the problem

Failed to parse the request body: No case matched: At /kind, unexpected string instead of endorsement At /kind, unexpected string instead of seed_nonce_revelation At /kind, unexpected string ...
1
vote
0answers
20 views

Fi update a set with 'get'

Struggling with Ligo so took a look at Fi. I want to create a provenancy smart contract i.e. add an artwork, then transfer ownership. The Fi compiler says Error: Error with variable ext - for variable ...
1
vote
2answers
89 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
0answers
18 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: ...
1
vote
0answers
37 views

Deployment of a smart contract through fi compiler

I seem to fill in these parameters incorrectly. What do I need to enter in the Storage.Value and Storage.StartTime columns? If you can give examples
1
vote
0answers
40 views

Problem with Liquidity installation

After entering this command make build-deps , I get the error message: The following dependencies couldn't be met: - liquidity → ocaml < 4.07.1 no matching version No solution found, ...
1
vote
1answer
202 views

How do you create a secondary KT1 contact under your TZ address?

I want to have multiple KT1 address on one TZ address(ledger) to delegate to multiple people
0
votes
0answers
15 views

Generative Art and Integrating Minting process on Website

I'm an artist and want to release an NFT series on my website, similar to BAYC, Tezzardz etc. How would I get access to an algorithm that can generate say 10,000 unique variations of art using certain ...
0
votes
0answers
9 views

How to convert to Ligo type

I have this smart contract and was wondering how to convert to a ligo type transfer parameter list($transfer_item) transfer_item pair from_ address txs list($txs_item) txs_item pair to_ ...
0
votes
0answers
19 views

How to interact with a deployed smart contract ligo

It seems that my smart contract cannot find the transfer operation of my FA2 other smart contract. Here is where the error is being thrown. case (Tezos.get_entrypoint_opt("%transfer", ...
0
votes
0answers
15 views

Avoid over-spending by smart-contract with FA2 token ? (update_operators)

Working with FA1.2 and FA2 token, i see that for FA1.2, when a transaction is done by the user, you need to call approve, with an amount, and for FA2, it is update_operators who is called, but without ...
0
votes
1answer
16 views

How to airdrop tokens based on ownership of another token?

How would this work? Would it be like this? Fetch all the addresses that hold token A Iterate over those addresses on off-chain code and programmatically send token B to those addresses
0
votes
0answers
25 views

How to handle large token distribution?

We are looking to do "income sharing" for a dapp where we would like to distribute dapp income to holders of a specific token 🙌 Is there a smart way to do this where I don't have to do a ...
0
votes
1answer
32 views

how does the liquidity baking CPMM round up or down?

I'm not sure how to ask this and I may mess up my mathematical terms, if you think I have then please correct me. When I call addLiquidity on the CPMM, I know that I will be sending tez, and that ...
0
votes
1answer
29 views

Is it possible to automate an action at a certain interval in a tezos smart contract?

Do you know a design who allow to automate an action at a certain interval ? (for example, call another contract every 20 blocks or something like that). Thanks every one for your help !
0
votes
0answers
14 views

Is it possible to get past storage (not actual storage, but the hictorical data like update, etc) of another smart contract in a smart contract?

I want to know if accessing past data of another smart contract from my smart contract is possible ? I know you can acces it via RPC, but i would like to use these data in my smart contract. Thanks !
0
votes
0answers
25 views

How can we accept USDTZ in smartpy smart contracts, is it even posible?

I was working on a token sale, so is there any way we can accept USDTZ as a mode of payment for the tokens?
0
votes
0answers
65 views

Mint FA2 NFT when contract is called by purchaser

I'm working on a smart contract which allows a caller to "purchase" an NFT simply by calling the contract and providing payment. I'd like the contract to mint the NFT at the time the ...
0
votes
1answer
32 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
1answer
26 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
0answers
60 views

How to transfer tokens from contract using better-call dev?

I was just playing around with creating a token on Tezos mainnet. I followed the tutorial to create a Tezos token. There they use this ready to use contract in PascaLIGO which you can view in Ligo ...
0
votes
0answers
16 views

Does sapling integration mean private smart contracts?

Now that Tezos has integrated the sapling features from Zcash, can one make private smart contracts? Potentially? Certainly? In part or whole, or both? Thank you!
0
votes
0answers
69 views

FA 1.2 Token contract interaction

I want to call an Approve method on a FA1.2 token contract. Michelson code of Approve method at FA1.2 token contract: (pair %approve (address %spender) (nat %value)) My PascaLigo code: type ...
0
votes
1answer
48 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
1answer
37 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
1answer
112 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
2answers
53 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 ...
0
votes
0answers
11 views

What is the syntax for passing values to a struct within a contract written in fi?

I have defined a type Poll using a struct. I would like to be able to instantiate it, preferably passing initial values to its variables when I do. eg I would imagine a syntax for what I want to do ...
0
votes
1answer
66 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
votes
0answers
25 views

Deploy to main net

Have written an contract on smartpy.io but not able to deploy contract to main net, wallet has sufficient balance to pay fee. Please help.