Copyright (C) Tyler R. Drury 03-01-2021, All Rights Reserved – 版权所有(C)Tyler R.Drury 03-01-2021,保留所有权利区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Copyright (C) Tyler R. Drury 03-01-2021, All Rights Reserved – 版权所有(C)Tyler R.Drury 03-01-2021,保留所有权利区块链毕设代写 是一篇很好的国外资料


Copyright (C) Tyler R. Drury 03-01-2021, All Rights Reserved


Solidarity

Solidarity contains common solidity (.sol) files, including

  • contracts
  • interfaces
  • libraries

which are commonly used in developing smart contracts or decentralized applications.

These include:

/core/

Fundemental libraries, useful for almost any project

  • Core.sol – core constraints
  • Exists – abstract base contract for verifying contract state and other related functions such as safely destroy a contract using selfdestruct, which almost every other contract should derive from

/constraints/

Common utilitiy libraries consisting of wrappers around Solidity’s require statement, used for reducing gas costs and also constraining the state of the EVM, such as ensuring values are within expected ranges or to ensure an operation has a desired affect.

  • LogicConstraints – library for trivial boolean require statements, usable by almost any project that uses require
  • UnitConstraints – constrain values of wei to be within an arbitrary range or a specific denomination
  • AddressConstraints.sol – address utilities library for verifying address values using requrie, such as if the address is null or equal to other addresses
  • StringConstraints.sol – string utilities library for verifying string values using requrie
  • BytesConstraints.sol – bytes32 utilities library for verifying bytes32 values using requrie
  • uint256Constraints.sol – uint256 utilities library for verifying uint256 values using requrie
  • int256Constraints.sol – int256 utilities library for verifying int256 values using requrie

/utils/

Common utilitiy libraries, useful for almost any project

  • Units.sol – library for common units and their conversions
  • StringUtilities.sol – string utilities library for common string operations, such as concatenation and
  • BytesUtilities.sol – bytes utilities library for various logical operations, such as masking

/finance/

Common operations related to finance, include Safe Transactions and calculating compound interest

  • SafeTransaction.sol – Extending OpenZeppelin’s SafeMath by adding functions specifically for performing basic financial transactions (with sanity checks) such as for making deposits or withdraw to/from accounts
  • SafePayable.sol – trivial contract for safely performing payment operations
  • Compound.sol – library for calculating compound interest
  • iCompoundInterest.sol – external interface for a contract with implements calculating compound interest based on Compound.sol

/secrets/

structures, libraries and contracts for storing secure secrets

  • HashedSecretMap – a library for common operations performed on mapping of bytes32 hashes to Secrets
  • AddressSecretMap – a library for common operations performed on mapping of addresses to Secrets, for holding private account information
  • OwnableSecrets – a base contract which contains a HashedSecretMap for holding secrets for the owner and/or administrators of a contract, with and AddressSecretMap for holding registered user secrets
  • ExternalOwnableSecrets – fully realized external interface for OwnableSecretsMap contract, can be used directly in projects source or proxied (using OwnableSecretsProxy) from this address 0x0000, on the mainnet, 0x0000 on the Ropsten test network or 0x0000 on the __ test network

/mints/

Fully realized contracts derived from OpenZeppelin’s Token Mint types (including ERC20, ERC721, ERC777 and ERC1155), which also inherit from the Gas Station Network (reducing overall gas expenditures of transaction execution)

/payment/

Stand alone contracts deriving from OpenZeppelin’s payment classes for fully realized uni-directional, bi-directional and other payment channel types, which support escrow behaviour and other similar functionality, directed and facilitating the exchange of value or assets between a producer and consumer(s)

/auction/

Extending payment and secrets contracts for fully realized, secure Auctions and Auction Houses, where users can freely exchange assets using various auction style contracts, without the need for an external 3rd-party exchange, such as binance or coinbase

/vote/

