I'm having a hard time getting eosjs signatures to pass. When I attempt to look at transactions the "data" turns up empty so I can't check my syntax, and I'm not sure if transaction digests in eosiod are being done correctly. Please review:
digest_type transaction::sig_digest( const chain_id_type& chain_id )const {
digest_type::encoder enc;
fc::raw::pack( enc, chain_id );
fc::raw::pack( enc, *this );
wdump((*this)); // <== Added for testing
return enc.result();
}
At the very end, "data": "" is empty:
52302ms thread-0 transaction.cpp:72 sig_digest ] *this: {"expiration":"2018-03-06T16:01:22","region":0,"ref_block_num":6259,"ref_block_prefix":3156406826,"packed_bandwidth_words":0,"context_free_cpu_bandwidth":0,"context_free_actions":[],"actions":[{"account":"eosio","name":"transfer","authorization":[{"actor":"inita","permission":"active"}],"data":""}]}
52303ms thread-0 transaction.cpp:71 sig_digest ] chain_id: 0000000000000000000000000000000000000000000000000000000000000000
52303ms thread-0 transaction.cpp:72 sig_digest ] *this: {"expiration":"2018-03-06T16:01:22","region":0,"ref_block_num":6259,"ref_block_prefix":3156406826,"packed_bandwidth_words":0,"context_free_cpu_bandwidth":0,"context_free_actions":[],"actions":[{"account":"eosio","name":"transfer","authorization":[{"actor":"inita","permission":"active"}],"data":""}]}
Is dawn3 including each actions' data in the digest that is getting signed?
This transaction was sent as follows:
./eosioc transfer inita exchange 1
i am having the same issue 👍
@jcalfee the reason is because eosio has not loaded by default the eosio.system contract (I guess they are working in that change).
To be able to work for now:
eosiocpp -o eosio.system.wast eosio.system.cpp
eosioc set contract eosio eosio.system.wast eosio.system.abi
eosioc push action eosio issue '{"to":"eosio", "quantity":"1000.0000 EOS" }' -p eosio@active
After that transfer will work fine:
eosioc transfer eosio crowdsale 1
"data": {
"from": "eosio",
"to": "crowdsale",
"quantity": "0.0001 EOS",
"memo": ""
},
kudos to @elmato :)
Most helpful comment
@jcalfee the reason is because eosio has not loaded by default the eosio.system contract (I guess they are working in that change).
To be able to work for now:
eosiocpp -o eosio.system.wast eosio.system.cpp
eosioc set contract eosio eosio.system.wast eosio.system.abi
eosioc push action eosio issue '{"to":"eosio", "quantity":"1000.0000 EOS" }' -p eosio@active
After that transfer will work fine:
eosioc transfer eosio crowdsale 1
kudos to @elmato :)