Last updated
Last updated
For the moment there is no CLI allowing to create new AssemblyScript smart contracts projects, so you'll need to clone the empty contract template :
A CLI like mxpy
is not available yet for AssemblyScript projects. This feature is planned.
Open the folder inside your favorite code editor and replace the content of the `assembly/index.ts` by the following code :
Use //@ts-nocheck
to avoid false errors due to IDEs thinking the code is in TypeScript instead of AssemblyScript and annotations not processed.
As any node project we need to install npm packages with the following command:
Run the next command to build your contract :
If everything went well you should have a new folder named build
with two files inside : release.wasm
and release.wat
. The first one is the deployable code and the second one is a "human readable" version of the first one.
At the moment the contract is empty. We will write the flip code in next parts of this tutorial, starting by the contract storage 📚
Here we have the simplest contract ever : a contract that does nothing (for now!). More information about each line can be found .
Time to code !