tendermint / spn

A blockchain to launch blockchains.
Other
112 stars 41 forks source link

feat: add `MaxMetadataLength` param to campaign keeper #997

Closed Pantani closed 1 year ago

Pantani commented 1 year ago

Closes #541

What does this PR do?

Remove the hardcoded MaxMetadataLength variable storing it to campaign module params, and then access the param from the other launch using its keeper.

How to test?

Run unit tests for the campaign and launch modules.

Checklist

These are the criteria that every PR should meet, please check them off as you review them:

aljo242 commented 1 year ago

Can you run make format?

Pantani commented 1 year ago

Can you run make format?

I already ran it, but sometimes the imports are not grouped correctly, so I manually fixed it and reran it

codecov[bot] commented 1 year ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@a5c747f). Click here to learn what that means. The diff coverage is 92.50%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/tendermint/spn/pull/997/graphs/tree.svg?width=650&height=150&src=pr&token=GMSSU7SM3A&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint)](https://codecov.io/gh/tendermint/spn/pull/997?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint) ```diff @@ Coverage Diff @@ ## main #997 +/- ## ======================================= Coverage ? 71.23% ======================================= Files ? 215 Lines ? 9468 Branches ? 0 ======================================= Hits ? 6745 Misses ? 2550 Partials ? 173 ``` | [Impacted Files](https://codecov.io/gh/tendermint/spn/pull/997?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint) | Coverage Δ | | |---|---|---| | [x/campaign/types/msg\_create\_campaign.go](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint#diff-eC9jYW1wYWlnbi90eXBlcy9tc2dfY3JlYXRlX2NhbXBhaWduLmdv) | `38.70% <ø> (ø)` | | | [x/campaign/types/msg\_edit\_campaign.go](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint#diff-eC9jYW1wYWlnbi90eXBlcy9tc2dfZWRpdF9jYW1wYWlnbi5nbw==) | `40.62% <ø> (ø)` | | | [x/launch/types/msg\_create\_chain.go](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint#diff-eC9sYXVuY2gvdHlwZXMvbXNnX2NyZWF0ZV9jaGFpbi5nbw==) | `69.23% <ø> (ø)` | | | [x/launch/types/msg\_edit\_chain.go](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint#diff-eC9sYXVuY2gvdHlwZXMvbXNnX2VkaXRfY2hhaW4uZ28=) | `58.62% <ø> (ø)` | | | [x/launch/types/params.go](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint#diff-eC9sYXVuY2gvdHlwZXMvcGFyYW1zLmdv) | `86.20% <81.25%> (ø)` | | | [x/campaign/types/params.go](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint#diff-eC9jYW1wYWlnbi90eXBlcy9wYXJhbXMuZ28=) | `89.47% <82.35%> (ø)` | | | [x/campaign/keeper/msg\_create\_campaign.go](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint#diff-eC9jYW1wYWlnbi9rZWVwZXIvbXNnX2NyZWF0ZV9jYW1wYWlnbi5nbw==) | `88.88% <100.00%> (ø)` | | | [x/campaign/keeper/msg\_edit\_campaign.go](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint#diff-eC9jYW1wYWlnbi9rZWVwZXIvbXNnX2VkaXRfY2FtcGFpZ24uZ28=) | `100.00% <100.00%> (ø)` | | | [x/campaign/keeper/params.go](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint#diff-eC9jYW1wYWlnbi9rZWVwZXIvcGFyYW1zLmdv) | `100.00% <100.00%> (ø)` | | | [x/launch/keeper/msg\_create\_chain.go](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint#diff-eC9sYXVuY2gva2VlcGVyL21zZ19jcmVhdGVfY2hhaW4uZ28=) | `93.18% <100.00%> (ø)` | | | ... and [2 more](https://codecov.io/gh/tendermint/spn/pull/997/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tendermint) | |