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

Upload the "hello world" contract, there is an error #1236

Closed
xuwei2014 opened this issue Jan 29, 2018 · 4 comments
Closed

Upload the "hello world" contract, there is an error #1236

xuwei2014 opened this issue Jan 29, 2018 · 4 comments
Milestone

Comments

@xuwei2014
Copy link

Hi there,
I use the command "eoscpp -n hello" to create a contract. And then upload the contract, there is an error like the following:

eosioc set contract hello hello.wast hello.abi
Reading WAST...
Assembling WASM...
766020ms thread-0 main.cpp:1209 main ] Failed with error: Bad Cast (7)
Invalid cast from object_type to Array

Please help me to look at it.
Thanks.

@ThePrimeagen
Copy link
Contributor

I am experiencing the same thing. I get to the assembly part and boom.

@ThePrimeagen
Copy link
Contributor

ThePrimeagen commented Jan 29, 2018

From the Telegram Channel:

  1. Produce the abi file
path/to/eoscpp -g hello.abi hello.hpp
  1. Then recompile the contract
/path/to/eoscpp -o hello.wast hello.cpp
  1. Set the contract
eosioc set contract hello hello.wast hello.abi

@ThePrimeagen
Copy link
Contributor

@xuwei2014 there also seems to be issues with the other contracts on master at this time (of commenting). The recommended path, again, at this time, is to use dawn-2.x for dev.

Things will change, but not so wild as to losing any learnings along the way. Only the internal libs may change. Like I see a big change in eoslib/token, but I am sure it will make more sense once dawn 3.0.x is in a better place.

@xuwei2014
Copy link
Author

@michaelbpaulson thank you for you help. Your suggestion makes sense for me. I will use the recommended path:)

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