Code Monkey home page Code Monkey logo

eth-nft-market's Introduction

基于以太坊 Ethereum、IPFS和Vue3 的 NFT 市场 DApp DEMO

English

此 demo 只用于参考学习

库和工具

主要功能

  • 发布自己的 NFT 产品(目前仅限定于图片)
  • 在列表页中展示市场上所有待售的 NFT 资产
  • 购买其余用户发布的 NFT 资产
  • 在“我的”页面进行展示我发布过的 NFT 资产以及我购得的 NFT 资产

启动流程

这里用的包管理工具为pnpm,也可以用yarn或npm

1. 安装依赖
pnpm install
2. 配置hardhat
// hardhat.config.js 具体配置项说明可查看hardhat文档
...
 defaultNetwork: "hardhat",
  networks: {
    hardhat: {
      chainId: 1342, //若填有此配置项 启动时会根据此配置项 启动对应chainId的节点
    },
  },
  solidity: {
    version: "0.8.4",
    settings: {
      optimizer: {
        enabled: true,
        runs: 200,
      },
    },
  }
...
3. 通过hardhat启动节点
pnpm hardhat node 
4. 编译&发布合约
pnpm hardhat  run --network localhost .\scripts\deploy.js
// 其中deploy.js中相关细节可查看hardhat文档
5. 启动前端页面服务
pnpm run dev
6. 访问本地端口进行测试 默认的地址为localhost:3000

演示

发布NFT 购买NFT

参考

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.