eos-todo icon indicating copy to clipboard operation
eos-todo copied to clipboard

Cannot retrieve data

Open Velua opened this issue 7 years ago • 4 comments

Deployed this contract twice now off two fresh EOS blockchains in my dev environment.

I've deployed the contract and can run commands against it like so

cleos --wallet-url http://wallet:5555 -u http://server:7777 push action mynewaccount create '["mynewaccount", 5, "hello world"]' -p mynewaccount
executed transaction: 2771bc6afe6a0d658b6ce8f461bce18782cc3f1b936d74a14afd4dbffa95c00e  120 bytes  317 us
#  mynewaccount <= mynewaccount::create         {"author":"mynewaccount","id":5,"description":"hello world"}
>> todo#5 created
warning: transaction executed locally, but may not be confirmed by the network yet

And should I try store another todo with the same ID I get this error

cleos --wallet-url http://wallet:5555 -u http://server:7777 push action mynewaccount create '["mynewaccount", 5, "hello world"]' -p mynewaccount
2382154ms thread-0   main.cpp:2350                 main                 ] Failed with error: could not insert object, most likely a uniqueness constraint was violated (13)
could not insert object, most likely a uniqueness constraint was violated: 

Yet when I go to retrieve the data with

cleos --wallet-url http://wallet:5555 -u http://server:7777 get table mynewaccount todo todos{
  "rows": [],
  "more": false
}

it returns no rows, I can even run the destroy command against the element, and create a new element with the same ID, so it's being stored somewhere? Anyone else have this issue?

Velua avatar May 22 '18 00:05 Velua

Same issue

rajatch80 avatar Aug 07 '18 13:08 rajatch80

Resolved. pass the contract name in your scope.

rajatch80 avatar Aug 07 '18 13:08 rajatch80

Can you give me an example to that in cleos?

Velua avatar Aug 20 '18 23:08 Velua

cleos --wallet-url http://wallet:5555 -u http://server:7777 get table mynewaccount mynewaccount todos

rajatch80 avatar Aug 21 '18 03:08 rajatch80