Questions tagged [smart-contracts]

The tag has no usage guidance.

60 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
77 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 ...
user avatar
4 votes
0 answers
32 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 ...
user avatar
4 votes
0 answers
35 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 ...
user avatar
4 votes
0 answers
96 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 ...
user avatar
4 votes
0 answers
47 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)
user avatar
  • 41
4 votes
0 answers
27 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 ...
user avatar
  • 71
3 votes
0 answers
35 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 ...
user avatar
  • 639
2 votes
0 answers
44 views

Is there any Sapling contract on mainnet?

Is there on mainnet any deployed Sapling contract that anyone really uses (through tezos-client, as I believe it's the only supported way to do it now)?
user avatar
  • 31
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,...
user avatar
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 ...
user avatar
2 votes
0 answers
68 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
user avatar
  • 51
2 votes
0 answers
25 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 ...
user avatar
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 ...
user avatar
  • 51
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
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
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
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
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 ...
user avatar
1 vote
0 answers
39 views

How do I call a tezos smart contract over go

I have deployed a smart contract to my tezos blockchain and want to interact with it. I found the go library tzgo (https://github.com/blockwatch-cc/tzgo) to interact with the blockchain and there is ...
user avatar
  • 11
1 vote
0 answers
29 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?
user avatar
1 vote
0 answers
100 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 ...
user avatar
  • 65
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.
user avatar
  • 495
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 ...
user avatar
1 vote
0 answers
84 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 ...
user avatar
1 vote
0 answers
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!
user avatar
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 ...
user avatar
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 ...
user avatar
1 vote
0 answers
62 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 ...
user avatar
1 vote
0 answers
24 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 ...
user avatar
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)...
user avatar
1 vote
0 answers
31 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: ...
user avatar
  • 835
1 vote
0 answers
38 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
user avatar
  • 125
1 vote
0 answers
45 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, ...
user avatar
  • 125
1 vote
1 answer
233 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
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
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
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
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
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
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
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
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
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
0 answers
14 views

Smart Contract without installing in my Mac

I would like to ask, as my Mac Terminal has a problem in setting up the Tezos. Can I proceed into writing Smart Contract via Ligo IDE and connect to my Node (I'm using ChainStack)?
user avatar
  • 1
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 ...
user avatar
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 ...
user avatar
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 (...
user avatar
0 votes
0 answers
48 views

Is there a more sensible way to convert an int to a string in Cameligo?

Is there a more sensible way to convert an int to a string in Cameligo? Alternatively, is there a way to concatenate an int or nat with a string? type lookup = (int, string) map let lookup: lookup = ...
user avatar
0 votes
0 answers
13 views

Stress testing making consecutive calls on a contract's entry point

I want to test calling the same entry point on a smart contract repeatedly. I have a smart contract that might linearly increase the gas it consumes after each consecutive call in the entry point. Of ...
user avatar
  • 13
0 votes
0 answers
22 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_ ...
user avatar