We have to implement Credit Issuance logic. Boilerplate is already generated. There's a msg_server_issue_credits.go
were we should put most of the logic.
CreditBatchIssuance
is the MsgIssueCredits
body and it contains:
project_id
- we can identify both Collector and Credit Class with it
total_amount
which is the overall credit amount to be minted for this operation. We might already make possible to issue both active and retired credits (Regen does that, TBD, @bjaanes)
batch_denom
should be created from credit_class_denom
and some kind of a suffix. The assumption for now is that the suffix should be generated automatically in some way, but we may want to change that so it can be provided by the user. Then we'll have to extend CreditBatchIssuance
with the suffix, TBD, @bjaanes.
We should leave TODO for the access control implementation as it will be addressed by a different issue.
Issuing credits should update CreditBatch
store, CreditDenom
list and BatchDenomToCreditBalance
store. Make sure that the suffix used for the store is the address of the credits' owner.