eos icon indicating copy to clipboard operation
eos copied to clipboard

hello.abi is wrong

Open OuterSpaceTears opened this issue 8 years ago • 6 comments

feng@feng-B250-HD3P:~/workSpace/eos/build/contracts/hello$ eosiocpp -o hello.wast hello.cpp

hello.cpp `#include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> using namespace eosio;

class hello : public eosio::contract { public: using contract::contract;

  /// @abi action  
  void hi( account_name user ) { 
     print( "Hello, ", name{user} ); 
  } 

};

EOSIO_ABI( hello, (hi) ) `

hello.abi { "types": [], "structs": [], "actions": [], "tables": [] } @bytemaster
Can you help me?Thank you very much.

OuterSpaceTears avatar Apr 02 '18 10:04 OuterSpaceTears

@OuterSpaceTears how are you generating the ABI file? Which OS are you using?

elmato avatar Apr 02 '18 15:04 elmato

@elmato I get the same thing and I’m on Ubuntu 17.10 x64

ZeroPointThree17 avatar Apr 03 '18 00:04 ZeroPointThree17

Can you paste the command you are using to generate hello.abi and the output it gives?

elmato avatar Apr 03 '18 00:04 elmato

I needed to sudo make install on the eos/build dir and tried generating the abi again and it worked! Thanks @elmato for helping me find what the issue was.

ZeroPointThree17 avatar Apr 03 '18 01:04 ZeroPointThree17

@OuterSpaceTears looking at the empty ABI file format, it seems that you are using an older version of the abi generator (eosio-abigen) which is called by eosiocpp.

Make sure you are doing make install after building the project.

elmato avatar Apr 03 '18 01:04 elmato

I implemented./eos_build.sh, did not execute sudo make install, and solved this problem through sudo make install. Thank you very much. @elmato

OuterSpaceTears avatar Apr 03 '18 02:04 OuterSpaceTears