Questions tagged [contract]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9
votes
2answers
231 views

What are the new rules for when a KT1 gets destroyed? Or when “--burn-cap” must be used to send funds to a tz1/tz2/tz3 account?

What are the new rules for when a KT1 gets destroyed? Is there a certain balance that it goes below? What about tz1/tz2/tz3? I noticed that sometimes --burn-cap must be used to send funds. Why is ...
8
votes
1answer
96 views

how to estimate paid_storage_size_diff?

Example: I deploy a contract(gen a multi sign address,3owners) or tranfer 0 amount to a KT1 address (for multisign address send money to a tz1 address) I can estimate fee by: https://github.com/...
7
votes
2answers
173 views

Get a returned value when calling a Michelson contract

A call to a Michelson contract results in a storage update and the emission of operations. Is there a simple/standard way for the called contract to return a value to the caller?
6
votes
1answer
123 views

Deploying a simple contract using liquidity

Contract (simple.liq): [%%version 1.0] type storage = int let%init storage = 0 let%entry main (parameter : int) storage = ( [], storage + parameter ) Deployment command: liquidity --tezos-node ...
5
votes
1answer
76 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 ...
4
votes
2answers
318 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
60 views

Genesis Balances

I found out that the genesis balances of each account are present in https://tezos.foundation/wp-content/uploads/2018/09/5223213-genesis.txt . Couple of Questions: 1) I see Bootstrap Contracts have ...
4
votes
1answer
221 views

how to deploy a contract with RPC method?

at first is there any way to deploy a contract with RPC methods? if had, could give me a step by step example? why I have so much problems confusing me because the official RPC doc have't detail ...
4
votes
0answers
28 views

Updating a existing contract with new code and storage [duplicate]

Is it possible to update a existing deployed contract with new code & storage on the same address? It would be like adding a new version or does the updated contract have to be deployed to a new ...
3
votes
1answer
33 views

Michelson contract files - spaces, new lines and comments

I wanted to check that when a Michelson contract file is created. Do file spaces, new lines and comments increase the gas cost when deployed?
3
votes
1answer
61 views

Why use transactions to call contracts?

The transaction operation can be used to transfer tez, but also to call a smart contract. This leads to security issues since a user may be tricked into calling a contract when she simply wanted to ...
3
votes
1answer
76 views

Contract - purpose of returned internal operations?

I keep seeing contract internal operations being returned empty (stack - 'NIL operation;') in the example Tezos Michelson contracts. What is the purpose of the internal operations? Also, are there ...
3
votes
0answers
61 views

Contracts - is events / logging going to be added?

The Ethereum Solidity contract system has a feature for adding events (logging) which can be subscribed via the RPC and also searched for (as the events are stored on the blockchain). Is there going ...
3
votes
0answers
24 views

Contract : opcodes FAILWITH / FAIL - gas usage

If a contract gets to the point where it fails. What is the process in terms of gas usage? Storage gas (new storage until failure) : reverted Gas usage (used until failure) : reverted Gas fee : paid ...
2
votes
2answers
195 views

What are the differences between key, key_hash, address, contract and signature in Michelson?

