@page "/blockchains"

Blockchain

@namespace HyperCube.Models @code { string hidecontr = "hidden"; string hidereceipt = "hidden"; string result = ""; } @if (Blockchain.newData) { @foreach (var bc in Blockchain.loaded) {

@bc.url:@bc.port, address: @bc.address

} @bytecode; }

Ethereum dev network

Add blockchain connection:

Add smart contract:

Get smart contract address:

@result

@code { private Random r = new Random(); private string bcURL = "127.0.0.1"; private int bcport = 8545; private string bytecode = ""; private string error = ""; private async Task GetReceipt() { //TODO result as transaction addr result = await Blockchain.loaded[0].GetReceipt(result); } private async Task AddContract() { if (Blockchain.loaded.Count > 0) { result = await Blockchain.loaded[0].AddContract(bytecode); } //private Post post = new Post(); } private async Task GetBlockChain() { if (Blockchain.loaded.Count == 0) { Blockchain bc = new HyperCube.Models.Blockchain(bcURL, bcport); result = await bc.Initialize(); if (result != "") hidecontr = "visible"; //bcURL = bc.GetAddress(); //bc.ExecuteContract(); //bcURL = bc.address; //hidecontr = "hidden"; } //private Post post = new Post(); } }