Common use cases for secure voting mechanisms (including delegation), which are implemented on the Vigilance Network for decentralized governance of the project and establishing new resolutions, partners or for funding new projects, including general voting mechanism which require VNT to be consumed, where voting weight per user is based on the VNT supplied by each user (where all non-equity holding participants in the network may contribute) or, NFT voting for equity holders regarding corporate policies/decisions, where 1 token repressents 1 vote and users can supply multiple NFT to express their voting rights (which are NOT consumed but refunded upon completion of voting)

/proxy/

Deriving from OpenZeppelin’s Proxy contracts, these are specialized contracts for proxying other Solidarity contracts, such as:

  • ICO/CrowdFunding contracts
  • Secrets
  • Token Mints

as well as other common contracts, to be used in composition with eachother, to form other more robust smart constracts, with minimal gas consumption and with the goal to allow dynamically upgradeable contracts while also reduce contract size overhead, allowing for larger, more complex contracts.

/TBD/

Additional projects to come.


Before Starting

Either use the Remix.com IDE for rapid prototyping and testing or Download and install:

  • Ganache – a local testnetwork for developing using a private blockchain
  • Geth – a local Ethereum node, for use with Ganache
  • Truffle – application for easily compiling, deploying and testing blockchain applications

If unfamiliar with these tools, a full, indepth tutorial can be found on the official VS developer’s site here.

Once ready to go, either clone the repository (or install the most recent stable version via NPM) if developing locally, or simply import the code directly from the repository, if using Remix.

This project has the following directories structure

  • /_output – directory for logging console output and errors durring exection of tools
  • /src – directory with all working source code and migrations
  • /tests – javascript unit test directory, for use with runnning unit tests via truffle command line OR on a geth node
  • /docs – html documentation directory used by Doxygen for output
  • /latex – latex documenation directory, for use by Doxygen for output
  • /README.md – project readme
  • /.gitignore – file specifying which files and directory patterns not to include when pushing commits t github repo
  • /Doxyfile – doxygen project configuration file
  • /build.bat – utility batch script for building this project on Windows using truffle and other related tools (such as linting or minimization tools)
  • /composer.json – composer configuration file for packaged project to be distributed via Packagist
  • /package.json – nodeJS configuration file for packaged project dependancies, for distribution via NPM

Directories prefixed with an underscore (_) are private, developer only directories, not included in the production build and should not be accessible or included in repos or final product

In unit testing directories, there is no build.bat, replaced instead with a test.bat, for executing the unit test suites via Truffle command line, which requires a locally running node and private blockchain to test (using Ganache is recommended)


Getting Started

Each VS project is designed to be stand alone, built with no (or preferably minimal) external dependencies.

Each project is unique, so make sure to review the README.md and LICENSE.md of each project before use or installation, to ensure your system and the project features meet the desired requirements.

This project’s only dependancy is OpenZeppelin and is imported externally from the project’s Github repository, available here.


Getting the Official Project

The most recent, stable release of this project is available via [NPM][] or, developers wishing to contribute may access the GitHub repo.

We also have a gitcoin tribe for devlopers who want to keep upto date and participate in the open-source community.


License

Solidarity is released under the Apache 2.0 License.

See LICENSE file for more details.


Links

The online API reference is available here.

Authors and contributors are listed in AUTHORS.



版权所有(C)Tyler R.Drury 03-01-2021,版权所有


团结

团结包含通用的坚固性(.sol)文件,包括通常用于开发智能合约或分散应用程序的

  • 合同
  • 接口

其中包括:

/core/

基本库,几乎适用于任何项目

  • 核心.sol-核心约束
  • 存在-用于验证合同状态和其他相关功能(如使用自毁安全销毁合同)的抽象基本合同,几乎所有其他契约都应该从逻辑约束中派生出来,逻辑约束是用于普通布尔require语句的库,几乎所有使用的项目都需要使用UnitConstraints-将wei的值限制在任意范围内或特定面额内地址约束.sol-地址实用程序库,用于使用requrie验证地址值,例如,如果地址为空或等于其他地址字符串约束.sol-字符串实用程序库,用于使用requrie验证字符串值字节约束.sol-bytes32实用程序库,用于使用Require检验bytes32值约束.sol-uint256实用程序库,用于验证uint256值使用REQUIRIE约束.sol-用于使用Require验证int256值的int256实用程序库单位.sol-常用单位库及其转换字符串实用程序.sol-常用字符串操作的字符串实用程序库,如连接和字节实用程序.sol-用于各种逻辑操作的字节实用程序库,例如掩蔽安全交易.sol-扩展OpenZeppelin的SafeMath,添加专门用于执行基本金融交易(带有健全检查)的功能,如存款或从账户中提取保险费.sol-安全执行支付操作的琐碎合同复合溶胶-复利计算库icompondeninterest.sol文件-合同的外部接口,实现了基于复合溶胶

