[EOS学习笔记]Hello World
创建一个新合约文件hello
touch hello.cpp
编译合约文件
eosio-cpp hello.cpp -o hello.wasm
cleos wallet keys
注意,执行这里需要确保钱包(wallet)的状态为unlock状态
创建hello账户
cleos create account eosio hello YOUR_PUBLIC_KEY -p eosio@active
cleos set contract hello contracts/hello -p hello@active
cleos push action hello hi '["rivalhw"]' -p bob@active
cleos push action hello hi '["rivalhw"]' -p alice@active
稍微修改下hello合约内容
重新编译合约文件
cleos set contract hello contracts/hello -p hello@active
cleos push action hello hi '["bob"]' -p alice@active
用正确的方式重新打开
cleos push action hello hi '["alice"]' -p alice@active
果然,如你所愿 :)
我在测试的时候,总出现一些莫名其妙的问题,后来才发现是因为没有正常退出nodeos引起的,有时候replay后就可以,有时候甚至连 hard replay 也不可以,无奈之下只好delete all blocks
pkill nodeos
Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.01% upvote! Together, let’s change the world!
早上好大伟🌻🌻🌻
来自于 [WhereIn Android] (http://www.wherein.io)