1. 作用

激活 protocol features 性质
activating desired protocol features prior to deploying a system contract

    * eossys.boot is a extremely minimalistic system contract that only supports the native actions and an* activate action that allows activating desired protocol features prior to deploying a system contract* with more features such as eossys.bios or eossys.system.struct permission_level_weight {permission_level  permission;uint16_t          weight;// explicit serialization macro is not necessary, used here only to improve compilation timeeosLIB_SERIALIZE( permission_level_weight, (permission)(weight) )};/*** Weighted key.** @details A weighted key is defined by a public key and an associated weight.*/struct key_weight {eossys::public_key  key;uint16_t           weight;// explicit serialization macro is not necessary, used here only to improve compilation timeeosLIB_SERIALIZE( key_weight, (key)(weight) )};/*** Wait weight.** @details A wait weight is defined by a number of seconds to wait for and a weight.*/struct wait_weight {uint32_t           wait_sec;uint16_t           weight;// explicit serialization macro is not necessary, used here only to improve compilation timeeosLIB_SERIALIZE( wait_weight, (wait_sec)(weight) )};/*** Blockchain authority.** @details An authority is defined by:* - a vector of key_weights (a key_weight is a public key plus a weight),* - a vector of permission_level_weights, (a permission_level is an account name plus a permission name)* - a vector of wait_weights (a wait_weight is defined by a number of seconds to wait and a weight)* - a threshold value*/struct authority {uint32_t                              threshold = 0;std::vector<key_weight>               keys;std::vector<permission_level_weight>  accounts;std::vector<wait_weight>              waits;// explicit serialization macro is not necessary, used here only to improve compilation timeeosLIB_SERIALIZE( authority, (threshold)(keys)(accounts)(waits) )};/*** @defgroup eossysboot eossys.boot* @ingroup eossyscontracts** eossys.boot is a extremely minimalistic system contract that only supports the native actions and an* activate action that allows activating desired protocol features prior to deploying a system contract* with more features such as eossys.bios or eossys.system.** @{*/class [[eossys::contract("eossys.boot")]] boot : public eossys::contract {public:using contract::contract;/*** On error action.** @details Notification of this action is delivered to the sender of a deferred transaction* when an objective error occurs while executing the deferred transaction.* This action is not meant to be called directly.** @param sender_id - the id for the deferred transaction chosen by the sender,* @param sent_trx - the deferred transaction that failed.*/[[eossys::action]]void onerror( ignore<uint128_t> sender_id, ignore<std::vector<char>> sent_trx );/*** Activates a protocol feature.** @details Activates a protocol feature** @param feature_digest - hash of the protocol feature to activate.*/[[eossys::action]]void activate( const eossys::checksum256& feature_digest );/*** Asserts that a protocol feature has been activated.** @details Asserts that a protocol feature has been activated** @param feature_digest - hash of the protocol feature to check for activation.*/[[eossys::action]]void reqactivated( const eossys::checksum256& feature_digest );
}

EOS 智能合约源代码解读 (9)boot合约相关推荐

  1. EOS 智能合约源代码解读 (1)总体说明

    1. 基本定义 在eos私有节点操作中,我们通常是一个合约对应一个合约账户,并且一个账户中只能部署一个智能合约.如果在同一个账户部署多个合约,那么最后部署的合约会覆盖掉之前的合约.每个帐户都至少链接到 ...

  2. EOS 智能合约源代码解读 (11)wrap合约“action_wrapper类”

    1. 功能 对于许多用例,需要从合同代码向另一个合同发送新操作.这是合同之间能够积极沟通的唯一途径.它为特定智能合约代码的特定操作创建"操作模板",然后可使用该模板来调用此操作. ...

  3. EOS 智能合约源代码解读 (7)合约开发示例

    官方提供了一个工具eosiocpp,它可以按照固定的模板创建一个新的智能合约.eosiocpp可以创建2个合约文件(曾经是三个文件),它们仅仅包含了合约的框架. 1. HelloWorld合约代码如下 ...

  4. EOS 智能合约源代码解读 (10)token合约“几种关键操作”

    1. create:负责创建资产 void token::create( const text_name& issuer, const asset& maximum_supply) { ...

  5. EOS 智能合约源代码解读 (6)合约之action

    1. 动作 ( action ) 是 EOS 合约的灵魂,是 EOS 的基础组成单位 1.1 一个动作就是一个公开的 ( pubic ) 的 C++ 类的成员方法 必须使用 [[eosio::acti ...

  6. EOS 智能合约源代码解读 (5)class contract

    1. 所有合约的基类 #define CONTRACT class [[eosio::contract]] // 合约 #define ACTION [[eosio::action]] //动作 #d ...

  7. EOS 智能合约源代码解读 (3)asset.hpp

    1. 合约中关于资产的数据结构的定义 输入字符串: "10.0000 CUR" 输出:amount = 10, symbol(4,"CUR") /**asset ...

  8. EOS 智能合约源代码解读 (14)system合约“exchange_state.hpp”

    1. 使用bancor数学创建一个在两种资产类型中的50/50的中继 namespace eosiosystem {using eosio::asset;using eosio::symbol;typ ...

  9. EOS 智能合约源代码解读 (10)token合约“简介”

    1. 记录用户的token,比如有哪些代币 class [[eosio::contract("eosio.token")]] token : public contract {pu ...

最新文章

  1. PHP一些十分严重的缺陷
  2. 处理器仿存带宽_linux服务器CPU内存硬盘读写带宽等性能测试方法
  3. 《1024伐木累》-宝贝儿,可不可以
  4. wxWidgets:wxStaticLine类用法
  5. Android 省,市,区选择权
  6. centos6 nodejs 安装测试
  7. Python_list部分功能介绍
  8. 常用正则表达式锦集与Python中正则表达式的用法
  9. 前端三大框架Angular React Vue
  10. python怎么复数乘方开方_孩子数学不好怎么办?怎样让孩子学好数学的方法
  11. Star-shaped polygon
  12. android 加载第三方so文件,Uni-app 以Module方式开发Android插件,引入第三方资源包so文件,但无法读取...
  13. 天翼云为欧拉社区贡献首个C++热补丁 加速推进联创技术落地应用
  14. 纽约州立计算机科学,SBU的CS「纽约州立大学石溪分校计算机科学专业」
  15. 物联网云平台系统设计【一】
  16. 莱西姆大学计算机专业,菲律宾的大学排名是根据什么指标排的
  17. Android耳机耳机,Android 耳机插拔流程源码跟踪浅析
  18. 什么是pv和uv? pv、uv
  19. 在VisualBasic6.0中实现0.5数值修约
  20. 用java编码图书查询系统_用java做的一个图书管理系统的源代码

热门文章

  1. SpringBoot+Vue视频干货
  2. java jmail_java jmail
  3. php图书信息浏览器,使PHP即时输出结果到浏览器
  4. 塞内加尔将于5月启用全国首个大型数据中心
  5. 数据中心机房供电需求有哪些?存在哪些电能质量问题?
  6. 小型数据中心规划和设计原则
  7. 成功解决ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C h
  8. 成功解决Error while trying to retrieve text for error ORA-12154
  9. Py之imblearn:imblearn/imbalanced-learn库的简介、安装、使用方法之详细攻略
  10. 成功解决FileNotFoundError: [WinError 2] 系统找不到指定的文件。