Skip to content
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

Adds ability to serialise Raw Sui Swap transactions #4247

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gupnik
Copy link
Collaborator

@gupnik gupnik commented Jan 31, 2025

Description

This PR adds the ability to accept a raw json and serialise into a Sui Transaction.

How to test

Run tests across all platforms

Types of changes

New feature (non-breaking change which adds functionality)

Checklist

  • Create pull request as draft initially, unless its complete.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • If there is a related Issue, mention it in the description.

If you're adding a new blockchain

  • I have read the guidelines for adding a new blockchain.

@gupnik gupnik marked this pull request as ready for review February 3, 2025 12:18
@gupnik gupnik requested a review from Milerius as a code owner February 3, 2025 12:18
@gupnik gupnik changed the title [WIP]: Adds ability to serialise Raw Sui Swap transactions Adds ability to serialise Raw Sui Swap transactions Feb 3, 2025
Copy link

github-actions bot commented Feb 3, 2025

Binary size comparison

➡️ aarch64-apple-ios:

- 12.92 MB
+ 13.04 MB 	 +125 KB

➡️ aarch64-apple-ios-sim:

- 12.92 MB
+ 13.04 MB 	 +125 KB

➡️ aarch64-linux-android:

- 16.78 MB
+ 16.97 MB 	 +196 KB

➡️ armv7-linux-androideabi:

- 14.16 MB
+ 14.31 MB 	 +150 KB

➡️ wasm32-unknown-emscripten:

- 11.89 MB
+ 12.04 MB 	 +157 KB

satoshiotomakan
satoshiotomakan previously approved these changes Feb 3, 2025
Copy link
Collaborator

@satoshiotomakan satoshiotomakan left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +272 to +275
let Some(gas_payment) = gas_payments.first() else {
return SigningError::err(SigningErrorType::Error_invalid_params)
.context("Gas payment is missing from the transaction");
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should not ignore other gas payments. As I can see, TransactionData::new() takes only one gas payment, but GasData allows to store multiple payments.
Please change the signature of the TransactionData::new() function to be able to take a list of gas payments

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