Skip to content

feat(solana-swap): solana swap protocol v1 POC#2091

Merged
shamardy merged 24 commits intodevfrom
solana-swaps-poc
Jun 24, 2024
Merged

feat(solana-swap): solana swap protocol v1 POC#2091
shamardy merged 24 commits intodevfrom
solana-swaps-poc

Conversation

@r2st
Copy link
Copy Markdown

@r2st r2st commented Mar 27, 2024

Implementation of the following SwapOps trait methods for SolanaCoin in the defi framework:

  • send_maker_payment
  • send_taker_spends_maker_payment
  • send_maker_refunds_payment

Test cases for:

  • send and spend
  • send and refund

@r2st r2st changed the title feat(solana-swap):solana swap protocol v1 POC feat(solana-swap):solana swap protocol v1 POC - progress Mar 27, 2024
@r2st r2st changed the title feat(solana-swap):solana swap protocol v1 POC - progress feat(solana-swap):solana swap protocol v1 POC - in progress Mar 27, 2024
@shamardy shamardy changed the title feat(solana-swap):solana swap protocol v1 POC - in progress feat(solana-swap):solana swap protocol v1 POC Mar 27, 2024
@shamardy shamardy changed the title feat(solana-swap):solana swap protocol v1 POC feat(solana-swap): solana swap protocol v1 POC Mar 27, 2024
Copy link
Copy Markdown
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! This is the first review iteration concerned with cleaning up the code a bit so I can easily review it.

@shamardy
Copy link
Copy Markdown
Collaborator

shamardy commented Jun 6, 2024

@mj-blockydevs first step is to merge with latest dev to resolve conflicts

Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
@mj-blockydevs
Copy link
Copy Markdown

Recent updates:

  • Merged the dev branch into the solana-swaps-poc branch.
  • Resolved all conflicts.
  • Made it possible to run and build the app without the --feature enable-solana flag.
  • Implemented Clippy suggestions.
  • Updated tests to work correctly with new function implementations.

Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
Copy link
Copy Markdown
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fixes! Next review iteration!

Copy link
Copy Markdown

@laruh laruh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some small notes for now

…ion async instead of fut, better error handling, log used in tests instead of print, redundant test removed

Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
@mj-blockydevs
Copy link
Copy Markdown

@shamardy @laruh

Here are the recent adjustments based on your PR reviews:

  • Grouped and sorted use statements in solana.rs and solana_tests.rs.
  • Renamed functions: get_transaction_details and sign_and_send_transaction to reflect their swap association. Also, made the public function sign_and_send_transaction async.
  • Improved error handling to address possible panics.
  • Replaced print statements in tests with log.
  • Removed a redundant test added in my previous set of changes.

Feel free to let me know if there is anything else we should adjust before merging this stage of the work. To use a different source of constants, I need them to be accepted in this PR.

Copy link
Copy Markdown

@borngraced borngraced left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!. only one comment after taking a quick look.

Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
Copy link
Copy Markdown
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last comment from my side! Once all previous unresolved comments are fixed alongside the below one I approve this PR.

Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
laruh
laruh previously approved these changes Jun 21, 2024
Copy link
Copy Markdown

@laruh laruh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes, LGTM!

…recently deployed one

Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
Copy link
Copy Markdown
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@shamardy shamardy merged commit 2e0b3ca into dev Jun 24, 2024
@shamardy shamardy deleted the solana-swaps-poc branch June 24, 2024 13:21
dimxy pushed a commit that referenced this pull request Jul 3, 2024
* dev:
  fix(restrictions): remove wallet-only restriction from max_maker_vol (#2153)
  feat(tendermint): support unsigned txs for ledger's keplr extension (#2148)
  chore(toolchain): upgrade to 1.72 nightly (#2149)
  feat(solana-swap): solana swap protocol v1 POC (#2091)
  fix(docs): update cargo test command (#2144)
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.

5 participants