Giter Club home page Giter Club logo

chievemints's Introduction

’Chievemints

MetaGame ’Chievemints

This is a simple app to mint ERC-1155 NFTs to represent player accomplishments in MetaGame.

The permissions for each token are controlled by the existence of other tokens in the system.

Running

  • yarn
  • yarn ui:start

Deploying the Contract

Set CHAIN_NAME in packages/contracts/.env and VITE_CHAIN_NAME in packages/ui/.env to a network from the hardhat config.

By default if an existing deployment for that network is found in packages/contracts/artifacts/, the system will attempt to upgrade the contract. To force a fresh deployment, the best method is to add a new network for your deployment to packages/contracts/hardhat.config.ts to the validationKeyNames and config.networks sections. This new chain name needs to include an existing chain name (like "dysMumbai" or "polygonTesting") for the network name to resolve in the UI. Otherwise, the new chain needs to be added to packages/ui/src/lib/networks.ts.

After the network is configured, the contracts can be deployed using yarn hh:deploy.

After the contract is deployed, the deploying address is set as the owner. To create tokens from your wallet, you will either need to add a "Creator" or "Superuser" permission for that address (creators can make new token types, superusers can do pretty much everything). To do so, from the command line run yarn --cwd packages/contracts/ hardhat grant --address myaddr.eth --role Superuser.

You should now be able to click the trophy in the UI to create a new token type.

Publishing the UI

In order to publish the UI, you will need write access to the ’Chievemints GitHub Repository. Given that, just run yarn ui:publish.

Flashy Octo

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.