8000 [BOUNTY] Add action for transfer · Issue #16 · solana-foundation/kora · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[BOUNTY] Add action for transfer #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gitteri opened this issue Feb 12, 2025 · 10 comments · May be fixed by #37
Open

[BOUNTY] Add action for transfer #16

gitteri opened this issue Feb 12, 2025 · 10 comments · May be fixed by #37
Labels
bounty An issue that will pay out a bounty if completed

Comments

@gitteri
Copy link
Collaborator
gitteri commented Feb 12, 2025

General Relayer Information

This bounty is to enhance the currently in development relayer that mostly adheres to the Relayer spec. It is developed to be an open source permissionless relayer that anyone can fork and run to support their particular use cases. It is written in Rust and has three crates:

  1. Lib: This is where the core logic of the application exists. Most updates should happen here.
  2. RPC: Thin RPC layer that specifies the endpoints for the Relayer.
  3. CLI: Thin CLI layer to allow for direction interaction with the underlying Relayer functionality through a CLI.

The configuration, kora.toml, lives at the top layer and is processed by lib/config.rs. Specific configuration structs exist for different purposes. For example, “kora” specifies the configuration for the RPC layer including things like a rate limit.

All features should be well tested with unit tests and integration tests if appropriate.

Bounty Feature Request

Add action for transfer

Description:
Add an action according to the action specification for the transfer endpoint. The endpoint should accept the same required parameters for “transferTransaction” and return a signed transaction for processing

Acceptance Criteria:

  • Add an action for “transferTransaction” as an API endpoint in the RPC crate and required actions.json file
  • Adhere to the actions specification.
  • Add tests
  • Show working blink using the action
@gitteri gitteri added the bounty An issue that will pay out a bounty if completed label Feb 12, 2025
@Shiva953
Copy link
Shiva953 commented Feb 14, 2025

Shall we also include a sample example nextjs folder to test out the action(to be included in /src/app/api/action/transferTx/route.ts , or we only include the route.ts file for the action and test it out in another nextjs folder and put that demo?

Also where should the route.ts file be included in this repo?

@narasimha-1511
Copy link

hey i am getting error unable to set up the dev environment can you help @gitteri

Image

@IzzJb1
Copy link
IzzJb1 commented Feb 24, 2025

Feat: Add action for transferTransaction #21
#21

@IzzJb1
Copy link
IzzJb1 commented Feb 24, 2025

Implement transferTransactionV2 Method and Integration Tests #20
#20

@Gmin2
Copy link
Gmin2 commented Feb 28, 2025

Hey @gitteri so should we contstruct a tower::http middleware for parsing the uri to get the query param ? or i am overenginnering stuff that is rather simple

my approach was to

when user interacts with our blink, entering the amount, token, and destination address.

our Action endpoint receives the POST request: It gets the user's wallet address in the account field, along with any parameters from the URL or form then calls the transferTransaction method,
and then parse this response to feed

now we will use this response to return to the action response

I have got the blink get request running but am failing to get the post req working bcz of the above

Image

@gitteri
Copy link
Collaborator Author
gitteri commented Mar 19, 2025

Hey @Gmin2 so sorry I didn't see your comment before. You have two options for this: 1. create a custom middleware to match on get/post request to trigger different functions or 2. run a rest server next to the rpc server. I don't foresee many other actions so option 1 is sane here.

Don't forget to set the cors headers in the middleware for these two endpoints. You should be able to parse the query params when you register the method:

    // Parse query parameters
    let params = rpc_params.parse::<serde_json::Value>()?;

@alhajifocus
Copy link

good

@Timzkhid
Copy link
Timzkhid commented Mar 26, 2025

transferTransaction
#16

@mati0094
Copy link

Good

@kaygolden01
Copy link

This pull request adds the transferTransactionV2 method to the Kora RPC server, allowing users to transfer tokens and receive a signed transaction.
Changes Made:
New Method: Implemented transferTransactionV2 to handle token transfers.
Integration Test: Created a test for transferTransactionV2 in api_integration_tests.rs to ensure it works correctly.
Test JSON File: Added transferTransactionV2.json with example request data.
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty An issue that will pay out a bounty if completed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants
0