CosmWasm / wasmd

Basic cosmos-sdk app with web assembly smart contracts
Other
364 stars 386 forks source link

Add BuiltInCapabilities() to x/wasm/keeper and deprecate AllCapabilities() #1855

Closed webmaster128 closed 3 months ago

webmaster128 commented 3 months ago

AllCapabilities() is currently used by chains

  1. without additions (https://github.com/cosmos/gaia/pull/3051/files#diff-1ac782d2fab1d48ad7f7ef06cf2d58b37c99b6b4c98879a5ad86a985b73fad58R456)
  2. with additions (https://github.com/CosmosContracts/juno/blob/e98863bf7112f4b117a2114e22f7482367362764/app/keepers/keepers.go#L114)

This is good since it avoids bugs and adds newly added capabilities autimatically in an upgrade.

This PR does not change functionality but improves things in the following ways:

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 54.86%. Comparing base (60375ab) to head (c24d25b). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/CosmWasm/wasmd/pull/1855/graphs/tree.svg?width=650&height=150&src=pr&token=rxXgFH3QTf&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CosmWasm)](https://app.codecov.io/gh/CosmWasm/wasmd/pull/1855?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CosmWasm) ```diff @@ Coverage Diff @@ ## main #1855 +/- ## ========================================== - Coverage 54.87% 54.86% -0.02% ========================================== Files 64 65 +1 Lines 9770 9772 +2 ========================================== Hits 5361 5361 - Misses 3864 3866 +2 Partials 545 545 ``` | [Files](https://app.codecov.io/gh/CosmWasm/wasmd/pull/1855?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CosmWasm) | Coverage Δ | | |---|---|---| | [app/app.go](https://app.codecov.io/gh/CosmWasm/wasmd/pull/1855?src=pr&el=tree&filepath=app%2Fapp.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CosmWasm#diff-YXBwL2FwcC5nbw==) | `85.76% <100.00%> (ø)` | | | [x/wasm/keeper/capabilities.go](https://app.codecov.io/gh/CosmWasm/wasmd/pull/1855?src=pr&el=tree&filepath=x%2Fwasm%2Fkeeper%2Fcapabilities.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CosmWasm#diff-eC93YXNtL2tlZXBlci9jYXBhYmlsaXRpZXMuZ28=) | `100.00% <100.00%> (ø)` | | | [app/wasm.go](https://app.codecov.io/gh/CosmWasm/wasmd/pull/1855?src=pr&el=tree&filepath=app%2Fwasm.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CosmWasm#diff-YXBwL3dhc20uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |