Questions tagged [michelson]

The tag has no usage guidance.

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

What is the execution sequence of this michelson code snippet

I tried to get a better grip on michelson but found myself fail at a simple piece of michelson code. Is anyone willing to help on the logic of below code? Thanks a lot! parameter (pair nat nat); ...
1
vote
1answer
25 views

What is the size limit of a list in Michelson

Can lists be used to store large amounts of data like big maps ? The doc (https://tezos.gitlab.io/whitedoc/michelson.html?highlight=michelson%20types#core-data-types-and-notations) doesn't talk about ...
0
votes
0answers
8 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
2answers
30 views

How to use Emacs michelson-mode with Tezos sandboxed client?

The Emacs michelson-mode relies on being able to call Tezos client. How can you use the Tezos sandboxed client for it?
4
votes
0answers
34 views

Error too big to serialize within the provided gas bounds. Increasing the gas bounds does not help

I am developing a fairly large set of contracts that interact with each other. I wanted to reorganize and optimized the code and I've added lots of PUSH string "..."; FAILWITH to help me debug. I am ...
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
44 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", "...
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-...
4
votes
0answers
44 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
48 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
1answer
52 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 ...
3
votes
1answer
28 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
57 views

Michelson P2P message encoding

I'm looking to implement full message "forging" with no reliance on RPC calls. The P2P message doc does not cover all the details. Let's say I have the JSON representation of parameters and code, how ...
3
votes
2answers
116 views

Contract accepting an ANY type

A contract that is upgradable would benefit from being able to accept ANY type, and forward that type to the current app contract based on how that ANY type parses. For example, a request might be ...
4
votes
2answers
132 views

Contract Factories

Has there been any research into how a contract factory might be made in Michelson/Liquidity? To elaborate, in Solidity a contract factory might look like: pragma solidity ^0.4.8; contract Bakery { ...
10
votes
3answers
324 views

How does NOW work?

Say a contract has a condition based on NOW being after a time. Is NOW UTC, and is this validated by each node before being added to the chain? Let's say you want ensure a function is called during ...
5
votes
1answer
151 views

Implementation details for PACK and UNPACK

In the Operations on bytes section of the Michelson white document, it is mentioned that: "PACK: Serializes a piece of data to its optimized binary representation." I am curious to know more ...
8
votes
1answer
93 views

Language features needed for Marigold

In the Marigold presentation it is stated that But first, project resources are dedicated to a new smart contract language for Tezos. What currently exists was sufficient for the Marigold ...
13
votes
1answer
198 views

What is the BigMap container and why does it matter?

I have heard in many places that Tezos is making use of a specific kind of container called BigMap in order to store data inside a smart contract. The object must be relatively complex because so far ...
6
votes
1answer
85 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?
3
votes
1answer
34 views

How SET_CAR/SET_CDR macros should be expanded?

Michelson specification declares the following rule for expansion of SET_CDR macro SET_CDR @var %field => CAR %field ; PAIR @var However, %field is supposed to be a field annotation of right ...
2
votes
1answer
28 views

Understanding the UNPAIR syntactic sugar

UNP(\left=A|P(\left)(\right))(\right=I|P(\left)(\right))R: A syntactic sugar for destructing nested pairs. These macros follow the same convention as the previous one. > UNPAIR / S => DUP ; CAR ;...
3
votes
1answer
46 views

Michelson Application Binary Interface

Is there an Application Binary Interface for Michelson contracts (akin to Ethereum ABI)?
7
votes
3answers
178 views

How can I deploy a Michelson smart contract?

I'm wondering how to deploy a Michelson smart contract on Tezos. Maybe I'm just bad at googling, but all the examples I can find are using liquidity-cli. I'm not using liquidity for this contract, ...
4
votes
2answers
94 views

Benefits of Michelson

I'm trying to understand the design decisions behind Michelson and I'm in the process of evaluating if I should be writing my dapp in the Tezos blockchain. What type of benefits does Michelson have ...
2
votes
1answer
56 views

Michelson: two potential bugs in type checker / spec [closed]

TL;DR looks like 1 bug in spec and one more in type checker for alphanet. Someone please review and comment on this behavior :) parameter unit; storage string; code { DROP; PUSH int 3; ...
7
votes
2answers
103 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
37 views

Regarding annotations in michelson

Michelson has different type of annotations. I am curious about what is the main purpose of annotations and where should one use annotations vs where on shouldn't? Is there a michelson pattern where ...
6
votes
1answer
143 views

Differences between Micheline and Michelson

What is the difference between Micheline and Michelson? Is Micheline a subset of Michelson?
3
votes
2answers
117 views

A contract calling another contract

Can someone please give an example Michelson smart contract that calls another smart contract ? Some actual implementation would go a long way. Many thanks
4
votes
2answers
53 views

What does the DIP opcode in Michelson do?

It says Runs code protecting the top of the stack. but I’m not sure what is meant by that.
5
votes
2answers
81 views

Michelson Logic understanding problem

If i got it right, Michelson is a stack based language. I've read the following example about stack based languages: 3 4 5 * + = 23 how does Michelson know, that it has to mutiplicate 4 * 5 ...
7
votes
1answer
61 views

Parameter passed when calling CONTRACT in michelson

When I call the CONTRACT opcode in Michelson, say I have a command like: CONTRACT int; Does the contract I'm calling this on have to have int as a param or could it be something like: parameter Or(...