Skip to content
Michael Andersen edited this page Jul 1, 2016 · 1 revision

BW2 is built upon an Ethereum-like block chain. As such you can do anything in BW2 that you can do in Ethereum, such as making a vulnerable DAO filled with millions of dollars.

This guide will walk you through creating a contract, deploying it, writing some Go code that interacts with your contract (using the normal Ethereum API), and obtaining the UFI (universal function identifiers) which are a BW2 specific way of interacting with contracts via an agent.

Setup

Make sure you have the latest versions of bw2bc (which is essentially geth from the ethereum project) and bw2 installed and in your gopath.

Write a contract

The bw2bc EVM offers a superset of the ethereum EVM. So look at ethereum resources for how to write a solidity contract. For now, we will use one of their ready made examples, the Token contract (https://ethereum.org/token).

curl https://git.io/vKejJ > token.sol

=== more coming ===

Clone this wiki locally