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 BuiltInCapabilities() to x/wasm/keeper and deprecate AllCapabilities() #1855

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

webmaster128
Copy link
Member

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:

  • Better documentation
  • Better function name
  • As Pino highlighted, the symbols from app should not be imported by chains using x/wasm

Copy link
Contributor

@pinosu pinosu left a comment

Choose a reason for hiding this comment

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

Very nice!!!
LGTM 👍

Copy link

codecov bot commented Apr 12, 2024

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

@@            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 Coverage Δ
app/app.go 85.76% <100.00%> (ø)
x/wasm/keeper/capabilities.go 100.00% <100.00%> (ø)
app/wasm.go 0.00% <0.00%> (-100.00%) ⬇️

@pinosu pinosu merged commit cec66ae into main Apr 12, 2024
16 checks passed
@pinosu pinosu deleted the add-BuiltInCapabilities branch April 12, 2024 13:36
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