New hello world example compiling but throwing error when pushing to it
Following tutorial here: https://github.com/EOSIO/eos/blob/master/TUTORIAL.md
Following tutorial from top to bottom, but am stuck on this step:
root@ubuntu-c-4-8gib-nyc3-01:~/eos/contracts/hello# cleos push action hello.code hi '["user"]' -p user
Error 3030000: transaction validation exception
Ensure that your transaction satisfy the contract's constraint!
Error Details:
size > 0:
My hello.cpp is as follows:
#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) )
Made sure hello.code, user users exist, as they are created while following the tutorial (among the many other steps taken in the tutorial, which I also performed). Made sure eosiocpp generated the wast and abi and deployed the contract as in the tutorial. No issues at all until this step.
This is on the master branch cloned as of 1 hour ago.
Can you provide the every steps you have done ? and give some results for under questions:
first: try ~/eos/contracts/hello# cleos push action hello.code hi '["user"]' --permission hello.code@active
- cleos wallet open && cleos wallet list && unlock your account
- cleos get code ${yours}
@WildDylan
This was related to: https://github.com/EOSIO/eos/issues/2029
After fixing that issue, my abi generated correctly. I then added another print statement in hello.cpp so that it could be considered a change in code (otherwise it wouldnt let me redeploy if the code hadn't changed). I was able to redeploy and push a message to the contract.
Closing this issue as my problem is now fixed.