Skip to content

Commit

Permalink
Merge pull request #83 from confio/disable-addTypeUrl
Browse files Browse the repository at this point in the history
Remove typeUrl/$typeUrl fields
  • Loading branch information
webmaster128 authored Oct 23, 2023
2 parents e2b0f8c + 19a83b4 commit fbf5733
Show file tree
Hide file tree
Showing 181 changed files with 3 additions and 1,060 deletions.
3 changes: 3 additions & 0 deletions scripts/codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ telescope({
includePackageVar: true,
strictNullCheckForPrototypeMethods: true,
paginationDefaultFromPartial: true,
// Those are causing trouble in CosmJS testing (https://github.com/cosmology-tech/telescope/issues/489)
addTypeUrlToDecoders: false,
addTypeUrlToObjects: false,
excluded: {
protos: [
"cosmos/autocli/v1/options.proto",
Expand Down
2 changes: 0 additions & 2 deletions src/cosmos/app/runtime/v1alpha1/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function createBaseModule(): Module {
};
}
export const Module = {
typeUrl: "/cosmos.app.runtime.v1alpha1.Module",
encode(message: Module, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.appName !== "") {
writer.uint32(10).string(message.appName);
Expand Down Expand Up @@ -174,7 +173,6 @@ function createBaseStoreKeyConfig(): StoreKeyConfig {
};
}
export const StoreKeyConfig = {
typeUrl: "/cosmos.app.runtime.v1alpha1.StoreKeyConfig",
encode(message: StoreKeyConfig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.moduleName !== "") {
writer.uint32(10).string(message.moduleName);
Expand Down
3 changes: 0 additions & 3 deletions src/cosmos/app/v1alpha1/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ function createBaseConfig(): Config {
};
}
export const Config = {
typeUrl: "/cosmos.app.v1alpha1.Config",
encode(message: Config, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.modules) {
ModuleConfig.encode(v!, writer.uint32(10).fork()).ldelim();
Expand Down Expand Up @@ -130,7 +129,6 @@ function createBaseModuleConfig(): ModuleConfig {
};
}
export const ModuleConfig = {
typeUrl: "/cosmos.app.v1alpha1.ModuleConfig",
encode(message: ModuleConfig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.name !== "") {
writer.uint32(10).string(message.name);
Expand Down Expand Up @@ -202,7 +200,6 @@ function createBaseGolangBinding(): GolangBinding {
};
}
export const GolangBinding = {
typeUrl: "/cosmos.app.v1alpha1.GolangBinding",
encode(message: GolangBinding, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.interfaceType !== "") {
writer.uint32(10).string(message.interfaceType);
Expand Down
3 changes: 0 additions & 3 deletions src/cosmos/app/v1alpha1/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ function createBaseModuleDescriptor(): ModuleDescriptor {
};
}
export const ModuleDescriptor = {
typeUrl: "/cosmos.app.v1alpha1.ModuleDescriptor",
encode(message: ModuleDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.goImport !== "") {
writer.uint32(10).string(message.goImport);
Expand Down Expand Up @@ -165,7 +164,6 @@ function createBasePackageReference(): PackageReference {
};
}
export const PackageReference = {
typeUrl: "/cosmos.app.v1alpha1.PackageReference",
encode(message: PackageReference, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.name !== "") {
writer.uint32(10).string(message.name);
Expand Down Expand Up @@ -220,7 +218,6 @@ function createBaseMigrateFromInfo(): MigrateFromInfo {
};
}
export const MigrateFromInfo = {
typeUrl: "/cosmos.app.v1alpha1.MigrateFromInfo",
encode(message: MigrateFromInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.module !== "") {
writer.uint32(10).string(message.module);
Expand Down
2 changes: 0 additions & 2 deletions src/cosmos/app/v1alpha1/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ function createBaseQueryConfigRequest(): QueryConfigRequest {
return {};
}
export const QueryConfigRequest = {
typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest",
encode(_: QueryConfigRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
return writer;
},
Expand Down Expand Up @@ -51,7 +50,6 @@ function createBaseQueryConfigResponse(): QueryConfigResponse {
};
}
export const QueryConfigResponse = {
typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse",
encode(message: QueryConfigResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.config !== undefined) {
Config.encode(message.config, writer.uint32(10).fork()).ldelim();
Expand Down
2 changes: 0 additions & 2 deletions src/cosmos/auth/module/v1/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ function createBaseModule(): Module {
};
}
export const Module = {
typeUrl: "/cosmos.auth.module.v1.Module",
encode(message: Module, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.bech32Prefix !== "") {
writer.uint32(10).string(message.bech32Prefix);
Expand Down Expand Up @@ -104,7 +103,6 @@ function createBaseModuleAccountPermission(): ModuleAccountPermission {
};
}
export const ModuleAccountPermission = {
typeUrl: "/cosmos.auth.module.v1.ModuleAccountPermission",
encode(message: ModuleAccountPermission, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.account !== "") {
writer.uint32(10).string(message.account);
Expand Down
4 changes: 0 additions & 4 deletions src/cosmos/auth/v1beta1/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ function createBaseBaseAccount(): BaseAccount {
};
}
export const BaseAccount = {
typeUrl: "/cosmos.auth.v1beta1.BaseAccount",
encode(message: BaseAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.address !== "") {
writer.uint32(10).string(message.address);
Expand Down Expand Up @@ -133,7 +132,6 @@ function createBaseModuleAccount(): ModuleAccount {
};
}
export const ModuleAccount = {
typeUrl: "/cosmos.auth.v1beta1.ModuleAccount",
encode(message: ModuleAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.baseAccount !== undefined) {
BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim();
Expand Down Expand Up @@ -205,7 +203,6 @@ function createBaseModuleCredential(): ModuleCredential {
};
}
export const ModuleCredential = {
typeUrl: "/cosmos.auth.v1beta1.ModuleCredential",
encode(message: ModuleCredential, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.moduleName !== "") {
writer.uint32(10).string(message.moduleName);
Expand Down Expand Up @@ -271,7 +268,6 @@ function createBaseParams(): Params {
};
}
export const Params = {
typeUrl: "/cosmos.auth.v1beta1.Params",
encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.maxMemoCharacters !== BigInt(0)) {
writer.uint32(8).uint64(message.maxMemoCharacters);
Expand Down
1 change: 0 additions & 1 deletion src/cosmos/auth/v1beta1/genesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ function createBaseGenesisState(): GenesisState {
};
}
export const GenesisState = {
typeUrl: "/cosmos.auth.v1beta1.GenesisState",
encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.params !== undefined) {
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
Expand Down
20 changes: 0 additions & 20 deletions src/cosmos/auth/v1beta1/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ function createBaseQueryAccountsRequest(): QueryAccountsRequest {
};
}
export const QueryAccountsRequest = {
typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest",
encode(message: QueryAccountsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.pagination !== undefined) {
PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
Expand Down Expand Up @@ -214,7 +213,6 @@ function createBaseQueryAccountsResponse(): QueryAccountsResponse {
};
}
export const QueryAccountsResponse = {
typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse",
encode(message: QueryAccountsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.accounts) {
Any.encode(v!, writer.uint32(10).fork()).ldelim();
Expand Down Expand Up @@ -276,7 +274,6 @@ function createBaseQueryAccountRequest(): QueryAccountRequest {
};
}
export const QueryAccountRequest = {
typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest",
encode(message: QueryAccountRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.address !== "") {
writer.uint32(10).string(message.address);
Expand Down Expand Up @@ -322,7 +319,6 @@ function createBaseQueryAccountResponse(): QueryAccountResponse {
};
}
export const QueryAccountResponse = {
typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse",
encode(message: QueryAccountResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.account !== undefined) {
Any.encode(message.account, writer.uint32(10).fork()).ldelim();
Expand Down Expand Up @@ -369,7 +365,6 @@ function createBaseQueryParamsRequest(): QueryParamsRequest {
return {};
}
export const QueryParamsRequest = {
typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest",
encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
return writer;
},
Expand Down Expand Up @@ -406,7 +401,6 @@ function createBaseQueryParamsResponse(): QueryParamsResponse {
};
}
export const QueryParamsResponse = {
typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse",
encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.params !== undefined) {
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
Expand Down Expand Up @@ -452,7 +446,6 @@ function createBaseQueryModuleAccountsRequest(): QueryModuleAccountsRequest {
return {};
}
export const QueryModuleAccountsRequest = {
typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest",
encode(_: QueryModuleAccountsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
return writer;
},
Expand Down Expand Up @@ -489,7 +482,6 @@ function createBaseQueryModuleAccountsResponse(): QueryModuleAccountsResponse {
};
}
export const QueryModuleAccountsResponse = {
typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse",
encode(message: QueryModuleAccountsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.accounts) {
Any.encode(v!, writer.uint32(10).fork()).ldelim();
Expand Down Expand Up @@ -541,7 +533,6 @@ function createBaseQueryModuleAccountByNameRequest(): QueryModuleAccountByNameRe
};
}
export const QueryModuleAccountByNameRequest = {
typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest",
encode(
message: QueryModuleAccountByNameRequest,
writer: BinaryWriter = BinaryWriter.create(),
Expand Down Expand Up @@ -592,7 +583,6 @@ function createBaseQueryModuleAccountByNameResponse(): QueryModuleAccountByNameR
};
}
export const QueryModuleAccountByNameResponse = {
typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse",
encode(
message: QueryModuleAccountByNameResponse,
writer: BinaryWriter = BinaryWriter.create(),
Expand Down Expand Up @@ -644,7 +634,6 @@ function createBaseBech32PrefixRequest(): Bech32PrefixRequest {
return {};
}
export const Bech32PrefixRequest = {
typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest",
encode(_: Bech32PrefixRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
return writer;
},
Expand Down Expand Up @@ -681,7 +670,6 @@ function createBaseBech32PrefixResponse(): Bech32PrefixResponse {
};
}
export const Bech32PrefixResponse = {
typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse",
encode(message: Bech32PrefixResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.bech32Prefix !== "") {
writer.uint32(10).string(message.bech32Prefix);
Expand Down Expand Up @@ -727,7 +715,6 @@ function createBaseAddressBytesToStringRequest(): AddressBytesToStringRequest {
};
}
export const AddressBytesToStringRequest = {
typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest",
encode(message: AddressBytesToStringRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.addressBytes.length !== 0) {
writer.uint32(10).bytes(message.addressBytes);
Expand Down Expand Up @@ -778,7 +765,6 @@ function createBaseAddressBytesToStringResponse(): AddressBytesToStringResponse
};
}
export const AddressBytesToStringResponse = {
typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse",
encode(message: AddressBytesToStringResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.addressString !== "") {
writer.uint32(10).string(message.addressString);
Expand Down Expand Up @@ -826,7 +812,6 @@ function createBaseAddressStringToBytesRequest(): AddressStringToBytesRequest {
};
}
export const AddressStringToBytesRequest = {
typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest",
encode(message: AddressStringToBytesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.addressString !== "") {
writer.uint32(10).string(message.addressString);
Expand Down Expand Up @@ -874,7 +859,6 @@ function createBaseAddressStringToBytesResponse(): AddressStringToBytesResponse
};
}
export const AddressStringToBytesResponse = {
typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse",
encode(message: AddressStringToBytesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.addressBytes.length !== 0) {
writer.uint32(10).bytes(message.addressBytes);
Expand Down Expand Up @@ -926,7 +910,6 @@ function createBaseQueryAccountAddressByIDRequest(): QueryAccountAddressByIDRequ
};
}
export const QueryAccountAddressByIDRequest = {
typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest",
encode(
message: QueryAccountAddressByIDRequest,
writer: BinaryWriter = BinaryWriter.create(),
Expand Down Expand Up @@ -990,7 +973,6 @@ function createBaseQueryAccountAddressByIDResponse(): QueryAccountAddressByIDRes
};
}
export const QueryAccountAddressByIDResponse = {
typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse",
encode(
message: QueryAccountAddressByIDResponse,
writer: BinaryWriter = BinaryWriter.create(),
Expand Down Expand Up @@ -1041,7 +1023,6 @@ function createBaseQueryAccountInfoRequest(): QueryAccountInfoRequest {
};
}
export const QueryAccountInfoRequest = {
typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest",
encode(message: QueryAccountInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.address !== "") {
writer.uint32(10).string(message.address);
Expand Down Expand Up @@ -1087,7 +1068,6 @@ function createBaseQueryAccountInfoResponse(): QueryAccountInfoResponse {
};
}
export const QueryAccountInfoResponse = {
typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse",
encode(message: QueryAccountInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.info !== undefined) {
BaseAccount.encode(message.info, writer.uint32(10).fork()).ldelim();
Expand Down
2 changes: 0 additions & 2 deletions src/cosmos/auth/v1beta1/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function createBaseMsgUpdateParams(): MsgUpdateParams {
};
}
export const MsgUpdateParams = {
typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParams",
encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.authority !== "") {
writer.uint32(10).string(message.authority);
Expand Down Expand Up @@ -87,7 +86,6 @@ function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse {
return {};
}
export const MsgUpdateParamsResponse = {
typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParamsResponse",
encode(_: MsgUpdateParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
return writer;
},
Expand Down
1 change: 0 additions & 1 deletion src/cosmos/authz/module/v1/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ function createBaseModule(): Module {
return {};
}
export const Module = {
typeUrl: "/cosmos.authz.module.v1.Module",
encode(_: Module, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
return writer;
},
Expand Down
4 changes: 0 additions & 4 deletions src/cosmos/authz/v1beta1/authz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ function createBaseGenericAuthorization(): GenericAuthorization {
};
}
export const GenericAuthorization = {
typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization",
encode(message: GenericAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.msg !== "") {
writer.uint32(10).string(message.msg);
Expand Down Expand Up @@ -93,7 +92,6 @@ function createBaseGrant(): Grant {
};
}
export const Grant = {
typeUrl: "/cosmos.authz.v1beta1.Grant",
encode(message: Grant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.authorization !== undefined) {
Any.encode(message.authorization, writer.uint32(10).fork()).ldelim();
Expand Down Expand Up @@ -156,7 +154,6 @@ function createBaseGrantAuthorization(): GrantAuthorization {
};
}
export const GrantAuthorization = {
typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization",
encode(message: GrantAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.granter !== "") {
writer.uint32(10).string(message.granter);
Expand Down Expand Up @@ -234,7 +231,6 @@ function createBaseGrantQueueItem(): GrantQueueItem {
};
}
export const GrantQueueItem = {
typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem",
encode(message: GrantQueueItem, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.msgTypeUrls) {
writer.uint32(10).string(v!);
Expand Down
1 change: 0 additions & 1 deletion src/cosmos/authz/v1beta1/genesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function createBaseGenesisState(): GenesisState {
};
}
export const GenesisState = {
typeUrl: "/cosmos.authz.v1beta1.GenesisState",
encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.authorization) {
GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim();
Expand Down
Loading

0 comments on commit fbf5733

Please sign in to comment.