forked from EOSLaoMao/BankofMemory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbankofmemory.hpp
40 lines (32 loc) · 948 Bytes
/
bankofmemory.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
39
40
/**
* @file bankofmemory.hpp
*/
#include <eosiolib/asset.hpp>
#include <eosiolib/eosio.hpp>
namespace bankofmemory {
static const account_name code_account = N(bankofmemory);
static const account_name tests_account = N(tests);
static const uint32_t board_len = 128;
/**
* @brief Data structure to hold offer information
*/
//@abi table tests i64
struct test {
uint64_t id;
uint64_t board[board_len];
auto primary_key() const { return id; }
EOSLIB_SERIALIZE( test, (id)(board) )
};
//@abi action
struct polute {
uint64_t num; // the size of memory you want to deposit, in KB
EOSLIB_SERIALIZE( polute, (num) )
};
//@abi action
struct release {
uint64_t num; // the size of memory you want to withdraw, in KB
EOSLIB_SERIALIZE( release, (num) )
};
//@abi table
typedef eosio::multi_index< tests_account, test > tests;
}