Use the latest feature of the Tezos blockchain in your smart contracts
Prerequisite: this article requires a basic knowledge of CameLigo, one of the syntaxes used by the Ligo language.
Tickets have been a very anticipated feature of the Edo upgrade: they promise to bring permission-based access in smart contracts to the next level. …
Learn more about the message passing architecture of Tezos smart contracts with a practical use case
Tokens are the hot subject of the moment in the Tezos ecosystem: everyone is talking about non-fungible tokens (or NFTs) with the release of different platforms to create them (like OpenMinter) and to sell/exchange them (like Kalamint). However, the subject of fungible tokens is often pushed into the background while being as exciting as their non-fungible cousins. Indeed, they are the keys to unlocking the full capacity of DeFi on Tezos.
I got excited since I first heard about the Kolibri stablecoin. I feel…
One of the most attractive features of smart contracts is the possibility to store a substantial amount of data into them that can then be used in the contract code. Although Michelson provides different structures to store data, the object of this article is going to be its maps. Maps are hash tables that contain key/value pairs, which means that when you want to find a value in a map, you search for its key. This allows you to store complex data that can be referenced with a single word or number or even more complex data like a pair!
…
One of the friction points you will encounter when you start developing more complex dapps for your smart contracts happens when creating multiple new transactions in a row. Each Tezos account holds a counter that increments every time an operation is included in a block on the network. This means that you cannot forge a new transaction if you already have a pending transaction or you will get the now infamous error message Counter 12345 already used for contract tz1...
There are different scenarios when you want to send multiple transactions at the same time: for example, you could hold…
How to be sure your Ligo code compiles to the Michelson code you want
Ligo is a fantastic tool that makes working with Tezos smart contracts a lot easier. However, its ease of use means that the compiler takes care of the heavy lifting for you and may compile your code down to a format you may not want. This becomes particularly important with TZIP standards: these standards establish fixed Michelson structures that could make your code useless if you don’t respect them. Here is a very simple example:
Imagine you have a record in Ligo like this one:
let…
I decided to work on a little project during the weekend and try the updated version of the contracts offered by TQ Tezos. These contracts implement the basic features of an FA2 contract according to the TZIP-12 standard. So I made some coffee, opened VSCode and started diving into the code written in CameLigo (the whole thing being made a lot easier now with the new VSCode extension from Ligo that allows syntax highlighting within the editor). While I was reading it, I thought it could be interesting to document the thought process and the different steps involved in extending…
It is incredible to see how far the Tezos blockchain has gone in just 6 months: at the beginning of 2020, TezBridge was the only wallet around and the possibilities of dapps on Tezos were very limited. Now, in the fall of 2020, we have Thanos, a better and more elegant wallet to interact with dapps and we have oracles! Oracles are a game-changer as they allow smart contracts to have access to live data. …
Part 1 is available here.
In Part 1, we had an overview of the TZIP-7 proposal, we set up our project in the Jupyter notebooks and we checked the structure of the parameter and the storage for our FA1.2 token.
In Part 2, we explore the code for the %transfer
entrypoint. It is an important piece of the contract (and the longest one) as it allows or restricts transfers.
Now let’s dive into the code 👨💻
In general, what I like to do at the very beginning, is unwrapping the structure laid down by the parameter. Because the parameter is…
Take your Michelson skills to the next level with a more complex project
In the last tutorial about Michelson programming language (the miniTez token), we created a simple token that was just transferring an amount of tokens from one account to another with minimal verifications.
The need for standardizing token interactions on Tezos has driven the community to create token standards that indicate how the tokens behave and how they can be interacted with. This has been the goal of the TZIP-7 proposal. After reading the miniTez tutorial, it should be very easy for you to understand what the TZIP-7…
Everyone on Tezos speaks about tokens! The different proposals, like the TZIP7 and more recently the TZIP12, allow the creation of complex tokens on the Tezos blockchain. Reading the proposals for less tech-savvy readers can be a little overwhelming as they are full of technical terms and references to Michelson. They are also based on common features tokens developed for blockchains present, may it be for Ethereum or Tezos.
Sometimes, the best way to understand how something works is just to build it yourself! This is the goal of this article, we are going to build miniTez, a minimalistic token…
Self-taught programmer building stuff on the Tezos blockchain and writing about it