Questions tagged [contract]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
37 views

how does the liquidity baking CPMM round up or down?

I'm not sure how to ask this and I may mess up my mathematical terms, if you think I have then please correct me. When I call addLiquidity on the CPMM, I know that I will be sending tez, and that ...
1
vote
1answer
29 views

how to calculate current storage values for liquidity baking CPMM

In looking at the storage values of the CPMM one can see that as of right now the CPMM has the following amounts of tzBTC (represented by the contract as tokenPool), xtz (represented as xtzPool), and ...
0
votes
1answer
62 views

call to 'approve' entrypoint of tzBTC contract failing with 'UnsafeAllowanceChange'

I'm trying to call addLiquidity on the Liquidity Baking CPMM. I've already called xtzToToken on the CPMM and given my address tzBTC. I can see that my address has tokens on the tzBTC contract when I ...
3
votes
1answer
63 views

what's a sensible minLqtMinted to send to the Liquidity Baking CPMM when calling addLiquidity?

I'm trying to understand what a sensible value is for the liquidity token (LQT) parameter when calling the Liquidity Baking CPMM. I'm reading the Dexter docs here, since the CPMM is a fork of the ...
1
vote
1answer
41 views

value is invalid for type

I'm trying to call the addLiquidity entrypoint of this contract, which is a copy of the Liquidity Baking CPMM contract, which is itself a copy of the Dexter contract. The original Dexter docs give an ...
2
votes
1answer
85 views

Can't get tzBTC out of the tzBTC Granadanet contract

i'm trying to (eventually) add liquidity to the Liquidity Baking CPMM contract on Granadanet. In order to add liquidity, I need some tzBTC from the tzBTC contract here.. I cannot, for the life of me, ...
1
vote
1answer
66 views

Contract does not exist

I'm using a Granadanet node to experiment with Liquidity Baking. I'm trying to call the tzBTC contract's mint entry point. This is my first time using a test net, but I thought that it was a copy of ...
2
votes
1answer
259 views

How to store and load custom FA2 NFT metadata?

First time I'm writing a smart contract. If anything doesn't make sense at all, feel free to call out what specifically doesn't make sense and suggest a better approach. Thanks! At a high level I just ...
0
votes
1answer
56 views

What is the one-time 0.257 tz burn fee?

I have deployed a contract on a test net and I want to send some tez to it to test out some operations. When I try to send through Temple wallet, I get: Failed Unable to estimate transaction to ...
0
votes
1answer
80 views

Smartpy transfer contract balance to an address

I'm trying to figure out how to withdraw money from the contract within a smartpy entrypoint, and test the result in my scenario. When I test the entrypoint: @sp.entry_point def withdraw(self, ...
2
votes
1answer
44 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 ...
1
vote
1answer
29 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
1answer
25 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
99 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
44 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 ...
2
votes
0answers
46 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 ...
1
vote
1answer
43 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 ...
0
votes
1answer
33 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/...
1
vote
1answer
42 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
2answers
133 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 ...
3
votes
2answers
304 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 ...
4
votes
1answer
70 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 ...
2
votes
1answer
51 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
3answers
80 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
42 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
220 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
54 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
0answers
62 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 ...
2
votes
1answer
108 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 ...
4
votes
2answers
525 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
0answers
32 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 ...
2
votes
1answer
68 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 ...
4
votes
1answer
127 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
1answer
96 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
31 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 ...
3
votes
1answer
40 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?
5
votes
1answer
86 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 ...
9
votes
2answers
312 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 ...
6
votes
1answer
132 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 ...
3
votes
1answer
70 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 ...
8
votes
1answer
135 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/...
-3
votes
1answer
46 views

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

but the doc have't example. really bad.
4
votes
1answer
259 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 ...
7
votes
2answers
213 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?