Inline Actions - Discussion

Indeed, there is some changes between the EOS 101 contract and EOS 201 contract, we should include again the definition for both, i will notify about this to Filip and Ivan, let see if we include again those videos on EOS 201. Thanks for notifying it.

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

Carlos Z.

in the video filip uses a dogcontract but it wasnā€™t done in eos 101ā€¦at least not in the new version. Where can I find it? and how is it possible to see the old course 101?

thanks

2 Likes

Hi @enrico, hope your are well.

Sadly we canā€™t re-upload the old videos, but you can go into Filip EOS repository and check the code from there: https://github.com/filipmartinsson/eos-programming

I suggest you to use that repository as guide line, try to understand quite well the videos and not just copy/paste the code, I know it can be confusing the different contracts that are being programmed.

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

Carlos Z.

The EOS 101 to 201 is a really big mess to do after the update, the advanced course is outdated. Itā€™s very inconvenient and impractical to follow along that I contemplate whether or not itā€™s even worth the hassle doing the course, especially considering EOS :tired_face:

2 Likes

Hi @Jesal_Patel, hope you are great, sadly is true, updating the EOS 101 made EOS 201 a little bit hard to follow, we will be updating the EOS 201 in a future, but for now is hard to keep it updated, because the EOS syntax is changing so much since the beginning of the course.

We have updated the Ethereum Smart Contract Programming 101 to a new solidity version, a couple of week after launching the course, a new version of solidity came out :face_with_monocle:, and we are already working on updating the Ethereum Prog 201.

Carlos Z

Would appreciate if you could get in touch with @filip / @ivan to get an estimate on when the 201 course could be updated by.

In the meantime, I will skip the EOS 201 course and move on to my final study plan course, DeFi 201. I think I will undertake a different course within the academy so I can come up with an idea for Project 2 of my plan.

Thanks

1 Like

I also noticed the big change in code from the EOS 101 to the EOS 201 course.

I thought it might not be much of a problem. I think I found the original source, but if itā€™s not you can have a look for yourself.

However, reading these comments, I see that the EOS syntax has changed a lot from what was used in the video. I donā€™t think Iā€™m yet good enough of a programmer to be able to mix & match old & new code & syntax using the documentation. So I think Iā€™ll also carry on with the next course.

I suppose thatā€™s a downside of working in a new, emerging, fast-paced industry: you have to be equally fast updating educational resources (I realise concepts can carry over). No worries, though. Thereā€™s still a lot for me to learn in the academy.

2 Likes

Hello everyone!
Iā€™m pretty new in EOS smart contract programming.
Iā€™m going trough SC201 course and Iā€™m facing following issue with withdraw action:

I compile and deploy eosio.token contract to boni.token account.
I wrote simple test token smart contract and deploy it to boni and ira accounts.
(two actions in it:
ACTION deposit (name from, name to, eosio::asset quantity, string memo)
ACTION withdraw (name from, name to, eosio::asset quantity, string memo)

Everything with deposit action is fine and it works.
I grant permissions like that
cleos set account permission boni.token boni --add-code

and when Iā€™m try to push my action, I received following error:

Bonis-MacBook-Air:testtoken boniradev$ cleos push action boni withdraw ā€˜[ ā€œboniā€, ā€œiraā€, ā€œ15.00 GENā€, ā€œwithdrawā€ ]ā€™ -p boni@active

Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations

Ensure that you have the related private keys inside your wallet and your wallet is unlocked.

Error Details:

transaction declares authority ā€˜{ā€œactorā€:ā€œiraā€,ā€œpermissionā€:ā€œactiveā€}ā€™, but does not have signatures for it under a provided delay of 0 ms, provided permissions [{ā€œactorā€:ā€œboniā€,ā€œpermissionā€:ā€œeosio.codeā€}], provided keys [], and a delay max limit of 3888000000 ms

Can someone suggest me what I miss and where Iā€™m wrong, please.

Thank you in advance!

1 Like

Hey @boni, hope you are well.

Probably you just forgot to add the permissions to that account. Take a look into my github repo which you can use as guideline on how to run properly you contract using eosio :nerd_face:
https://github.com/thecil/EOSCoding/blob/master/EOSIO%20CLI%20commands.md#set-permissions

Carlos Z

Thank you very much for advice and link.
I made everything like is shown there, but when Iā€™m trying to push withdraw action, Iā€™m receiving the same error.

My EOSIO.token account permissions are as follow:

Bonis-MacBook-Air:eosio.msig boniradev$ cleos get account eosio.token
created: 2021-08-20T13:39:36.500
permissions:
owner 1: 1 EOS7R8AgiY9Kp44JSDq8CGpMXgPyPgQSmoSCe5wsEy1zRWwnrW8Ak
active 1: 1 EOS7R8AgiY9Kp44JSDq8CGpMXgPyPgQSmoSCe5wsEy1zRWwnrW8Ak
boni 1: 1 [email protected]
ira 1: 1 [email protected]
memory:
quota: unlimited used: 481.5 KiB

net bandwidth:
used: unlimited
available: unlimited
limit: unlimited

cpu bandwidth:
used: unlimited
available: unlimited
limit: unlimited

and when I push my action, Iā€™m receiving following error:

Bonis-MacBook-Air:testtoken boniradev$ cleos push action boni withdraw ā€˜[ ā€œboniā€, ā€œiraā€, ā€œ15.00 TESTCNā€, ā€œwithdrawā€ ]ā€™ -p boni@active

Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations

Ensure that you have the related private keys inside your wallet and your wallet is unlocked.

Error Details:

transaction declares authority ā€˜{ā€œactorā€:ā€œiraā€,ā€œpermissionā€:ā€œactiveā€}ā€™, but does not have signatures for it under a provided delay of 0 ms, provided permissions [{ā€œactorā€:ā€œboniā€,ā€œpermissionā€:ā€œeosio.codeā€}], provided keys [], and a delay max limit of 3888000000 ms

My withdraw action code is as follow:

ACTION withdraw (name from, name to, eosio::asset quantity, string memo) {
  accountst accTable(get_self(), get_self().value);
  auto itr = accTable.find(to.value);
  if (itr == accTable.end()) {
    print ("There is'n such deposti!");
  } else {
    print("trace: ", get_self());
    action (
      permission_level{get_self(), "active"_n},
      "eosio.token"_n,
      "transfer"_n,
      std::make_tuple(from, to, quantity, std::string(memo))
    ).send();

    accTable.modify(itr, get_self(), [&](auto& new_row){
      new_row.total -= quantity.amount / 100;
    });
    // using send = action_wrapper<"withdraw"_n, &testtoken::withdraw>;
    // send {"testtoken"_n, {get_self(), "active"_n}}.send(from, to, quantity, memo);

  }
}

I still am making something wrong ā€¦

1 Like

Thanks for priceless advices! I finally got managed to run inline actions!
There was my mistake setting permissions to my test accounts.
Thank you again!

1 Like

i get this when i try to install the contract part of eosio. I am installing on windows 10.

image

any suggestions? someone told me that it works on windows. I am on the part where learn about eosio.token and trying to do that project but it says to install contracts. but this is what i get when i try to install v1.92.

Got it working! I had to reinstall eosio