There is a related question, but the differences are still not clear. These five types are mentioned in the Michelson whitedoc with the following definitions: address: An untyped address (implicit ...
2
votes
1answer
29 views

Interact with Tezos in xamarin

im searching for a way to communicate to the chain in my xamarin app. The problem is that the native libs like this https://github.com/mscappini/Tz.Net are not really well looked after so im searching ...
2
votes
1answer
43 views

Tezos - Liquidity deploy contract error

I got an error and I don't know how to handle. I wrote a smart contract in liquidity and script check and so works well. The command to deploy is: liquidity --node http://192.168.1.150:7732 --...
2
votes
1answer
60 views

How to initialise a contract with storage (contract unit)

How do I initialise a contract with the following storage - storage (contract unit); Used after the command line parameter --init for contract deployment. I have tried various formats but none of ...
2
votes
0answers
37 views

How to set `contract` as input argument

I have a method Token_metadata_registry which takes contract(address) as input parameter and I would like to call that method from ligo dry-run. How do I do that? ligo dry-run contracts/main/fa2.ligo ...
2
votes
1answer
82 views

Why is my delegation+origination appearing in red?

I used SimpleStaking wallet to delegate 2599 tezos to TezosBC baker but it doesn't seem to be going through. I tried opening with TezBox wallet and it says the account is not on the blockchain yet ...
2
votes
3answers
59 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
24 views

Michelson: Parameter vs Storage

I'm struggling to process what the difference between parameter and storage is in Michelson. From what I've been reading, it just looks like two different types of inputs to a contract. So how should ...
1
vote
1answer
26 views

FA2 from/to serialization

In the FA2.0 standard the sender and receiver is send as Bytes (vs. send as string for FA1.2). Expected result: When decoding the addresses (string) to their public key hash representation I would ...
1
vote
2answers
39 views

How can I write On Chain Contract Calls in Tezos Sandbox?

I am trying to write a test case in Tezos Sandbox that uses an On Chain Contract Call. To start with, I am trying to implement the example from SmartPy "On Chain Contract Calls - Collatz" ...
1
vote
1answer
31 views

My contract compiles, but when deploying I get an error

I'm using the Teztool in sandbox mode. My contract compiles, but when I deploy: teztool carthagenet sandbox client originate contract tezart transferring 0 from bootstrap1 running tezart.tz I get ...
1
vote
1answer
38 views

Drain delegated KT1 contract, then later send funds to the same (but now empty) contract

What happens in the following scenario? A person sends all his funds from his KT1 contract* to his tz1 address The person withdraws all the tez from his tz1 address (both now have a balance of 0 tez) ...
1
vote
1answer
19 views

How can I manually create an on chain contract call?

Using tezos sandbox mode, I am trying to test an on chain contract call in isolation of the main contract which calls it. If my contract was the Collatz template, it would like be trying to run the ...
1
vote
2answers
52 views

Contract originate hangs after 'Waiting for the node to be bootstrapped before injection…'

I'm using babylonnet.sh script to run docker. My contract compiles. I output to a 'contract.txt' file. Command is: ./babylonnet.sh client originate contract tezart transferring 0 from ...
1
vote
1answer
179 views

Delegating from a Kt1 address locked my coins, how can I fix it?

Might have royally messed up here, but I added an address via command line with ./tezos-client add address stakingfacilities tz1WpeqFaBG9Jm73Dmgqamy8eF8NWLz9JCoY (for stakingfacilities baker in ...
1
vote
1answer
37 views

How to format the call to the “do” entry point on manager.tz contracts in order to transfer funds to account X"

I accidentally set the account manager for a smart contract to a baker I was trying to delegate to. https://better-call.dev/main/KT1VSiaepk9USGAHDjJQAm4aaYRC6J8dTBHG/operations Now I need to figure ...
1
vote
1answer
16 views

How to format storage for a contract call with parameters?

I am trying to construct the storage needed to do an on chain contract call but I'm having trouble passing in the parameters. What is making it tricky is that one of the parameters is of type ...
1
vote
0answers
45 views

How to deploy a contract to Tezos Mainnet?

I've searched a lot but it seems nothing works at this point So I have a contract.liq source code. I also have up and running tezos-node. Basically the question is how to deploy contract.liq to the ...
0
votes
1answer
30 views

The revealed key of a contract in Michelson

Checking signatures requires keys. Currently, keys must be always given from the outside of Michelson. Is there any reason why Michelson cannot obtain the already revealed keys of given contracts/...
0
votes
0answers
13 views

Can I stake tez into smartcontract and get reward (named for example testtoken) when a new block is baked? [duplicate]

Can I stake tez into smartcontract and get token reward (named for example testtoken) when a new block is baked? Can I create that smartcontract using tezos? I want to get tokens when a block has been ...
-3
votes
1answer
43 views

is this RPC methods related about : deploy or call contract? [duplicate]

but the doc have't example. really bad.