eos-todo
eos-todo copied to clipboard
Cannot retrieve data
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?
Same issue
Resolved. pass the contract name in your scope.
Can you give me an example to that in cleos?
cleos --wallet-url http://wallet:5555 -u http://server:7777 get table mynewaccount mynewaccount todos