1. bcos之合约

    这里特指的业务合约。因为涉及到业务流程。所以只简单举一个例子。在bcos的开源代码中有个例子叫Ok.sol。 contract Ok{ struct Account{ address account; uint balance; } struct Translog { string time; address from; address to; uint amount; } Account from; Account to; Translog[] log; function Ok(){ from.account=0x1; from.balance=10000000000; to.account=0x2; to.balance=0; } function get()constant returns(uint){ return to.balance; } function trans(uint num){ from.balance=from.balance-num; to.balance+=num; log.push(Translog("20170413",from.account,to.account,num)); } } 这个Ok合约提供了trans和get的功能接口。 通过babel-node deploy Ok将Ok这个业务合约编译部署到区块链网络上。 然后关联

    2017/11/19 bcos contract

  2. template page

    Content here

    2017/11/19 cate1 cate2

  3. template page

    Content here

    2017/11/19 cate1 cate2

  4. template page

    Content here

    2017/11/19 cate1 cate2

  5. template page

    Content here

    2017/11/19 cate1 cate2