Skip to content

Add swap simulating RPC#1942

Merged
sam0x17 merged 10 commits intodevnet-readyfrom
feat/sim-swap-rpc
Aug 18, 2025
Merged

Add swap simulating RPC#1942
sam0x17 merged 10 commits intodevnet-readyfrom
feat/sim-swap-rpc

Conversation

@gztensor
Copy link
Contributor

@gztensor gztensor commented Aug 12, 2025

Description

Two RPC calls were added:

  • swapRuntimeApi::simSwapTaoForAlpha
  • swapRuntimeApi::simSwapAlphaForTao

The return value is SwapResult struct:

pub struct SimSwapResult {
    pub tao_amount: TaoCurrency,
    pub alpha_amount: AlphaCurrency,
    pub tao_fee: TaoCurrency,
    pub alpha_fee: AlphaCurrency,
}

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run cargo fmt and cargo clippy to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

image

Copy link
Contributor

@ales-otf ales-otf left a comment

Choose a reason for hiding this comment

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

hi Greg! could you, please, take a look at my comments?

@gztensor gztensor marked this pull request as draft August 12, 2025 21:35
@gztensor gztensor requested a review from ales-otf August 18, 2025 15:50
ales-otf
ales-otf previously approved these changes Aug 18, 2025
@gztensor gztensor marked this pull request as ready for review August 18, 2025 15:55
@gztensor gztensor added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Aug 18, 2025
@sam0x17 sam0x17 merged commit ffa23bc into devnet-ready Aug 18, 2025
54 of 56 checks passed
@RyanZhuu
Copy link

Can the websites in the Screenshots be accessed? Could you please provide the URLs?

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

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants