Thorkil Værge
  • Member for 1 year, 7 months
  • Last seen more than a month ago
Call method taking unit type as parameter from JavaScript
Accepted answer
5 votes

You express the Unit in JavaScript by calling the method like this contract_instance.method([["unit"]]);

View answer
How are sets serialized in Tezos?
Accepted answer
3 votes

Sets are serialized by first ordering the elements, and then packing them as a sequence which is also how lists are represented when PACK is called. This means that these two expressions evaluate to ...

View answer
How do I get method arguments using Taquito?
Accepted answer
1 votes

Yes, you can get the function signature, not just the function names. This can be done like this. const contract: ContractAbstraction<ContractProvider> = client.contract.at(this.state....

View answer
How are addresses ordered in Tezos?
Accepted answer
1 votes

The address data type is ordered lexicographically, so that tz2... comes before tz3... and tz2a... comes before tz2b... etc. But originated accounts, addresses that start with KT1, come after any ...

View answer
How are strings serialized in Tezos?
Accepted answer
1 votes

Strings are serialized as follows: 01 to indicate type string Four bytes (eight hex chars) to indicate length of string: 0000000c=0x0c=12 in your case The string represented by its ASCII values: ...

View answer
Call method taking timestamp as parameter from JavaScript
Accepted answer
1 votes

For some reason you need to represent the timestamp as a string. So contract_instance.test("1"); will work.

View answer
How are integers serialized in Tezos?
Accepted answer
1 votes

The 05 prefix indicates that this serialization comes from the PACK assembly instruction, and the next byte 00 in case of integers (nat, int, and tez) indicates that the type is integer. So the ...

View answer
Comments in LIGO
0 votes

Anything between // and a new line \n is considered a comment by the compiler. And anything between (* and *) is also a comment. So // This is a comment const a: nat = 4n; // and this is a comment (*...

View answer
Deploy application to Tezos
0 votes

This is a smart contract written in LIGO, so you must compile it with the Ligo compiler which can be found here: https://ligolang.org/docs/intro/installation Once you have compiled the source code, ...

View answer