All Projects → alpineintel → tcrpartybot

alpineintel / tcrpartybot

Licence: MIT license
A Twitter bot for interacting with a TCR without knowing what a blockchain is

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to tcrpartybot

twitter-bot-python-aws-lambda
A simple twitter bot using Python and an AWS Lambda function
Stars: ✭ 23 (-14.81%)
Mutual labels:  twitter-bot
TwitterScraper
Scrape a User's Twitter data! Bypass the 3,200 tweet API limit for a User!
Stars: ✭ 80 (+196.3%)
Mutual labels:  twitter-bot
TwitterAutoReplyBot
This is a tiny Python script that replies to a specified number of tweets containing a specified hashtag.
Stars: ✭ 33 (+22.22%)
Mutual labels:  twitter-bot
Twitterbot en 30
Los bots son relevantes para nosotros, pues automatizan tareas que eventualmente simplificarán trabajo a futuro. En este taller relámpago aprenderemos cómo crear un bot en Twitter usando Python, para de manera automática tuitear frases de un libro. ¡En sólo 30 minutos!
Stars: ✭ 19 (-29.63%)
Mutual labels:  twitter-bot
TraceElements
Tracery grammars for building creative Twitterbots. Contains generative grammars for story-telling, metaphor generation, ironic put-downs, Trumpisms, short poems, etc.
Stars: ✭ 31 (+14.81%)
Mutual labels:  twitter-bot
stock reminder bot
A twitter bot that reminds you of stock and crypto predictions
Stars: ✭ 25 (-7.41%)
Mutual labels:  twitter-bot
himawari bot
Code that runs the twitter.com/himawari8bot bot.
Stars: ✭ 14 (-48.15%)
Mutual labels:  twitter-bot
twpy
Twitter High level scraper for humans.
Stars: ✭ 58 (+114.81%)
Mutual labels:  twitter-bot
Awesome Python Login Model
模拟登陆基本采用的是直接登录或者使用selenium+webdriver的方式,有的网站直接登录难度很大,比如qq空间,bilibili等如果采用selenium就相对轻松一些。
Stars: ✭ 13,953 (+51577.78%)
Mutual labels:  twitter-bot
FSharpDataBot
Twitter robot that outputs Graphs and Statistics from the World Bank Data
Stars: ✭ 21 (-22.22%)
Mutual labels:  twitter-bot
covid19twtbot
A Twitter bot that automatically replies to tweets requesting COVID related resources with links containing information about the availability.
Stars: ✭ 18 (-33.33%)
Mutual labels:  twitter-bot
opensea-sales-twitter-bot
A Twitter bot that tweets Opensea sales for a given collection 🐳
Stars: ✭ 120 (+344.44%)
Mutual labels:  twitter-bot
twitter-bot
Simple Twitter bot using Tweepy and Python
Stars: ✭ 16 (-40.74%)
Mutual labels:  twitter-bot
weatherBot
⛈ A Twitter bot for weather
Stars: ✭ 20 (-25.93%)
Mutual labels:  twitter-bot
love-a-paper
Twitter bot that tweets randomly selected papers from Papers We Love.
Stars: ✭ 20 (-25.93%)
Mutual labels:  twitter-bot
Python-Twitter-Bot
Python Twitter Bot which retweet,like,and follow or tweet texts from file
Stars: ✭ 62 (+129.63%)
Mutual labels:  twitter-bot
coopboost
Grow your twitter audience.
Stars: ✭ 50 (+85.19%)
Mutual labels:  twitter-bot
lowflyingrocks
Twitter bot that tweets when an asteroid passes the Earth
Stars: ✭ 15 (-44.44%)
Mutual labels:  twitter-bot
ColegaDondeEstaMiTFM
Un bot de Twitter que comparte cada hora un TFM hasta que Cristina Cifuentes enseñe el suyo.
Stars: ✭ 14 (-48.15%)
Mutual labels:  twitter-bot
tradoge
DOGE trading bot for instantly buying and selling DOGE cryptocurrency on Binance when Elon Musk tweets about it.
Stars: ✭ 122 (+351.85%)
Mutual labels:  twitter-bot

