Skip to content

This bot sends sales data to Loot Project's Discord server.

License

Notifications You must be signed in to change notification settings

jpgboi/loot-nft-sales-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loot NFT Sales Bot

This bot sends sales data to @lootproject's Discord server.


Usage

  1. Create an .env file and set the following secrets:
CONTRACT_ADDRESS= # Smart contract address (0x...)
PROVIDER_URL= # For example Alchemy or Infura URL
DISCORD_WEBHOOK_URL= # Discord Webhook URL (Server Settings -> Integrations -> Webhooks)
  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)

About

This bot sends sales data to Loot Project's Discord server.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published