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

update interface proto annotations #1156

Merged
merged 3 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions proto/cosmwasm/wasm/v1/authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ option (gogoproto.goproto_getters_all) = false;
// ContractExecutionAuthorization defines authorization for wasm execute.
// Since: wasmd 0.30
message ContractExecutionAuthorization {
option (cosmos_proto.implements_interface) = "Authorization";
option (cosmos_proto.implements_interface) =
"cosmos.authz.v1beta1.Authorization";

// Grants for contract executions
repeated ContractGrant grants = 1 [ (gogoproto.nullable) = false ];
Expand All @@ -21,7 +22,8 @@ message ContractExecutionAuthorization {
// ContractMigrationAuthorization defines authorization for wasm contract
// migration. Since: wasmd 0.30
message ContractMigrationAuthorization {
option (cosmos_proto.implements_interface) = "Authorization";
option (cosmos_proto.implements_interface) =
"cosmos.authz.v1beta1.Authorization";

// Grants for contract migrations
repeated ContractGrant grants = 1 [ (gogoproto.nullable) = false ];
Expand All @@ -35,20 +37,22 @@ message ContractGrant {

// Limit defines execution limits that are enforced and updated when the grant
// is applied. When the limit lapsed the grant is removed.
google.protobuf.Any limit = 2
[ (cosmos_proto.accepts_interface) = "ContractAuthzLimitX" ];
google.protobuf.Any limit = 2 [ (cosmos_proto.accepts_interface) =
"cosmwasm.wasm.v1.ContractAuthzLimitX" ];

// Filter define more fine-grained control on the message payload passed
// to the contract in the operation. When no filter applies on execution, the
// operation is prohibited.
google.protobuf.Any filter = 3
[ (cosmos_proto.accepts_interface) = "ContractAuthzFilterX" ];
[ (cosmos_proto.accepts_interface) =
"cosmwasm.wasm.v1.ContractAuthzFilterX" ];
}

// MaxCallsLimit limited number of calls to the contract. No funds transferable.
// Since: wasmd 0.30
message MaxCallsLimit {
option (cosmos_proto.implements_interface) = "ContractAuthzLimitX";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzLimitX";

// Remaining number that is decremented on each execution
uint64 remaining = 1;
Expand All @@ -57,7 +61,8 @@ message MaxCallsLimit {
// MaxFundsLimit defines the maximal amounts that can be sent to the contract.
// Since: wasmd 0.30
message MaxFundsLimit {
option (cosmos_proto.implements_interface) = "ContractAuthzLimitX";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzLimitX";

// Amounts is the maximal amount of tokens transferable to the contract.
repeated cosmos.base.v1beta1.Coin amounts = 1 [
Expand All @@ -70,7 +75,8 @@ message MaxFundsLimit {
// the maximal number of calls executable. Both need to remain >0 to be valid.
// Since: wasmd 0.30
message CombinedLimit {
option (cosmos_proto.implements_interface) = "ContractAuthzLimitX";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzLimitX";

// Remaining number that is decremented on each execution
uint64 calls_remaining = 1;
Expand All @@ -85,14 +91,16 @@ message CombinedLimit {
// message.
// Since: wasmd 0.30
message AllowAllMessagesFilter {
option (cosmos_proto.implements_interface) = "ContractAuthzFilterX";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzFilterX";
}

// AcceptedMessageKeysFilter accept only the specific contract message keys in
// the json object to be executed.
// Since: wasmd 0.30
message AcceptedMessageKeysFilter {
option (cosmos_proto.implements_interface) = "ContractAuthzFilterX";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzFilterX";

// Messages is the list of unique keys
repeated string keys = 1;
Expand All @@ -102,7 +110,8 @@ message AcceptedMessageKeysFilter {
// executed.
// Since: wasmd 0.30
message AcceptedMessagesFilter {
option (cosmos_proto.implements_interface) = "ContractAuthzFilterX";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzFilterX";

// Messages is the list of raw contract messages
repeated bytes messages = 1 [ (gogoproto.casttype) = "RawContractMessage" ];
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmwasm/wasm/v1/proposal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ message UpdateInstantiateConfigProposal {
// and instantiate the contract.
message StoreAndInstantiateContractProposal {
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

// Title is a short summary
string title = 1;
// Description is a human readable text
Expand Down
3 changes: 2 additions & 1 deletion proto/cosmwasm/wasm/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ message ContractInfo {
// Extension is an extension point to store custom metadata within the
// persistence model.
google.protobuf.Any extension = 7
[ (cosmos_proto.accepts_interface) = "ContractInfoExtension" ];
[ (cosmos_proto.accepts_interface) =
"cosmwasm.wasm.v1.ContractInfoExtension" ];
}

// ContractCodeHistoryOperationType actions that caused a code change
Expand Down
77 changes: 39 additions & 38 deletions x/wasm/types/authz.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading