npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fluence-bot

v1.0.0

Published

Telegram bot: [@fluence_selectors_bot](https://t.me/fluence_selectors_bot)

Downloads

7

Readme

Telegram bot: @fluence_selectors_bot

Bot tries to parse incoming text via prepared selectors and decode them. Selectors are related to:

  • Ethereum features (addresses from private keys, other type of keys (Filecoin))
  • Fluence contracts (function signatures, event signatures, error signatures, and decoding calldata)
  • IPC contracts (function signatures, event signatures, error signatures, and decoding calldata)
  • Fluence specific objects stored in Fluence contracts and Subgraph (e.g. PeerIds, CIDs, etc.)

To interact with the bot you send your message and await that the message could be parsed via all possible selectors for you.

Run

Prepare .env according to .example.env and run npm run dev

Add ABI

There are Foundry artifacts in src/abi directory. You can add (just copy files there), the bot recursively gets all ABI data

Commands

  1. Function selector like a9059cbb or 0xa9059cbb
  2. Event selector like 0x0431ea4d93af299b92f2c606ddcaf4b31cb0013c5ed1fdea837b8a912347c965
  3. Error selector or error data like 0x5416eb988da5cb5b00000000000000000000000000000000000000000000000000000000
  4. Full calldata to decode like 0x0af76b8f0000000000000000000000003d441ee4a0b65d8e3fe939b7b632152837be73fe0000000000000000000000000000000000000000000000056bc75e2d63100000
  5. Private or public keys to get address, in any format like 03... or 04... or Amg7rBBsVeGC/Ufd6gsgD8Jqc7nHV8epXKFmu1XORo2/

Bot welcome text

Bot tries to parse incoming text via prepared selectors and decode them. Selectors are related to: 
 
- Ethereum features (addresses from private keys, other type of keys (Filecoin))
- Fluence contracts (function signatures, event signatures, error signatures, and decoding calldata)
- IPC contracts (function signatures, event signatures, error signatures, and decoding calldata)
- Fluence specific objects stored in Fluence contracts and Subgraph (e.g. PeerIds, CIDs, etc.)

To interact with the bot you send your message and await that the message could be parsed via all possible selectors for you.

Examples of messages:

ℹ️ Send me a message with a function selector to get the function signature.
<code>0xa9059cbb</code>

ℹ️ Send me a message with an event selector to get the event signature.
<code>0x0431ea4d93af299b92f2c606ddcaf4b31cb0013c5ed1fdea837b8a912347c965</code>

ℹ️ Send me a message with an error selector or full error data to get the error signature.
<code>0x5416eb988da5cb5b00000000000000000000000000000000000000000000000000000000</code>

ℹ️ Send me a message with calldata to get the function signature and decoded calldata.
<code>0x0af76b8f0000000000000000000000003d441ee4a0b65d8e3fe939b7b632152837be73fe0000000000000000000000000000000000000000000000056bc75e2d63100000</code>

ℹ️ Send me private or public key in any format (hex like in EVM or base64 from IPC) to get the address.
<code>Amg7rBBsVeGC/Ufd6gsgD8Jqc7nHV8epXKFmu1XORo2/</code>

ℹ️ Send me CIDv1 to get CID in Fluence Subgraph format (yes we have special <a href="https://github.com/fluencelabs/deal/blob/main/subgraph/src/mappings/utils.ts#L37">one</a>).
<code>bafkreids22lgia5bqs63uigw4mqwhsoxvtnkpfqxqy5uwyyerrldsr32ce</code>

ℹ️ Send me PeerId (base58) to get PeerId in hex format (the format that is used in Fluence contracts as well).
<code>12D3KooWCKCeqLPSgMnDjyFsJuWqREDtKNHx1JEBiwaMXhCLNTRb</code>

ToDo

  • [ ] add docker
  • [ ] load abi from the github directly (scheduler)