Skip to content

Commit

Permalink
Merge branch 'main' into impl-interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Nov 13, 2023
2 parents 57824da + c70a4c2 commit 9453fce
Show file tree
Hide file tree
Showing 383 changed files with 13,821 additions and 13,665 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ telescope({
| option | description | defaults |
| ----------------------------------------- | -------------------------------------------------------------- | ---------- |
| `interfaces.enabled` | enables converters convert between Any type and specific implemented interfaces. | `true` |
| `interfaces.useByDefault` | decides if interface decoders are used by default (default for `useInterfaces` argument to `decode` and `toAmino` functions). | `false` |
| `interfaces.useByDefaultRpc` | decides if interface decoders are used by default by the RPC clients. | `false` |
| `interfaces.useUseInterfacesParams` | decides if add `useInterfaces` argument to `decode` and `toAmino` functions. | `false` |
| `interfaces.useByDefault` | decides if interface decoders are used by default (default for `useInterfaces` argument to `decode` and `toAmino` functions). | `true` |
| `interfaces.useByDefaultRpc` | decides if interface decoders are used by default by the RPC clients. | `true` |
| `interfaces.useUnionTypes` | Generate Any type as union types(TextProposal \| RegisterIncentiveProposal) instead of intersection types(TextProposal & RegisterIncentiveProposal). | `false` |

### Prototypes Options
Expand Down Expand Up @@ -978,3 +979,4 @@ Thanks to these engineers, teams and projects for inspiring Telescope:
AS DESCRIBED IN THE TELESCOPE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating Telescope will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Telescope code or Telescope CLI, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.

80 changes: 40 additions & 40 deletions __fixtures__/v-next/outputv2/akash/audit/v1beta1/audit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export const Provider = {
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number, useInterfaces: boolean = true): Provider {
decode(input: BinaryReader | Uint8Array, length?: number): Provider {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseProvider();
Expand All @@ -212,7 +212,7 @@ export const Provider = {
message.auditor = reader.string();
break;
case 4:
message.attributes.push(Attribute.decode(reader, reader.uint32(), useInterfaces));
message.attributes.push(Attribute.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
Expand Down Expand Up @@ -271,12 +271,12 @@ export const Provider = {
attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromAmino(e)) : []
};
},
toAmino(message: Provider, useInterfaces: boolean = true): ProviderAmino {
toAmino(message: Provider): ProviderAmino {
const obj: any = {};
obj.owner = message.owner;
obj.auditor = message.auditor;
if (message.attributes) {
obj.attributes = message.attributes.map(e => e ? Attribute.toAmino(e, useInterfaces) : undefined);
obj.attributes = message.attributes.map(e => e ? Attribute.toAmino(e) : undefined);
} else {
obj.attributes = [];
}
Expand All @@ -285,8 +285,8 @@ export const Provider = {
fromAminoMsg(object: ProviderAminoMsg): Provider {
return Provider.fromAmino(object.value);
},
fromProtoMsg(message: ProviderProtoMsg, useInterfaces: boolean = true): Provider {
return Provider.decode(message.value, undefined, useInterfaces);
fromProtoMsg(message: ProviderProtoMsg): Provider {
return Provider.decode(message.value);
},
toProto(message: Provider): Uint8Array {
return Provider.encode(message).finish();
Expand Down Expand Up @@ -319,7 +319,7 @@ export const AuditedAttributes = {
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number, useInterfaces: boolean = true): AuditedAttributes {
decode(input: BinaryReader | Uint8Array, length?: number): AuditedAttributes {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAuditedAttributes();
Expand All @@ -333,7 +333,7 @@ export const AuditedAttributes = {
message.auditor = reader.string();
break;
case 3:
message.attributes.push(Attribute.decode(reader, reader.uint32(), useInterfaces));
message.attributes.push(Attribute.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
Expand Down Expand Up @@ -392,12 +392,12 @@ export const AuditedAttributes = {
attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromAmino(e)) : []
};
},
toAmino(message: AuditedAttributes, useInterfaces: boolean = true): AuditedAttributesAmino {
toAmino(message: AuditedAttributes): AuditedAttributesAmino {
const obj: any = {};
obj.owner = message.owner;
obj.auditor = message.auditor;
if (message.attributes) {
obj.attributes = message.attributes.map(e => e ? Attribute.toAmino(e, useInterfaces) : undefined);
obj.attributes = message.attributes.map(e => e ? Attribute.toAmino(e) : undefined);
} else {
obj.attributes = [];
}
Expand All @@ -406,8 +406,8 @@ export const AuditedAttributes = {
fromAminoMsg(object: AuditedAttributesAminoMsg): AuditedAttributes {
return AuditedAttributes.fromAmino(object.value);
},
fromProtoMsg(message: AuditedAttributesProtoMsg, useInterfaces: boolean = true): AuditedAttributes {
return AuditedAttributes.decode(message.value, undefined, useInterfaces);
fromProtoMsg(message: AuditedAttributesProtoMsg): AuditedAttributes {
return AuditedAttributes.decode(message.value);
},
toProto(message: AuditedAttributes): Uint8Array {
return AuditedAttributes.encode(message).finish();
Expand All @@ -432,15 +432,15 @@ export const AttributesResponse = {
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number, useInterfaces: boolean = true): AttributesResponse {
decode(input: BinaryReader | Uint8Array, length?: number): AttributesResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAttributesResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.attributes.push(AuditedAttributes.decode(reader, reader.uint32(), useInterfaces));
message.attributes.push(AuditedAttributes.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
Expand Down Expand Up @@ -487,10 +487,10 @@ export const AttributesResponse = {
attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => AuditedAttributes.fromAmino(e)) : []
};
},
toAmino(message: AttributesResponse, useInterfaces: boolean = true): AttributesResponseAmino {
toAmino(message: AttributesResponse): AttributesResponseAmino {
const obj: any = {};
if (message.attributes) {
obj.attributes = message.attributes.map(e => e ? AuditedAttributes.toAmino(e, useInterfaces) : undefined);
obj.attributes = message.attributes.map(e => e ? AuditedAttributes.toAmino(e) : undefined);
} else {
obj.attributes = [];
}
Expand All @@ -499,8 +499,8 @@ export const AttributesResponse = {
fromAminoMsg(object: AttributesResponseAminoMsg): AttributesResponse {
return AttributesResponse.fromAmino(object.value);
},
fromProtoMsg(message: AttributesResponseProtoMsg, useInterfaces: boolean = true): AttributesResponse {
return AttributesResponse.decode(message.value, undefined, useInterfaces);
fromProtoMsg(message: AttributesResponseProtoMsg): AttributesResponse {
return AttributesResponse.decode(message.value);
},
toProto(message: AttributesResponse): Uint8Array {
return AttributesResponse.encode(message).finish();
Expand Down Expand Up @@ -529,7 +529,7 @@ export const AttributesFilters = {
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number, useInterfaces: boolean = true): AttributesFilters {
decode(input: BinaryReader | Uint8Array, length?: number): AttributesFilters {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAttributesFilters();
Expand Down Expand Up @@ -601,7 +601,7 @@ export const AttributesFilters = {
owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => e) : []
};
},
toAmino(message: AttributesFilters, useInterfaces: boolean = true): AttributesFiltersAmino {
toAmino(message: AttributesFilters): AttributesFiltersAmino {
const obj: any = {};
if (message.auditors) {
obj.auditors = message.auditors.map(e => e);
Expand All @@ -618,8 +618,8 @@ export const AttributesFilters = {
fromAminoMsg(object: AttributesFiltersAminoMsg): AttributesFilters {
return AttributesFilters.fromAmino(object.value);
},
fromProtoMsg(message: AttributesFiltersProtoMsg, useInterfaces: boolean = true): AttributesFilters {
return AttributesFilters.decode(message.value, undefined, useInterfaces);
fromProtoMsg(message: AttributesFiltersProtoMsg): AttributesFilters {
return AttributesFilters.decode(message.value);
},
toProto(message: AttributesFilters): Uint8Array {
return AttributesFilters.encode(message).finish();
Expand Down Expand Up @@ -652,7 +652,7 @@ export const MsgSignProviderAttributes = {
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number, useInterfaces: boolean = true): MsgSignProviderAttributes {
decode(input: BinaryReader | Uint8Array, length?: number): MsgSignProviderAttributes {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgSignProviderAttributes();
Expand All @@ -666,7 +666,7 @@ export const MsgSignProviderAttributes = {
message.auditor = reader.string();
break;
case 3:
message.attributes.push(Attribute.decode(reader, reader.uint32(), useInterfaces));
message.attributes.push(Attribute.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
Expand Down Expand Up @@ -725,12 +725,12 @@ export const MsgSignProviderAttributes = {
attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromAmino(e)) : []
};
},
toAmino(message: MsgSignProviderAttributes, useInterfaces: boolean = true): MsgSignProviderAttributesAmino {
toAmino(message: MsgSignProviderAttributes): MsgSignProviderAttributesAmino {
const obj: any = {};
obj.owner = message.owner;
obj.auditor = message.auditor;
if (message.attributes) {
obj.attributes = message.attributes.map(e => e ? Attribute.toAmino(e, useInterfaces) : undefined);
obj.attributes = message.attributes.map(e => e ? Attribute.toAmino(e) : undefined);
} else {
obj.attributes = [];
}
Expand All @@ -739,8 +739,8 @@ export const MsgSignProviderAttributes = {
fromAminoMsg(object: MsgSignProviderAttributesAminoMsg): MsgSignProviderAttributes {
return MsgSignProviderAttributes.fromAmino(object.value);
},
fromProtoMsg(message: MsgSignProviderAttributesProtoMsg, useInterfaces: boolean = true): MsgSignProviderAttributes {
return MsgSignProviderAttributes.decode(message.value, undefined, useInterfaces);
fromProtoMsg(message: MsgSignProviderAttributesProtoMsg): MsgSignProviderAttributes {
return MsgSignProviderAttributes.decode(message.value);
},
toProto(message: MsgSignProviderAttributes): Uint8Array {
return MsgSignProviderAttributes.encode(message).finish();
Expand All @@ -760,7 +760,7 @@ export const MsgSignProviderAttributesResponse = {
encode(_: MsgSignProviderAttributesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number, useInterfaces: boolean = true): MsgSignProviderAttributesResponse {
decode(input: BinaryReader | Uint8Array, length?: number): MsgSignProviderAttributesResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgSignProviderAttributesResponse();
Expand Down Expand Up @@ -796,15 +796,15 @@ export const MsgSignProviderAttributesResponse = {
fromAmino(_: MsgSignProviderAttributesResponseAmino): MsgSignProviderAttributesResponse {
return {};
},
toAmino(_: MsgSignProviderAttributesResponse, useInterfaces: boolean = true): MsgSignProviderAttributesResponseAmino {
toAmino(_: MsgSignProviderAttributesResponse): MsgSignProviderAttributesResponseAmino {
const obj: any = {};
return obj;
},
fromAminoMsg(object: MsgSignProviderAttributesResponseAminoMsg): MsgSignProviderAttributesResponse {
return MsgSignProviderAttributesResponse.fromAmino(object.value);
},
fromProtoMsg(message: MsgSignProviderAttributesResponseProtoMsg, useInterfaces: boolean = true): MsgSignProviderAttributesResponse {
return MsgSignProviderAttributesResponse.decode(message.value, undefined, useInterfaces);
fromProtoMsg(message: MsgSignProviderAttributesResponseProtoMsg): MsgSignProviderAttributesResponse {
return MsgSignProviderAttributesResponse.decode(message.value);
},
toProto(message: MsgSignProviderAttributesResponse): Uint8Array {
return MsgSignProviderAttributesResponse.encode(message).finish();
Expand Down Expand Up @@ -837,7 +837,7 @@ export const MsgDeleteProviderAttributes = {
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number, useInterfaces: boolean = true): MsgDeleteProviderAttributes {
decode(input: BinaryReader | Uint8Array, length?: number): MsgDeleteProviderAttributes {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgDeleteProviderAttributes();
Expand Down Expand Up @@ -910,7 +910,7 @@ export const MsgDeleteProviderAttributes = {
keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => e) : []
};
},
toAmino(message: MsgDeleteProviderAttributes, useInterfaces: boolean = true): MsgDeleteProviderAttributesAmino {
toAmino(message: MsgDeleteProviderAttributes): MsgDeleteProviderAttributesAmino {
const obj: any = {};
obj.owner = message.owner;
obj.auditor = message.auditor;
Expand All @@ -924,8 +924,8 @@ export const MsgDeleteProviderAttributes = {
fromAminoMsg(object: MsgDeleteProviderAttributesAminoMsg): MsgDeleteProviderAttributes {
return MsgDeleteProviderAttributes.fromAmino(object.value);
},
fromProtoMsg(message: MsgDeleteProviderAttributesProtoMsg, useInterfaces: boolean = true): MsgDeleteProviderAttributes {
return MsgDeleteProviderAttributes.decode(message.value, undefined, useInterfaces);
fromProtoMsg(message: MsgDeleteProviderAttributesProtoMsg): MsgDeleteProviderAttributes {
return MsgDeleteProviderAttributes.decode(message.value);
},
toProto(message: MsgDeleteProviderAttributes): Uint8Array {
return MsgDeleteProviderAttributes.encode(message).finish();
Expand All @@ -945,7 +945,7 @@ export const MsgDeleteProviderAttributesResponse = {
encode(_: MsgDeleteProviderAttributesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number, useInterfaces: boolean = true): MsgDeleteProviderAttributesResponse {
decode(input: BinaryReader | Uint8Array, length?: number): MsgDeleteProviderAttributesResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgDeleteProviderAttributesResponse();
Expand Down Expand Up @@ -981,15 +981,15 @@ export const MsgDeleteProviderAttributesResponse = {
fromAmino(_: MsgDeleteProviderAttributesResponseAmino): MsgDeleteProviderAttributesResponse {
return {};
},
toAmino(_: MsgDeleteProviderAttributesResponse, useInterfaces: boolean = true): MsgDeleteProviderAttributesResponseAmino {
toAmino(_: MsgDeleteProviderAttributesResponse): MsgDeleteProviderAttributesResponseAmino {
const obj: any = {};
return obj;
},
fromAminoMsg(object: MsgDeleteProviderAttributesResponseAminoMsg): MsgDeleteProviderAttributesResponse {
return MsgDeleteProviderAttributesResponse.fromAmino(object.value);
},
fromProtoMsg(message: MsgDeleteProviderAttributesResponseProtoMsg, useInterfaces: boolean = true): MsgDeleteProviderAttributesResponse {
return MsgDeleteProviderAttributesResponse.decode(message.value, undefined, useInterfaces);
fromProtoMsg(message: MsgDeleteProviderAttributesResponseProtoMsg): MsgDeleteProviderAttributesResponse {
return MsgDeleteProviderAttributesResponse.decode(message.value);
},
toProto(message: MsgDeleteProviderAttributesResponse): Uint8Array {
return MsgDeleteProviderAttributesResponse.encode(message).finish();
Expand Down
Loading

0 comments on commit 9453fce

Please sign in to comment.