Bazo VM is a stack-based virtual machine to execute smart contract programs on the Bazo blockchain.
Smart contracts can be written in Lazo (a high-level smart contract language) and then compiled to Bazo bytecode (an intermediate language). Bazo-miner executes the bytecode on Bazo VM and persist changes on the blockchain.
The Bazo Blockchain is a blockchain to test diverse mechanisms and algorithms. In the current version mechanisms to run it on mobile devices and Proof of Stake are integrated. It was only possible to transfer Bazo coins before this thesis. The idea of this work was to enhance the Bazo Blockchain with smart contracts.
Documents
Run ./scripts/set-hooks.sh
to setup git hooks.
Packages are managed by Go Modules.
Set the environment variable GO111MODULE=on
and run go mod vendor
to install all the dependencies into the local vendor directory.
go test ./...
It will run all tests in the current directory and all of its subdirectories.
To see the test coverage, run ./scripts/test.sh
and then open the coverage.html file.
./scripts/lint.sh
It will run golint on all packages except the vendor directory.
It is difficult to write Bazo bytecode manually. Therefore, it is recommended to use Lazo language to generate bytecode automatically. To use VM with a Lazo program, run the following command:
lazo run program.lazo
It will generate Bazo bytecode from source code and directly execute it on the VM.