EOS coding, student looking for team mates

hello guys, would like to know if someone can help me with a little issue.

im trying to develop a simple EOS smart contract just to practice what i have learn in the course:

  • i want to create 2 or 3 tables, admin table (admin profile data), user table (admin can create users in this table) and user_alert table (user status alert “online/offline”, for log porpuses).
  • since dogcontract only use 1 table, im kinda lost on how i can connect others tables with a main table (admin), so every admin will have a bunch of users wich contain user profile data (like name, address, phone, job type), each user should have an status log (user_alert table) when theyr online and went offline.

any link u can provide to help me understand better how i can work with multiple tables would be appreciated. EOSIO https://developers.eos.io/ have a lot of data to read, but i cant find something to help me understand these issue, also most of the examples are kinda old for how eosio contracts can be coded now.

thank you guys!

Hi thecil.
Maybe this will help you?
(I don’t like the documentation setup for EOS, I find it hard to search and use, so I know how you feel. )

But I can recommend you to look at these links for some extra guidance on tables and structs in EOS.

One key thing to remember is that Tables in Eos is structured as/with a struct and syntax can look like this:

from the link above.

    struct [[eosio::table]] account {
        asset  balance;

        uint64_t primary_key()const { return balance.symbol.code().raw(); }

    struct [[eosio::table]] currency_stats {
        asset  supply;
        asset  max_supply;
        name   issuer;
        uint64_t primary_key()const { return supply.symbol.code().raw(); }

     typedef eosio::multi_index< "accounts"_n, account > accounts;
     typedef eosio::multi_index< "stat"_n, currency_stats > stats;

Here we are defining 2 structs eosio tables, one for keeping track of account balances, and another one for the currency stats with fields supply, max supply, and the name of the issuer.

We will use Multi index table structure to store the data for those 2 tables. Multi-Index Tables are a way to cache state and/or data in RAM for fast access. Multi-index tables support to create, read, update and delete (CRUD) operation.

I hope this helps you. :slightly_smiling_face:
If you have more questions, just tag my name, and I’ll help you.

Good luck…


1 Like

thank you @ivga80, has you can see on the dog improvements, im working on some examples for a more advance features, im dealing with vectors on a table, more problematic for me is the lack of real examples, outdated examples since they change the syntax, but still it is decent information what you bring to me, thank you for that.