/constraints/

通用实用库,由围绕Solidity需求声明的包装物组成,用于降低天然气成本,同时也限制EVM的状态,例如确保值在预期范围内或确保操作具有预期效果。公共实用程序库,对几乎任何项目都有用,包括安全交易和计算复利,用于存储安全机密的结构、库和合同,这些合同是从OpenZeppelin的代币铸币类型(包括ERC20,ERC721、ERC777和ERC1155),它们也继承自加油站网络(减少交易执行的总体天然气支出)

  • HashedSecretMap-用于将bytes32哈希映射到机密的常见操作的库
  • AddressSecretMap-库对于将地址映射到机密、持有私人帐户信息的常见操作,OwnableSecrets是一种基本合约,其中包含用于为合约的所有者和/或管理员持有机密的HashedSecretMap,使用和地址secretmap来保存注册用户的机密
  • ExternalOwnableSecrets-OwnableSecretsMap合同的完全实现的外部接口,可以直接在项目源中使用,也可以从该地址0x0000在主网上代理(使用OwnableSecretsProxy),在Ropsten测试网络上的0x0000或在“测试网络”上的0x0000,与Ganache一起使用
  • Truffle-用于轻松编译、部署和测试区块链blockchain应用程序的应用程序
  • /u output-用于记录控制台输出和工具执行过程中的错误的目录
  • /src-包含所有工作源代码和迁移的目录
  • /tests-javascript单元测试目录,用于通过truffle命令行或geth节点上运行单元测试,供强生用于输出/自述文件.md-项目自述文件.gitinore-指定在推送github repo时不包括哪些文件和目录模式的文件/生成.bat-用于在Windows上使用松露和其他相关工具(如脱毛或最小化工具)

/utils/

独立合同,源自OpenZeppelin的支付类,用于完全实现单向、双向和其他支付渠道类型,它支持代管行为和其他类似功能,指导和促进生产者和消费者之间的价值或资产交换,为完全实现、安全的拍卖和拍卖行扩展支付和保密合同,用户可以使用各种拍卖式合同自由交换资产,而无需需要外部第三方交换,例如binance或coinbase,安全投票机制(包括授权)的常见用例,这些用例在Vigilance网络上实施,用于分散项目治理和建立新决议、合作伙伴或资助新项目,包括要求使用VNT的一般投票机制,其中每个用户的投票权重基于每个用户提供的VNT(网络中的所有非股权持股参与者都可以提供),或NFT就公司政策/决策为股权持有人投票,如果1个代币代表1票,用户可以提供多个NFT来表达他们的投票权(投票结束后不消费但退款)

  • /编写器.json-要通过Packagist分发的打包项目的编写器配置文件/包.json-打包的项目依赖项的nodeJS配置文件,用于通过NPM分发
  • StringUtilities.sol – string utilities library for common string operations, such as concatenation and
  • BytesUtilities.sol – bytes utilities library for various logical operations, such as masking

/finance/

来自OpenZeppelin的代理合同,这些是代理其他团结合同的专门合同,例如:

  • SafeTransaction.sol – Extending OpenZeppelin’s SafeMath by adding functions specifically for performing basic financial transactions (with sanity checks) such as for making deposits or withdraw to/from accounts
  • SafePayable.sol – trivial contract for safely performing payment operations
  • Compound.sol – library for calculating compound interest
  • iCompoundInterest.sol – external interface for a contract with implements calculating compound interest based on Compound.sol

/secrets/

