云算力质押挖矿开发逻辑云算力质押挖矿开发详情源码
云算力是一种基于云计算技术的计算服务, 令 用户可以通过云算力服务来获取更大的计算能力 。与传统挖矿不同,云算力挖矿不需要用户自行购买或租赁挖矿硬件设备,而是通过使用云算力平台提供的算力服务,从而实现挖矿收益的获取 。开发详情v【wwqqyy420】
1.native类
//system_contract合约类继承于native,
class[[eosio::contract("eosio.system")]]system_contract:public native
//native合约类继承于eosio::contract
class[[eosio::contract("eosio.system")]]native:public eosio::contract
//权限等级权重
struct permission_level_weight{
permission_level permission;
uint16_t weight;//16位的无符整型类型的权重。
EOSLIB_SERIALIZE(permission_level_weight,(permission)(weight))
};关于区块链项目技术开发:【wwqqyy420】,代币发行、dapp智能合约开发、链游开发、多链钱包开发
交易所开发、量化合约开发、互助游戏开发、Nft数字藏品开发、众筹互助开发、元宇宙开发、swap开发、
链上合约开发、ido开发、商城开发等,开发过各种各样的系统模式,更有多种模式、制度、案例、后台等,成熟技术团队,欢迎实体参考。
//permission_level:类型的对象permission,通过一个账户名以及其权限名构建的,例如{"useraaaaaaaa","active"},这样的一个组合构成了一个权限对象。
//公钥权重
struct key_weight{
eosio::public_key key;//公钥对象
uint16_t weight;
EOSLIB_SERIALIZE(key_weight,(key)(weight))
};
//等待权重
struct wait_weight{
uint32_t wait_sec;
uint16_t weight;
EOSLIB_SERIALIZE(wait_weight,(wait_sec)(weight))
};
//权力
//authority指有权利的人。
//permission指某项许可。所以某人需要拥有很多别人授权的许可,才能称之为有权利的人。
struct authority{
uint32_t threshold=0;//阈值
std::vector<key_weight>keys;//多个密钥
std::vector<permission_level_weight>accounts;//多个权限
std::vector<wait_weight>waits;//多个等待
EOSLIB_SERIALIZE(authority,(threshold)(keys)(accounts)(waits))
};
/**区块头
*Blockchain block header.
*
*A block header is defined by:
*-a timestamp,
*-the maker that created it,
*-a confirmed flag default as zero,
*-a link to previous block,
*-a link to the transaction merkel root,
*-a link to action root,
*-a schedule version,
*-and a makers'schedule.
*/
struct block_header{
checksum256 previous;
uint32_t timestamp;
text_name maker;
uint16_t confirmed=0;
checksum256 transaction_mroot;
checksum256 action_mroot;
uint32_t schedule_version=0;
std::optional<eossys::maker_schedule>new_makers;
//explicit serialization macro is not necessary,used here only to improve compilation time
eosLIB_SERIALIZE(block_header,(previous)(timestamp)(maker)(confirmed)(transaction_mroot)(action_mroot)
(schedule_version)(new_makers))
1.native类
//system_contract合约类继承于native,
class[[eosio::contract("eosio.system")]]system_contract:public native
//native合约类继承于eosio::contract
class[[eosio::contract("eosio.system")]]native:public eosio::contract
//权限等级权重
struct permission_level_weight{
permission_level permission;
uint16_t weight;//16位的无符整型类型的权重。
EOSLIB_SERIALIZE(permission_level_weight,(permission)(weight))
};关于区块链项目技术开发:【wwqqyy420】,代币发行、dapp智能合约开发、链游开发、多链钱包开发
交易所开发、量化合约开发、互助游戏开发、Nft数字藏品开发、众筹互助开发、元宇宙开发、swap开发、
链上合约开发、ido开发、商城开发等,开发过各种各样的系统模式,更有多种模式、制度、案例、后台等,成熟技术团队,欢迎实体参考。
//permission_level:类型的对象permission,通过一个账户名以及其权限名构建的,例如{"useraaaaaaaa","active"},这样的一个组合构成了一个权限对象。
//公钥权重
struct key_weight{
eosio::public_key key;//公钥对象
uint16_t weight;
EOSLIB_SERIALIZE(key_weight,(key)(weight))
};
//等待权重
struct wait_weight{
uint32_t wait_sec;
uint16_t weight;
EOSLIB_SERIALIZE(wait_weight,(wait_sec)(weight))
};
//权力
//authority指有权利的人。
//permission指某项许可。所以某人需要拥有很多别人授权的许可,才能称之为有权利的人。
struct authority{
uint32_t threshold=0;//阈值
std::vector<key_weight>keys;//多个密钥
std::vector<permission_level_weight>accounts;//多个权限
std::vector<wait_weight>waits;//多个等待
EOSLIB_SERIALIZE(authority,(threshold)(keys)(accounts)(waits))
};
/**区块头
*Blockchain block header.
*
*A block header is defined by:
*-a timestamp,
*-the maker that created it,
*-a confirmed flag default as zero,
*-a link to previous block,
*-a link to the transaction merkel root,
*-a link to action root,
*-a schedule version,
*-and a makers'schedule.
*/
struct block_header{
checksum256 previous;
uint32_t timestamp;
text_name maker;
uint16_t confirmed=0;
checksum256 transaction_mroot;
checksum256 action_mroot;
uint32_t schedule_version=0;
std::optional<eossys::maker_schedule>new_makers;
//explicit serialization macro is not necessary,used here only to improve compilation time
eosLIB_SERIALIZE(block_header,(previous)(timestamp)(maker)(confirmed)(transaction_mroot)(action_mroot)
(schedule_version)(new_makers))