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

add_tokens() uses generic coin trait #93

Closed
wants to merge 6 commits into from

Conversation

maurolacy
Copy link
Contributor

@maurolacy maurolacy commented Sep 19, 2020

Simplifies add_tokens() by using GenericCoin.

Requires #533 in cosmwasm-plus.

@maurolacy maurolacy self-assigned this Sep 19, 2020
Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I see you desire to simplify one function, this adds quite a bit of cognitive complexity to the whole system. Coins and Cw20Coins should be easy to pick up for new coders (as the basis of much other contracts). I would not go this approach.

Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking at #92 and #93 I am pretty convinced that making this Trait does not simplify the system, but rather add systemtic complexity in order to simplify one function and thus adds more work to the end user.

I would not pursue this path, but thank you for the idea.

@maurolacy
Copy link
Contributor Author

After looking at #92 and #93 I am pretty convinced that making this Trait does not simplify the system, but rather add systemtic complexity in order to simplify one function and thus adds more work to the end user.

I would not pursue this path, but thank you for the idea.

Yes, this was just an idea, and I wanted to hear your opinion about it. That's why I put it in a different PR. I'm OK with not doing it, and I agree it adds unnecessary complexity.

@maurolacy maurolacy closed this Sep 21, 2020
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 this pull request may close these issues.

2 participants