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(wasm): add contract access control #144

Closed
wants to merge 4 commits into from

Conversation

whylee259
Copy link
Contributor

@whylee259 whylee259 commented Apr 23, 2021

Description

closes: #126

Add contract status control and execution rejection logic.

  • Add a permission type ContractStatusAccess which defines blacklist control permission.
    The default value is NoBody and it will be modified using gov

  • The ContractStatus is added in ContractInfo states.
    And it has two options Active and Inactive (Unspecified option will be rejected)

  • Add a message MsgUpdateContractStatus for a qualified permission owner to modify the ContractStatus.

  • If the status Inactive, the contract call will be rejected. (Execution, Migration, UpdateAdmin, ClearAdmin)

#131 must be merged first


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@whylee259 whylee259 self-assigned this Apr 23, 2021
@whylee259 whylee259 marked this pull request as draft April 23, 2021 10:31
Yongwoo Lee added 4 commits April 26, 2021 09:31
- add an enum `ContractStatus`
- add a field `status` into ContractInfo
- add a msg `MsgUpdateContractStatus`
- add handler for it
@whylee259 whylee259 force-pushed the whylee/feat/contract-blacklist branch from 0a645d9 to 3b8b771 Compare April 26, 2021 00:33
@whylee259 whylee259 changed the title feat(wasm): add contract blacklist feat(wasm): add contract access control Apr 26, 2021
@whylee259 whylee259 closed this Apr 27, 2021
@whylee259 whylee259 deleted the whylee/feat/contract-blacklist branch April 27, 2021 04:53
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.

VM: Add Contract-Banning Features
1 participant