1

I'd like to create a function (deposit-fungible-v2-burn (account:string amount:decimal token:module{fungible-v2})) that burns amount tokens from the account.

Are there any functions in the fungible-v2 interface for minting/burning coins?

It is perhaps possible to use ROOT account from the token contract, but in that case ROOT would not be an eater account as this account can send(mint) tokens. It is also possible to use custom logic in the token contract itself, but in that case I would not be able to generalize the function for all fungible-v2 tokens.

georgep
  • 731
  • 1
  • 12

1 Answers1

1

No, though I believe the credit/debit functions provide similar functionality. To my knowledge, the burn function from ERC-20 is actually part of an extension to the ERC-20 standard and is not part of the standard itself (see https://docs.openzeppelin.com/contracts/3.x/api/token/erc20#ERC20Burnable ).

You could always try adding your own KIP here to add an extension interface: https://github.com/kadena-io/KIPs

hash-envy
  • 36
  • 4
  • Thank you! Yeap, that's what I eventually have done. I guess there are 2 ways as for now: 1. Use ROOT account to transfer coins from it to the needed account (that is the analogy to the mint function) and some another account (say, EATER) to transfer coins to from the user (and limit credit capability for this specific account) 2. Implement mint and burn directly using credit and debit functions already implemented as you mentioned in your response. – Dmytro Zakharov Jul 19 '22 at 23:51