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

feat: add inactive contract management in wasm. #646

Closed

Conversation

zemyblue
Copy link
Member

@zemyblue zemyblue commented Aug 18, 2022

Description

related: #623

This PR is the function that replacing previous contract blacklist management.
The previous contract blacklist management function was managed in the contract status of wasm genesisStatus I
But in order that we added this function in the contract status, we needed to customize original genesis proto.

So I add new lbm's genesis proto and add inactive contract list in lbm's genesisStatus without modifying original genesisStatus.

Therefore, I add new wrapping structure like below UML.
lbmwasm_main

Change smart contract blacklist function

  • The smart contract blacklist is managed in inactiveContractAddresses of wasm GenesisState.
  • Enable to add and remote to blacklist via DeactivateContractProposal and ActivateContractProposal proposal.
  • Add DeactivateContractProposal and ActivateContractProposal proposal cli.

Notice : InitGenesis function of wrapped lbm wasm wasn't implemented, because this need to implement in wasm/keeper but if then the import cycle problem is occurred. So, I will modify the addition of 'InitGenesis' and the linkage with the blacklist of the 'bankplus' module to another PR.

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

@zemyblue zemyblue marked this pull request as draft August 18, 2022 10:16
@zemyblue zemyblue self-assigned this Aug 18, 2022
@codecov
Copy link

codecov bot commented Aug 18, 2022

Codecov Report

❗ No coverage uploaded for pull request base (feat/wasm_refactor@0f5056f). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                  Coverage Diff                  @@
##             feat/wasm_refactor     #646   +/-   ##
=====================================================
  Coverage                      ?   60.54%           
=====================================================
  Files                         ?      833           
  Lines                         ?    96051           
  Branches                      ?        0           
=====================================================
  Hits                          ?    58153           
  Misses                        ?    34416           
  Partials                      ?     3482           

@zemyblue zemyblue marked this pull request as ready for review August 24, 2022 12:00
@zemyblue
Copy link
Member Author

It is difficult to apply our change of gas config setting with lbm wrapping way. Because the gas config setting of cosmwasm/wasmd is private field and It can't change with param or wrap the struct.

So I'll close this PR and try to change the refactoring way.

@zemyblue zemyblue closed this Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant