Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio.boot.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <sysio/crypto.hpp>
4#include <sysio/sysio.hpp>
5
6namespace sysioboot {
7
8 using sysio::action_wrapper;
9 using sysio::check;
10 using sysio::checksum256;
11 using sysio::ignore;
12 using sysio::name;
15
27
28 // explicit serialization macro is not necessary, used here only to improve compilation time
29 SYSLIB_SERIALIZE( permission_level_weight, (permission)(weight) )
30 };
31
37 struct key_weight {
40
41 // explicit serialization macro is not necessary, used here only to improve compilation time
42 SYSLIB_SERIALIZE( key_weight, (key)(weight) )
43 };
44
50 struct wait_weight {
53
54 // explicit serialization macro is not necessary, used here only to improve compilation time
55 SYSLIB_SERIALIZE( wait_weight, (wait_sec)(weight) )
56 };
57
67 struct authority {
69 std::vector<key_weight> keys;
70 std::vector<permission_level_weight> accounts;
71 std::vector<wait_weight> waits;
72
73 // explicit serialization macro is not necessary, used here only to improve compilation time
74 SYSLIB_SERIALIZE( authority, (threshold)(keys)(accounts)(waits) )
75 };
76
87 class [[sysio::contract("sysio.boot")]] boot : public sysio::contract {
88 public:
89 using contract::contract;
108 [[sysio::action]]
109 void newaccount( name creator,
110 name name,
111 ignore<authority> owner,
112 ignore<authority> active) {}
123 [[sysio::action]]
124 void updateauth( ignore<name> account,
125 ignore<name> permission,
126 ignore<name> parent,
127 ignore<authority> auth ) {}
128
137 [[sysio::action]]
138 void deleteauth( ignore<name> account,
139 ignore<name> permission ) {}
140
158 [[sysio::action]]
159 void linkauth( ignore<name> account,
160 ignore<name> code,
161 ignore<name> type,
162 ignore<name> requirement ) {}
163
173 [[sysio::action]]
174 void unlinkauth( ignore<name> account,
175 ignore<name> code,
176 ignore<name> type ) {}
177
186 [[sysio::action]]
187 void canceldelay( ignore<permission_level> canceling_auth, ignore<checksum256> trx_id ) {}
188
199 [[sysio::action]]
200 void setcode( name account, uint8_t vmtype, uint8_t vmversion, const std::vector<char>& code ) {}
201
210 [[sysio::action]]
211 void setabi( name account, const std::vector<char>& abi ) {}
212
225 [[sysio::action]]
226 void onerror( ignore<uint128_t> sender_id, ignore<std::vector<char>> sent_trx );
227
235 [[sysio::action]]
236 void activate( const sysio::checksum256& feature_digest );
237
245 [[sysio::action]]
246 void reqactivated( const sysio::checksum256& feature_digest );
247
248 using newaccount_action = action_wrapper<"newaccount"_n, &boot::newaccount>;
249 using updateauth_action = action_wrapper<"updateauth"_n, &boot::updateauth>;
250 using deleteauth_action = action_wrapper<"deleteauth"_n, &boot::deleteauth>;
251 using linkauth_action = action_wrapper<"linkauth"_n, &boot::linkauth>;
252 using unlinkauth_action = action_wrapper<"unlinkauth"_n, &boot::unlinkauth>;
253 using canceldelay_action = action_wrapper<"canceldelay"_n, &boot::canceldelay>;
254 using setcode_action = action_wrapper<"setcode"_n, &boot::setcode>;
255 using setabi_action = action_wrapper<"setabi"_n, &boot::setabi>;
256 using activate_action = action_wrapper<"activate"_n, &boot::activate>;
257 using reqactivated_action = action_wrapper<"reqactivated"_n, &boot::reqactivated>;
258 };
259 // end of @defgroup sysioboot sysio.boot
260}
contains only the public point of an elliptic curve key.
action_wrapper<"canceldelay"_n, &boot::canceldelay > canceldelay_action
action_wrapper<"setabi"_n, &boot::setabi > setabi_action
action_wrapper<"updateauth"_n, &boot::updateauth > updateauth_action
action_wrapper<"reqactivated"_n, &boot::reqactivated > reqactivated_action
void canceldelay(ignore< permission_level > canceling_auth, ignore< checksum256 > trx_id)
void newaccount(name creator, name name, ignore< authority > owner, ignore< authority > active)
void setcode(name account, uint8_t vmtype, uint8_t vmversion, const std::vector< char > &code)
void setabi(name account, const std::vector< char > &abi)
action_wrapper<"setcode"_n, &boot::setcode > setcode_action
action_wrapper<"linkauth"_n, &boot::linkauth > linkauth_action
action_wrapper<"deleteauth"_n, &boot::deleteauth > deleteauth_action
void linkauth(ignore< name > account, ignore< name > code, ignore< name > type, ignore< name > requirement)
action_wrapper<"activate"_n, &boot::activate > activate_action
void unlinkauth(ignore< name > account, ignore< name > code, ignore< name > type)
void deleteauth(ignore< name > account, ignore< name > permission)
action_wrapper<"unlinkauth"_n, &boot::unlinkauth > unlinkauth_action
action_wrapper<"newaccount"_n, &boot::newaccount > newaccount_action
void updateauth(ignore< name > account, ignore< name > permission, ignore< name > parent, ignore< authority > auth)
unsigned short uint16_t
Definition stdint.h:125
unsigned int uint32_t
Definition stdint.h:126
unsigned char uint8_t
Definition stdint.h:124
Immutable except for fc::from_variant.
Definition name.hpp:43
std::vector< wait_weight > waits
std::vector< key_weight > keys
std::vector< permission_level_weight > accounts
sysio::public_key key