foundry-full-course-f23 icon indicating copy to clipboard operation
foundry-full-course-f23 copied to clipboard

Twitter bot that congratulates people when they mint an arbitrum NFT

Open PatrickAlphaC opened this issue 2 years ago • 2 comments

Describe the enhancement

Our NFTs allow people to add their twitter handle, it would be awesome if we had a bot tweet to someone's handle whenever they minted an NFT!

Here is the contract: https://arbiscan.io/address/0x39338138414Df90EC67dC2EE046ab78BcD4F56D9#code

Additionally, having a website that shows a real-time list of people minting would be awesome.

I'm down to pay someone to work on this as well!

PatrickAlphaC avatar Jun 07 '23 16:06 PatrickAlphaC

I could try out the bot as soon as I get my Chainlink Spring Hackathon submission up (so in like a few days) if that works

shankars99 avatar Jun 07 '23 21:06 shankars99

@shankars99

That works lovely!

PatrickAlphaC avatar Jun 07 '23 22:06 PatrickAlphaC

Would also be interested in putting this together. Cool little project

lostintime101 avatar Jun 09 '23 20:06 lostintime101

Here's an outline of the steps you can follow to implement this enhancement:

Set up a Twitter Developer Account: To access the Twitter API, you'll need to create a developer account and set up a Twitter App. This will provide you with the necessary API keys and access tokens to authenticate your requests.

Install Twitter API Client Library: Use a Twitter API client library in your preferred programming language (such as Tweepy for Python) to simplify the interaction with the Twitter API. You'll need to install the library and configure it with your API keys and access tokens.

Write the Mint Event Listener: In your smart contract, add an event listener for the "mint" event. Whenever a new NFT is minted, emit this event with the necessary information, such as the owner's Twitter handle.

Connect the Backend and Smart Contract: In your backend application (Flask), set up a listener for the "mint" event using the appropriate Ethereum library (such as Web3.py). When the event is triggered, retrieve the necessary information and call the Twitter API to send a tweet to the specified Twitter handle.

Real-time List of People Minting: To display a real-time list of people minting NFTs, you can use WebSockets or a similar technology to establish a bi-directional communication channel between the backend and the frontend. Whenever a new "mint" event is received in the backend, send the updated list of minted NFTs to the frontend through the WebSocket connection.

Update the Frontend: In your frontend application (React), subscribe to the WebSocket connection to receive the real-time updates of minted NFTs. Update the list displayed on the website whenever a new NFT is minted.

Nkemjieme avatar Jun 10 '23 07:06 Nkemjieme

Working on it.

egeaybars123 avatar Jun 10 '23 15:06 egeaybars123

Hey, I'm interested. I will like to work with someone on this. Kindly check my bio and dm me on twitter.

d1-dblaze avatar Jun 10 '23 15:06 d1-dblaze

Working on this

0xAnon0602 avatar Jun 10 '23 16:06 0xAnon0602

Hi guys, here to help!

RomitoVincenzo avatar Jun 10 '23 16:06 RomitoVincenzo

Hey Patrick. I'd be really interested in working on this.

Ankur-Thakur-NEU avatar Jun 10 '23 16:06 Ankur-Thakur-NEU

Let's get it started

I am taking up this

michealfortunatus avatar Jun 10 '23 17:06 michealfortunatus

Deployed a local version here https://twitter.com/matic_eth (Tested with Uniswap's Transfer events)

Let me know if you want me to finish this

kanvgupta avatar Jun 10 '23 18:06 kanvgupta

@PatrickAlphaC Was able to get this working https://github.com/0xAnon0602/Foundery-Course-Twitter-Bot

0xAnon0602 avatar Jun 10 '23 18:06 0xAnon0602

it's time to dig hands on this project. I am going to start working on this project.

usman-2000 avatar Jun 10 '23 19:06 usman-2000

Had some fun with this. (and some not fun dealing with Twitter API)

Frontend Trackoor

Twitter Bot

Backend node.js service running on Amazon EC2.

Repositoory

Markeljan avatar Jun 11 '23 00:06 Markeljan

To those on this project , is the free API , being used for this ? the lowest tier is at 100USD a month .. ?

tormentr avatar Jun 11 '23 12:06 tormentr

If by any chance this is what you wanted to see - let me know :) https://twitter.com/axrisi/status/1667874938928111617

turazashvili avatar Jun 11 '23 12:06 turazashvili

Done! Frontend Link: https://arb-nft-frontend.vercel.app/ Twitter Bot: https://twitter.com/FoundryCongrats

Our bot is NOT working locally. We created a MongoDB database and a NodeJs script which is deployed in a cloud server.

egeaybars123 avatar Jun 11 '23 21:06 egeaybars123

Going to close this issue for now, as a few people made an MVP and they all look cool! Looking at them all now.

PatrickAlphaC avatar Jun 12 '23 18:06 PatrickAlphaC

@kanvgupta @0xAnon0602 @0xn4de @Markeljan @egeaybars123

Let's DM - I'm @PatrickAlphaC on telegram. Everyone else please stop working on this!

PatrickAlphaC avatar Jun 12 '23 18:06 PatrickAlphaC

(I'm running an Arbitrum node, if people feel like getting the bot to query the blockchain for free... not sure what your polling rate / RPC consumption is going to be.)

RichardPalladino avatar Jun 23 '23 04:06 RichardPalladino

Describe the enhancement

Our NFTs allow people to add their twitter handle, it would be awesome if we had a bot tweet to someone's handle whenever they minted an NFT!

Here is the contract: https://arbiscan.io/address/0x39338138414Df90EC67dC2EE046ab78BcD4F56D9#code

Additionally, having a website that shows a real-time list of people minting would be awesome.

I'm down to pay someone to work on this as well!

I would love to do this.

Muhammad-Shahrukh-Azeem avatar Jun 23 '23 12:06 Muhammad-Shahrukh-Azeem

You guys are RAD! Super fast turnaround. I just minted a couple NFTs and wouldn't you know it got instantly posted to Twitter.

RichardPalladino avatar Jun 23 '23 19:06 RichardPalladino