Skip to content

NFT sales monitoring bot of the Ethereum blockchain. (ERC721, ERC1155)

License

Notifications You must be signed in to change notification settings

fixonz/ethereum-nft-sales-bot

Repository files navigation

Ethereum NFT Sales Bot

NFT sales monitoring bot of the Ethereum blockchain. (ERC721, ERC1155)

GitHub license GitHub branch checks state

Market Coverage

GIF Generator for Bundle Sale


Prerequisites

Notify Method

  • Twitter

  • Discord

Notification is optional. You can turn it on in the ./.env file.

For example:

TWITTER_ENABLED=1
DISCORD_ENABLED=1

config/setup.js (Default is off).

Twitter Guide

  1. Register Twitter developer account with Elevated access. 🔗 Link

  2. Create a development app with OAuth 1.0a read-write permissions. 🔗 Link

  3. Install Twurl and run following command:

    twurl authorize --consumer-key <your-app-key> --consumer-secret <your-app-secret>
    

    This will return an URL that you should open up in your browser. Authenticate to Twitter, and then enter the returned PIN back into the terminal.

    This should create a file called .twurlrc in your home directory with all the necessary information.

Discord Guide

  1. Open the Discord channel you want to receive sales event notifications.
  2. From the channel menu, select Edit channel.
  3. Select Integrations.
  4. Select Create Webhook.
  5. Enter the name of the bot that will post the message.
  6. Copy the URL from the WEBHOOK URL field.
  7. Click Save.

Configuration

Create an .env file in the root directory of the project with the following contents:

CONTRACT_ADDRESS=
OPENSEA_API_KEY=
ALCHEMY_API_KEY=
ETHERSCAN_API_KEY=
TWITTER_API_KEY=
TWITTER_API_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_SECRET=
WEBHOOK_URL=

Do not commit/include your .env file in your repository.

Installation

npm install

Run Test

To ensure your configuration(.env) is correct, run the following command:

npm test

The test should take less than a minute to run. If it fails, please check your configuration.

Usage

Run the following command to start the bot:

node app.js

To test a certain transaction for debugging purposes, run the following command:

node app.js -t <transaction hash>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Credits

Daniel Griffin @dsgriffin

NFT Sales Twitter Bot

LICENSE

This project is MIT licensed.

About

NFT sales monitoring bot of the Ethereum blockchain. (ERC721, ERC1155)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%