Not able to see the deposit on my contract

Hi, I try my best to migrate the code from EOS 202 to the same style that the code on EOS 201, I think it is correct, after a lot of try and google, however I still not receiving the event to add the deposit to my new table.
I see the new table but the function pay seen to neve been called
void helloworld::pay(eosio::name from, eosio::name to, eosio::asset quantity, std::string memo)

I even try to add a log to see if the problem was on saving the value but the trigger never gets logged as well.
check(false, “notification handler triggered successfully”);

I add all my code into GitHub, you will find it here (https://github.com/ricknz01/eos_helloworld)

Thank you in advance

1 Like

Hey @ricknz, hope you are well.

Try change your pay function to ACTION here:
https://github.com/ricknz01/eos_helloworld/blob/main/include/helloworld.hpp

Also where it should be triggered? when adding a pet? or manually?

Carlos Z

Hey @thecil, according to the explanation it should not be an action it should be triggered when a transfer was done on the other token contract with the same coin, it is listening for an event from the other contract to update this contract.
I try the action as well and did not solve the problem.

1 Like

Yes, my bad, im trying to compile your contract with eosio, but i found a typo in helloworld.hpp check the first code lines.

image

Carlos Z

I have been trying to compile, but it does not work.

Are you able to compile it properly from your side? mine just got stuck compiling the wasm file :face_with_monocle:

In the past, when this happens to me, I tend to start removing functions, until I got the contract compiled successfully, could be great to do the same, might be a syntax error that we are not seeing.

Carlos Z

Hey @thecil thank you for the help!

It is really weird I can compile with both import statements, using <> and quotes “” but I have many times before were it says it compiles and did not really. However I deleted the wasm and abi files and they got recreated fine :frowning:

I’m not 100% sure this is how the code should look like tho, as I’m trying to upgrade to the latest version and use the hpp files what the instructor did not use.

Is there any updated repo for this code? I look the EOS docs and seems that may code is correct but I cannot make it work

1 Like

Problem could be that EOS 201 use a old version for the nodeos, so the problem is that EOS change their syntax long ago, so its a pain to migrate old contracts to the new syntax (which is the one explained in EOS 101).

So thats why i advice to go step by step with the migration, code a function, compile, if compile successfully, code another function and do the same process.

Carlos Z

Hey @thecil, as I said, it compiles and deploys fine for me, but I cannot see the token transactions.
There is no point in learning the old way of doing things, and I can adapt the code to the new version. I also read the whole documentation on the EOS website, and I cannot understand 2 things:

  1. why you cannot compile the code.
  2. why the code is not working as it follows the new docs

Would you guys at least be able to provide a new version of the code? I made a massive investment on this (much more than I should have done), and the first course I did was very basic, and the second I cannot get past the second chapter :frowning:

I also try to follow the EOS tutorial, but I get stuck on this error:

Error: readWasm failed:
0000000: error: unable to read uint32_t: magic

I didn’t even bode to ask as I already see a long discussion with no solution, I joined the Ivon on Tech thinking I would get answers and help solve these problems, but so far, I find out more things on my own than here.

1 Like

Hey @ricknz, hope you are ok.

Sorry for not being able, i tried with a different version for my eosio (actual one), but still not compiling, so i have started to deploy a new linux env for eos, ill be back to you the next days (2 tops).

Now I want to be honest with you, if you feel frustrated because this course, i could advice you (for your own time efficiency vs value), this course is kinda difficult cuz all this dumb issues, EOS Studio stop working online, installing it locally is a process, then dealing with the EOS syntax change that happens long ago, so the entire EOS course experience is quite frustrated.

I might suggest you to learn the Ethereum Programming courses, you will enjoy the journey much more than EOS, i know we have to update this course, but by now we are working hard to deploy the new Academy platform (which is coming soon).

Carlos Z