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

Deploy

Deploy the contracts to Hardhat Network:

$ yarn deploy

Deploy the contracts to a specific network, such as the Ropsten testnet:

$ yarn deploy:network ropsten

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.4+commit.c7e474f2",   "solidity.defaultCompiler": "remote" }

Where of course v0.8.4+commit.c7e474f2 can be replaced with any other version.


坚固性模板

我最喜欢的撰写Solidity智能合约的设置

  • 类型链:为智能合同生成类型脚本
  • 以太:著名的以太坊eth库和钱包实现稳固性:代码格式化程序
  • 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

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

使用

先决条件

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

$ yarn install

编译

使用安全帽编译智能合约:

$ yarn compile

类型链

编译智能合约并生成类型链工件:

$ yarn typechain

皮棉类型脚本

Lint坚固性代码:

$ yarn lint:sol

Lint TypeScript

Lint类型脚本代码:

$ yarn lint:ts

Test

运行摩卡测试:

$ yarn test

Coverage

生成代码覆盖率报告:

$ yarn coverage

Report Gas

查看每个单元测试的气体使用情况每个方法调用的平均gas:

$ REPORT_GAS=true yarn test

Clean

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

$ yarn clean

Deploy

将合约部署到安全帽网络:

$ yarn deploy

将合约部署到特定网络,如Ropsten testnet:

$ yarn deploy:network ropsten

Syntax Highlighting

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

{   "solidity.compileUsingRemoteVersion": "v0.8.4+commit.c7e474f2",   "solidity.defaultCompiler": "remote" }

当然,v0.8.4+commit.c7e474f2可以替换为任何其他版本

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

www.interchains.cc

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

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

提供最优质的资源集合

立即查看 了解详情