3

I have attached Code and output. have a look on it.

This is output

Everything is working perfectly, the data is stored in it, smart contract deployed successfully, compilation and generation of Abi everything is okay but when I call "Cleos gettable" it returns table without any rows.

3
  • get table takes three arguments contract, scope, and ,table. Make sure you are passing everything correctly. Aug 6, 2018 at 9:13
  • 2
    Please post code and text in text form, not as pictures. The pictures are non-searchable, non-copy-pastable, and, in most cases, harder to read. All of which stands in the way of quality answers, let alone the question's continued usefulness.
    – Gassa
    Aug 6, 2018 at 9:22
  • Down voted. Please add code to support future readers.
    – Nat
    Aug 9, 2018 at 10:58

2 Answers 2

2

Although your code is not easy to read you should not post the images. But as far as I understand by your code you have a problem with scope, pass the correct scope while getting your table. I think you should get the table like this
cleos get table blessed blessed student
Usually, your scope is your account name by which you set the contract.

Have a look at this article: https://medium.com/coinmonks/how-to-use-table-information-on-eos-smart-contracts-de68f7231b62

1

Could you please share your abi file? I guess that your json property "tables": [..]" in abi file is empty.

One more thing: "//@abi table" should be changed to "//@abi table {name of the table} i64". That thing tells to compiler to add table to abi file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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