Giter Site home page Giter Site logo

contracts's Introduction

README

安装依赖

yarn install

运行测试

yarn test

修改配置文件

cp env_sample .env
vi .env

配置项详解:

  • MNEMONIC 助记词 用于部署合约,需要在对应网络持有远胜币作为手续费 eg: = "test test test test test test test test test test test junk"
  • ETHERSCAN_API_KEY 区块链浏览器API KEY 用于开源合约,不同区块链对应不同的KEY
  • MINTER_SIGNER 交易签发者账号 前端请求后端对数据进行签名后再调用合约发放;可不设置,默认为合约部署者

合约部署

scripts目录下面提供一键部署和初始化脚本 deploy_and_init,是默认执行脚本

yarn deploy --network <network>

由于网络可能不稳定,该目录下提供了分别部署各个合约的脚本。分别部署合约时,遵循顺序如下:

Badge -> Quest -> QuestMinter -> QuestMetadata -> init

npx hardhat run scripts/deploy_Badge.js --network <network>
npx hardhat run scripts/deploy_Quest.js --network <network>
npx hardhat run scripts/deploy_QuestMinter.js --network <network>
npx hardhat run scripts/deploy_QuestMetadata.js --network <network>
npx hardhat run scripts/init_after_deploy.js --network <network>

contracts's People

Contributors

liangjies avatar 0xdwong avatar xilibi2003 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.