TCR Party Bot!

This repository implements the brains behind the TCR Party Bot. This bot facilitates all interactions between Twitter and the underlying smart contracts on the blockchain in addition to retweeting all members of the live TCR.

Contributing

Since you're reading this you've probably realized that TCR Party is an open source project! If you're feeling particularly frisky and have a feature that you'd like to see added or a bug that needs to be fixed we'd love for you to contribute.

The best place to get an inside look into our development process is by checking out our issue board and list, which keep track of tasks we're looking to complete. If you notice your request hasn't been already mentioned, feel free to open a ticket to begin discussion. We'd ask that you please open a ticket to discuss feature requests/issues before opening a PR, as we would like to make sure that there is no wasted/duplicated efforts. Nobody likes spending hours building a PR just to see it go stale in the tracker!

Additionally, we require all discussions around TCR Party follow Recurse Center's wonderful code of conduct in order to ensure a welcoming and fun environment for everybody.

Dev environment setup

Prepare dependencies

In order to get started you'll need to first deploy our contracts to a local blockchain. You can find more info on how to do this in the contracts repository.

Additionally, you'll need to have a working installation of Golang and Dep and a local Postgres database to work with.

Set up your environment file

We'll need to set up some variables dependant on your environment to get started. Create a new file in your cloned repository tcrpartybot/.env with the following contents:

API_TOKEN_HASH='some-bcrypt-hash-here'
VIP_BOT_HANDLE=tcrpartyvip
PARTY_BOT_HANDLE=tcrpartybot
DATABASE_URL=postgres://localhost:5432/tcrparty?sslmode=disable
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ENV=
SEND_TWITTER_INTERACTIONS=false
PREREGISTRATION=false
INITIAL_DISTRIBUTION_AMOUNT=3000
GAS_MODIFIER=0
TWITTER_LIST_SLUG=tcr-party-dev

BASE_URL=https://bbd828f3.ngrok.io
SERVER_HOST=0.0.0.0:8080

ETH_NODE_URI=http://localhost:8545
MASTER_PRIVATE_KEY= # Note that this should omit the opening 0x of the private key

TOKEN_ADDRESS=
WALLET_FACTORY_ADDRESS=
TCR_ADDRESS=
START_BLOCK=0

A few notes on the fields:

  • You can generate the API_TOKEN_HASH by using this tool.
  • You'll need to populate TOKEN_ADDRESS, WALLET_FACTORY_ADDRESS and TCR_ADDRESS using the contract addresses that are spit out when you run truffle migrate in the contracts repository.
  • You can leave START_BLOCK at 0 unless you're seeing performance issues when running the initial sync (ie if you're deploying to mainnet or testnet).
  • MASTER_PRIVATE_KEY should be a key with some ETH in its balance, otherwise the bot will run into issues when creating transactions. Ganache provides a list of addresses with 100ETH when you start your development chain.
  • If you want to test with Twitter you'll need to get a consumer key, secret, and env from their developer portal. This is an annoying process and isn't necessary to develop, so don't worry about it if you just want to make some smaller changes or play around.
  • On that note, you should probably keep SEND_TWITTER_INTERACTIONS set to false, as this will tell the bot to avoid attempting to send data to Twitter's API and instead just echo interactions to the console for debugging purposes.

Database setup

Connect to your postgres instance and create a new database entitled tcrparty:

CREATE DATABASE tcrparty;

Ensure whatever role you're using has permission to connect to and modify this database:

GRANT ALL PRIVILEGES ON DATABASE tcrparty TO steve;

Now let's set up our schema! We use Migrate for database migrations, which you can find installation instructions for in their README. You can find a conveniently preconfigured script for running migration commands in bin/migrate.

Once you have migrate set up, you can set up your database by running:

$ bin/migrate up

Starting the server

Once you have everything set up (reminder: did you clone the contracts repository and deploy them onto your local Ganache instance?) you should be able to run the party bot by cding into the tcrpartybot directory and running:

$ go run *.go -repl

Notice the -repl flag, which tells the bot to start an interactive command line for you to simulate various interactions such as DMs, mentions, etc. without needing to use Twitter's API.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].