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!: prevent implicit burn #1562

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

feat!: prevent implicit burn #1562

wants to merge 7 commits into from

Conversation

MujkicA
Copy link
Contributor

@MujkicA MujkicA commented Dec 18, 2024

Summary

TransactionBuilder will return an error on .build() if the transaction has input assets that don't have a corresponding change output. To enable burning, .enable_burn() flag has to be set to true.

Breaking Changes

Building transactions that implicitly burn coins will result in an error.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

.filter_map(|input| match input {
Input::ResourceSigned { resource } => resource.coin_asset_id(),
Input::ResourcePredicate { resource, .. } => resource.coin_asset_id(),
_ => None,
Copy link
Contributor

Choose a reason for hiding this comment

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

What about messages , how do we protect against burning them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Messages should now be properly covered as well

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.

3 participants