-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathfio.tpid.hpp
38 lines (30 loc) · 944 Bytes
/
fio.tpid.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/** FioTPID implementation file
* Description:
* @author Adam Androulidakis
* @modifedby
* @file fio.tpid.cpp
* @license FIO Foundation ( https://github.com/fioprotocol/fio/blob/master/LICENSE ) Dapix
*/
#pragma once
#include <fio.common/fio.common.hpp>
#include <fio.address/fio.address.hpp>
#include <string>
#include <eosiolib/eosio.hpp>
#include <eosiolib/asset.hpp>
namespace fioio {
using namespace eosio;
// @abi table tpids i64
struct [[eosio::action]] tpid {
uint64_t id;
uint128_t fioaddhash;
string fioaddress;
uint64_t rewards;
uint64_t primary_key() const { return id; }
uint128_t by_name() const { return fioaddhash; }
EOSLIB_SERIALIZE(tpid, (id)(fioaddhash)(fioaddress)(rewards)
)
};
typedef multi_index<"tpids"_n, tpid,
indexed_by<"byname"_n, const_mem_fun < tpid, uint128_t, &tpid::by_name>>>
tpids_table;
}