Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

questions about "hello world" tutorial #3473

Closed
jeaimetu opened this issue May 28, 2018 · 4 comments
Closed

questions about "hello world" tutorial #3473

jeaimetu opened this issue May 28, 2018 · 4 comments

Comments

@jeaimetu
Copy link

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.

  1. 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": "
.........
"

  1. 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?

  1. 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.

@njappboy
Copy link

njappboy commented May 28, 2018

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.

@jeaimetu
Copy link
Author

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.

@docsewell
Copy link

Try adding:
--contracts-console
To your block producer and see if that fixes it.

@jeaimetu
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants