Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why cw20-base do not care about minting cap? #339

Closed
pronvis opened this issue Jul 21, 2021 · 5 comments · Fixed by #355
Closed

Why cw20-base do not care about minting cap? #339

pronvis opened this issue Jul 21, 2021 · 5 comments · Fixed by #355

Comments

@pronvis
Copy link
Contributor

pronvis commented Jul 21, 2021

@ethanfrey
Copy link
Member

@pronvis
Copy link
Contributor Author

pronvis commented Jul 26, 2021

@ethanfrey mmm, yes, you are right. But this cap checks total_cap, but comment on cap field says:
https://github.com/CosmWasm/cosmwasm-plus/blob/9c37cca15bd341d44e3e855f92fcf61b5a125b1e/packages/cw20/src/query.rs#L64
issued by the minter
I understand that in this way. If my cap = 100, then at total I can't mint more than 100 tokens. Total supply is a bit different thing, isn't it?

@ethanfrey
Copy link
Member

I understand that in this way. If my cap = 100, then at total I can't mint more than 100 tokens. Total supply is a bit different thing, isn't it?

Then the comment should be updated. My intention when writing it, is "mintable with cap" enforced a maximum supply that can be minted in the end (and if you burn some tokens, this allows you to mint more)

@pronvis
Copy link
Contributor Author

pronvis commented Jul 26, 2021

I didn't know where bug is - in comment or in code. By default I think code is wrong :)

@ethanfrey
Copy link
Member

I made an issue to close this.

As I designed cw20 and wrote most of the implementations, I am pretty clear what was in my head when I wrote the spec and wrote the code which matches it. If I have tested code and it doesn't match the comments, well the tests are the best guide as to what was expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants