Meta2032开发丨Meta2032现成源码搭建

143 阅读3分钟

  Meta2032-公链介绍Conscious Value Network意识价值网络【18I链上合约-259l开发系统3365】(简称:CVN意识价值网络),是以新一代公链基础设施+通用级分布式数据库(存储)云+高性能的去中心化“快播”为全新定位,旨在为所有用户提供高速、安全、易用的一站式去中心化解决方案的区块链3.0底层公链。CVN在VRF共识主链上,通过叠加PoST的共识原理,分层实现了账本共识和存储证明共识,构建出快速稳定的区块链底层。 * 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 time
  eosLIB_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 time
  eosLIB_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 time
  eosLIB_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 time
  eosLIB_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> 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 );

}

  Solidity是一种编写智能合约的编程语言,它在以太坊虚拟机上运行。它是一种面向合约的高级语言,其语法类似于Java,主要针对以太坊EVM。以太坊虚拟机(EVM)是以太坊上智能合约的运行环境。它实际上是完全隔离的,这意味着在EVM上运行的代码无法访问网络、文件系统和其他进程。智能合约对其他的智能合约的访问权也有限,在区块链网络上单独运作。在以太坊网络上编写智能合约有三个主要步骤:

  1.用以太坊高级语言编写

  2.用EVM编译器编译成字节码

  3.用以太坊客户端上传到区块链网络对于智能合约和开源编码感兴趣的人,广为人知的资源之一是GitHub。这是开发人员托管软件代码的在线平台。你的每段代码会存在存储库中,存储库基本上是一个存储所有代码组件的文件夹。很多人把其他人的存储库复制和粘贴到自己的账户中,然后进行微调整,变成自己的。通过搜索项目和存储库来浏览页面,可以帮你构建自己的项目。一旦找到你所需要的存储库,打开它并搜索内容,会包含大量有用代码的复杂内容。使用上述程序和资源,你也可以创建自己的智能合约。