3

I have just started testing with accounts and I have now this working -

cleos get accounts EOS7UBaMK1Nm7ASLBFoHueYtp3YnnH4kEMdbeep7vxtASgHnctupE

{ "account_names": [ "trevoro2" ] }

I created this using a create method -

cleos create account eosio trevoro2 EOS7UBaMK1Nm7ASLBFoHueYtp3YnnH4kEMdbeep7vxtASgHnctupE EOS7UBaMK1Nm7ASLBFoHueYtp3YnnH4kEMdbeep7vxtASgHnctupE

executed transaction: c96905dee9a9652c8190f2d2bd5221bb0ac65a06b4381451107221c1076c91a8 200 bytes 406 us eosio <= eosio::newaccount {"creator":"eosio","name":"trevoro2","owner":{"threshold":1,"keys":[{"key":"EOS7UBaMK1Nm7ASLBFoHueYt... warning: transaction executed locally, but may not be confirmed by the network yet ]

In Ethereum I used to check pendingTransactions and getTransactionReceipts. Is there anything similar in EOS? I want to check the txn hash which is generated to see exactly what it has created.

I guess I am seeking something like the geth web3 tools which enable a lot of functionality to check txns.

2

From eosjs module

You can use eosjs node module to get tx status

 var txDetail = await eos.getTransaction(req.params.txid);
 console.log(txDetail.trx.receipt.status)

From command line using cleos

You can use cleos to get transaction details, and then use trx.receipt.status to check the status of your transaction

cleos get transaction txHash

But do not forget to run nodeos with history plugin

nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin 
| improve this answer | |
  • Thanks. I will test now. I have to work out how to run nodeos from Docker. I have a docker installation. – Trevor Lee Oakley Aug 9 '18 at 10:13
  • Any idea what this could be - cleos get transaction c96905dee9a9652c8190f2d2bd5221bb0ac65a06b4381451107221c1076c91a8 Error 3200006: invalid http request Error Details: The server has rejected the request as invalid! Please verify this url is valid: nodeosd:8888/v1/history/get_transaction If the condition persists, please contact the RPC server administrator for nodeosd! – Trevor Lee Oakley Aug 9 '18 at 13:39
  • I guess you may not be running nodeos with history plugin. Is this issue coming for all txs or specific ones? – Prashant Prabhakar Singh Aug 10 '18 at 1:40
  • All txns. I got stuck on this. I raised a query in github as an issue. The docker compose file must be wrong. – Trevor Lee Oakley Aug 10 '18 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.