aergoio/aergo

View on GitHub
cmd/brick/example/hello.brick

Summary

Maintainability
Test Coverage
# create an account and deposit coin
inject bj 10000000000

# check balance
getstate bj

# delpoy helloworld smart contract
deploy bj 0 helloctr `./example/hello.lua`

# query to contract, this will print "hello world"
query helloctr hello `[]` `"hello world"`

# call and execute contract
call bj 0 helloctr set_name `["aergo"]`

# query again, this now will print "hello aergo"
query helloctr hello `[]` `"hello aergo"`