go-bitsong
go-bitsong copied to clipboard
PayNftIssueFee method
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:
- We could rename it from
PayNftIssueFeetodeductIssueFeeas it is named on thefantokenmodule; - 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. - ~~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
fantokenmodule, since it is not active any anti-inflation campaign.~~(moved to #218) - Extra: Moreover, we could also think to move it in another file
fees.go. What do you think?
Burning tokens was what I have discussed with Angelo, would like to get his comment. @angelorc
For rest of the comments, it makes sense to change.