Developing TypeScript/Javascript on EOS!

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@eosargentina·
0.000 HBD
Developing TypeScript/Javascript on EOS!
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](https://ipfs.busy.org/ipfs/Qme8oLKNEEZToebEbamgM6EHF5xa3dCVmekdzFRkuCe5hi)

![Captura de pantalla 2018-05-23 a la(s) 10.20.53.png](https://ipfs.busy.org/ipfs/QmP8nLpEkB64yrJvbF9CzSBGqkY2cqf2e63uHjVsDtBMpF)

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

Links and References

- EOS Argentina In a glance https://bit.ly/2KJS5mi 
- Original Repo ASC https://github.com/AssemblyScript/assemblyscript
- Typescript GameOfLife Source code https://github.com/EOSArgentina/gameoflife-ts
- Conway's Game of Life in a contract in C++ https://github.com/tbfleming/eos-game-of-life

## Social Media

[eosargentina.io](www.esoargentina.io)
steemit: @eosargentina
[Twitter](https://twitter.com/eosargentina)
[MEETUP Group](https://www.meetup.com/es-ES/EOS-Argentina/)
[Telegram](https://t.me/joinchat/AUBfjQwHHMFPvshLX-kuRA)
[Youtube](https://www.youtube.com/channel/UC_dz2VEDJ7NyfGCyahKY8LA)


👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,