New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@reality.eth/mastodon-bot

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reality.eth/mastodon-bot

Bot for tweeting out reality.eth questions and answers

  • 1.0.77
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
202
decreased by-14.77%
Maintainers
0
Weekly downloads
 
Created
Source

Mastodon bot

This script will tweet out new reality.eth questions and answers.

It does this by querying the graph endpoints specified in @reality.eth/contracts.

Setting it up

Make a file called secrets/config.json with the settings from the mastodon account create application section

{ "url": "...", "access_token": "...", }

You should also make a directory called state which will store the files tracking how much has been tweeted out so far.

Install dependencies either from packages/mastodon-bot with npm install or from the top level of the repo with lerna bootstrap.

Initializing

cd packages/mastodon-bot

The script is run with

node index.js 1,100

...where 1 and 100 are the chains you wish to tweet about. You can add the chain ID of any other chain with a graph endpoint set in @reality.eth/contracts.

The first time a new chain is initialized it should be run with the init flag.

node index.js 1,100 init

This will create a state file for the chain at the current timestamp. You can edit this manually if you want to tweet some of the existing entries.

Running automatically

Make a cron, eg to run every second we use:

* * * * * cd /home/ed/monorepo-twitter/packages/twitter-bot && node index.js 1,100

Lock files

The script uses lock files under state to ensure only one process is trying to tweet about a given chain at a time. If something breaks and the lock file isn't deleted, you may need to delete this file manually.

Keywords

FAQs

Package last updated on 14 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc