-
Notifications
You must be signed in to change notification settings - Fork 9
Contracts
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.
Make sure you have the latest versions of bw2bc (which is essentially geth from the ethereum project) and bw2 installed and in your gopath.
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 ===