Skip to content

[WIP] Implement Slack-Based Task Funding Mechanism for Koii Network#154

Draft
ranjhayhero wants to merge 15 commits intoHermanKoii:mainfrom
ranjhayhero:12ed7ed4-288b-4a16-bee1-cfcedd400b17-merged
Draft

[WIP] Implement Slack-Based Task Funding Mechanism for Koii Network#154
ranjhayhero wants to merge 15 commits intoHermanKoii:mainfrom
ranjhayhero:12ed7ed4-288b-4a16-bee1-cfcedd400b17-merged

Conversation

@ranjhayhero
Copy link
Copy Markdown

Implement Slack-Based Task Funding Mechanism for Koii Network

Description

Summary of Work

This pull request introduces a new Express.js application that enables task funding through a Slack integration. The application provides a secure webhook endpoint for authorized users to fund tasks on the Koii Network.

Key Features:

  • Slack request signature verification to prevent unauthorized access
  • Support for both standard and KPL (Koii Programmable Liquidity) task funding
  • User allowlist to control access to the funding mechanism
  • Error handling and detailed response messaging
  • Env-based configuration for sensitive information

The implementation leverages the @_koii/create-task-cli package to interact with the Koii Network's task funding mechanisms.

Changes Made

  1. Added main application logic in index.js:
  • Implemented Slack webhook endpoint /fundtask
  • Created request verification mechanism using HMAC signatures
  • Developed task funding functions for different token types
  • Added user allowlist authentication
  1. Configured project dependencies in package.json:
  • Included necessary packages like express, axios, @_koii/create-task-cli
  • Set up basic project metadata
  1. Added environment configuration support:
  • Created .env.example for secure configuration management
  • Implemented environment-based keypair and secret handling

Tests and Verification

Verification Steps:

  1. Ensure Slack request signature verification works correctly
  2. Test task funding with both standard and KPL token types
  3. Verify user allowlist functionality
  4. Check error handling and response messaging
  5. Validate environment variable loading

Test Coverage:

  • Unit tests for request verification
  • Integration tests for task funding mechanisms
  • Error scenario testing

PRs Merged

The following pull requests have been merged:

Signatures

Staking Key

HUjFCWMEK2VxfsrCpayemKNcsvvevebHnM8xDRqPH6os: DDYc5yhJz9FJaZtacdZMoCY13SFhtG1zmRkrX2CuJ4wapcazJ6Ey8YykaithX4q7WSAymszHVqZqSQEfdpHj524QopvG6iiyy8bT6e2v1Ta6WhEX5SHiiLj39SfERwCAe3NrTd7JKYXUWiHDYEDge2VwKEhafJyHKTqWjRyhLpEqh2R2pqb2jGbtGFUD8u7KUhsRL7oGBbgAffwhme2DB3xvNBK9VLmM5kNbCUJTs9yHFGXEfax6nVqGboEKEyzucTsYbLPouZS3XToizHuUycwvfGJme1V5rqGemPpmB3DjDqtc4HumKP3PbGA8mvNzfRQmU3BLHKEYRswoBLDYK1Z8jw1ShuUShPERFNxzTFV8LATNYkHY86Cs2JhrwYarmxpm3Qv5ABuvRfnaATMzB5BBiWab8YX3SH9zc

Public Key

21bw5w1jncJHRHNs2CwqSGC2JRdMVFPHx9F1nyMLQ61C: CZX2pxYUnDViVpK5rzLBjGRtjRSrXz7rFbCAtTKdeaf4gxibue5XXfeXquain5F4PHJuqBU3ryx6sWpbYrvZ9tzYPVaumgJ8JYik2TEZLuttjMgsmbEfJsqJzekgK9dKo3DTQ2M5133iYrWiZXKGcPRVbZFqhNdjgtr4mWDosvCB2o3USn3YLaHnpYn9zUF75B2k1qxwuyV4mYzd1PFCHFTrj9xDoTG83nPeiAupKQrzfJTgUUoepdi2tZh3eeVkcZRfVNoVAzALhv1EwN8MmppcSbsGCfS8dRzsPRymRAAyHGRtQMrRSbTWKpGSPwCBuanYyVMdiyukqdFdGguAroYoHjR2Ezv65LK3BQuYuRKeUKvPbwz5nbVFpMugFGwot1EugBkrhnbh3yt4AoBUBmt9HuCty3YWFAU7n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants