Finschia / finschia-sdk

A framework for building blockchains based Finschia Mainnet that is forked from cosmos-sdk
Apache License 2.0
62 stars 29 forks source link

feat: initialize fswap module #1336

Closed 170210 closed 2 months ago

170210 commented 3 months ago

Description

initialize fswap module

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

170210 commented 3 months ago

Is it necessary to update CHANGLOG.md

jaeseung-bae commented 3 months ago

Is it necessary to update CHANGLOG.md

I'm not sure. I think, It's okay to update changelog once when we launch this module to main branch.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 14.10256% with 67 lines in your changes are missing coverage. Please review.

Project coverage is 70.30%. Comparing base (55b6566) to head (fea7a93).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336/graphs/tree.svg?width=650&height=150&src=pr&token=m16qfzIPO7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) ```diff @@ Coverage Diff @@ ## pjdp1 #1336 +/- ## ========================================== - Coverage 70.38% 70.30% -0.08% ========================================== Files 643 654 +11 Lines 54793 54871 +78 ========================================== + Hits 38564 38575 +11 - Misses 14054 14121 +67 Partials 2175 2175 ``` | [Files](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) | Coverage Δ | | |---|---|---| | [x/fswap/types/genesis.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&filepath=x%2Ffswap%2Ftypes%2Fgenesis.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mc3dhcC90eXBlcy9nZW5lc2lzLmdv) | `100.00% <100.00%> (ø)` | | | [x/fswap/types/keys.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&filepath=x%2Ffswap%2Ftypes%2Fkeys.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mc3dhcC90eXBlcy9rZXlzLmdv) | `0.00% <0.00%> (ø)` | | | [x/fswap/keeper/params.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&filepath=x%2Ffswap%2Fkeeper%2Fparams.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mc3dhcC9rZWVwZXIvcGFyYW1zLmdv) | `0.00% <0.00%> (ø)` | | | [x/fswap/types/codec.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&filepath=x%2Ffswap%2Ftypes%2Fcodec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mc3dhcC90eXBlcy9jb2RlYy5nbw==) | `0.00% <0.00%> (ø)` | | | [x/fswap/types/params.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&filepath=x%2Ffswap%2Ftypes%2Fparams.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mc3dhcC90eXBlcy9wYXJhbXMuZ28=) | `66.66% <66.66%> (ø)` | | | [x/fswap/handler.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&filepath=x%2Ffswap%2Fhandler.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mc3dhcC9oYW5kbGVyLmdv) | `0.00% <0.00%> (ø)` | | | [x/fswap/keeper/grpc\_query.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&filepath=x%2Ffswap%2Fkeeper%2Fgrpc_query.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mc3dhcC9rZWVwZXIvZ3JwY19xdWVyeS5nbw==) | `0.00% <0.00%> (ø)` | | | [x/fswap/genesis.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&filepath=x%2Ffswap%2Fgenesis.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mc3dhcC9nZW5lc2lzLmdv) | `0.00% <0.00%> (ø)` | | | [x/fswap/keeper/msg\_server.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&filepath=x%2Ffswap%2Fkeeper%2Fmsg_server.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mc3dhcC9rZWVwZXIvbXNnX3NlcnZlci5nbw==) | `0.00% <0.00%> (ø)` | | | [x/fswap/keeper/keeper.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree&filepath=x%2Ffswap%2Fkeeper%2Fkeeper.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mc3dhcC9rZWVwZXIva2VlcGVyLmdv) | `0.00% <0.00%> (ø)` | | | ... and [1 more](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1336?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) | |
170210 commented 2 months ago

Please ignore codecov, this is just a initial template.

170210 commented 2 months ago

Should I remove this part. I think it should be init in genesis.go, because this is calculated by the current fnsa amounts. https://github.com/Finschia/finschia-sdk/blob/65b25b869458fdded81229ee43b42dcfc30bf083/proto/lbm/fswap/v1/params.proto#L13-L15

170210 commented 2 months ago

I heard that it is a constant value. Should we make a query for it? If it is needed, I think we can add it to the following query. https://github.com/Finschia/finschia-sdk/blob/4e0771a4be1e438ca31c2647976d2d6ed76f8b16/proto/lbm/fswap/v1/query.proto#L25-L29