日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

EOS 智能合约源代码解读 (9)boot合约

發布時間:2025/3/21 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 EOS 智能合约源代码解读 (9)boot合约 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

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合约的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。