{"id":47258866,"url":"https://github.com/bazo-blockchain/lazo","last_synced_at":"2026-03-14T22:17:37.961Z","repository":{"id":57553990,"uuid":"171537867","full_name":"bazo-blockchain/lazo","owner":"bazo-blockchain","description":"Lazo - A Smart Contract Language for the Bazo Blockchain","archived":false,"fork":false,"pushed_at":"2019-06-05T17:37:47.000Z","size":572,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-09T10:00:58.158Z","etag":null,"topics":["blockchain","compiler","language","smartcontract"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bazo-blockchain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-19T19:41:43.000Z","updated_at":"2023-06-10T20:32:01.000Z","dependencies_parsed_at":"2022-09-26T19:31:39.466Z","dependency_job_id":null,"html_url":"https://github.com/bazo-blockchain/lazo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bazo-blockchain/lazo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazo-blockchain%2Flazo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazo-blockchain%2Flazo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazo-blockchain%2Flazo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazo-blockchain%2Flazo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bazo-blockchain","download_url":"https://codeload.github.com/bazo-blockchain/lazo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazo-blockchain%2Flazo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30519587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-14T19:51:21.629Z","status":"ssl_error","status_checked_at":"2026-03-14T19:51:12.959Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","compiler","language","smartcontract"],"created_at":"2026-03-14T22:17:37.362Z","updated_at":"2026-03-14T22:17:37.952Z","avatar_url":"https://github.com/bazo-blockchain.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lazo: A Smart Contract Language for the Bazo Blockchain\n\n[![Build Status](https://travis-ci.org/bazo-blockchain/lazo.svg?branch=master)](https://travis-ci.org/bazo-blockchain/lazo)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bazo-blockchain_lazo\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=bazo-blockchain_lazo)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=bazo-blockchain_lazo\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=bazo-blockchain_lazo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bazo-blockchain/lazo)](https://goreportcard.com/report/github.com/bazo-blockchain/lazo)\n[![GoDoc](https://godoc.org/github.com/bazo-blockchain/lazo?status.svg)](https://godoc.org/github.com/bazo-blockchain/lazo)\n\nLazo is a statically typed, imperative and non-turing complete programming language.\nPlease refer to [lazo-specification](https://github.com/bazo-blockchain/lazo-specification) for the complete language features.\n\n## Background\n\nThe Bazo Blockchain is a research blockchain to test different mechanisms and algorithms. \nIn the current version, there is a virtual machine available to interpret and execute IL codes on the Bazo Blockchain.\n\nThe goal of this bachelor thesis is to build a compiler, which compiles the smart contracts written in the Lazo language \ninto the Bazo Byte Code for the [Bazo Virtual Machine](https://github.com/bazo-blockchain/bazo-vm).\n\n                 Lazo Source Code\n                        |\n                        V               \n                +---------------+\n                |     Lexer     |\n                +---------------+\n                        |\n                        V\n                +---------------+\n                |     Parser    |\n                +---------------+\n                        |\n                        V\n                +---------------+\n                |    Checker    |\n                +---------------+\n                        |\n                        V\n                +---------------+\n                |   Generator   |\n                +---------------+                \n                        |\n                        V\n                  Bazo Byte Code\n\n\n## Result\n\n* Technical Documentation for [Lazo Compiler](https://github.com/bazo-blockchain/lazo/releases/download/v0.5.0/Lazo.pdf) (Bachelor Thesis 2019)\n* Complete [Language Specification v1.0](https://eprints.hsr.ch/736/1/HS%202018%202019-SA-EP-Pfister-THURAIRATNAM-Improving%20the%20Bazo%20Blockchain.pdf) (Term Project 2018)\n\n## Lazo Example \n\nNote: Lazo is still under development. The example below contains only the currently available features. \nPlease see [lazo-specification/examples](https://github.com/bazo-blockchain/lazo-specification/tree/master/examples)\nfor real smart contract use cases.\n\n```csharp\ncontract SimpleContract {\n    Map\u003cint, int\u003e balances\n\n    constructor() {\n        balances[0x01] = 10\n        balances[0x02] = 2\n\n        pay(0x01, 0x02, 5)\n    }\n\n    function void pay(int from, int to, int amount) {\n        if (amount \u003e 0 \u0026\u0026 balances[from] \u003e= amount){\n            balances[from] -= amount\n            balances[to]   += amount\n        }\n    }\n}\n```\n\n## Usage\n\nThe Lazo tool works with the CLI commands.\nRun `lazo` to see all the available commands and their usages.\n\n    $ lazo\n    Lazo is a tool for managing Lazo source code on the Bazo Blockchain\n    \n    Usage:\n      lazo [flags]\n      lazo [command]\n    \n    Available Commands:\n      compile     Compile the Lazo source code\n      help        Help about any command\n      run         Compile and run the lazo source code on Bazo VM\n      version     Print the version number of Lazo\n    \n    Flags:\n      -h, --help   help for lazo\n    \n    Use \"lazo [command] --help\" for more information about a command.\n\nExample:\n* `lazo compile program.lazo`: Compile the source file *program.lazo* through all stages into Bazo byte code.\n* `lazo compile program.lazo --stage=p`: Compile the source code only until the parser stage.\n* `lazo run program.lazo`: Compile the source file and execute generated byte code on Bazo VM\n                \n## Development\n\nRun `./scripts/set-hooks.sh` to setup git hooks.\n\n###  Dependency Management\n\nPackages are managed by [Go Modules](https://github.com/golang/go/wiki/Modules). \n\nSet the environment variable `GO111MODULE=on` and run `go mod vendor` \nto install all the dependencies into the local vendor directory.\n\n### Run Compiler from Source\n\n    go run main.go compile program.lazo\n\nIt will compile the given source code file \"*program.lazo*\".\n\n### Run Unit Tests\n\n    go test ./... \n\nIt will run all tests in the current directory and all of its subdirectories.\n\nTo see the test coverage, run `./scripts/test.sh` and then open the **coverage.html** file.\n\n### Run Lints\n\n    ./scripts/lint.sh\n    \nIt will run golint on all packages except the vendor directory.\n\n### Build Compiler\n\n    go build \n\nIt will create an executable for the current operating system (e.g. `lazo.exe` in Windows).\n\n### Install Compiler\n\n    go install\n    \nIt will build an executable and place it in the `$GOPATH/bin` directory.\nThus, `lazo` command will be available in the terminal from anywhere.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazo-blockchain%2Flazo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbazo-blockchain%2Flazo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazo-blockchain%2Flazo/lists"}