Questions tagged [smart-contracts]

The tag has no usage guidance.

33 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
67 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
29 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
28 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
65 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
37 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
93 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
0answers
19 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 ...
2
votes
1answer
54 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
37 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
23 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
64 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
38 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
81 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
50 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
34 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
27 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
28 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
60 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
43 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
70 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
16 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
33 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
180 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
54 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
33 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
27 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
61 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
40 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
10 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
54 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, ...