External Contracts - following along

Hi there FAO Philip/Others,

Guys/Philip pls help to make this easier for future videos.

I see that other people also may be struggling step-by-step typing along and following these tutorials where Philip makes a really quick (seemingly easy right!) Remix selection, or where his code (it’s a miracle! LOL) compiled already…

Here are 3 screen-shots;

  1. Philip’s video & code with his syntax which is exactly the same as mine
  2. screenshot of my Remix throws an error with the code line 45
    " govermentInstance.addTransaction(msg.sender, recipient, amount); "
  3. I thought perhaps it’s because the case doesn’t match, so I changed it to upper-case “G” at the front
    " GovermentInstance.addTransaction(msg.sender, recipient, amount); "
    still no luck!

These things makes it takes hours (for me sometimes) who wants to “get it right” and still something isn’t compiling but I am NOT any kinda expert on Remix…pls help?

1 Like

Hey @DeuxeMM, hope you are well.

You have mistype the “GovernmentInterface” keyword, (you wrote Gorverment).

Check it and let us know if you fix it :nerd_face:

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

Hi Carlos, thanks my friend for such prompt response!
Appreciated.

That’s embarrassing…oops! You are correct.
Also just small point is, in Philip’s video, shows lower-case ‘G’. Which also threw me off because the error message is a bit vague.

So that piece is working now which is great, however another step along (problemo);

  • I choose a different address to deposit, as shown
    0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db 1000000000000000000

  • and hit ‘transfer’ it throws an error for BOTH formats, quotes and without.
    “0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db 1000000000000000000”

should the format to input an address and ETH value rather be;
“0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db” “1000000000000000000”
??
but this also threw an error.

I apologize for all these little things but “new everything” to me, syntax, IDE, vocabulary, and trying to follow Philip on my small laptop screen, all makes this a bit frustratin…LOL

Am so close to this working and important to get it working 100% to remove any doubt because I will need to go over all this again a few times.

1 Like

You can also use the uprrow buttton to show the list of input fields of the function, then you can just assign the proper values without quotes.

Also you hare hitting a revert becase your function have a require that ask if the balance of msg.sender is enough to cover the transfer, which is not the case, because you deposit with another account, meaning that each account can only transfer the amount that they deposit.

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.