Make an AssemblyScript module for Bobine WebAssembly VM
Clone this Git repository
git clone https://github.com/hazae41/create-bobine-module.git module && cd ./moduleReset the Git repository
rm -rf ./.git && git initInstall dependencies
npm installIf needed modify your server URL in a .env.local file
SERVER=http://localhost:8080Start coding in ./src/mod.ts
import { console, packref, storage, textref, texts } from "@hazae41/stdbob"
export function sayMyName(name: textref): packref {
const previous = storage.get(texts.fromString("name"))
console.log(texts.fromString("Hello, " + texts.toString(name) + "!"))
storage.set(texts.fromString("name"), name)
return previous
}Compile and deploy your module (it will display the module address)
npm run prepack && npm run produceExecute your module
npm run execute <address> <method> ...[params as ("null"|("blob":data)|("bigint":data)|("number":data)|("text":data))]For example
npm run execute 3ca2c27fa5069305da28741b19643cef918a8c5349ce5de1422925e0772cc5db main bigint:123n blob:643cef918a8c text:"hello world"Hint: for easier development, you can keep the command in a new file, copy-paste it into your terminal when you want to execute it, and edit the file when you want to modify it, this can also be used to easily keep track of different modules or different addresses