Navigate back to the homepage

DRAFT - ink! - new era of smart contracts has begun

Tomasz Waszczyk
January 1st, 2023 · 1 min read

~ ~ THIS IS A SEED OF BLOG POST, COME BACK IN A FEW WEEKS ~ ~

Introduction

Cards on the table - I do not share the same generational excitement for moving all aspects of life into an instrumented economy.

..but also, I am not able to propose better solution..

I am obliged to follow technology (impacts on human life with surgical precision) and I have noticed (still in the development) rising new way of thinking about smart contracts called !ink. By writing new way I think about execution environment, in the case of ink is web assembly. Idea is very promising but as a drawback I see barrier to deliver more complicated business logic. From the technological point of view, in my opinion comparing Solidity and ink! I conclude that Solidity was just a proof of concept.

!ink

Example

1// We are importing the default ink! types
2use ink_lang as ink;
3
4#[ink::contract]
5mod MyContract {
6
7 // Our struct will use those default ink! types
8 #[ink(storage)]
9 pub struct MyContract {
10 // Store some AccountId
11 my_account: AccountId,
12 // Store some Balance
13 my_balance: Balance,
14 }
15 /* --snip-- */
16}

As we can see ink! is like Rust but with special annotations. As far as I know, for now a project can have only one file, there is no possibility to build a project with multiple files. Beginnings, but we should know that to deliver something solid must take time. Delivering Rust code is not obvious - I personally struggle with that, for now without bigger results.

This is the draft of the post, I am going to share my experience with the technology in the post, so come back here in a few weeks.

Ecosystem of ink!

Sol2Ink

Sol2Ink we are living in the times of protocol wars so that, protocols compete with each other. Ink naturally wants to overtake market of Solidity and thanks to the tool you can* easily migrate Solidity source code into Ink!.

Sol2Ink just transpile Solidity code into Ink compatible file, because behind Ink! is to write any critical parts of information systems to Rust, like in the poster:

rust

My doubt about Sol2Ink: Delivering solid Solidity source code is quite close to magic (by “shadowy super coder”) and I have serious doubts that such kind of automated transpilation is ready for production - for sure it will be the subject of observation (and experiments!).

If you really want to get down in the weeds

  1. ink!
  2. ink! workshop
  3. React Hooks abstracting functionality by polkadot.js
  4. Swanky Dapps
  5. From Zero to ink! Hero
  6. OpenBrush Documentation
  7. OpenBrush Contracts
  8. ink tag on StackExchange
  9. Swanky CLI
  10. wasmi- WebAssembly (Wasm) Interpreter

More articles from waszczyk.com

Rustic Introduction into Substrate Framework - Syntax and Design Patterns

In other languages simple things are easy and complex things are possible, in Rust simple things are possible and complex things are EASY…

March 20th, 2021 · 3 min read

Decentralizacja systemu bankowego

Decentralizacja systemu bankowego oraz systemów informatycznych to trend który coraz wyraźniej przebija się do świadomości użytkoników internetu, właśnie przygotowywuję kurs w którym przekrojowo przedstawię ten nurt - prawdopodobnie już nie do zatrzymania.

January 11th, 2021 · 7 min read
© 2020–2024 waszczyk.com
Link to $https://twitter.com/tomaszwaszczykLink to $https://github.com/tomaszwaszczykLink to $https://instagram.com/tomasz_waszczykLink to $https://www.linkedin.com/in/tomaszwaszczyk