Skip to content

ewasm/assemblyscript-ewasm-api

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

Ewasm API for AssemblyScript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published