go-bitsong icon indicating copy to clipboard operation
go-bitsong copied to clipboard

PayNftIssueFee method

Open giorgionocera opened this issue 3 years ago • 2 comments

In the nft module, inside the nft/keeper/nft.go file, it is defined the PayNftIssueFee method

https://github.com/bitsongofficial/go-bitsong/blob/84691c819214a1f9b9dd844ea2b49b7ccc8ece1b/x/nft/keeper/nft.go#L106-L120

This method is responsible for deducting the fees for the NFT issue action. I have three suggestions on this method:

  1. We could rename it from PayNftIssueFee to deductIssueFee as it is named on the fantoken module;
  2. We could follow the generic go error pattern. In such a scenario, we could check if ! fee.IsPositive() and in this case, return nil. Otherwise, follow the operations required for positive fees.
  3. ~~ATM, the fees spent to issue a new NFT are sent to the module and next they are burned. Instead, we could think to move them to the Community Pool funds, as we do now on the fantoken module, since it is not active any anti-inflation campaign.~~(moved to #218)
  4. Extra: Moreover, we could also think to move it in another file fees.go. What do you think?

giorgionocera avatar Sep 29 '22 15:09 giorgionocera

Burning tokens was what I have discussed with Angelo, would like to get his comment. @angelorc

ryusmo avatar Sep 30 '22 17:09 ryusmo

For rest of the comments, it makes sense to change.

ryusmo avatar Sep 30 '22 17:09 ryusmo