Skip to content

Latest commit

 

History

History
61 lines (51 loc) · 2.84 KB

File metadata and controls

61 lines (51 loc) · 2.84 KB

Blockchain development on Azure BaaS

Setting up your development environment

Truffle framework

Azure Etherum consortium

.\geth --datadir .\ --networkid 10101010 --rpc

additional links

info sources

Code snippets

getting started in Truffle Console

// get accounts
web3.eth.accounts

// get reference to deployed contract
var metaCoin;
MetaCoin.deployed().then(function(deployed) {metaCoin = deployed;});

// get balance of account 0
metaCoin.getBalance.call(web3.eth.accounts[0])

// send coins
var account0 = web3.eth.accounts[0];
var account1 = web3.eth.accounts[1];
metaCoin.sendCoin(account1, 1000, {from: account0});
metaCoin.getBalance.call(account0);