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

Adding burn contract. #585

Merged
merged 10 commits into from
Jun 26, 2024
Merged

Adding burn contract. #585

merged 10 commits into from
Jun 26, 2024

Conversation

arhamchordia
Copy link
Collaborator

1. Overview

In this PR we are adding Burn contract that will burn the token sent to it.

2. Implementation details

The Burn Coins Contract is a simple smart contract designed to burn the coins sent to it. Here are some highlights of the implementation:

  • The contract consists of an instantiate function to initialize the contract.
  • It includes an execute function that has burn function to handle the execution of coin burning.
  • The contract allows to query the total amount of coins burnt using the query function.

Design Rationale:

  • The contract follows a straightforward design to achieve its primary objective of burning coins.
  • It ensures that burning coins is irreversible to maintain the integrity of the tokenomics.

3. How to test/use

To test or use the Burn Coins Contract, follow these steps:

  • Build the contract locally
  • Change to demos directory
  • Run sh quasar_localnet.sh
  • Run burn.sh

4. Checklist

  • Does the Readme need to be updated?

5. Limitations (optional)

6. Future Work (optional)

Potential future enhancements for the Burn Coins Contract include:

  • Implementing additional functionality for managing burnt coins, such as tracking burnt amounts per user or token.
  • Adding support for configurable burning parameters, such as burn fees or burn rates.

Copy link
Contributor

@0xLaurenzo 0xLaurenzo left a comment

Choose a reason for hiding this comment

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

state should be a bit cleaner, but general structure looks good

smart-contracts/contracts/burn_coins/src/state.rs Outdated Show resolved Hide resolved
@arhamchordia arhamchordia requested review from 0xLaurenzo and removed request for ajansari95 April 1, 2024 14:23
0xLaurenzo
0xLaurenzo previously approved these changes Apr 2, 2024
Copy link
Contributor

@0xLaurenzo 0xLaurenzo left a comment

Choose a reason for hiding this comment

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

lgtm, one nitpick comment

smart-contracts/contracts/burn_coins/src/query.rs Outdated Show resolved Hide resolved
smart-contracts/contracts/burn_coins/src/contract.rs Outdated Show resolved Hide resolved
smart-contracts/Cargo.toml Show resolved Hide resolved
Copy link
Member

@magiodev magiodev left a comment

Choose a reason for hiding this comment

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

just an open discussion to KISS

smart-contracts/contracts/burn_coins/src/state.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@0xLaurenzo 0xLaurenzo left a comment

Choose a reason for hiding this comment

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

2 small comments that I missed first time around, otherwise LGTM

@0xLaurenzo 0xLaurenzo self-requested a review June 25, 2024 14:03
Copy link
Contributor

@0xLaurenzo 0xLaurenzo left a comment

Choose a reason for hiding this comment

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

lgtm

@0xLaurenzo 0xLaurenzo dismissed magiodev’s stale review June 26, 2024 08:16

Changes are applied

@0xLaurenzo 0xLaurenzo merged commit c2b3307 into main Jun 26, 2024
9 checks passed
@arhamchordia arhamchordia deleted the arhamchordia/burn_contract branch August 7, 2024 12:26
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