Coder Social home page Coder Social logo

assemblyscript-ewasm-api's Introduction

Ewasm AssemblyScript demo

The AssemblyScript project in this repository is a proof of concept barebones "ERC-20 style" implementation of a simple ledger. The main code lives in main.ts. It allows anyone to check the token balance of an account, and a tokenholder to transfer some of their tokens to another account. Sample transaction data may be found on the coding challenge gist.

Steps to compile, deploy, and test

  1. Use WebassemblyStudio or another IDE to bootstrap the project and edit main.ts.
  2. If using WebassemblyStudio, download the project code.
  3. Navigate to the top directory of the project and run npm install.
  4. Run npm run build to compile the AssemblyScript source to WASM bytecode. Find the compiled main.wasm file in the build/ directory. At this point you have a valid WASM binary.

You now have a valid ewasm-compatible WAST which is ready to be deployed to the ewasm testnet using a tool such as ewasm-studio.

Another option is to test the code using testeth. See this example of a test filler that fully tests this code.

assemblyscript-ewasm-api's People

Contributors

axic avatar dcodeio avatar lrettig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

assemblyscript-ewasm-api's Issues

License

How about using Apache 2.0 or MIT?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.