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 asset burn #3540

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

petertonysmith94
Copy link
Contributor

@petertonysmith94 petertonysmith94 commented Jan 3, 2025

Release notes

In this release, we:

  • Added a guard to transaction to ensure that we prevent implicit asset burns

Summary

  • When building a transaction, if inputs are added to a request without respective change outputs, then we will throw an error on sending a transaction.
  • Unless you set the enableBurn flag on the transaction.

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)

@petertonysmith94 petertonysmith94 added the feat Issue is a feature label Jan 3, 2025
@petertonysmith94 petertonysmith94 self-assigned this Jan 3, 2025
Copy link

vercel bot commented Jan 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 5:45pm
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 5:45pm
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 5:45pm

@petertonysmith94 petertonysmith94 changed the title feat: prevent illicit burn feat: prevent illicit asset burn Jan 3, 2025
@petertonysmith94 petertonysmith94 changed the title feat: prevent illicit asset burn feat: prevent implicit asset burn Jan 3, 2025
expect(isStatusSuccess).toEqual(true);
});

it.only('should throw an error when an asset burn is detected', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Oops.

Suggested change
it.only('should throw an error when an asset burn is detected', async () => {
it('should throw an error when an asset burn is detected', async () => {

Copy link
Member

Choose a reason for hiding this comment

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

Oh sorry, it's still a draft. I was going on with the flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent implicit burn
2 participants