Git Product home page Git Product logo

erc721demo's Introduction

ERC721 Demo

Introduction

此项目为一个ERC721 Demo项目,包含合约部分、部署部分以及交互部分,其中交互部分提供了基于hardhat、web3js、alchemySDK三种方式。

测试网采用sepolia

Usage

安装依赖

执行npm install

配置config.json

  • APIKey: 从alchemy中获取dapp的apikey
  • alchemyHTTPURL: 从alchemy中获取dapp的HTTP URL
  • privateKey: MetaMask钱包中的私钥
  • publicKey: MetaMask钱包中的公钥,同时也是钱包的地址
  • contractName: 要部署的合约名称
  • description: 对合约的介绍
  • limit: 铸造NFT的个数限制

命令

  • npm run compile: 编译合约
  • npm run deploy-sepolia: 将合约部署到sepolia测试网
  • npm run deploy-local: 将合约部署到本地测试网
  • npm run testnet: 开启本地测试网
  • npm run console: 启动连接本地测试网的交互命令行
  • npm run test: 运行测试脚本
  • npm run exec-local ./scripts/integrateByHardhat.ts: 在本地使用hardhat执行交互脚本
  • npm run exec-sepolia ./scripts/integrateByHardhat.ts: 在sepolia测试网使用hardhat执行交互脚本
  • npx ts-node ./scripts/<script-name>: 执行交互脚本
    • integrateByAlchemySDK.ts: 使用alchemy-sdk进行交互
    • integrateByWeb3.ts: 使用web3js进行交互

erc721demo's People

Contributors

newive avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.