New to Busy?

Developing TypeScript/Javascript on EOS!

15 comments

eosargentina
56
last yearBusy3 min read

As a Block Producer, our main objective is the adoption of EOS in our community, and we know that one of the first barriers of entry is the programming language. It is our vision that any programmer will be able to code and deploy smart contracts on EOS on their prefered language.

In some cases, not knowing a complex language like c++ prevents developers from deploying contracts on EOS, and is not due to lack of capacity or motivation, in general this is due to lack of time that exists in this industry, where people consume large part of their hours going through libraries and frameworks that they require for their daily work, and can not often afford to learn other things.

So, how can we help developers that don't currently know c++ ?

There is huge potential in EOS, and in the use of WebAssembly to decrease this barrier, and we want to take advantage of it, we want the community to benefit from this opportunity.

In this sense, we have taken the time to modify the Game of Life and recreate it in Typescript using Assembly Script. For those of you that dont know Typescript, it is in short terms: “a typed superset of Javascript”. Assembly Script allows us to compile Typescript in WebAssembly, Once compiled we can upload this contract in the EOS Blockchain. In other words, the use of Typescript / Javascript in EOS will allow incorporating the entire web community. It's that great or not?

Our version of Game of Life in Typscript can be found in our github: https://github.com/EOSArgentina/eostypescript/tree/master/example. There you can find a step by step guide on how to execute our first TypeScript proof of concept.

You will be able to see the implementations in TypeScript of:

  • Use of apply and execution of actions
  • Deserialization of contract entry parameters
  • Use of require_auth
  • Read and Inserts in tables
  • Same abi file between c ++ and TypeScript

All these features that we have implemented are achieved through calls to EOSIO intrinsics, as a proof of concept they have been grouped in a library / folder that we call eoslib, which can be found in the github code, please remember that this It's a first draft and it requires a lot of work and optimization. We hope everyone will join us!

Example of Typescript execution on EOS.

Captura de pantalla 2018-05-23 a la(s) 10.20.44.png

Captura de pantalla 2018-05-23 a la(s) 10.20.53.png

Checkout our EOS Type Script repository on Github: https://github.com/eosargentina/eostypescript

Links and References

Social Media

eosargentina.io
steemit: @eosargentina
Twitter
MEETUP Group
Telegram
Youtube

Comments

Sort byBest