Giter Site home page Giter Site logo

genesis-bot's Introduction

Genesis Project Bot

Code & credit from jpgboi.

This bot sends claiming and resurrecting data to @genesisloot's Discord server.


Usage

  1. Create an .env file and set the following secrets:
CONTRACT_ADDRESS= # Smart contract address (0x...)
PROVIDER_URL= # Provider URL

DISCORD_WEBHOOK_URL= # Discord Webhook URL (Server Settings -> Integrations -> Webhooks)
DISCORD_DESCRIPTION= # How to describe the NFT

ITEM_NAME= # Contract Token Name
ITEM_ABBR= # Cotract Token Abbr

METHOD_NAMES= # Comma delimited list of Contract Method Names or Method IDs
  1. Install dependencies:
npm install
  1. Run:
npm start

How it works

This bot works by listening to the Transfer event on a smart contract. This approach has the following advantages:

  • provides a near real-time experience (events are emitted after a block is created)
  • doesn't abuse the OpenSea API by periodically fetching it
  • relying on a simple callback results in cleaner code

Notes

Known Errors

/workspace/node_modules/@ethersproject/logger/src.ts/index.ts:225
        const error: any = new Error(message);
                           ^
Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.4.5)

genesis-bot's People

Contributors

nathanprayzo avatar treppers 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.