BlockheaderWeb3-Community / autoswappr-backend

Autoswappr backend
0 stars 1 forks source link

Implement Subscription Service for Auto-Swap #2

Open Abeeujah opened 5 hours ago

Abeeujah commented 5 hours ago

Overview

This service processes subscription events emitted when a user opts into the auto-swap feature. It records the user's preferences for swapping tokens automatically.

Payload

The service should handle incoming payloads with the following structure:

Functionality

  1. Create Subscription:

    • Store the user's subscription in the swap_subscription table with:
      • wallet_address
      • to_token
  2. Populate Token-Specific Data:

    • For each from_token, store the token and its swap percentage in the swap_subscription_from_token table.

Acceptance Criteria

Examples

Input Payload:

{
  "wallet_address": "0xUserAddress",
  "to_token": "USDT",
  "from_token": ["STRK", "DAI"],
  "percentage": [50, 50]
}

Database Updates:

Dependencies

0xdevcollins commented 5 hours ago

I'd like to take this issue.

My Background I am a Full Stack Blockchain Developer with proficiency in Solidity/Rust, Next.js, TypeScript, React, and Node.js. I've demonstrated my ability to adjust to a variety of requirements, perform well under pressure, and reliably produce user-centric blockchain solutions with 46 significant contributions spread over 12 OnlyDust projects.

GideonBature commented 4 hours ago

Can I take care of this issue?

my name is Gideon Bature, a Software Engineer with experience working on Rust projects. If assigned this task, will send my first PR within 48 hours.

Thank you!

OWK50GA commented 4 hours ago

Is this issue still available? I'm a Rust developer, and I will like this

mimisavage commented 4 hours ago

Can I be assigned to this?

CEOliam commented 4 hours ago

Is it okay if I take this?

Michaelkingsdev commented 4 hours ago

I'd love to work on this!

Benjtalkshow commented 4 hours ago

Can I tackle this one?

vestor-dev commented 4 hours ago

Can I start working on this? @Abeeujah please kindly assign

Gerson2102 commented 2 hours ago

Hey! I'm Gerson. 👋

Member of Dojo Coding. I have contributed before to other projects like:

Can I work on this issue?

Check my OnlyDust profile, I've contributed to many projects: Profile


Plan to Solve the Issue:

  1. Study the codebase to understand the current structure and functionality.
  2. Understand the problem that needs to be solved by thoroughly reading the issue details.
  3. Leverage all provided resources within the issue to get a better grasp of the task at hand.
  4. If I encounter roadblocks, I will ask questions ASAP in the Telegram group to move forward effectively.
  5. I will open a PR and wait for ur feedback