Meniole / command-wallet

Commands related to wallet update and query.
0 stars 0 forks source link

@ubiquibot/command-wallet

Allows users to register their wallets to collect rewards.

Prerequisites

Getting Started

  1. Install the dependencies preferably using yarn or bun.
  2. Copy .dev.vars.example to .dev.vars and fill the variables
  3. Generate Supabase types by running
    yarn prebuild
  4. Run the project with yarn wrangler

Example configuration

- plugin: ubiquibot/command-wallet
  name: command-wallet
  id: command-wallet
  description: "Allows users to register their wallets to collect rewards."
  command: "/wallet"
  example: "/wallet ubiquibot.eth"
At this stage, your plugin will fire on your defined events with the required settings passed in from the kernel. You can now start writing your plugin's logic.
  1. Start building your plugin by adding your logic to the plugin.ts file.

Testing a plugin

Worker Plugins

await fetch("http://localhost:4000/", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    stateId: "",
    eventName: "",
    eventPayload: "",
    settings: "",
    ref: "",
    authToken: "",
  }),
});

A full example can be found here.

Action Plugins

Nektos Act - a tool for running GitHub Actions locally.

More information

Examples