Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [smart-contracts]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
9 views

Originating an account in Bablyonnet - error in contract script

I'm trying to originate a contract in Tezos so I can test delegating to a baking account. I was able to do this before the upgrade to babylonnet, but now that a script is required for the contract, I'...
0
votes
0answers
11 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 --...
1
vote
1answer
27 views

How to verify the manager.tz script code?

Since the protocol update to Babylon all KT1 accounts were replaced with smart contracts which contain the manager.tz script. Code: parameter (or (lambda %do unit (list operation)) (unit ...
1
vote
1answer
21 views

Transfer from smart contracts?

Can smart contract account (address starting with KT1) transfer Tezos to other accounts? I know this is possible for plain vanilla KT1 account.
1
vote
2answers
37 views

Where are the API docs for SmartPy?

I'm working on a contract now and specifically I'd like to call a SmartPy API like sp.transfer(address, amount)? Is there a function like this? I can't find API docs for SmartPy and digging into the ...
2
votes
2answers
23 views

Does a smart contract browser or explorer exist?

Is there any smart contract browser or explorer currently available? (i.e. a web browser-based tool where someone can easily audit the code held in the blockchain)
1
vote
0answers
34 views

Choosing a language [closed]

I want to start using Tezos and one of the problems that I found as opposite to Ethereum where Solidity highlights, is that seems to be a lot of options to start writing contracts. I've been ...
0
votes
0answers
24 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 "...
2
votes
1answer
49 views

How do I get the contents of a big_map through the RPC interface?

I'm trying to view the contents of a big_map in the storage of a smart contract. However, querying my Tezos node doesn't seem to provide that information. Is there a way of using the RPC interface to ...
3
votes
1answer
41 views

Why cant i call the contract entry point with type parameter througth eztz.contract.send

im trying to call the entry point create_proposition ... (pair :proposition %_Liq_entry_create_proposition (key_hash %destination) (mutez %amount)) using the function eztz.contract....
2
votes
1answer
35 views

Getting errors related to the smart contract after running eztz.contract.send()

im tryng to send a operation to a previously deployed contract and im geting these errors, error: "Operation Failed" ​ errors: (3) […] ​​ 0: {…} ​​​ contract: "...
3
votes
1answer
43 views

how can i send operation throught eztz to a contract specific entry point?

im tryng to send the operation to a deployed contract, this is my function ... eztz.contract .send( "KT18qHvhEZUwiawA8QEURwuK8RGJj184725L", keysext.pkh, keysext.sk, 5, "RIGHT LEFT UNIT", "...
3
votes
1answer
46 views

Can someone provide a link to a tutorial on how to do a basic smart contract on the Tezos protocol?

I'm looking for a video tutorial on how to become a programmer/how to become more knowledgeable regarding smart contracts and such. Is there a good you-tuber who blogs about Tezos programming?
1
vote
1answer
173 views

Smart contract transaction of 0 XTZ throwing error from TezBox

I am trying to send transaction to KT1BRudFZEXLYANgmZTka1xCDN5nWTMWY7SZ to complete ledger nano verification using TezBox but I am getting error as below, can someone please guide me? {"status":"...
3
votes
2answers
126 views

How to extract the storage of a smart contract?

How do I extract the storage data of a deployed smart contract? I am trying to read the storage data from the "free Ledger Nano S" contract KT1BRudFZEXLYANgmZTka1xCDN5nWTMWY7SZ from the Tezos ...
4
votes
1answer
64 views

Error while initializing storage in contract deployment

I am using folowing command: ./tezos-client originate contract TestContract for tz1address transferring 1 from tz1address running contes.fi --init 'pair (map "KT1address" 1) (map "KT1address" "2019-...
1
vote
0answers
31 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, ...
5
votes
1answer
62 views

Can I withdraw funds from an empty smart contract?

I've stuffed up bad and managed to send some Tez to an empty KT1 smart contract. Is there any way of getting it back? The contract is: parameter string; storage string; code { CAR ; NIL operation ;...
2
votes
1answer
39 views

How to deploy a contract in Mainnnet (not Alfanet!) Tezos? I have a contract code for Fi, a working node on the Digital Ocean. What should I do next?

I have a contract code for Fi, a working Mainnet node on the Digital Ocean. What should I do next? Please explain in detail because I have little experience.
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
21 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
1answer
38 views

When contract simulation may fail to predict the contract's behavior?

When we try to run a smart contract using tezos-client, it estimates the gas cost and predicts the final output of the contract. It simulates the contract execution under the current block-chain, ...
5
votes
1answer
42 views

Operations created by a smart contract call chain go in the same block?

Imagine there is a smart contract which calls other smart contracts using TRANSFER_TOKENS and in the end lots of operations are created. Are these operations baked in a block atomically? I mean, is ...
4
votes
0answers
41 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 ...
3
votes
1answer
76 views

How to get smart-contract storage data?

I try to get smart-contract storage data: eztz.node.setProvider('https://alphanet-node.tzscan.io') eztz.contract.watch(addr, 2, function(s){ console.log("New storage", s); }); But got an ...
3
votes
0answers
33 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)
5
votes
1answer
34 views

Are there any wallets that can call contracts?

I'm building a dapp on Tezos and would like users to call some of the related contracts directly from the webapp. E.g. I present a QR code with a prefilled contract call. Are there any wallets that ...
2
votes
1answer
35 views

Liquidity “Syntax error”, ok, but what/where?

I'm having problems with liquidity syntax... (I'm using the online liquidity-lang editor). I'm trying to make a simple smart contract that adds items with history, think of it as a maintenance log ...
3
votes
1answer
47 views

Error while initializing storage in contract deployment cmd using tezos-client command line interface option

I am using the following command originate contract new for mgr transferring qty from src running prg for deploying a contract using Command Line Interface as mentioned in CLI document. This ...
2
votes
1answer
46 views

How key_hash can be coerced to address, or vice versa?

I try to convert a "key_hash" to "address" data type. In OCaml syntax like: let key_h = (addr : key_hash) in and ReasonML syntax like: let key_h = (addr : key_hash); have the same error: Type ...
2
votes
0answers
20 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
1answer
31 views

Tools available : contract deployment / calling - Alphanet / mainnet

Are there any tools available running on web-page, browser plugin, desktop or mobile that allow me to do the following : Deploy contracts - alphanet / mainnet Call contracts - alphanet / mainnet ...
4
votes
0answers
21 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 ...
2
votes
1answer
57 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 ...
5
votes
1answer
50 views

method for calling to entry point of contract instance (?) created by contract.create

Contract A is not able to find the address of the contract created by contract.create. Tried adding the signature of B as well as it's complete definition in contract A but still, it doesn't solve the ...
5
votes
1answer
110 views

Gas consumption in a chain of internal transfers

I am trying to perform a chain of contract calls with internal transfers. I think my current contracts are very simple, but I run out of gas after only 4 internal transfers: A script or one of its ...
2
votes
1answer
46 views

How is the liquidity token.liq working

I'm asking for help because i don't really understand how the token.liq works and mostly what the functions needs. For exemple I don't seem to be able to get the balance of an account. In the input ...
5
votes
1answer
25 views

Tuples index access via contract's input params

I'm trying to get tuple value by index using contract's input param. Getting weird assertion error. let%entry main = (idx: int, storage) => { let tmp = ("test - 1","test - 2", 3) failwith(tmp[...
3
votes
1answer
23 views

ReasonML pattern matching error on tuples

I am trying to write some game on tezos via ReasonML, stuck with pattern matching on tuples, looks like it does not work let tmp = switch (players) { | (Some(p), None) => let storage ...
5
votes
2answers
85 views

Smart contract for bakers

Is it possible to write a Smart contract that would define the relationships between baker and delegator, and if so how would it be done? It should include the following: - delegation duration - ...
8
votes
1answer
85 views

Why does a transaction contain a storage dump?

I have looked at a few transactions with some smart contracts and I have found that they store a dump of contract's storage. For instance: https://mainnet.tezrpc.me/chains/main/blocks/246869/...
11
votes
3answers
121 views

How to upgrade a smart contract?

I'm building a smart contract that is sort of an index of signed documents (pointing to ipfs for the actual docs). What if I want to add some functionality to my app down the road and need to upgrade ...
7
votes
1answer
60 views

Basic Syntax for iterating through List Element and processing each of them

I am creating two lists in liquidity and trying to process on them as follow: type two_element = { name: string; value : nat; } type list1 = two_element list; type list2 = two_element list; ...
5
votes
0answers
60 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 ...
8
votes
1answer
145 views

Is there a Tezos equivalent of ERC?

I’d like to read / contribute to existing contract standarts on Tezos, is there an opensource movement like ERC?
4
votes
1answer
40 views

Time based Delegations possible?

Would it be possible, to make a "time-based-delegation"? I.E.; I want to delegate for 5 Cycles to Bakery A and after that for 10 Cycles to Bakery B and so on. Could something like this be realized ...
6
votes
1answer
67 views

What does it cost to make a contract through Tezos?

I have seen clear structure and numbers on how baking, delegating and double endorsing etc. affect to the users amount of Tezos, but is there any cost on making a contract (in other words creating ...
4
votes
1answer
37 views

In the broker2.liq example, how is storage being returned by the call function?

The code here returns value from Contract.call() as: let _result, storage = Contract.call storage.x transfer storage () in What are the values stored in _result and storage? Note: I couldn't ...
6
votes
1answer
75 views

Is there a way to call a function inside a contract from a function in another contract?

I want to have two different contracts that have functions that should interact with each other. Is there a way to pass/return values through function call between contracts?