-
Notifications
You must be signed in to change notification settings - Fork 31
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: detaching StoreCodeAndInstantiateContract from wasm's tx.proto #625
feat: detaching StoreCodeAndInstantiateContract from wasm's tx.proto #625
Conversation
Signed-off-by: zemyblue <[email protected]>
Codecov Report
@@ Coverage Diff @@
## feat/wasm_refactor #625 +/- ##
======================================================
+ Coverage 60.19% 60.45% +0.25%
======================================================
Files 817 825 +8
Lines 94971 95654 +683
======================================================
+ Hits 57169 57827 +658
- Misses 34329 34370 +41
+ Partials 3473 3457 -16
|
…m/wasm/v1`. Signed-off-by: zemyblue <[email protected]>
Signed-off-by: zemyblue <[email protected]>
Signed-off-by: zemyblue <[email protected]>
Signed-off-by: zemyblue <[email protected]>
@@ -135,18 +135,6 @@ message UnpinCodesProposal { | |||
repeated uint64 code_ids = 3 [(gogoproto.customname) = "CodeIDs", (gogoproto.moretags) = "yaml:\"code_ids\""]; | |||
} | |||
|
|||
// UpdateStatusProposal gov proposal content type to update the contract status. | |||
message UpdateContractStatusProposal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this proposal's role is to modify the smart contract as inactive or active. This is the one of contract blacklist functions. I'll add the contract blacklist function through another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that the blacklist functions will replace the msg we previously added on our own?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shiki-tak , Yes, I'll have a plan to add the contract blacklist data in the genesisState. So I'll add it to sixth index in the genesisState like below.
message GenesisState {
….
// GenMsgs has wasmd sdk type messages to execute in the genesis phase
repeated cosmwasm.wasm.v1.GenesisState.GenMsgs gen_msgs = 5 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "gen_msgs,omitempty"];
// InactiveContractAddresses is a list of contract address that set inactive
repeated string inactive_contract_addresses = 6 [(gogoproto.jsontag) = "inactive_contract_address, omitempty"];
}
In this case, the contract blacklist are saved in the genesisState, and when every contract is executed, it is checked if it is blacklist contract or not. it is a little difference with current checking system.
Co-authored-by: Sujong Lee <[email protected]>
Signed-off-by: zemyblue <[email protected]>
Signed-off-by: zemyblue <[email protected]>
Signed-off-by: zemyblue <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
related: #623
Detach custom changes proto from original cosmwasm proto
Detach custom proto change in
cosmwasm/wasm/v1/
StoreCodeAndInstantiateContract
fromcosmwasm/wasm/v1/tx.proto
tolbm/wasm/v1/tx.proto
UpdateContractStatusProposal
fromcosmwasm/wasm/v1/proposal.proto
tolbm/wasm/v1/proposal.proto
ContractStatus
type fromcosmwasm/wasm/v1/types.protp
tolbm/wasm/v1/types.proto
Change to original type
gas_multiplier
,instance_cost
andcompile_cost
ofParams
incosmwasm/wasm/v1/types.proto
. And create newParams
for lbm's genesis tolbm/wasm/v1/types.proto
status
ofContractInfo
incosmwasm/wasm/v1/types.proto
Add new genesis proto in
lbm/wasm/v1/
Remove custom contract blacklist function
This contract blacklist function will be added through another PR.
Motivation and context
How has this been tested?
Screenshots (if appropriate):
Checklist:
CHANGELOG.md
client/docs/swagger-ui/swagger.yaml