基于区块链的毕业设计Solidity Typescript Dev Starter Kit – Solidity Typescript开发初学者工具包

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Solidity Typescript Dev Starter Kit – Solidity Typescript开发初学者工具包 是一篇很好的国外资料

Solidity Typescript Dev Starter Kit - Solidity Typescript开发初学者工具包

Solidity Typescript Dev Starter Kit

This was extended and updated by @janek26

Using Hardhat, Typescript, Waffle, Mocha and Chai

This is a starter kit for developing, testing, and deploying smart contracts with a full Typescript environment. This stack uses Hardhat as the platform layer to orchestrate all the tasks. Ethers is used for all Ethereum interactions and testing.

Original Blog Post

Using this Project

Clone this repository, then install the dependencies with yarn. Build everything with yarn build. https://hardhat.org has excellent docs, and can be used as reference for extending this project.

Available Functionality

You may want to create a .env file, with your own and private keys, by running cp .env.sample .env and editing it.

Build Contracts and Generate Typechain Typeings

yarn compile

Run Contract Tests

In one terminal run yarn chain

Then in another run yarn test

The gas usage table may be incomplete (the gas report currently needs to run with the --network localhost flag; see below)

Run Contract Tests and Generate Gas Usage Report

In one terminal run yarn chain

Then in another run yarn test --network localhost

Notes:

  • When running with this localhost option, you get a gas report but may not get good callstacks
  • See here for how to configure the gas usage report.

Run Coverage Report for Tests

yarn coverage

Deploy to Ethereum

Create/modify network config in hardhat.config.ts and add API key and private key, then run:

yarn deploy:init --network rinkeby

Upgrade Contract

To upgrade your contract, set BOX_ADDRESS in .env to your proxy contract, then run:

yarn deploy:upgrade --network rinkeby

Verify on Etherscan

Add Etherscan API key to hardhat.config.ts, then run:

npx hardhat verify-contract --contract-name Counter --address <DEPLOYED ADDRESS>

Helpers

Additional tooling to make your DX as simple as possible.

Prettier

This repo runs prettier and prettier-plugin-solidity to automate formatting. You can format your project by running yarn format. You may want to enable “format on save” in your IDE.

Husky and lint-staged

Using husky and lint-staged to format before every commit. It also runs tests before every push.

PRs and feedback welcome!


Solidity Typescript Dev Starter Kit - Solidity Typescript开发初学者工具包

Solidity Typescript开发初学者工具包

这是由@janek26

使用Hardhat、Typescript、华夫饼干、摩卡咖啡和Chai进行扩展和更新的。

这是一个初学者工具包,用于开发、测试和部署具有完整Typescript环境的智能合约。该堆栈使用Hardhat作为平台层来协调所有任务。以太用于所有以太坊eth交互和测试

原始博客帖子

使用此项目

克隆此存储库,然后使用Thread安装依赖项。用纱线制造一切。https://hardhat.org 有优秀的文档,可以作为扩展本项目的参考

可用功能

您可能希望通过运行cp.env.sample.env并对其进行编辑来创建一个带有您自己的密钥和私钥的.env文件

构建合同并生成类型链

纱线编译

升级合同

在一个终端运行纱线链中

然后在另一个运行纱线测试中

气体使用表可能不完整(气体报告当前需要使用–network localhost标志运行;见下文)

在Etherscan上验证

在一个终端运行纱线链中,然后在另一个运行纱线测试中——网络本地主机中,注意:

纱线覆盖率

在hardhat.config.ts中创建/修改网络配置并添加API密钥和私钥,然后运行:

  • 使用此localhost选项运行时,您会收到气体报告,但可能无法获得良好的调用堆栈
  • 有关如何配置气体使用报告,请参见此处

助手

纱线部署:init–network rinkeby

更漂亮

升级您的合同,将.env中的BOXu地址设置为代理合约,然后运行:

部署:升级–网络rinkeby

Upgrade Contract

将Etherscan API密钥添加到hardhat.config.ts,然后运行:

npx hardhat验证合约–合约名称计数器–地址&lt;部署地址&gt

Verify on Etherscan

使DX尽可能简单的附加工具

此repo运行越来越漂亮的插件solidity来自动格式化。您可以通过运行“纱线格式”来设置项目的格式。您可能希望在IDE中启用“保存时格式化”

Helpers

在每次提交之前使用husky和lint进行分级格式化。它还可以在每次推送之前运行测试

Prettier

PRs和反馈欢迎

Husky and lint-staged

Using husky and lint-staged to format before every commit. It also runs tests before every push.

PRs and feedback welcome!

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

www.interchains.cc

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

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Solidity Typescript Dev Starter Kit – Solidity Typescript开发初学者工具包

提供最优质的资源集合

立即查看 了解详情