Samuel Kerchouni
0x3A31
July 15th, 2022

How to create a Starknet node in a few minutes, this article will explain how to build a starknet node quickly and easier.

A few months ago it was complicated to have a syncing Node, especially on Görli, You’re thinking you were sync but you were not, nobody had a Node Sync because pathfinder was not stable with a lot of blocks. We encountered a few errors like this screenshot. Now in this article, I will explain how to build a sync Node quickly and easier.

Error catched on Starknet Node
Error catched on Starknet Node
June 21st, 2022

Protostar is a great and promising dev tool for StarkNet, that we at OnlyDust are using more and more in our projects. By the way, for a comparison between Protostar and Nile, get a look at this article.

One very cool thing with Protostar is that it allows to write tests in Cairo. And besides that, at the time of writing this, Protostar execute tests a lot faster than other testing solutions.

In this article, I will give some tips to write unit tests with Protostar efficiently, and some proposal to design complicated tests and high-level assertions so everything remains clean and maintainable.

How to make your need for external contribution explicit and widely visible?

At Only Dust we believe than in a close future most developers will get paid in crypto to contribute to open source projects, not as employees but as contributors.

To help it happen there is a lot to do: create communities, involve companies, create some kind of on-chain platform for missions to be posted on. That’s a lot to do, too much for one sprint or even one year. So we decided to start small, to find quick wins that can already greatly improve contribution.

May 20th, 2022

The lack of for loops in Cairo can be a bit disturbing for new comers. Even for experienced developers, having to write recursive functions every time you want to do something with an array can be time-consuming.

This is why we at OnlyDust developed Cairo Streams, an array stream library that can save you a lot of time and make your code easier to read and understand.

This library provides high-level functions such as foreach, filter, map and reduce.

Here is how it looks like:

When learning a new programming language, you can sometimes feel confused about new paradigms. For me it happened with cairo and its lack of for loops.

Indeed, as the memory is immutable in cairo, the usage of iterators is not possible. Only recursion remains.

To illustrate this article, let’s assume we have a grid structure (with a width and height) and that each cell can be accessed using its (x,y) coordinates.

We will use the OOP-like pattern described here

When I learn a new language, my first focus is to build SOLID components while leveraging the feature of this new language.

In this article, I would like to present a new convention we at OnlyDust are adopting with regards to cairo development.

This new kind of architecture feels like object-oriented programming in a way and leverage several cairo features like:

  • implicit parameters
  • structs
  • namespaces
May 13th, 2022

Introduction

When trying StarkNet for the first time, it’s easy to go through the account setup without paying much attention to it.

The documentation just says:

Unlike Ethereum, which distinguishes between Externally Owned Accounts (EOA) and contracts, StarkNet doesn’t have this distinction. Instead, an account is represented by a deployed contract that defines the account’s logic — most notably the signature scheme that controls who can issue transactions from it.

When starting a new project in a new programming language, there is always this question that is raised.

Which framework should I choose ?

For Starknet projects, there are especially 2 new frameworks I have been trying and would like to compare: protostar and nile.

I have detailed the comparison in this github repository. Several aspects are treated: