Giter Club home page Giter Club logo

ethernauts's Introduction

Ethernauts

WIP implementation for https://forum.ethernautdao.io/t/deploy-ethernaut-avatar-nfts-to-bootstrap-the-dao-s-tokenomics/299

Requirements

  • Node.js v16.8.0
  • NPM v7.21.0
  • Docker
  • Docker Compose

Solidity development

The following hardhat tasks will help you to:

  • Start a local node: npx hardhat node
  • Deploy the contract: npx hardhat deploy
  • Open the sale: npx hardhat sale-state
  • Mint sample tokens: npx hardhat mint

DAPP/Keeper development

We use Docker and Docker Compose to run the development environment.

Run docker compose up -d to start the whole project. It includes the following services:

  • hardhat-node: (http://localhost:4585)
  • hardhat-deploy: Takes care of deploying the Ethernauts.sol contract to the docker hardhat network for development
  • dapp (Next.js) (http://localhost:3000)
  • redis (https://localhost:6379)
  • keeper-queue: Node server that listens to mint & batch events and enqueues the necessary jobs to be processed.
  • keeper-worker: Node server processes the enqueued jobs by keeper-queue and executes them with the desired concurrency.

Run docker compose ps to check the status of the running services and docker compose down to stop them.


You can also run/stop a single service using:

  • docker compose up service-name
  • docker compose down service-name

Interacting with the Ethernauts Contract

You can run hardhat tasks inside running docker containers using the docker compose exec ... command.

So, first you want to open the sale state, and you can do it with the sale-state hardhat task, like so:

docker compose exec hardhat-node sh -c 'cd /src/packages/hardhat && npx hardhat --network docker sale-state'

Then, you will be able to mint any amount of tokens using the mint task:

docker compose exec hardhat-node sh -c 'cd /src/packages/hardhat && npx hardhat --network docker mint'

Finally, you can also set the base URL changer address, with:

docker compose exec hardhat-node sh -c 'cd /src/packages/hardhat && npx hardhat --network docker exec --method setUrlChanger --args ["0x000"]'

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.