Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
contract_types.hpp
Go to the documentation of this file.
1#pragma once
2
5
6namespace sysio { namespace chain {
7
9
10struct newaccount {
15
17 return config::system_account_name;
18 }
19
21 return "newaccount"_n;
22 }
23};
24
25struct setcode {
30
32 return config::system_account_name;
33 }
34
36 return "setcode"_n;
37 }
38};
39
40struct setabi {
43
45 return config::system_account_name;
46 }
47
49 return "setabi"_n;
50 }
51};
52
53
54struct updateauth {
59
61 return config::system_account_name;
62 }
63
65 return "updateauth"_n;
66 }
67};
68
69struct deleteauth {
70 deleteauth() = default;
71 deleteauth(const account_name& account, const permission_name& permission)
72 :account(account), permission(permission)
73 {}
74
77
79 return config::system_account_name;
80 }
81
83 return "deleteauth"_n;
84 }
85};
86
87struct linkauth {
88 linkauth() = default;
89 linkauth(const account_name& account, const account_name& code, const action_name& type, const permission_name& requirement)
90 :account(account), code(code), type(type), requirement(requirement)
91 {}
92
97
99 return config::system_account_name;
100 }
101
103 return "linkauth"_n;
104 }
105};
106
108 unlinkauth() = default;
109 unlinkauth(const account_name& account, const account_name& code, const action_name& type)
110 :account(account), code(code), type(type)
111 {}
112
116
118 return config::system_account_name;
119 }
120
122 return "unlinkauth"_n;
123 }
124};
125
129
131 return config::system_account_name;
132 }
133
135 return "canceldelay"_n;
136 }
137};
138
139struct onerror {
142
143 onerror( uint128_t sid, const char* data, size_t len )
144 :sender_id(sid),sent_trx(data,data+len){}
145
147 return config::system_account_name;
148 }
149
151 return "onerror"_n;
152 }
153};
154
155} }
156
157FC_REFLECT( sysio::chain::newaccount , (creator)(name)(owner)(active) )
158FC_REFLECT( sysio::chain::setcode , (account)(vmtype)(vmversion)(code) )
159FC_REFLECT( sysio::chain::setabi , (account)(abi) )
160FC_REFLECT( sysio::chain::updateauth , (account)(permission)(parent)(auth) )
161FC_REFLECT( sysio::chain::deleteauth , (account)(permission) )
162FC_REFLECT( sysio::chain::linkauth , (account)(code)(type)(requirement) )
163FC_REFLECT( sysio::chain::unlinkauth , (account)(code)(type) )
164FC_REFLECT( sysio::chain::canceldelay , (canceling_auth)(trx_id) )
165FC_REFLECT( sysio::chain::onerror , (sender_id)(sent_trx) )
std::string name
sysio::chain::action_name action_name
unsigned __int128 uint128_t
Definition types.hpp:242
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
Definition reflect.hpp:311
unsigned char uint8_t
Definition stdint.h:124
transaction_id_type trx_id
static action_name get_name()
permission_level canceling_auth
static account_name get_account()
deleteauth(const account_name &account, const permission_name &permission)
static action_name get_name()
static account_name get_account()
linkauth(const account_name &account, const account_name &code, const action_name &type, const permission_name &requirement)
static action_name get_name()
static account_name get_account()
permission_name requirement
Immutable except for fc::from_variant.
Definition name.hpp:43
static account_name get_account()
static action_name get_name()
static action_name get_name()
static account_name get_account()
onerror(uint128_t sid, const char *data, size_t len)
static account_name get_account()
static action_name get_name()
static action_name get_name()
static account_name get_account()
static action_name get_name()
static account_name get_account()
unlinkauth(const account_name &account, const account_name &code, const action_name &type)
static account_name get_account()
static action_name get_name()
size_t len