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

feat: adds transferMultipleSpore and meltMultipleThenCreateSpore #126

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

code-monad
Copy link
Contributor

What does this PR do

This PR adds a Multiple-variants for function transferSpore, meltThenCreateSpore, brings the ability to operate multiple Spore assets in a single compacted transaction.

Also adds the necessary unit test for these two function.

About Fee payments behavior

I've also checked and fixed the fee payment part of the original meltThenCreateSpore.

The Zero-Fee feature will only happens if:

  1. Sum of [inputs.capacity] is greater than [outputs.capacity]
  2. [inputs.capacity] - [outputs.capacity] is greater than minimal current on-chain fee-rate

}
}

return txSkeleton;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I recommend to follow its single version that returns transaction skeleton with transferred spore cells index in inputs and outputs

Copy link
Collaborator

Choose a reason for hiding this comment

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

others, LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@SpectreMercury
Copy link
Contributor

LGTM

Copy link
Collaborator

@Hanssen0 Hanssen0 left a comment

Choose a reason for hiding this comment

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

lgtm

@Hanssen0 Hanssen0 merged commit f1a7010 into sporeprotocol:beta Jul 25, 2024
1 check failed
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.

4 participants