以及其他普通合同,相互组合使用,形成其他更强大的智能结构,以最小的气体消耗,目标是允许动态升级合同,同时也减少合同规模开销,允许更大、更复杂的合同。

  • HashedSecretMap – a library for common operations performed on mapping of bytes32 hashes to Secrets
  • AddressSecretMap – a library for common operations performed on mapping of addresses to Secrets, for holding private account information
  • OwnableSecrets – a base contract which contains a HashedSecretMap for holding secrets for the owner and/or administrators of a contract, with and AddressSecretMap for holding registered user secrets
  • ExternalOwnableSecrets – fully realized external interface for OwnableSecretsMap contract, can be used directly in projects source or proxied (using OwnableSecretsProxy) from this address 0x0000, on the mainnet, 0x0000 on the Ropsten test network or 0x0000 on the __ test network

/payment/

其他项目即将推出。

/vote/

使用混音网站快速原型和测试的IDE或下载和安装:

/proxy/

如果不熟悉这些工具,可以在VS开发者的官方网站上找到完整、深入的教程。

/TBD/

准备就绪后,如果在本地开发,可以克隆存储库(或通过NPM安装最新的稳定版本),如果使用Remix,可以直接从存储库导入代码。

开始

此项目具有以下目录结构

  • ICO/CrowdFunding contracts
  • Secrets
  • Token Mints

带有下划线(u304;)前缀的目录是私有的、仅限于开发人员的目录,不包含在生产构建中,不应访问或包含在repos或最终产品中

开始官方项目

在单元测试目录中,没有生成.bat, 替换为测试.bat,用于通过Truffle命令行执行单元测试套件,这需要一个本地运行的节点和私有区块链blockchain来测试(建议使用Ganache)


许可

每个VS项目都设计为独立的,没有(或最好是最小的)外部依赖关系。

  • Ganache – a local testnetwork for developing using a private blockchain
  • Geth – a local Ethereum node, for use with Ganache
  • Truffle – application for easily compiling, deploying and testing blockchain applications

每个项目都是独特的,因此请务必查看自述文件.md以及许可证.md在使用或安装每个项目之前,确保您的系统和项目功能符合预期要求。

这个项目唯一的依赖性是OpenZeppelin,它是从项目的Github存储库外部导入的,可以在这里找到。

此项目的最新稳定版本可通过[NPM][]获得,或者,希望参与的开发人员可以访问GitHub repo。

  • /_output – directory for logging console output and errors durring exection of tools
  • /src – directory with all working source code and migrations
  • /tests – javascript unit test directory, for use with runnning unit tests via truffle command line OR on a geth node
  • /docs – html documentation directory used by Doxygen for output
  • /latex – latex documenation directory, for use by Doxygen for output
  • /README.md – project readme
  • /.gitignore – file specifying which files and directory patterns not to include when pushing commits t github repo
  • /Doxyfile – doxygen project configuration file
  • /build.bat – utility batch script for building this project on Windows using truffle and other related tools (such as linting or minimization tools)
  • /composer.json – composer configuration file for packaged project to be distributed via Packagist
  • /package.json – nodeJS configuration file for packaged project dependancies, for distribution via NPM

我们还有一个gitcoin部落,供那些希望保持最新状态并参与开源社区的开发者使用。

团结是根据Apache 2.0许可证发布的。


链接

有关详细信息,请参阅许可证文件。

此处提供了在线API参考。

作者和贡献者列在作者中。


Getting the Official Project

The most recent, stable release of this project is available via [NPM][] or, developers wishing to contribute may access the GitHub repo.

We also have a gitcoin tribe for devlopers who want to keep upto date and participate in the open-source community.


License

Solidarity is released under the Apache 2.0 License.

See LICENSE file for more details.


Links

The online API reference is available here.

Authors and contributors are listed in AUTHORS.

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/20171.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » Copyright (C) Tyler R. Drury 03-01-2021, All Rights Reserved – 版权所有(C)Tyler R.Drury 03-01-2021,保留所有权利区块链毕设代写

提供最优质的资源集合

立即查看 了解详情