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

replace _spendEncumbrance with _releaseEncumbrance #26

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

scott-silver
Copy link
Collaborator

Now that Coburn is back from leave, revisiting the third encumbrance event.

This approach is an alternative to the EncumbranceSpend event from #25. Coburn has pointed out that the logic of _release and _spendEncumbrance are nearly identical.

This patch merges the two functions (renamed to _releaseEncumbrance). This means that when you spend an encumbrance, a Release event is emitted.

If you want to track an address's encumbrance, you can do so by reading Encumber and Release amounts. If you want to track their balance, you can do so by reading Mint, Transfer and Burn amounts.

Copy link

@coburncoburn coburncoburn left a comment

Choose a reason for hiding this comment

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

🧼

Copy link
Contributor

@kevincheng96 kevincheng96 left a comment

Choose a reason for hiding this comment

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

Looks good!

@scott-silver scott-silver merged commit 28d1fa3 into main Sep 6, 2023
1 check passed
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