henkaku-center / badge

4 stars 3 forks source link

Feature: Burn #15

Closed alecrem closed 2 years ago

alecrem commented 2 years ago

Closes #9

Tasks:

Objective

Features

Spec


  HenkakuBadge
    burn
      ✔ owner burns own token successfully
      ✔ owner burns alice's token successfully
      ✔ alice burns own token successfully (42ms)
      ✔ reverts with Badge Not Exists
      ✔ reverts with Invalid: NOT HOLDER
      ✔ reverts with NOT HAVE AUTHORITY
SamuraiT commented 2 years ago

this one helps you ! https://github.com/henkaku-center/kamon-nft/pull/33/files#diff-091a64f3ece8473484ef0f9f24718ed5e3f9e669991fa082bbbc30719df20459R231

alecrem commented 2 years ago

@SamuraiT Thank you!

So, about what I was asking on the issue, does only the contract owner need to be able to burn people's tokens?

No need for holders to be able to burn?

SamuraiT commented 2 years ago

does only the contract owner need to be able to burn people's tokens?

should be only owner function. actually it is ok user to burn their badges too

alecrem commented 2 years ago

Thank you! I'll try to make both functions.

github-actions[bot] commented 2 years ago

 ·-----------------|-------------|---------------·
 |  Contract Name  ·  Size (KB)  ·  Change (KB)  │
 ··················|·············|················
 |  console        ·      0.086  ·               │
 ··················|·············|················
 |  Counters       ·      0.086  ·               │
 ··················|·············|················
 |  Address        ·      0.086  ·               │
 ··················|·············|················
 |  ERC1155        ·      9.858  ·               │
 ··················|·············|················
 |  HenkakuBadge   ·     13.739  ·       +1.848  │
 ·-----------------|-------------|---------------·
github-actions[bot] commented 2 years ago

 ·-----------------|-------------|---------------·
 |  Contract Name  ·  Size (KB)  ·  Change (KB)  │
 ··················|·············|················
 |  console        ·      0.086  ·               │
 ··················|·············|················
 |  Address        ·      0.086  ·               │
 ··················|·············|················
 |  Counters       ·      0.086  ·               │
 ··················|·············|················
 |  MockERC20      ·      4.691  ·               │
 ··················|·············|················
 |  ERC20          ·      4.691  ·               │
 ··················|·············|················
 |  ERC1155        ·      9.858  ·               │
 ··················|·············|················
 |  HenkakuBadge   ·     16.372  ·       +1.609  │
 ·-----------------|-------------|---------------·
github-actions[bot] commented 2 years ago

 ·-----------------|-------------|---------------·
 |  Contract Name  ·  Size (KB)  ·  Change (KB)  │
 ··················|·············|················
 |  console        ·      0.086  ·               │
 ··················|·············|················
 |  Address        ·      0.086  ·               │
 ··················|·············|················
 |  Counters       ·      0.086  ·               │
 ··················|·············|················
 |  MockERC20      ·      4.691  ·               │
 ··················|·············|················
 |  ERC20          ·      4.691  ·               │
 ··················|·············|················
 |  ERC1155        ·      9.858  ·               │
 ··················|·············|················
 |  HenkakuBadge   ·     16.372  ·       +1.609  │
 ·-----------------|-------------|---------------·
github-actions[bot] commented 2 years ago

 ·-----------------|-------------|---------------·
 |  Contract Name  ·  Size (KB)  ·  Change (KB)  │
 ··················|·············|················
 |  console        ·      0.086  ·               │
 ··················|·············|················
 |  Address        ·      0.086  ·               │
 ··················|·············|················
 |  Counters       ·      0.086  ·               │
 ··················|·············|················
 |  MockERC20      ·      4.691  ·               │
 ··················|·············|················
 |  ERC20          ·      4.691  ·               │
 ··················|·············|················
 |  ERC1155        ·      9.858  ·               │
 ··················|·············|················
 |  HenkakuBadge   ·     16.915  ·       +1.609  │
 ·-----------------|-------------|---------------·
github-actions[bot] commented 2 years ago

 ·-----------------|-------------|---------------·
 |  Contract Name  ·  Size (KB)  ·  Change (KB)  │
 ··················|·············|················
 |  console        ·      0.086  ·               │
 ··················|·············|················
 |  Address        ·      0.086  ·               │
 ··················|·············|················
 |  Counters       ·      0.086  ·               │
 ··················|·············|················
 |  MockERC20      ·      4.691  ·               │
 ··················|·············|················
 |  ERC20          ·      4.691  ·               │
 ··················|·············|················
 |  ERC1155        ·      9.858  ·               │
 ··················|·············|················
 |  HenkakuBadge   ·     16.852  ·       +1.546  │
 ·-----------------|-------------|---------------·
github-actions[bot] commented 2 years ago

 ·-----------------|-------------|---------------·
 |  Contract Name  ·  Size (KB)  ·  Change (KB)  │
 ··················|·············|················
 |  console        ·      0.086  ·               │
 ··················|·············|················
 |  Address        ·      0.086  ·               │
 ··················|·············|················
 |  Counters       ·      0.086  ·               │
 ··················|·············|················
 |  MockERC20      ·      4.691  ·               │
 ··················|·············|················
 |  ERC20          ·      4.691  ·               │
 ··················|·············|················
 |  ERC1155        ·      9.858  ·               │
 ··················|·············|················
 |  HenkakuBadge   ·     16.746  ·       +1.440  │
 ·-----------------|-------------|---------------·
github-actions[bot] commented 2 years ago

 ·-----------------|-------------|---------------·
 |  Contract Name  ·  Size (KB)  ·  Change (KB)  │
 ··················|·············|················
 |  console        ·      0.086  ·               │
 ··················|·············|················
 |  Address        ·      0.086  ·               │
 ··················|·············|················
 |  Counters       ·      0.086  ·               │
 ··················|·············|················
 |  MockERC20      ·      4.691  ·               │
 ··················|·············|················
 |  ERC20          ·      4.691  ·               │
 ··················|·············|················
 |  ERC1155        ·      9.858  ·               │
 ··················|·············|················
 |  HenkakuBadge   ·     16.777  ·       +1.471  │
 ·-----------------|-------------|---------------·
github-actions[bot] commented 2 years ago

 ·-----------------|-------------|---------------·
 |  Contract Name  ·  Size (KB)  ·  Change (KB)  │
 ··················|·············|················
 |  console        ·      0.086  ·               │
 ··················|·············|················
 |  Address        ·      0.086  ·               │
 ··················|·············|················
 |  Counters       ·      0.086  ·               │
 ··················|·············|················
 |  MockERC20      ·      4.691  ·               │
 ··················|·············|················
 |  ERC20          ·      4.691  ·               │
 ··················|·············|················
 |  ERC1155        ·      9.858  ·               │
 ··················|·············|················
 |  HenkakuBadge   ·     16.781  ·       +1.475  │
 ·-----------------|-------------|---------------·
alecrem commented 2 years ago

@SamuraiT Thank you for the review! I learned a lot with this PR.