Extend ContractInfo for custom data (#492)
* Extend ContractInfo with custom data * Review comments
This commit is contained in:
@@ -67,8 +67,11 @@ message QueryContractInfoResponse {
|
||||
|
||||
// address is the address of the contract
|
||||
string address = 1;
|
||||
ContractInfo contract_info = 2
|
||||
[ (gogoproto.embed) = true, (gogoproto.jsontag) = "" ];
|
||||
ContractInfo contract_info = 2 [
|
||||
(gogoproto.embed) = true,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.jsontag) = ""
|
||||
];
|
||||
}
|
||||
|
||||
// QueryContractHistoryRequest is the request type for the Query/ContractHistory
|
||||
@@ -103,8 +106,11 @@ message ContractInfoWithAddress {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string address = 1;
|
||||
ContractInfo contract_info = 2
|
||||
[ (gogoproto.embed) = true, (gogoproto.jsontag) = "" ];
|
||||
ContractInfo contract_info = 2 [
|
||||
(gogoproto.embed) = true,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.jsontag) = ""
|
||||
];
|
||||
}
|
||||
// QueryContractsByCodeResponse is the response type for the
|
||||
// Query/ContractsByCode RPC method
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
syntax = "proto3";
|
||||
package cosmwasm.wasm.v1beta1;
|
||||
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package = "github.com/CosmWasm/wasmd/x/wasm/types";
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
@@ -83,6 +85,11 @@ message ContractInfo {
|
||||
// use for sorting
|
||||
AbsoluteTxPosition created = 5;
|
||||
string ibc_port_id = 6 [ (gogoproto.customname) = "IBCPortID" ];
|
||||
|
||||
// Extension is an extension point to store custom metadata within the
|
||||
// persistence model.
|
||||
google.protobuf.Any extension = 7
|
||||
[ (cosmos_proto.accepts_interface) = "ContractInfoExtension" ];
|
||||
}
|
||||
|
||||
// ContractCodeHistoryOperationType actions that caused a code change
|
||||
|
||||
Reference in New Issue
Block a user