{"id":13780017,"url":"https://github.com/pirapira/bamboo","last_synced_at":"2025-04-06T16:12:39.374Z","repository":{"id":66718402,"uuid":"67894196","full_name":"pirapira/bamboo","owner":"pirapira","description":"Bamboo see https://github.com/cornellblockchain/bamboo","archived":false,"fork":false,"pushed_at":"2022-03-24T10:28:30.000Z","size":1165,"stargazers_count":323,"open_issues_count":50,"forks_count":40,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-03-30T14:11:15.866Z","etag":null,"topics":["bamboo","ethereum","ethereum-contract","evm","language","programming-language"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pirapira.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-10T21:00:07.000Z","updated_at":"2025-01-17T09:14:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"cb43cb36-47ff-4123-bd98-84b460f01194","html_url":"https://github.com/pirapira/bamboo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirapira%2Fbamboo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirapira%2Fbamboo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirapira%2Fbamboo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirapira%2Fbamboo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pirapira","download_url":"https://codeload.github.com/pirapira/bamboo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509235,"owners_count":20950232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bamboo","ethereum","ethereum-contract","evm","language","programming-language"],"created_at":"2024-08-03T18:01:11.468Z","updated_at":"2025-04-06T16:12:39.346Z","avatar_url":"https://github.com/pirapira.png","language":"OCaml","funding_links":[],"categories":["Developer Resources","R\u0026D","OCaml","Programming Languages that Compile into EVM"],"sub_categories":["Developing Smart Contracts","Experimental Languages","Other Implementations"],"readme":"# Bamboo: a language for morphing smart contracts\n\nCornell Blockchain says they can now maintain the Bamboo compiler. https://github.com/CornellBlockchain/bamboo\n\n\u003chr\u003e\n\n[![Join the chat at https://gitter.im/bbo-dev/Lobby](https://badges.gitter.im/bbo-dev/Lobby.svg)](https://gitter.im/bbo-dev/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Build Status](https://travis-ci.org/pirapira/bamboo.svg?branch=master)](https://travis-ci.org/pirapira/bamboo)\n\nBamboo is a programming language for Ethereum contracts.\nBamboo makes state transition explicit and avoids reentrance problems by default.\nSee [manifest](doc/manifest.md) for the motivation, or [tutorial](doc/tutorial.md) if you want to deploy something first, or [semantics](doc/semantics.md) if you need something resembling a definition.\n\n## Example Bamboo Code\n\n* [A payment channel](./src/parse/examples/00h_payment_channel.bbo)\n* [An ERC20 contract](./src/parse/examples/01b_erc20better.bbo)\n* [A vault](https://medium.com/@pirapira/implementing-a-vault-in-bamboo-9c08241b6755)\n\n## Compiler\n\nThe Bamboo compiler sometimes produces bytecode, which needs to be tested.\n\nAs preparation,\n* install [opam](http://opam.ocaml.org/doc/Install.html) with OCaml 4.04.1\n* `opam install bamboo`\nshould install `bamboo`.\n\nWhen you check out this repository,\n```\nbamboo \u003c src/parse/examples/006auction_first_case.bbo\n```\nproduces a bytecode. Do not trust the output as the compiler still contains bugs probably.\n\n```\nbamboo --abi \u003c src/parse/examples/006auction_first_case.bbo\n```\nprints ABI.\n```\n[{\"type\": \"constructor\", \"inputs\":[{\"name\": \"_beneficiary\", \"type\": \"address\"},{\"name\": \"_bidding_time\", \"type\": \"uint256\"},{\"name\": \"_highest_bid\", \"type\": \"uint256\"}], \"name\": \"auction\", \"outputs\":[], \"payable\": true},{\"type\":\"fallback\",\"inputs\": [],\"outputs\": [],\"payable\": true}]\n```\n\n## Developing Bamboo\n\nTo try Bamboo in your local environment, run `make dep` from the project folder. That should install all dependencies.\nOnce the installation process is done, run `eval $(opam config env)` and then you can build all targets using `make`, and run the tests with `make test`.\n\nWhen you modify the OCaml source of Bamboo, you can try your version by\n```\n$ make\n$ ./lib/bs/native/bamboo.native \u003c src/parse/examples/006auction_first_case.bbo\n```\n\n**Embark**\n\nAn [Embark plugin for Bamboo](https://github.com/embark-framework/embark-bamboo) is available. To use it, first install [Embark](https://embark.status.im/docs/) and add then add the plugin to your DApp.\n\n```Javascript\nnpm install -g embark\nembark new AppName\ncd AppName\nnpm install embark-bamboo --save\n```\n\nthen add embark-bamboo to the plugins section in ```embark.json```:\n\n```Json\n  \"plugins\": {\n    \"embark-bamboo\": {}\n  }\n```\n\nAfterwards Embark will recognize .bbo files and compile them with Bamboo.\n\n## How to Contribute\n\n* notice problems and point them out. [create issues](https://github.com/pirapira/bamboo/issues/new).\n* test the bytecode like [this](doc/tutorial.md), but using other examples.  You might find bugs in the compiler.\n* write new Bamboo code and test the compiler.\n* join the [Gitter channel](https://gitter.im/bbo-dev/Lobby).\n* spread a rumor to your friends who are into programming languages.\n\n## Related Work\n\n### Linden Scripting Language\n\n[Linden Scripting Language](http://wiki.secondlife.com/wiki/Getting_started_with_LSL#Introducing_States_and_Events) has similar organization of code according to `state`s.\n\n### Obsidian\n\n[Obsidian](https://ieeexplore.ieee.org/document/7965268/) is another programming language that models smart contracts as state machines.  Obsidian even tracks states of the contracts statically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirapira%2Fbamboo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpirapira%2Fbamboo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirapira%2Fbamboo/lists"}