Fusion 开源项目教程

Fusion 开源项目教程

fusionAn experimental progressive and fast zkRollup written in Rust, focused on performance, modularity, and applying cutting-edge Verifiable Computation proof systems.项目地址:https://gitcode.com/gh_mirrors/fusion2/fusion

1. 项目的目录结构及介绍

Fusion 项目的目录结构如下:

fusion/
├── contracts/
│   ├── ERC20.sol
│   ├── ERC721.sol
│   └── ...
├── scripts/
│   ├── deploy.js
│   └── ...
├── tests/
│   ├── ERC20.test.js
│   └── ...
├── hardhat.config.js
├── package.json
└── README.md

目录介绍

  • contracts/: 存放智能合约的 Solidity 文件。
  • scripts/: 存放部署和交互脚本。
  • tests/: 存放测试脚本。
  • hardhat.config.js: Hardhat 配置文件。
  • package.json: 项目依赖和脚本配置。
  • README.md: 项目说明文档。

2. 项目的启动文件介绍

项目的启动文件主要是 hardhat.config.js,它包含了 Hardhat 的配置信息,如网络配置、Solidity 版本等。

module.exports = {
  solidity: "0.8.4",
  networks: {
    hardhat: {},
    rinkeby: {
      url: "https://rinkeby.infura.io/v3/YOUR_INFURA_PROJECT_ID",
      accounts: [`0x${YOUR_PRIVATE_KEY}`]
    }
  }
};

3. 项目的配置文件介绍

项目的配置文件主要是 package.json,它包含了项目的依赖和脚本配置。

{
  "name": "fusion",
  "version": "1.0.0",
  "description": "A sample project for fusion",
  "scripts": {
    "compile": "hardhat compile",
    "test": "hardhat test",
    "deploy": "hardhat run scripts/deploy.js"
  },
  "dependencies": {
    "@nomiclabs/hardhat-ethers": "^2.0.2",
    "@nomiclabs/hardhat-waffle": "^2.0.1",
    "chai": "^4.3.4",
    "ethereum-waffle": "^3.4.0",
    "ethers": "^5.4.1",
    "hardhat": "^2.6.0"
  }
}

配置文件介绍

  • scripts: 定义了编译、测试和部署的脚本。
  • dependencies: 列出了项目所需的依赖包。

以上是 Fusion 开源项目的教程,包含了项目的目录结构、启动文件和配置文件的介绍。希望对你有所帮助!

fusionAn experimental progressive and fast zkRollup written in Rust, focused on performance, modularity, and applying cutting-edge Verifiable Computation proof systems.项目地址:https://gitcode.com/gh_mirrors/fusion2/fusion

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

仲玫千Samson

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值