Questions tagged [smart-contracts]

The tag has no usage guidance.

28 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
66 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
23 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
24 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
50 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
25 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
35 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
37 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
29 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
22 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
2answers
97 views

smart contract for automatic baking/endorsement rewards to delegators

It seems like a smart contract would be the most natural mechanism to use for implementing a automatic rewards payment system to a baker's delegators, and I'm curious if such a contract is possibly to ...
2
votes
3answers
56 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
1answer
46 views

FA2 Permission Policies & Hook permission Behaviour

Is there an example of how to use permission policies and hook permission behaviour with regards to FA2 implementation? https://gitlab.com/tzip/tzip/-/blob/master/proposals/tzip-12/tzip-12.md I am ...
1
vote
1answer
15 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
42 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
37 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
19 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
46 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
15 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
36 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
29 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
146 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
22 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!
0
votes
0answers
10 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 ...
0
votes
0answers
9 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
34 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, ...
0
votes
0answers
60 views

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'replace' of undefined at Object.normalizeMichelineWhiteSpace

When using conseiljs for deploying contracts the statement seems to have some error which is directly copied from the conseiljs library. const result = await conseiljs.TezosNodeWriter....
0
votes
0answers
21 views

Deploying a smart contract : “Request error (code 404)”

I'm trying to deploy a smart contract on the tezos sandbox. My node is running, and my smart contract is without compilation error. To deploy my contract I do : ~/.opam/liquidity/bin/liquidity --...
0
votes
0answers
45 views

TezBox transaction with parameter not going through

I am using TezBox to make a transaction from tz1fVCLCR9zKMgGBTvuxcQufktXwwXJVC5KE to my smart contract KT1BNuzMP54AoPNWQF45LkjhcFjW3A48rcHb. In the parameter field, I use Left "...