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

Injective math: decimal type #82

Closed
tk-o opened this issue Nov 2, 2022 · 1 comment
Closed

Injective math: decimal type #82

tk-o opened this issue Nov 2, 2022 · 1 comment

Comments

@tk-o
Copy link

tk-o commented Nov 2, 2022

I noticed you've been maintaining your own decimal type. A while ago, I worked on [a basic SignedDecimal type for CosmWasm]( (https://github.com/atomiklabs/atl-cw/blob/master/packages/signed-decimal/src/signed_decimal.rs). It is based on cosmwasm_std::Decimal type.

Perhaps you'd like to use this type which is interoperable with the underlying type from CosmWasm STD.

I was wondering what are your thoughts about it? Thank you in advance for taking a look 🙃

@gorgos
Copy link
Member

gorgos commented Dec 19, 2022

Thanks for the suggestion. We actually used https://github.com/nebula-protocol/nebula-contracts/tree/main/libraries/cluster-math/src/fp_decimal as initial reference, but added several features/fixes to it over time.

CosmWasm has an open issue about this here CosmWasm/cosmwasm#1186 in case you want to share. They have signed decimals planned, maybe you'd like to share your code there. And once signed decimals are supported by CosmWasm itself, it definitely makes sense for us to switch.

@gorgos gorgos closed this as completed Dec 19, 2022
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

No branches or pull requests

2 participants