基于区块链的毕业设计Solidity Template – 坚固性模板

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Solidity Template – 坚固性模板 是一篇很好的国外资料

Solidity Template

My favourite setup for writing Solidity smart contracts.

  • Hardhat: compile and run the smart contracts on a local development network
  • TypeChain: generate TypeScript types for smart contracts
  • Ethers: renowned Ethereum library and wallet implementation
  • Waffle: tooling for writing comprehensive smart contract tests
  • Solhint: linter
  • Solcover code coverage
  • Prettier Plugin Solidity: code formatter

This is a GitHub template, which means you can reuse it as many times as you want. You can do that by clicking the “Use this template” button at the top of the page.

Usage

Pre Requisites

Before running any command, make sure to install dependencies:

$ yarn install

Compile

Compile the smart contracts with Hardhat:

$ yarn compile

TypeChain

Compile the smart contracts and generate TypeChain artifacts:

$ yarn typechain

Lint Solidity

Lint the Solidity code:

$ yarn lint:sol

Lint TypeScript

Lint the TypeScript code:

$ yarn lint:ts

Test

Run the Mocha tests:

$ yarn test

Coverage

Generate the code coverage report:

$ yarn coverage

Report Gas

See the gas usage per unit test and average gas per method call:

$ REPORT_GAS=true yarn test

Clean

Delete the smart contract artifacts, the coverage reports and the Hardhat cache:

$ yarn clean

Syntax Highlighting

If you use VSCode, you can enjoy syntax highlighting for your Solidity code via the vscode-solidity extension. The recommended approach to set the compiler version is to add the following fields to your VSCode user settings:

{   "solidity.compileUsingRemoteVersion": "v0.8.3+commit.8d00100c",   "solidity.defaultCompiler": "remote" }

Where of course v0.8.3+commit.8d00100c can be replaced with any other version.


坚固性模板

我最喜欢的写作稳固智能合约的设置。

  • 安全帽:在本地服务器上编译和运行智能合约开发网络
  • 类型链:为智能合约生成类型脚本
  • 以太:著名的以太坊eth库和钱包实现
  • 华夫:编写全面智能合约测试的工具
  • Solhint:linter
  • Solcover代码覆盖率
  • Prettier Plugin Solidity:代码格式化程序

这是一个GitHub模板,这意味着您可以根据需要多次重用它。您可以通过单击页面顶部的“使用此模板”按钮来完成此操作。

使用

先决条件

在运行任何命令之前,请确保安装依赖项:

$ yarn install

编译

使用Hardhat编译智能契约:

$ yarn compile

类型链

编译智能契约并生成TypeChain工件:

$ yarn typechain

皮棉坚固性

Lint实体代码:

$ yarn lint:sol

覆盖率

Lint TypeScript代码:

$ yarn lint:ts

报告气体

运行Mocha测试:

$ yarn test

清除

生成代码覆盖率报告:

$ yarn coverage

语法突出显示

查看每个单元测试的气体使用量和每个方法调用的平均气体:

$ REPORT_GAS=true yarn test

Clean

删除智能合约工件、覆盖率报告和安全帽缓存:

$ yarn clean

Syntax Highlighting

如果使用VSCode,您可以通过VSCode Solidity扩展享受Solidity代码的语法高亮显示。设置编译器版本的建议方法是将以下字段添加到VSCode用户设置中:

{   "solidity.compileUsingRemoteVersion": "v0.8.3+commit.8d00100c",   "solidity.defaultCompiler": "remote" }

当然,v0.8.3+commit.8d00100c可以替换为任何其他版本。

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

www.interchains.cc

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

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Solidity Template – 坚固性模板

提供最优质的资源集合

立即查看 了解详情