questions about "hello world" tutorial
Hi, I followed "https://github.com/EOSIO/eos/wiki/Tutorial-Hello-World-Contract". Everything looks going fine. However some problems are there to follow above URL.
- After completion of instruction, final result would be "$ cleos push action hello.code hi '["user"]' -p user executed transaction: 4c10c1426c16b1656e802f3302677594731b380b18a44851d38e8b5275072857 244 bytes 1000 cycles
hello.code <= hello.code::hi {"user":"user"}
Hello, user"
but my result is "executed transaction: cde98685cba09c65c5049c91a062acc3893e13a8bccaa21b570c1525de43d3e1 96 bytes 260 us
hello3.code <= hello3.code::hi ""
warning: transaction executed locally, but may not be confirmed by the network yet " I am not sure why "user name" and "Hello user" is not printed.
This is my abi file. "{ "____comment": "This file was generated by eosio-abigen. DO NOT EDIT - 2018-05-28T05:47:10", "version": "", "types": [{ "new_type_name": "account_name", "type": "uint64" } ], "structs": [{ "name": "hi", "base": "", "fields": [{ "name": "user", "type": "account_name" } ] } ], "actions": [{ "name": "hi", "type": "hi", "ricardian_contract": " ......... "
- Second questions, according to tutorial, I changed hello.cpp file then repeat steps. But creation step it shows error message in this step " cleos create account eosio hello3.code".
error message is "Publishing contract... 2265340ms thread-0 main.cpp:2493 main ] Failed with error: Assert Exception (10) account.code_version != code_id: contract is already running this version of code "
so I changed the contract name from hello to hello2.
Is there any why to update currently applied contract instead of renaming?
- After shutting down "nodes", every contract and accounts are perished. Is there any way to preserve these data even I shutdown and restart the "nodeos"?
BR, Teddy.
If your contract wasm has changed just use cleos set contract to publish it. If there is no change to the implementation why would you expect the contract to be published?
This is expected behavior. This issue should be closed.
Thanks. In hello world tutorial, to add authority checl, it needs changes in hello Cpp. So I need to re-publish that.
Thanks for your comment.
But still hello world tutorial does not work.
Try adding: --contracts-console To your block producer and see if that fixes it.
Hi, I am also running a local node. Number #2 is closed. and I will try to Number#1 and #3. If there are still errors, I will open new issues. Thanks.