I already have a running erc20 smart contract using ink. I want to add mint and burn functions. Can anyone point me to the right direction, e.g., sample code, etc.
-
1May be worthwhile to look at PSP22, specifically: docs.openbrush.io/smart-contracts/PSP22/Extensions/mintable and examples: github.com/Supercolony-net/openbrush-contracts/tree/main/…– Bruno ♦Commented Jun 27, 2022 at 16:29
-
You can also look at the OpenZepplin interface for the functions: docs.openzeppelin.com/contracts/4.x/api/token/…– HCastanoCommented Jul 5, 2022 at 19:22
Add a comment
|
1 Answer
In terms of ink! you could take a look at the OpenBrush reference implementation for PSP-22 implementation. This is a standard akin to ERC-20, but for pallet-contracts
and ink!.
There is an implementation of this standard in the OpenBrush project here.
Documentation on the mint and burn functionality can be found here: