diff --git a/packages/stateful/actions/core/smart_contracting/UploadCode/Component.tsx b/packages/stateful/actions/core/smart_contracting/UploadCode/Component.tsx index bd982dcfc8..3178af7a74 100644 --- a/packages/stateful/actions/core/smart_contracting/UploadCode/Component.tsx +++ b/packages/stateful/actions/core/smart_contracting/UploadCode/Component.tsx @@ -34,7 +34,7 @@ export type UploadCodeData = { // Whether or not data is gzipped. gzipped?: boolean accessType: AccessType - // Only used when accessType === AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES + // Only used when accessType === AccessType.AnyOfAddresses allowedAddresses: { address: string }[] @@ -191,15 +191,15 @@ export const UploadCodeComponent: ActionComponent = ({ [ { label: t('info.anyone'), - value: AccessType.ACCESS_TYPE_EVERYBODY, + value: AccessType.Everybody, }, { label: t('form.noOne'), - value: AccessType.ACCESS_TYPE_NOBODY, + value: AccessType.Nobody, }, { label: t('form.oneOrMoreAccounts'), - value: AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES, + value: AccessType.AnyOfAddresses, }, ] as RadioInputOption[] ) @@ -209,7 +209,7 @@ export const UploadCodeComponent: ActionComponent = ({ watch={watch} /> - {accessType === AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES && ( + {accessType === AccessType.AnyOfAddresses && (
{allowedAddressesFields.map(({ id }, index) => (
diff --git a/packages/stateful/actions/core/smart_contracting/UploadCode/index.tsx b/packages/stateful/actions/core/smart_contracting/UploadCode/index.tsx index cebced207d..755456f89e 100644 --- a/packages/stateful/actions/core/smart_contracting/UploadCode/index.tsx +++ b/packages/stateful/actions/core/smart_contracting/UploadCode/index.tsx @@ -65,7 +65,7 @@ export const makeUploadCodeAction: ActionMaker = (options) => { const useDefaults: UseDefaults = () => ({ chainId: currentChainId, - accessType: AccessType.ACCESS_TYPE_EVERYBODY, + accessType: AccessType.Everybody, allowedAddresses: [{ address }], }) @@ -93,7 +93,7 @@ export const makeUploadCodeAction: ActionMaker = (options) => { instantiatePermission: { permission: accessType, addresses: - accessType === AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES + accessType === AccessType.AnyOfAddresses ? allowedAddresses.map(({ address }) => address) : [], }, diff --git a/packages/types/package.json b/packages/types/package.json index e60548a1de..d3fe47225a 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.3", - "@cosmology/telescope": "^1.4.12", + "@cosmology/telescope": "^1.8.3", "@dao-dao/config": "2.4.2-rc.1", "@tanstack/react-query": "^5.40.0" }, diff --git a/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/genesis.ts b/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/genesis.ts index a493deea63..7bc3d03d41 100644 --- a/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/genesis.ts @@ -81,7 +81,7 @@ export const GenesisState = { if (message.collections) { obj.collections = message.collections.map(e => e ? Collection.toAmino(e, useInterfaces) : undefined); } else { - obj.collections = []; + obj.collections = message.collections; } obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/onft.ts b/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/onft.ts index 136820e8d3..7753343113 100644 --- a/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/onft.ts +++ b/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/onft.ts @@ -341,7 +341,7 @@ export const Collection = { if (message.onfts) { obj.onfts = message.onfts.map(e => e ? ONFT.toAmino(e, useInterfaces) : undefined); } else { - obj.onfts = []; + obj.onfts = message.onfts; } return obj; }, @@ -414,11 +414,11 @@ export const IDCollection = { }, toAmino(message: IDCollection, useInterfaces: boolean = false): IDCollectionAmino { const obj: any = {}; - obj.denom_id = message.denomId; + obj.denom_id = message.denomId === "" ? undefined : message.denomId; if (message.onftIds) { obj.onft_ids = message.onftIds.map(e => e); } else { - obj.onft_ids = []; + obj.onft_ids = message.onftIds; } return obj; }, @@ -590,20 +590,20 @@ export const Denom = { }, toAmino(message: Denom, useInterfaces: boolean = false): DenomAmino { const obj: any = {}; - obj.id = message.id; - obj.symbol = message.symbol; - obj.name = message.name; - obj.schema = message.schema; - obj.creator = message.creator; - obj.description = message.description; - obj.preview_uri = message.previewUri; - obj.uri = message.uri; - obj.uri_hash = message.uriHash; - obj.data = message.data; + obj.id = message.id === "" ? undefined : message.id; + obj.symbol = message.symbol === "" ? undefined : message.symbol; + obj.name = message.name === "" ? undefined : message.name; + obj.schema = message.schema === "" ? undefined : message.schema; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.description = message.description === "" ? undefined : message.description; + obj.preview_uri = message.previewUri === "" ? undefined : message.previewUri; + obj.uri = message.uri === "" ? undefined : message.uri; + obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash; + obj.data = message.data === "" ? undefined : message.data; if (message.royaltyReceivers) { obj.royalty_receivers = message.royaltyReceivers.map(e => e ? WeightedAddress.toAmino(e, useInterfaces) : undefined); } else { - obj.royalty_receivers = []; + obj.royalty_receivers = message.royaltyReceivers; } return obj; }, @@ -731,16 +731,16 @@ export const DenomMetadata = { }, toAmino(message: DenomMetadata, useInterfaces: boolean = false): DenomMetadataAmino { const obj: any = {}; - obj.creator = message.creator; - obj.schema = message.schema; - obj.description = message.description; - obj.preview_uri = message.previewUri; - obj.data = message.data; - obj.uri_hash = message.uriHash; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.schema = message.schema === "" ? undefined : message.schema; + obj.description = message.description === "" ? undefined : message.description; + obj.preview_uri = message.previewUri === "" ? undefined : message.previewUri; + obj.data = message.data === "" ? undefined : message.data; + obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash; if (message.royaltyReceivers) { obj.royalty_receivers = message.royaltyReceivers.map(e => e ? WeightedAddress.toAmino(e, useInterfaces) : undefined); } else { - obj.royalty_receivers = []; + obj.royalty_receivers = message.royaltyReceivers; } return obj; }, @@ -892,15 +892,15 @@ export const ONFT = { }, toAmino(message: ONFT, useInterfaces: boolean = false): ONFTAmino { const obj: any = {}; - obj.id = message.id; + obj.id = message.id === "" ? undefined : message.id; obj.metadata = message.metadata ? Metadata.toAmino(message.metadata, useInterfaces) : undefined; - obj.data = message.data; - obj.owner = message.owner; - obj.transferable = message.transferable; - obj.extensible = message.extensible; + obj.data = message.data === "" ? undefined : message.data; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.transferable = message.transferable === false ? undefined : message.transferable; + obj.extensible = message.extensible === false ? undefined : message.extensible; obj.created_at = message.createdAt ? Timestamp.toAmino(toTimestamp(message.createdAt)) : undefined; - obj.nsfw = message.nsfw; - obj.royalty_share = message.royaltyShare; + obj.nsfw = message.nsfw === false ? undefined : message.nsfw; + obj.royalty_share = message.royaltyShare === "" ? undefined : message.royaltyShare; return obj; }, fromAminoMsg(object: ONFTAminoMsg): ONFT { @@ -1007,11 +1007,11 @@ export const Metadata = { }, toAmino(message: Metadata, useInterfaces: boolean = false): MetadataAmino { const obj: any = {}; - obj.name = message.name; - obj.description = message.description; - obj.media_uri = message.mediaUri; - obj.preview_uri = message.previewUri; - obj.uri_hash = message.uriHash; + obj.name = message.name === "" ? undefined : message.name; + obj.description = message.description === "" ? undefined : message.description; + obj.media_uri = message.mediaUri === "" ? undefined : message.mediaUri; + obj.preview_uri = message.previewUri === "" ? undefined : message.previewUri; + obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash; return obj; }, fromAminoMsg(object: MetadataAminoMsg): Metadata { @@ -1173,16 +1173,16 @@ export const ONFTMetadata = { }, toAmino(message: ONFTMetadata, useInterfaces: boolean = false): ONFTMetadataAmino { const obj: any = {}; - obj.name = message.name; - obj.description = message.description; - obj.preview_uri = message.previewUri; - obj.data = message.data; - obj.transferable = message.transferable; - obj.extensible = message.extensible; + obj.name = message.name === "" ? undefined : message.name; + obj.description = message.description === "" ? undefined : message.description; + obj.preview_uri = message.previewUri === "" ? undefined : message.previewUri; + obj.data = message.data === "" ? undefined : message.data; + obj.transferable = message.transferable === false ? undefined : message.transferable; + obj.extensible = message.extensible === false ? undefined : message.extensible; obj.created_at = message.createdAt ? Timestamp.toAmino(toTimestamp(message.createdAt)) : undefined; - obj.nsfw = message.nsfw; - obj.royalty_share = message.royaltyShare; - obj.uri_hash = message.uriHash; + obj.nsfw = message.nsfw === false ? undefined : message.nsfw; + obj.royalty_share = message.royaltyShare === "" ? undefined : message.royaltyShare; + obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash; return obj; }, fromAminoMsg(object: ONFTMetadataAminoMsg): ONFTMetadata { @@ -1254,11 +1254,11 @@ export const Owner = { }, toAmino(message: Owner, useInterfaces: boolean = false): OwnerAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; if (message.idCollections) { obj.id_collections = message.idCollections.map(e => e ? IDCollection.toAmino(e, useInterfaces) : undefined); } else { - obj.id_collections = []; + obj.id_collections = message.idCollections; } return obj; }, @@ -1333,8 +1333,8 @@ export const WeightedAddress = { }, toAmino(message: WeightedAddress, useInterfaces: boolean = false): WeightedAddressAmino { const obj: any = {}; - obj.address = message.address; - obj.weight = message.weight; + obj.address = message.address === "" ? undefined : message.address; + obj.weight = message.weight === "" ? undefined : message.weight; return obj; }, fromAminoMsg(object: WeightedAddressAminoMsg): WeightedAddress { diff --git a/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/query.ts b/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/query.ts index 2ed6a60dcc..1af528ea85 100644 --- a/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/query.ts @@ -447,7 +447,7 @@ export const QueryCollectionRequest = { }, toAmino(message: QueryCollectionRequest, useInterfaces: boolean = false): QueryCollectionRequestAmino { const obj: any = {}; - obj.denom_id = message.denomId; + obj.denom_id = message.denomId === "" ? undefined : message.denomId; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -597,7 +597,7 @@ export const QueryIBCCollectionRequest = { }, toAmino(message: QueryIBCCollectionRequest, useInterfaces: boolean = false): QueryIBCCollectionRequestAmino { const obj: any = {}; - obj.hash = message.hash; + obj.hash = message.hash === "" ? undefined : message.hash; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -661,7 +661,7 @@ export const QueryDenomRequest = { }, toAmino(message: QueryDenomRequest, useInterfaces: boolean = false): QueryDenomRequestAmino { const obj: any = {}; - obj.denom_id = message.denomId; + obj.denom_id = message.denomId === "" ? undefined : message.denomId; return obj; }, fromAminoMsg(object: QueryDenomRequestAminoMsg): QueryDenomRequest { @@ -787,7 +787,7 @@ export const QueryIBCDenomRequest = { }, toAmino(message: QueryIBCDenomRequest, useInterfaces: boolean = false): QueryIBCDenomRequestAmino { const obj: any = {}; - obj.hash = message.hash; + obj.hash = message.hash === "" ? undefined : message.hash; return obj; }, fromAminoMsg(object: QueryIBCDenomRequestAminoMsg): QueryIBCDenomRequest { @@ -862,7 +862,7 @@ export const QueryDenomsRequest = { toAmino(message: QueryDenomsRequest, useInterfaces: boolean = false): QueryDenomsRequestAmino { const obj: any = {}; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; return obj; }, fromAminoMsg(object: QueryDenomsRequestAminoMsg): QueryDenomsRequest { @@ -937,7 +937,7 @@ export const QueryDenomsResponse = { if (message.denoms) { obj.denoms = message.denoms.map(e => e ? Denom.toAmino(e, useInterfaces) : undefined); } else { - obj.denoms = []; + obj.denoms = message.denoms; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1013,8 +1013,8 @@ export const QueryONFTRequest = { }, toAmino(message: QueryONFTRequest, useInterfaces: boolean = false): QueryONFTRequestAmino { const obj: any = {}; - obj.denom_id = message.denomId; - obj.id = message.id; + obj.denom_id = message.denomId === "" ? undefined : message.denomId; + obj.id = message.id === "" ? undefined : message.id; return obj; }, fromAminoMsg(object: QueryONFTRequestAminoMsg): QueryONFTRequest { @@ -1151,8 +1151,8 @@ export const QueryIBCDenomONFTRequest = { }, toAmino(message: QueryIBCDenomONFTRequest, useInterfaces: boolean = false): QueryIBCDenomONFTRequestAmino { const obj: any = {}; - obj.hash = message.hash; - obj.id = message.id; + obj.hash = message.hash === "" ? undefined : message.hash; + obj.id = message.id === "" ? undefined : message.id; return obj; }, fromAminoMsg(object: QueryIBCDenomONFTRequestAminoMsg): QueryIBCDenomONFTRequest { @@ -1237,8 +1237,8 @@ export const QueryOwnerONFTsRequest = { }, toAmino(message: QueryOwnerONFTsRequest, useInterfaces: boolean = false): QueryOwnerONFTsRequestAmino { const obj: any = {}; - obj.denom_id = message.denomId; - obj.owner = message.owner; + obj.denom_id = message.denomId === "" ? undefined : message.denomId; + obj.owner = message.owner === "" ? undefined : message.owner; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1399,8 +1399,8 @@ export const QueryOwnerIBCDenomONFTsRequest = { }, toAmino(message: QueryOwnerIBCDenomONFTsRequest, useInterfaces: boolean = false): QueryOwnerIBCDenomONFTsRequestAmino { const obj: any = {}; - obj.hash = message.hash; - obj.owner = message.owner; + obj.hash = message.hash === "" ? undefined : message.hash; + obj.owner = message.owner === "" ? undefined : message.owner; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1475,8 +1475,8 @@ export const QuerySupplyRequest = { }, toAmino(message: QuerySupplyRequest, useInterfaces: boolean = false): QuerySupplyRequestAmino { const obj: any = {}; - obj.denom_id = message.denomId; - obj.owner = message.owner; + obj.denom_id = message.denomId === "" ? undefined : message.denomId; + obj.owner = message.owner === "" ? undefined : message.owner; return obj; }, fromAminoMsg(object: QuerySupplyRequestAminoMsg): QuerySupplyRequest { @@ -1539,7 +1539,7 @@ export const QuerySupplyResponse = { }, toAmino(message: QuerySupplyResponse, useInterfaces: boolean = false): QuerySupplyResponseAmino { const obj: any = {}; - obj.amount = message.amount ? message.amount.toString() : undefined; + obj.amount = message.amount !== BigInt(0) ? message.amount.toString() : undefined; return obj; }, fromAminoMsg(object: QuerySupplyResponseAminoMsg): QuerySupplyResponse { @@ -1613,8 +1613,8 @@ export const QueryIBCDenomSupplyRequest = { }, toAmino(message: QueryIBCDenomSupplyRequest, useInterfaces: boolean = false): QueryIBCDenomSupplyRequestAmino { const obj: any = {}; - obj.hash = message.hash; - obj.owner = message.owner; + obj.hash = message.hash === "" ? undefined : message.hash; + obj.owner = message.owner === "" ? undefined : message.owner; return obj; }, fromAminoMsg(object: QueryIBCDenomSupplyRequestAminoMsg): QueryIBCDenomSupplyRequest { @@ -1690,7 +1690,7 @@ export const OwnerONFTCollection = { if (message.onfts) { obj.onfts = message.onfts.map(e => e ? ONFT.toAmino(e, useInterfaces) : undefined); } else { - obj.onfts = []; + obj.onfts = message.onfts; } return obj; }, diff --git a/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/tx.ts b/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/tx.ts index 932f073e66..617f53e245 100644 --- a/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/tx.ts @@ -538,21 +538,21 @@ export const MsgCreateDenom = { }, toAmino(message: MsgCreateDenom, useInterfaces: boolean = false): MsgCreateDenomAmino { const obj: any = {}; - obj.id = message.id; - obj.symbol = message.symbol; - obj.name = message.name; - obj.description = message.description; - obj.preview_uri = message.previewUri; - obj.schema = message.schema; - obj.sender = message.sender; + obj.id = message.id === "" ? undefined : message.id; + obj.symbol = message.symbol === "" ? undefined : message.symbol; + obj.name = message.name === "" ? undefined : message.name; + obj.description = message.description === "" ? undefined : message.description; + obj.preview_uri = message.previewUri === "" ? undefined : message.previewUri; + obj.schema = message.schema === "" ? undefined : message.schema; + obj.sender = message.sender === "" ? undefined : message.sender; obj.creation_fee = message.creationFee ? Coin.toAmino(message.creationFee, useInterfaces) : undefined; - obj.uri = message.uri; - obj.uri_hash = message.uriHash; - obj.data = message.data; + obj.uri = message.uri === "" ? undefined : message.uri; + obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash; + obj.data = message.data === "" ? undefined : message.data; if (message.royaltyReceivers) { obj.royalty_receivers = message.royaltyReceivers.map(e => e ? WeightedAddress.toAmino(e, useInterfaces) : undefined); } else { - obj.royalty_receivers = []; + obj.royalty_receivers = message.royaltyReceivers; } return obj; }, @@ -725,15 +725,15 @@ export const MsgUpdateDenom = { }, toAmino(message: MsgUpdateDenom, useInterfaces: boolean = false): MsgUpdateDenomAmino { const obj: any = {}; - obj.id = message.id; - obj.name = message.name; - obj.description = message.description; - obj.preview_uri = message.previewUri; - obj.sender = message.sender; + obj.id = message.id === "" ? undefined : message.id; + obj.name = message.name === "" ? undefined : message.name; + obj.description = message.description === "" ? undefined : message.description; + obj.preview_uri = message.previewUri === "" ? undefined : message.previewUri; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.royaltyReceivers) { obj.royalty_receivers = message.royaltyReceivers.map(e => e ? WeightedAddress.toAmino(e, useInterfaces) : undefined); } else { - obj.royalty_receivers = []; + obj.royalty_receivers = message.royaltyReceivers; } return obj; }, @@ -864,8 +864,8 @@ export const MsgPurgeDenom = { }, toAmino(message: MsgPurgeDenom, useInterfaces: boolean = false): MsgPurgeDenomAmino { const obj: any = {}; - obj.id = message.id; - obj.sender = message.sender; + obj.id = message.id === "" ? undefined : message.id; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgPurgeDenomAminoMsg): MsgPurgeDenom { @@ -1006,9 +1006,9 @@ export const MsgTransferDenom = { }, toAmino(message: MsgTransferDenom, useInterfaces: boolean = false): MsgTransferDenomAmino { const obj: any = {}; - obj.id = message.id; - obj.sender = message.sender; - obj.recipient = message.recipient; + obj.id = message.id === "" ? undefined : message.id; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.recipient = message.recipient === "" ? undefined : message.recipient; return obj; }, fromAminoMsg(object: MsgTransferDenomAminoMsg): MsgTransferDenom { @@ -1226,16 +1226,16 @@ export const MsgMintONFT = { }, toAmino(message: MsgMintONFT, useInterfaces: boolean = false): MsgMintONFTAmino { const obj: any = {}; - obj.id = message.id; - obj.denom_id = message.denomId; + obj.id = message.id === "" ? undefined : message.id; + obj.denom_id = message.denomId === "" ? undefined : message.denomId; obj.metadata = message.metadata ? Metadata.toAmino(message.metadata, useInterfaces) : undefined; - obj.data = message.data; - obj.transferable = message.transferable; - obj.extensible = message.extensible; - obj.nsfw = message.nsfw; - obj.royalty_share = message.royaltyShare; - obj.sender = message.sender; - obj.recipient = message.recipient; + obj.data = message.data === "" ? undefined : message.data; + obj.transferable = message.transferable === false ? undefined : message.transferable; + obj.extensible = message.extensible === false ? undefined : message.extensible; + obj.nsfw = message.nsfw === false ? undefined : message.nsfw; + obj.royalty_share = message.royaltyShare === "" ? undefined : message.royaltyShare; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.recipient = message.recipient === "" ? undefined : message.recipient; return obj; }, fromAminoMsg(object: MsgMintONFTAminoMsg): MsgMintONFT { @@ -1387,10 +1387,10 @@ export const MsgTransferONFT = { }, toAmino(message: MsgTransferONFT, useInterfaces: boolean = false): MsgTransferONFTAmino { const obj: any = {}; - obj.id = message.id; - obj.denom_id = message.denomId; - obj.sender = message.sender; - obj.recipient = message.recipient; + obj.id = message.id === "" ? undefined : message.id; + obj.denom_id = message.denomId === "" ? undefined : message.denomId; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.recipient = message.recipient === "" ? undefined : message.recipient; return obj; }, fromAminoMsg(object: MsgTransferONFTAminoMsg): MsgTransferONFT { @@ -1531,9 +1531,9 @@ export const MsgBurnONFT = { }, toAmino(message: MsgBurnONFT, useInterfaces: boolean = false): MsgBurnONFTAmino { const obj: any = {}; - obj.id = message.id; - obj.denom_id = message.denomId; - obj.sender = message.sender; + obj.id = message.id === "" ? undefined : message.id; + obj.denom_id = message.denomId === "" ? undefined : message.denomId; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgBurnONFTAminoMsg): MsgBurnONFT { @@ -1663,7 +1663,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/alliance/alliance/alliance.ts b/packages/types/protobuf/codegen/alliance/alliance/alliance.ts index 30ebf8272f..7edded57e9 100644 --- a/packages/types/protobuf/codegen/alliance/alliance/alliance.ts +++ b/packages/types/protobuf/codegen/alliance/alliance/alliance.ts @@ -173,8 +173,8 @@ export const RewardWeightRange = { }, toAmino(message: RewardWeightRange, useInterfaces: boolean = false): RewardWeightRangeAmino { const obj: any = {}; - obj.min = message.min; - obj.max = message.max; + obj.min = message.min === "" ? undefined : message.min; + obj.max = message.max === "" ? undefined : message.max; return obj; }, fromAminoMsg(object: RewardWeightRangeAminoMsg): RewardWeightRange { @@ -347,17 +347,17 @@ export const AllianceAsset = { }, toAmino(message: AllianceAsset, useInterfaces: boolean = false): AllianceAssetAmino { const obj: any = {}; - obj.denom = message.denom; - obj.reward_weight = message.rewardWeight; - obj.take_rate = message.takeRate; - obj.total_tokens = message.totalTokens; - obj.total_validator_shares = message.totalValidatorShares; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.reward_weight = message.rewardWeight === "" ? undefined : message.rewardWeight; + obj.take_rate = message.takeRate === "" ? undefined : message.takeRate; + obj.total_tokens = message.totalTokens === "" ? undefined : message.totalTokens; + obj.total_validator_shares = message.totalValidatorShares === "" ? undefined : message.totalValidatorShares; obj.reward_start_time = message.rewardStartTime ? Timestamp.toAmino(toTimestamp(message.rewardStartTime)) : undefined; - obj.reward_change_rate = message.rewardChangeRate; + obj.reward_change_rate = message.rewardChangeRate === "" ? undefined : message.rewardChangeRate; obj.reward_change_interval = message.rewardChangeInterval ? Duration.toAmino(message.rewardChangeInterval, useInterfaces) : undefined; obj.last_reward_change_time = message.lastRewardChangeTime ? Timestamp.toAmino(toTimestamp(message.lastRewardChangeTime)) : undefined; obj.reward_weight_range = message.rewardWeightRange ? RewardWeightRange.toAmino(message.rewardWeightRange, useInterfaces) : undefined; - obj.is_initialized = message.isInitialized; + obj.is_initialized = message.isInitialized === false ? undefined : message.isInitialized; return obj; }, fromAminoMsg(object: AllianceAssetAminoMsg): AllianceAsset { @@ -429,11 +429,11 @@ export const RewardWeightChangeSnapshot = { }, toAmino(message: RewardWeightChangeSnapshot, useInterfaces: boolean = false): RewardWeightChangeSnapshotAmino { const obj: any = {}; - obj.prev_reward_weight = message.prevRewardWeight; + obj.prev_reward_weight = message.prevRewardWeight === "" ? undefined : message.prevRewardWeight; if (message.rewardHistories) { obj.reward_histories = message.rewardHistories.map(e => e ? RewardHistory.toAmino(e, useInterfaces) : undefined); } else { - obj.reward_histories = []; + obj.reward_histories = message.rewardHistories; } return obj; }, diff --git a/packages/types/protobuf/codegen/alliance/alliance/delegations.ts b/packages/types/protobuf/codegen/alliance/alliance/delegations.ts index d9b944ee9c..7253f8768a 100644 --- a/packages/types/protobuf/codegen/alliance/alliance/delegations.ts +++ b/packages/types/protobuf/codegen/alliance/alliance/delegations.ts @@ -202,16 +202,16 @@ export const Delegation = { }, toAmino(message: Delegation, useInterfaces: boolean = false): DelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; - obj.shares = message.shares; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.shares = message.shares === "" ? undefined : message.shares; if (message.rewardHistory) { obj.reward_history = message.rewardHistory.map(e => e ? RewardHistory.toAmino(e, useInterfaces) : undefined); } else { - obj.reward_history = []; + obj.reward_history = message.rewardHistory; } - obj.last_reward_claim_height = message.lastRewardClaimHeight ? message.lastRewardClaimHeight.toString() : undefined; + obj.last_reward_claim_height = message.lastRewardClaimHeight !== BigInt(0) ? message.lastRewardClaimHeight.toString() : undefined; return obj; }, fromAminoMsg(object: DelegationAminoMsg): Delegation { @@ -296,8 +296,8 @@ export const Undelegation = { }, toAmino(message: Undelegation, useInterfaces: boolean = false): UndelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; obj.balance = message.balance ? Coin.toAmino(message.balance, useInterfaces) : undefined; return obj; }, @@ -362,7 +362,7 @@ export const QueuedUndelegation = { if (message.entries) { obj.entries = message.entries.map(e => e ? Undelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.entries = []; + obj.entries = message.entries; } return obj; }, @@ -445,17 +445,17 @@ export const AllianceValidatorInfo = { if (message.globalRewardHistory) { obj.global_reward_history = message.globalRewardHistory.map(e => e ? RewardHistory.toAmino(e, useInterfaces) : undefined); } else { - obj.global_reward_history = []; + obj.global_reward_history = message.globalRewardHistory; } if (message.totalDelegatorShares) { obj.total_delegator_shares = message.totalDelegatorShares.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_delegator_shares = []; + obj.total_delegator_shares = message.totalDelegatorShares; } if (message.validatorShares) { obj.validator_shares = message.validatorShares.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_shares = []; + obj.validator_shares = message.validatorShares; } return obj; }, diff --git a/packages/types/protobuf/codegen/alliance/alliance/events.ts b/packages/types/protobuf/codegen/alliance/alliance/events.ts index a4ad4e29b5..1632607363 100644 --- a/packages/types/protobuf/codegen/alliance/alliance/events.ts +++ b/packages/types/protobuf/codegen/alliance/alliance/events.ts @@ -201,10 +201,10 @@ export const DelegateAllianceEvent = { }, toAmino(message: DelegateAllianceEvent, useInterfaces: boolean = false): DelegateAllianceEventAmino { const obj: any = {}; - obj.allianceSender = message.allianceSender; - obj.validator = message.validator; + obj.allianceSender = message.allianceSender === "" ? undefined : message.allianceSender; + obj.validator = message.validator === "" ? undefined : message.validator; obj.coin = message.coin ? Coin.toAmino(message.coin, useInterfaces) : undefined; - obj.newShares = message.newShares; + obj.newShares = message.newShares === "" ? undefined : message.newShares; return obj; }, fromAminoMsg(object: DelegateAllianceEventAminoMsg): DelegateAllianceEvent { @@ -300,8 +300,8 @@ export const UndelegateAllianceEvent = { }, toAmino(message: UndelegateAllianceEvent, useInterfaces: boolean = false): UndelegateAllianceEventAmino { const obj: any = {}; - obj.allianceSender = message.allianceSender; - obj.validator = message.validator; + obj.allianceSender = message.allianceSender === "" ? undefined : message.allianceSender; + obj.validator = message.validator === "" ? undefined : message.validator; obj.coin = message.coin ? Coin.toAmino(message.coin, useInterfaces) : undefined; obj.completionTime = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : undefined; return obj; @@ -410,9 +410,9 @@ export const RedelegateAllianceEvent = { }, toAmino(message: RedelegateAllianceEvent, useInterfaces: boolean = false): RedelegateAllianceEventAmino { const obj: any = {}; - obj.allianceSender = message.allianceSender; - obj.sourceValidator = message.sourceValidator; - obj.destinationValidator = message.destinationValidator; + obj.allianceSender = message.allianceSender === "" ? undefined : message.allianceSender; + obj.sourceValidator = message.sourceValidator === "" ? undefined : message.sourceValidator; + obj.destinationValidator = message.destinationValidator === "" ? undefined : message.destinationValidator; obj.coin = message.coin ? Coin.toAmino(message.coin, useInterfaces) : undefined; obj.completionTime = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : undefined; return obj; @@ -497,12 +497,12 @@ export const ClaimAllianceRewardsEvent = { }, toAmino(message: ClaimAllianceRewardsEvent, useInterfaces: boolean = false): ClaimAllianceRewardsEventAmino { const obj: any = {}; - obj.allianceSender = message.allianceSender; - obj.validator = message.validator; + obj.allianceSender = message.allianceSender === "" ? undefined : message.allianceSender; + obj.validator = message.validator === "" ? undefined : message.validator; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -567,7 +567,7 @@ export const DeductAllianceAssetsEvent = { if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, diff --git a/packages/types/protobuf/codegen/alliance/alliance/genesis.ts b/packages/types/protobuf/codegen/alliance/alliance/genesis.ts index 28ef053a6d..8e8a797761 100644 --- a/packages/types/protobuf/codegen/alliance/alliance/genesis.ts +++ b/packages/types/protobuf/codegen/alliance/alliance/genesis.ts @@ -185,7 +185,7 @@ export const ValidatorInfoState = { }, toAmino(message: ValidatorInfoState, useInterfaces: boolean = false): ValidatorInfoStateAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; obj.validator = message.validator ? AllianceValidatorInfo.toAmino(message.validator, useInterfaces) : undefined; return obj; }, @@ -432,9 +432,9 @@ export const RewardWeightChangeSnapshotState = { }, toAmino(message: RewardWeightChangeSnapshotState, useInterfaces: boolean = false): RewardWeightChangeSnapshotStateAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.validator = message.validator; - obj.denom = message.denom; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.validator = message.validator === "" ? undefined : message.validator; + obj.denom = message.denom === "" ? undefined : message.denom; obj.snapshot = message.snapshot ? RewardWeightChangeSnapshot.toAmino(message.snapshot, useInterfaces) : undefined; return obj; }, @@ -556,32 +556,32 @@ export const GenesisState = { if (message.assets) { obj.assets = message.assets.map(e => e ? AllianceAsset.toAmino(e, useInterfaces) : undefined); } else { - obj.assets = []; + obj.assets = message.assets; } if (message.validatorInfos) { obj.validator_infos = message.validatorInfos.map(e => e ? ValidatorInfoState.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_infos = []; + obj.validator_infos = message.validatorInfos; } if (message.rewardWeightChangeSnaphots) { obj.reward_weight_change_snaphots = message.rewardWeightChangeSnaphots.map(e => e ? RewardWeightChangeSnapshotState.toAmino(e, useInterfaces) : undefined); } else { - obj.reward_weight_change_snaphots = []; + obj.reward_weight_change_snaphots = message.rewardWeightChangeSnaphots; } if (message.delegations) { obj.delegations = message.delegations.map(e => e ? Delegation.toAmino(e, useInterfaces) : undefined); } else { - obj.delegations = []; + obj.delegations = message.delegations; } if (message.redelegations) { obj.redelegations = message.redelegations.map(e => e ? RedelegationState.toAmino(e, useInterfaces) : undefined); } else { - obj.redelegations = []; + obj.redelegations = message.redelegations; } if (message.undelegations) { obj.undelegations = message.undelegations.map(e => e ? UndelegationState.toAmino(e, useInterfaces) : undefined); } else { - obj.undelegations = []; + obj.undelegations = message.undelegations; } return obj; }, diff --git a/packages/types/protobuf/codegen/alliance/alliance/gov.ts b/packages/types/protobuf/codegen/alliance/alliance/gov.ts index 81cc970fe7..e062360265 100644 --- a/packages/types/protobuf/codegen/alliance/alliance/gov.ts +++ b/packages/types/protobuf/codegen/alliance/alliance/gov.ts @@ -278,12 +278,12 @@ export const MsgCreateAllianceProposal = { }, toAmino(message: MsgCreateAllianceProposal, useInterfaces: boolean = false): MsgCreateAllianceProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.denom = message.denom; - obj.reward_weight = message.rewardWeight; - obj.take_rate = message.takeRate; - obj.reward_change_rate = message.rewardChangeRate; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.reward_weight = message.rewardWeight === "" ? undefined : message.rewardWeight; + obj.take_rate = message.takeRate === "" ? undefined : message.takeRate; + obj.reward_change_rate = message.rewardChangeRate === "" ? undefined : message.rewardChangeRate; obj.reward_change_interval = message.rewardChangeInterval ? Duration.toAmino(message.rewardChangeInterval, useInterfaces) : undefined; obj.reward_weight_range = message.rewardWeightRange ? RewardWeightRange.toAmino(message.rewardWeightRange, useInterfaces) : undefined; return obj; @@ -426,12 +426,12 @@ export const MsgUpdateAllianceProposal = { }, toAmino(message: MsgUpdateAllianceProposal, useInterfaces: boolean = false): MsgUpdateAllianceProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.denom = message.denom; - obj.reward_weight = message.rewardWeight; - obj.take_rate = message.takeRate; - obj.reward_change_rate = message.rewardChangeRate; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.reward_weight = message.rewardWeight === "" ? undefined : message.rewardWeight; + obj.take_rate = message.takeRate === "" ? undefined : message.takeRate; + obj.reward_change_rate = message.rewardChangeRate === "" ? undefined : message.rewardChangeRate; obj.reward_change_interval = message.rewardChangeInterval ? Duration.toAmino(message.rewardChangeInterval, useInterfaces) : undefined; obj.reward_weight_range = message.rewardWeightRange ? RewardWeightRange.toAmino(message.rewardWeightRange, useInterfaces) : undefined; return obj; @@ -519,9 +519,9 @@ export const MsgDeleteAllianceProposal = { }, toAmino(message: MsgDeleteAllianceProposal, useInterfaces: boolean = false): MsgDeleteAllianceProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.denom = message.denom; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: MsgDeleteAllianceProposalAminoMsg): MsgDeleteAllianceProposal { diff --git a/packages/types/protobuf/codegen/alliance/alliance/params.ts b/packages/types/protobuf/codegen/alliance/alliance/params.ts index 2528cf3d7a..0445ba41b0 100644 --- a/packages/types/protobuf/codegen/alliance/alliance/params.ts +++ b/packages/types/protobuf/codegen/alliance/alliance/params.ts @@ -192,8 +192,8 @@ export const RewardHistory = { }, toAmino(message: RewardHistory, useInterfaces: boolean = false): RewardHistoryAmino { const obj: any = {}; - obj.denom = message.denom; - obj.index = message.index; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.index = message.index === "" ? undefined : message.index; return obj; }, fromAminoMsg(object: RewardHistoryAminoMsg): RewardHistory { diff --git a/packages/types/protobuf/codegen/alliance/alliance/query.ts b/packages/types/protobuf/codegen/alliance/alliance/query.ts index b43d559283..e598e0eca9 100644 --- a/packages/types/protobuf/codegen/alliance/alliance/query.ts +++ b/packages/types/protobuf/codegen/alliance/alliance/query.ts @@ -853,7 +853,7 @@ export const QueryAlliancesResponse = { if (message.alliances) { obj.alliances = message.alliances.map(e => e ? AllianceAsset.toAmino(e, useInterfaces) : undefined); } else { - obj.alliances = []; + obj.alliances = message.alliances; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -918,7 +918,7 @@ export const QueryAllianceRequest = { }, toAmino(message: QueryAllianceRequest, useInterfaces: boolean = false): QueryAllianceRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryAllianceRequestAminoMsg): QueryAllianceRequest { @@ -1044,7 +1044,7 @@ export const QueryIBCAllianceRequest = { }, toAmino(message: QueryIBCAllianceRequest, useInterfaces: boolean = false): QueryIBCAllianceRequestAmino { const obj: any = {}; - obj.hash = message.hash; + obj.hash = message.hash === "" ? undefined : message.hash; return obj; }, fromAminoMsg(object: QueryIBCAllianceRequestAminoMsg): QueryIBCAllianceRequest { @@ -1107,7 +1107,7 @@ export const QueryAllianceValidatorRequest = { }, toAmino(message: QueryAllianceValidatorRequest, useInterfaces: boolean = false): QueryAllianceValidatorRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryAllianceValidatorRequestAminoMsg): QueryAllianceValidatorRequest { @@ -1307,7 +1307,7 @@ export const QueryAlliancesDelegationsRequest = { }, toAmino(message: QueryAlliancesDelegationsRequest, useInterfaces: boolean = false): QueryAlliancesDelegationsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1393,8 +1393,8 @@ export const QueryAlliancesDelegationByValidatorRequest = { }, toAmino(message: QueryAlliancesDelegationByValidatorRequest, useInterfaces: boolean = false): QueryAlliancesDelegationByValidatorRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1545,7 +1545,7 @@ export const QueryAlliancesDelegationsResponse = { if (message.delegations) { obj.delegations = message.delegations.map(e => e ? DelegationResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.delegations = []; + obj.delegations = message.delegations; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1643,9 +1643,9 @@ export const QueryAllianceDelegationRequest = { }, toAmino(message: QueryAllianceDelegationRequest, useInterfaces: boolean = false): QueryAllianceDelegationRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; - obj.denom = message.denom; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; + obj.denom = message.denom === "" ? undefined : message.denom; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1742,9 +1742,9 @@ export const QueryIBCAllianceDelegationRequest = { }, toAmino(message: QueryIBCAllianceDelegationRequest, useInterfaces: boolean = false): QueryIBCAllianceDelegationRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; - obj.hash = message.hash; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; + obj.hash = message.hash === "" ? undefined : message.hash; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1904,9 +1904,9 @@ export const QueryAllianceDelegationRewardsRequest = { }, toAmino(message: QueryAllianceDelegationRewardsRequest, useInterfaces: boolean = false): QueryAllianceDelegationRewardsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; - obj.denom = message.denom; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; + obj.denom = message.denom === "" ? undefined : message.denom; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2003,9 +2003,9 @@ export const QueryIBCAllianceDelegationRewardsRequest = { }, toAmino(message: QueryIBCAllianceDelegationRewardsRequest, useInterfaces: boolean = false): QueryIBCAllianceDelegationRewardsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; - obj.hash = message.hash; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; + obj.hash = message.hash === "" ? undefined : message.hash; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2070,7 +2070,7 @@ export const QueryAllianceDelegationRewardsResponse = { if (message.rewards) { obj.rewards = message.rewards.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.rewards = []; + obj.rewards = message.rewards; } return obj; }, @@ -2161,21 +2161,21 @@ export const QueryAllianceValidatorResponse = { }, toAmino(message: QueryAllianceValidatorResponse, useInterfaces: boolean = false): QueryAllianceValidatorResponseAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; if (message.totalDelegationShares) { obj.total_delegation_shares = message.totalDelegationShares.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_delegation_shares = []; + obj.total_delegation_shares = message.totalDelegationShares; } if (message.validatorShares) { obj.validator_shares = message.validatorShares.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_shares = []; + obj.validator_shares = message.validatorShares; } if (message.totalStaked) { obj.total_staked = message.totalStaked.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_staked = []; + obj.total_staked = message.totalStaked; } return obj; }, @@ -2251,7 +2251,7 @@ export const QueryAllianceValidatorsResponse = { if (message.validators) { obj.validators = message.validators.map(e => e ? QueryAllianceValidatorResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.validators = []; + obj.validators = message.validators; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2338,8 +2338,8 @@ export const QueryAllianceUnbondingsByDenomAndDelegatorRequest = { }, toAmino(message: QueryAllianceUnbondingsByDenomAndDelegatorRequest, useInterfaces: boolean = false): QueryAllianceUnbondingsByDenomAndDelegatorRequestAmino { const obj: any = {}; - obj.denom = message.denom; - obj.delegator_addr = message.delegatorAddr; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2415,7 +2415,7 @@ export const QueryAllianceUnbondingsByDenomAndDelegatorResponse = { if (message.unbondings) { obj.unbondings = message.unbondings.map(e => e ? UnbondingDelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.unbondings = []; + obj.unbondings = message.unbondings; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2513,9 +2513,9 @@ export const QueryAllianceUnbondingsRequest = { }, toAmino(message: QueryAllianceUnbondingsRequest, useInterfaces: boolean = false): QueryAllianceUnbondingsRequestAmino { const obj: any = {}; - obj.denom = message.denom; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2591,7 +2591,7 @@ export const QueryAllianceUnbondingsResponse = { if (message.unbondings) { obj.unbondings = message.unbondings.map(e => e ? UnbondingDelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.unbondings = []; + obj.unbondings = message.unbondings; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2678,8 +2678,8 @@ export const QueryAllianceRedelegationsRequest = { }, toAmino(message: QueryAllianceRedelegationsRequest, useInterfaces: boolean = false): QueryAllianceRedelegationsRequestAmino { const obj: any = {}; - obj.denom = message.denom; - obj.delegator_addr = message.delegatorAddr; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2755,7 +2755,7 @@ export const QueryAllianceRedelegationsResponse = { if (message.redelegations) { obj.redelegations = message.redelegations.map(e => e ? RedelegationEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.redelegations = []; + obj.redelegations = message.redelegations; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/alliance/alliance/redelegations.ts b/packages/types/protobuf/codegen/alliance/alliance/redelegations.ts index 52fb474dec..296b12846a 100644 --- a/packages/types/protobuf/codegen/alliance/alliance/redelegations.ts +++ b/packages/types/protobuf/codegen/alliance/alliance/redelegations.ts @@ -143,7 +143,7 @@ export const QueuedRedelegation = { if (message.entries) { obj.entries = message.entries.map(e => e ? Redelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.entries = []; + obj.entries = message.entries; } return obj; }, @@ -240,9 +240,9 @@ export const Redelegation = { }, toAmino(message: Redelegation, useInterfaces: boolean = false): RedelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.src_validator_address = message.srcValidatorAddress; - obj.dst_validator_address = message.dstValidatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.src_validator_address = message.srcValidatorAddress === "" ? undefined : message.srcValidatorAddress; + obj.dst_validator_address = message.dstValidatorAddress === "" ? undefined : message.dstValidatorAddress; obj.balance = message.balance ? Coin.toAmino(message.balance, useInterfaces) : undefined; return obj; }, @@ -350,9 +350,9 @@ export const RedelegationEntry = { }, toAmino(message: RedelegationEntry, useInterfaces: boolean = false): RedelegationEntryAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.src_validator_address = message.srcValidatorAddress; - obj.dst_validator_address = message.dstValidatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.src_validator_address = message.srcValidatorAddress === "" ? undefined : message.srcValidatorAddress; + obj.dst_validator_address = message.dstValidatorAddress === "" ? undefined : message.dstValidatorAddress; obj.balance = message.balance ? Coin.toAmino(message.balance, useInterfaces) : undefined; obj.completion_time = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/alliance/alliance/tx.ts b/packages/types/protobuf/codegen/alliance/alliance/tx.ts index ab84d6fd0c..8dcfec5a2b 100644 --- a/packages/types/protobuf/codegen/alliance/alliance/tx.ts +++ b/packages/types/protobuf/codegen/alliance/alliance/tx.ts @@ -400,8 +400,8 @@ export const MsgDelegate = { }, toAmino(message: MsgDelegate, useInterfaces: boolean = false): MsgDelegateAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -543,8 +543,8 @@ export const MsgUndelegate = { }, toAmino(message: MsgUndelegate, useInterfaces: boolean = false): MsgUndelegateAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -697,9 +697,9 @@ export const MsgRedelegate = { }, toAmino(message: MsgRedelegate, useInterfaces: boolean = false): MsgRedelegateAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_src_address = message.validatorSrcAddress === "" ? undefined : message.validatorSrcAddress; + obj.validator_dst_address = message.validatorDstAddress === "" ? undefined : message.validatorDstAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -841,9 +841,9 @@ export const MsgClaimDelegationRewards = { }, toAmino(message: MsgClaimDelegationRewards, useInterfaces: boolean = false): MsgClaimDelegationRewardsAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: MsgClaimDelegationRewardsAminoMsg): MsgClaimDelegationRewards { @@ -973,7 +973,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, @@ -1153,11 +1153,11 @@ export const MsgCreateAlliance = { }, toAmino(message: MsgCreateAlliance, useInterfaces: boolean = false): MsgCreateAllianceAmino { const obj: any = {}; - obj.authority = message.authority; - obj.denom = message.denom; - obj.reward_weight = message.rewardWeight; - obj.take_rate = message.takeRate; - obj.reward_change_rate = message.rewardChangeRate; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.reward_weight = message.rewardWeight === "" ? undefined : message.rewardWeight; + obj.take_rate = message.takeRate === "" ? undefined : message.takeRate; + obj.reward_change_rate = message.rewardChangeRate === "" ? undefined : message.rewardChangeRate; obj.reward_change_interval = message.rewardChangeInterval ? Duration.toAmino(message.rewardChangeInterval, useInterfaces) : undefined; obj.reward_weight_range = message.rewardWeightRange ? RewardWeightRange.toAmino(message.rewardWeightRange, useInterfaces) : undefined; return obj; @@ -1338,11 +1338,11 @@ export const MsgUpdateAlliance = { }, toAmino(message: MsgUpdateAlliance, useInterfaces: boolean = false): MsgUpdateAllianceAmino { const obj: any = {}; - obj.authority = message.authority; - obj.denom = message.denom; - obj.reward_weight = message.rewardWeight; - obj.take_rate = message.takeRate; - obj.reward_change_rate = message.rewardChangeRate; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.reward_weight = message.rewardWeight === "" ? undefined : message.rewardWeight; + obj.take_rate = message.takeRate === "" ? undefined : message.takeRate; + obj.reward_change_rate = message.rewardChangeRate === "" ? undefined : message.rewardChangeRate; obj.reward_change_interval = message.rewardChangeInterval ? Duration.toAmino(message.rewardChangeInterval, useInterfaces) : undefined; obj.reward_weight_range = message.rewardWeightRange ? RewardWeightRange.toAmino(message.rewardWeightRange, useInterfaces) : undefined; return obj; @@ -1468,8 +1468,8 @@ export const MsgDeleteAlliance = { }, toAmino(message: MsgDeleteAlliance, useInterfaces: boolean = false): MsgDeleteAllianceAmino { const obj: any = {}; - obj.authority = message.authority; - obj.denom = message.denom; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: MsgDeleteAllianceAminoMsg): MsgDeleteAlliance { diff --git a/packages/types/protobuf/codegen/alliance/alliance/unbonding.ts b/packages/types/protobuf/codegen/alliance/alliance/unbonding.ts index 0a0376c66f..771adb35ad 100644 --- a/packages/types/protobuf/codegen/alliance/alliance/unbonding.ts +++ b/packages/types/protobuf/codegen/alliance/alliance/unbonding.ts @@ -100,8 +100,8 @@ export const UnbondingDelegation = { toAmino(message: UnbondingDelegation, useInterfaces: boolean = false): UnbondingDelegationAmino { const obj: any = {}; obj.completion_time = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : undefined; - obj.validator_address = message.validatorAddress; - obj.amount = message.amount; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: UnbondingDelegationAminoMsg): UnbondingDelegation { diff --git a/packages/types/protobuf/codegen/binary.ts b/packages/types/protobuf/codegen/binary.ts index 84004f7a08..5cf7c8c01f 100644 --- a/packages/types/protobuf/codegen/binary.ts +++ b/packages/types/protobuf/codegen/binary.ts @@ -1,8 +1,8 @@ //@ts-nocheck /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.4.12 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.8.3 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. +* and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/packages/types/protobuf/codegen/bitsong/fantoken/v1beta1/tx.ts b/packages/types/protobuf/codegen/bitsong/fantoken/v1beta1/tx.ts index db0cb090ba..5811444a23 100644 --- a/packages/types/protobuf/codegen/bitsong/fantoken/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/bitsong/fantoken/v1beta1/tx.ts @@ -405,12 +405,12 @@ export const MsgIssue = { }, toAmino(message: MsgIssue, useInterfaces: boolean = false): MsgIssueAmino { const obj: any = {}; - obj.symbol = message.symbol; - obj.name = message.name; - obj.max_supply = message.maxSupply; - obj.authority = message.authority; - obj.minter = message.minter; - obj.uri = message.uri; + obj.symbol = message.symbol === "" ? undefined : message.symbol; + obj.name = message.name === "" ? undefined : message.name; + obj.max_supply = message.maxSupply === "" ? undefined : message.maxSupply; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.minter = message.minter === "" ? undefined : message.minter; + obj.uri = message.uri === "" ? undefined : message.uri; return obj; }, fromAminoMsg(object: MsgIssueAminoMsg): MsgIssue { @@ -534,8 +534,8 @@ export const MsgDisableMint = { }, toAmino(message: MsgDisableMint, useInterfaces: boolean = false): MsgDisableMintAmino { const obj: any = {}; - obj.denom = message.denom; - obj.minter = message.minter; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.minter = message.minter === "" ? undefined : message.minter; return obj; }, fromAminoMsg(object: MsgDisableMintAminoMsg): MsgDisableMint { @@ -670,9 +670,9 @@ export const MsgMint = { }, toAmino(message: MsgMint, useInterfaces: boolean = false): MsgMintAmino { const obj: any = {}; - obj.recipient = message.recipient; + obj.recipient = message.recipient === "" ? undefined : message.recipient; obj.coin = message.coin ? Coin.toAmino(message.coin, useInterfaces) : undefined; - obj.minter = message.minter; + obj.minter = message.minter === "" ? undefined : message.minter; return obj; }, fromAminoMsg(object: MsgMintAminoMsg): MsgMint { @@ -797,7 +797,7 @@ export const MsgBurn = { toAmino(message: MsgBurn, useInterfaces: boolean = false): MsgBurnAmino { const obj: any = {}; obj.coin = message.coin ? Coin.toAmino(message.coin, useInterfaces) : undefined; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgBurnAminoMsg): MsgBurn { @@ -932,9 +932,9 @@ export const MsgSetMinter = { }, toAmino(message: MsgSetMinter, useInterfaces: boolean = false): MsgSetMinterAmino { const obj: any = {}; - obj.denom = message.denom; - obj.old_minter = message.oldMinter; - obj.new_minter = message.newMinter; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.old_minter = message.oldMinter === "" ? undefined : message.oldMinter; + obj.new_minter = message.newMinter === "" ? undefined : message.newMinter; return obj; }, fromAminoMsg(object: MsgSetMinterAminoMsg): MsgSetMinter { @@ -1069,9 +1069,9 @@ export const MsgSetAuthority = { }, toAmino(message: MsgSetAuthority, useInterfaces: boolean = false): MsgSetAuthorityAmino { const obj: any = {}; - obj.denom = message.denom; - obj.old_authority = message.oldAuthority; - obj.new_authority = message.newAuthority; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.old_authority = message.oldAuthority === "" ? undefined : message.oldAuthority; + obj.new_authority = message.newAuthority === "" ? undefined : message.newAuthority; return obj; }, fromAminoMsg(object: MsgSetAuthorityAminoMsg): MsgSetAuthority { @@ -1206,9 +1206,9 @@ export const MsgSetUri = { }, toAmino(message: MsgSetUri, useInterfaces: boolean = false): MsgSetUriAmino { const obj: any = {}; - obj.authority = message.authority; - obj.denom = message.denom; - obj.uri = message.uri; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.uri = message.uri === "" ? undefined : message.uri; return obj; }, fromAminoMsg(object: MsgSetUriAminoMsg): MsgSetUri { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/attester.ts b/packages/types/protobuf/codegen/circle/cctp/v1/attester.ts index 113f386fc3..2f59369148 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/attester.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/attester.ts @@ -72,7 +72,7 @@ export const Attester = { }, toAmino(message: Attester, useInterfaces: boolean = false): AttesterAmino { const obj: any = {}; - obj.attester = message.attester; + obj.attester = message.attester === "" ? undefined : message.attester; return obj; }, fromAminoMsg(object: AttesterAminoMsg): Attester { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/burn_message.ts b/packages/types/protobuf/codegen/circle/cctp/v1/burn_message.ts index f6d4cd22bf..eb25579f07 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/burn_message.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/burn_message.ts @@ -141,10 +141,10 @@ export const BurnMessage = { }, toAmino(message: BurnMessage, useInterfaces: boolean = false): BurnMessageAmino { const obj: any = {}; - obj.version = message.version; + obj.version = message.version === 0 ? undefined : message.version; obj.burn_token = message.burnToken ? base64FromBytes(message.burnToken) : undefined; obj.mint_recipient = message.mintRecipient ? base64FromBytes(message.mintRecipient) : undefined; - obj.amount = message.amount; + obj.amount = message.amount === "" ? undefined : message.amount; obj.message_sender = message.messageSender ? base64FromBytes(message.messageSender) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/burning_and_minting_paused.ts b/packages/types/protobuf/codegen/circle/cctp/v1/burning_and_minting_paused.ts index 5c30c546b4..bfaffd0bbb 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/burning_and_minting_paused.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/burning_and_minting_paused.ts @@ -72,7 +72,7 @@ export const BurningAndMintingPaused = { }, toAmino(message: BurningAndMintingPaused, useInterfaces: boolean = false): BurningAndMintingPausedAmino { const obj: any = {}; - obj.paused = message.paused; + obj.paused = message.paused === false ? undefined : message.paused; return obj; }, fromAminoMsg(object: BurningAndMintingPausedAminoMsg): BurningAndMintingPaused { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/events.ts b/packages/types/protobuf/codegen/circle/cctp/v1/events.ts index 695eac7e31..4b3c5e1da2 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/events.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/events.ts @@ -805,7 +805,7 @@ export const AttesterEnabled = { }, toAmino(message: AttesterEnabled, useInterfaces: boolean = false): AttesterEnabledAmino { const obj: any = {}; - obj.attester = message.attester; + obj.attester = message.attester === "" ? undefined : message.attester; return obj; }, fromAminoMsg(object: AttesterEnabledAminoMsg): AttesterEnabled { @@ -868,7 +868,7 @@ export const AttesterDisabled = { }, toAmino(message: AttesterDisabled, useInterfaces: boolean = false): AttesterDisabledAmino { const obj: any = {}; - obj.attester = message.attester; + obj.attester = message.attester === "" ? undefined : message.attester; return obj; }, fromAminoMsg(object: AttesterDisabledAminoMsg): AttesterDisabled { @@ -942,8 +942,8 @@ export const SignatureThresholdUpdated = { }, toAmino(message: SignatureThresholdUpdated, useInterfaces: boolean = false): SignatureThresholdUpdatedAmino { const obj: any = {}; - obj.old_signature_threshold = message.oldSignatureThreshold ? message.oldSignatureThreshold.toString() : undefined; - obj.new_signature_threshold = message.newSignatureThreshold ? message.newSignatureThreshold.toString() : undefined; + obj.old_signature_threshold = message.oldSignatureThreshold !== BigInt(0) ? message.oldSignatureThreshold.toString() : undefined; + obj.new_signature_threshold = message.newSignatureThreshold !== BigInt(0) ? message.newSignatureThreshold.toString() : undefined; return obj; }, fromAminoMsg(object: SignatureThresholdUpdatedAminoMsg): SignatureThresholdUpdated { @@ -1017,8 +1017,8 @@ export const OwnerUpdated = { }, toAmino(message: OwnerUpdated, useInterfaces: boolean = false): OwnerUpdatedAmino { const obj: any = {}; - obj.previous_owner = message.previousOwner; - obj.new_owner = message.newOwner; + obj.previous_owner = message.previousOwner === "" ? undefined : message.previousOwner; + obj.new_owner = message.newOwner === "" ? undefined : message.newOwner; return obj; }, fromAminoMsg(object: OwnerUpdatedAminoMsg): OwnerUpdated { @@ -1092,8 +1092,8 @@ export const OwnershipTransferStarted = { }, toAmino(message: OwnershipTransferStarted, useInterfaces: boolean = false): OwnershipTransferStartedAmino { const obj: any = {}; - obj.previous_owner = message.previousOwner; - obj.new_owner = message.newOwner; + obj.previous_owner = message.previousOwner === "" ? undefined : message.previousOwner; + obj.new_owner = message.newOwner === "" ? undefined : message.newOwner; return obj; }, fromAminoMsg(object: OwnershipTransferStartedAminoMsg): OwnershipTransferStarted { @@ -1167,8 +1167,8 @@ export const PauserUpdated = { }, toAmino(message: PauserUpdated, useInterfaces: boolean = false): PauserUpdatedAmino { const obj: any = {}; - obj.previous_pauser = message.previousPauser; - obj.new_pauser = message.newPauser; + obj.previous_pauser = message.previousPauser === "" ? undefined : message.previousPauser; + obj.new_pauser = message.newPauser === "" ? undefined : message.newPauser; return obj; }, fromAminoMsg(object: PauserUpdatedAminoMsg): PauserUpdated { @@ -1242,8 +1242,8 @@ export const AttesterManagerUpdated = { }, toAmino(message: AttesterManagerUpdated, useInterfaces: boolean = false): AttesterManagerUpdatedAmino { const obj: any = {}; - obj.previous_attester_manager = message.previousAttesterManager; - obj.new_attester_manager = message.newAttesterManager; + obj.previous_attester_manager = message.previousAttesterManager === "" ? undefined : message.previousAttesterManager; + obj.new_attester_manager = message.newAttesterManager === "" ? undefined : message.newAttesterManager; return obj; }, fromAminoMsg(object: AttesterManagerUpdatedAminoMsg): AttesterManagerUpdated { @@ -1317,8 +1317,8 @@ export const TokenControllerUpdated = { }, toAmino(message: TokenControllerUpdated, useInterfaces: boolean = false): TokenControllerUpdatedAmino { const obj: any = {}; - obj.previous_token_controller = message.previousTokenController; - obj.new_token_controller = message.newTokenController; + obj.previous_token_controller = message.previousTokenController === "" ? undefined : message.previousTokenController; + obj.new_token_controller = message.newTokenController === "" ? undefined : message.newTokenController; return obj; }, fromAminoMsg(object: TokenControllerUpdatedAminoMsg): TokenControllerUpdated { @@ -1658,12 +1658,12 @@ export const DepositForBurn = { }, toAmino(message: DepositForBurn, useInterfaces: boolean = false): DepositForBurnAmino { const obj: any = {}; - obj.nonce = message.nonce ? message.nonce.toString() : undefined; - obj.burn_token = message.burnToken; - obj.amount = message.amount; - obj.depositor = message.depositor; + obj.nonce = message.nonce !== BigInt(0) ? message.nonce.toString() : undefined; + obj.burn_token = message.burnToken === "" ? undefined : message.burnToken; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.depositor = message.depositor === "" ? undefined : message.depositor; obj.mint_recipient = message.mintRecipient ? base64FromBytes(message.mintRecipient) : undefined; - obj.destination_domain = message.destinationDomain; + obj.destination_domain = message.destinationDomain === 0 ? undefined : message.destinationDomain; obj.destination_token_messenger = message.destinationTokenMessenger ? base64FromBytes(message.destinationTokenMessenger) : undefined; obj.destination_caller = message.destinationCaller ? base64FromBytes(message.destinationCaller) : undefined; return obj; @@ -1751,8 +1751,8 @@ export const MintAndWithdraw = { toAmino(message: MintAndWithdraw, useInterfaces: boolean = false): MintAndWithdrawAmino { const obj: any = {}; obj.mint_recipient = message.mintRecipient ? base64FromBytes(message.mintRecipient) : undefined; - obj.amount = message.amount; - obj.mint_token = message.mintToken; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.mint_token = message.mintToken === "" ? undefined : message.mintToken; return obj; }, fromAminoMsg(object: MintAndWithdrawAminoMsg): MintAndWithdraw { @@ -1837,8 +1837,8 @@ export const TokenPairLinked = { }, toAmino(message: TokenPairLinked, useInterfaces: boolean = false): TokenPairLinkedAmino { const obj: any = {}; - obj.local_token = message.localToken; - obj.remote_domain = message.remoteDomain; + obj.local_token = message.localToken === "" ? undefined : message.localToken; + obj.remote_domain = message.remoteDomain === 0 ? undefined : message.remoteDomain; obj.remote_token = message.remoteToken ? base64FromBytes(message.remoteToken) : undefined; return obj; }, @@ -1924,8 +1924,8 @@ export const TokenPairUnlinked = { }, toAmino(message: TokenPairUnlinked, useInterfaces: boolean = false): TokenPairUnlinkedAmino { const obj: any = {}; - obj.local_token = message.localToken; - obj.remote_domain = message.remoteDomain; + obj.local_token = message.localToken === "" ? undefined : message.localToken; + obj.remote_domain = message.remoteDomain === 0 ? undefined : message.remoteDomain; obj.remote_token = message.remoteToken ? base64FromBytes(message.remoteToken) : undefined; return obj; }, @@ -2096,9 +2096,9 @@ export const MessageReceived = { }, toAmino(message: MessageReceived, useInterfaces: boolean = false): MessageReceivedAmino { const obj: any = {}; - obj.caller = message.caller; - obj.source_domain = message.sourceDomain; - obj.nonce = message.nonce ? message.nonce.toString() : undefined; + obj.caller = message.caller === "" ? undefined : message.caller; + obj.source_domain = message.sourceDomain === 0 ? undefined : message.sourceDomain; + obj.nonce = message.nonce !== BigInt(0) ? message.nonce.toString() : undefined; obj.sender = message.sender ? base64FromBytes(message.sender) : undefined; obj.message_body = message.messageBody ? base64FromBytes(message.messageBody) : undefined; return obj; @@ -2163,7 +2163,7 @@ export const MaxMessageBodySizeUpdated = { }, toAmino(message: MaxMessageBodySizeUpdated, useInterfaces: boolean = false): MaxMessageBodySizeUpdatedAmino { const obj: any = {}; - obj.new_max_message_body_size = message.newMaxMessageBodySize ? message.newMaxMessageBodySize.toString() : undefined; + obj.new_max_message_body_size = message.newMaxMessageBodySize !== BigInt(0) ? message.newMaxMessageBodySize.toString() : undefined; return obj; }, fromAminoMsg(object: MaxMessageBodySizeUpdatedAminoMsg): MaxMessageBodySizeUpdated { @@ -2237,7 +2237,7 @@ export const RemoteTokenMessengerAdded = { }, toAmino(message: RemoteTokenMessengerAdded, useInterfaces: boolean = false): RemoteTokenMessengerAddedAmino { const obj: any = {}; - obj.domain = message.domain; + obj.domain = message.domain === 0 ? undefined : message.domain; obj.remote_token_messenger = message.remoteTokenMessenger ? base64FromBytes(message.remoteTokenMessenger) : undefined; return obj; }, @@ -2312,7 +2312,7 @@ export const RemoteTokenMessengerRemoved = { }, toAmino(message: RemoteTokenMessengerRemoved, useInterfaces: boolean = false): RemoteTokenMessengerRemovedAmino { const obj: any = {}; - obj.domain = message.domain; + obj.domain = message.domain === 0 ? undefined : message.domain; obj.remote_token_messenger = message.remoteTokenMessenger ? base64FromBytes(message.remoteTokenMessenger) : undefined; return obj; }, @@ -2387,8 +2387,8 @@ export const SetBurnLimitPerMessage = { }, toAmino(message: SetBurnLimitPerMessage, useInterfaces: boolean = false): SetBurnLimitPerMessageAmino { const obj: any = {}; - obj.token = message.token; - obj.burn_limit_per_message = message.burnLimitPerMessage; + obj.token = message.token === "" ? undefined : message.token; + obj.burn_limit_per_message = message.burnLimitPerMessage === "" ? undefined : message.burnLimitPerMessage; return obj; }, fromAminoMsg(object: SetBurnLimitPerMessageAminoMsg): SetBurnLimitPerMessage { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/genesis.ts b/packages/types/protobuf/codegen/circle/cctp/v1/genesis.ts index e2812e79aa..6affec0934 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/genesis.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/genesis.ts @@ -245,19 +245,19 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.owner = message.owner; - obj.attester_manager = message.attesterManager; - obj.pauser = message.pauser; - obj.token_controller = message.tokenController; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.attester_manager = message.attesterManager === "" ? undefined : message.attesterManager; + obj.pauser = message.pauser === "" ? undefined : message.pauser; + obj.token_controller = message.tokenController === "" ? undefined : message.tokenController; if (message.attesterList) { obj.attester_list = message.attesterList.map(e => e ? Attester.toAmino(e, useInterfaces) : undefined); } else { - obj.attester_list = []; + obj.attester_list = message.attesterList; } if (message.perMessageBurnLimitList) { obj.per_message_burn_limit_list = message.perMessageBurnLimitList.map(e => e ? PerMessageBurnLimit.toAmino(e, useInterfaces) : undefined); } else { - obj.per_message_burn_limit_list = []; + obj.per_message_burn_limit_list = message.perMessageBurnLimitList; } obj.burning_and_minting_paused = message.burningAndMintingPaused ? BurningAndMintingPaused.toAmino(message.burningAndMintingPaused, useInterfaces) : undefined; obj.sending_and_receiving_messages_paused = message.sendingAndReceivingMessagesPaused ? SendingAndReceivingMessagesPaused.toAmino(message.sendingAndReceivingMessagesPaused, useInterfaces) : undefined; @@ -267,17 +267,17 @@ export const GenesisState = { if (message.tokenPairList) { obj.token_pair_list = message.tokenPairList.map(e => e ? TokenPair.toAmino(e, useInterfaces) : undefined); } else { - obj.token_pair_list = []; + obj.token_pair_list = message.tokenPairList; } if (message.usedNoncesList) { obj.used_nonces_list = message.usedNoncesList.map(e => e ? Nonce.toAmino(e, useInterfaces) : undefined); } else { - obj.used_nonces_list = []; + obj.used_nonces_list = message.usedNoncesList; } if (message.tokenMessengerList) { obj.token_messenger_list = message.tokenMessengerList.map(e => e ? RemoteTokenMessenger.toAmino(e, useInterfaces) : undefined); } else { - obj.token_messenger_list = []; + obj.token_messenger_list = message.tokenMessengerList; } return obj; }, diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/max_message_body_size.ts b/packages/types/protobuf/codegen/circle/cctp/v1/max_message_body_size.ts index a9616caea8..ea27ea70a2 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/max_message_body_size.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/max_message_body_size.ts @@ -72,7 +72,7 @@ export const MaxMessageBodySize = { }, toAmino(message: MaxMessageBodySize, useInterfaces: boolean = false): MaxMessageBodySizeAmino { const obj: any = {}; - obj.amount = message.amount ? message.amount.toString() : undefined; + obj.amount = message.amount !== BigInt(0) ? message.amount.toString() : undefined; return obj; }, fromAminoMsg(object: MaxMessageBodySizeAminoMsg): MaxMessageBodySize { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/message.ts b/packages/types/protobuf/codegen/circle/cctp/v1/message.ts index bd2d3bb13b..b32d447ee0 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/message.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/message.ts @@ -207,10 +207,10 @@ export const Message = { }, toAmino(message: Message, useInterfaces: boolean = false): MessageAmino { const obj: any = {}; - obj.version = message.version; - obj.source_domain = message.sourceDomain; - obj.destination_domain = message.destinationDomain; - obj.nonce = message.nonce ? message.nonce.toString() : undefined; + obj.version = message.version === 0 ? undefined : message.version; + obj.source_domain = message.sourceDomain === 0 ? undefined : message.sourceDomain; + obj.destination_domain = message.destinationDomain === 0 ? undefined : message.destinationDomain; + obj.nonce = message.nonce !== BigInt(0) ? message.nonce.toString() : undefined; obj.sender = message.sender ? base64FromBytes(message.sender) : undefined; obj.recipient = message.recipient ? base64FromBytes(message.recipient) : undefined; obj.destination_caller = message.destinationCaller ? base64FromBytes(message.destinationCaller) : undefined; diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/nonce.ts b/packages/types/protobuf/codegen/circle/cctp/v1/nonce.ts index 0bb2aa2bbd..ff4cda27b0 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/nonce.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/nonce.ts @@ -95,8 +95,8 @@ export const Nonce = { }, toAmino(message: Nonce, useInterfaces: boolean = false): NonceAmino { const obj: any = {}; - obj.source_domain = message.sourceDomain; - obj.nonce = message.nonce ? message.nonce.toString() : undefined; + obj.source_domain = message.sourceDomain === 0 ? undefined : message.sourceDomain; + obj.nonce = message.nonce !== BigInt(0) ? message.nonce.toString() : undefined; return obj; }, fromAminoMsg(object: NonceAminoMsg): Nonce { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/per_message_burn_limit.ts b/packages/types/protobuf/codegen/circle/cctp/v1/per_message_burn_limit.ts index 2cf8456b01..e98e324666 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/per_message_burn_limit.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/per_message_burn_limit.ts @@ -95,8 +95,8 @@ export const PerMessageBurnLimit = { }, toAmino(message: PerMessageBurnLimit, useInterfaces: boolean = false): PerMessageBurnLimitAmino { const obj: any = {}; - obj.denom = message.denom; - obj.amount = message.amount; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: PerMessageBurnLimitAminoMsg): PerMessageBurnLimit { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/query.ts b/packages/types/protobuf/codegen/circle/cctp/v1/query.ts index 392af2fbc3..021fc2537d 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/query.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/query.ts @@ -1344,10 +1344,10 @@ export const QueryRolesResponse = { }, toAmino(message: QueryRolesResponse, useInterfaces: boolean = false): QueryRolesResponseAmino { const obj: any = {}; - obj.owner = message.owner; - obj.attester_manager = message.attesterManager; - obj.pauser = message.pauser; - obj.token_controller = message.tokenController; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.attester_manager = message.attesterManager === "" ? undefined : message.attesterManager; + obj.pauser = message.pauser === "" ? undefined : message.pauser; + obj.token_controller = message.tokenController === "" ? undefined : message.tokenController; return obj; }, fromAminoMsg(object: QueryRolesResponseAminoMsg): QueryRolesResponse { @@ -1410,7 +1410,7 @@ export const QueryGetAttesterRequest = { }, toAmino(message: QueryGetAttesterRequest, useInterfaces: boolean = false): QueryGetAttesterRequestAmino { const obj: any = {}; - obj.attester = message.attester; + obj.attester = message.attester === "" ? undefined : message.attester; return obj; }, fromAminoMsg(object: QueryGetAttesterRequestAminoMsg): QueryGetAttesterRequest { @@ -1611,7 +1611,7 @@ export const QueryAllAttestersResponse = { if (message.attesters) { obj.attesters = message.attesters.map(e => e ? Attester.toAmino(e, useInterfaces) : undefined); } else { - obj.attesters = []; + obj.attesters = message.attesters; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1676,7 +1676,7 @@ export const QueryGetPerMessageBurnLimitRequest = { }, toAmino(message: QueryGetPerMessageBurnLimitRequest, useInterfaces: boolean = false): QueryGetPerMessageBurnLimitRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryGetPerMessageBurnLimitRequestAminoMsg): QueryGetPerMessageBurnLimitRequest { @@ -1877,7 +1877,7 @@ export const QueryAllPerMessageBurnLimitsResponse = { if (message.burnLimits) { obj.burn_limits = message.burnLimits.map(e => e ? PerMessageBurnLimit.toAmino(e, useInterfaces) : undefined); } else { - obj.burn_limits = []; + obj.burn_limits = message.burnLimits; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2518,8 +2518,8 @@ export const QueryGetTokenPairRequest = { }, toAmino(message: QueryGetTokenPairRequest, useInterfaces: boolean = false): QueryGetTokenPairRequestAmino { const obj: any = {}; - obj.remote_domain = message.remoteDomain; - obj.remote_token = message.remoteToken; + obj.remote_domain = message.remoteDomain === 0 ? undefined : message.remoteDomain; + obj.remote_token = message.remoteToken === "" ? undefined : message.remoteToken; return obj; }, fromAminoMsg(object: QueryGetTokenPairRequestAminoMsg): QueryGetTokenPairRequest { @@ -2720,7 +2720,7 @@ export const QueryAllTokenPairsResponse = { if (message.tokenPairs) { obj.token_pairs = message.tokenPairs.map(e => e ? TokenPair.toAmino(e, useInterfaces) : undefined); } else { - obj.token_pairs = []; + obj.token_pairs = message.tokenPairs; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2796,8 +2796,8 @@ export const QueryGetUsedNonceRequest = { }, toAmino(message: QueryGetUsedNonceRequest, useInterfaces: boolean = false): QueryGetUsedNonceRequestAmino { const obj: any = {}; - obj.source_domain = message.sourceDomain; - obj.nonce = message.nonce ? message.nonce.toString() : undefined; + obj.source_domain = message.sourceDomain === 0 ? undefined : message.sourceDomain; + obj.nonce = message.nonce !== BigInt(0) ? message.nonce.toString() : undefined; return obj; }, fromAminoMsg(object: QueryGetUsedNonceRequestAminoMsg): QueryGetUsedNonceRequest { @@ -2998,7 +2998,7 @@ export const QueryAllUsedNoncesResponse = { if (message.usedNonces) { obj.used_nonces = message.usedNonces.map(e => e ? Nonce.toAmino(e, useInterfaces) : undefined); } else { - obj.used_nonces = []; + obj.used_nonces = message.usedNonces; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -3063,7 +3063,7 @@ export const QueryRemoteTokenMessengerRequest = { }, toAmino(message: QueryRemoteTokenMessengerRequest, useInterfaces: boolean = false): QueryRemoteTokenMessengerRequestAmino { const obj: any = {}; - obj.domain_id = message.domainId; + obj.domain_id = message.domainId === 0 ? undefined : message.domainId; return obj; }, fromAminoMsg(object: QueryRemoteTokenMessengerRequestAminoMsg): QueryRemoteTokenMessengerRequest { @@ -3264,7 +3264,7 @@ export const QueryRemoteTokenMessengersResponse = { if (message.remoteTokenMessengers) { obj.remote_token_messengers = message.remoteTokenMessengers.map(e => e ? RemoteTokenMessenger.toAmino(e, useInterfaces) : undefined); } else { - obj.remote_token_messengers = []; + obj.remote_token_messengers = message.remoteTokenMessengers; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -3379,7 +3379,7 @@ export const QueryBurnMessageVersionResponse = { }, toAmino(message: QueryBurnMessageVersionResponse, useInterfaces: boolean = false): QueryBurnMessageVersionResponseAmino { const obj: any = {}; - obj.version = message.version; + obj.version = message.version === 0 ? undefined : message.version; return obj; }, fromAminoMsg(object: QueryBurnMessageVersionResponseAminoMsg): QueryBurnMessageVersionResponse { @@ -3492,7 +3492,7 @@ export const QueryLocalMessageVersionResponse = { }, toAmino(message: QueryLocalMessageVersionResponse, useInterfaces: boolean = false): QueryLocalMessageVersionResponseAmino { const obj: any = {}; - obj.version = message.version; + obj.version = message.version === 0 ? undefined : message.version; return obj; }, fromAminoMsg(object: QueryLocalMessageVersionResponseAminoMsg): QueryLocalMessageVersionResponse { @@ -3605,7 +3605,7 @@ export const QueryLocalDomainResponse = { }, toAmino(message: QueryLocalDomainResponse, useInterfaces: boolean = false): QueryLocalDomainResponseAmino { const obj: any = {}; - obj.domain_id = message.domainId; + obj.domain_id = message.domainId === 0 ? undefined : message.domainId; return obj; }, fromAminoMsg(object: QueryLocalDomainResponseAminoMsg): QueryLocalDomainResponse { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/remote_token_messenger.ts b/packages/types/protobuf/codegen/circle/cctp/v1/remote_token_messenger.ts index a480be622a..cf31651a23 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/remote_token_messenger.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/remote_token_messenger.ts @@ -87,7 +87,7 @@ export const RemoteTokenMessenger = { }, toAmino(message: RemoteTokenMessenger, useInterfaces: boolean = false): RemoteTokenMessengerAmino { const obj: any = {}; - obj.domain_id = message.domainId; + obj.domain_id = message.domainId === 0 ? undefined : message.domainId; obj.address = message.address ? base64FromBytes(message.address) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/sending_and_receiving_messages_paused.ts b/packages/types/protobuf/codegen/circle/cctp/v1/sending_and_receiving_messages_paused.ts index 1f018d2db3..3ebccc8814 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/sending_and_receiving_messages_paused.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/sending_and_receiving_messages_paused.ts @@ -72,7 +72,7 @@ export const SendingAndReceivingMessagesPaused = { }, toAmino(message: SendingAndReceivingMessagesPaused, useInterfaces: boolean = false): SendingAndReceivingMessagesPausedAmino { const obj: any = {}; - obj.paused = message.paused; + obj.paused = message.paused === false ? undefined : message.paused; return obj; }, fromAminoMsg(object: SendingAndReceivingMessagesPausedAminoMsg): SendingAndReceivingMessagesPaused { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/signature_threshold.ts b/packages/types/protobuf/codegen/circle/cctp/v1/signature_threshold.ts index 95b6344613..df187a3e78 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/signature_threshold.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/signature_threshold.ts @@ -75,7 +75,7 @@ export const SignatureThreshold = { }, toAmino(message: SignatureThreshold, useInterfaces: boolean = false): SignatureThresholdAmino { const obj: any = {}; - obj.amount = message.amount; + obj.amount = message.amount === 0 ? undefined : message.amount; return obj; }, fromAminoMsg(object: SignatureThresholdAminoMsg): SignatureThreshold { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/token_pair.ts b/packages/types/protobuf/codegen/circle/cctp/v1/token_pair.ts index ed092eaffa..269a33205a 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/token_pair.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/token_pair.ts @@ -116,9 +116,9 @@ export const TokenPair = { }, toAmino(message: TokenPair, useInterfaces: boolean = false): TokenPairAmino { const obj: any = {}; - obj.remote_domain = message.remoteDomain; + obj.remote_domain = message.remoteDomain === 0 ? undefined : message.remoteDomain; obj.remote_token = message.remoteToken ? base64FromBytes(message.remoteToken) : undefined; - obj.local_token = message.localToken; + obj.local_token = message.localToken === "" ? undefined : message.localToken; return obj; }, fromAminoMsg(object: TokenPairAminoMsg): TokenPair { diff --git a/packages/types/protobuf/codegen/circle/cctp/v1/tx.ts b/packages/types/protobuf/codegen/circle/cctp/v1/tx.ts index 6b134c15f3..4c77b81a4d 100644 --- a/packages/types/protobuf/codegen/circle/cctp/v1/tx.ts +++ b/packages/types/protobuf/codegen/circle/cctp/v1/tx.ts @@ -924,8 +924,8 @@ export const MsgUpdateOwner = { }, toAmino(message: MsgUpdateOwner, useInterfaces: boolean = false): MsgUpdateOwnerAmino { const obj: any = {}; - obj.from = message.from; - obj.new_owner = message.newOwner; + obj.from = message.from === "" ? undefined : message.from; + obj.new_owner = message.newOwner === "" ? undefined : message.newOwner; return obj; }, fromAminoMsg(object: MsgUpdateOwnerAminoMsg): MsgUpdateOwner { @@ -1049,8 +1049,8 @@ export const MsgUpdateAttesterManager = { }, toAmino(message: MsgUpdateAttesterManager, useInterfaces: boolean = false): MsgUpdateAttesterManagerAmino { const obj: any = {}; - obj.from = message.from; - obj.new_attester_manager = message.newAttesterManager; + obj.from = message.from === "" ? undefined : message.from; + obj.new_attester_manager = message.newAttesterManager === "" ? undefined : message.newAttesterManager; return obj; }, fromAminoMsg(object: MsgUpdateAttesterManagerAminoMsg): MsgUpdateAttesterManager { @@ -1174,8 +1174,8 @@ export const MsgUpdateTokenController = { }, toAmino(message: MsgUpdateTokenController, useInterfaces: boolean = false): MsgUpdateTokenControllerAmino { const obj: any = {}; - obj.from = message.from; - obj.new_token_controller = message.newTokenController; + obj.from = message.from === "" ? undefined : message.from; + obj.new_token_controller = message.newTokenController === "" ? undefined : message.newTokenController; return obj; }, fromAminoMsg(object: MsgUpdateTokenControllerAminoMsg): MsgUpdateTokenController { @@ -1299,8 +1299,8 @@ export const MsgUpdatePauser = { }, toAmino(message: MsgUpdatePauser, useInterfaces: boolean = false): MsgUpdatePauserAmino { const obj: any = {}; - obj.from = message.from; - obj.new_pauser = message.newPauser; + obj.from = message.from === "" ? undefined : message.from; + obj.new_pauser = message.newPauser === "" ? undefined : message.newPauser; return obj; }, fromAminoMsg(object: MsgUpdatePauserAminoMsg): MsgUpdatePauser { @@ -1413,7 +1413,7 @@ export const MsgAcceptOwner = { }, toAmino(message: MsgAcceptOwner, useInterfaces: boolean = false): MsgAcceptOwnerAmino { const obj: any = {}; - obj.from = message.from; + obj.from = message.from === "" ? undefined : message.from; return obj; }, fromAminoMsg(object: MsgAcceptOwnerAminoMsg): MsgAcceptOwner { @@ -1537,8 +1537,8 @@ export const MsgEnableAttester = { }, toAmino(message: MsgEnableAttester, useInterfaces: boolean = false): MsgEnableAttesterAmino { const obj: any = {}; - obj.from = message.from; - obj.attester = message.attester; + obj.from = message.from === "" ? undefined : message.from; + obj.attester = message.attester === "" ? undefined : message.attester; return obj; }, fromAminoMsg(object: MsgEnableAttesterAminoMsg): MsgEnableAttester { @@ -1662,8 +1662,8 @@ export const MsgDisableAttester = { }, toAmino(message: MsgDisableAttester, useInterfaces: boolean = false): MsgDisableAttesterAmino { const obj: any = {}; - obj.from = message.from; - obj.attester = message.attester; + obj.from = message.from === "" ? undefined : message.from; + obj.attester = message.attester === "" ? undefined : message.attester; return obj; }, fromAminoMsg(object: MsgDisableAttesterAminoMsg): MsgDisableAttester { @@ -1776,7 +1776,7 @@ export const MsgPauseBurningAndMinting = { }, toAmino(message: MsgPauseBurningAndMinting, useInterfaces: boolean = false): MsgPauseBurningAndMintingAmino { const obj: any = {}; - obj.from = message.from; + obj.from = message.from === "" ? undefined : message.from; return obj; }, fromAminoMsg(object: MsgPauseBurningAndMintingAminoMsg): MsgPauseBurningAndMinting { @@ -1889,7 +1889,7 @@ export const MsgUnpauseBurningAndMinting = { }, toAmino(message: MsgUnpauseBurningAndMinting, useInterfaces: boolean = false): MsgUnpauseBurningAndMintingAmino { const obj: any = {}; - obj.from = message.from; + obj.from = message.from === "" ? undefined : message.from; return obj; }, fromAminoMsg(object: MsgUnpauseBurningAndMintingAminoMsg): MsgUnpauseBurningAndMinting { @@ -2002,7 +2002,7 @@ export const MsgPauseSendingAndReceivingMessages = { }, toAmino(message: MsgPauseSendingAndReceivingMessages, useInterfaces: boolean = false): MsgPauseSendingAndReceivingMessagesAmino { const obj: any = {}; - obj.from = message.from; + obj.from = message.from === "" ? undefined : message.from; return obj; }, fromAminoMsg(object: MsgPauseSendingAndReceivingMessagesAminoMsg): MsgPauseSendingAndReceivingMessages { @@ -2115,7 +2115,7 @@ export const MsgUnpauseSendingAndReceivingMessages = { }, toAmino(message: MsgUnpauseSendingAndReceivingMessages, useInterfaces: boolean = false): MsgUnpauseSendingAndReceivingMessagesAmino { const obj: any = {}; - obj.from = message.from; + obj.from = message.from === "" ? undefined : message.from; return obj; }, fromAminoMsg(object: MsgUnpauseSendingAndReceivingMessagesAminoMsg): MsgUnpauseSendingAndReceivingMessages { @@ -2239,8 +2239,8 @@ export const MsgUpdateMaxMessageBodySize = { }, toAmino(message: MsgUpdateMaxMessageBodySize, useInterfaces: boolean = false): MsgUpdateMaxMessageBodySizeAmino { const obj: any = {}; - obj.from = message.from; - obj.message_size = message.messageSize ? message.messageSize.toString() : undefined; + obj.from = message.from === "" ? undefined : message.from; + obj.message_size = message.messageSize !== BigInt(0) ? message.messageSize.toString() : undefined; return obj; }, fromAminoMsg(object: MsgUpdateMaxMessageBodySizeAminoMsg): MsgUpdateMaxMessageBodySize { @@ -2375,9 +2375,9 @@ export const MsgSetMaxBurnAmountPerMessage = { }, toAmino(message: MsgSetMaxBurnAmountPerMessage, useInterfaces: boolean = false): MsgSetMaxBurnAmountPerMessageAmino { const obj: any = {}; - obj.from = message.from; - obj.local_token = message.localToken; - obj.amount = message.amount; + obj.from = message.from === "" ? undefined : message.from; + obj.local_token = message.localToken === "" ? undefined : message.localToken; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: MsgSetMaxBurnAmountPerMessageAminoMsg): MsgSetMaxBurnAmountPerMessage { @@ -2534,11 +2534,11 @@ export const MsgDepositForBurn = { }, toAmino(message: MsgDepositForBurn, useInterfaces: boolean = false): MsgDepositForBurnAmino { const obj: any = {}; - obj.from = message.from; - obj.amount = message.amount; - obj.destination_domain = message.destinationDomain; + obj.from = message.from === "" ? undefined : message.from; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.destination_domain = message.destinationDomain === 0 ? undefined : message.destinationDomain; obj.mint_recipient = message.mintRecipient ? base64FromBytes(message.mintRecipient) : undefined; - obj.burn_token = message.burnToken; + obj.burn_token = message.burnToken === "" ? undefined : message.burnToken; return obj; }, fromAminoMsg(object: MsgDepositForBurnAminoMsg): MsgDepositForBurn { @@ -2601,7 +2601,7 @@ export const MsgDepositForBurnResponse = { }, toAmino(message: MsgDepositForBurnResponse, useInterfaces: boolean = false): MsgDepositForBurnResponseAmino { const obj: any = {}; - obj.nonce = message.nonce ? message.nonce.toString() : undefined; + obj.nonce = message.nonce !== BigInt(0) ? message.nonce.toString() : undefined; return obj; }, fromAminoMsg(object: MsgDepositForBurnResponseAminoMsg): MsgDepositForBurnResponse { @@ -2719,11 +2719,11 @@ export const MsgDepositForBurnWithCaller = { }, toAmino(message: MsgDepositForBurnWithCaller, useInterfaces: boolean = false): MsgDepositForBurnWithCallerAmino { const obj: any = {}; - obj.from = message.from; - obj.amount = message.amount; - obj.destination_domain = message.destinationDomain; + obj.from = message.from === "" ? undefined : message.from; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.destination_domain = message.destinationDomain === 0 ? undefined : message.destinationDomain; obj.mint_recipient = message.mintRecipient ? base64FromBytes(message.mintRecipient) : undefined; - obj.burn_token = message.burnToken; + obj.burn_token = message.burnToken === "" ? undefined : message.burnToken; obj.destination_caller = message.destinationCaller ? base64FromBytes(message.destinationCaller) : undefined; return obj; }, @@ -2787,7 +2787,7 @@ export const MsgDepositForBurnWithCallerResponse = { }, toAmino(message: MsgDepositForBurnWithCallerResponse, useInterfaces: boolean = false): MsgDepositForBurnWithCallerResponseAmino { const obj: any = {}; - obj.nonce = message.nonce ? message.nonce.toString() : undefined; + obj.nonce = message.nonce !== BigInt(0) ? message.nonce.toString() : undefined; return obj; }, fromAminoMsg(object: MsgDepositForBurnWithCallerResponseAminoMsg): MsgDepositForBurnWithCallerResponse { @@ -2894,7 +2894,7 @@ export const MsgReplaceDepositForBurn = { }, toAmino(message: MsgReplaceDepositForBurn, useInterfaces: boolean = false): MsgReplaceDepositForBurnAmino { const obj: any = {}; - obj.from = message.from; + obj.from = message.from === "" ? undefined : message.from; obj.original_message = message.originalMessage ? base64FromBytes(message.originalMessage) : undefined; obj.original_attestation = message.originalAttestation ? base64FromBytes(message.originalAttestation) : undefined; obj.new_destination_caller = message.newDestinationCaller ? base64FromBytes(message.newDestinationCaller) : undefined; @@ -3033,7 +3033,7 @@ export const MsgReceiveMessage = { }, toAmino(message: MsgReceiveMessage, useInterfaces: boolean = false): MsgReceiveMessageAmino { const obj: any = {}; - obj.from = message.from; + obj.from = message.from === "" ? undefined : message.from; obj.message = message.message ? base64FromBytes(message.message) : undefined; obj.attestation = message.attestation ? base64FromBytes(message.attestation) : undefined; return obj; @@ -3098,7 +3098,7 @@ export const MsgReceiveMessageResponse = { }, toAmino(message: MsgReceiveMessageResponse, useInterfaces: boolean = false): MsgReceiveMessageResponseAmino { const obj: any = {}; - obj.success = message.success; + obj.success = message.success === false ? undefined : message.success; return obj; }, fromAminoMsg(object: MsgReceiveMessageResponseAminoMsg): MsgReceiveMessageResponse { @@ -3194,8 +3194,8 @@ export const MsgSendMessage = { }, toAmino(message: MsgSendMessage, useInterfaces: boolean = false): MsgSendMessageAmino { const obj: any = {}; - obj.from = message.from; - obj.destination_domain = message.destinationDomain; + obj.from = message.from === "" ? undefined : message.from; + obj.destination_domain = message.destinationDomain === 0 ? undefined : message.destinationDomain; obj.recipient = message.recipient ? base64FromBytes(message.recipient) : undefined; obj.message_body = message.messageBody ? base64FromBytes(message.messageBody) : undefined; return obj; @@ -3260,7 +3260,7 @@ export const MsgSendMessageResponse = { }, toAmino(message: MsgSendMessageResponse, useInterfaces: boolean = false): MsgSendMessageResponseAmino { const obj: any = {}; - obj.nonce = message.nonce ? message.nonce.toString() : undefined; + obj.nonce = message.nonce !== BigInt(0) ? message.nonce.toString() : undefined; return obj; }, fromAminoMsg(object: MsgSendMessageResponseAminoMsg): MsgSendMessageResponse { @@ -3367,8 +3367,8 @@ export const MsgSendMessageWithCaller = { }, toAmino(message: MsgSendMessageWithCaller, useInterfaces: boolean = false): MsgSendMessageWithCallerAmino { const obj: any = {}; - obj.from = message.from; - obj.destination_domain = message.destinationDomain; + obj.from = message.from === "" ? undefined : message.from; + obj.destination_domain = message.destinationDomain === 0 ? undefined : message.destinationDomain; obj.recipient = message.recipient ? base64FromBytes(message.recipient) : undefined; obj.message_body = message.messageBody ? base64FromBytes(message.messageBody) : undefined; obj.destination_caller = message.destinationCaller ? base64FromBytes(message.destinationCaller) : undefined; @@ -3434,7 +3434,7 @@ export const MsgSendMessageWithCallerResponse = { }, toAmino(message: MsgSendMessageWithCallerResponse, useInterfaces: boolean = false): MsgSendMessageWithCallerResponseAmino { const obj: any = {}; - obj.nonce = message.nonce ? message.nonce.toString() : undefined; + obj.nonce = message.nonce !== BigInt(0) ? message.nonce.toString() : undefined; return obj; }, fromAminoMsg(object: MsgSendMessageWithCallerResponseAminoMsg): MsgSendMessageWithCallerResponse { @@ -3541,7 +3541,7 @@ export const MsgReplaceMessage = { }, toAmino(message: MsgReplaceMessage, useInterfaces: boolean = false): MsgReplaceMessageAmino { const obj: any = {}; - obj.from = message.from; + obj.from = message.from === "" ? undefined : message.from; obj.original_message = message.originalMessage ? base64FromBytes(message.originalMessage) : undefined; obj.original_attestation = message.originalAttestation ? base64FromBytes(message.originalAttestation) : undefined; obj.new_message_body = message.newMessageBody ? base64FromBytes(message.newMessageBody) : undefined; @@ -3669,8 +3669,8 @@ export const MsgUpdateSignatureThreshold = { }, toAmino(message: MsgUpdateSignatureThreshold, useInterfaces: boolean = false): MsgUpdateSignatureThresholdAmino { const obj: any = {}; - obj.from = message.from; - obj.amount = message.amount; + obj.from = message.from === "" ? undefined : message.from; + obj.amount = message.amount === 0 ? undefined : message.amount; return obj; }, fromAminoMsg(object: MsgUpdateSignatureThresholdAminoMsg): MsgUpdateSignatureThreshold { @@ -3816,10 +3816,10 @@ export const MsgLinkTokenPair = { }, toAmino(message: MsgLinkTokenPair, useInterfaces: boolean = false): MsgLinkTokenPairAmino { const obj: any = {}; - obj.from = message.from; - obj.remote_domain = message.remoteDomain; + obj.from = message.from === "" ? undefined : message.from; + obj.remote_domain = message.remoteDomain === 0 ? undefined : message.remoteDomain; obj.remote_token = message.remoteToken ? base64FromBytes(message.remoteToken) : undefined; - obj.local_token = message.localToken; + obj.local_token = message.localToken === "" ? undefined : message.localToken; return obj; }, fromAminoMsg(object: MsgLinkTokenPairAminoMsg): MsgLinkTokenPair { @@ -3965,10 +3965,10 @@ export const MsgUnlinkTokenPair = { }, toAmino(message: MsgUnlinkTokenPair, useInterfaces: boolean = false): MsgUnlinkTokenPairAmino { const obj: any = {}; - obj.from = message.from; - obj.remote_domain = message.remoteDomain; + obj.from = message.from === "" ? undefined : message.from; + obj.remote_domain = message.remoteDomain === 0 ? undefined : message.remoteDomain; obj.remote_token = message.remoteToken ? base64FromBytes(message.remoteToken) : undefined; - obj.local_token = message.localToken; + obj.local_token = message.localToken === "" ? undefined : message.localToken; return obj; }, fromAminoMsg(object: MsgUnlinkTokenPairAminoMsg): MsgUnlinkTokenPair { @@ -4103,8 +4103,8 @@ export const MsgAddRemoteTokenMessenger = { }, toAmino(message: MsgAddRemoteTokenMessenger, useInterfaces: boolean = false): MsgAddRemoteTokenMessengerAmino { const obj: any = {}; - obj.from = message.from; - obj.domain_id = message.domainId; + obj.from = message.from === "" ? undefined : message.from; + obj.domain_id = message.domainId === 0 ? undefined : message.domainId; obj.address = message.address ? base64FromBytes(message.address) : undefined; return obj; }, @@ -4229,8 +4229,8 @@ export const MsgRemoveRemoteTokenMessenger = { }, toAmino(message: MsgRemoveRemoteTokenMessenger, useInterfaces: boolean = false): MsgRemoveRemoteTokenMessengerAmino { const obj: any = {}; - obj.from = message.from; - obj.domain_id = message.domainId; + obj.from = message.from === "" ? undefined : message.from; + obj.domain_id = message.domainId === 0 ? undefined : message.domainId; return obj; }, fromAminoMsg(object: MsgRemoveRemoteTokenMessengerAminoMsg): MsgRemoveRemoteTokenMessenger { diff --git a/packages/types/protobuf/codegen/cosmos/auth/v1beta1/auth.ts b/packages/types/protobuf/codegen/cosmos/auth/v1beta1/auth.ts index 0d93ae9bb3..26fb1f5ae9 100644 --- a/packages/types/protobuf/codegen/cosmos/auth/v1beta1/auth.ts +++ b/packages/types/protobuf/codegen/cosmos/auth/v1beta1/auth.ts @@ -227,10 +227,10 @@ export const BaseAccount = { }, toAmino(message: BaseAccount, useInterfaces: boolean = false): BaseAccountAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.pub_key = message.pubKey ? Any.toAmino(message.pubKey, useInterfaces) : undefined; - obj.account_number = message.accountNumber ? message.accountNumber.toString() : undefined; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.account_number = message.accountNumber !== BigInt(0) ? message.accountNumber.toString() : undefined; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: BaseAccountAminoMsg): BaseAccount { @@ -321,11 +321,11 @@ export const ModuleAccount = { toAmino(message: ModuleAccount, useInterfaces: boolean = false): ModuleAccountAmino { const obj: any = {}; obj.base_account = message.baseAccount ? BaseAccount.toAmino(message.baseAccount, useInterfaces) : undefined; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; if (message.permissions) { obj.permissions = message.permissions.map(e => e); } else { - obj.permissions = []; + obj.permissions = message.permissions; } return obj; }, @@ -404,11 +404,11 @@ export const ModuleCredential = { }, toAmino(message: ModuleCredential, useInterfaces: boolean = false): ModuleCredentialAmino { const obj: any = {}; - obj.module_name = message.moduleName; + obj.module_name = message.moduleName === "" ? undefined : message.moduleName; if (message.derivationKeys) { obj.derivation_keys = message.derivationKeys.map(e => base64FromBytes(e)); } else { - obj.derivation_keys = []; + obj.derivation_keys = message.derivationKeys; } return obj; }, @@ -522,11 +522,11 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.max_memo_characters = message.maxMemoCharacters ? message.maxMemoCharacters.toString() : undefined; - obj.tx_sig_limit = message.txSigLimit ? message.txSigLimit.toString() : undefined; - obj.tx_size_cost_per_byte = message.txSizeCostPerByte ? message.txSizeCostPerByte.toString() : undefined; - obj.sig_verify_cost_ed25519 = message.sigVerifyCostEd25519 ? message.sigVerifyCostEd25519.toString() : undefined; - obj.sig_verify_cost_secp256k1 = message.sigVerifyCostSecp256k1 ? message.sigVerifyCostSecp256k1.toString() : undefined; + obj.max_memo_characters = message.maxMemoCharacters !== BigInt(0) ? message.maxMemoCharacters.toString() : undefined; + obj.tx_sig_limit = message.txSigLimit !== BigInt(0) ? message.txSigLimit.toString() : undefined; + obj.tx_size_cost_per_byte = message.txSizeCostPerByte !== BigInt(0) ? message.txSizeCostPerByte.toString() : undefined; + obj.sig_verify_cost_ed25519 = message.sigVerifyCostEd25519 !== BigInt(0) ? message.sigVerifyCostEd25519.toString() : undefined; + obj.sig_verify_cost_secp256k1 = message.sigVerifyCostSecp256k1 !== BigInt(0) ? message.sigVerifyCostSecp256k1.toString() : undefined; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/cosmos/auth/v1beta1/genesis.ts b/packages/types/protobuf/codegen/cosmos/auth/v1beta1/genesis.ts index bd9c283bcf..7285c8dae0 100644 --- a/packages/types/protobuf/codegen/cosmos/auth/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmos/auth/v1beta1/genesis.ts @@ -82,11 +82,11 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); if (message.accounts) { obj.accounts = message.accounts.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); } else { - obj.accounts = []; + obj.accounts = message.accounts; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/auth/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/auth/v1beta1/query.ts index 945f007586..5f4d022d92 100644 --- a/packages/types/protobuf/codegen/cosmos/auth/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/auth/v1beta1/query.ts @@ -740,7 +740,7 @@ export const QueryAccountsResponse = { if (message.accounts) { obj.accounts = message.accounts.map(e => e ? Cosmos_authv1beta1AccountI_ToAmino((e as Any), useInterfaces) : undefined); } else { - obj.accounts = []; + obj.accounts = message.accounts; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -811,7 +811,7 @@ export const QueryAccountRequest = { }, toAmino(message: QueryAccountRequest, useInterfaces: boolean = false): QueryAccountRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; return obj; }, fromAminoMsg(object: QueryAccountRequestAminoMsg): QueryAccountRequest { @@ -1131,7 +1131,7 @@ export const QueryModuleAccountsResponse = { if (message.accounts) { obj.accounts = message.accounts.map(e => e ? Cosmos_authv1beta1ModuleAccountI_ToAmino((e as Any), useInterfaces) : undefined); } else { - obj.accounts = []; + obj.accounts = message.accounts; } return obj; }, @@ -1201,7 +1201,7 @@ export const QueryModuleAccountByNameRequest = { }, toAmino(message: QueryModuleAccountByNameRequest, useInterfaces: boolean = false): QueryModuleAccountByNameRequestAmino { const obj: any = {}; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; return obj; }, fromAminoMsg(object: QueryModuleAccountByNameRequestAminoMsg): QueryModuleAccountByNameRequest { @@ -1395,7 +1395,7 @@ export const Bech32PrefixResponse = { }, toAmino(message: Bech32PrefixResponse, useInterfaces: boolean = false): Bech32PrefixResponseAmino { const obj: any = {}; - obj.bech32_prefix = message.bech32Prefix; + obj.bech32_prefix = message.bech32Prefix === "" ? undefined : message.bech32Prefix; return obj; }, fromAminoMsg(object: Bech32PrefixResponseAminoMsg): Bech32PrefixResponse { @@ -1533,7 +1533,7 @@ export const AddressBytesToStringResponse = { }, toAmino(message: AddressBytesToStringResponse, useInterfaces: boolean = false): AddressBytesToStringResponseAmino { const obj: any = {}; - obj.address_string = message.addressString; + obj.address_string = message.addressString === "" ? undefined : message.addressString; return obj; }, fromAminoMsg(object: AddressBytesToStringResponseAminoMsg): AddressBytesToStringResponse { @@ -1602,7 +1602,7 @@ export const AddressStringToBytesRequest = { }, toAmino(message: AddressStringToBytesRequest, useInterfaces: boolean = false): AddressStringToBytesRequestAmino { const obj: any = {}; - obj.address_string = message.addressString; + obj.address_string = message.addressString === "" ? undefined : message.addressString; return obj; }, fromAminoMsg(object: AddressStringToBytesRequestAminoMsg): AddressStringToBytesRequest { @@ -1751,8 +1751,8 @@ export const QueryAccountAddressByIDRequest = { }, toAmino(message: QueryAccountAddressByIDRequest, useInterfaces: boolean = false): QueryAccountAddressByIDRequestAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.account_id = message.accountId ? message.accountId.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.account_id = message.accountId !== BigInt(0) ? message.accountId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryAccountAddressByIDRequestAminoMsg): QueryAccountAddressByIDRequest { @@ -1821,7 +1821,7 @@ export const QueryAccountAddressByIDResponse = { }, toAmino(message: QueryAccountAddressByIDResponse, useInterfaces: boolean = false): QueryAccountAddressByIDResponseAmino { const obj: any = {}; - obj.account_address = message.accountAddress; + obj.account_address = message.accountAddress === "" ? undefined : message.accountAddress; return obj; }, fromAminoMsg(object: QueryAccountAddressByIDResponseAminoMsg): QueryAccountAddressByIDResponse { @@ -1890,7 +1890,7 @@ export const QueryAccountInfoRequest = { }, toAmino(message: QueryAccountInfoRequest, useInterfaces: boolean = false): QueryAccountInfoRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; return obj; }, fromAminoMsg(object: QueryAccountInfoRequestAminoMsg): QueryAccountInfoRequest { @@ -1994,7 +1994,7 @@ export const Cosmos_authv1beta1AccountI_InterfaceDecoder = (input: BinaryReader return data; } }; -export const Cosmos_authv1beta1AccountI_FromAmino = (content: AnyAmino) => { +export const Cosmos_authv1beta1AccountI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "cosmos-sdk/BaseAccount": return Any.fromPartial({ @@ -2026,7 +2026,7 @@ export const Cosmos_authv1beta1ModuleAccountI_InterfaceDecoder = (input: BinaryR return data; } }; -export const Cosmos_authv1beta1ModuleAccountI_FromAmino = (content: AnyAmino) => { +export const Cosmos_authv1beta1ModuleAccountI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "cosmos-sdk/ModuleAccount": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/cosmos/auth/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/auth/v1beta1/tx.ts index 5aba42c913..6b44795e17 100644 --- a/packages/types/protobuf/codegen/cosmos/auth/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/auth/v1beta1/tx.ts @@ -132,8 +132,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/authz.ts b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/authz.ts index f86e6dd88a..e9674bfa91 100644 --- a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/authz.ts +++ b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/authz.ts @@ -193,7 +193,7 @@ export const GenericAuthorization = { }, toAmino(message: GenericAuthorization, useInterfaces: boolean = false): GenericAuthorizationAmino { const obj: any = {}; - obj.msg = message.msg; + obj.msg = message.msg === "" ? undefined : message.msg; return obj; }, fromAminoMsg(object: GenericAuthorizationAminoMsg): GenericAuthorization { @@ -376,8 +376,8 @@ export const GrantAuthorization = { }, toAmino(message: GrantAuthorization, useInterfaces: boolean = false): GrantAuthorizationAmino { const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; + obj.granter = message.granter === "" ? undefined : message.granter; + obj.grantee = message.grantee === "" ? undefined : message.grantee; obj.authorization = message.authorization ? Cosmos_authzv1beta1Authorization_ToAmino((message.authorization as Any), useInterfaces) : undefined; obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined; return obj; @@ -449,7 +449,7 @@ export const GrantQueueItem = { if (message.msgTypeUrls) { obj.msg_type_urls = message.msgTypeUrls.map(e => e); } else { - obj.msg_type_urls = []; + obj.msg_type_urls = message.msgTypeUrls; } return obj; }, @@ -497,7 +497,7 @@ export const Cosmos_authzv1beta1Authorization_InterfaceDecoder = (input: BinaryR return data; } }; -export const Cosmos_authzv1beta1Authorization_FromAmino = (content: AnyAmino) => { +export const Cosmos_authzv1beta1Authorization_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "cosmos-sdk/GenericAuthorization": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/event.ts b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/event.ts index 3e4378cc2b..3f81c32cbf 100644 --- a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/event.ts +++ b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/event.ts @@ -129,9 +129,9 @@ export const EventGrant = { }, toAmino(message: EventGrant, useInterfaces: boolean = false): EventGrantAmino { const obj: any = {}; - obj.msg_type_url = message.msgTypeUrl; - obj.granter = message.granter; - obj.grantee = message.grantee; + obj.msg_type_url = message.msgTypeUrl === "" ? undefined : message.msgTypeUrl; + obj.granter = message.granter === "" ? undefined : message.granter; + obj.grantee = message.grantee === "" ? undefined : message.grantee; return obj; }, fromAminoMsg(object: EventGrantAminoMsg): EventGrant { @@ -222,9 +222,9 @@ export const EventRevoke = { }, toAmino(message: EventRevoke, useInterfaces: boolean = false): EventRevokeAmino { const obj: any = {}; - obj.msg_type_url = message.msgTypeUrl; - obj.granter = message.granter; - obj.grantee = message.grantee; + obj.msg_type_url = message.msgTypeUrl === "" ? undefined : message.msgTypeUrl; + obj.granter = message.granter === "" ? undefined : message.granter; + obj.grantee = message.grantee === "" ? undefined : message.grantee; return obj; }, fromAminoMsg(object: EventRevokeAminoMsg): EventRevoke { diff --git a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/genesis.ts b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/genesis.ts index 939b1abe00..0c8b4d85e2 100644 --- a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/genesis.ts @@ -66,7 +66,7 @@ export const GenesisState = { if (message.authorization) { obj.authorization = message.authorization.map(e => e ? GrantAuthorization.toAmino(e, useInterfaces) : undefined); } else { - obj.authorization = []; + obj.authorization = message.authorization; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/query.ts index 4008e7de2f..034db56d02 100644 --- a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/query.ts @@ -243,9 +243,9 @@ export const QueryGrantsRequest = { }, toAmino(message: QueryGrantsRequest, useInterfaces: boolean = false): QueryGrantsRequestAmino { const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.msg_type_url = message.msgTypeUrl; + obj.granter = message.granter === "" ? undefined : message.granter; + obj.grantee = message.grantee === "" ? undefined : message.grantee; + obj.msg_type_url = message.msgTypeUrl === "" ? undefined : message.msgTypeUrl; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -327,7 +327,7 @@ export const QueryGrantsResponse = { if (message.grants) { obj.grants = message.grants.map(e => e ? Grant.toAmino(e, useInterfaces) : undefined); } else { - obj.grants = []; + obj.grants = message.grants; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -409,7 +409,7 @@ export const QueryGranterGrantsRequest = { }, toAmino(message: QueryGranterGrantsRequest, useInterfaces: boolean = false): QueryGranterGrantsRequestAmino { const obj: any = {}; - obj.granter = message.granter; + obj.granter = message.granter === "" ? undefined : message.granter; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -491,7 +491,7 @@ export const QueryGranterGrantsResponse = { if (message.grants) { obj.grants = message.grants.map(e => e ? GrantAuthorization.toAmino(e, useInterfaces) : undefined); } else { - obj.grants = []; + obj.grants = message.grants; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -573,7 +573,7 @@ export const QueryGranteeGrantsRequest = { }, toAmino(message: QueryGranteeGrantsRequest, useInterfaces: boolean = false): QueryGranteeGrantsRequestAmino { const obj: any = {}; - obj.grantee = message.grantee; + obj.grantee = message.grantee === "" ? undefined : message.grantee; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -655,7 +655,7 @@ export const QueryGranteeGrantsResponse = { if (message.grants) { obj.grants = message.grants.map(e => e ? GrantAuthorization.toAmino(e, useInterfaces) : undefined); } else { - obj.grants = []; + obj.grants = message.grants; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/tx.ts index 63b9a7cb81..a90db9057e 100644 --- a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/tx.ts @@ -241,9 +241,9 @@ export const MsgGrant = { }, toAmino(message: MsgGrant, useInterfaces: boolean = false): MsgGrantAmino { const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.grant = message.grant ? Grant.toAmino(message.grant, useInterfaces) : Grant.fromPartial({}); + obj.granter = message.granter === "" ? undefined : message.granter; + obj.grantee = message.grantee === "" ? undefined : message.grantee; + obj.grant = message.grant ? Grant.toAmino(message.grant, useInterfaces) : Grant.toAmino(Grant.fromPartial({})); return obj; }, fromAminoMsg(object: MsgGrantAminoMsg): MsgGrant { @@ -377,11 +377,11 @@ export const MsgExec = { }, toAmino(message: MsgExec, useInterfaces: boolean = false): MsgExecAmino { const obj: any = {}; - obj.grantee = message.grantee; + obj.grantee = message.grantee === "" ? undefined : message.grantee; if (message.msgs) { obj.msgs = message.msgs.map(e => e ? rawProtobufMsgToAmino((e as Any), useInterfaces) : undefined); } else { - obj.msgs = []; + obj.msgs = message.msgs; } return obj; }, @@ -452,7 +452,7 @@ export const MsgExecResponse = { if (message.results) { obj.results = message.results.map(e => base64FromBytes(e)); } else { - obj.results = []; + obj.results = message.results; } return obj; }, @@ -544,9 +544,9 @@ export const MsgRevoke = { }, toAmino(message: MsgRevoke, useInterfaces: boolean = false): MsgRevokeAmino { const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.msg_type_url = message.msgTypeUrl; + obj.granter = message.granter === "" ? undefined : message.granter; + obj.grantee = message.grantee === "" ? undefined : message.grantee; + obj.msg_type_url = message.msgTypeUrl === "" ? undefined : message.msgTypeUrl; return obj; }, fromAminoMsg(object: MsgRevokeAminoMsg): MsgRevoke { @@ -635,7 +635,7 @@ export const Cosmos_basev1beta1Msg_InterfaceDecoder = (input: BinaryReader | Uin return data; } }; -export const Cosmos_basev1beta1Msg_FromAmino = (content: AnyAmino) => { +export const Cosmos_basev1beta1Msg_FromAmino = (content: AnyAmino): Any => { return Any.fromAmino(content); }; export const Cosmos_basev1beta1Msg_ToAmino = (content: Any, useInterfaces: boolean = false) => { diff --git a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/authz.ts b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/authz.ts index 5ff28605bc..65278138a2 100644 --- a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/authz.ts +++ b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/authz.ts @@ -108,12 +108,12 @@ export const SendAuthorization = { if (message.spendLimit) { obj.spend_limit = message.spendLimit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.spend_limit = []; + obj.spend_limit = message.spendLimit; } if (message.allowList) { obj.allow_list = message.allowList.map(e => e); } else { - obj.allow_list = []; + obj.allow_list = message.allowList; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/bank.ts b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/bank.ts index 70b01f2fca..5497d4b3f8 100644 --- a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/bank.ts +++ b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/bank.ts @@ -370,9 +370,9 @@ export const Params = { if (message.sendEnabled) { obj.send_enabled = message.sendEnabled.map(e => e ? SendEnabled.toAmino(e, useInterfaces) : undefined); } else { - obj.send_enabled = []; + obj.send_enabled = message.sendEnabled; } - obj.default_send_enabled = message.defaultSendEnabled; + obj.default_send_enabled = message.defaultSendEnabled === false ? undefined : message.defaultSendEnabled; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { @@ -452,8 +452,8 @@ export const SendEnabled = { }, toAmino(message: SendEnabled, useInterfaces: boolean = false): SendEnabledAmino { const obj: any = {}; - obj.denom = message.denom; - obj.enabled = message.enabled; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.enabled = message.enabled === false ? undefined : message.enabled; return obj; }, fromAminoMsg(object: SendEnabledAminoMsg): SendEnabled { @@ -531,11 +531,11 @@ export const Input = { }, toAmino(message: Input, useInterfaces: boolean = false): InputAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -614,11 +614,11 @@ export const Output = { }, toAmino(message: Output, useInterfaces: boolean = false): OutputAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -690,7 +690,7 @@ export const Supply = { if (message.total) { obj.total = message.total.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.total = []; + obj.total = message.total; } return obj; }, @@ -780,12 +780,12 @@ export const DenomUnit = { }, toAmino(message: DenomUnit, useInterfaces: boolean = false): DenomUnitAmino { const obj: any = {}; - obj.denom = message.denom; - obj.exponent = message.exponent; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.exponent = message.exponent === 0 ? undefined : message.exponent; if (message.aliases) { obj.aliases = message.aliases.map(e => e); } else { - obj.aliases = []; + obj.aliases = message.aliases; } return obj; }, @@ -930,24 +930,18 @@ export const Metadata = { }, toAmino(message: Metadata, useInterfaces: boolean = false): MetadataAmino { const obj: any = {}; - if (message.description) { - obj.description = message.description; - } + obj.description = message.description === "" ? undefined : message.description; if (message.denomUnits) { obj.denom_units = message.denomUnits.map(e => e ? DenomUnit.toAmino(e, useInterfaces) : undefined); } else { - obj.denom_units = []; - } - obj.base = message.base; - obj.display = message.display; - obj.name = message.name; - obj.symbol = message.symbol; - if (message.uri) { - obj.uri = message.uri; - } - if (message.uriHash) { - obj.uri_hash = message.uriHash; - } + obj.denom_units = message.denomUnits; + } + obj.base = message.base === "" ? undefined : message.base; + obj.display = message.display === "" ? undefined : message.display; + obj.name = message.name === "" ? undefined : message.name; + obj.symbol = message.symbol === "" ? undefined : message.symbol; + obj.uri = message.uri === "" ? undefined : message.uri; + obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash; return obj; }, fromAminoMsg(object: MetadataAminoMsg): Metadata { diff --git a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/genesis.ts b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/genesis.ts index 84061785ea..8cb63ac487 100644 --- a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/genesis.ts @@ -174,26 +174,26 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); if (message.balances) { obj.balances = message.balances.map(e => e ? Balance.toAmino(e, useInterfaces) : undefined); } else { - obj.balances = []; + obj.balances = message.balances; } if (message.supply) { obj.supply = message.supply.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.supply = []; + obj.supply = message.supply; } if (message.denomMetadata) { obj.denom_metadata = message.denomMetadata.map(e => e ? Metadata.toAmino(e, useInterfaces) : undefined); } else { - obj.denom_metadata = []; + obj.denom_metadata = message.denomMetadata; } if (message.sendEnabled) { obj.send_enabled = message.sendEnabled.map(e => e ? SendEnabled.toAmino(e, useInterfaces) : undefined); } else { - obj.send_enabled = []; + obj.send_enabled = message.sendEnabled; } return obj; }, @@ -272,11 +272,11 @@ export const Balance = { }, toAmino(message: Balance, useInterfaces: boolean = false): BalanceAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/query.ts index e22fc6c7b3..f38fb027c6 100644 --- a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/query.ts @@ -891,8 +891,8 @@ export const QueryBalanceRequest = { }, toAmino(message: QueryBalanceRequest, useInterfaces: boolean = false): QueryBalanceRequestAmino { const obj: any = {}; - obj.address = message.address; - obj.denom = message.denom; + obj.address = message.address === "" ? undefined : message.address; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryBalanceRequestAminoMsg): QueryBalanceRequest { @@ -1052,9 +1052,9 @@ export const QueryAllBalancesRequest = { }, toAmino(message: QueryAllBalancesRequest, useInterfaces: boolean = false): QueryAllBalancesRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; - obj.resolve_denom = message.resolveDenom; + obj.resolve_denom = message.resolveDenom === false ? undefined : message.resolveDenom; return obj; }, fromAminoMsg(object: QueryAllBalancesRequestAminoMsg): QueryAllBalancesRequest { @@ -1135,7 +1135,7 @@ export const QueryAllBalancesResponse = { if (message.balances) { obj.balances = message.balances.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.balances = []; + obj.balances = message.balances; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1217,7 +1217,7 @@ export const QuerySpendableBalancesRequest = { }, toAmino(message: QuerySpendableBalancesRequest, useInterfaces: boolean = false): QuerySpendableBalancesRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1299,7 +1299,7 @@ export const QuerySpendableBalancesResponse = { if (message.balances) { obj.balances = message.balances.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.balances = []; + obj.balances = message.balances; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1381,8 +1381,8 @@ export const QuerySpendableBalanceByDenomRequest = { }, toAmino(message: QuerySpendableBalanceByDenomRequest, useInterfaces: boolean = false): QuerySpendableBalanceByDenomRequestAmino { const obj: any = {}; - obj.address = message.address; - obj.denom = message.denom; + obj.address = message.address === "" ? undefined : message.address; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QuerySpendableBalanceByDenomRequestAminoMsg): QuerySpendableBalanceByDenomRequest { @@ -1601,7 +1601,7 @@ export const QueryTotalSupplyResponse = { if (message.supply) { obj.supply = message.supply.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.supply = []; + obj.supply = message.supply; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1672,7 +1672,7 @@ export const QuerySupplyOfRequest = { }, toAmino(message: QuerySupplyOfRequest, useInterfaces: boolean = false): QuerySupplyOfRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QuerySupplyOfRequestAminoMsg): QuerySupplyOfRequest { @@ -1741,7 +1741,7 @@ export const QuerySupplyOfResponse = { }, toAmino(message: QuerySupplyOfResponse, useInterfaces: boolean = false): QuerySupplyOfResponseAmino { const obj: any = {}; - obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.fromPartial({}); + obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: QuerySupplyOfResponseAminoMsg): QuerySupplyOfResponse { @@ -1866,7 +1866,7 @@ export const QueryParamsResponse = { }, toAmino(message: QueryParamsResponse, useInterfaces: boolean = false): QueryParamsResponseAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { @@ -2016,7 +2016,7 @@ export const QueryDenomsMetadataResponse = { if (message.metadatas) { obj.metadatas = message.metadatas.map(e => e ? Metadata.toAmino(e, useInterfaces) : undefined); } else { - obj.metadatas = []; + obj.metadatas = message.metadatas; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2087,7 +2087,7 @@ export const QueryDenomMetadataRequest = { }, toAmino(message: QueryDenomMetadataRequest, useInterfaces: boolean = false): QueryDenomMetadataRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryDenomMetadataRequestAminoMsg): QueryDenomMetadataRequest { @@ -2156,7 +2156,7 @@ export const QueryDenomMetadataResponse = { }, toAmino(message: QueryDenomMetadataResponse, useInterfaces: boolean = false): QueryDenomMetadataResponseAmino { const obj: any = {}; - obj.metadata = message.metadata ? Metadata.toAmino(message.metadata, useInterfaces) : Metadata.fromPartial({}); + obj.metadata = message.metadata ? Metadata.toAmino(message.metadata, useInterfaces) : Metadata.toAmino(Metadata.fromPartial({})); return obj; }, fromAminoMsg(object: QueryDenomMetadataResponseAminoMsg): QueryDenomMetadataResponse { @@ -2225,7 +2225,7 @@ export const QueryDenomMetadataByQueryStringRequest = { }, toAmino(message: QueryDenomMetadataByQueryStringRequest, useInterfaces: boolean = false): QueryDenomMetadataByQueryStringRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryDenomMetadataByQueryStringRequestAminoMsg): QueryDenomMetadataByQueryStringRequest { @@ -2294,7 +2294,7 @@ export const QueryDenomMetadataByQueryStringResponse = { }, toAmino(message: QueryDenomMetadataByQueryStringResponse, useInterfaces: boolean = false): QueryDenomMetadataByQueryStringResponseAmino { const obj: any = {}; - obj.metadata = message.metadata ? Metadata.toAmino(message.metadata, useInterfaces) : Metadata.fromPartial({}); + obj.metadata = message.metadata ? Metadata.toAmino(message.metadata, useInterfaces) : Metadata.toAmino(Metadata.fromPartial({})); return obj; }, fromAminoMsg(object: QueryDenomMetadataByQueryStringResponseAminoMsg): QueryDenomMetadataByQueryStringResponse { @@ -2374,7 +2374,7 @@ export const QueryDenomOwnersRequest = { }, toAmino(message: QueryDenomOwnersRequest, useInterfaces: boolean = false): QueryDenomOwnersRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2455,8 +2455,8 @@ export const DenomOwner = { }, toAmino(message: DenomOwner, useInterfaces: boolean = false): DenomOwnerAmino { const obj: any = {}; - obj.address = message.address; - obj.balance = message.balance ? Coin.toAmino(message.balance, useInterfaces) : Coin.fromPartial({}); + obj.address = message.address === "" ? undefined : message.address; + obj.balance = message.balance ? Coin.toAmino(message.balance, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: DenomOwnerAminoMsg): DenomOwner { @@ -2537,7 +2537,7 @@ export const QueryDenomOwnersResponse = { if (message.denomOwners) { obj.denom_owners = message.denomOwners.map(e => e ? DenomOwner.toAmino(e, useInterfaces) : undefined); } else { - obj.denom_owners = []; + obj.denom_owners = message.denomOwners; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2620,7 +2620,7 @@ export const QuerySendEnabledRequest = { if (message.denoms) { obj.denoms = message.denoms.map(e => e); } else { - obj.denoms = []; + obj.denoms = message.denoms; } obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2703,7 +2703,7 @@ export const QuerySendEnabledResponse = { if (message.sendEnabled) { obj.send_enabled = message.sendEnabled.map(e => e ? SendEnabled.toAmino(e, useInterfaces) : undefined); } else { - obj.send_enabled = []; + obj.send_enabled = message.sendEnabled; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/tx.ts index da4053c8fa..73698ebf9f 100644 --- a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/tx.ts @@ -319,12 +319,12 @@ export const MsgSend = { }, toAmino(message: MsgSend, useInterfaces: boolean = false): MsgSendAmino { const obj: any = {}; - obj.from_address = message.fromAddress; - obj.to_address = message.toAddress; + obj.from_address = message.fromAddress === "" ? undefined : message.fromAddress; + obj.to_address = message.toAddress === "" ? undefined : message.toAddress; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, @@ -460,12 +460,12 @@ export const MsgMultiSend = { if (message.inputs) { obj.inputs = message.inputs.map(e => e ? Input.toAmino(e, useInterfaces) : undefined); } else { - obj.inputs = []; + obj.inputs = message.inputs; } if (message.outputs) { obj.outputs = message.outputs.map(e => e ? Output.toAmino(e, useInterfaces) : undefined); } else { - obj.outputs = []; + obj.outputs = message.outputs; } return obj; }, @@ -602,8 +602,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { @@ -746,16 +746,16 @@ export const MsgSetSendEnabled = { }, toAmino(message: MsgSetSendEnabled, useInterfaces: boolean = false): MsgSetSendEnabledAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; if (message.sendEnabled) { obj.send_enabled = message.sendEnabled.map(e => e ? SendEnabled.toAmino(e, useInterfaces) : undefined); } else { - obj.send_enabled = []; + obj.send_enabled = message.sendEnabled; } if (message.useDefaultFor) { obj.use_default_for = message.useDefaultFor.map(e => e); } else { - obj.use_default_for = []; + obj.use_default_for = message.useDefaultFor; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/base/abci/v1beta1/abci.ts b/packages/types/protobuf/codegen/cosmos/base/abci/v1beta1/abci.ts index 4ae928e634..087d7bb778 100644 --- a/packages/types/protobuf/codegen/cosmos/base/abci/v1beta1/abci.ts +++ b/packages/types/protobuf/codegen/cosmos/base/abci/v1beta1/abci.ts @@ -138,7 +138,7 @@ export interface ABCIMessageLogProtoMsg { } /** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ export interface ABCIMessageLogAmino { - msg_index?: number; + msg_index: number; log?: string; /** * Events contains a slice of Event objects that were emitted during some @@ -691,26 +691,26 @@ export const TxResponse = { }, toAmino(message: TxResponse, useInterfaces: boolean = false): TxResponseAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.txhash = message.txhash; - obj.codespace = message.codespace; - obj.code = message.code; - obj.data = message.data; - obj.raw_log = message.rawLog; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.txhash = message.txhash === "" ? undefined : message.txhash; + obj.codespace = message.codespace === "" ? undefined : message.codespace; + obj.code = message.code === 0 ? undefined : message.code; + obj.data = message.data === "" ? undefined : message.data; + obj.raw_log = message.rawLog === "" ? undefined : message.rawLog; if (message.logs) { obj.logs = message.logs.map(e => e ? ABCIMessageLog.toAmino(e, useInterfaces) : undefined); } else { - obj.logs = []; + obj.logs = message.logs; } - obj.info = message.info; - obj.gas_wanted = message.gasWanted ? message.gasWanted.toString() : undefined; - obj.gas_used = message.gasUsed ? message.gasUsed.toString() : undefined; + obj.info = message.info === "" ? undefined : message.info; + obj.gas_wanted = message.gasWanted !== BigInt(0) ? message.gasWanted.toString() : undefined; + obj.gas_used = message.gasUsed !== BigInt(0) ? message.gasUsed.toString() : undefined; obj.tx = message.tx ? Any.toAmino(message.tx, useInterfaces) : undefined; - obj.timestamp = message.timestamp; + obj.timestamp = message.timestamp === "" ? undefined : message.timestamp; if (message.events) { obj.events = message.events.map(e => e ? Event.toAmino(e, useInterfaces) : undefined); } else { - obj.events = []; + obj.events = message.events; } return obj; }, @@ -800,12 +800,12 @@ export const ABCIMessageLog = { }, toAmino(message: ABCIMessageLog, useInterfaces: boolean = false): ABCIMessageLogAmino { const obj: any = {}; - obj.msg_index = message.msgIndex; - obj.log = message.log; + obj.msg_index = message.msgIndex ?? 0; + obj.log = message.log === "" ? undefined : message.log; if (message.events) { obj.events = message.events.map(e => e ? StringEvent.toAmino(e, useInterfaces) : undefined); } else { - obj.events = []; + obj.events = message.events; } return obj; }, @@ -884,11 +884,11 @@ export const StringEvent = { }, toAmino(message: StringEvent, useInterfaces: boolean = false): StringEventAmino { const obj: any = {}; - obj.type = message.type; + obj.type = message.type === "" ? undefined : message.type; if (message.attributes) { obj.attributes = message.attributes.map(e => e ? Attribute.toAmino(e, useInterfaces) : undefined); } else { - obj.attributes = []; + obj.attributes = message.attributes; } return obj; }, @@ -969,8 +969,8 @@ export const Attribute = { }, toAmino(message: Attribute, useInterfaces: boolean = false): AttributeAmino { const obj: any = {}; - obj.key = message.key; - obj.value = message.value; + obj.key = message.key === "" ? undefined : message.key; + obj.value = message.value === "" ? undefined : message.value; return obj; }, fromAminoMsg(object: AttributeAminoMsg): Attribute { @@ -1050,8 +1050,8 @@ export const GasInfo = { }, toAmino(message: GasInfo, useInterfaces: boolean = false): GasInfoAmino { const obj: any = {}; - obj.gas_wanted = message.gasWanted ? message.gasWanted.toString() : undefined; - obj.gas_used = message.gasUsed ? message.gasUsed.toString() : undefined; + obj.gas_wanted = message.gasWanted !== BigInt(0) ? message.gasWanted.toString() : undefined; + obj.gas_used = message.gasUsed !== BigInt(0) ? message.gasUsed.toString() : undefined; return obj; }, fromAminoMsg(object: GasInfoAminoMsg): GasInfo { @@ -1150,16 +1150,16 @@ export const Result = { toAmino(message: Result, useInterfaces: boolean = false): ResultAmino { const obj: any = {}; obj.data = message.data ? base64FromBytes(message.data) : undefined; - obj.log = message.log; + obj.log = message.log === "" ? undefined : message.log; if (message.events) { obj.events = message.events.map(e => e ? Event.toAmino(e, useInterfaces) : undefined); } else { - obj.events = []; + obj.events = message.events; } if (message.msgResponses) { obj.msg_responses = message.msgResponses.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); } else { - obj.msg_responses = []; + obj.msg_responses = message.msgResponses; } return obj; }, @@ -1321,7 +1321,7 @@ export const MsgData = { }, toAmino(message: MsgData, useInterfaces: boolean = false): MsgDataAmino { const obj: any = {}; - obj.msg_type = message.msgType; + obj.msg_type = message.msgType === "" ? undefined : message.msgType; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -1401,12 +1401,12 @@ export const TxMsgData = { if (message.data) { obj.data = message.data.map(e => e ? MsgData.toAmino(e, useInterfaces) : undefined); } else { - obj.data = []; + obj.data = message.data; } if (message.msgResponses) { obj.msg_responses = message.msgResponses.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); } else { - obj.msg_responses = []; + obj.msg_responses = message.msgResponses; } return obj; }, @@ -1529,15 +1529,15 @@ export const SearchTxsResult = { }, toAmino(message: SearchTxsResult, useInterfaces: boolean = false): SearchTxsResultAmino { const obj: any = {}; - obj.total_count = message.totalCount ? message.totalCount.toString() : undefined; - obj.count = message.count ? message.count.toString() : undefined; - obj.page_number = message.pageNumber ? message.pageNumber.toString() : undefined; - obj.page_total = message.pageTotal ? message.pageTotal.toString() : undefined; - obj.limit = message.limit ? message.limit.toString() : undefined; + obj.total_count = message.totalCount !== BigInt(0) ? message.totalCount.toString() : undefined; + obj.count = message.count !== BigInt(0) ? message.count.toString() : undefined; + obj.page_number = message.pageNumber !== BigInt(0) ? message.pageNumber.toString() : undefined; + obj.page_total = message.pageTotal !== BigInt(0) ? message.pageTotal.toString() : undefined; + obj.limit = message.limit !== BigInt(0) ? message.limit.toString() : undefined; if (message.txs) { obj.txs = message.txs.map(e => e ? TxResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.txs = []; + obj.txs = message.txs; } return obj; }, @@ -1660,15 +1660,15 @@ export const SearchBlocksResult = { }, toAmino(message: SearchBlocksResult, useInterfaces: boolean = false): SearchBlocksResultAmino { const obj: any = {}; - obj.total_count = message.totalCount ? message.totalCount.toString() : undefined; - obj.count = message.count ? message.count.toString() : undefined; - obj.page_number = message.pageNumber ? message.pageNumber.toString() : undefined; - obj.page_total = message.pageTotal ? message.pageTotal.toString() : undefined; - obj.limit = message.limit ? message.limit.toString() : undefined; + obj.total_count = message.totalCount !== BigInt(0) ? message.totalCount.toString() : undefined; + obj.count = message.count !== BigInt(0) ? message.count.toString() : undefined; + obj.page_number = message.pageNumber !== BigInt(0) ? message.pageNumber.toString() : undefined; + obj.page_total = message.pageTotal !== BigInt(0) ? message.pageTotal.toString() : undefined; + obj.limit = message.limit !== BigInt(0) ? message.limit.toString() : undefined; if (message.blocks) { obj.blocks = message.blocks.map(e => e ? Block.toAmino(e, useInterfaces) : undefined); } else { - obj.blocks = []; + obj.blocks = message.blocks; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/base/query/v1beta1/pagination.ts b/packages/types/protobuf/codegen/cosmos/base/query/v1beta1/pagination.ts index e28ce0e16a..34bfbeb578 100644 --- a/packages/types/protobuf/codegen/cosmos/base/query/v1beta1/pagination.ts +++ b/packages/types/protobuf/codegen/cosmos/base/query/v1beta1/pagination.ts @@ -260,10 +260,10 @@ export const PageRequest = { toAmino(message: PageRequest, useInterfaces: boolean = false): PageRequestAmino { const obj: any = {}; obj.key = message.key ? base64FromBytes(message.key) : undefined; - obj.offset = message.offset ? message.offset.toString() : undefined; - obj.limit = message.limit ? message.limit.toString() : undefined; - obj.count_total = message.countTotal; - obj.reverse = message.reverse; + obj.offset = message.offset !== BigInt(0) ? message.offset.toString() : undefined; + obj.limit = message.limit !== BigInt(0) ? message.limit.toString() : undefined; + obj.count_total = message.countTotal === false ? undefined : message.countTotal; + obj.reverse = message.reverse === false ? undefined : message.reverse; return obj; }, fromAminoMsg(object: PageRequestAminoMsg): PageRequest { @@ -344,7 +344,7 @@ export const PageResponse = { toAmino(message: PageResponse, useInterfaces: boolean = false): PageResponseAmino { const obj: any = {}; obj.next_key = message.nextKey ? base64FromBytes(message.nextKey) : undefined; - obj.total = message.total ? message.total.toString() : undefined; + obj.total = message.total !== BigInt(0) ? message.total.toString() : undefined; return obj; }, fromAminoMsg(object: PageResponseAminoMsg): PageResponse { diff --git a/packages/types/protobuf/codegen/cosmos/base/tendermint/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/base/tendermint/v1beta1/query.ts index ed21f624f0..8b7ca41ae5 100644 --- a/packages/types/protobuf/codegen/cosmos/base/tendermint/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/base/tendermint/v1beta1/query.ts @@ -606,7 +606,7 @@ export const GetValidatorSetByHeightRequest = { }, toAmino(message: GetValidatorSetByHeightRequest, useInterfaces: boolean = false): GetValidatorSetByHeightRequestAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -696,11 +696,11 @@ export const GetValidatorSetByHeightResponse = { }, toAmino(message: GetValidatorSetByHeightResponse, useInterfaces: boolean = false): GetValidatorSetByHeightResponseAmino { const obj: any = {}; - obj.block_height = message.blockHeight ? message.blockHeight.toString() : undefined; + obj.block_height = message.blockHeight !== BigInt(0) ? message.blockHeight.toString() : undefined; if (message.validators) { obj.validators = message.validators.map(e => e ? Validator.toAmino(e, useInterfaces) : undefined); } else { - obj.validators = []; + obj.validators = message.validators; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -860,11 +860,11 @@ export const GetLatestValidatorSetResponse = { }, toAmino(message: GetLatestValidatorSetResponse, useInterfaces: boolean = false): GetLatestValidatorSetResponseAmino { const obj: any = {}; - obj.block_height = message.blockHeight ? message.blockHeight.toString() : undefined; + obj.block_height = message.blockHeight !== BigInt(0) ? message.blockHeight.toString() : undefined; if (message.validators) { obj.validators = message.validators.map(e => e ? Validator.toAmino(e, useInterfaces) : undefined); } else { - obj.validators = []; + obj.validators = message.validators; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -968,10 +968,10 @@ export const Validator = { }, toAmino(message: Validator, useInterfaces: boolean = false): ValidatorAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.pub_key = message.pubKey ? Any.toAmino(message.pubKey, useInterfaces) : undefined; - obj.voting_power = message.votingPower ? message.votingPower.toString() : undefined; - obj.proposer_priority = message.proposerPriority ? message.proposerPriority.toString() : undefined; + obj.voting_power = message.votingPower !== BigInt(0) ? message.votingPower.toString() : undefined; + obj.proposer_priority = message.proposerPriority !== BigInt(0) ? message.proposerPriority.toString() : undefined; return obj; }, fromAminoMsg(object: ValidatorAminoMsg): Validator { @@ -1040,7 +1040,7 @@ export const GetBlockByHeightRequest = { }, toAmino(message: GetBlockByHeightRequest, useInterfaces: boolean = false): GetBlockByHeightRequestAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; return obj; }, fromAminoMsg(object: GetBlockByHeightRequestAminoMsg): GetBlockByHeightRequest { @@ -1407,7 +1407,7 @@ export const GetSyncingResponse = { }, toAmino(message: GetSyncingResponse, useInterfaces: boolean = false): GetSyncingResponseAmino { const obj: any = {}; - obj.syncing = message.syncing; + obj.syncing = message.syncing === false ? undefined : message.syncing; return obj; }, fromAminoMsg(object: GetSyncingResponseAminoMsg): GetSyncingResponse { @@ -1688,18 +1688,18 @@ export const VersionInfo = { }, toAmino(message: VersionInfo, useInterfaces: boolean = false): VersionInfoAmino { const obj: any = {}; - obj.name = message.name; - obj.app_name = message.appName; - obj.version = message.version; - obj.git_commit = message.gitCommit; - obj.build_tags = message.buildTags; - obj.go_version = message.goVersion; + obj.name = message.name === "" ? undefined : message.name; + obj.app_name = message.appName === "" ? undefined : message.appName; + obj.version = message.version === "" ? undefined : message.version; + obj.git_commit = message.gitCommit === "" ? undefined : message.gitCommit; + obj.build_tags = message.buildTags === "" ? undefined : message.buildTags; + obj.go_version = message.goVersion === "" ? undefined : message.goVersion; if (message.buildDeps) { obj.build_deps = message.buildDeps.map(e => e ? Module.toAmino(e, useInterfaces) : undefined); } else { - obj.build_deps = []; + obj.build_deps = message.buildDeps; } - obj.cosmos_sdk_version = message.cosmosSdkVersion; + obj.cosmos_sdk_version = message.cosmosSdkVersion === "" ? undefined : message.cosmosSdkVersion; return obj; }, fromAminoMsg(object: VersionInfoAminoMsg): VersionInfo { @@ -1790,9 +1790,9 @@ export const Module = { }, toAmino(message: Module, useInterfaces: boolean = false): ModuleAmino { const obj: any = {}; - obj.path = message.path; - obj.version = message.version; - obj.sum = message.sum; + obj.path = message.path === "" ? undefined : message.path; + obj.version = message.version === "" ? undefined : message.version; + obj.sum = message.sum === "" ? undefined : message.sum; return obj; }, fromAminoMsg(object: ModuleAminoMsg): Module { @@ -1895,9 +1895,9 @@ export const ABCIQueryRequest = { toAmino(message: ABCIQueryRequest, useInterfaces: boolean = false): ABCIQueryRequestAmino { const obj: any = {}; obj.data = message.data ? base64FromBytes(message.data) : undefined; - obj.path = message.path; - obj.height = message.height ? message.height.toString() : undefined; - obj.prove = message.prove; + obj.path = message.path === "" ? undefined : message.path; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.prove = message.prove === false ? undefined : message.prove; return obj; }, fromAminoMsg(object: ABCIQueryRequestAminoMsg): ABCIQueryRequest { @@ -2054,15 +2054,15 @@ export const ABCIQueryResponse = { }, toAmino(message: ABCIQueryResponse, useInterfaces: boolean = false): ABCIQueryResponseAmino { const obj: any = {}; - obj.code = message.code; - obj.log = message.log; - obj.info = message.info; - obj.index = message.index ? message.index.toString() : undefined; + obj.code = message.code === 0 ? undefined : message.code; + obj.log = message.log === "" ? undefined : message.log; + obj.info = message.info === "" ? undefined : message.info; + obj.index = message.index !== BigInt(0) ? message.index.toString() : undefined; obj.key = message.key ? base64FromBytes(message.key) : undefined; obj.value = message.value ? base64FromBytes(message.value) : undefined; obj.proof_ops = message.proofOps ? ProofOps.toAmino(message.proofOps, useInterfaces) : undefined; - obj.height = message.height ? message.height.toString() : undefined; - obj.codespace = message.codespace; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.codespace = message.codespace === "" ? undefined : message.codespace; return obj; }, fromAminoMsg(object: ABCIQueryResponseAminoMsg): ABCIQueryResponse { @@ -2153,7 +2153,7 @@ export const ProofOp = { }, toAmino(message: ProofOp, useInterfaces: boolean = false): ProofOpAmino { const obj: any = {}; - obj.type = message.type; + obj.type = message.type === "" ? undefined : message.type; obj.key = message.key ? base64FromBytes(message.key) : undefined; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; @@ -2225,7 +2225,7 @@ export const ProofOps = { if (message.ops) { obj.ops = message.ops.map(e => e ? ProofOp.toAmino(e, useInterfaces) : undefined); } else { - obj.ops = []; + obj.ops = message.ops; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/base/tendermint/v1beta1/types.ts b/packages/types/protobuf/codegen/cosmos/base/tendermint/v1beta1/types.ts index d1950b3ac6..27abc0048d 100644 --- a/packages/types/protobuf/codegen/cosmos/base/tendermint/v1beta1/types.ts +++ b/packages/types/protobuf/codegen/cosmos/base/tendermint/v1beta1/types.ts @@ -53,6 +53,7 @@ export interface Header { lastBlockId: BlockID | undefined; /** hashes of block data */ lastCommitHash: Uint8Array; + /** transactions */ dataHash: Uint8Array; /** hashes from the app output from the prev block */ validatorsHash: Uint8Array; @@ -62,6 +63,7 @@ export interface Header { consensusHash: Uint8Array; /** state after txs from the previous block */ appHash: Uint8Array; + /** root hash of all results from the txs from the previous block */ lastResultsHash: Uint8Array; /** consensus info */ evidenceHash: Uint8Array; @@ -87,6 +89,7 @@ export interface HeaderAmino { last_block_id: BlockIDAmino | undefined; /** hashes of block data */ last_commit_hash?: string; + /** transactions */ data_hash?: string; /** hashes from the app output from the prev block */ validators_hash?: string; @@ -96,6 +99,7 @@ export interface HeaderAmino { consensus_hash?: string; /** state after txs from the previous block */ app_hash?: string; + /** root hash of all results from the txs from the previous block */ last_results_hash?: string; /** consensus info */ evidence_hash?: string; @@ -204,9 +208,9 @@ export const Block = { }, toAmino(message: Block, useInterfaces: boolean = false): BlockAmino { const obj: any = {}; - obj.header = message.header ? Header.toAmino(message.header, useInterfaces) : Header.fromPartial({}); - obj.data = message.data ? Data.toAmino(message.data, useInterfaces) : Data.fromPartial({}); - obj.evidence = message.evidence ? EvidenceList.toAmino(message.evidence, useInterfaces) : EvidenceList.fromPartial({}); + obj.header = message.header ? Header.toAmino(message.header, useInterfaces) : Header.toAmino(Header.fromPartial({})); + obj.data = message.data ? Data.toAmino(message.data, useInterfaces) : Data.toAmino(Data.fromPartial({})); + obj.evidence = message.evidence ? EvidenceList.toAmino(message.evidence, useInterfaces) : EvidenceList.toAmino(EvidenceList.fromPartial({})); obj.last_commit = message.lastCommit ? Commit.toAmino(message.lastCommit, useInterfaces) : undefined; return obj; }, @@ -419,11 +423,11 @@ export const Header = { }, toAmino(message: Header, useInterfaces: boolean = false): HeaderAmino { const obj: any = {}; - obj.version = message.version ? Consensus.toAmino(message.version, useInterfaces) : Consensus.fromPartial({}); - obj.chain_id = message.chainId; - obj.height = message.height ? message.height.toString() : undefined; + obj.version = message.version ? Consensus.toAmino(message.version, useInterfaces) : Consensus.toAmino(Consensus.fromPartial({})); + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : new Date(); - obj.last_block_id = message.lastBlockId ? BlockID.toAmino(message.lastBlockId, useInterfaces) : BlockID.fromPartial({}); + obj.last_block_id = message.lastBlockId ? BlockID.toAmino(message.lastBlockId, useInterfaces) : BlockID.toAmino(BlockID.fromPartial({})); obj.last_commit_hash = message.lastCommitHash ? base64FromBytes(message.lastCommitHash) : undefined; obj.data_hash = message.dataHash ? base64FromBytes(message.dataHash) : undefined; obj.validators_hash = message.validatorsHash ? base64FromBytes(message.validatorsHash) : undefined; @@ -432,7 +436,7 @@ export const Header = { obj.app_hash = message.appHash ? base64FromBytes(message.appHash) : undefined; obj.last_results_hash = message.lastResultsHash ? base64FromBytes(message.lastResultsHash) : undefined; obj.evidence_hash = message.evidenceHash ? base64FromBytes(message.evidenceHash) : undefined; - obj.proposer_address = message.proposerAddress; + obj.proposer_address = message.proposerAddress === "" ? undefined : message.proposerAddress; return obj; }, fromAminoMsg(object: HeaderAminoMsg): Header { diff --git a/packages/types/protobuf/codegen/cosmos/base/v1beta1/coin.ts b/packages/types/protobuf/codegen/cosmos/base/v1beta1/coin.ts index 1c1eb6a78d..677c30e44c 100644 --- a/packages/types/protobuf/codegen/cosmos/base/v1beta1/coin.ts +++ b/packages/types/protobuf/codegen/cosmos/base/v1beta1/coin.ts @@ -131,7 +131,7 @@ export const Coin = { }, toAmino(message: Coin, useInterfaces: boolean = false): CoinAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; obj.amount = message.amount ?? ""; return obj; }, @@ -212,8 +212,8 @@ export const DecCoin = { }, toAmino(message: DecCoin, useInterfaces: boolean = false): DecCoinAmino { const obj: any = {}; - obj.denom = message.denom; - obj.amount = message.amount; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: DecCoinAminoMsg): DecCoin { diff --git a/packages/types/protobuf/codegen/cosmos/crypto/multisig/keys.ts b/packages/types/protobuf/codegen/cosmos/crypto/multisig/keys.ts index 8dbe4316cf..4caa0d546a 100644 --- a/packages/types/protobuf/codegen/cosmos/crypto/multisig/keys.ts +++ b/packages/types/protobuf/codegen/cosmos/crypto/multisig/keys.ts @@ -88,11 +88,11 @@ export const LegacyAminoPubKey = { }, toAmino(message: LegacyAminoPubKey, useInterfaces: boolean = false): LegacyAminoPubKeyAmino { const obj: any = {}; - obj.threshold = message.threshold; + obj.threshold = message.threshold === 0 ? undefined : message.threshold; if (message.publicKeys) { obj.public_keys = message.publicKeys.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); } else { - obj.public_keys = []; + obj.public_keys = message.publicKeys; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts b/packages/types/protobuf/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts index 571a679a35..ca02e5ee43 100644 --- a/packages/types/protobuf/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/packages/types/protobuf/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -115,7 +115,7 @@ export const MultiSignature = { if (message.signatures) { obj.signatures = message.signatures.map(e => base64FromBytes(e)); } else { - obj.signatures = []; + obj.signatures = message.signatures; } return obj; }, @@ -196,7 +196,7 @@ export const CompactBitArray = { }, toAmino(message: CompactBitArray, useInterfaces: boolean = false): CompactBitArrayAmino { const obj: any = {}; - obj.extra_bits_stored = message.extraBitsStored; + obj.extra_bits_stored = message.extraBitsStored === 0 ? undefined : message.extraBitsStored; obj.elems = message.elems ? base64FromBytes(message.elems) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/distribution.ts b/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/distribution.ts index f6afc093a5..76c394c044 100644 --- a/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/distribution.ts +++ b/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/distribution.ts @@ -548,7 +548,7 @@ export const Params = { obj.community_tax = message.communityTax ?? ""; obj.base_proposer_reward = message.baseProposerReward ?? ""; obj.bonus_proposer_reward = message.bonusProposerReward ?? ""; - obj.withdraw_addr_enabled = message.withdrawAddrEnabled; + obj.withdraw_addr_enabled = message.withdrawAddrEnabled === false ? undefined : message.withdrawAddrEnabled; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { @@ -629,9 +629,9 @@ export const ValidatorHistoricalRewards = { if (message.cumulativeRewardRatio) { obj.cumulative_reward_ratio = message.cumulativeRewardRatio.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.cumulative_reward_ratio = []; + obj.cumulative_reward_ratio = message.cumulativeRewardRatio; } - obj.reference_count = message.referenceCount; + obj.reference_count = message.referenceCount === 0 ? undefined : message.referenceCount; return obj; }, fromAminoMsg(object: ValidatorHistoricalRewardsAminoMsg): ValidatorHistoricalRewards { @@ -712,9 +712,9 @@ export const ValidatorCurrentRewards = { if (message.rewards) { obj.rewards = message.rewards.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.rewards = []; + obj.rewards = message.rewards; } - obj.period = message.period ? message.period.toString() : undefined; + obj.period = message.period !== BigInt(0) ? message.period.toString() : undefined; return obj; }, fromAminoMsg(object: ValidatorCurrentRewardsAminoMsg): ValidatorCurrentRewards { @@ -784,7 +784,7 @@ export const ValidatorAccumulatedCommission = { if (message.commission) { obj.commission = message.commission.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.commission = []; + obj.commission = message.commission; } return obj; }, @@ -855,7 +855,7 @@ export const ValidatorOutstandingRewards = { if (message.rewards) { obj.rewards = message.rewards.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.rewards = []; + obj.rewards = message.rewards; } return obj; }, @@ -936,8 +936,8 @@ export const ValidatorSlashEvent = { }, toAmino(message: ValidatorSlashEvent, useInterfaces: boolean = false): ValidatorSlashEventAmino { const obj: any = {}; - obj.validator_period = message.validatorPeriod ? message.validatorPeriod.toString() : undefined; - obj.fraction = message.fraction; + obj.validator_period = message.validatorPeriod !== BigInt(0) ? message.validatorPeriod.toString() : undefined; + obj.fraction = message.fraction === "" ? undefined : message.fraction; return obj; }, fromAminoMsg(object: ValidatorSlashEventAminoMsg): ValidatorSlashEvent { @@ -1007,7 +1007,7 @@ export const ValidatorSlashEvents = { if (message.validatorSlashEvents) { obj.validator_slash_events = message.validatorSlashEvents.map(e => e ? ValidatorSlashEvent.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_slash_events = []; + obj.validator_slash_events = message.validatorSlashEvents; } return obj; }, @@ -1078,7 +1078,7 @@ export const FeePool = { if (message.communityPool) { obj.community_pool = message.communityPool.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.community_pool = []; + obj.community_pool = message.communityPool; } return obj; }, @@ -1180,13 +1180,13 @@ export const CommunityPoolSpendProposal = { }, toAmino(message: CommunityPoolSpendProposal, useInterfaces: boolean = false): CommunityPoolSpendProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.recipient = message.recipient; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.recipient = message.recipient === "" ? undefined : message.recipient; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, @@ -1278,7 +1278,7 @@ export const DelegatorStartingInfo = { }, toAmino(message: DelegatorStartingInfo, useInterfaces: boolean = false): DelegatorStartingInfoAmino { const obj: any = {}; - obj.previous_period = message.previousPeriod ? message.previousPeriod.toString() : undefined; + obj.previous_period = message.previousPeriod !== BigInt(0) ? message.previousPeriod.toString() : undefined; obj.stake = message.stake ?? ""; obj.height = message.height ? message.height.toString() : "0"; return obj; @@ -1358,11 +1358,11 @@ export const DelegationDelegatorReward = { }, toAmino(message: DelegationDelegatorReward, useInterfaces: boolean = false): DelegationDelegatorRewardAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; if (message.reward) { obj.reward = message.reward.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.reward = []; + obj.reward = message.reward; } return obj; }, @@ -1477,11 +1477,11 @@ export const CommunityPoolSpendProposalWithDeposit = { }, toAmino(message: CommunityPoolSpendProposalWithDeposit, useInterfaces: boolean = false): CommunityPoolSpendProposalWithDepositAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.recipient = message.recipient; - obj.amount = message.amount; - obj.deposit = message.deposit; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.recipient = message.recipient === "" ? undefined : message.recipient; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.deposit = message.deposit === "" ? undefined : message.deposit; return obj; }, fromAminoMsg(object: CommunityPoolSpendProposalWithDepositAminoMsg): CommunityPoolSpendProposalWithDeposit { diff --git a/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/genesis.ts b/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/genesis.ts index ded892f1c0..38be07ef16 100644 --- a/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/genesis.ts @@ -363,8 +363,8 @@ export const DelegatorWithdrawInfo = { }, toAmino(message: DelegatorWithdrawInfo, useInterfaces: boolean = false): DelegatorWithdrawInfoAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.withdraw_address = message.withdrawAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.withdraw_address = message.withdrawAddress === "" ? undefined : message.withdrawAddress; return obj; }, fromAminoMsg(object: DelegatorWithdrawInfoAminoMsg): DelegatorWithdrawInfo { @@ -442,11 +442,11 @@ export const ValidatorOutstandingRewardsRecord = { }, toAmino(message: ValidatorOutstandingRewardsRecord, useInterfaces: boolean = false): ValidatorOutstandingRewardsRecordAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; if (message.outstandingRewards) { obj.outstanding_rewards = message.outstandingRewards.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.outstanding_rewards = []; + obj.outstanding_rewards = message.outstandingRewards; } return obj; }, @@ -527,8 +527,8 @@ export const ValidatorAccumulatedCommissionRecord = { }, toAmino(message: ValidatorAccumulatedCommissionRecord, useInterfaces: boolean = false): ValidatorAccumulatedCommissionRecordAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.accumulated = message.accumulated ? ValidatorAccumulatedCommission.toAmino(message.accumulated, useInterfaces) : ValidatorAccumulatedCommission.fromPartial({}); + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.accumulated = message.accumulated ? ValidatorAccumulatedCommission.toAmino(message.accumulated, useInterfaces) : ValidatorAccumulatedCommission.toAmino(ValidatorAccumulatedCommission.fromPartial({})); return obj; }, fromAminoMsg(object: ValidatorAccumulatedCommissionRecordAminoMsg): ValidatorAccumulatedCommissionRecord { @@ -619,9 +619,9 @@ export const ValidatorHistoricalRewardsRecord = { }, toAmino(message: ValidatorHistoricalRewardsRecord, useInterfaces: boolean = false): ValidatorHistoricalRewardsRecordAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.period = message.period ? message.period.toString() : undefined; - obj.rewards = message.rewards ? ValidatorHistoricalRewards.toAmino(message.rewards, useInterfaces) : ValidatorHistoricalRewards.fromPartial({}); + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.period = message.period !== BigInt(0) ? message.period.toString() : undefined; + obj.rewards = message.rewards ? ValidatorHistoricalRewards.toAmino(message.rewards, useInterfaces) : ValidatorHistoricalRewards.toAmino(ValidatorHistoricalRewards.fromPartial({})); return obj; }, fromAminoMsg(object: ValidatorHistoricalRewardsRecordAminoMsg): ValidatorHistoricalRewardsRecord { @@ -701,8 +701,8 @@ export const ValidatorCurrentRewardsRecord = { }, toAmino(message: ValidatorCurrentRewardsRecord, useInterfaces: boolean = false): ValidatorCurrentRewardsRecordAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.rewards = message.rewards ? ValidatorCurrentRewards.toAmino(message.rewards, useInterfaces) : ValidatorCurrentRewards.fromPartial({}); + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.rewards = message.rewards ? ValidatorCurrentRewards.toAmino(message.rewards, useInterfaces) : ValidatorCurrentRewards.toAmino(ValidatorCurrentRewards.fromPartial({})); return obj; }, fromAminoMsg(object: ValidatorCurrentRewardsRecordAminoMsg): ValidatorCurrentRewardsRecord { @@ -793,9 +793,9 @@ export const DelegatorStartingInfoRecord = { }, toAmino(message: DelegatorStartingInfoRecord, useInterfaces: boolean = false): DelegatorStartingInfoRecordAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.starting_info = message.startingInfo ? DelegatorStartingInfo.toAmino(message.startingInfo, useInterfaces) : DelegatorStartingInfo.fromPartial({}); + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.starting_info = message.startingInfo ? DelegatorStartingInfo.toAmino(message.startingInfo, useInterfaces) : DelegatorStartingInfo.toAmino(DelegatorStartingInfo.fromPartial({})); return obj; }, fromAminoMsg(object: DelegatorStartingInfoRecordAminoMsg): DelegatorStartingInfoRecord { @@ -897,10 +897,10 @@ export const ValidatorSlashEventRecord = { }, toAmino(message: ValidatorSlashEventRecord, useInterfaces: boolean = false): ValidatorSlashEventRecordAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.height = message.height ? message.height.toString() : undefined; - obj.period = message.period ? message.period.toString() : undefined; - obj.validator_slash_event = message.validatorSlashEvent ? ValidatorSlashEvent.toAmino(message.validatorSlashEvent, useInterfaces) : ValidatorSlashEvent.fromPartial({}); + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.period = message.period !== BigInt(0) ? message.period.toString() : undefined; + obj.validator_slash_event = message.validatorSlashEvent ? ValidatorSlashEvent.toAmino(message.validatorSlashEvent, useInterfaces) : ValidatorSlashEvent.toAmino(ValidatorSlashEvent.fromPartial({})); return obj; }, fromAminoMsg(object: ValidatorSlashEventRecordAminoMsg): ValidatorSlashEventRecord { @@ -1054,43 +1054,43 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); - obj.fee_pool = message.feePool ? FeePool.toAmino(message.feePool, useInterfaces) : FeePool.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); + obj.fee_pool = message.feePool ? FeePool.toAmino(message.feePool, useInterfaces) : FeePool.toAmino(FeePool.fromPartial({})); if (message.delegatorWithdrawInfos) { obj.delegator_withdraw_infos = message.delegatorWithdrawInfos.map(e => e ? DelegatorWithdrawInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.delegator_withdraw_infos = []; + obj.delegator_withdraw_infos = message.delegatorWithdrawInfos; } - obj.previous_proposer = message.previousProposer; + obj.previous_proposer = message.previousProposer === "" ? undefined : message.previousProposer; if (message.outstandingRewards) { obj.outstanding_rewards = message.outstandingRewards.map(e => e ? ValidatorOutstandingRewardsRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.outstanding_rewards = []; + obj.outstanding_rewards = message.outstandingRewards; } if (message.validatorAccumulatedCommissions) { obj.validator_accumulated_commissions = message.validatorAccumulatedCommissions.map(e => e ? ValidatorAccumulatedCommissionRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_accumulated_commissions = []; + obj.validator_accumulated_commissions = message.validatorAccumulatedCommissions; } if (message.validatorHistoricalRewards) { obj.validator_historical_rewards = message.validatorHistoricalRewards.map(e => e ? ValidatorHistoricalRewardsRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_historical_rewards = []; + obj.validator_historical_rewards = message.validatorHistoricalRewards; } if (message.validatorCurrentRewards) { obj.validator_current_rewards = message.validatorCurrentRewards.map(e => e ? ValidatorCurrentRewardsRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_current_rewards = []; + obj.validator_current_rewards = message.validatorCurrentRewards; } if (message.delegatorStartingInfos) { obj.delegator_starting_infos = message.delegatorStartingInfos.map(e => e ? DelegatorStartingInfoRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.delegator_starting_infos = []; + obj.delegator_starting_infos = message.delegatorStartingInfos; } if (message.validatorSlashEvents) { obj.validator_slash_events = message.validatorSlashEvents.map(e => e ? ValidatorSlashEventRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_slash_events = []; + obj.validator_slash_events = message.validatorSlashEvents; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/query.ts index 944ab6ea62..e451291302 100644 --- a/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/query.ts @@ -709,7 +709,7 @@ export const QueryParamsResponse = { }, toAmino(message: QueryParamsResponse, useInterfaces: boolean = false): QueryParamsResponseAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { @@ -778,7 +778,7 @@ export const QueryValidatorDistributionInfoRequest = { }, toAmino(message: QueryValidatorDistributionInfoRequest, useInterfaces: boolean = false): QueryValidatorDistributionInfoRequestAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: QueryValidatorDistributionInfoRequestAminoMsg): QueryValidatorDistributionInfoRequest { @@ -865,16 +865,16 @@ export const QueryValidatorDistributionInfoResponse = { }, toAmino(message: QueryValidatorDistributionInfoResponse, useInterfaces: boolean = false): QueryValidatorDistributionInfoResponseAmino { const obj: any = {}; - obj.operator_address = message.operatorAddress; + obj.operator_address = message.operatorAddress === "" ? undefined : message.operatorAddress; if (message.selfBondRewards) { obj.self_bond_rewards = message.selfBondRewards.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.self_bond_rewards = []; + obj.self_bond_rewards = message.selfBondRewards; } if (message.commission) { obj.commission = message.commission.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.commission = []; + obj.commission = message.commission; } return obj; }, @@ -944,7 +944,7 @@ export const QueryValidatorOutstandingRewardsRequest = { }, toAmino(message: QueryValidatorOutstandingRewardsRequest, useInterfaces: boolean = false): QueryValidatorOutstandingRewardsRequestAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: QueryValidatorOutstandingRewardsRequestAminoMsg): QueryValidatorOutstandingRewardsRequest { @@ -1013,7 +1013,7 @@ export const QueryValidatorOutstandingRewardsResponse = { }, toAmino(message: QueryValidatorOutstandingRewardsResponse, useInterfaces: boolean = false): QueryValidatorOutstandingRewardsResponseAmino { const obj: any = {}; - obj.rewards = message.rewards ? ValidatorOutstandingRewards.toAmino(message.rewards, useInterfaces) : ValidatorOutstandingRewards.fromPartial({}); + obj.rewards = message.rewards ? ValidatorOutstandingRewards.toAmino(message.rewards, useInterfaces) : ValidatorOutstandingRewards.toAmino(ValidatorOutstandingRewards.fromPartial({})); return obj; }, fromAminoMsg(object: QueryValidatorOutstandingRewardsResponseAminoMsg): QueryValidatorOutstandingRewardsResponse { @@ -1082,7 +1082,7 @@ export const QueryValidatorCommissionRequest = { }, toAmino(message: QueryValidatorCommissionRequest, useInterfaces: boolean = false): QueryValidatorCommissionRequestAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: QueryValidatorCommissionRequestAminoMsg): QueryValidatorCommissionRequest { @@ -1151,7 +1151,7 @@ export const QueryValidatorCommissionResponse = { }, toAmino(message: QueryValidatorCommissionResponse, useInterfaces: boolean = false): QueryValidatorCommissionResponseAmino { const obj: any = {}; - obj.commission = message.commission ? ValidatorAccumulatedCommission.toAmino(message.commission, useInterfaces) : ValidatorAccumulatedCommission.fromPartial({}); + obj.commission = message.commission ? ValidatorAccumulatedCommission.toAmino(message.commission, useInterfaces) : ValidatorAccumulatedCommission.toAmino(ValidatorAccumulatedCommission.fromPartial({})); return obj; }, fromAminoMsg(object: QueryValidatorCommissionResponseAminoMsg): QueryValidatorCommissionResponse { @@ -1253,9 +1253,9 @@ export const QueryValidatorSlashesRequest = { }, toAmino(message: QueryValidatorSlashesRequest, useInterfaces: boolean = false): QueryValidatorSlashesRequestAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.starting_height = message.startingHeight ? message.startingHeight.toString() : undefined; - obj.ending_height = message.endingHeight ? message.endingHeight.toString() : undefined; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.starting_height = message.startingHeight !== BigInt(0) ? message.startingHeight.toString() : undefined; + obj.ending_height = message.endingHeight !== BigInt(0) ? message.endingHeight.toString() : undefined; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1337,7 +1337,7 @@ export const QueryValidatorSlashesResponse = { if (message.slashes) { obj.slashes = message.slashes.map(e => e ? ValidatorSlashEvent.toAmino(e, useInterfaces) : undefined); } else { - obj.slashes = []; + obj.slashes = message.slashes; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1419,8 +1419,8 @@ export const QueryDelegationRewardsRequest = { }, toAmino(message: QueryDelegationRewardsRequest, useInterfaces: boolean = false): QueryDelegationRewardsRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: QueryDelegationRewardsRequestAminoMsg): QueryDelegationRewardsRequest { @@ -1490,7 +1490,7 @@ export const QueryDelegationRewardsResponse = { if (message.rewards) { obj.rewards = message.rewards.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.rewards = []; + obj.rewards = message.rewards; } return obj; }, @@ -1560,7 +1560,7 @@ export const QueryDelegationTotalRewardsRequest = { }, toAmino(message: QueryDelegationTotalRewardsRequest, useInterfaces: boolean = false): QueryDelegationTotalRewardsRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: QueryDelegationTotalRewardsRequestAminoMsg): QueryDelegationTotalRewardsRequest { @@ -1639,12 +1639,12 @@ export const QueryDelegationTotalRewardsResponse = { if (message.rewards) { obj.rewards = message.rewards.map(e => e ? DelegationDelegatorReward.toAmino(e, useInterfaces) : undefined); } else { - obj.rewards = []; + obj.rewards = message.rewards; } if (message.total) { obj.total = message.total.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.total = []; + obj.total = message.total; } return obj; }, @@ -1714,7 +1714,7 @@ export const QueryDelegatorValidatorsRequest = { }, toAmino(message: QueryDelegatorValidatorsRequest, useInterfaces: boolean = false): QueryDelegatorValidatorsRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: QueryDelegatorValidatorsRequestAminoMsg): QueryDelegatorValidatorsRequest { @@ -1784,7 +1784,7 @@ export const QueryDelegatorValidatorsResponse = { if (message.validators) { obj.validators = message.validators.map(e => e); } else { - obj.validators = []; + obj.validators = message.validators; } return obj; }, @@ -1854,7 +1854,7 @@ export const QueryDelegatorWithdrawAddressRequest = { }, toAmino(message: QueryDelegatorWithdrawAddressRequest, useInterfaces: boolean = false): QueryDelegatorWithdrawAddressRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: QueryDelegatorWithdrawAddressRequestAminoMsg): QueryDelegatorWithdrawAddressRequest { @@ -1923,7 +1923,7 @@ export const QueryDelegatorWithdrawAddressResponse = { }, toAmino(message: QueryDelegatorWithdrawAddressResponse, useInterfaces: boolean = false): QueryDelegatorWithdrawAddressResponseAmino { const obj: any = {}; - obj.withdraw_address = message.withdrawAddress; + obj.withdraw_address = message.withdrawAddress === "" ? undefined : message.withdrawAddress; return obj; }, fromAminoMsg(object: QueryDelegatorWithdrawAddressResponseAminoMsg): QueryDelegatorWithdrawAddressResponse { @@ -2049,7 +2049,7 @@ export const QueryCommunityPoolResponse = { if (message.pool) { obj.pool = message.pool.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.pool = []; + obj.pool = message.pool; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/tx.ts index fc6a4b8503..4a84b48d1a 100644 --- a/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/distribution/v1beta1/tx.ts @@ -502,8 +502,8 @@ export const MsgSetWithdrawAddress = { }, toAmino(message: MsgSetWithdrawAddress, useInterfaces: boolean = false): MsgSetWithdrawAddressAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.withdraw_address = message.withdrawAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.withdraw_address = message.withdrawAddress === "" ? undefined : message.withdrawAddress; return obj; }, fromAminoMsg(object: MsgSetWithdrawAddressAminoMsg): MsgSetWithdrawAddress { @@ -639,8 +639,8 @@ export const MsgWithdrawDelegatorReward = { }, toAmino(message: MsgWithdrawDelegatorReward, useInterfaces: boolean = false): MsgWithdrawDelegatorRewardAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: MsgWithdrawDelegatorRewardAminoMsg): MsgWithdrawDelegatorReward { @@ -710,7 +710,7 @@ export const MsgWithdrawDelegatorRewardResponse = { if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, @@ -780,7 +780,7 @@ export const MsgWithdrawValidatorCommission = { }, toAmino(message: MsgWithdrawValidatorCommission, useInterfaces: boolean = false): MsgWithdrawValidatorCommissionAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: MsgWithdrawValidatorCommissionAminoMsg): MsgWithdrawValidatorCommission { @@ -850,7 +850,7 @@ export const MsgWithdrawValidatorCommissionResponse = { if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, @@ -932,9 +932,9 @@ export const MsgFundCommunityPool = { if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } - obj.depositor = message.depositor; + obj.depositor = message.depositor === "" ? undefined : message.depositor; return obj; }, fromAminoMsg(object: MsgFundCommunityPoolAminoMsg): MsgFundCommunityPool { @@ -1070,8 +1070,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { @@ -1216,12 +1216,12 @@ export const MsgCommunityPoolSpend = { }, toAmino(message: MsgCommunityPoolSpend, useInterfaces: boolean = false): MsgCommunityPoolSpendAmino { const obj: any = {}; - obj.authority = message.authority; - obj.recipient = message.recipient; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.recipient = message.recipient === "" ? undefined : message.recipient; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, @@ -1367,12 +1367,12 @@ export const MsgDepositValidatorRewardsPool = { }, toAmino(message: MsgDepositValidatorRewardsPool, useInterfaces: boolean = false): MsgDepositValidatorRewardsPoolAmino { const obj: any = {}; - obj.depositor = message.depositor; - obj.validator_address = message.validatorAddress; + obj.depositor = message.depositor === "" ? undefined : message.depositor; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/feegrant.ts b/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/feegrant.ts index 4e3373aa9f..d4dca88b90 100644 --- a/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/feegrant.ts +++ b/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/feegrant.ts @@ -248,7 +248,7 @@ export const BasicAllowance = { if (message.spendLimit) { obj.spend_limit = message.spendLimit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.spend_limit = []; + obj.spend_limit = message.spendLimit; } obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined; return obj; @@ -360,17 +360,17 @@ export const PeriodicAllowance = { }, toAmino(message: PeriodicAllowance, useInterfaces: boolean = false): PeriodicAllowanceAmino { const obj: any = {}; - obj.basic = message.basic ? BasicAllowance.toAmino(message.basic, useInterfaces) : BasicAllowance.fromPartial({}); - obj.period = message.period ? Duration.toAmino(message.period, useInterfaces) : Duration.fromPartial({}); + obj.basic = message.basic ? BasicAllowance.toAmino(message.basic, useInterfaces) : BasicAllowance.toAmino(BasicAllowance.fromPartial({})); + obj.period = message.period ? Duration.toAmino(message.period, useInterfaces) : Duration.toAmino(Duration.fromPartial({})); if (message.periodSpendLimit) { obj.period_spend_limit = message.periodSpendLimit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.period_spend_limit = []; + obj.period_spend_limit = message.periodSpendLimit; } if (message.periodCanSpend) { obj.period_can_spend = message.periodCanSpend.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.period_can_spend = []; + obj.period_can_spend = message.periodCanSpend; } obj.period_reset = message.periodReset ? Timestamp.toAmino(toTimestamp(message.periodReset)) : new Date(); return obj; @@ -455,7 +455,7 @@ export const AllowedMsgAllowance = { if (message.allowedMessages) { obj.allowed_messages = message.allowedMessages.map(e => e); } else { - obj.allowed_messages = []; + obj.allowed_messages = message.allowedMessages; } return obj; }, @@ -547,8 +547,8 @@ export const Grant = { }, toAmino(message: Grant, useInterfaces: boolean = false): GrantAmino { const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; + obj.granter = message.granter === "" ? undefined : message.granter; + obj.grantee = message.grantee === "" ? undefined : message.grantee; obj.allowance = message.allowance ? Cosmos_feegrantv1beta1FeeAllowanceI_ToAmino((message.allowance as Any), useInterfaces) : undefined; return obj; }, @@ -588,7 +588,7 @@ export const Cosmos_feegrantv1beta1FeeAllowanceI_InterfaceDecoder = (input: Bina return data; } }; -export const Cosmos_feegrantv1beta1FeeAllowanceI_FromAmino = (content: AnyAmino) => { +export const Cosmos_feegrantv1beta1FeeAllowanceI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "cosmos-sdk/BasicAllowance": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/genesis.ts b/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/genesis.ts index 89d54a5e26..3960864370 100644 --- a/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/genesis.ts @@ -66,7 +66,7 @@ export const GenesisState = { if (message.allowances) { obj.allowances = message.allowances.map(e => e ? Grant.toAmino(e, useInterfaces) : undefined); } else { - obj.allowances = []; + obj.allowances = message.allowances; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/query.ts index d67304b7bf..f8205c2da8 100644 --- a/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/query.ts @@ -210,8 +210,8 @@ export const QueryAllowanceRequest = { }, toAmino(message: QueryAllowanceRequest, useInterfaces: boolean = false): QueryAllowanceRequestAmino { const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; + obj.granter = message.granter === "" ? undefined : message.granter; + obj.grantee = message.grantee === "" ? undefined : message.grantee; return obj; }, fromAminoMsg(object: QueryAllowanceRequestAminoMsg): QueryAllowanceRequest { @@ -360,7 +360,7 @@ export const QueryAllowancesRequest = { }, toAmino(message: QueryAllowancesRequest, useInterfaces: boolean = false): QueryAllowancesRequestAmino { const obj: any = {}; - obj.grantee = message.grantee; + obj.grantee = message.grantee === "" ? undefined : message.grantee; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -442,7 +442,7 @@ export const QueryAllowancesResponse = { if (message.allowances) { obj.allowances = message.allowances.map(e => e ? Grant.toAmino(e, useInterfaces) : undefined); } else { - obj.allowances = []; + obj.allowances = message.allowances; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -524,7 +524,7 @@ export const QueryAllowancesByGranterRequest = { }, toAmino(message: QueryAllowancesByGranterRequest, useInterfaces: boolean = false): QueryAllowancesByGranterRequestAmino { const obj: any = {}; - obj.granter = message.granter; + obj.granter = message.granter === "" ? undefined : message.granter; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -606,7 +606,7 @@ export const QueryAllowancesByGranterResponse = { if (message.allowances) { obj.allowances = message.allowances.map(e => e ? Grant.toAmino(e, useInterfaces) : undefined); } else { - obj.allowances = []; + obj.allowances = message.allowances; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/tx.ts index abb4c3928a..dd98461972 100644 --- a/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/feegrant/v1beta1/tx.ts @@ -203,8 +203,8 @@ export const MsgGrantAllowance = { }, toAmino(message: MsgGrantAllowance, useInterfaces: boolean = false): MsgGrantAllowanceAmino { const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; + obj.granter = message.granter === "" ? undefined : message.granter; + obj.grantee = message.grantee === "" ? undefined : message.grantee; obj.allowance = message.allowance ? Cosmos_feegrantv1beta1FeeAllowanceI_ToAmino((message.allowance as Any), useInterfaces) : undefined; return obj; }, @@ -341,8 +341,8 @@ export const MsgRevokeAllowance = { }, toAmino(message: MsgRevokeAllowance, useInterfaces: boolean = false): MsgRevokeAllowanceAmino { const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; + obj.granter = message.granter === "" ? undefined : message.granter; + obj.grantee = message.grantee === "" ? undefined : message.grantee; return obj; }, fromAminoMsg(object: MsgRevokeAllowanceAminoMsg): MsgRevokeAllowance { @@ -467,7 +467,7 @@ export const MsgPruneAllowances = { }, toAmino(message: MsgPruneAllowances, useInterfaces: boolean = false): MsgPruneAllowancesAmino { const obj: any = {}; - obj.pruner = message.pruner; + obj.pruner = message.pruner === "" ? undefined : message.pruner; return obj; }, fromAminoMsg(object: MsgPruneAllowancesAminoMsg): MsgPruneAllowances { @@ -562,7 +562,7 @@ export const Cosmos_feegrantv1beta1FeeAllowanceI_InterfaceDecoder = (input: Bina return data; } }; -export const Cosmos_feegrantv1beta1FeeAllowanceI_FromAmino = (content: AnyAmino) => { +export const Cosmos_feegrantv1beta1FeeAllowanceI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "cosmos-sdk/BasicAllowance": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/cosmos/gov/v1/genesis.ts b/packages/types/protobuf/codegen/cosmos/gov/v1/genesis.ts index b664f945a1..aa63ab8eaf 100644 --- a/packages/types/protobuf/codegen/cosmos/gov/v1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmos/gov/v1/genesis.ts @@ -238,27 +238,27 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.starting_proposal_id = message.startingProposalId ? message.startingProposalId.toString() : undefined; + obj.starting_proposal_id = message.startingProposalId !== BigInt(0) ? message.startingProposalId.toString() : undefined; if (message.deposits) { obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e, useInterfaces) : undefined); } else { - obj.deposits = []; + obj.deposits = message.deposits; } if (message.votes) { obj.votes = message.votes.map(e => e ? Vote.toAmino(e, useInterfaces) : undefined); } else { - obj.votes = []; + obj.votes = message.votes; } if (message.proposals) { obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e, useInterfaces) : undefined); } else { - obj.proposals = []; + obj.proposals = message.proposals; } obj.deposit_params = message.depositParams ? DepositParams.toAmino(message.depositParams, useInterfaces) : undefined; obj.voting_params = message.votingParams ? VotingParams.toAmino(message.votingParams, useInterfaces) : undefined; obj.tally_params = message.tallyParams ? TallyParams.toAmino(message.tallyParams, useInterfaces) : undefined; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; - obj.constitution = message.constitution; + obj.constitution = message.constitution === "" ? undefined : message.constitution; return obj; }, fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { diff --git a/packages/types/protobuf/codegen/cosmos/gov/v1/gov.ts b/packages/types/protobuf/codegen/cosmos/gov/v1/gov.ts index ab90f67e7d..0074a9ef40 100644 --- a/packages/types/protobuf/codegen/cosmos/gov/v1/gov.ts +++ b/packages/types/protobuf/codegen/cosmos/gov/v1/gov.ts @@ -752,7 +752,7 @@ export const WeightedVoteOption = { fromAmino(object: WeightedVoteOptionAmino): WeightedVoteOption { const message = createBaseWeightedVoteOption(); if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); + message.option = object.option; } if (object.weight !== undefined && object.weight !== null) { message.weight = object.weight; @@ -761,8 +761,8 @@ export const WeightedVoteOption = { }, toAmino(message: WeightedVoteOption, useInterfaces: boolean = false): WeightedVoteOptionAmino { const obj: any = {}; - obj.option = message.option; - obj.weight = message.weight; + obj.option = message.option === 0 ? undefined : message.option; + obj.weight = message.weight === "" ? undefined : message.weight; return obj; }, fromAminoMsg(object: WeightedVoteOptionAminoMsg): WeightedVoteOption { @@ -851,12 +851,12 @@ export const Deposit = { }, toAmino(message: Deposit, useInterfaces: boolean = false): DepositAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; + obj.depositor = message.depositor === "" ? undefined : message.depositor; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, @@ -1036,7 +1036,7 @@ export const Proposal = { } message.messages = object.messages?.map(e => Any.fromAmino(e)) || []; if (object.status !== undefined && object.status !== null) { - message.status = proposalStatusFromJSON(object.status); + message.status = object.status; } if (object.final_tally_result !== undefined && object.final_tally_result !== null) { message.finalTallyResult = TallyResult.fromAmino(object.final_tally_result); @@ -1076,29 +1076,29 @@ export const Proposal = { }, toAmino(message: Proposal, useInterfaces: boolean = false): ProposalAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; if (message.messages) { obj.messages = message.messages.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); } else { - obj.messages = []; + obj.messages = message.messages; } - obj.status = message.status; + obj.status = message.status === 0 ? undefined : message.status; obj.final_tally_result = message.finalTallyResult ? TallyResult.toAmino(message.finalTallyResult, useInterfaces) : undefined; obj.submit_time = message.submitTime ? Timestamp.toAmino(toTimestamp(message.submitTime)) : undefined; obj.deposit_end_time = message.depositEndTime ? Timestamp.toAmino(toTimestamp(message.depositEndTime)) : undefined; if (message.totalDeposit) { obj.total_deposit = message.totalDeposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_deposit = []; + obj.total_deposit = message.totalDeposit; } obj.voting_start_time = message.votingStartTime ? Timestamp.toAmino(toTimestamp(message.votingStartTime)) : undefined; obj.voting_end_time = message.votingEndTime ? Timestamp.toAmino(toTimestamp(message.votingEndTime)) : undefined; - obj.metadata = message.metadata; - obj.title = message.title; - obj.summary = message.summary; - obj.proposer = message.proposer; - obj.expedited = message.expedited; - obj.failed_reason = message.failedReason; + obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.title = message.title === "" ? undefined : message.title; + obj.summary = message.summary === "" ? undefined : message.summary; + obj.proposer = message.proposer === "" ? undefined : message.proposer; + obj.expedited = message.expedited === false ? undefined : message.expedited; + obj.failed_reason = message.failedReason === "" ? undefined : message.failedReason; return obj; }, fromAminoMsg(object: ProposalAminoMsg): Proposal { @@ -1200,10 +1200,10 @@ export const TallyResult = { }, toAmino(message: TallyResult, useInterfaces: boolean = false): TallyResultAmino { const obj: any = {}; - obj.yes_count = message.yesCount; - obj.abstain_count = message.abstainCount; - obj.no_count = message.noCount; - obj.no_with_veto_count = message.noWithVetoCount; + obj.yes_count = message.yesCount === "" ? undefined : message.yesCount; + obj.abstain_count = message.abstainCount === "" ? undefined : message.abstainCount; + obj.no_count = message.noCount === "" ? undefined : message.noCount; + obj.no_with_veto_count = message.noWithVetoCount === "" ? undefined : message.noWithVetoCount; return obj; }, fromAminoMsg(object: TallyResultAminoMsg): TallyResult { @@ -1303,14 +1303,14 @@ export const Vote = { }, toAmino(message: Vote, useInterfaces: boolean = false): VoteAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; + obj.voter = message.voter === "" ? undefined : message.voter; if (message.options) { obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e, useInterfaces) : undefined); } else { - obj.options = []; + obj.options = message.options; } - obj.metadata = message.metadata; + obj.metadata = message.metadata === "" ? undefined : message.metadata; return obj; }, fromAminoMsg(object: VoteAminoMsg): Vote { @@ -1391,7 +1391,7 @@ export const DepositParams = { if (message.minDeposit) { obj.min_deposit = message.minDeposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.min_deposit = []; + obj.min_deposit = message.minDeposit; } obj.max_deposit_period = message.maxDepositPeriod ? Duration.toAmino(message.maxDepositPeriod, useInterfaces) : undefined; return obj; @@ -1553,9 +1553,9 @@ export const TallyParams = { }, toAmino(message: TallyParams, useInterfaces: boolean = false): TallyParamsAmino { const obj: any = {}; - obj.quorum = message.quorum; - obj.threshold = message.threshold; - obj.veto_threshold = message.vetoThreshold; + obj.quorum = message.quorum === "" ? undefined : message.quorum; + obj.threshold = message.threshold === "" ? undefined : message.threshold; + obj.veto_threshold = message.vetoThreshold === "" ? undefined : message.vetoThreshold; return obj; }, fromAminoMsg(object: TallyParamsAminoMsg): TallyParams { @@ -1777,26 +1777,26 @@ export const Params = { if (message.minDeposit) { obj.min_deposit = message.minDeposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.min_deposit = []; + obj.min_deposit = message.minDeposit; } obj.max_deposit_period = message.maxDepositPeriod ? Duration.toAmino(message.maxDepositPeriod, useInterfaces) : undefined; obj.voting_period = message.votingPeriod ? Duration.toAmino(message.votingPeriod, useInterfaces) : undefined; - obj.quorum = message.quorum; - obj.threshold = message.threshold; - obj.veto_threshold = message.vetoThreshold; - obj.min_initial_deposit_ratio = message.minInitialDepositRatio; - obj.proposal_cancel_ratio = message.proposalCancelRatio; - obj.proposal_cancel_dest = message.proposalCancelDest; + obj.quorum = message.quorum === "" ? undefined : message.quorum; + obj.threshold = message.threshold === "" ? undefined : message.threshold; + obj.veto_threshold = message.vetoThreshold === "" ? undefined : message.vetoThreshold; + obj.min_initial_deposit_ratio = message.minInitialDepositRatio === "" ? undefined : message.minInitialDepositRatio; + obj.proposal_cancel_ratio = message.proposalCancelRatio === "" ? undefined : message.proposalCancelRatio; + obj.proposal_cancel_dest = message.proposalCancelDest === "" ? undefined : message.proposalCancelDest; obj.expedited_voting_period = message.expeditedVotingPeriod ? Duration.toAmino(message.expeditedVotingPeriod, useInterfaces) : undefined; - obj.expedited_threshold = message.expeditedThreshold; + obj.expedited_threshold = message.expeditedThreshold === "" ? undefined : message.expeditedThreshold; if (message.expeditedMinDeposit) { obj.expedited_min_deposit = message.expeditedMinDeposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.expedited_min_deposit = []; + obj.expedited_min_deposit = message.expeditedMinDeposit; } - obj.burn_vote_quorum = message.burnVoteQuorum; - obj.burn_proposal_deposit_prevote = message.burnProposalDepositPrevote; - obj.burn_vote_veto = message.burnVoteVeto; + obj.burn_vote_quorum = message.burnVoteQuorum === false ? undefined : message.burnVoteQuorum; + obj.burn_proposal_deposit_prevote = message.burnProposalDepositPrevote === false ? undefined : message.burnProposalDepositPrevote; + obj.burn_vote_veto = message.burnVoteVeto === false ? undefined : message.burnVoteVeto; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/cosmos/gov/v1/query.ts b/packages/types/protobuf/codegen/cosmos/gov/v1/query.ts index 737c01869a..baa8dac27b 100644 --- a/packages/types/protobuf/codegen/cosmos/gov/v1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/gov/v1/query.ts @@ -1,5 +1,5 @@ //@ts-nocheck -import { ProposalStatus, Proposal, ProposalAmino, ProposalSDKType, Vote, VoteAmino, VoteSDKType, VotingParams, VotingParamsAmino, VotingParamsSDKType, DepositParams, DepositParamsAmino, DepositParamsSDKType, TallyParams, TallyParamsAmino, TallyParamsSDKType, Params, ParamsAmino, ParamsSDKType, Deposit, DepositAmino, DepositSDKType, TallyResult, TallyResultAmino, TallyResultSDKType, proposalStatusFromJSON } from "./gov"; +import { ProposalStatus, Proposal, ProposalAmino, ProposalSDKType, Vote, VoteAmino, VoteSDKType, VotingParams, VotingParamsAmino, VotingParamsSDKType, DepositParams, DepositParamsAmino, DepositParamsSDKType, TallyParams, TallyParamsAmino, TallyParamsSDKType, Params, ParamsAmino, ParamsSDKType, Deposit, DepositAmino, DepositSDKType, TallyResult, TallyResultAmino, TallyResultSDKType } from "./gov"; import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; import { BinaryReader, BinaryWriter } from "../../../binary"; /** QueryConstitutionRequest is the request type for the Query/Constitution RPC method */ @@ -603,7 +603,7 @@ export const QueryConstitutionResponse = { }, toAmino(message: QueryConstitutionResponse, useInterfaces: boolean = false): QueryConstitutionResponseAmino { const obj: any = {}; - obj.constitution = message.constitution; + obj.constitution = message.constitution === "" ? undefined : message.constitution; return obj; }, fromAminoMsg(object: QueryConstitutionResponseAminoMsg): QueryConstitutionResponse { @@ -672,7 +672,7 @@ export const QueryProposalRequest = { }, toAmino(message: QueryProposalRequest, useInterfaces: boolean = false): QueryProposalRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryProposalRequestAminoMsg): QueryProposalRequest { @@ -828,7 +828,7 @@ export const QueryProposalsRequest = { fromAmino(object: QueryProposalsRequestAmino): QueryProposalsRequest { const message = createBaseQueryProposalsRequest(); if (object.proposal_status !== undefined && object.proposal_status !== null) { - message.proposalStatus = proposalStatusFromJSON(object.proposal_status); + message.proposalStatus = object.proposal_status; } if (object.voter !== undefined && object.voter !== null) { message.voter = object.voter; @@ -843,9 +843,9 @@ export const QueryProposalsRequest = { }, toAmino(message: QueryProposalsRequest, useInterfaces: boolean = false): QueryProposalsRequestAmino { const obj: any = {}; - obj.proposal_status = message.proposalStatus; - obj.voter = message.voter; - obj.depositor = message.depositor; + obj.proposal_status = message.proposalStatus === 0 ? undefined : message.proposalStatus; + obj.voter = message.voter === "" ? undefined : message.voter; + obj.depositor = message.depositor === "" ? undefined : message.depositor; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -927,7 +927,7 @@ export const QueryProposalsResponse = { if (message.proposals) { obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e, useInterfaces) : undefined); } else { - obj.proposals = []; + obj.proposals = message.proposals; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1009,8 +1009,8 @@ export const QueryVoteRequest = { }, toAmino(message: QueryVoteRequest, useInterfaces: boolean = false): QueryVoteRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; + obj.voter = message.voter === "" ? undefined : message.voter; return obj; }, fromAminoMsg(object: QueryVoteRequestAminoMsg): QueryVoteRequest { @@ -1159,7 +1159,7 @@ export const QueryVotesRequest = { }, toAmino(message: QueryVotesRequest, useInterfaces: boolean = false): QueryVotesRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1241,7 +1241,7 @@ export const QueryVotesResponse = { if (message.votes) { obj.votes = message.votes.map(e => e ? Vote.toAmino(e, useInterfaces) : undefined); } else { - obj.votes = []; + obj.votes = message.votes; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1312,7 +1312,7 @@ export const QueryParamsRequest = { }, toAmino(message: QueryParamsRequest, useInterfaces: boolean = false): QueryParamsRequestAmino { const obj: any = {}; - obj.params_type = message.paramsType; + obj.params_type = message.paramsType === "" ? undefined : message.paramsType; return obj; }, fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { @@ -1497,8 +1497,8 @@ export const QueryDepositRequest = { }, toAmino(message: QueryDepositRequest, useInterfaces: boolean = false): QueryDepositRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; + obj.depositor = message.depositor === "" ? undefined : message.depositor; return obj; }, fromAminoMsg(object: QueryDepositRequestAminoMsg): QueryDepositRequest { @@ -1647,7 +1647,7 @@ export const QueryDepositsRequest = { }, toAmino(message: QueryDepositsRequest, useInterfaces: boolean = false): QueryDepositsRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1729,7 +1729,7 @@ export const QueryDepositsResponse = { if (message.deposits) { obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e, useInterfaces) : undefined); } else { - obj.deposits = []; + obj.deposits = message.deposits; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1800,7 +1800,7 @@ export const QueryTallyResultRequest = { }, toAmino(message: QueryTallyResultRequest, useInterfaces: boolean = false): QueryTallyResultRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryTallyResultRequestAminoMsg): QueryTallyResultRequest { diff --git a/packages/types/protobuf/codegen/cosmos/gov/v1/tx.ts b/packages/types/protobuf/codegen/cosmos/gov/v1/tx.ts index fd09961b25..4ebbe57429 100644 --- a/packages/types/protobuf/codegen/cosmos/gov/v1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/gov/v1/tx.ts @@ -1,4 +1,4 @@ -// @ts-nocheck +//@ts-nocheck import { aminoToRawProtobufMsg, rawProtobufMsgToAmino } from "../../../../utils"; import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; @@ -430,7 +430,7 @@ export interface MsgCancelProposalProtoMsg { */ export interface MsgCancelProposalAmino { /** proposal_id defines the unique id of the proposal. */ - proposal_id?: string; + proposal_id: string; /** proposer is the account address of the proposer. */ proposer?: string; } @@ -473,7 +473,7 @@ export interface MsgCancelProposalResponseProtoMsg { */ export interface MsgCancelProposalResponseAmino { /** proposal_id defines the unique id of the proposal. */ - proposal_id?: string; + proposal_id: string; /** canceled_time is the time when proposal is canceled. */ canceled_time?: string | undefined; /** canceled_height defines the block height at which the proposal is canceled. */ @@ -579,7 +579,8 @@ export const MsgSubmitProposal = { }, fromAmino(object: MsgSubmitProposalAmino): MsgSubmitProposal { const message = createBaseMsgSubmitProposal(); - message.messages = object.messages?.map(e => aminoToRawProtobufMsg(e)) || []; + message.messages = + object.messages?.map(e => aminoToRawProtobufMsg(e)) || []; message.initialDeposit = object.initial_deposit?.map(e => Coin.fromAmino(e)) || []; if (object.proposer !== undefined && object.proposer !== null) { message.proposer = object.proposer; @@ -606,15 +607,13 @@ export const MsgSubmitProposal = { if (message.initialDeposit) { obj.initial_deposit = message.initialDeposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.initial_deposit = []; - } - obj.proposer = message.proposer; - obj.metadata = message.metadata; - obj.title = message.title; - obj.summary = message.summary; - if (message.expedited) { - obj.expedited = message.expedited; + obj.initial_deposit = message.initialDeposit; } + obj.proposer = message.proposer === "" ? undefined : message.proposer; + obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.title = message.title === "" ? undefined : message.title; + obj.summary = message.summary === "" ? undefined : message.summary; + obj.expedited = message.expedited === false ? undefined : message.expedited; return obj; }, fromAminoMsg(object: MsgSubmitProposalAminoMsg): MsgSubmitProposal { @@ -683,7 +682,7 @@ export const MsgSubmitProposalResponse = { }, toAmino(message: MsgSubmitProposalResponse, useInterfaces: boolean = false): MsgSubmitProposalResponseAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgSubmitProposalResponseAminoMsg): MsgSubmitProposalResponse { @@ -764,7 +763,7 @@ export const MsgExecLegacyContent = { toAmino(message: MsgExecLegacyContent, useInterfaces: boolean = false): MsgExecLegacyContentAmino { const obj: any = {}; obj.content = message.content ? Cosmos_govv1beta1Content_ToAmino((message.content as Any), useInterfaces) : undefined; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; return obj; }, fromAminoMsg(object: MsgExecLegacyContentAminoMsg): MsgExecLegacyContent { @@ -923,9 +922,9 @@ export const MsgVote = { toAmino(message: MsgVote, useInterfaces: boolean = false): MsgVoteAmino { const obj: any = {}; obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.voter = message.voter; - obj.option = message.option; - obj.metadata = message.metadata; + obj.voter = message.voter === "" ? undefined : message.voter; + obj.option = message.option === 0 ? undefined : message.option; + obj.metadata = message.metadata === "" ? undefined : message.metadata; return obj; }, fromAminoMsg(object: MsgVoteAminoMsg): MsgVote { @@ -1082,13 +1081,13 @@ export const MsgVoteWeighted = { toAmino(message: MsgVoteWeighted, useInterfaces: boolean = false): MsgVoteWeightedAmino { const obj: any = {}; obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.voter = message.voter; + obj.voter = message.voter === "" ? undefined : message.voter; if (message.options) { obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e, useInterfaces) : undefined); } else { - obj.options = []; + obj.options = message.options; } - obj.metadata = message.metadata; + obj.metadata = message.metadata === "" ? undefined : message.metadata; return obj; }, fromAminoMsg(object: MsgVoteWeightedAminoMsg): MsgVoteWeighted { @@ -1234,11 +1233,11 @@ export const MsgDeposit = { toAmino(message: MsgDeposit, useInterfaces: boolean = false): MsgDepositAmino { const obj: any = {}; obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.depositor = message.depositor; + obj.depositor = message.depositor === "" ? undefined : message.depositor; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, @@ -1375,8 +1374,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { @@ -1512,8 +1511,8 @@ export const MsgCancelProposal = { }, toAmino(message: MsgCancelProposal, useInterfaces: boolean = false): MsgCancelProposalAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.proposer = message.proposer; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; + obj.proposer = message.proposer === "" ? undefined : message.proposer; return obj; }, fromAminoMsg(object: MsgCancelProposalAminoMsg): MsgCancelProposal { @@ -1604,9 +1603,9 @@ export const MsgCancelProposalResponse = { }, toAmino(message: MsgCancelProposalResponse, useInterfaces: boolean = false): MsgCancelProposalResponseAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; obj.canceled_time = message.canceledTime ? Timestamp.toAmino(toTimestamp(message.canceledTime)) : undefined; - obj.canceled_height = message.canceledHeight ? message.canceledHeight.toString() : undefined; + obj.canceled_height = message.canceledHeight !== BigInt(0) ? message.canceledHeight.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCancelProposalResponseAminoMsg): MsgCancelProposalResponse { @@ -1731,7 +1730,7 @@ export const Cosmos_govv1beta1Content_InterfaceDecoder = (input: BinaryReader | return data; } }; -export const Cosmos_govv1beta1Content_FromAmino = (content: AnyAmino) => { +export const Cosmos_govv1beta1Content_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "/alliance.alliance.MsgCreateAllianceProposal": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/cosmos/gov/v1beta1/genesis.ts b/packages/types/protobuf/codegen/cosmos/gov/v1beta1/genesis.ts index a7ef2a4951..f9be8ca2bf 100644 --- a/packages/types/protobuf/codegen/cosmos/gov/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmos/gov/v1beta1/genesis.ts @@ -157,25 +157,25 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.starting_proposal_id = message.startingProposalId ? message.startingProposalId.toString() : undefined; + obj.starting_proposal_id = message.startingProposalId !== BigInt(0) ? message.startingProposalId.toString() : undefined; if (message.deposits) { obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e, useInterfaces) : undefined); } else { - obj.deposits = []; + obj.deposits = message.deposits; } if (message.votes) { obj.votes = message.votes.map(e => e ? Vote.toAmino(e, useInterfaces) : undefined); } else { - obj.votes = []; + obj.votes = message.votes; } if (message.proposals) { obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e, useInterfaces) : undefined); } else { - obj.proposals = []; + obj.proposals = message.proposals; } - obj.deposit_params = message.depositParams ? DepositParams.toAmino(message.depositParams, useInterfaces) : DepositParams.fromPartial({}); - obj.voting_params = message.votingParams ? VotingParams.toAmino(message.votingParams, useInterfaces) : VotingParams.fromPartial({}); - obj.tally_params = message.tallyParams ? TallyParams.toAmino(message.tallyParams, useInterfaces) : TallyParams.fromPartial({}); + obj.deposit_params = message.depositParams ? DepositParams.toAmino(message.depositParams, useInterfaces) : DepositParams.toAmino(DepositParams.fromPartial({})); + obj.voting_params = message.votingParams ? VotingParams.toAmino(message.votingParams, useInterfaces) : VotingParams.toAmino(VotingParams.fromPartial({})); + obj.tally_params = message.tallyParams ? TallyParams.toAmino(message.tallyParams, useInterfaces) : TallyParams.toAmino(TallyParams.fromPartial({})); return obj; }, fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { diff --git a/packages/types/protobuf/codegen/cosmos/gov/v1beta1/gov.ts b/packages/types/protobuf/codegen/cosmos/gov/v1beta1/gov.ts index fa6c1628ab..3cc204020a 100644 --- a/packages/types/protobuf/codegen/cosmos/gov/v1beta1/gov.ts +++ b/packages/types/protobuf/codegen/cosmos/gov/v1beta1/gov.ts @@ -595,7 +595,7 @@ export const WeightedVoteOption = { fromAmino(object: WeightedVoteOptionAmino): WeightedVoteOption { const message = createBaseWeightedVoteOption(); if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); + message.option = object.option; } if (object.weight !== undefined && object.weight !== null) { message.weight = object.weight; @@ -604,7 +604,7 @@ export const WeightedVoteOption = { }, toAmino(message: WeightedVoteOption, useInterfaces: boolean = false): WeightedVoteOptionAmino { const obj: any = {}; - obj.option = message.option; + obj.option = message.option === 0 ? undefined : message.option; obj.weight = message.weight ?? ""; return obj; }, @@ -686,8 +686,8 @@ export const TextProposal = { }, toAmino(message: TextProposal, useInterfaces: boolean = false): TextProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; return obj; }, fromAminoMsg(object: TextProposalAminoMsg): TextProposal { @@ -776,12 +776,12 @@ export const Deposit = { }, toAmino(message: Deposit, useInterfaces: boolean = false): DepositAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; + obj.depositor = message.depositor === "" ? undefined : message.depositor; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, @@ -915,7 +915,7 @@ export const Proposal = { message.content = Cosmos_govv1beta1Content_FromAmino(object.content); } if (object.status !== undefined && object.status !== null) { - message.status = proposalStatusFromJSON(object.status); + message.status = object.status; } if (object.final_tally_result !== undefined && object.final_tally_result !== null) { message.finalTallyResult = TallyResult.fromAmino(object.final_tally_result); @@ -937,16 +937,16 @@ export const Proposal = { }, toAmino(message: Proposal, useInterfaces: boolean = false): ProposalAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; obj.content = message.content ? Cosmos_govv1beta1Content_ToAmino((message.content as Any), useInterfaces) : undefined; - obj.status = message.status; - obj.final_tally_result = message.finalTallyResult ? TallyResult.toAmino(message.finalTallyResult, useInterfaces) : TallyResult.fromPartial({}); + obj.status = message.status === 0 ? undefined : message.status; + obj.final_tally_result = message.finalTallyResult ? TallyResult.toAmino(message.finalTallyResult, useInterfaces) : TallyResult.toAmino(TallyResult.fromPartial({})); obj.submit_time = message.submitTime ? Timestamp.toAmino(toTimestamp(message.submitTime)) : new Date(); obj.deposit_end_time = message.depositEndTime ? Timestamp.toAmino(toTimestamp(message.depositEndTime)) : new Date(); if (message.totalDeposit) { obj.total_deposit = message.totalDeposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_deposit = []; + obj.total_deposit = message.totalDeposit; } obj.voting_start_time = message.votingStartTime ? Timestamp.toAmino(toTimestamp(message.votingStartTime)) : new Date(); obj.voting_end_time = message.votingEndTime ? Timestamp.toAmino(toTimestamp(message.votingEndTime)) : new Date(); @@ -1051,10 +1051,10 @@ export const TallyResult = { }, toAmino(message: TallyResult, useInterfaces: boolean = false): TallyResultAmino { const obj: any = {}; - obj.yes = message.yes; - obj.abstain = message.abstain; - obj.no = message.no; - obj.no_with_veto = message.noWithVeto; + obj.yes = message.yes === "" ? undefined : message.yes; + obj.abstain = message.abstain === "" ? undefined : message.abstain; + obj.no = message.no === "" ? undefined : message.no; + obj.no_with_veto = message.noWithVeto === "" ? undefined : message.noWithVeto; return obj; }, fromAminoMsg(object: TallyResultAminoMsg): TallyResult { @@ -1147,7 +1147,7 @@ export const Vote = { message.voter = object.voter; } if (object.option !== undefined && object.option !== null) { - message.option = voteOptionFromJSON(object.option); + message.option = object.option; } message.options = object.options?.map(e => WeightedVoteOption.fromAmino(e)) || []; return message; @@ -1155,12 +1155,12 @@ export const Vote = { toAmino(message: Vote, useInterfaces: boolean = false): VoteAmino { const obj: any = {}; obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.voter = message.voter; - obj.option = message.option; + obj.voter = message.voter === "" ? undefined : message.voter; + obj.option = message.option === 0 ? undefined : message.option; if (message.options) { obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e, useInterfaces) : undefined); } else { - obj.options = []; + obj.options = message.options; } return obj; }, @@ -1242,7 +1242,7 @@ export const DepositParams = { if (message.minDeposit) { obj.min_deposit = message.minDeposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.min_deposit = []; + obj.min_deposit = message.minDeposit; } obj.max_deposit_period = message.maxDepositPeriod ? Duration.toAmino(message.maxDepositPeriod, useInterfaces) : undefined; return obj; @@ -1404,9 +1404,9 @@ export const TallyParams = { }, toAmino(message: TallyParams, useInterfaces: boolean = false): TallyParamsAmino { const obj: any = {}; - obj.quorum = message.quorum; - obj.threshold = message.threshold; - obj.veto_threshold = message.vetoThreshold; + obj.quorum = message.quorum === "" ? undefined : message.quorum; + obj.threshold = message.threshold === "" ? undefined : message.threshold; + obj.veto_threshold = message.vetoThreshold === "" ? undefined : message.vetoThreshold; return obj; }, fromAminoMsg(object: TallyParamsAminoMsg): TallyParams { @@ -1531,7 +1531,7 @@ export const Cosmos_govv1beta1Content_InterfaceDecoder = (input: BinaryReader | return data; } }; -export const Cosmos_govv1beta1Content_FromAmino = (content: AnyAmino) => { +export const Cosmos_govv1beta1Content_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "/alliance.alliance.MsgCreateAllianceProposal": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/cosmos/gov/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/gov/v1beta1/query.ts index cf1f7fc62b..b72b411977 100644 --- a/packages/types/protobuf/codegen/cosmos/gov/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/gov/v1beta1/query.ts @@ -1,5 +1,5 @@ //@ts-nocheck -import { ProposalStatus, Proposal, ProposalAmino, ProposalSDKType, Vote, VoteAmino, VoteSDKType, VotingParams, VotingParamsAmino, VotingParamsSDKType, DepositParams, DepositParamsAmino, DepositParamsSDKType, TallyParams, TallyParamsAmino, TallyParamsSDKType, Deposit, DepositAmino, DepositSDKType, TallyResult, TallyResultAmino, TallyResultSDKType, proposalStatusFromJSON } from "./gov"; +import { ProposalStatus, Proposal, ProposalAmino, ProposalSDKType, Vote, VoteAmino, VoteSDKType, VotingParams, VotingParamsAmino, VotingParamsSDKType, DepositParams, DepositParamsAmino, DepositParamsSDKType, TallyParams, TallyParamsAmino, TallyParamsSDKType, Deposit, DepositAmino, DepositSDKType, TallyResult, TallyResultAmino, TallyResultSDKType } from "./gov"; import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; import { BinaryReader, BinaryWriter } from "../../../binary"; /** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ @@ -471,7 +471,7 @@ export const QueryProposalRequest = { }, toAmino(message: QueryProposalRequest, useInterfaces: boolean = false): QueryProposalRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryProposalRequestAminoMsg): QueryProposalRequest { @@ -540,7 +540,7 @@ export const QueryProposalResponse = { }, toAmino(message: QueryProposalResponse, useInterfaces: boolean = false): QueryProposalResponseAmino { const obj: any = {}; - obj.proposal = message.proposal ? Proposal.toAmino(message.proposal, useInterfaces) : Proposal.fromPartial({}); + obj.proposal = message.proposal ? Proposal.toAmino(message.proposal, useInterfaces) : Proposal.toAmino(Proposal.fromPartial({})); return obj; }, fromAminoMsg(object: QueryProposalResponseAminoMsg): QueryProposalResponse { @@ -627,7 +627,7 @@ export const QueryProposalsRequest = { fromAmino(object: QueryProposalsRequestAmino): QueryProposalsRequest { const message = createBaseQueryProposalsRequest(); if (object.proposal_status !== undefined && object.proposal_status !== null) { - message.proposalStatus = proposalStatusFromJSON(object.proposal_status); + message.proposalStatus = object.proposal_status; } if (object.voter !== undefined && object.voter !== null) { message.voter = object.voter; @@ -642,9 +642,9 @@ export const QueryProposalsRequest = { }, toAmino(message: QueryProposalsRequest, useInterfaces: boolean = false): QueryProposalsRequestAmino { const obj: any = {}; - obj.proposal_status = message.proposalStatus; - obj.voter = message.voter; - obj.depositor = message.depositor; + obj.proposal_status = message.proposalStatus === 0 ? undefined : message.proposalStatus; + obj.voter = message.voter === "" ? undefined : message.voter; + obj.depositor = message.depositor === "" ? undefined : message.depositor; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -726,7 +726,7 @@ export const QueryProposalsResponse = { if (message.proposals) { obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e, useInterfaces) : undefined); } else { - obj.proposals = []; + obj.proposals = message.proposals; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -808,8 +808,8 @@ export const QueryVoteRequest = { }, toAmino(message: QueryVoteRequest, useInterfaces: boolean = false): QueryVoteRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; + obj.voter = message.voter === "" ? undefined : message.voter; return obj; }, fromAminoMsg(object: QueryVoteRequestAminoMsg): QueryVoteRequest { @@ -878,7 +878,7 @@ export const QueryVoteResponse = { }, toAmino(message: QueryVoteResponse, useInterfaces: boolean = false): QueryVoteResponseAmino { const obj: any = {}; - obj.vote = message.vote ? Vote.toAmino(message.vote, useInterfaces) : Vote.fromPartial({}); + obj.vote = message.vote ? Vote.toAmino(message.vote, useInterfaces) : Vote.toAmino(Vote.fromPartial({})); return obj; }, fromAminoMsg(object: QueryVoteResponseAminoMsg): QueryVoteResponse { @@ -958,7 +958,7 @@ export const QueryVotesRequest = { }, toAmino(message: QueryVotesRequest, useInterfaces: boolean = false): QueryVotesRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1040,7 +1040,7 @@ export const QueryVotesResponse = { if (message.votes) { obj.votes = message.votes.map(e => e ? Vote.toAmino(e, useInterfaces) : undefined); } else { - obj.votes = []; + obj.votes = message.votes; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1111,7 +1111,7 @@ export const QueryParamsRequest = { }, toAmino(message: QueryParamsRequest, useInterfaces: boolean = false): QueryParamsRequestAmino { const obj: any = {}; - obj.params_type = message.paramsType; + obj.params_type = message.paramsType === "" ? undefined : message.paramsType; return obj; }, fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { @@ -1202,9 +1202,9 @@ export const QueryParamsResponse = { }, toAmino(message: QueryParamsResponse, useInterfaces: boolean = false): QueryParamsResponseAmino { const obj: any = {}; - obj.voting_params = message.votingParams ? VotingParams.toAmino(message.votingParams, useInterfaces) : VotingParams.fromPartial({}); - obj.deposit_params = message.depositParams ? DepositParams.toAmino(message.depositParams, useInterfaces) : DepositParams.fromPartial({}); - obj.tally_params = message.tallyParams ? TallyParams.toAmino(message.tallyParams, useInterfaces) : TallyParams.fromPartial({}); + obj.voting_params = message.votingParams ? VotingParams.toAmino(message.votingParams, useInterfaces) : VotingParams.toAmino(VotingParams.fromPartial({})); + obj.deposit_params = message.depositParams ? DepositParams.toAmino(message.depositParams, useInterfaces) : DepositParams.toAmino(DepositParams.fromPartial({})); + obj.tally_params = message.tallyParams ? TallyParams.toAmino(message.tallyParams, useInterfaces) : TallyParams.toAmino(TallyParams.fromPartial({})); return obj; }, fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { @@ -1284,8 +1284,8 @@ export const QueryDepositRequest = { }, toAmino(message: QueryDepositRequest, useInterfaces: boolean = false): QueryDepositRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; + obj.depositor = message.depositor === "" ? undefined : message.depositor; return obj; }, fromAminoMsg(object: QueryDepositRequestAminoMsg): QueryDepositRequest { @@ -1354,7 +1354,7 @@ export const QueryDepositResponse = { }, toAmino(message: QueryDepositResponse, useInterfaces: boolean = false): QueryDepositResponseAmino { const obj: any = {}; - obj.deposit = message.deposit ? Deposit.toAmino(message.deposit, useInterfaces) : Deposit.fromPartial({}); + obj.deposit = message.deposit ? Deposit.toAmino(message.deposit, useInterfaces) : Deposit.toAmino(Deposit.fromPartial({})); return obj; }, fromAminoMsg(object: QueryDepositResponseAminoMsg): QueryDepositResponse { @@ -1434,7 +1434,7 @@ export const QueryDepositsRequest = { }, toAmino(message: QueryDepositsRequest, useInterfaces: boolean = false): QueryDepositsRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1516,7 +1516,7 @@ export const QueryDepositsResponse = { if (message.deposits) { obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e, useInterfaces) : undefined); } else { - obj.deposits = []; + obj.deposits = message.deposits; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1587,7 +1587,7 @@ export const QueryTallyResultRequest = { }, toAmino(message: QueryTallyResultRequest, useInterfaces: boolean = false): QueryTallyResultRequestAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryTallyResultRequestAminoMsg): QueryTallyResultRequest { @@ -1656,7 +1656,7 @@ export const QueryTallyResultResponse = { }, toAmino(message: QueryTallyResultResponse, useInterfaces: boolean = false): QueryTallyResultResponseAmino { const obj: any = {}; - obj.tally = message.tally ? TallyResult.toAmino(message.tally, useInterfaces) : TallyResult.fromPartial({}); + obj.tally = message.tally ? TallyResult.toAmino(message.tally, useInterfaces) : TallyResult.toAmino(TallyResult.fromPartial({})); return obj; }, fromAminoMsg(object: QueryTallyResultResponseAminoMsg): QueryTallyResultResponse { diff --git a/packages/types/protobuf/codegen/cosmos/gov/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/gov/v1beta1/tx.ts index cced669c20..893f8e5326 100644 --- a/packages/types/protobuf/codegen/cosmos/gov/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/gov/v1beta1/tx.ts @@ -316,9 +316,9 @@ export const MsgSubmitProposal = { if (message.initialDeposit) { obj.initial_deposit = message.initialDeposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.initial_deposit = []; + obj.initial_deposit = message.initialDeposit; } - obj.proposer = message.proposer; + obj.proposer = message.proposer === "" ? undefined : message.proposer; return obj; }, fromAminoMsg(object: MsgSubmitProposalAminoMsg): MsgSubmitProposal { @@ -478,9 +478,9 @@ export const MsgVote = { }, toAmino(message: MsgVote, useInterfaces: boolean = false): MsgVoteAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - obj.option = message.option; + obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; + obj.voter = message.voter === "" ? undefined : message.voter; + obj.option = message.option === 0 ? undefined : message.option; return obj; }, fromAminoMsg(object: MsgVoteAminoMsg): MsgVote { @@ -626,11 +626,11 @@ export const MsgVoteWeighted = { toAmino(message: MsgVoteWeighted, useInterfaces: boolean = false): MsgVoteWeightedAmino { const obj: any = {}; obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.voter = message.voter; + obj.voter = message.voter === "" ? undefined : message.voter; if (message.options) { obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e, useInterfaces) : undefined); } else { - obj.options = []; + obj.options = message.options; } return obj; }, @@ -777,11 +777,11 @@ export const MsgDeposit = { toAmino(message: MsgDeposit, useInterfaces: boolean = false): MsgDepositAmino { const obj: any = {}; obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.depositor = message.depositor; + obj.depositor = message.depositor === "" ? undefined : message.depositor; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, @@ -963,7 +963,7 @@ export const Cosmos_govv1beta1Content_InterfaceDecoder = (input: BinaryReader | return data; } }; -export const Cosmos_govv1beta1Content_FromAmino = (content: AnyAmino) => { +export const Cosmos_govv1beta1Content_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "/alliance.alliance.MsgCreateAllianceProposal": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/cosmos/ics23/v1/proofs.ts b/packages/types/protobuf/codegen/cosmos/ics23/v1/proofs.ts index 9a61919eeb..d2f0bcfb17 100644 --- a/packages/types/protobuf/codegen/cosmos/ics23/v1/proofs.ts +++ b/packages/types/protobuf/codegen/cosmos/ics23/v1/proofs.ts @@ -853,7 +853,7 @@ export const ExistenceProof = { if (message.path) { obj.path = message.path.map(e => e ? InnerOp.toAmino(e, useInterfaces) : undefined); } else { - obj.path = []; + obj.path = message.path; } return obj; }, @@ -1147,16 +1147,16 @@ export const LeafOp = { fromAmino(object: LeafOpAmino): LeafOp { const message = createBaseLeafOp(); if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); + message.hash = object.hash; } if (object.prehash_key !== undefined && object.prehash_key !== null) { - message.prehashKey = hashOpFromJSON(object.prehash_key); + message.prehashKey = object.prehash_key; } if (object.prehash_value !== undefined && object.prehash_value !== null) { - message.prehashValue = hashOpFromJSON(object.prehash_value); + message.prehashValue = object.prehash_value; } if (object.length !== undefined && object.length !== null) { - message.length = lengthOpFromJSON(object.length); + message.length = object.length; } if (object.prefix !== undefined && object.prefix !== null) { message.prefix = bytesFromBase64(object.prefix); @@ -1165,10 +1165,10 @@ export const LeafOp = { }, toAmino(message: LeafOp, useInterfaces: boolean = false): LeafOpAmino { const obj: any = {}; - obj.hash = message.hash; - obj.prehash_key = message.prehashKey; - obj.prehash_value = message.prehashValue; - obj.length = message.length; + obj.hash = message.hash === 0 ? undefined : message.hash; + obj.prehash_key = message.prehashKey === 0 ? undefined : message.prehashKey; + obj.prehash_value = message.prehashValue === 0 ? undefined : message.prehashValue; + obj.length = message.length === 0 ? undefined : message.length; obj.prefix = message.prefix ? base64FromBytes(message.prefix) : undefined; return obj; }, @@ -1248,7 +1248,7 @@ export const InnerOp = { fromAmino(object: InnerOpAmino): InnerOp { const message = createBaseInnerOp(); if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); + message.hash = object.hash; } if (object.prefix !== undefined && object.prefix !== null) { message.prefix = bytesFromBase64(object.prefix); @@ -1260,7 +1260,7 @@ export const InnerOp = { }, toAmino(message: InnerOp, useInterfaces: boolean = false): InnerOpAmino { const obj: any = {}; - obj.hash = message.hash; + obj.hash = message.hash === 0 ? undefined : message.hash; obj.prefix = message.prefix ? base64FromBytes(message.prefix) : undefined; obj.suffix = message.suffix ? base64FromBytes(message.suffix) : undefined; return obj; @@ -1377,9 +1377,9 @@ export const ProofSpec = { const obj: any = {}; obj.leaf_spec = message.leafSpec ? LeafOp.toAmino(message.leafSpec, useInterfaces) : undefined; obj.inner_spec = message.innerSpec ? InnerSpec.toAmino(message.innerSpec, useInterfaces) : undefined; - obj.max_depth = message.maxDepth; - obj.min_depth = message.minDepth; - obj.prehash_key_before_comparison = message.prehashKeyBeforeComparison; + obj.max_depth = message.maxDepth === 0 ? undefined : message.maxDepth; + obj.min_depth = message.minDepth === 0 ? undefined : message.minDepth; + obj.prehash_key_before_comparison = message.prehashKeyBeforeComparison === false ? undefined : message.prehashKeyBeforeComparison; return obj; }, fromAminoMsg(object: ProofSpecAminoMsg): ProofSpec { @@ -1504,7 +1504,7 @@ export const InnerSpec = { message.emptyChild = bytesFromBase64(object.empty_child); } if (object.hash !== undefined && object.hash !== null) { - message.hash = hashOpFromJSON(object.hash); + message.hash = object.hash; } return message; }, @@ -1513,13 +1513,13 @@ export const InnerSpec = { if (message.childOrder) { obj.child_order = message.childOrder.map(e => e); } else { - obj.child_order = []; + obj.child_order = message.childOrder; } - obj.child_size = message.childSize; - obj.min_prefix_length = message.minPrefixLength; - obj.max_prefix_length = message.maxPrefixLength; + obj.child_size = message.childSize === 0 ? undefined : message.childSize; + obj.min_prefix_length = message.minPrefixLength === 0 ? undefined : message.minPrefixLength; + obj.max_prefix_length = message.maxPrefixLength === 0 ? undefined : message.maxPrefixLength; obj.empty_child = message.emptyChild ? base64FromBytes(message.emptyChild) : undefined; - obj.hash = message.hash; + obj.hash = message.hash === 0 ? undefined : message.hash; return obj; }, fromAminoMsg(object: InnerSpecAminoMsg): InnerSpec { @@ -1589,7 +1589,7 @@ export const BatchProof = { if (message.entries) { obj.entries = message.entries.map(e => e ? BatchEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.entries = []; + obj.entries = message.entries; } return obj; }, @@ -1750,12 +1750,12 @@ export const CompressedBatchProof = { if (message.entries) { obj.entries = message.entries.map(e => e ? CompressedBatchEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.entries = []; + obj.entries = message.entries; } if (message.lookupInners) { obj.lookup_inners = message.lookupInners.map(e => e ? InnerOp.toAmino(e, useInterfaces) : undefined); } else { - obj.lookup_inners = []; + obj.lookup_inners = message.lookupInners; } return obj; }, @@ -1952,7 +1952,7 @@ export const CompressedExistenceProof = { if (message.path) { obj.path = message.path.map(e => e); } else { - obj.path = []; + obj.path = message.path; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/mint/v1beta1/genesis.ts b/packages/types/protobuf/codegen/cosmos/mint/v1beta1/genesis.ts index 5af5e51415..0460bceb2e 100644 --- a/packages/types/protobuf/codegen/cosmos/mint/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmos/mint/v1beta1/genesis.ts @@ -83,8 +83,8 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.minter = message.minter ? Minter.toAmino(message.minter, useInterfaces) : Minter.fromPartial({}); - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.minter = message.minter ? Minter.toAmino(message.minter, useInterfaces) : Minter.toAmino(Minter.fromPartial({})); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { diff --git a/packages/types/protobuf/codegen/cosmos/mint/v1beta1/mint.ts b/packages/types/protobuf/codegen/cosmos/mint/v1beta1/mint.ts index 464e5ffc07..247a8e5d0c 100644 --- a/packages/types/protobuf/codegen/cosmos/mint/v1beta1/mint.ts +++ b/packages/types/protobuf/codegen/cosmos/mint/v1beta1/mint.ts @@ -129,8 +129,8 @@ export const Minter = { }, toAmino(message: Minter, useInterfaces: boolean = false): MinterAmino { const obj: any = {}; - obj.inflation = message.inflation; - obj.annual_provisions = message.annualProvisions; + obj.inflation = message.inflation === "" ? undefined : message.inflation; + obj.annual_provisions = message.annualProvisions === "" ? undefined : message.annualProvisions; return obj; }, fromAminoMsg(object: MinterAminoMsg): Minter { @@ -254,12 +254,12 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.mint_denom = message.mintDenom; + obj.mint_denom = message.mintDenom === "" ? undefined : message.mintDenom; obj.inflation_rate_change = message.inflationRateChange ?? ""; obj.inflation_max = message.inflationMax ?? ""; obj.inflation_min = message.inflationMin ?? ""; obj.goal_bonded = message.goalBonded ?? ""; - obj.blocks_per_year = message.blocksPerYear ? message.blocksPerYear.toString() : undefined; + obj.blocks_per_year = message.blocksPerYear !== BigInt(0) ? message.blocksPerYear.toString() : undefined; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/cosmos/mint/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/mint/v1beta1/query.ts index 127b87c2df..51370b8d4f 100644 --- a/packages/types/protobuf/codegen/cosmos/mint/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/mint/v1beta1/query.ts @@ -237,7 +237,7 @@ export const QueryParamsResponse = { }, toAmino(message: QueryParamsResponse, useInterfaces: boolean = false): QueryParamsResponseAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { diff --git a/packages/types/protobuf/codegen/cosmos/mint/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/mint/v1beta1/tx.ts index 6556869810..ed32b85431 100644 --- a/packages/types/protobuf/codegen/cosmos/mint/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/mint/v1beta1/tx.ts @@ -132,8 +132,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/cosmos/orm/v1/orm.ts b/packages/types/protobuf/codegen/cosmos/orm/v1/orm.ts index 4dfa6a8825..5860cad190 100644 --- a/packages/types/protobuf/codegen/cosmos/orm/v1/orm.ts +++ b/packages/types/protobuf/codegen/cosmos/orm/v1/orm.ts @@ -300,9 +300,9 @@ export const TableDescriptor = { if (message.index) { obj.index = message.index.map(e => e ? SecondaryIndexDescriptor.toAmino(e, useInterfaces) : undefined); } else { - obj.index = []; + obj.index = message.index; } - obj.id = message.id; + obj.id = message.id === 0 ? undefined : message.id; return obj; }, fromAminoMsg(object: TableDescriptorAminoMsg): TableDescriptor { @@ -382,8 +382,8 @@ export const PrimaryKeyDescriptor = { }, toAmino(message: PrimaryKeyDescriptor, useInterfaces: boolean = false): PrimaryKeyDescriptorAmino { const obj: any = {}; - obj.fields = message.fields; - obj.auto_increment = message.autoIncrement; + obj.fields = message.fields === "" ? undefined : message.fields; + obj.auto_increment = message.autoIncrement === false ? undefined : message.autoIncrement; return obj; }, fromAminoMsg(object: PrimaryKeyDescriptorAminoMsg): PrimaryKeyDescriptor { @@ -474,9 +474,9 @@ export const SecondaryIndexDescriptor = { }, toAmino(message: SecondaryIndexDescriptor, useInterfaces: boolean = false): SecondaryIndexDescriptorAmino { const obj: any = {}; - obj.fields = message.fields; - obj.id = message.id; - obj.unique = message.unique; + obj.fields = message.fields === "" ? undefined : message.fields; + obj.id = message.id === 0 ? undefined : message.id; + obj.unique = message.unique === false ? undefined : message.unique; return obj; }, fromAminoMsg(object: SecondaryIndexDescriptorAminoMsg): SecondaryIndexDescriptor { @@ -545,7 +545,7 @@ export const SingletonDescriptor = { }, toAmino(message: SingletonDescriptor, useInterfaces: boolean = false): SingletonDescriptorAmino { const obj: any = {}; - obj.id = message.id; + obj.id = message.id === 0 ? undefined : message.id; return obj; }, fromAminoMsg(object: SingletonDescriptorAminoMsg): SingletonDescriptor { diff --git a/packages/types/protobuf/codegen/cosmos/params/v1beta1/params.ts b/packages/types/protobuf/codegen/cosmos/params/v1beta1/params.ts index f7b35bdd27..26e71c5463 100644 --- a/packages/types/protobuf/codegen/cosmos/params/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/cosmos/params/v1beta1/params.ts @@ -127,12 +127,12 @@ export const ParameterChangeProposal = { }, toAmino(message: ParameterChangeProposal, useInterfaces: boolean = false): ParameterChangeProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.changes) { obj.changes = message.changes.map(e => e ? ParamChange.toAmino(e, useInterfaces) : undefined); } else { - obj.changes = []; + obj.changes = message.changes; } return obj; }, @@ -224,9 +224,9 @@ export const ParamChange = { }, toAmino(message: ParamChange, useInterfaces: boolean = false): ParamChangeAmino { const obj: any = {}; - obj.subspace = message.subspace; - obj.key = message.key; - obj.value = message.value; + obj.subspace = message.subspace === "" ? undefined : message.subspace; + obj.key = message.key === "" ? undefined : message.key; + obj.value = message.value === "" ? undefined : message.value; return obj; }, fromAminoMsg(object: ParamChangeAminoMsg): ParamChange { diff --git a/packages/types/protobuf/codegen/cosmos/params/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/params/v1beta1/query.ts index 0094ae2a8a..856327c543 100644 --- a/packages/types/protobuf/codegen/cosmos/params/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/params/v1beta1/query.ts @@ -207,8 +207,8 @@ export const QueryParamsRequest = { }, toAmino(message: QueryParamsRequest, useInterfaces: boolean = false): QueryParamsRequestAmino { const obj: any = {}; - obj.subspace = message.subspace; - obj.key = message.key; + obj.subspace = message.subspace === "" ? undefined : message.subspace; + obj.key = message.key === "" ? undefined : message.key; return obj; }, fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { @@ -277,7 +277,7 @@ export const QueryParamsResponse = { }, toAmino(message: QueryParamsResponse, useInterfaces: boolean = false): QueryParamsResponseAmino { const obj: any = {}; - obj.param = message.param ? ParamChange.toAmino(message.param, useInterfaces) : ParamChange.fromPartial({}); + obj.param = message.param ? ParamChange.toAmino(message.param, useInterfaces) : ParamChange.toAmino(ParamChange.fromPartial({})); return obj; }, fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { @@ -403,7 +403,7 @@ export const QuerySubspacesResponse = { if (message.subspaces) { obj.subspaces = message.subspaces.map(e => e ? Subspace.toAmino(e, useInterfaces) : undefined); } else { - obj.subspaces = []; + obj.subspaces = message.subspaces; } return obj; }, @@ -482,11 +482,11 @@ export const Subspace = { }, toAmino(message: Subspace, useInterfaces: boolean = false): SubspaceAmino { const obj: any = {}; - obj.subspace = message.subspace; + obj.subspace = message.subspace === "" ? undefined : message.subspace; if (message.keys) { obj.keys = message.keys.map(e => e); } else { - obj.keys = []; + obj.keys = message.keys; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/genesis.ts b/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/genesis.ts index c75285de12..c5e9042b3a 100644 --- a/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/genesis.ts @@ -197,16 +197,16 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); if (message.signingInfos) { obj.signing_infos = message.signingInfos.map(e => e ? SigningInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.signing_infos = []; + obj.signing_infos = message.signingInfos; } if (message.missedBlocks) { obj.missed_blocks = message.missedBlocks.map(e => e ? ValidatorMissedBlocks.toAmino(e, useInterfaces) : undefined); } else { - obj.missed_blocks = []; + obj.missed_blocks = message.missedBlocks; } return obj; }, @@ -287,8 +287,8 @@ export const SigningInfo = { }, toAmino(message: SigningInfo, useInterfaces: boolean = false): SigningInfoAmino { const obj: any = {}; - obj.address = message.address; - obj.validator_signing_info = message.validatorSigningInfo ? ValidatorSigningInfo.toAmino(message.validatorSigningInfo, useInterfaces) : ValidatorSigningInfo.fromPartial({}); + obj.address = message.address === "" ? undefined : message.address; + obj.validator_signing_info = message.validatorSigningInfo ? ValidatorSigningInfo.toAmino(message.validatorSigningInfo, useInterfaces) : ValidatorSigningInfo.toAmino(ValidatorSigningInfo.fromPartial({})); return obj; }, fromAminoMsg(object: SigningInfoAminoMsg): SigningInfo { @@ -366,11 +366,11 @@ export const ValidatorMissedBlocks = { }, toAmino(message: ValidatorMissedBlocks, useInterfaces: boolean = false): ValidatorMissedBlocksAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; if (message.missedBlocks) { obj.missed_blocks = message.missedBlocks.map(e => e ? MissedBlock.toAmino(e, useInterfaces) : undefined); } else { - obj.missed_blocks = []; + obj.missed_blocks = message.missedBlocks; } return obj; }, @@ -451,8 +451,8 @@ export const MissedBlock = { }, toAmino(message: MissedBlock, useInterfaces: boolean = false): MissedBlockAmino { const obj: any = {}; - obj.index = message.index ? message.index.toString() : undefined; - obj.missed = message.missed; + obj.index = message.index !== BigInt(0) ? message.index.toString() : undefined; + obj.missed = message.missed === false ? undefined : message.missed; return obj; }, fromAminoMsg(object: MissedBlockAminoMsg): MissedBlock { diff --git a/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/query.ts index de1769f5ee..92664a55a9 100644 --- a/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/query.ts @@ -261,7 +261,7 @@ export const QueryParamsResponse = { }, toAmino(message: QueryParamsResponse, useInterfaces: boolean = false): QueryParamsResponseAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { @@ -330,7 +330,7 @@ export const QuerySigningInfoRequest = { }, toAmino(message: QuerySigningInfoRequest, useInterfaces: boolean = false): QuerySigningInfoRequestAmino { const obj: any = {}; - obj.cons_address = message.consAddress; + obj.cons_address = message.consAddress === "" ? undefined : message.consAddress; return obj; }, fromAminoMsg(object: QuerySigningInfoRequestAminoMsg): QuerySigningInfoRequest { @@ -399,7 +399,7 @@ export const QuerySigningInfoResponse = { }, toAmino(message: QuerySigningInfoResponse, useInterfaces: boolean = false): QuerySigningInfoResponseAmino { const obj: any = {}; - obj.val_signing_info = message.valSigningInfo ? ValidatorSigningInfo.toAmino(message.valSigningInfo, useInterfaces) : ValidatorSigningInfo.fromPartial({}); + obj.val_signing_info = message.valSigningInfo ? ValidatorSigningInfo.toAmino(message.valSigningInfo, useInterfaces) : ValidatorSigningInfo.toAmino(ValidatorSigningInfo.fromPartial({})); return obj; }, fromAminoMsg(object: QuerySigningInfoResponseAminoMsg): QuerySigningInfoResponse { @@ -549,7 +549,7 @@ export const QuerySigningInfosResponse = { if (message.info) { obj.info = message.info.map(e => e ? ValidatorSigningInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.info = []; + obj.info = message.info; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/slashing.ts b/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/slashing.ts index 1d505e8aed..318287d4db 100644 --- a/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/slashing.ts +++ b/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/slashing.ts @@ -209,12 +209,12 @@ export const ValidatorSigningInfo = { }, toAmino(message: ValidatorSigningInfo, useInterfaces: boolean = false): ValidatorSigningInfoAmino { const obj: any = {}; - obj.address = message.address; - obj.start_height = message.startHeight ? message.startHeight.toString() : undefined; - obj.index_offset = message.indexOffset ? message.indexOffset.toString() : undefined; + obj.address = message.address === "" ? undefined : message.address; + obj.start_height = message.startHeight !== BigInt(0) ? message.startHeight.toString() : undefined; + obj.index_offset = message.indexOffset !== BigInt(0) ? message.indexOffset.toString() : undefined; obj.jailed_until = message.jailedUntil ? Timestamp.toAmino(toTimestamp(message.jailedUntil)) : new Date(); - obj.tombstoned = message.tombstoned; - obj.missed_blocks_counter = message.missedBlocksCounter ? message.missedBlocksCounter.toString() : undefined; + obj.tombstoned = message.tombstoned === false ? undefined : message.tombstoned; + obj.missed_blocks_counter = message.missedBlocksCounter !== BigInt(0) ? message.missedBlocksCounter.toString() : undefined; return obj; }, fromAminoMsg(object: ValidatorSigningInfoAminoMsg): ValidatorSigningInfo { @@ -327,9 +327,9 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.signed_blocks_window = message.signedBlocksWindow ? message.signedBlocksWindow.toString() : undefined; + obj.signed_blocks_window = message.signedBlocksWindow !== BigInt(0) ? message.signedBlocksWindow.toString() : undefined; obj.min_signed_per_window = message.minSignedPerWindow ? base64FromBytes(message.minSignedPerWindow) : ""; - obj.downtime_jail_duration = message.downtimeJailDuration ? Duration.toAmino(message.downtimeJailDuration, useInterfaces) : Duration.fromPartial({}); + obj.downtime_jail_duration = message.downtimeJailDuration ? Duration.toAmino(message.downtimeJailDuration, useInterfaces) : Duration.toAmino(Duration.fromPartial({})); obj.slash_fraction_double_sign = message.slashFractionDoubleSign ? base64FromBytes(message.slashFractionDoubleSign) : ""; obj.slash_fraction_downtime = message.slashFractionDowntime ? base64FromBytes(message.slashFractionDowntime) : ""; return obj; diff --git a/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/tx.ts index 85d06b6d3c..c1e0c8e572 100644 --- a/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/slashing/v1beta1/tx.ts @@ -291,8 +291,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/cosmos/staking/v1beta1/authz.ts b/packages/types/protobuf/codegen/cosmos/staking/v1beta1/authz.ts index dfafe3fc28..de907a3477 100644 --- a/packages/types/protobuf/codegen/cosmos/staking/v1beta1/authz.ts +++ b/packages/types/protobuf/codegen/cosmos/staking/v1beta1/authz.ts @@ -216,7 +216,7 @@ export const StakeAuthorization = { message.denyList = StakeAuthorization_Validators.fromAmino(object.deny_list); } if (object.authorization_type !== undefined && object.authorization_type !== null) { - message.authorizationType = authorizationTypeFromJSON(object.authorization_type); + message.authorizationType = object.authorization_type; } return message; }, @@ -225,7 +225,7 @@ export const StakeAuthorization = { obj.max_tokens = message.maxTokens ? Coin.toAmino(message.maxTokens, useInterfaces) : undefined; obj.allow_list = message.allowList ? StakeAuthorization_Validators.toAmino(message.allowList, useInterfaces) : undefined; obj.deny_list = message.denyList ? StakeAuthorization_Validators.toAmino(message.denyList, useInterfaces) : undefined; - obj.authorization_type = message.authorizationType; + obj.authorization_type = message.authorizationType === 0 ? undefined : message.authorizationType; return obj; }, fromAminoMsg(object: StakeAuthorizationAminoMsg): StakeAuthorization { @@ -295,7 +295,7 @@ export const StakeAuthorization_Validators = { if (message.address) { obj.address = message.address.map(e => e); } else { - obj.address = []; + obj.address = message.address; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/staking/v1beta1/genesis.ts b/packages/types/protobuf/codegen/cosmos/staking/v1beta1/genesis.ts index ac17db0a25..aa3116276e 100644 --- a/packages/types/protobuf/codegen/cosmos/staking/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmos/staking/v1beta1/genesis.ts @@ -209,34 +209,34 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); obj.last_total_power = message.lastTotalPower ? base64FromBytes(message.lastTotalPower) : ""; if (message.lastValidatorPowers) { obj.last_validator_powers = message.lastValidatorPowers.map(e => e ? LastValidatorPower.toAmino(e, useInterfaces) : undefined); } else { - obj.last_validator_powers = []; + obj.last_validator_powers = message.lastValidatorPowers; } if (message.validators) { obj.validators = message.validators.map(e => e ? Validator.toAmino(e, useInterfaces) : undefined); } else { - obj.validators = []; + obj.validators = message.validators; } if (message.delegations) { obj.delegations = message.delegations.map(e => e ? Delegation.toAmino(e, useInterfaces) : undefined); } else { - obj.delegations = []; + obj.delegations = message.delegations; } if (message.unbondingDelegations) { obj.unbonding_delegations = message.unbondingDelegations.map(e => e ? UnbondingDelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.unbonding_delegations = []; + obj.unbonding_delegations = message.unbondingDelegations; } if (message.redelegations) { obj.redelegations = message.redelegations.map(e => e ? Redelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.redelegations = []; + obj.redelegations = message.redelegations; } - obj.exported = message.exported; + obj.exported = message.exported === false ? undefined : message.exported; return obj; }, fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { @@ -316,8 +316,8 @@ export const LastValidatorPower = { }, toAmino(message: LastValidatorPower, useInterfaces: boolean = false): LastValidatorPowerAmino { const obj: any = {}; - obj.address = message.address; - obj.power = message.power ? message.power.toString() : undefined; + obj.address = message.address === "" ? undefined : message.address; + obj.power = message.power !== BigInt(0) ? message.power.toString() : undefined; return obj; }, fromAminoMsg(object: LastValidatorPowerAminoMsg): LastValidatorPower { diff --git a/packages/types/protobuf/codegen/cosmos/staking/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/staking/v1beta1/query.ts index f26671458e..4d5568bf1f 100644 --- a/packages/types/protobuf/codegen/cosmos/staking/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/staking/v1beta1/query.ts @@ -906,7 +906,7 @@ export const QueryValidatorsRequest = { }, toAmino(message: QueryValidatorsRequest, useInterfaces: boolean = false): QueryValidatorsRequestAmino { const obj: any = {}; - obj.status = message.status; + obj.status = message.status === "" ? undefined : message.status; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -988,7 +988,7 @@ export const QueryValidatorsResponse = { if (message.validators) { obj.validators = message.validators.map(e => e ? Validator.toAmino(e, useInterfaces) : undefined); } else { - obj.validators = []; + obj.validators = message.validators; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1059,7 +1059,7 @@ export const QueryValidatorRequest = { }, toAmino(message: QueryValidatorRequest, useInterfaces: boolean = false): QueryValidatorRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryValidatorRequestAminoMsg): QueryValidatorRequest { @@ -1128,7 +1128,7 @@ export const QueryValidatorResponse = { }, toAmino(message: QueryValidatorResponse, useInterfaces: boolean = false): QueryValidatorResponseAmino { const obj: any = {}; - obj.validator = message.validator ? Validator.toAmino(message.validator, useInterfaces) : Validator.fromPartial({}); + obj.validator = message.validator ? Validator.toAmino(message.validator, useInterfaces) : Validator.toAmino(Validator.fromPartial({})); return obj; }, fromAminoMsg(object: QueryValidatorResponseAminoMsg): QueryValidatorResponse { @@ -1208,7 +1208,7 @@ export const QueryValidatorDelegationsRequest = { }, toAmino(message: QueryValidatorDelegationsRequest, useInterfaces: boolean = false): QueryValidatorDelegationsRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1290,7 +1290,7 @@ export const QueryValidatorDelegationsResponse = { if (message.delegationResponses) { obj.delegation_responses = message.delegationResponses.map(e => e ? DelegationResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.delegation_responses = []; + obj.delegation_responses = message.delegationResponses; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1372,7 +1372,7 @@ export const QueryValidatorUnbondingDelegationsRequest = { }, toAmino(message: QueryValidatorUnbondingDelegationsRequest, useInterfaces: boolean = false): QueryValidatorUnbondingDelegationsRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1454,7 +1454,7 @@ export const QueryValidatorUnbondingDelegationsResponse = { if (message.unbondingResponses) { obj.unbonding_responses = message.unbondingResponses.map(e => e ? UnbondingDelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.unbonding_responses = []; + obj.unbonding_responses = message.unbondingResponses; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1536,8 +1536,8 @@ export const QueryDelegationRequest = { }, toAmino(message: QueryDelegationRequest, useInterfaces: boolean = false): QueryDelegationRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryDelegationRequestAminoMsg): QueryDelegationRequest { @@ -1686,8 +1686,8 @@ export const QueryUnbondingDelegationRequest = { }, toAmino(message: QueryUnbondingDelegationRequest, useInterfaces: boolean = false): QueryUnbondingDelegationRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryUnbondingDelegationRequestAminoMsg): QueryUnbondingDelegationRequest { @@ -1756,7 +1756,7 @@ export const QueryUnbondingDelegationResponse = { }, toAmino(message: QueryUnbondingDelegationResponse, useInterfaces: boolean = false): QueryUnbondingDelegationResponseAmino { const obj: any = {}; - obj.unbond = message.unbond ? UnbondingDelegation.toAmino(message.unbond, useInterfaces) : UnbondingDelegation.fromPartial({}); + obj.unbond = message.unbond ? UnbondingDelegation.toAmino(message.unbond, useInterfaces) : UnbondingDelegation.toAmino(UnbondingDelegation.fromPartial({})); return obj; }, fromAminoMsg(object: QueryUnbondingDelegationResponseAminoMsg): QueryUnbondingDelegationResponse { @@ -1836,7 +1836,7 @@ export const QueryDelegatorDelegationsRequest = { }, toAmino(message: QueryDelegatorDelegationsRequest, useInterfaces: boolean = false): QueryDelegatorDelegationsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1918,7 +1918,7 @@ export const QueryDelegatorDelegationsResponse = { if (message.delegationResponses) { obj.delegation_responses = message.delegationResponses.map(e => e ? DelegationResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.delegation_responses = []; + obj.delegation_responses = message.delegationResponses; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2000,7 +2000,7 @@ export const QueryDelegatorUnbondingDelegationsRequest = { }, toAmino(message: QueryDelegatorUnbondingDelegationsRequest, useInterfaces: boolean = false): QueryDelegatorUnbondingDelegationsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2082,7 +2082,7 @@ export const QueryDelegatorUnbondingDelegationsResponse = { if (message.unbondingResponses) { obj.unbonding_responses = message.unbondingResponses.map(e => e ? UnbondingDelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.unbonding_responses = []; + obj.unbonding_responses = message.unbondingResponses; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2186,9 +2186,9 @@ export const QueryRedelegationsRequest = { }, toAmino(message: QueryRedelegationsRequest, useInterfaces: boolean = false): QueryRedelegationsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.src_validator_addr = message.srcValidatorAddr; - obj.dst_validator_addr = message.dstValidatorAddr; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.src_validator_addr = message.srcValidatorAddr === "" ? undefined : message.srcValidatorAddr; + obj.dst_validator_addr = message.dstValidatorAddr === "" ? undefined : message.dstValidatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2270,7 +2270,7 @@ export const QueryRedelegationsResponse = { if (message.redelegationResponses) { obj.redelegation_responses = message.redelegationResponses.map(e => e ? RedelegationResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.redelegation_responses = []; + obj.redelegation_responses = message.redelegationResponses; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2352,7 +2352,7 @@ export const QueryDelegatorValidatorsRequest = { }, toAmino(message: QueryDelegatorValidatorsRequest, useInterfaces: boolean = false): QueryDelegatorValidatorsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2434,7 +2434,7 @@ export const QueryDelegatorValidatorsResponse = { if (message.validators) { obj.validators = message.validators.map(e => e ? Validator.toAmino(e, useInterfaces) : undefined); } else { - obj.validators = []; + obj.validators = message.validators; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2516,8 +2516,8 @@ export const QueryDelegatorValidatorRequest = { }, toAmino(message: QueryDelegatorValidatorRequest, useInterfaces: boolean = false): QueryDelegatorValidatorRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; + obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryDelegatorValidatorRequestAminoMsg): QueryDelegatorValidatorRequest { @@ -2586,7 +2586,7 @@ export const QueryDelegatorValidatorResponse = { }, toAmino(message: QueryDelegatorValidatorResponse, useInterfaces: boolean = false): QueryDelegatorValidatorResponseAmino { const obj: any = {}; - obj.validator = message.validator ? Validator.toAmino(message.validator, useInterfaces) : Validator.fromPartial({}); + obj.validator = message.validator ? Validator.toAmino(message.validator, useInterfaces) : Validator.toAmino(Validator.fromPartial({})); return obj; }, fromAminoMsg(object: QueryDelegatorValidatorResponseAminoMsg): QueryDelegatorValidatorResponse { @@ -2655,7 +2655,7 @@ export const QueryHistoricalInfoRequest = { }, toAmino(message: QueryHistoricalInfoRequest, useInterfaces: boolean = false): QueryHistoricalInfoRequestAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; return obj; }, fromAminoMsg(object: QueryHistoricalInfoRequestAminoMsg): QueryHistoricalInfoRequest { @@ -2849,7 +2849,7 @@ export const QueryPoolResponse = { }, toAmino(message: QueryPoolResponse, useInterfaces: boolean = false): QueryPoolResponseAmino { const obj: any = {}; - obj.pool = message.pool ? Pool.toAmino(message.pool, useInterfaces) : Pool.fromPartial({}); + obj.pool = message.pool ? Pool.toAmino(message.pool, useInterfaces) : Pool.toAmino(Pool.fromPartial({})); return obj; }, fromAminoMsg(object: QueryPoolResponseAminoMsg): QueryPoolResponse { @@ -2974,7 +2974,7 @@ export const QueryParamsResponse = { }, toAmino(message: QueryParamsResponse, useInterfaces: boolean = false): QueryParamsResponseAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { diff --git a/packages/types/protobuf/codegen/cosmos/staking/v1beta1/staking.ts b/packages/types/protobuf/codegen/cosmos/staking/v1beta1/staking.ts index 0850a73436..509cff326f 100644 --- a/packages/types/protobuf/codegen/cosmos/staking/v1beta1/staking.ts +++ b/packages/types/protobuf/codegen/cosmos/staking/v1beta1/staking.ts @@ -992,11 +992,11 @@ export const HistoricalInfo = { }, toAmino(message: HistoricalInfo, useInterfaces: boolean = false): HistoricalInfoAmino { const obj: any = {}; - obj.header = message.header ? Header.toAmino(message.header, useInterfaces) : Header.fromPartial({}); + obj.header = message.header ? Header.toAmino(message.header, useInterfaces) : Header.toAmino(Header.fromPartial({})); if (message.valset) { obj.valset = message.valset.map(e => e ? Validator.toAmino(e, useInterfaces) : undefined); } else { - obj.valset = []; + obj.valset = message.valset; } return obj; }, @@ -1170,7 +1170,7 @@ export const Commission = { }, toAmino(message: Commission, useInterfaces: boolean = false): CommissionAmino { const obj: any = {}; - obj.commission_rates = message.commissionRates ? CommissionRates.toAmino(message.commissionRates, useInterfaces) : CommissionRates.fromPartial({}); + obj.commission_rates = message.commissionRates ? CommissionRates.toAmino(message.commissionRates, useInterfaces) : CommissionRates.toAmino(CommissionRates.fromPartial({})); obj.update_time = message.updateTime ? Timestamp.toAmino(toTimestamp(message.updateTime)) : new Date(); return obj; }, @@ -1284,11 +1284,11 @@ export const Description = { }, toAmino(message: Description, useInterfaces: boolean = false): DescriptionAmino { const obj: any = {}; - obj.moniker = message.moniker; - obj.identity = message.identity; - obj.website = message.website; - obj.security_contact = message.securityContact; - obj.details = message.details; + obj.moniker = message.moniker === "" ? undefined : message.moniker; + obj.identity = message.identity === "" ? undefined : message.identity; + obj.website = message.website === "" ? undefined : message.website; + obj.security_contact = message.securityContact === "" ? undefined : message.securityContact; + obj.details = message.details === "" ? undefined : message.details; return obj; }, fromAminoMsg(object: DescriptionAminoMsg): Description { @@ -1465,7 +1465,7 @@ export const Validator = { message.jailed = object.jailed; } if (object.status !== undefined && object.status !== null) { - message.status = bondStatusFromJSON(object.status); + message.status = object.status; } if (object.tokens !== undefined && object.tokens !== null) { message.tokens = object.tokens; @@ -1496,22 +1496,22 @@ export const Validator = { }, toAmino(message: Validator, useInterfaces: boolean = false): ValidatorAmino { const obj: any = {}; - obj.operator_address = message.operatorAddress; + obj.operator_address = message.operatorAddress === "" ? undefined : message.operatorAddress; obj.consensus_pubkey = message.consensusPubkey ? decodePubkey(message.consensusPubkey) : undefined; - obj.jailed = message.jailed; - obj.status = message.status; - obj.tokens = message.tokens; - obj.delegator_shares = message.delegatorShares; - obj.description = message.description ? Description.toAmino(message.description, useInterfaces) : Description.fromPartial({}); - obj.unbonding_height = message.unbondingHeight ? message.unbondingHeight.toString() : undefined; + obj.jailed = message.jailed === false ? undefined : message.jailed; + obj.status = message.status === 0 ? undefined : message.status; + obj.tokens = message.tokens === "" ? undefined : message.tokens; + obj.delegator_shares = message.delegatorShares === "" ? undefined : message.delegatorShares; + obj.description = message.description ? Description.toAmino(message.description, useInterfaces) : Description.toAmino(Description.fromPartial({})); + obj.unbonding_height = message.unbondingHeight !== BigInt(0) ? message.unbondingHeight.toString() : undefined; obj.unbonding_time = message.unbondingTime ? Timestamp.toAmino(toTimestamp(message.unbondingTime)) : new Date(); - obj.commission = message.commission ? Commission.toAmino(message.commission, useInterfaces) : Commission.fromPartial({}); - obj.min_self_delegation = message.minSelfDelegation; - obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount ? message.unbondingOnHoldRefCount.toString() : undefined; + obj.commission = message.commission ? Commission.toAmino(message.commission, useInterfaces) : Commission.toAmino(Commission.fromPartial({})); + obj.min_self_delegation = message.minSelfDelegation === "" ? undefined : message.minSelfDelegation; + obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount !== BigInt(0) ? message.unbondingOnHoldRefCount.toString() : undefined; if (message.unbondingIds) { obj.unbonding_ids = message.unbondingIds.map(e => e.toString()); } else { - obj.unbonding_ids = []; + obj.unbonding_ids = message.unbondingIds; } return obj; }, @@ -1582,7 +1582,7 @@ export const ValAddresses = { if (message.addresses) { obj.addresses = message.addresses.map(e => e); } else { - obj.addresses = []; + obj.addresses = message.addresses; } return obj; }, @@ -1663,8 +1663,8 @@ export const DVPair = { }, toAmino(message: DVPair, useInterfaces: boolean = false): DVPairAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: DVPairAminoMsg): DVPair { @@ -1734,7 +1734,7 @@ export const DVPairs = { if (message.pairs) { obj.pairs = message.pairs.map(e => e ? DVPair.toAmino(e, useInterfaces) : undefined); } else { - obj.pairs = []; + obj.pairs = message.pairs; } return obj; }, @@ -1826,9 +1826,9 @@ export const DVVTriplet = { }, toAmino(message: DVVTriplet, useInterfaces: boolean = false): DVVTripletAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_src_address = message.validatorSrcAddress === "" ? undefined : message.validatorSrcAddress; + obj.validator_dst_address = message.validatorDstAddress === "" ? undefined : message.validatorDstAddress; return obj; }, fromAminoMsg(object: DVVTripletAminoMsg): DVVTriplet { @@ -1898,7 +1898,7 @@ export const DVVTriplets = { if (message.triplets) { obj.triplets = message.triplets.map(e => e ? DVVTriplet.toAmino(e, useInterfaces) : undefined); } else { - obj.triplets = []; + obj.triplets = message.triplets; } return obj; }, @@ -1990,9 +1990,9 @@ export const Delegation = { }, toAmino(message: Delegation, useInterfaces: boolean = false): DelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.shares = message.shares; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.shares = message.shares === "" ? undefined : message.shares; return obj; }, fromAminoMsg(object: DelegationAminoMsg): Delegation { @@ -2081,12 +2081,12 @@ export const UnbondingDelegation = { }, toAmino(message: UnbondingDelegation, useInterfaces: boolean = false): UnbondingDelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; if (message.entries) { obj.entries = message.entries.map(e => e ? UnbondingDelegationEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.entries = []; + obj.entries = message.entries; } return obj; }, @@ -2211,12 +2211,12 @@ export const UnbondingDelegationEntry = { }, toAmino(message: UnbondingDelegationEntry, useInterfaces: boolean = false): UnbondingDelegationEntryAmino { const obj: any = {}; - obj.creation_height = message.creationHeight ? message.creationHeight.toString() : undefined; + obj.creation_height = message.creationHeight !== BigInt(0) ? message.creationHeight.toString() : undefined; obj.completion_time = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : new Date(); - obj.initial_balance = message.initialBalance; - obj.balance = message.balance; - obj.unbonding_id = message.unbondingId ? message.unbondingId.toString() : undefined; - obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount ? message.unbondingOnHoldRefCount.toString() : undefined; + obj.initial_balance = message.initialBalance === "" ? undefined : message.initialBalance; + obj.balance = message.balance === "" ? undefined : message.balance; + obj.unbonding_id = message.unbondingId !== BigInt(0) ? message.unbondingId.toString() : undefined; + obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount !== BigInt(0) ? message.unbondingOnHoldRefCount.toString() : undefined; return obj; }, fromAminoMsg(object: UnbondingDelegationEntryAminoMsg): UnbondingDelegationEntry { @@ -2340,12 +2340,12 @@ export const RedelegationEntry = { }, toAmino(message: RedelegationEntry, useInterfaces: boolean = false): RedelegationEntryAmino { const obj: any = {}; - obj.creation_height = message.creationHeight ? message.creationHeight.toString() : undefined; + obj.creation_height = message.creationHeight !== BigInt(0) ? message.creationHeight.toString() : undefined; obj.completion_time = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : new Date(); - obj.initial_balance = message.initialBalance; - obj.shares_dst = message.sharesDst; - obj.unbonding_id = message.unbondingId ? message.unbondingId.toString() : undefined; - obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount ? message.unbondingOnHoldRefCount.toString() : undefined; + obj.initial_balance = message.initialBalance === "" ? undefined : message.initialBalance; + obj.shares_dst = message.sharesDst === "" ? undefined : message.sharesDst; + obj.unbonding_id = message.unbondingId !== BigInt(0) ? message.unbondingId.toString() : undefined; + obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount !== BigInt(0) ? message.unbondingOnHoldRefCount.toString() : undefined; return obj; }, fromAminoMsg(object: RedelegationEntryAminoMsg): RedelegationEntry { @@ -2445,13 +2445,13 @@ export const Redelegation = { }, toAmino(message: Redelegation, useInterfaces: boolean = false): RedelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_src_address = message.validatorSrcAddress === "" ? undefined : message.validatorSrcAddress; + obj.validator_dst_address = message.validatorDstAddress === "" ? undefined : message.validatorDstAddress; if (message.entries) { obj.entries = message.entries.map(e => e ? RedelegationEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.entries = []; + obj.entries = message.entries; } return obj; }, @@ -2576,11 +2576,11 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.unbonding_time = message.unbondingTime ? Duration.toAmino(message.unbondingTime, useInterfaces) : Duration.fromPartial({}); - obj.max_validators = message.maxValidators; - obj.max_entries = message.maxEntries; - obj.historical_entries = message.historicalEntries; - obj.bond_denom = message.bondDenom; + obj.unbonding_time = message.unbondingTime ? Duration.toAmino(message.unbondingTime, useInterfaces) : Duration.toAmino(Duration.fromPartial({})); + obj.max_validators = message.maxValidators === 0 ? undefined : message.maxValidators; + obj.max_entries = message.maxEntries === 0 ? undefined : message.maxEntries; + obj.historical_entries = message.historicalEntries === 0 ? undefined : message.historicalEntries; + obj.bond_denom = message.bondDenom === "" ? undefined : message.bondDenom; obj.min_commission_rate = message.minCommissionRate ?? ""; return obj; }, @@ -2661,8 +2661,8 @@ export const DelegationResponse = { }, toAmino(message: DelegationResponse, useInterfaces: boolean = false): DelegationResponseAmino { const obj: any = {}; - obj.delegation = message.delegation ? Delegation.toAmino(message.delegation, useInterfaces) : Delegation.fromPartial({}); - obj.balance = message.balance ? Coin.toAmino(message.balance, useInterfaces) : Coin.fromPartial({}); + obj.delegation = message.delegation ? Delegation.toAmino(message.delegation, useInterfaces) : Delegation.toAmino(Delegation.fromPartial({})); + obj.balance = message.balance ? Coin.toAmino(message.balance, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: DelegationResponseAminoMsg): DelegationResponse { @@ -2742,8 +2742,8 @@ export const RedelegationEntryResponse = { }, toAmino(message: RedelegationEntryResponse, useInterfaces: boolean = false): RedelegationEntryResponseAmino { const obj: any = {}; - obj.redelegation_entry = message.redelegationEntry ? RedelegationEntry.toAmino(message.redelegationEntry, useInterfaces) : RedelegationEntry.fromPartial({}); - obj.balance = message.balance; + obj.redelegation_entry = message.redelegationEntry ? RedelegationEntry.toAmino(message.redelegationEntry, useInterfaces) : RedelegationEntry.toAmino(RedelegationEntry.fromPartial({})); + obj.balance = message.balance === "" ? undefined : message.balance; return obj; }, fromAminoMsg(object: RedelegationEntryResponseAminoMsg): RedelegationEntryResponse { @@ -2821,11 +2821,11 @@ export const RedelegationResponse = { }, toAmino(message: RedelegationResponse, useInterfaces: boolean = false): RedelegationResponseAmino { const obj: any = {}; - obj.redelegation = message.redelegation ? Redelegation.toAmino(message.redelegation, useInterfaces) : Redelegation.fromPartial({}); + obj.redelegation = message.redelegation ? Redelegation.toAmino(message.redelegation, useInterfaces) : Redelegation.toAmino(Redelegation.fromPartial({})); if (message.entries) { obj.entries = message.entries.map(e => e ? RedelegationEntryResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.entries = []; + obj.entries = message.entries; } return obj; }, @@ -2977,7 +2977,7 @@ export const ValidatorUpdates = { if (message.updates) { obj.updates = message.updates.map(e => e ? ValidatorUpdate.toAmino(e, useInterfaces) : undefined); } else { - obj.updates = []; + obj.updates = message.updates; } return obj; }, @@ -3011,7 +3011,7 @@ export const Cosmos_cryptoPubKey_InterfaceDecoder = (input: BinaryReader | Uint8 return data; } }; -export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino) => { +export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino): Any => { return encodePubkey(content); }; export const Cosmos_cryptoPubKey_ToAmino = (content: Any, useInterfaces: boolean = false): Pubkey | null => { diff --git a/packages/types/protobuf/codegen/cosmos/staking/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/staking/v1beta1/tx.ts index 76b2324d76..0430445ff8 100644 --- a/packages/types/protobuf/codegen/cosmos/staking/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/staking/v1beta1/tx.ts @@ -563,13 +563,13 @@ export const MsgCreateValidator = { }, toAmino(message: MsgCreateValidator, useInterfaces: boolean = false): MsgCreateValidatorAmino { const obj: any = {}; - obj.description = message.description ? Description.toAmino(message.description, useInterfaces) : Description.fromPartial({}); - obj.commission = message.commission ? CommissionRates.toAmino(message.commission, useInterfaces) : CommissionRates.fromPartial({}); + obj.description = message.description ? Description.toAmino(message.description, useInterfaces) : Description.toAmino(Description.fromPartial({})); + obj.commission = message.commission ? CommissionRates.toAmino(message.commission, useInterfaces) : CommissionRates.toAmino(CommissionRates.fromPartial({})); obj.min_self_delegation = message.minSelfDelegation ?? ""; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; obj.pubkey = message.pubkey ? decodePubkey(message.pubkey) : undefined; - obj.value = message.value ? Coin.toAmino(message.value, useInterfaces) : Coin.fromPartial({}); + obj.value = message.value ? Coin.toAmino(message.value, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: MsgCreateValidatorAminoMsg): MsgCreateValidator { @@ -727,10 +727,10 @@ export const MsgEditValidator = { }, toAmino(message: MsgEditValidator, useInterfaces: boolean = false): MsgEditValidatorAmino { const obj: any = {}; - obj.description = message.description ? Description.toAmino(message.description, useInterfaces) : Description.fromPartial({}); - obj.validator_address = message.validatorAddress; - obj.commission_rate = message.commissionRate; - obj.min_self_delegation = message.minSelfDelegation; + obj.description = message.description ? Description.toAmino(message.description, useInterfaces) : Description.toAmino(Description.fromPartial({})); + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.commission_rate = message.commissionRate === "" ? undefined : message.commissionRate; + obj.min_self_delegation = message.minSelfDelegation === "" ? undefined : message.minSelfDelegation; return obj; }, fromAminoMsg(object: MsgEditValidatorAminoMsg): MsgEditValidator { @@ -877,9 +877,9 @@ export const MsgDelegate = { }, toAmino(message: MsgDelegate, useInterfaces: boolean = false): MsgDelegateAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.fromPartial({}); + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: MsgDelegateAminoMsg): MsgDelegate { @@ -1037,10 +1037,10 @@ export const MsgBeginRedelegate = { }, toAmino(message: MsgBeginRedelegate, useInterfaces: boolean = false): MsgBeginRedelegateAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress; - obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.fromPartial({}); + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_src_address = message.validatorSrcAddress === "" ? undefined : message.validatorSrcAddress; + obj.validator_dst_address = message.validatorDstAddress === "" ? undefined : message.validatorDstAddress; + obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: MsgBeginRedelegateAminoMsg): MsgBeginRedelegate { @@ -1200,9 +1200,9 @@ export const MsgUndelegate = { }, toAmino(message: MsgUndelegate, useInterfaces: boolean = false): MsgUndelegateAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.fromPartial({}); + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUndelegateAminoMsg): MsgUndelegate { @@ -1283,7 +1283,7 @@ export const MsgUndelegateResponse = { toAmino(message: MsgUndelegateResponse, useInterfaces: boolean = false): MsgUndelegateResponseAmino { const obj: any = {}; obj.completion_time = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : new Date(); - obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.fromPartial({}); + obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUndelegateResponseAminoMsg): MsgUndelegateResponse { @@ -1385,10 +1385,10 @@ export const MsgCancelUnbondingDelegation = { }, toAmino(message: MsgCancelUnbondingDelegation, useInterfaces: boolean = false): MsgCancelUnbondingDelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.fromPartial({}); - obj.creation_height = message.creationHeight ? message.creationHeight.toString() : undefined; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); + obj.creation_height = message.creationHeight !== BigInt(0) ? message.creationHeight.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCancelUnbondingDelegationAminoMsg): MsgCancelUnbondingDelegation { @@ -1524,8 +1524,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { @@ -1614,7 +1614,7 @@ export const Cosmos_cryptoPubKey_InterfaceDecoder = (input: BinaryReader | Uint8 return data; } }; -export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino) => { +export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino): Any => { return encodePubkey(content); }; export const Cosmos_cryptoPubKey_ToAmino = (content: Any, useInterfaces: boolean = false): Pubkey | null => { diff --git a/packages/types/protobuf/codegen/cosmos/tx/signing/v1beta1/signing.ts b/packages/types/protobuf/codegen/cosmos/tx/signing/v1beta1/signing.ts index 3096650161..768e671f74 100644 --- a/packages/types/protobuf/codegen/cosmos/tx/signing/v1beta1/signing.ts +++ b/packages/types/protobuf/codegen/cosmos/tx/signing/v1beta1/signing.ts @@ -308,7 +308,7 @@ export const SignatureDescriptors = { if (message.signatures) { obj.signatures = message.signatures.map(e => e ? SignatureDescriptor.toAmino(e, useInterfaces) : undefined); } else { - obj.signatures = []; + obj.signatures = message.signatures; } return obj; }, @@ -402,7 +402,7 @@ export const SignatureDescriptor = { const obj: any = {}; obj.public_key = message.publicKey ? Any.toAmino(message.publicKey, useInterfaces) : undefined; obj.data = message.data ? SignatureDescriptor_Data.toAmino(message.data, useInterfaces) : undefined; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: SignatureDescriptorAminoMsg): SignatureDescriptor { @@ -554,7 +554,7 @@ export const SignatureDescriptor_Data_Single = { fromAmino(object: SignatureDescriptor_Data_SingleAmino): SignatureDescriptor_Data_Single { const message = createBaseSignatureDescriptor_Data_Single(); if (object.mode !== undefined && object.mode !== null) { - message.mode = signModeFromJSON(object.mode); + message.mode = object.mode; } if (object.signature !== undefined && object.signature !== null) { message.signature = bytesFromBase64(object.signature); @@ -563,7 +563,7 @@ export const SignatureDescriptor_Data_Single = { }, toAmino(message: SignatureDescriptor_Data_Single, useInterfaces: boolean = false): SignatureDescriptor_Data_SingleAmino { const obj: any = {}; - obj.mode = message.mode; + obj.mode = message.mode === 0 ? undefined : message.mode; obj.signature = message.signature ? base64FromBytes(message.signature) : undefined; return obj; }, @@ -646,7 +646,7 @@ export const SignatureDescriptor_Data_Multi = { if (message.signatures) { obj.signatures = message.signatures.map(e => e ? SignatureDescriptor_Data.toAmino(e, useInterfaces) : undefined); } else { - obj.signatures = []; + obj.signatures = message.signatures; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/tx/v1beta1/service.ts b/packages/types/protobuf/codegen/cosmos/tx/v1beta1/service.ts index 6bbc12c19d..cd3a225fd5 100644 --- a/packages/types/protobuf/codegen/cosmos/tx/v1beta1/service.ts +++ b/packages/types/protobuf/codegen/cosmos/tx/v1beta1/service.ts @@ -934,7 +934,7 @@ export const GetTxsEventRequest = { message.pagination = PageRequest.fromAmino(object.pagination); } if (object.order_by !== undefined && object.order_by !== null) { - message.orderBy = orderByFromJSON(object.order_by); + message.orderBy = object.order_by; } if (object.page !== undefined && object.page !== null) { message.page = BigInt(object.page); @@ -952,13 +952,13 @@ export const GetTxsEventRequest = { if (message.events) { obj.events = message.events.map(e => e); } else { - obj.events = []; + obj.events = message.events; } obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; - obj.order_by = message.orderBy; - obj.page = message.page ? message.page.toString() : undefined; - obj.limit = message.limit ? message.limit.toString() : undefined; - obj.query = message.query; + obj.order_by = message.orderBy === 0 ? undefined : message.orderBy; + obj.page = message.page !== BigInt(0) ? message.page.toString() : undefined; + obj.limit = message.limit !== BigInt(0) ? message.limit.toString() : undefined; + obj.query = message.query === "" ? undefined : message.query; return obj; }, fromAminoMsg(object: GetTxsEventRequestAminoMsg): GetTxsEventRequest { @@ -1059,15 +1059,15 @@ export const GetTxsEventResponse = { if (message.txs) { obj.txs = message.txs.map(e => e ? Tx.toAmino(e, useInterfaces) : undefined); } else { - obj.txs = []; + obj.txs = message.txs; } if (message.txResponses) { obj.tx_responses = message.txResponses.map(e => e ? TxResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.tx_responses = []; + obj.tx_responses = message.txResponses; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; - obj.total = message.total ? message.total.toString() : undefined; + obj.total = message.total !== BigInt(0) ? message.total.toString() : undefined; return obj; }, fromAminoMsg(object: GetTxsEventResponseAminoMsg): GetTxsEventResponse { @@ -1141,14 +1141,14 @@ export const BroadcastTxRequest = { message.txBytes = bytesFromBase64(object.tx_bytes); } if (object.mode !== undefined && object.mode !== null) { - message.mode = broadcastModeFromJSON(object.mode); + message.mode = object.mode; } return message; }, toAmino(message: BroadcastTxRequest, useInterfaces: boolean = false): BroadcastTxRequestAmino { const obj: any = {}; obj.tx_bytes = message.txBytes ? base64FromBytes(message.txBytes) : undefined; - obj.mode = message.mode; + obj.mode = message.mode === 0 ? undefined : message.mode; return obj; }, fromAminoMsg(object: BroadcastTxRequestAminoMsg): BroadcastTxRequest { @@ -1448,7 +1448,7 @@ export const GetTxRequest = { }, toAmino(message: GetTxRequest, useInterfaces: boolean = false): GetTxRequestAmino { const obj: any = {}; - obj.hash = message.hash; + obj.hash = message.hash === "" ? undefined : message.hash; return obj; }, fromAminoMsg(object: GetTxRequestAminoMsg): GetTxRequest { @@ -1609,7 +1609,7 @@ export const GetBlockWithTxsRequest = { }, toAmino(message: GetBlockWithTxsRequest, useInterfaces: boolean = false): GetBlockWithTxsRequestAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1713,7 +1713,7 @@ export const GetBlockWithTxsResponse = { if (message.txs) { obj.txs = message.txs.map(e => e ? Tx.toAmino(e, useInterfaces) : undefined); } else { - obj.txs = []; + obj.txs = message.txs; } obj.block_id = message.blockId ? BlockID.toAmino(message.blockId, useInterfaces) : undefined; obj.block = message.block ? Block.toAmino(message.block, useInterfaces) : undefined; @@ -2062,7 +2062,7 @@ export const TxEncodeAminoRequest = { }, toAmino(message: TxEncodeAminoRequest, useInterfaces: boolean = false): TxEncodeAminoRequestAmino { const obj: any = {}; - obj.amino_json = message.aminoJson; + obj.amino_json = message.aminoJson === "" ? undefined : message.aminoJson; return obj; }, fromAminoMsg(object: TxEncodeAminoRequestAminoMsg): TxEncodeAminoRequest { @@ -2269,7 +2269,7 @@ export const TxDecodeAminoResponse = { }, toAmino(message: TxDecodeAminoResponse, useInterfaces: boolean = false): TxDecodeAminoResponseAmino { const obj: any = {}; - obj.amino_json = message.aminoJson; + obj.amino_json = message.aminoJson === "" ? undefined : message.aminoJson; return obj; }, fromAminoMsg(object: TxDecodeAminoResponseAminoMsg): TxDecodeAminoResponse { diff --git a/packages/types/protobuf/codegen/cosmos/tx/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/tx/v1beta1/tx.ts index 1a7eeb5aa4..a073e03327 100644 --- a/packages/types/protobuf/codegen/cosmos/tx/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/tx/v1beta1/tx.ts @@ -1,6 +1,6 @@ //@ts-nocheck import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { SignMode, signModeFromJSON } from "../signing/v1beta1/signing"; +import { SignMode } from "../signing/v1beta1/signing"; import { CompactBitArray, CompactBitArrayAmino, CompactBitArraySDKType } from "../../crypto/multisig/v1beta1/multisig"; import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; @@ -841,7 +841,7 @@ export const Tx = { if (message.signatures) { obj.signatures = message.signatures.map(e => base64FromBytes(e)); } else { - obj.signatures = []; + obj.signatures = message.signatures; } return obj; }, @@ -936,7 +936,7 @@ export const TxRaw = { if (message.signatures) { obj.signatures = message.signatures.map(e => base64FromBytes(e)); } else { - obj.signatures = []; + obj.signatures = message.signatures; } return obj; }, @@ -1041,8 +1041,8 @@ export const SignDoc = { const obj: any = {}; obj.body_bytes = message.bodyBytes ? base64FromBytes(message.bodyBytes) : undefined; obj.auth_info_bytes = message.authInfoBytes ? base64FromBytes(message.authInfoBytes) : undefined; - obj.chain_id = message.chainId; - obj.account_number = message.accountNumber ? message.accountNumber.toString() : undefined; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.account_number = message.accountNumber !== BigInt(0) ? message.accountNumber.toString() : undefined; return obj; }, fromAminoMsg(object: SignDocAminoMsg): SignDoc { @@ -1168,9 +1168,9 @@ export const SignDocDirectAux = { const obj: any = {}; obj.body_bytes = message.bodyBytes ? base64FromBytes(message.bodyBytes) : undefined; obj.public_key = message.publicKey ? Any.toAmino(message.publicKey, useInterfaces) : undefined; - obj.chain_id = message.chainId; - obj.account_number = message.accountNumber ? message.accountNumber.toString() : undefined; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.account_number = message.accountNumber !== BigInt(0) ? message.accountNumber.toString() : undefined; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; obj.tip = message.tip ? Tip.toAmino(message.tip, useInterfaces) : undefined; return obj; }, @@ -1281,19 +1281,19 @@ export const TxBody = { if (message.messages) { obj.messages = message.messages.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); } else { - obj.messages = []; + obj.messages = message.messages; } - obj.memo = message.memo; - obj.timeout_height = message.timeoutHeight ? message.timeoutHeight.toString() : undefined; + obj.memo = message.memo === "" ? undefined : message.memo; + obj.timeout_height = message.timeoutHeight !== BigInt(0) ? message.timeoutHeight.toString() : undefined; if (message.extensionOptions) { obj.extension_options = message.extensionOptions.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); } else { - obj.extension_options = []; + obj.extension_options = message.extensionOptions; } if (message.nonCriticalExtensionOptions) { obj.non_critical_extension_options = message.nonCriticalExtensionOptions.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); } else { - obj.non_critical_extension_options = []; + obj.non_critical_extension_options = message.nonCriticalExtensionOptions; } return obj; }, @@ -1386,7 +1386,7 @@ export const AuthInfo = { if (message.signerInfos) { obj.signer_infos = message.signerInfos.map(e => e ? SignerInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.signer_infos = []; + obj.signer_infos = message.signerInfos; } obj.fee = message.fee ? Fee.toAmino(message.fee, useInterfaces) : undefined; obj.tip = message.tip ? Tip.toAmino(message.tip, useInterfaces) : undefined; @@ -1482,7 +1482,7 @@ export const SignerInfo = { const obj: any = {}; obj.public_key = message.publicKey ? Any.toAmino(message.publicKey, useInterfaces) : undefined; obj.mode_info = message.modeInfo ? ModeInfo.toAmino(message.modeInfo, useInterfaces) : undefined; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: SignerInfoAminoMsg): SignerInfo { @@ -1626,13 +1626,13 @@ export const ModeInfo_Single = { fromAmino(object: ModeInfo_SingleAmino): ModeInfo_Single { const message = createBaseModeInfo_Single(); if (object.mode !== undefined && object.mode !== null) { - message.mode = signModeFromJSON(object.mode); + message.mode = object.mode; } return message; }, toAmino(message: ModeInfo_Single, useInterfaces: boolean = false): ModeInfo_SingleAmino { const obj: any = {}; - obj.mode = message.mode; + obj.mode = message.mode === 0 ? undefined : message.mode; return obj; }, fromAminoMsg(object: ModeInfo_SingleAminoMsg): ModeInfo_Single { @@ -1714,7 +1714,7 @@ export const ModeInfo_Multi = { if (message.modeInfos) { obj.mode_infos = message.modeInfos.map(e => e ? ModeInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.mode_infos = []; + obj.mode_infos = message.modeInfos; } return obj; }, @@ -1818,11 +1818,11 @@ export const Fee = { if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } - obj.gas_limit = message.gasLimit ? message.gasLimit.toString() : undefined; - obj.payer = message.payer; - obj.granter = message.granter; + obj.gas_limit = message.gasLimit !== BigInt(0) ? message.gasLimit.toString() : undefined; + obj.payer = message.payer === "" ? undefined : message.payer; + obj.granter = message.granter === "" ? undefined : message.granter; return obj; }, fromAminoMsg(object: FeeAminoMsg): Fee { @@ -1903,9 +1903,9 @@ export const Tip = { if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } - obj.tipper = message.tipper; + obj.tipper = message.tipper === "" ? undefined : message.tipper; return obj; }, fromAminoMsg(object: TipAminoMsg): Tip { @@ -1998,7 +1998,7 @@ export const AuxSignerData = { message.signDoc = SignDocDirectAux.fromAmino(object.sign_doc); } if (object.mode !== undefined && object.mode !== null) { - message.mode = signModeFromJSON(object.mode); + message.mode = object.mode; } if (object.sig !== undefined && object.sig !== null) { message.sig = bytesFromBase64(object.sig); @@ -2007,9 +2007,9 @@ export const AuxSignerData = { }, toAmino(message: AuxSignerData, useInterfaces: boolean = false): AuxSignerDataAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.sign_doc = message.signDoc ? SignDocDirectAux.toAmino(message.signDoc, useInterfaces) : undefined; - obj.mode = message.mode; + obj.mode = message.mode === 0 ? undefined : message.mode; obj.sig = message.sig ? base64FromBytes(message.sig) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/query.ts index 1a9170f044..d15a2d944b 100644 --- a/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/query.ts @@ -501,7 +501,7 @@ export const QueryAppliedPlanRequest = { }, toAmino(message: QueryAppliedPlanRequest, useInterfaces: boolean = false): QueryAppliedPlanRequestAmino { const obj: any = {}; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; return obj; }, fromAminoMsg(object: QueryAppliedPlanRequestAminoMsg): QueryAppliedPlanRequest { @@ -570,7 +570,7 @@ export const QueryAppliedPlanResponse = { }, toAmino(message: QueryAppliedPlanResponse, useInterfaces: boolean = false): QueryAppliedPlanResponseAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; return obj; }, fromAminoMsg(object: QueryAppliedPlanResponseAminoMsg): QueryAppliedPlanResponse { @@ -639,7 +639,7 @@ export const QueryUpgradedConsensusStateRequest = { }, toAmino(message: QueryUpgradedConsensusStateRequest, useInterfaces: boolean = false): QueryUpgradedConsensusStateRequestAmino { const obj: any = {}; - obj.last_height = message.lastHeight ? message.lastHeight.toString() : undefined; + obj.last_height = message.lastHeight !== BigInt(0) ? message.lastHeight.toString() : undefined; return obj; }, fromAminoMsg(object: QueryUpgradedConsensusStateRequestAminoMsg): QueryUpgradedConsensusStateRequest { @@ -777,7 +777,7 @@ export const QueryModuleVersionsRequest = { }, toAmino(message: QueryModuleVersionsRequest, useInterfaces: boolean = false): QueryModuleVersionsRequestAmino { const obj: any = {}; - obj.module_name = message.moduleName; + obj.module_name = message.moduleName === "" ? undefined : message.moduleName; return obj; }, fromAminoMsg(object: QueryModuleVersionsRequestAminoMsg): QueryModuleVersionsRequest { @@ -847,7 +847,7 @@ export const QueryModuleVersionsResponse = { if (message.moduleVersions) { obj.module_versions = message.moduleVersions.map(e => e ? ModuleVersion.toAmino(e, useInterfaces) : undefined); } else { - obj.module_versions = []; + obj.module_versions = message.moduleVersions; } return obj; }, @@ -973,7 +973,7 @@ export const QueryAuthorityResponse = { }, toAmino(message: QueryAuthorityResponse, useInterfaces: boolean = false): QueryAuthorityResponseAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; return obj; }, fromAminoMsg(object: QueryAuthorityResponseAminoMsg): QueryAuthorityResponse { diff --git a/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/tx.ts index 2a92ecef6a..ea99208506 100644 --- a/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/tx.ts @@ -181,8 +181,8 @@ export const MsgSoftwareUpgrade = { }, toAmino(message: MsgSoftwareUpgrade, useInterfaces: boolean = false): MsgSoftwareUpgradeAmino { const obj: any = {}; - obj.authority = message.authority; - obj.plan = message.plan ? Plan.toAmino(message.plan, useInterfaces) : Plan.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.plan = message.plan ? Plan.toAmino(message.plan, useInterfaces) : Plan.toAmino(Plan.fromPartial({})); return obj; }, fromAminoMsg(object: MsgSoftwareUpgradeAminoMsg): MsgSoftwareUpgrade { @@ -307,7 +307,7 @@ export const MsgCancelUpgrade = { }, toAmino(message: MsgCancelUpgrade, useInterfaces: boolean = false): MsgCancelUpgradeAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; return obj; }, fromAminoMsg(object: MsgCancelUpgradeAminoMsg): MsgCancelUpgrade { diff --git a/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/upgrade.ts b/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/upgrade.ts index 313a7e664f..b039f6fd1b 100644 --- a/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/upgrade.ts +++ b/packages/types/protobuf/codegen/cosmos/upgrade/v1beta1/upgrade.ts @@ -314,10 +314,10 @@ export const Plan = { }, toAmino(message: Plan, useInterfaces: boolean = false): PlanAmino { const obj: any = {}; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : new Date(); - obj.height = message.height ? message.height.toString() : undefined; - obj.info = message.info; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.info = message.info === "" ? undefined : message.info; obj.upgraded_client_state = message.upgradedClientState ? Any.toAmino(message.upgradedClientState, useInterfaces) : undefined; return obj; }, @@ -410,9 +410,9 @@ export const SoftwareUpgradeProposal = { }, toAmino(message: SoftwareUpgradeProposal, useInterfaces: boolean = false): SoftwareUpgradeProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.plan = message.plan ? Plan.toAmino(message.plan, useInterfaces) : Plan.fromPartial({}); + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.plan = message.plan ? Plan.toAmino(message.plan, useInterfaces) : Plan.toAmino(Plan.fromPartial({})); return obj; }, fromAminoMsg(object: SoftwareUpgradeProposalAminoMsg): SoftwareUpgradeProposal { @@ -493,8 +493,8 @@ export const CancelSoftwareUpgradeProposal = { }, toAmino(message: CancelSoftwareUpgradeProposal, useInterfaces: boolean = false): CancelSoftwareUpgradeProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; return obj; }, fromAminoMsg(object: CancelSoftwareUpgradeProposalAminoMsg): CancelSoftwareUpgradeProposal { @@ -574,8 +574,8 @@ export const ModuleVersion = { }, toAmino(message: ModuleVersion, useInterfaces: boolean = false): ModuleVersionAmino { const obj: any = {}; - obj.name = message.name; - obj.version = message.version ? message.version.toString() : undefined; + obj.name = message.name === "" ? undefined : message.name; + obj.version = message.version !== BigInt(0) ? message.version.toString() : undefined; return obj; }, fromAminoMsg(object: ModuleVersionAminoMsg): ModuleVersion { diff --git a/packages/types/protobuf/codegen/cosmos_proto/cosmos.ts b/packages/types/protobuf/codegen/cosmos_proto/cosmos.ts index 1e9a9b9744..50f34f366d 100644 --- a/packages/types/protobuf/codegen/cosmos_proto/cosmos.ts +++ b/packages/types/protobuf/codegen/cosmos_proto/cosmos.ts @@ -228,8 +228,8 @@ export const InterfaceDescriptor = { }, toAmino(message: InterfaceDescriptor, useInterfaces: boolean = false): InterfaceDescriptorAmino { const obj: any = {}; - obj.name = message.name; - obj.description = message.description; + obj.name = message.name === "" ? undefined : message.name; + obj.description = message.description === "" ? undefined : message.description; return obj; }, fromAminoMsg(object: InterfaceDescriptorAminoMsg): InterfaceDescriptor { @@ -316,17 +316,17 @@ export const ScalarDescriptor = { if (object.description !== undefined && object.description !== null) { message.description = object.description; } - message.fieldType = object.field_type?.map(e => scalarTypeFromJSON(e)) || []; + message.fieldType = object.field_type?.map(e => e) || []; return message; }, toAmino(message: ScalarDescriptor, useInterfaces: boolean = false): ScalarDescriptorAmino { const obj: any = {}; - obj.name = message.name; - obj.description = message.description; + obj.name = message.name === "" ? undefined : message.name; + obj.description = message.description === "" ? undefined : message.description; if (message.fieldType) { obj.field_type = message.fieldType.map(e => e); } else { - obj.field_type = []; + obj.field_type = message.fieldType; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/authorityMetadata.ts b/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/authorityMetadata.ts index 3c2a8be0f7..f5eb11f6d5 100644 --- a/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/authorityMetadata.ts +++ b/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/authorityMetadata.ts @@ -77,7 +77,7 @@ export const DenomAuthorityMetadata = { }, toAmino(message: DenomAuthorityMetadata, useInterfaces: boolean = false): DenomAuthorityMetadataAmino { const obj: any = {}; - obj.admin = message.admin; + obj.admin = message.admin === "" ? undefined : message.admin; return obj; }, fromAminoMsg(object: DenomAuthorityMetadataAminoMsg): DenomAuthorityMetadata { diff --git a/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/genesis.ts b/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/genesis.ts index aafcf415bb..fe7fa7169c 100644 --- a/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/genesis.ts @@ -119,7 +119,7 @@ export const GenesisState = { if (message.factoryDenoms) { obj.factory_denoms = message.factoryDenoms.map(e => e ? GenesisDenom.toAmino(e, useInterfaces) : undefined); } else { - obj.factory_denoms = []; + obj.factory_denoms = message.factoryDenoms; } return obj; }, @@ -200,7 +200,7 @@ export const GenesisDenom = { }, toAmino(message: GenesisDenom, useInterfaces: boolean = false): GenesisDenomAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; obj.authority_metadata = message.authorityMetadata ? DenomAuthorityMetadata.toAmino(message.authorityMetadata, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/params.ts b/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/params.ts index e774e90219..68c0b740df 100644 --- a/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/params.ts @@ -65,7 +65,7 @@ export const Params = { if (message.denomCreationFee) { obj.denom_creation_fee = message.denomCreationFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.denom_creation_fee = []; + obj.denom_creation_fee = message.denomCreationFee; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/query.ts b/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/query.ts index 2844206a86..04aae06605 100644 --- a/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/query.ts @@ -323,7 +323,7 @@ export const QueryDenomAuthorityMetadataRequest = { }, toAmino(message: QueryDenomAuthorityMetadataRequest, useInterfaces: boolean = false): QueryDenomAuthorityMetadataRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryDenomAuthorityMetadataRequestAminoMsg): QueryDenomAuthorityMetadataRequest { @@ -461,7 +461,7 @@ export const QueryDenomsFromCreatorRequest = { }, toAmino(message: QueryDenomsFromCreatorRequest, useInterfaces: boolean = false): QueryDenomsFromCreatorRequestAmino { const obj: any = {}; - obj.creator = message.creator; + obj.creator = message.creator === "" ? undefined : message.creator; return obj; }, fromAminoMsg(object: QueryDenomsFromCreatorRequestAminoMsg): QueryDenomsFromCreatorRequest { @@ -531,7 +531,7 @@ export const QueryDenomsFromCreatorResponse = { if (message.denoms) { obj.denoms = message.denoms.map(e => e); } else { - obj.denoms = []; + obj.denoms = message.denoms; } return obj; }, diff --git a/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/tx.ts b/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/tx.ts index dadc1e6ecb..01f6dccdea 100644 --- a/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/cosmwasm/tokenfactory/v1beta1/tx.ts @@ -340,8 +340,8 @@ export const MsgCreateDenom = { }, toAmino(message: MsgCreateDenom, useInterfaces: boolean = false): MsgCreateDenomAmino { const obj: any = {}; - obj.sender = message.sender; - obj.subdenom = message.subdenom; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.subdenom = message.subdenom === "" ? undefined : message.subdenom; return obj; }, fromAminoMsg(object: MsgCreateDenomAminoMsg): MsgCreateDenom { @@ -410,7 +410,7 @@ export const MsgCreateDenomResponse = { }, toAmino(message: MsgCreateDenomResponse, useInterfaces: boolean = false): MsgCreateDenomResponseAmino { const obj: any = {}; - obj.new_token_denom = message.newTokenDenom; + obj.new_token_denom = message.newTokenDenom === "" ? undefined : message.newTokenDenom; return obj; }, fromAminoMsg(object: MsgCreateDenomResponseAminoMsg): MsgCreateDenomResponse { @@ -490,7 +490,7 @@ export const MsgMint = { }, toAmino(message: MsgMint, useInterfaces: boolean = false): MsgMintAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -627,7 +627,7 @@ export const MsgBurn = { }, toAmino(message: MsgBurn, useInterfaces: boolean = false): MsgBurnAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -775,9 +775,9 @@ export const MsgChangeAdmin = { }, toAmino(message: MsgChangeAdmin, useInterfaces: boolean = false): MsgChangeAdminAmino { const obj: any = {}; - obj.sender = message.sender; - obj.denom = message.denom; - obj.new_admin = message.newAdmin; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; return obj; }, fromAminoMsg(object: MsgChangeAdminAminoMsg): MsgChangeAdmin { @@ -913,7 +913,7 @@ export const MsgSetDenomMetadata = { }, toAmino(message: MsgSetDenomMetadata, useInterfaces: boolean = false): MsgSetDenomMetadataAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.metadata = message.metadata ? Metadata.toAmino(message.metadata, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/authz.ts b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/authz.ts index 16613a2632..a47a0c25ef 100644 --- a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/authz.ts +++ b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/authz.ts @@ -468,7 +468,7 @@ export const StoreCodeAuthorization = { if (message.grants) { obj.grants = message.grants.map(e => e ? CodeGrant.toAmino(e, useInterfaces) : undefined); } else { - obj.grants = []; + obj.grants = message.grants; } return obj; }, @@ -540,7 +540,7 @@ export const ContractExecutionAuthorization = { if (message.grants) { obj.grants = message.grants.map(e => e ? ContractGrant.toAmino(e, useInterfaces) : undefined); } else { - obj.grants = []; + obj.grants = message.grants; } return obj; }, @@ -612,7 +612,7 @@ export const ContractMigrationAuthorization = { if (message.grants) { obj.grants = message.grants.map(e => e ? ContractGrant.toAmino(e, useInterfaces) : undefined); } else { - obj.grants = []; + obj.grants = message.grants; } return obj; }, @@ -785,7 +785,7 @@ export const ContractGrant = { }, toAmino(message: ContractGrant, useInterfaces: boolean = false): ContractGrantAmino { const obj: any = {}; - obj.contract = message.contract; + obj.contract = message.contract === "" ? undefined : message.contract; obj.limit = message.limit ? Cosmwasm_wasmv1ContractAuthzLimitX_ToAmino((message.limit as Any), useInterfaces) : undefined; obj.filter = message.filter ? Cosmwasm_wasmv1ContractAuthzFilterX_ToAmino((message.filter as Any), useInterfaces) : undefined; return obj; @@ -857,7 +857,7 @@ export const MaxCallsLimit = { }, toAmino(message: MaxCallsLimit, useInterfaces: boolean = false): MaxCallsLimitAmino { const obj: any = {}; - obj.remaining = message.remaining ? message.remaining.toString() : undefined; + obj.remaining = message.remaining !== BigInt(0) ? message.remaining.toString() : undefined; return obj; }, fromAminoMsg(object: MaxCallsLimitAminoMsg): MaxCallsLimit { @@ -928,7 +928,7 @@ export const MaxFundsLimit = { if (message.amounts) { obj.amounts = message.amounts.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amounts = []; + obj.amounts = message.amounts; } return obj; }, @@ -1008,11 +1008,11 @@ export const CombinedLimit = { }, toAmino(message: CombinedLimit, useInterfaces: boolean = false): CombinedLimitAmino { const obj: any = {}; - obj.calls_remaining = message.callsRemaining ? message.callsRemaining.toString() : undefined; + obj.calls_remaining = message.callsRemaining !== BigInt(0) ? message.callsRemaining.toString() : undefined; if (message.amounts) { obj.amounts = message.amounts.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amounts = []; + obj.amounts = message.amounts; } return obj; }, @@ -1142,7 +1142,7 @@ export const AcceptedMessageKeysFilter = { if (message.keys) { obj.keys = message.keys.map(e => e); } else { - obj.keys = []; + obj.keys = message.keys; } return obj; }, @@ -1214,7 +1214,7 @@ export const AcceptedMessagesFilter = { if (message.messages) { obj.messages = message.messages.map(e => JSON.parse(fromUtf8(e))); } else { - obj.messages = []; + obj.messages = message.messages; } return obj; }, @@ -1254,7 +1254,7 @@ export const Cosmwasm_wasmv1ContractAuthzLimitX_InterfaceDecoder = (input: Binar return data; } }; -export const Cosmwasm_wasmv1ContractAuthzLimitX_FromAmino = (content: AnyAmino) => { +export const Cosmwasm_wasmv1ContractAuthzLimitX_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "wasm/MaxCallsLimit": return Any.fromPartial({ @@ -1310,7 +1310,7 @@ export const Cosmwasm_wasmv1ContractAuthzFilterX_InterfaceDecoder = (input: Bina return data; } }; -export const Cosmwasm_wasmv1ContractAuthzFilterX_FromAmino = (content: AnyAmino) => { +export const Cosmwasm_wasmv1ContractAuthzFilterX_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "wasm/AllowAllMessagesFilter": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/genesis.ts b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/genesis.ts index f450d33ef8..283d79e16d 100644 --- a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/genesis.ts +++ b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/genesis.ts @@ -16,9 +16,9 @@ export interface GenesisStateProtoMsg { /** GenesisState - genesis state of x/wasm */ export interface GenesisStateAmino { params: ParamsAmino | undefined; - codes: CodeAmino[]; - contracts: ContractAmino[]; - sequences: SequenceAmino[]; + codes?: CodeAmino[]; + contracts?: ContractAmino[]; + sequences?: SequenceAmino[]; } export interface GenesisStateAminoMsg { type: "wasm/GenesisState"; @@ -185,21 +185,21 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); if (message.codes) { obj.codes = message.codes.map(e => e ? Code.toAmino(e, useInterfaces) : undefined); } else { - obj.codes = []; + obj.codes = message.codes; } if (message.contracts) { obj.contracts = message.contracts.map(e => e ? Contract.toAmino(e, useInterfaces) : undefined); } else { - obj.contracts = []; + obj.contracts = message.contracts; } if (message.sequences) { obj.sequences = message.sequences.map(e => e ? Sequence.toAmino(e, useInterfaces) : undefined); } else { - obj.sequences = []; + obj.sequences = message.sequences; } return obj; }, @@ -302,10 +302,10 @@ export const Code = { }, toAmino(message: Code, useInterfaces: boolean = false): CodeAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.code_info = message.codeInfo ? CodeInfo.toAmino(message.codeInfo, useInterfaces) : CodeInfo.fromPartial({}); + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.code_info = message.codeInfo ? CodeInfo.toAmino(message.codeInfo, useInterfaces) : CodeInfo.toAmino(CodeInfo.fromPartial({})); obj.code_bytes = message.codeBytes ? base64FromBytes(message.codeBytes) : undefined; - obj.pinned = message.pinned; + obj.pinned = message.pinned === false ? undefined : message.pinned; return obj; }, fromAminoMsg(object: CodeAminoMsg): Code { @@ -403,17 +403,17 @@ export const Contract = { }, toAmino(message: Contract, useInterfaces: boolean = false): ContractAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; - obj.contract_info = message.contractInfo ? ContractInfo.toAmino(message.contractInfo, useInterfaces) : ContractInfo.fromPartial({}); + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; + obj.contract_info = message.contractInfo ? ContractInfo.toAmino(message.contractInfo, useInterfaces) : ContractInfo.toAmino(ContractInfo.fromPartial({})); if (message.contractState) { obj.contract_state = message.contractState.map(e => e ? Model.toAmino(e, useInterfaces) : undefined); } else { - obj.contract_state = []; + obj.contract_state = message.contractState; } if (message.contractCodeHistory) { obj.contract_code_history = message.contractCodeHistory.map(e => e ? ContractCodeHistoryEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.contract_code_history = []; + obj.contract_code_history = message.contractCodeHistory; } return obj; }, @@ -495,7 +495,7 @@ export const Sequence = { toAmino(message: Sequence, useInterfaces: boolean = false): SequenceAmino { const obj: any = {}; obj.id_key = message.idKey ? base64FromBytes(message.idKey) : undefined; - obj.value = message.value ? message.value.toString() : undefined; + obj.value = message.value !== BigInt(0) ? message.value.toString() : undefined; return obj; }, fromAminoMsg(object: SequenceAminoMsg): Sequence { diff --git a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/ibc.ts b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/ibc.ts index c9ff5f846d..1817f5f351 100644 --- a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/ibc.ts +++ b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/ibc.ts @@ -174,9 +174,9 @@ export const MsgIBCSend = { }, toAmino(message: MsgIBCSend, useInterfaces: boolean = false): MsgIBCSendAmino { const obj: any = {}; - obj.channel = message.channel; - obj.timeout_height = message.timeoutHeight ? message.timeoutHeight.toString() : undefined; - obj.timeout_timestamp = message.timeoutTimestamp ? message.timeoutTimestamp.toString() : undefined; + obj.channel = message.channel === "" ? undefined : message.channel; + obj.timeout_height = message.timeoutHeight !== BigInt(0) ? message.timeoutHeight.toString() : undefined; + obj.timeout_timestamp = message.timeoutTimestamp !== BigInt(0) ? message.timeoutTimestamp.toString() : undefined; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -246,7 +246,7 @@ export const MsgIBCSendResponse = { }, toAmino(message: MsgIBCSendResponse, useInterfaces: boolean = false): MsgIBCSendResponseAmino { const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: MsgIBCSendResponseAminoMsg): MsgIBCSendResponse { @@ -315,7 +315,7 @@ export const MsgIBCCloseChannel = { }, toAmino(message: MsgIBCCloseChannel, useInterfaces: boolean = false): MsgIBCCloseChannelAmino { const obj: any = {}; - obj.channel = message.channel; + obj.channel = message.channel === "" ? undefined : message.channel; return obj; }, fromAminoMsg(object: MsgIBCCloseChannelAminoMsg): MsgIBCCloseChannel { diff --git a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/proposal.ts b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/proposal.ts index 7622c2610d..360c6c5714 100644 --- a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/proposal.ts +++ b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/proposal.ts @@ -863,14 +863,14 @@ export const StoreCodeProposal = { }, toAmino(message: StoreCodeProposal, useInterfaces: boolean = false): StoreCodeProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.run_as = message.runAs === "" ? undefined : message.runAs; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission, useInterfaces) : undefined; - obj.unpin_code = message.unpinCode; - obj.source = message.source; - obj.builder = message.builder; + obj.unpin_code = message.unpinCode === false ? undefined : message.unpinCode; + obj.source = message.source === "" ? undefined : message.source; + obj.builder = message.builder === "" ? undefined : message.builder; obj.code_hash = message.codeHash ? base64FromBytes(message.codeHash) : undefined; return obj; }, @@ -1016,17 +1016,17 @@ export const InstantiateContractProposal = { }, toAmino(message: InstantiateContractProposal, useInterfaces: boolean = false): InstantiateContractProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; - obj.admin = message.admin; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.label = message.label; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.run_as = message.runAs === "" ? undefined : message.runAs; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.label = message.label === "" ? undefined : message.label; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } return obj; }, @@ -1194,20 +1194,20 @@ export const InstantiateContract2Proposal = { }, toAmino(message: InstantiateContract2Proposal, useInterfaces: boolean = false): InstantiateContract2ProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; - obj.admin = message.admin; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.label = message.label; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.run_as = message.runAs === "" ? undefined : message.runAs; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.label = message.label === "" ? undefined : message.label; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } obj.salt = message.salt ? base64FromBytes(message.salt) : undefined; - obj.fix_msg = message.fixMsg; + obj.fix_msg = message.fixMsg === false ? undefined : message.fixMsg; return obj; }, fromAminoMsg(object: InstantiateContract2ProposalAminoMsg): InstantiateContract2Proposal { @@ -1321,10 +1321,10 @@ export const MigrateContractProposal = { }, toAmino(message: MigrateContractProposal, useInterfaces: boolean = false): MigrateContractProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.contract = message.contract === "" ? undefined : message.contract; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; return obj; }, @@ -1428,9 +1428,9 @@ export const SudoContractProposal = { }, toAmino(message: SudoContractProposal, useInterfaces: boolean = false): SudoContractProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.contract = message.contract === "" ? undefined : message.contract; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; return obj; }, @@ -1554,15 +1554,15 @@ export const ExecuteContractProposal = { }, toAmino(message: ExecuteContractProposal, useInterfaces: boolean = false): ExecuteContractProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; - obj.contract = message.contract; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.run_as = message.runAs === "" ? undefined : message.runAs; + obj.contract = message.contract === "" ? undefined : message.contract; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } return obj; }, @@ -1666,10 +1666,10 @@ export const UpdateAdminProposal = { }, toAmino(message: UpdateAdminProposal, useInterfaces: boolean = false): UpdateAdminProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.new_admin = message.newAdmin; - obj.contract = message.contract; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; + obj.contract = message.contract === "" ? undefined : message.contract; return obj; }, fromAminoMsg(object: UpdateAdminProposalAminoMsg): UpdateAdminProposal { @@ -1761,9 +1761,9 @@ export const ClearAdminProposal = { }, toAmino(message: ClearAdminProposal, useInterfaces: boolean = false): ClearAdminProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.contract = message.contract === "" ? undefined : message.contract; return obj; }, fromAminoMsg(object: ClearAdminProposalAminoMsg): ClearAdminProposal { @@ -1862,12 +1862,12 @@ export const PinCodesProposal = { }, toAmino(message: PinCodesProposal, useInterfaces: boolean = false): PinCodesProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.codeIds) { obj.code_ids = message.codeIds.map(e => e.toString()); } else { - obj.code_ids = []; + obj.code_ids = message.codeIds; } return obj; }, @@ -1967,12 +1967,12 @@ export const UnpinCodesProposal = { }, toAmino(message: UnpinCodesProposal, useInterfaces: boolean = false): UnpinCodesProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.codeIds) { obj.code_ids = message.codeIds.map(e => e.toString()); } else { - obj.code_ids = []; + obj.code_ids = message.codeIds; } return obj; }, @@ -2053,7 +2053,7 @@ export const AccessConfigUpdate = { }, toAmino(message: AccessConfigUpdate, useInterfaces: boolean = false): AccessConfigUpdateAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission, useInterfaces) : undefined; return obj; }, @@ -2144,12 +2144,12 @@ export const UpdateInstantiateConfigProposal = { }, toAmino(message: UpdateInstantiateConfigProposal, useInterfaces: boolean = false): UpdateInstantiateConfigProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.accessConfigUpdates) { obj.access_config_updates = message.accessConfigUpdates.map(e => e ? AccessConfigUpdate.toAmino(e, useInterfaces) : undefined); } else { - obj.access_config_updates = []; + obj.access_config_updates = message.accessConfigUpdates; } return obj; }, @@ -2350,22 +2350,22 @@ export const StoreAndInstantiateContractProposal = { }, toAmino(message: StoreAndInstantiateContractProposal, useInterfaces: boolean = false): StoreAndInstantiateContractProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.run_as = message.runAs === "" ? undefined : message.runAs; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission, useInterfaces) : undefined; - obj.unpin_code = message.unpinCode; - obj.admin = message.admin; - obj.label = message.label; + obj.unpin_code = message.unpinCode === false ? undefined : message.unpinCode; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.label = message.label === "" ? undefined : message.label; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } - obj.source = message.source; - obj.builder = message.builder; + obj.source = message.source === "" ? undefined : message.source; + obj.builder = message.builder === "" ? undefined : message.builder; obj.code_hash = message.codeHash ? base64FromBytes(message.codeHash) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/query.ts b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/query.ts index 591289ee7a..40926dda92 100644 --- a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/query.ts +++ b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/query.ts @@ -144,11 +144,9 @@ export interface QueryContractHistoryResponseSDKType { * RPC method */ export interface QueryContractsByCodeRequest { - /** - * grpc-gateway_out does not support Go style CodID - * pagination defines an optional pagination for the request. - */ + /** grpc-gateway_out does not support Go style CodID */ codeId: bigint; + /** pagination defines an optional pagination for the request. */ pagination?: PageRequest | undefined; } export interface QueryContractsByCodeRequestProtoMsg { @@ -160,11 +158,9 @@ export interface QueryContractsByCodeRequestProtoMsg { * RPC method */ export interface QueryContractsByCodeRequestAmino { - /** - * grpc-gateway_out does not support Go style CodID - * pagination defines an optional pagination for the request. - */ + /** grpc-gateway_out does not support Go style CodID */ code_id?: string; + /** pagination defines an optional pagination for the request. */ pagination?: PageRequestAmino | undefined; } export interface QueryContractsByCodeRequestAminoMsg { @@ -452,7 +448,7 @@ export interface CodeInfoResponseProtoMsg { } /** CodeInfoResponse contains code meta data from CodeInfo */ export interface CodeInfoResponseAmino { - code_id?: string; + code_id: string; creator?: string; data_hash?: string; instantiate_permission: AccessConfigAmino | undefined; @@ -480,7 +476,7 @@ export interface QueryCodeResponseProtoMsg { /** QueryCodeResponse is the response type for the Query/Code RPC method */ export interface QueryCodeResponseAmino { code_info?: CodeInfoResponseAmino | undefined; - data?: string; + data: string; } export interface QueryCodeResponseAminoMsg { type: "wasm/QueryCodeResponse"; @@ -755,7 +751,7 @@ export const QueryContractInfoRequest = { }, toAmino(message: QueryContractInfoRequest, useInterfaces: boolean = false): QueryContractInfoRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; return obj; }, fromAminoMsg(object: QueryContractInfoRequestAminoMsg): QueryContractInfoRequest { @@ -835,8 +831,8 @@ export const QueryContractInfoResponse = { }, toAmino(message: QueryContractInfoResponse, useInterfaces: boolean = false): QueryContractInfoResponseAmino { const obj: any = {}; - obj.address = message.address; - obj.contract_info = message.contractInfo ? ContractInfo.toAmino(message.contractInfo, useInterfaces) : ContractInfo.fromPartial({}); + obj.address = message.address === "" ? undefined : message.address; + obj.contract_info = message.contractInfo ? ContractInfo.toAmino(message.contractInfo, useInterfaces) : ContractInfo.toAmino(ContractInfo.fromPartial({})); return obj; }, fromAminoMsg(object: QueryContractInfoResponseAminoMsg): QueryContractInfoResponse { @@ -916,7 +912,7 @@ export const QueryContractHistoryRequest = { }, toAmino(message: QueryContractHistoryRequest, useInterfaces: boolean = false): QueryContractHistoryRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -998,7 +994,7 @@ export const QueryContractHistoryResponse = { if (message.entries) { obj.entries = message.entries.map(e => e ? ContractCodeHistoryEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.entries = []; + obj.entries = message.entries; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1080,7 +1076,7 @@ export const QueryContractsByCodeRequest = { }, toAmino(message: QueryContractsByCodeRequest, useInterfaces: boolean = false): QueryContractsByCodeRequestAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1162,7 +1158,7 @@ export const QueryContractsByCodeResponse = { if (message.contracts) { obj.contracts = message.contracts.map(e => e); } else { - obj.contracts = []; + obj.contracts = message.contracts; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1244,7 +1240,7 @@ export const QueryAllContractStateRequest = { }, toAmino(message: QueryAllContractStateRequest, useInterfaces: boolean = false): QueryAllContractStateRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1326,7 +1322,7 @@ export const QueryAllContractStateResponse = { if (message.models) { obj.models = message.models.map(e => e ? Model.toAmino(e, useInterfaces) : undefined); } else { - obj.models = []; + obj.models = message.models; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1408,7 +1404,7 @@ export const QueryRawContractStateRequest = { }, toAmino(message: QueryRawContractStateRequest, useInterfaces: boolean = false): QueryRawContractStateRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.query_data = message.queryData ? base64FromBytes(message.queryData) : undefined; return obj; }, @@ -1558,7 +1554,7 @@ export const QuerySmartContractStateRequest = { }, toAmino(message: QuerySmartContractStateRequest, useInterfaces: boolean = false): QuerySmartContractStateRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.query_data = message.queryData ? JSON.parse(fromUtf8(message.queryData)) : undefined; return obj; }, @@ -1697,7 +1693,7 @@ export const QueryCodeRequest = { }, toAmino(message: QueryCodeRequest, useInterfaces: boolean = false): QueryCodeRequestAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryCodeRequestAminoMsg): QueryCodeRequest { @@ -1799,10 +1795,10 @@ export const CodeInfoResponse = { }, toAmino(message: CodeInfoResponse, useInterfaces: boolean = false): CodeInfoResponseAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.creator = message.creator; + obj.code_id = message.codeId ? message.codeId.toString() : "0"; + obj.creator = message.creator === "" ? undefined : message.creator; obj.data_hash = message.dataHash ? base64FromBytes(message.dataHash) : undefined; - obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission, useInterfaces) : AccessConfig.fromPartial({}); + obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission, useInterfaces) : AccessConfig.toAmino(AccessConfig.fromPartial({})); return obj; }, fromAminoMsg(object: CodeInfoResponseAminoMsg): CodeInfoResponse { @@ -1883,7 +1879,7 @@ export const QueryCodeResponse = { toAmino(message: QueryCodeResponse, useInterfaces: boolean = false): QueryCodeResponseAmino { const obj: any = {}; obj.code_info = message.codeInfo ? CodeInfoResponse.toAmino(message.codeInfo, useInterfaces) : undefined; - obj.data = message.data ? base64FromBytes(message.data) : undefined; + obj.data = message.data ? base64FromBytes(message.data) : ""; return obj; }, fromAminoMsg(object: QueryCodeResponseAminoMsg): QueryCodeResponse { @@ -2033,7 +2029,7 @@ export const QueryCodesResponse = { if (message.codeInfos) { obj.code_infos = message.codeInfos.map(e => e ? CodeInfoResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.code_infos = []; + obj.code_infos = message.codeInfos; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2194,7 +2190,7 @@ export const QueryPinnedCodesResponse = { if (message.codeIds) { obj.code_ids = message.codeIds.map(e => e.toString()); } else { - obj.code_ids = []; + obj.code_ids = message.codeIds; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2321,7 +2317,7 @@ export const QueryParamsResponse = { }, toAmino(message: QueryParamsResponse, useInterfaces: boolean = false): QueryParamsResponseAmino { const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { @@ -2401,7 +2397,7 @@ export const QueryContractsByCreatorRequest = { }, toAmino(message: QueryContractsByCreatorRequest, useInterfaces: boolean = false): QueryContractsByCreatorRequestAmino { const obj: any = {}; - obj.creator_address = message.creatorAddress; + obj.creator_address = message.creatorAddress === "" ? undefined : message.creatorAddress; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2483,7 +2479,7 @@ export const QueryContractsByCreatorResponse = { if (message.contractAddresses) { obj.contract_addresses = message.contractAddresses.map(e => e); } else { - obj.contract_addresses = []; + obj.contract_addresses = message.contractAddresses; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/tx.ts b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/tx.ts index 6ee5c2e5a9..58912ae88d 100644 --- a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/tx.ts +++ b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/tx.ts @@ -1320,7 +1320,7 @@ export const MsgStoreCode = { }, toAmino(message: MsgStoreCode, useInterfaces: boolean = false): MsgStoreCodeAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission, useInterfaces) : undefined; return obj; @@ -1402,7 +1402,7 @@ export const MsgStoreCodeResponse = { }, toAmino(message: MsgStoreCodeResponse, useInterfaces: boolean = false): MsgStoreCodeResponseAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.checksum = message.checksum ? base64FromBytes(message.checksum) : undefined; return obj; }, @@ -1525,18 +1525,15 @@ export const MsgInstantiateContract = { }, toAmino(message: MsgInstantiateContract, useInterfaces: boolean = false): MsgInstantiateContractAmino { const obj: any = {}; - obj.sender = message.sender; - // Replace empty string with undefined. - if (message.admin) { - obj.admin = message.admin; - } - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.label = message.label; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.label = message.label === "" ? undefined : message.label; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } return obj; }, @@ -1617,7 +1614,7 @@ export const MsgInstantiateContractResponse = { }, toAmino(message: MsgInstantiateContractResponse, useInterfaces: boolean = false): MsgInstantiateContractResponseAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -1762,20 +1759,18 @@ export const MsgInstantiateContract2 = { }, toAmino(message: MsgInstantiateContract2, useInterfaces: boolean = false): MsgInstantiateContract2Amino { const obj: any = {}; - obj.sender = message.sender; - obj.admin = message.admin; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.label = message.label; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.label = message.label === "" ? undefined : message.label; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } obj.salt = message.salt ? base64FromBytes(message.salt) : undefined; - if (message.fixMsg) { - obj.fix_msg = message.fixMsg; - } + obj.fix_msg = message.fixMsg === false ? undefined : message.fixMsg; return obj; }, fromAminoMsg(object: MsgInstantiateContract2AminoMsg): MsgInstantiateContract2 { @@ -1855,7 +1850,7 @@ export const MsgInstantiateContract2Response = { }, toAmino(message: MsgInstantiateContract2Response, useInterfaces: boolean = false): MsgInstantiateContract2ResponseAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -1956,13 +1951,13 @@ export const MsgExecuteContract = { }, toAmino(message: MsgExecuteContract, useInterfaces: boolean = false): MsgExecuteContractAmino { const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.contract = message.contract === "" ? undefined : message.contract; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } return obj; }, @@ -2134,9 +2129,9 @@ export const MsgMigrateContract = { }, toAmino(message: MsgMigrateContract, useInterfaces: boolean = false): MsgMigrateContractAmino { const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.contract = message.contract === "" ? undefined : message.contract; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; return obj; }, @@ -2297,9 +2292,9 @@ export const MsgUpdateAdmin = { }, toAmino(message: MsgUpdateAdmin, useInterfaces: boolean = false): MsgUpdateAdminAmino { const obj: any = {}; - obj.sender = message.sender; - obj.new_admin = message.newAdmin; - obj.contract = message.contract; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; + obj.contract = message.contract === "" ? undefined : message.contract; return obj; }, fromAminoMsg(object: MsgUpdateAdminAminoMsg): MsgUpdateAdmin { @@ -2435,8 +2430,8 @@ export const MsgClearAdmin = { }, toAmino(message: MsgClearAdmin, useInterfaces: boolean = false): MsgClearAdminAmino { const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.contract = message.contract === "" ? undefined : message.contract; return obj; }, fromAminoMsg(object: MsgClearAdminAminoMsg): MsgClearAdmin { @@ -2572,8 +2567,8 @@ export const AccessConfigUpdate = { }, toAmino(message: AccessConfigUpdate, useInterfaces: boolean = false): AccessConfigUpdateAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission, useInterfaces) : AccessConfig.fromPartial({}); + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission, useInterfaces) : AccessConfig.toAmino(AccessConfig.fromPartial({})); return obj; }, fromAminoMsg(object: AccessConfigUpdateAminoMsg): AccessConfigUpdate { @@ -2664,8 +2659,8 @@ export const MsgUpdateInstantiateConfig = { }, toAmino(message: MsgUpdateInstantiateConfig, useInterfaces: boolean = false): MsgUpdateInstantiateConfigAmino { const obj: any = {}; - obj.sender = message.sender; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.new_instantiate_permission = message.newInstantiatePermission ? AccessConfig.toAmino(message.newInstantiatePermission, useInterfaces) : undefined; return obj; }, @@ -2802,8 +2797,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { @@ -2950,8 +2945,8 @@ export const MsgSudoContract = { }, toAmino(message: MsgSudoContract, useInterfaces: boolean = false): MsgSudoContractAmino { const obj: any = {}; - obj.authority = message.authority; - obj.contract = message.contract; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.contract = message.contract === "" ? undefined : message.contract; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; return obj; }, @@ -3108,11 +3103,11 @@ export const MsgPinCodes = { }, toAmino(message: MsgPinCodes, useInterfaces: boolean = false): MsgPinCodesAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; if (message.codeIds) { obj.code_ids = message.codeIds.map(e => e.toString()); } else { - obj.code_ids = []; + obj.code_ids = message.codeIds; } return obj; }, @@ -3256,11 +3251,11 @@ export const MsgUnpinCodes = { }, toAmino(message: MsgUnpinCodes, useInterfaces: boolean = false): MsgUnpinCodesAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; if (message.codeIds) { obj.code_ids = message.codeIds.map(e => e.toString()); } else { - obj.code_ids = []; + obj.code_ids = message.codeIds; } return obj; }, @@ -3494,20 +3489,20 @@ export const MsgStoreAndInstantiateContract = { }, toAmino(message: MsgStoreAndInstantiateContract, useInterfaces: boolean = false): MsgStoreAndInstantiateContractAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission, useInterfaces) : undefined; - obj.unpin_code = message.unpinCode; - obj.admin = message.admin; - obj.label = message.label; + obj.unpin_code = message.unpinCode === false ? undefined : message.unpinCode; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.label = message.label === "" ? undefined : message.label; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } - obj.source = message.source; - obj.builder = message.builder; + obj.source = message.source === "" ? undefined : message.source; + obj.builder = message.builder === "" ? undefined : message.builder; obj.code_hash = message.codeHash ? base64FromBytes(message.codeHash) : undefined; return obj; }, @@ -3588,7 +3583,7 @@ export const MsgStoreAndInstantiateContractResponse = { }, toAmino(message: MsgStoreAndInstantiateContractResponse, useInterfaces: boolean = false): MsgStoreAndInstantiateContractResponseAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -3667,11 +3662,11 @@ export const MsgAddCodeUploadParamsAddresses = { }, toAmino(message: MsgAddCodeUploadParamsAddresses, useInterfaces: boolean = false): MsgAddCodeUploadParamsAddressesAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; if (message.addresses) { obj.addresses = message.addresses.map(e => e); } else { - obj.addresses = []; + obj.addresses = message.addresses; } return obj; }, @@ -3806,11 +3801,11 @@ export const MsgRemoveCodeUploadParamsAddresses = { }, toAmino(message: MsgRemoveCodeUploadParamsAddresses, useInterfaces: boolean = false): MsgRemoveCodeUploadParamsAddressesAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; if (message.addresses) { obj.addresses = message.addresses.map(e => e); } else { - obj.addresses = []; + obj.addresses = message.addresses; } return obj; }, @@ -3980,10 +3975,10 @@ export const MsgStoreAndMigrateContract = { }, toAmino(message: MsgStoreAndMigrateContract, useInterfaces: boolean = false): MsgStoreAndMigrateContractAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission, useInterfaces) : undefined; - obj.contract = message.contract; + obj.contract = message.contract === "" ? undefined : message.contract; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; return obj; }, @@ -4075,7 +4070,7 @@ export const MsgStoreAndMigrateContractResponse = { }, toAmino(message: MsgStoreAndMigrateContractResponse, useInterfaces: boolean = false): MsgStoreAndMigrateContractResponseAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.checksum = message.checksum ? base64FromBytes(message.checksum) : undefined; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; @@ -4168,9 +4163,9 @@ export const MsgUpdateContractLabel = { }, toAmino(message: MsgUpdateContractLabel, useInterfaces: boolean = false): MsgUpdateContractLabelAmino { const obj: any = {}; - obj.sender = message.sender; - obj.new_label = message.newLabel; - obj.contract = message.contract; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.new_label = message.newLabel === "" ? undefined : message.newLabel; + obj.contract = message.contract === "" ? undefined : message.contract; return obj; }, fromAminoMsg(object: MsgUpdateContractLabelAminoMsg): MsgUpdateContractLabel { diff --git a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/types.ts b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/types.ts index 2038d7725e..2643bcdc49 100644 --- a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/types.ts +++ b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/types.ts @@ -4,14 +4,10 @@ import { bytesFromBase64, base64FromBytes } from "../../../helpers"; import { toUtf8, fromUtf8 } from "@cosmjs/encoding"; /** AccessType permission types */ export enum AccessType { - /** ACCESS_TYPE_UNSPECIFIED - AccessTypeUnspecified placeholder for empty value */ - ACCESS_TYPE_UNSPECIFIED = 0, - /** ACCESS_TYPE_NOBODY - AccessTypeNobody forbidden */ - ACCESS_TYPE_NOBODY = 1, - /** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */ - ACCESS_TYPE_EVERYBODY = 3, - /** ACCESS_TYPE_ANY_OF_ADDRESSES - AccessTypeAnyOfAddresses allow any of the addresses */ - ACCESS_TYPE_ANY_OF_ADDRESSES = 4, + Unspecified = 0, + Nobody = 1, + Everybody = 3, + AnyOfAddresses = 4, UNRECOGNIZED = -1, } export const AccessTypeSDKType = AccessType; @@ -20,16 +16,16 @@ export function accessTypeFromJSON(object: any): AccessType { switch (object) { case 0: case "Unspecified": - return AccessType.ACCESS_TYPE_UNSPECIFIED; + return AccessType.Unspecified; case 1: case "Nobody": - return AccessType.ACCESS_TYPE_NOBODY; + return AccessType.Nobody; case 3: case "Everybody": - return AccessType.ACCESS_TYPE_EVERYBODY; + return AccessType.Everybody; case 4: case "AnyOfAddresses": - return AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES; + return AccessType.AnyOfAddresses; case -1: case "UNRECOGNIZED": default: @@ -38,13 +34,13 @@ export function accessTypeFromJSON(object: any): AccessType { } export function accessTypeToJSON(object: AccessType): string { switch (object) { - case AccessType.ACCESS_TYPE_UNSPECIFIED: + case AccessType.Unspecified: return "Unspecified"; - case AccessType.ACCESS_TYPE_NOBODY: + case AccessType.Nobody: return "Nobody"; - case AccessType.ACCESS_TYPE_EVERYBODY: + case AccessType.Everybody: return "Everybody"; - case AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES: + case AccessType.AnyOfAddresses: return "AnyOfAddresses"; case AccessType.UNRECOGNIZED: default: @@ -401,13 +397,13 @@ export const AccessTypeParam = { fromAmino(object: AccessTypeParamAmino): AccessTypeParam { const message = createBaseAccessTypeParam(); if (object.value !== undefined && object.value !== null) { - message.value = accessTypeFromJSON(object.value); + message.value = object.value; } return message; }, toAmino(message: AccessTypeParam, useInterfaces: boolean = false): AccessTypeParamAmino { const obj: any = {}; - obj.value = message.value; + obj.value = message.value === 0 ? undefined : message.value; return obj; }, fromAminoMsg(object: AccessTypeParamAminoMsg): AccessTypeParam { @@ -486,7 +482,7 @@ export const AccessConfig = { toAmino(message: AccessConfig, useInterfaces: boolean = false): AccessConfigAmino { const obj: any = {}; obj.permission = accessTypeToJSON(message.permission); - if (message.addresses?.length) { + if (message.addresses.length) { obj.addresses = message.addresses.map(e => e); } return obj; @@ -568,7 +564,7 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.code_upload_access = message.codeUploadAccess ? AccessConfig.toAmino(message.codeUploadAccess, useInterfaces) : AccessConfig.fromPartial({}); + obj.code_upload_access = message.codeUploadAccess ? AccessConfig.toAmino(message.codeUploadAccess, useInterfaces) : AccessConfig.toAmino(AccessConfig.fromPartial({})); obj.instantiate_default_permission = accessTypeToJSON(message.instantiateDefaultPermission); return obj; }, @@ -661,8 +657,8 @@ export const CodeInfo = { toAmino(message: CodeInfo, useInterfaces: boolean = false): CodeInfoAmino { const obj: any = {}; obj.code_hash = message.codeHash ? base64FromBytes(message.codeHash) : undefined; - obj.creator = message.creator; - obj.instantiate_config = message.instantiateConfig ? AccessConfig.toAmino(message.instantiateConfig, useInterfaces) : AccessConfig.fromPartial({}); + obj.creator = message.creator === "" ? undefined : message.creator; + obj.instantiate_config = message.instantiateConfig ? AccessConfig.toAmino(message.instantiateConfig, useInterfaces) : AccessConfig.toAmino(AccessConfig.fromPartial({})); return obj; }, fromAminoMsg(object: CodeInfoAminoMsg): CodeInfo { @@ -797,12 +793,12 @@ export const ContractInfo = { }, toAmino(message: ContractInfo, useInterfaces: boolean = false): ContractInfoAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.creator = message.creator; - obj.admin = message.admin; - obj.label = message.label; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.label = message.label === "" ? undefined : message.label; obj.created = message.created ? AbsoluteTxPosition.toAmino(message.created, useInterfaces) : undefined; - obj.ibc_port_id = message.ibcPortId; + obj.ibc_port_id = message.ibcPortId === "" ? undefined : message.ibcPortId; obj.extension = message.extension ? Cosmwasm_wasmv1ContractInfoExtension_ToAmino((message.extension as Any), useInterfaces) : undefined; return obj; }, @@ -890,7 +886,7 @@ export const ContractCodeHistoryEntry = { fromAmino(object: ContractCodeHistoryEntryAmino): ContractCodeHistoryEntry { const message = createBaseContractCodeHistoryEntry(); if (object.operation !== undefined && object.operation !== null) { - message.operation = contractCodeHistoryOperationTypeFromJSON(object.operation); + message.operation = object.operation; } if (object.code_id !== undefined && object.code_id !== null) { message.codeId = BigInt(object.code_id); @@ -905,8 +901,8 @@ export const ContractCodeHistoryEntry = { }, toAmino(message: ContractCodeHistoryEntry, useInterfaces: boolean = false): ContractCodeHistoryEntryAmino { const obj: any = {}; - obj.operation = message.operation; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.operation = message.operation === 0 ? undefined : message.operation; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.updated = message.updated ? AbsoluteTxPosition.toAmino(message.updated, useInterfaces) : undefined; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; return obj; @@ -988,8 +984,8 @@ export const AbsoluteTxPosition = { }, toAmino(message: AbsoluteTxPosition, useInterfaces: boolean = false): AbsoluteTxPositionAmino { const obj: any = {}; - obj.block_height = message.blockHeight ? message.blockHeight.toString() : undefined; - obj.tx_index = message.txIndex ? message.txIndex.toString() : undefined; + obj.block_height = message.blockHeight !== BigInt(0) ? message.blockHeight.toString() : undefined; + obj.tx_index = message.txIndex !== BigInt(0) ? message.txIndex.toString() : undefined; return obj; }, fromAminoMsg(object: AbsoluteTxPositionAminoMsg): AbsoluteTxPosition { @@ -1103,7 +1099,7 @@ export const Cosmwasm_wasmv1ContractInfoExtension_InterfaceDecoder = (input: Bin return data; } }; -export const Cosmwasm_wasmv1ContractInfoExtension_FromAmino = (content: AnyAmino) => { +export const Cosmwasm_wasmv1ContractInfoExtension_FromAmino = (content: AnyAmino): Any => { return Any.fromAmino(content); }; export const Cosmwasm_wasmv1ContractInfoExtension_ToAmino = (content: Any, useInterfaces: boolean = false) => { diff --git a/packages/types/protobuf/codegen/feemarket/feemarket/v1/genesis.ts b/packages/types/protobuf/codegen/feemarket/feemarket/v1/genesis.ts index d4af27520d..63a19f6c8d 100644 --- a/packages/types/protobuf/codegen/feemarket/feemarket/v1/genesis.ts +++ b/packages/types/protobuf/codegen/feemarket/feemarket/v1/genesis.ts @@ -259,14 +259,14 @@ export const State = { }, toAmino(message: State, useInterfaces: boolean = false): StateAmino { const obj: any = {}; - obj.base_gas_price = message.baseGasPrice; - obj.learning_rate = message.learningRate; + obj.base_gas_price = message.baseGasPrice === "" ? undefined : message.baseGasPrice; + obj.learning_rate = message.learningRate === "" ? undefined : message.learningRate; if (message.window) { obj.window = message.window.map(e => e.toString()); } else { - obj.window = []; + obj.window = message.window; } - obj.index = message.index ? message.index.toString() : undefined; + obj.index = message.index !== BigInt(0) ? message.index.toString() : undefined; return obj; }, fromAminoMsg(object: StateAminoMsg): State { diff --git a/packages/types/protobuf/codegen/feemarket/feemarket/v1/params.ts b/packages/types/protobuf/codegen/feemarket/feemarket/v1/params.ts index c300382670..c4a7758e0a 100644 --- a/packages/types/protobuf/codegen/feemarket/feemarket/v1/params.ts +++ b/packages/types/protobuf/codegen/feemarket/feemarket/v1/params.ts @@ -317,18 +317,18 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.alpha = message.alpha; - obj.beta = message.beta; - obj.gamma = message.gamma; - obj.delta = message.delta; - obj.min_base_gas_price = message.minBaseGasPrice; - obj.min_learning_rate = message.minLearningRate; - obj.max_learning_rate = message.maxLearningRate; - obj.max_block_utilization = message.maxBlockUtilization ? message.maxBlockUtilization.toString() : undefined; - obj.window = message.window ? message.window.toString() : undefined; - obj.fee_denom = message.feeDenom; - obj.enabled = message.enabled; - obj.distribute_fees = message.distributeFees; + obj.alpha = message.alpha === "" ? undefined : message.alpha; + obj.beta = message.beta === "" ? undefined : message.beta; + obj.gamma = message.gamma === "" ? undefined : message.gamma; + obj.delta = message.delta === "" ? undefined : message.delta; + obj.min_base_gas_price = message.minBaseGasPrice === "" ? undefined : message.minBaseGasPrice; + obj.min_learning_rate = message.minLearningRate === "" ? undefined : message.minLearningRate; + obj.max_learning_rate = message.maxLearningRate === "" ? undefined : message.maxLearningRate; + obj.max_block_utilization = message.maxBlockUtilization !== BigInt(0) ? message.maxBlockUtilization.toString() : undefined; + obj.window = message.window !== BigInt(0) ? message.window.toString() : undefined; + obj.fee_denom = message.feeDenom === "" ? undefined : message.feeDenom; + obj.enabled = message.enabled === false ? undefined : message.enabled; + obj.distribute_fees = message.distributeFees === false ? undefined : message.distributeFees; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/feemarket/feemarket/v1/query.ts b/packages/types/protobuf/codegen/feemarket/feemarket/v1/query.ts index 5317c79d1c..8b7eca284b 100644 --- a/packages/types/protobuf/codegen/feemarket/feemarket/v1/query.ts +++ b/packages/types/protobuf/codegen/feemarket/feemarket/v1/query.ts @@ -19,7 +19,6 @@ export interface ParamsRequestAminoMsg { export interface ParamsRequestSDKType {} /** ParamsResponse is the response type for the Query/Params RPC method. */ export interface ParamsResponse { - /** ParamsResponse is the response type for the Query/Params RPC method. */ params: Params | undefined; } export interface ParamsResponseProtoMsg { @@ -28,7 +27,6 @@ export interface ParamsResponseProtoMsg { } /** ParamsResponse is the response type for the Query/Params RPC method. */ export interface ParamsResponseAmino { - /** ParamsResponse is the response type for the Query/Params RPC method. */ params?: ParamsAmino | undefined; } export interface ParamsResponseAminoMsg { @@ -55,7 +53,6 @@ export interface StateRequestAminoMsg { export interface StateRequestSDKType {} /** StateResponse is the response type for the Query/State RPC method. */ export interface StateResponse { - /** StateResponse is the response type for the Query/State RPC method. */ state: State | undefined; } export interface StateResponseProtoMsg { @@ -64,7 +61,6 @@ export interface StateResponseProtoMsg { } /** StateResponse is the response type for the Query/State RPC method. */ export interface StateResponseAmino { - /** StateResponse is the response type for the Query/State RPC method. */ state?: StateAmino | undefined; } export interface StateResponseAminoMsg { @@ -439,7 +435,7 @@ export const GasPriceRequest = { }, toAmino(message: GasPriceRequest, useInterfaces: boolean = false): GasPriceRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: GasPriceRequestAminoMsg): GasPriceRequest { @@ -502,7 +498,7 @@ export const GasPriceResponse = { }, toAmino(message: GasPriceResponse, useInterfaces: boolean = false): GasPriceResponseAmino { const obj: any = {}; - obj.price = message.price ? DecCoin.toAmino(message.price, useInterfaces) : DecCoin.fromPartial({}); + obj.price = message.price ? DecCoin.toAmino(message.price, useInterfaces) : DecCoin.toAmino(DecCoin.fromPartial({})); return obj; }, fromAminoMsg(object: GasPriceResponseAminoMsg): GasPriceResponse { @@ -616,7 +612,7 @@ export const GasPricesResponse = { if (message.prices) { obj.prices = message.prices.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.prices = []; + obj.prices = message.prices; } return obj; }, diff --git a/packages/types/protobuf/codegen/feemarket/feemarket/v1/tx.ts b/packages/types/protobuf/codegen/feemarket/feemarket/v1/tx.ts index c8b6c46d14..b4b5e12503 100644 --- a/packages/types/protobuf/codegen/feemarket/feemarket/v1/tx.ts +++ b/packages/types/protobuf/codegen/feemarket/feemarket/v1/tx.ts @@ -113,7 +113,7 @@ export const MsgParams = { toAmino(message: MsgParams, useInterfaces: boolean = false): MsgParamsAmino { const obj: any = {}; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; return obj; }, fromAminoMsg(object: MsgParamsAminoMsg): MsgParams { diff --git a/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/genesis.ts b/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/genesis.ts index 53ac540b26..4aa0f4a311 100644 --- a/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/genesis.ts @@ -165,7 +165,7 @@ export const Params = { if (message.minimumGasPrices) { obj.minimum_gas_prices = message.minimumGasPrices.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.minimum_gas_prices = []; + obj.minimum_gas_prices = message.minimumGasPrices; } return obj; }, diff --git a/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/query.ts b/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/query.ts index 1cf7eef865..e9b1f26ad9 100644 --- a/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/query.ts @@ -148,7 +148,7 @@ export const QueryMinimumGasPricesResponse = { if (message.minimumGasPrices) { obj.minimum_gas_prices = message.minimumGasPrices.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.minimum_gas_prices = []; + obj.minimum_gas_prices = message.minimumGasPrices; } return obj; }, diff --git a/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/tx.ts b/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/tx.ts index add39cdc3a..dfa0faffc4 100644 --- a/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/gaia/globalfee/v1beta1/tx.ts @@ -132,7 +132,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/google/api/http.ts b/packages/types/protobuf/codegen/google/api/http.ts index 5309d8cd7e..a2b64c2dc1 100644 --- a/packages/types/protobuf/codegen/google/api/http.ts +++ b/packages/types/protobuf/codegen/google/api/http.ts @@ -1080,9 +1080,9 @@ export const Http = { if (message.rules) { obj.rules = message.rules.map(e => e ? HttpRule.toAmino(e, useInterfaces) : undefined); } else { - obj.rules = []; + obj.rules = message.rules; } - obj.fully_decode_reserved_expansion = message.fullyDecodeReservedExpansion; + obj.fully_decode_reserved_expansion = message.fullyDecodeReservedExpansion === false ? undefined : message.fullyDecodeReservedExpansion; return obj; }, fromAminoMsg(object: HttpAminoMsg): Http { @@ -1242,19 +1242,19 @@ export const HttpRule = { }, toAmino(message: HttpRule, useInterfaces: boolean = false): HttpRuleAmino { const obj: any = {}; - obj.selector = message.selector; - obj.get = message.get; - obj.put = message.put; - obj.post = message.post; - obj.delete = message.delete; - obj.patch = message.patch; + obj.selector = message.selector === "" ? undefined : message.selector; + obj.get = message.get === null ? undefined : message.get; + obj.put = message.put === null ? undefined : message.put; + obj.post = message.post === null ? undefined : message.post; + obj.delete = message.delete === null ? undefined : message.delete; + obj.patch = message.patch === null ? undefined : message.patch; obj.custom = message.custom ? CustomHttpPattern.toAmino(message.custom, useInterfaces) : undefined; - obj.body = message.body; - obj.response_body = message.responseBody; + obj.body = message.body === "" ? undefined : message.body; + obj.response_body = message.responseBody === "" ? undefined : message.responseBody; if (message.additionalBindings) { obj.additional_bindings = message.additionalBindings.map(e => e ? HttpRule.toAmino(e, useInterfaces) : undefined); } else { - obj.additional_bindings = []; + obj.additional_bindings = message.additionalBindings; } return obj; }, @@ -1329,8 +1329,8 @@ export const CustomHttpPattern = { }, toAmino(message: CustomHttpPattern, useInterfaces: boolean = false): CustomHttpPatternAmino { const obj: any = {}; - obj.kind = message.kind; - obj.path = message.path; + obj.kind = message.kind === "" ? undefined : message.kind; + obj.path = message.path === "" ? undefined : message.path; return obj; }, fromAminoMsg(object: CustomHttpPatternAminoMsg): CustomHttpPattern { diff --git a/packages/types/protobuf/codegen/google/protobuf/descriptor.ts b/packages/types/protobuf/codegen/google/protobuf/descriptor.ts index df2f17c3f0..5ade2095b1 100644 --- a/packages/types/protobuf/codegen/google/protobuf/descriptor.ts +++ b/packages/types/protobuf/codegen/google/protobuf/descriptor.ts @@ -29,6 +29,7 @@ export enum FieldDescriptorProto_Type { * treat group fields as unknown fields. */ TYPE_GROUP = 10, + /** TYPE_MESSAGE - Length-delimited aggregate. */ TYPE_MESSAGE = 11, /** TYPE_BYTES - New in version 2. */ TYPE_BYTES = 12, @@ -190,12 +191,9 @@ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_La } /** Generated classes can be optimized for speed or code size. */ export enum FileOptions_OptimizeMode { - /** - * SPEED - Generate complete code for parsing, serialization, - * etc. - */ + /** SPEED - Generate complete code for parsing, serialization, */ SPEED = 1, - /** CODE_SIZE - Use ReflectionOps to implement these methods. */ + /** CODE_SIZE - etc. */ CODE_SIZE = 2, /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ LITE_RUNTIME = 3, @@ -391,6 +389,7 @@ export interface FileDescriptorSetSDKType { export interface FileDescriptorProto { /** file name, relative to root of source tree */ name: string; + /** e.g. "foo", "foo.bar", etc. */ package: string; /** Names of files imported by this file. */ dependency: string[]; @@ -428,6 +427,7 @@ export interface FileDescriptorProtoProtoMsg { export interface FileDescriptorProtoAmino { /** file name, relative to root of source tree */ name?: string; + /** e.g. "foo", "foo.bar", etc. */ package?: string; /** Names of files imported by this file. */ dependency?: string[]; @@ -2241,7 +2241,7 @@ export const FileDescriptorSet = { if (message.file) { obj.file = message.file.map(e => e ? FileDescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.file = []; + obj.file = message.file; } return obj; }, @@ -2430,46 +2430,46 @@ export const FileDescriptorProto = { }, toAmino(message: FileDescriptorProto, useInterfaces: boolean = false): FileDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name; - obj.package = message.package; + obj.name = message.name === "" ? undefined : message.name; + obj.package = message.package === "" ? undefined : message.package; if (message.dependency) { obj.dependency = message.dependency.map(e => e); } else { - obj.dependency = []; + obj.dependency = message.dependency; } if (message.publicDependency) { obj.public_dependency = message.publicDependency.map(e => e); } else { - obj.public_dependency = []; + obj.public_dependency = message.publicDependency; } if (message.weakDependency) { obj.weak_dependency = message.weakDependency.map(e => e); } else { - obj.weak_dependency = []; + obj.weak_dependency = message.weakDependency; } if (message.messageType) { obj.message_type = message.messageType.map(e => e ? DescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.message_type = []; + obj.message_type = message.messageType; } if (message.enumType) { obj.enum_type = message.enumType.map(e => e ? EnumDescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.enum_type = []; + obj.enum_type = message.enumType; } if (message.service) { obj.service = message.service.map(e => e ? ServiceDescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.service = []; + obj.service = message.service; } if (message.extension) { obj.extension = message.extension.map(e => e ? FieldDescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.extension = []; + obj.extension = message.extension; } obj.options = message.options ? FileOptions.toAmino(message.options, useInterfaces) : undefined; obj.source_code_info = message.sourceCodeInfo ? SourceCodeInfo.toAmino(message.sourceCodeInfo, useInterfaces) : undefined; - obj.syntax = message.syntax; + obj.syntax = message.syntax === "" ? undefined : message.syntax; return obj; }, fromAminoMsg(object: FileDescriptorProtoAminoMsg): FileDescriptorProto { @@ -2615,47 +2615,47 @@ export const DescriptorProto = { }, toAmino(message: DescriptorProto, useInterfaces: boolean = false): DescriptorProtoAmino { const obj: any = {}; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; if (message.field) { obj.field = message.field.map(e => e ? FieldDescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.field = []; + obj.field = message.field; } if (message.extension) { obj.extension = message.extension.map(e => e ? FieldDescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.extension = []; + obj.extension = message.extension; } if (message.nestedType) { obj.nested_type = message.nestedType.map(e => e ? DescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.nested_type = []; + obj.nested_type = message.nestedType; } if (message.enumType) { obj.enum_type = message.enumType.map(e => e ? EnumDescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.enum_type = []; + obj.enum_type = message.enumType; } if (message.extensionRange) { obj.extension_range = message.extensionRange.map(e => e ? DescriptorProto_ExtensionRange.toAmino(e, useInterfaces) : undefined); } else { - obj.extension_range = []; + obj.extension_range = message.extensionRange; } if (message.oneofDecl) { obj.oneof_decl = message.oneofDecl.map(e => e ? OneofDescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.oneof_decl = []; + obj.oneof_decl = message.oneofDecl; } obj.options = message.options ? MessageOptions.toAmino(message.options, useInterfaces) : undefined; if (message.reservedRange) { obj.reserved_range = message.reservedRange.map(e => e ? DescriptorProto_ReservedRange.toAmino(e, useInterfaces) : undefined); } else { - obj.reserved_range = []; + obj.reserved_range = message.reservedRange; } if (message.reservedName) { obj.reserved_name = message.reservedName.map(e => e); } else { - obj.reserved_name = []; + obj.reserved_name = message.reservedName; } return obj; }, @@ -2741,8 +2741,8 @@ export const DescriptorProto_ExtensionRange = { }, toAmino(message: DescriptorProto_ExtensionRange, useInterfaces: boolean = false): DescriptorProto_ExtensionRangeAmino { const obj: any = {}; - obj.start = message.start; - obj.end = message.end; + obj.start = message.start === 0 ? undefined : message.start; + obj.end = message.end === 0 ? undefined : message.end; obj.options = message.options ? ExtensionRangeOptions.toAmino(message.options, useInterfaces) : undefined; return obj; }, @@ -2817,8 +2817,8 @@ export const DescriptorProto_ReservedRange = { }, toAmino(message: DescriptorProto_ReservedRange, useInterfaces: boolean = false): DescriptorProto_ReservedRangeAmino { const obj: any = {}; - obj.start = message.start; - obj.end = message.end; + obj.start = message.start === 0 ? undefined : message.start; + obj.end = message.end === 0 ? undefined : message.end; return obj; }, fromAminoMsg(object: DescriptorProto_ReservedRangeAminoMsg): DescriptorProto_ReservedRange { @@ -2882,7 +2882,7 @@ export const ExtensionRangeOptions = { if (message.uninterpretedOption) { obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e, useInterfaces) : undefined); } else { - obj.uninterpreted_option = []; + obj.uninterpreted_option = message.uninterpretedOption; } return obj; }, @@ -3018,10 +3018,10 @@ export const FieldDescriptorProto = { message.number = object.number; } if (object.label !== undefined && object.label !== null) { - message.label = fieldDescriptorProto_LabelFromJSON(object.label); + message.label = object.label; } if (object.type !== undefined && object.type !== null) { - message.type = fieldDescriptorProto_TypeFromJSON(object.type); + message.type = object.type; } if (object.type_name !== undefined && object.type_name !== null) { message.typeName = object.type_name; @@ -3045,15 +3045,15 @@ export const FieldDescriptorProto = { }, toAmino(message: FieldDescriptorProto, useInterfaces: boolean = false): FieldDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name; - obj.number = message.number; - obj.label = message.label; - obj.type = message.type; - obj.type_name = message.typeName; - obj.extendee = message.extendee; - obj.default_value = message.defaultValue; - obj.oneof_index = message.oneofIndex; - obj.json_name = message.jsonName; + obj.name = message.name === "" ? undefined : message.name; + obj.number = message.number === 0 ? undefined : message.number; + obj.label = message.label === 1 ? undefined : message.label; + obj.type = message.type === 1 ? undefined : message.type; + obj.type_name = message.typeName === "" ? undefined : message.typeName; + obj.extendee = message.extendee === "" ? undefined : message.extendee; + obj.default_value = message.defaultValue === "" ? undefined : message.defaultValue; + obj.oneof_index = message.oneofIndex === 0 ? undefined : message.oneofIndex; + obj.json_name = message.jsonName === "" ? undefined : message.jsonName; obj.options = message.options ? FieldOptions.toAmino(message.options, useInterfaces) : undefined; return obj; }, @@ -3128,7 +3128,7 @@ export const OneofDescriptorProto = { }, toAmino(message: OneofDescriptorProto, useInterfaces: boolean = false): OneofDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; obj.options = message.options ? OneofOptions.toAmino(message.options, useInterfaces) : undefined; return obj; }, @@ -3230,22 +3230,22 @@ export const EnumDescriptorProto = { }, toAmino(message: EnumDescriptorProto, useInterfaces: boolean = false): EnumDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; if (message.value) { obj.value = message.value.map(e => e ? EnumValueDescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.value = []; + obj.value = message.value; } obj.options = message.options ? EnumOptions.toAmino(message.options, useInterfaces) : undefined; if (message.reservedRange) { obj.reserved_range = message.reservedRange.map(e => e ? EnumDescriptorProto_EnumReservedRange.toAmino(e, useInterfaces) : undefined); } else { - obj.reserved_range = []; + obj.reserved_range = message.reservedRange; } if (message.reservedName) { obj.reserved_name = message.reservedName.map(e => e); } else { - obj.reserved_name = []; + obj.reserved_name = message.reservedName; } return obj; }, @@ -3320,8 +3320,8 @@ export const EnumDescriptorProto_EnumReservedRange = { }, toAmino(message: EnumDescriptorProto_EnumReservedRange, useInterfaces: boolean = false): EnumDescriptorProto_EnumReservedRangeAmino { const obj: any = {}; - obj.start = message.start; - obj.end = message.end; + obj.start = message.start === 0 ? undefined : message.start; + obj.end = message.end === 0 ? undefined : message.end; return obj; }, fromAminoMsg(object: EnumDescriptorProto_EnumReservedRangeAminoMsg): EnumDescriptorProto_EnumReservedRange { @@ -3406,8 +3406,8 @@ export const EnumValueDescriptorProto = { }, toAmino(message: EnumValueDescriptorProto, useInterfaces: boolean = false): EnumValueDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name; - obj.number = message.number; + obj.name = message.name === "" ? undefined : message.name; + obj.number = message.number === 0 ? undefined : message.number; obj.options = message.options ? EnumValueOptions.toAmino(message.options, useInterfaces) : undefined; return obj; }, @@ -3491,11 +3491,11 @@ export const ServiceDescriptorProto = { }, toAmino(message: ServiceDescriptorProto, useInterfaces: boolean = false): ServiceDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; if (message.method) { obj.method = message.method.map(e => e ? MethodDescriptorProto.toAmino(e, useInterfaces) : undefined); } else { - obj.method = []; + obj.method = message.method; } obj.options = message.options ? ServiceOptions.toAmino(message.options, useInterfaces) : undefined; return obj; @@ -3615,12 +3615,12 @@ export const MethodDescriptorProto = { }, toAmino(message: MethodDescriptorProto, useInterfaces: boolean = false): MethodDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name; - obj.input_type = message.inputType; - obj.output_type = message.outputType; + obj.name = message.name === "" ? undefined : message.name; + obj.input_type = message.inputType === "" ? undefined : message.inputType; + obj.output_type = message.outputType === "" ? undefined : message.outputType; obj.options = message.options ? MethodOptions.toAmino(message.options, useInterfaces) : undefined; - obj.client_streaming = message.clientStreaming; - obj.server_streaming = message.serverStreaming; + obj.client_streaming = message.clientStreaming === false ? undefined : message.clientStreaming; + obj.server_streaming = message.serverStreaming === false ? undefined : message.serverStreaming; return obj; }, fromAminoMsg(object: MethodDescriptorProtoAminoMsg): MethodDescriptorProto { @@ -3852,7 +3852,7 @@ export const FileOptions = { message.javaStringCheckUtf8 = object.java_string_check_utf8; } if (object.optimize_for !== undefined && object.optimize_for !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimize_for); + message.optimizeFor = object.optimize_for; } if (object.go_package !== undefined && object.go_package !== null) { message.goPackage = object.go_package; @@ -3901,30 +3901,30 @@ export const FileOptions = { }, toAmino(message: FileOptions, useInterfaces: boolean = false): FileOptionsAmino { const obj: any = {}; - obj.java_package = message.javaPackage; - obj.java_outer_classname = message.javaOuterClassname; - obj.java_multiple_files = message.javaMultipleFiles; - obj.java_generate_equals_and_hash = message.javaGenerateEqualsAndHash; - obj.java_string_check_utf8 = message.javaStringCheckUtf8; - obj.optimize_for = message.optimizeFor; - obj.go_package = message.goPackage; - obj.cc_generic_services = message.ccGenericServices; - obj.java_generic_services = message.javaGenericServices; - obj.py_generic_services = message.pyGenericServices; - obj.php_generic_services = message.phpGenericServices; - obj.deprecated = message.deprecated; - obj.cc_enable_arenas = message.ccEnableArenas; - obj.objc_class_prefix = message.objcClassPrefix; - obj.csharp_namespace = message.csharpNamespace; - obj.swift_prefix = message.swiftPrefix; - obj.php_class_prefix = message.phpClassPrefix; - obj.php_namespace = message.phpNamespace; - obj.php_metadata_namespace = message.phpMetadataNamespace; - obj.ruby_package = message.rubyPackage; + obj.java_package = message.javaPackage === "" ? undefined : message.javaPackage; + obj.java_outer_classname = message.javaOuterClassname === "" ? undefined : message.javaOuterClassname; + obj.java_multiple_files = message.javaMultipleFiles === false ? undefined : message.javaMultipleFiles; + obj.java_generate_equals_and_hash = message.javaGenerateEqualsAndHash === false ? undefined : message.javaGenerateEqualsAndHash; + obj.java_string_check_utf8 = message.javaStringCheckUtf8 === false ? undefined : message.javaStringCheckUtf8; + obj.optimize_for = message.optimizeFor === 1 ? undefined : message.optimizeFor; + obj.go_package = message.goPackage === "" ? undefined : message.goPackage; + obj.cc_generic_services = message.ccGenericServices === false ? undefined : message.ccGenericServices; + obj.java_generic_services = message.javaGenericServices === false ? undefined : message.javaGenericServices; + obj.py_generic_services = message.pyGenericServices === false ? undefined : message.pyGenericServices; + obj.php_generic_services = message.phpGenericServices === false ? undefined : message.phpGenericServices; + obj.deprecated = message.deprecated === false ? undefined : message.deprecated; + obj.cc_enable_arenas = message.ccEnableArenas === false ? undefined : message.ccEnableArenas; + obj.objc_class_prefix = message.objcClassPrefix === "" ? undefined : message.objcClassPrefix; + obj.csharp_namespace = message.csharpNamespace === "" ? undefined : message.csharpNamespace; + obj.swift_prefix = message.swiftPrefix === "" ? undefined : message.swiftPrefix; + obj.php_class_prefix = message.phpClassPrefix === "" ? undefined : message.phpClassPrefix; + obj.php_namespace = message.phpNamespace === "" ? undefined : message.phpNamespace; + obj.php_metadata_namespace = message.phpMetadataNamespace === "" ? undefined : message.phpMetadataNamespace; + obj.ruby_package = message.rubyPackage === "" ? undefined : message.rubyPackage; if (message.uninterpretedOption) { obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e, useInterfaces) : undefined); } else { - obj.uninterpreted_option = []; + obj.uninterpreted_option = message.uninterpretedOption; } return obj; }, @@ -4030,14 +4030,14 @@ export const MessageOptions = { }, toAmino(message: MessageOptions, useInterfaces: boolean = false): MessageOptionsAmino { const obj: any = {}; - obj.message_set_wire_format = message.messageSetWireFormat; - obj.no_standard_descriptor_accessor = message.noStandardDescriptorAccessor; - obj.deprecated = message.deprecated; - obj.map_entry = message.mapEntry; + obj.message_set_wire_format = message.messageSetWireFormat === false ? undefined : message.messageSetWireFormat; + obj.no_standard_descriptor_accessor = message.noStandardDescriptorAccessor === false ? undefined : message.noStandardDescriptorAccessor; + obj.deprecated = message.deprecated === false ? undefined : message.deprecated; + obj.map_entry = message.mapEntry === false ? undefined : message.mapEntry; if (message.uninterpretedOption) { obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e, useInterfaces) : undefined); } else { - obj.uninterpreted_option = []; + obj.uninterpreted_option = message.uninterpretedOption; } return obj; }, @@ -4143,13 +4143,13 @@ export const FieldOptions = { fromAmino(object: FieldOptionsAmino): FieldOptions { const message = createBaseFieldOptions(); if (object.ctype !== undefined && object.ctype !== null) { - message.ctype = fieldOptions_CTypeFromJSON(object.ctype); + message.ctype = object.ctype; } if (object.packed !== undefined && object.packed !== null) { message.packed = object.packed; } if (object.jstype !== undefined && object.jstype !== null) { - message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); + message.jstype = object.jstype; } if (object.lazy !== undefined && object.lazy !== null) { message.lazy = object.lazy; @@ -4165,16 +4165,16 @@ export const FieldOptions = { }, toAmino(message: FieldOptions, useInterfaces: boolean = false): FieldOptionsAmino { const obj: any = {}; - obj.ctype = message.ctype; - obj.packed = message.packed; - obj.jstype = message.jstype; - obj.lazy = message.lazy; - obj.deprecated = message.deprecated; - obj.weak = message.weak; + obj.ctype = message.ctype === 1 ? undefined : message.ctype; + obj.packed = message.packed === false ? undefined : message.packed; + obj.jstype = message.jstype === 1 ? undefined : message.jstype; + obj.lazy = message.lazy === false ? undefined : message.lazy; + obj.deprecated = message.deprecated === false ? undefined : message.deprecated; + obj.weak = message.weak === false ? undefined : message.weak; if (message.uninterpretedOption) { obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e, useInterfaces) : undefined); } else { - obj.uninterpreted_option = []; + obj.uninterpreted_option = message.uninterpretedOption; } return obj; }, @@ -4239,7 +4239,7 @@ export const OneofOptions = { if (message.uninterpretedOption) { obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e, useInterfaces) : undefined); } else { - obj.uninterpreted_option = []; + obj.uninterpreted_option = message.uninterpretedOption; } return obj; }, @@ -4323,12 +4323,12 @@ export const EnumOptions = { }, toAmino(message: EnumOptions, useInterfaces: boolean = false): EnumOptionsAmino { const obj: any = {}; - obj.allow_alias = message.allowAlias; - obj.deprecated = message.deprecated; + obj.allow_alias = message.allowAlias === false ? undefined : message.allowAlias; + obj.deprecated = message.deprecated === false ? undefined : message.deprecated; if (message.uninterpretedOption) { obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e, useInterfaces) : undefined); } else { - obj.uninterpreted_option = []; + obj.uninterpreted_option = message.uninterpretedOption; } return obj; }, @@ -4401,11 +4401,11 @@ export const EnumValueOptions = { }, toAmino(message: EnumValueOptions, useInterfaces: boolean = false): EnumValueOptionsAmino { const obj: any = {}; - obj.deprecated = message.deprecated; + obj.deprecated = message.deprecated === false ? undefined : message.deprecated; if (message.uninterpretedOption) { obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e, useInterfaces) : undefined); } else { - obj.uninterpreted_option = []; + obj.uninterpreted_option = message.uninterpretedOption; } return obj; }, @@ -4478,11 +4478,11 @@ export const ServiceOptions = { }, toAmino(message: ServiceOptions, useInterfaces: boolean = false): ServiceOptionsAmino { const obj: any = {}; - obj.deprecated = message.deprecated; + obj.deprecated = message.deprecated === false ? undefined : message.deprecated; if (message.uninterpretedOption) { obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e, useInterfaces) : undefined); } else { - obj.uninterpreted_option = []; + obj.uninterpreted_option = message.uninterpretedOption; } return obj; }, @@ -4559,19 +4559,19 @@ export const MethodOptions = { message.deprecated = object.deprecated; } if (object.idempotency_level !== undefined && object.idempotency_level !== null) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotency_level); + message.idempotencyLevel = object.idempotency_level; } message.uninterpretedOption = object.uninterpreted_option?.map(e => UninterpretedOption.fromAmino(e)) || []; return message; }, toAmino(message: MethodOptions, useInterfaces: boolean = false): MethodOptionsAmino { const obj: any = {}; - obj.deprecated = message.deprecated; - obj.idempotency_level = message.idempotencyLevel; + obj.deprecated = message.deprecated === false ? undefined : message.deprecated; + obj.idempotency_level = message.idempotencyLevel === 1 ? undefined : message.idempotencyLevel; if (message.uninterpretedOption) { obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e, useInterfaces) : undefined); } else { - obj.uninterpreted_option = []; + obj.uninterpreted_option = message.uninterpretedOption; } return obj; }, @@ -4702,14 +4702,14 @@ export const UninterpretedOption = { if (message.name) { obj.name = message.name.map(e => e ? UninterpretedOption_NamePart.toAmino(e, useInterfaces) : undefined); } else { - obj.name = []; + obj.name = message.name; } - obj.identifier_value = message.identifierValue; - obj.positive_int_value = message.positiveIntValue ? message.positiveIntValue.toString() : undefined; - obj.negative_int_value = message.negativeIntValue ? message.negativeIntValue.toString() : undefined; - obj.double_value = message.doubleValue; + obj.identifier_value = message.identifierValue === "" ? undefined : message.identifierValue; + obj.positive_int_value = message.positiveIntValue !== BigInt(0) ? message.positiveIntValue.toString() : undefined; + obj.negative_int_value = message.negativeIntValue !== BigInt(0) ? message.negativeIntValue.toString() : undefined; + obj.double_value = message.doubleValue === 0 ? undefined : message.doubleValue; obj.string_value = message.stringValue ? base64FromBytes(message.stringValue) : undefined; - obj.aggregate_value = message.aggregateValue; + obj.aggregate_value = message.aggregateValue === "" ? undefined : message.aggregateValue; return obj; }, fromAminoMsg(object: UninterpretedOptionAminoMsg): UninterpretedOption { @@ -4783,8 +4783,8 @@ export const UninterpretedOption_NamePart = { }, toAmino(message: UninterpretedOption_NamePart, useInterfaces: boolean = false): UninterpretedOption_NamePartAmino { const obj: any = {}; - obj.name_part = message.namePart; - obj.is_extension = message.isExtension; + obj.name_part = message.namePart === "" ? undefined : message.namePart; + obj.is_extension = message.isExtension === false ? undefined : message.isExtension; return obj; }, fromAminoMsg(object: UninterpretedOption_NamePartAminoMsg): UninterpretedOption_NamePart { @@ -4848,7 +4848,7 @@ export const SourceCodeInfo = { if (message.location) { obj.location = message.location.map(e => e ? SourceCodeInfo_Location.toAmino(e, useInterfaces) : undefined); } else { - obj.location = []; + obj.location = message.location; } return obj; }, @@ -4971,19 +4971,19 @@ export const SourceCodeInfo_Location = { if (message.path) { obj.path = message.path.map(e => e); } else { - obj.path = []; + obj.path = message.path; } if (message.span) { obj.span = message.span.map(e => e); } else { - obj.span = []; + obj.span = message.span; } - obj.leading_comments = message.leadingComments; - obj.trailing_comments = message.trailingComments; + obj.leading_comments = message.leadingComments === "" ? undefined : message.leadingComments; + obj.trailing_comments = message.trailingComments === "" ? undefined : message.trailingComments; if (message.leadingDetachedComments) { obj.leading_detached_comments = message.leadingDetachedComments.map(e => e); } else { - obj.leading_detached_comments = []; + obj.leading_detached_comments = message.leadingDetachedComments; } return obj; }, @@ -5048,7 +5048,7 @@ export const GeneratedCodeInfo = { if (message.annotation) { obj.annotation = message.annotation.map(e => e ? GeneratedCodeInfo_Annotation.toAmino(e, useInterfaces) : undefined); } else { - obj.annotation = []; + obj.annotation = message.annotation; } return obj; }, @@ -5155,11 +5155,11 @@ export const GeneratedCodeInfo_Annotation = { if (message.path) { obj.path = message.path.map(e => e); } else { - obj.path = []; + obj.path = message.path; } - obj.source_file = message.sourceFile; - obj.begin = message.begin; - obj.end = message.end; + obj.source_file = message.sourceFile === "" ? undefined : message.sourceFile; + obj.begin = message.begin === 0 ? undefined : message.begin; + obj.end = message.end === 0 ? undefined : message.end; return obj; }, fromAminoMsg(object: GeneratedCodeInfo_AnnotationAminoMsg): GeneratedCodeInfo_Annotation { diff --git a/packages/types/protobuf/codegen/helpers.ts b/packages/types/protobuf/codegen/helpers.ts index f098045979..1f68c7c126 100644 --- a/packages/types/protobuf/codegen/helpers.ts +++ b/packages/types/protobuf/codegen/helpers.ts @@ -1,7 +1,7 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.4.12 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.8.3 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. +* and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -46,7 +46,7 @@ export interface AminoHeight { readonly revision_height?: string; } -export function omitDefault( +export function omitDefault( input: T ): T | undefined { if (typeof input === 'string') { @@ -57,6 +57,10 @@ export function omitDefault( return input === 0 ? undefined : input; } + if (typeof input === "boolean"){ + return input === false ? undefined : input; + } + if (typeof input === 'bigint') { return input === BigInt(0) ? undefined : input; } diff --git a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/controller.ts b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/controller.ts index ec13b893c5..2e74cf319c 100644 --- a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/controller.ts +++ b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/controller.ts @@ -74,7 +74,7 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.controller_enabled = message.controllerEnabled; + obj.controller_enabled = message.controllerEnabled === false ? undefined : message.controllerEnabled; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/query.ts b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/query.ts index 55f09f3444..43b3a99323 100644 --- a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/query.ts +++ b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/query.ts @@ -135,8 +135,8 @@ export const QueryInterchainAccountRequest = { }, toAmino(message: QueryInterchainAccountRequest, useInterfaces: boolean = false): QueryInterchainAccountRequestAmino { const obj: any = {}; - obj.owner = message.owner; - obj.connection_id = message.connectionId; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; return obj; }, fromAminoMsg(object: QueryInterchainAccountRequestAminoMsg): QueryInterchainAccountRequest { @@ -205,7 +205,7 @@ export const QueryInterchainAccountResponse = { }, toAmino(message: QueryInterchainAccountResponse, useInterfaces: boolean = false): QueryInterchainAccountResponseAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; return obj; }, fromAminoMsg(object: QueryInterchainAccountResponseAminoMsg): QueryInterchainAccountResponse { diff --git a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/tx.ts b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/tx.ts index a95b693c37..fe8494c85e 100644 --- a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/tx.ts +++ b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/controller/v1/tx.ts @@ -223,9 +223,9 @@ export const MsgRegisterInterchainAccount = { }, toAmino(message: MsgRegisterInterchainAccount, useInterfaces: boolean = false): MsgRegisterInterchainAccountAmino { const obj: any = {}; - obj.owner = message.owner; - obj.connection_id = message.connectionId; - obj.version = message.version; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.version = message.version === "" ? undefined : message.version; return obj; }, fromAminoMsg(object: MsgRegisterInterchainAccountAminoMsg): MsgRegisterInterchainAccount { @@ -305,8 +305,8 @@ export const MsgRegisterInterchainAccountResponse = { }, toAmino(message: MsgRegisterInterchainAccountResponse, useInterfaces: boolean = false): MsgRegisterInterchainAccountResponseAmino { const obj: any = {}; - obj.channel_id = message.channelId; - obj.port_id = message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; return obj; }, fromAminoMsg(object: MsgRegisterInterchainAccountResponseAminoMsg): MsgRegisterInterchainAccountResponse { @@ -408,10 +408,10 @@ export const MsgSendTx = { }, toAmino(message: MsgSendTx, useInterfaces: boolean = false): MsgSendTxAmino { const obj: any = {}; - obj.owner = message.owner; - obj.connection_id = message.connectionId; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; obj.packet_data = message.packetData ? InterchainAccountPacketData.toAmino(message.packetData, useInterfaces) : undefined; - obj.relative_timeout = message.relativeTimeout ? message.relativeTimeout.toString() : undefined; + obj.relative_timeout = message.relativeTimeout !== BigInt(0) ? message.relativeTimeout.toString() : undefined; return obj; }, fromAminoMsg(object: MsgSendTxAminoMsg): MsgSendTx { @@ -480,7 +480,7 @@ export const MsgSendTxResponse = { }, toAmino(message: MsgSendTxResponse, useInterfaces: boolean = false): MsgSendTxResponseAmino { const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: MsgSendTxResponseAminoMsg): MsgSendTxResponse { @@ -560,7 +560,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/host/v1/host.ts b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/host/v1/host.ts index 506093f1ee..938b41f112 100644 --- a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/host/v1/host.ts +++ b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/host/v1/host.ts @@ -88,11 +88,11 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.host_enabled = message.hostEnabled; + obj.host_enabled = message.hostEnabled === false ? undefined : message.hostEnabled; if (message.allowMessages) { obj.allow_messages = message.allowMessages.map(e => e); } else { - obj.allow_messages = []; + obj.allow_messages = message.allowMessages; } return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/host/v1/tx.ts b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/host/v1/tx.ts index 7664027055..2d3266478e 100644 --- a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/host/v1/tx.ts +++ b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/host/v1/tx.ts @@ -105,7 +105,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/account.ts b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/account.ts index 83153235bb..42b74ca59b 100644 --- a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/account.ts +++ b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/account.ts @@ -82,7 +82,7 @@ export const InterchainAccount = { toAmino(message: InterchainAccount, useInterfaces: boolean = false): InterchainAccountAmino { const obj: any = {}; obj.base_account = message.baseAccount ? BaseAccount.toAmino(message.baseAccount, useInterfaces) : undefined; - obj.account_owner = message.accountOwner; + obj.account_owner = message.accountOwner === "" ? undefined : message.accountOwner; return obj; }, fromAminoMsg(object: InterchainAccountAminoMsg): InterchainAccount { diff --git a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/metadata.ts b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/metadata.ts index 294a3c558f..ff313f6412 100644 --- a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/metadata.ts +++ b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/metadata.ts @@ -160,12 +160,12 @@ export const Metadata = { }, toAmino(message: Metadata, useInterfaces: boolean = false): MetadataAmino { const obj: any = {}; - obj.version = message.version; - obj.controller_connection_id = message.controllerConnectionId; - obj.host_connection_id = message.hostConnectionId; - obj.address = message.address; - obj.encoding = message.encoding; - obj.tx_type = message.txType; + obj.version = message.version === "" ? undefined : message.version; + obj.controller_connection_id = message.controllerConnectionId === "" ? undefined : message.controllerConnectionId; + obj.host_connection_id = message.hostConnectionId === "" ? undefined : message.hostConnectionId; + obj.address = message.address === "" ? undefined : message.address; + obj.encoding = message.encoding === "" ? undefined : message.encoding; + obj.tx_type = message.txType === "" ? undefined : message.txType; return obj; }, fromAminoMsg(object: MetadataAminoMsg): Metadata { diff --git a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/packet.ts b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/packet.ts index cb1f7fdb4a..2375a31f92 100644 --- a/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/packet.ts +++ b/packages/types/protobuf/codegen/ibc/applications/interchain_accounts/v1/packet.ts @@ -139,7 +139,7 @@ export const InterchainAccountPacketData = { fromAmino(object: InterchainAccountPacketDataAmino): InterchainAccountPacketData { const message = createBaseInterchainAccountPacketData(); if (object.type !== undefined && object.type !== null) { - message.type = typeFromJSON(object.type); + message.type = object.type; } if (object.data !== undefined && object.data !== null) { message.data = bytesFromBase64(object.data); @@ -151,9 +151,9 @@ export const InterchainAccountPacketData = { }, toAmino(message: InterchainAccountPacketData, useInterfaces: boolean = false): InterchainAccountPacketDataAmino { const obj: any = {}; - obj.type = message.type; + obj.type = message.type === 0 ? undefined : message.type; obj.data = message.data ? base64FromBytes(message.data) : undefined; - obj.memo = message.memo; + obj.memo = message.memo === "" ? undefined : message.memo; return obj; }, fromAminoMsg(object: InterchainAccountPacketDataAminoMsg): InterchainAccountPacketData { @@ -223,7 +223,7 @@ export const CosmosTx = { if (message.messages) { obj.messages = message.messages.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); } else { - obj.messages = []; + obj.messages = message.messages; } return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/applications/transfer/v1/authz.ts b/packages/types/protobuf/codegen/ibc/applications/transfer/v1/authz.ts index deab50d340..1ca794b42d 100644 --- a/packages/types/protobuf/codegen/ibc/applications/transfer/v1/authz.ts +++ b/packages/types/protobuf/codegen/ibc/applications/transfer/v1/authz.ts @@ -144,17 +144,17 @@ export const Allocation = { }, toAmino(message: Allocation, useInterfaces: boolean = false): AllocationAmino { const obj: any = {}; - obj.source_port = message.sourcePort; - obj.source_channel = message.sourceChannel; + obj.source_port = message.sourcePort === "" ? undefined : message.sourcePort; + obj.source_channel = message.sourceChannel === "" ? undefined : message.sourceChannel; if (message.spendLimit) { obj.spend_limit = message.spendLimit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.spend_limit = []; + obj.spend_limit = message.spendLimit; } if (message.allowList) { obj.allow_list = message.allowList.map(e => e); } else { - obj.allow_list = []; + obj.allow_list = message.allowList; } return obj; }, @@ -226,7 +226,7 @@ export const TransferAuthorization = { if (message.allocations) { obj.allocations = message.allocations.map(e => e ? Allocation.toAmino(e, useInterfaces) : undefined); } else { - obj.allocations = []; + obj.allocations = message.allocations; } return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/applications/transfer/v1/genesis.ts b/packages/types/protobuf/codegen/ibc/applications/transfer/v1/genesis.ts index 247a0e58e4..fc2a6f8006 100644 --- a/packages/types/protobuf/codegen/ibc/applications/transfer/v1/genesis.ts +++ b/packages/types/protobuf/codegen/ibc/applications/transfer/v1/genesis.ts @@ -112,17 +112,17 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.port_id = message.portId; + obj.port_id = message.portId === "" ? undefined : message.portId; if (message.denomTraces) { obj.denom_traces = message.denomTraces.map(e => e ? DenomTrace.toAmino(e, useInterfaces) : undefined); } else { - obj.denom_traces = []; + obj.denom_traces = message.denomTraces; } obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; if (message.totalEscrowed) { obj.total_escrowed = message.totalEscrowed.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_escrowed = []; + obj.total_escrowed = message.totalEscrowed; } return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/applications/transfer/v1/query.ts b/packages/types/protobuf/codegen/ibc/applications/transfer/v1/query.ts index ce304f425b..8deecf515a 100644 --- a/packages/types/protobuf/codegen/ibc/applications/transfer/v1/query.ts +++ b/packages/types/protobuf/codegen/ibc/applications/transfer/v1/query.ts @@ -363,7 +363,7 @@ export const QueryDenomTraceRequest = { }, toAmino(message: QueryDenomTraceRequest, useInterfaces: boolean = false): QueryDenomTraceRequestAmino { const obj: any = {}; - obj.hash = message.hash; + obj.hash = message.hash === "" ? undefined : message.hash; return obj; }, fromAminoMsg(object: QueryDenomTraceRequestAminoMsg): QueryDenomTraceRequest { @@ -582,7 +582,7 @@ export const QueryDenomTracesResponse = { if (message.denomTraces) { obj.denom_traces = message.denomTraces.map(e => e ? DenomTrace.toAmino(e, useInterfaces) : undefined); } else { - obj.denom_traces = []; + obj.denom_traces = message.denomTraces; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -778,7 +778,7 @@ export const QueryDenomHashRequest = { }, toAmino(message: QueryDenomHashRequest, useInterfaces: boolean = false): QueryDenomHashRequestAmino { const obj: any = {}; - obj.trace = message.trace; + obj.trace = message.trace === "" ? undefined : message.trace; return obj; }, fromAminoMsg(object: QueryDenomHashRequestAminoMsg): QueryDenomHashRequest { @@ -847,7 +847,7 @@ export const QueryDenomHashResponse = { }, toAmino(message: QueryDenomHashResponse, useInterfaces: boolean = false): QueryDenomHashResponseAmino { const obj: any = {}; - obj.hash = message.hash; + obj.hash = message.hash === "" ? undefined : message.hash; return obj; }, fromAminoMsg(object: QueryDenomHashResponseAminoMsg): QueryDenomHashResponse { @@ -927,8 +927,8 @@ export const QueryEscrowAddressRequest = { }, toAmino(message: QueryEscrowAddressRequest, useInterfaces: boolean = false): QueryEscrowAddressRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; return obj; }, fromAminoMsg(object: QueryEscrowAddressRequestAminoMsg): QueryEscrowAddressRequest { @@ -997,7 +997,7 @@ export const QueryEscrowAddressResponse = { }, toAmino(message: QueryEscrowAddressResponse, useInterfaces: boolean = false): QueryEscrowAddressResponseAmino { const obj: any = {}; - obj.escrow_address = message.escrowAddress; + obj.escrow_address = message.escrowAddress === "" ? undefined : message.escrowAddress; return obj; }, fromAminoMsg(object: QueryEscrowAddressResponseAminoMsg): QueryEscrowAddressResponse { @@ -1066,7 +1066,7 @@ export const QueryTotalEscrowForDenomRequest = { }, toAmino(message: QueryTotalEscrowForDenomRequest, useInterfaces: boolean = false): QueryTotalEscrowForDenomRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryTotalEscrowForDenomRequestAminoMsg): QueryTotalEscrowForDenomRequest { diff --git a/packages/types/protobuf/codegen/ibc/applications/transfer/v1/transfer.ts b/packages/types/protobuf/codegen/ibc/applications/transfer/v1/transfer.ts index 09b6646f03..e540a4aab8 100644 --- a/packages/types/protobuf/codegen/ibc/applications/transfer/v1/transfer.ts +++ b/packages/types/protobuf/codegen/ibc/applications/transfer/v1/transfer.ts @@ -150,8 +150,8 @@ export const DenomTrace = { }, toAmino(message: DenomTrace, useInterfaces: boolean = false): DenomTraceAmino { const obj: any = {}; - obj.path = message.path; - obj.base_denom = message.baseDenom; + obj.path = message.path === "" ? undefined : message.path; + obj.base_denom = message.baseDenom === "" ? undefined : message.baseDenom; return obj; }, fromAminoMsg(object: DenomTraceAminoMsg): DenomTrace { @@ -231,8 +231,8 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.send_enabled = message.sendEnabled; - obj.receive_enabled = message.receiveEnabled; + obj.send_enabled = message.sendEnabled === false ? undefined : message.sendEnabled; + obj.receive_enabled = message.receiveEnabled === false ? undefined : message.receiveEnabled; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/ibc/applications/transfer/v1/tx.ts b/packages/types/protobuf/codegen/ibc/applications/transfer/v1/tx.ts index 6d0dd971df..f9cc61b5e8 100644 --- a/packages/types/protobuf/codegen/ibc/applications/transfer/v1/tx.ts +++ b/packages/types/protobuf/codegen/ibc/applications/transfer/v1/tx.ts @@ -284,14 +284,14 @@ export const MsgTransfer = { }, toAmino(message: MsgTransfer, useInterfaces: boolean = false): MsgTransferAmino { const obj: any = {}; - obj.source_port = message.sourcePort; - obj.source_channel = message.sourceChannel; + obj.source_port = message.sourcePort === "" ? undefined : message.sourcePort; + obj.source_channel = message.sourceChannel === "" ? undefined : message.sourceChannel; obj.token = message.token ? Coin.toAmino(message.token, useInterfaces) : undefined; - obj.sender = message.sender; - obj.receiver = message.receiver; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.receiver = message.receiver === "" ? undefined : message.receiver; obj.timeout_height = message.timeoutHeight ? Height.toAmino(message.timeoutHeight, useInterfaces) : {}; - obj.timeout_timestamp = message.timeoutTimestamp ? message.timeoutTimestamp.toString() : undefined; - obj.memo = message.memo; + obj.timeout_timestamp = message.timeoutTimestamp !== BigInt(0) ? message.timeoutTimestamp.toString() : undefined; + obj.memo = message.memo === "" ? undefined : message.memo; return obj; }, fromAminoMsg(object: MsgTransferAminoMsg): MsgTransfer { @@ -360,7 +360,7 @@ export const MsgTransferResponse = { }, toAmino(message: MsgTransferResponse, useInterfaces: boolean = false): MsgTransferResponseAmino { const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: MsgTransferResponseAminoMsg): MsgTransferResponse { @@ -440,7 +440,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/core/channel/v1/channel.ts b/packages/types/protobuf/codegen/ibc/core/channel/v1/channel.ts index 246921c0c6..d9fc253f67 100644 --- a/packages/types/protobuf/codegen/ibc/core/channel/v1/channel.ts +++ b/packages/types/protobuf/codegen/ibc/core/channel/v1/channel.ts @@ -582,10 +582,10 @@ export const Channel = { fromAmino(object: ChannelAmino): Channel { const message = createBaseChannel(); if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); + message.state = object.state; } if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = orderFromJSON(object.ordering); + message.ordering = object.ordering; } if (object.counterparty !== undefined && object.counterparty !== null) { message.counterparty = Counterparty.fromAmino(object.counterparty); @@ -598,15 +598,15 @@ export const Channel = { }, toAmino(message: Channel, useInterfaces: boolean = false): ChannelAmino { const obj: any = {}; - obj.state = message.state; - obj.ordering = message.ordering; + obj.state = message.state === 0 ? undefined : message.state; + obj.ordering = message.ordering === 0 ? undefined : message.ordering; obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty, useInterfaces) : undefined; if (message.connectionHops) { obj.connection_hops = message.connectionHops.map(e => e); } else { - obj.connection_hops = []; + obj.connection_hops = message.connectionHops; } - obj.version = message.version; + obj.version = message.version === "" ? undefined : message.version; return obj; }, fromAminoMsg(object: ChannelAminoMsg): Channel { @@ -717,10 +717,10 @@ export const IdentifiedChannel = { fromAmino(object: IdentifiedChannelAmino): IdentifiedChannel { const message = createBaseIdentifiedChannel(); if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); + message.state = object.state; } if (object.ordering !== undefined && object.ordering !== null) { - message.ordering = orderFromJSON(object.ordering); + message.ordering = object.ordering; } if (object.counterparty !== undefined && object.counterparty !== null) { message.counterparty = Counterparty.fromAmino(object.counterparty); @@ -739,17 +739,17 @@ export const IdentifiedChannel = { }, toAmino(message: IdentifiedChannel, useInterfaces: boolean = false): IdentifiedChannelAmino { const obj: any = {}; - obj.state = message.state; - obj.ordering = message.ordering; + obj.state = message.state === 0 ? undefined : message.state; + obj.ordering = message.ordering === 0 ? undefined : message.ordering; obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty, useInterfaces) : undefined; if (message.connectionHops) { obj.connection_hops = message.connectionHops.map(e => e); } else { - obj.connection_hops = []; + obj.connection_hops = message.connectionHops; } - obj.version = message.version; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.version = message.version === "" ? undefined : message.version; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; return obj; }, fromAminoMsg(object: IdentifiedChannelAminoMsg): IdentifiedChannel { @@ -829,8 +829,8 @@ export const Counterparty = { }, toAmino(message: Counterparty, useInterfaces: boolean = false): CounterpartyAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; return obj; }, fromAminoMsg(object: CounterpartyAminoMsg): Counterparty { @@ -976,14 +976,14 @@ export const Packet = { }, toAmino(message: Packet, useInterfaces: boolean = false): PacketAmino { const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.source_port = message.sourcePort; - obj.source_channel = message.sourceChannel; - obj.destination_port = message.destinationPort; - obj.destination_channel = message.destinationChannel; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; + obj.source_port = message.sourcePort === "" ? undefined : message.sourcePort; + obj.source_channel = message.sourceChannel === "" ? undefined : message.sourceChannel; + obj.destination_port = message.destinationPort === "" ? undefined : message.destinationPort; + obj.destination_channel = message.destinationChannel === "" ? undefined : message.destinationChannel; obj.data = message.data ? base64FromBytes(message.data) : undefined; obj.timeout_height = message.timeoutHeight ? Height.toAmino(message.timeoutHeight, useInterfaces) : {}; - obj.timeout_timestamp = message.timeoutTimestamp ? message.timeoutTimestamp.toString() : undefined; + obj.timeout_timestamp = message.timeoutTimestamp !== BigInt(0) ? message.timeoutTimestamp.toString() : undefined; return obj; }, fromAminoMsg(object: PacketAminoMsg): Packet { @@ -1085,9 +1085,9 @@ export const PacketState = { }, toAmino(message: PacketState, useInterfaces: boolean = false): PacketStateAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -1179,9 +1179,9 @@ export const PacketId = { }, toAmino(message: PacketId, useInterfaces: boolean = false): PacketIdAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: PacketIdAminoMsg): PacketId { @@ -1262,7 +1262,7 @@ export const Acknowledgement = { toAmino(message: Acknowledgement, useInterfaces: boolean = false): AcknowledgementAmino { const obj: any = {}; obj.result = message.result ? base64FromBytes(message.result) : undefined; - obj.error = message.error; + obj.error = message.error === null ? undefined : message.error; return obj; }, fromAminoMsg(object: AcknowledgementAminoMsg): Acknowledgement { @@ -1343,7 +1343,7 @@ export const Timeout = { toAmino(message: Timeout, useInterfaces: boolean = false): TimeoutAmino { const obj: any = {}; obj.height = message.height ? Height.toAmino(message.height, useInterfaces) : {}; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; + obj.timestamp = message.timestamp !== BigInt(0) ? message.timestamp.toString() : undefined; return obj; }, fromAminoMsg(object: TimeoutAminoMsg): Timeout { diff --git a/packages/types/protobuf/codegen/ibc/core/channel/v1/genesis.ts b/packages/types/protobuf/codegen/ibc/core/channel/v1/genesis.ts index 1774fe679b..66f0f8fd6d 100644 --- a/packages/types/protobuf/codegen/ibc/core/channel/v1/genesis.ts +++ b/packages/types/protobuf/codegen/ibc/core/channel/v1/genesis.ts @@ -189,39 +189,39 @@ export const GenesisState = { if (message.channels) { obj.channels = message.channels.map(e => e ? IdentifiedChannel.toAmino(e, useInterfaces) : undefined); } else { - obj.channels = []; + obj.channels = message.channels; } if (message.acknowledgements) { obj.acknowledgements = message.acknowledgements.map(e => e ? PacketState.toAmino(e, useInterfaces) : undefined); } else { - obj.acknowledgements = []; + obj.acknowledgements = message.acknowledgements; } if (message.commitments) { obj.commitments = message.commitments.map(e => e ? PacketState.toAmino(e, useInterfaces) : undefined); } else { - obj.commitments = []; + obj.commitments = message.commitments; } if (message.receipts) { obj.receipts = message.receipts.map(e => e ? PacketState.toAmino(e, useInterfaces) : undefined); } else { - obj.receipts = []; + obj.receipts = message.receipts; } if (message.sendSequences) { obj.send_sequences = message.sendSequences.map(e => e ? PacketSequence.toAmino(e, useInterfaces) : undefined); } else { - obj.send_sequences = []; + obj.send_sequences = message.sendSequences; } if (message.recvSequences) { obj.recv_sequences = message.recvSequences.map(e => e ? PacketSequence.toAmino(e, useInterfaces) : undefined); } else { - obj.recv_sequences = []; + obj.recv_sequences = message.recvSequences; } if (message.ackSequences) { obj.ack_sequences = message.ackSequences.map(e => e ? PacketSequence.toAmino(e, useInterfaces) : undefined); } else { - obj.ack_sequences = []; + obj.ack_sequences = message.ackSequences; } - obj.next_channel_sequence = message.nextChannelSequence ? message.nextChannelSequence.toString() : undefined; + obj.next_channel_sequence = message.nextChannelSequence !== BigInt(0) ? message.nextChannelSequence.toString() : undefined; return obj; }, fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { @@ -312,9 +312,9 @@ export const PacketSequence = { }, toAmino(message: PacketSequence, useInterfaces: boolean = false): PacketSequenceAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: PacketSequenceAminoMsg): PacketSequence { diff --git a/packages/types/protobuf/codegen/ibc/core/channel/v1/query.ts b/packages/types/protobuf/codegen/ibc/core/channel/v1/query.ts index 5417db244e..dba7cad389 100644 --- a/packages/types/protobuf/codegen/ibc/core/channel/v1/query.ts +++ b/packages/types/protobuf/codegen/ibc/core/channel/v1/query.ts @@ -1159,8 +1159,8 @@ export const QueryChannelRequest = { }, toAmino(message: QueryChannelRequest, useInterfaces: boolean = false): QueryChannelRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; return obj; }, fromAminoMsg(object: QueryChannelRequestAminoMsg): QueryChannelRequest { @@ -1414,7 +1414,7 @@ export const QueryChannelsResponse = { if (message.channels) { obj.channels = message.channels.map(e => e ? IdentifiedChannel.toAmino(e, useInterfaces) : undefined); } else { - obj.channels = []; + obj.channels = message.channels; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; obj.height = message.height ? Height.toAmino(message.height, useInterfaces) : {}; @@ -1497,7 +1497,7 @@ export const QueryConnectionChannelsRequest = { }, toAmino(message: QueryConnectionChannelsRequest, useInterfaces: boolean = false): QueryConnectionChannelsRequestAmino { const obj: any = {}; - obj.connection = message.connection; + obj.connection = message.connection === "" ? undefined : message.connection; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1590,7 +1590,7 @@ export const QueryConnectionChannelsResponse = { if (message.channels) { obj.channels = message.channels.map(e => e ? IdentifiedChannel.toAmino(e, useInterfaces) : undefined); } else { - obj.channels = []; + obj.channels = message.channels; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; obj.height = message.height ? Height.toAmino(message.height, useInterfaces) : {}; @@ -1673,8 +1673,8 @@ export const QueryChannelClientStateRequest = { }, toAmino(message: QueryChannelClientStateRequest, useInterfaces: boolean = false): QueryChannelClientStateRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; return obj; }, fromAminoMsg(object: QueryChannelClientStateRequestAminoMsg): QueryChannelClientStateRequest { @@ -1869,10 +1869,10 @@ export const QueryChannelConsensusStateRequest = { }, toAmino(message: QueryChannelConsensusStateRequest, useInterfaces: boolean = false): QueryChannelConsensusStateRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.revision_number = message.revisionNumber ? message.revisionNumber.toString() : undefined; - obj.revision_height = message.revisionHeight ? message.revisionHeight.toString() : undefined; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.revision_number = message.revisionNumber !== BigInt(0) ? message.revisionNumber.toString() : undefined; + obj.revision_height = message.revisionHeight !== BigInt(0) ? message.revisionHeight.toString() : undefined; return obj; }, fromAminoMsg(object: QueryChannelConsensusStateRequestAminoMsg): QueryChannelConsensusStateRequest { @@ -1975,7 +1975,7 @@ export const QueryChannelConsensusStateResponse = { toAmino(message: QueryChannelConsensusStateResponse, useInterfaces: boolean = false): QueryChannelConsensusStateResponseAmino { const obj: any = {}; obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState, useInterfaces) : undefined; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.proof = message.proof ? base64FromBytes(message.proof) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; return obj; @@ -2068,9 +2068,9 @@ export const QueryPacketCommitmentRequest = { }, toAmino(message: QueryPacketCommitmentRequest, useInterfaces: boolean = false): QueryPacketCommitmentRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: QueryPacketCommitmentRequestAminoMsg): QueryPacketCommitmentRequest { @@ -2254,8 +2254,8 @@ export const QueryPacketCommitmentsRequest = { }, toAmino(message: QueryPacketCommitmentsRequest, useInterfaces: boolean = false): QueryPacketCommitmentsRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2348,7 +2348,7 @@ export const QueryPacketCommitmentsResponse = { if (message.commitments) { obj.commitments = message.commitments.map(e => e ? PacketState.toAmino(e, useInterfaces) : undefined); } else { - obj.commitments = []; + obj.commitments = message.commitments; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; obj.height = message.height ? Height.toAmino(message.height, useInterfaces) : {}; @@ -2442,9 +2442,9 @@ export const QueryPacketReceiptRequest = { }, toAmino(message: QueryPacketReceiptRequest, useInterfaces: boolean = false): QueryPacketReceiptRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: QueryPacketReceiptRequestAminoMsg): QueryPacketReceiptRequest { @@ -2535,7 +2535,7 @@ export const QueryPacketReceiptResponse = { }, toAmino(message: QueryPacketReceiptResponse, useInterfaces: boolean = false): QueryPacketReceiptResponseAmino { const obj: any = {}; - obj.received = message.received; + obj.received = message.received === false ? undefined : message.received; obj.proof = message.proof ? base64FromBytes(message.proof) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; return obj; @@ -2628,9 +2628,9 @@ export const QueryPacketAcknowledgementRequest = { }, toAmino(message: QueryPacketAcknowledgementRequest, useInterfaces: boolean = false): QueryPacketAcknowledgementRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: QueryPacketAcknowledgementRequestAminoMsg): QueryPacketAcknowledgementRequest { @@ -2832,13 +2832,13 @@ export const QueryPacketAcknowledgementsRequest = { }, toAmino(message: QueryPacketAcknowledgementsRequest, useInterfaces: boolean = false): QueryPacketAcknowledgementsRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; if (message.packetCommitmentSequences) { obj.packet_commitment_sequences = message.packetCommitmentSequences.map(e => e.toString()); } else { - obj.packet_commitment_sequences = []; + obj.packet_commitment_sequences = message.packetCommitmentSequences; } return obj; }, @@ -2931,7 +2931,7 @@ export const QueryPacketAcknowledgementsResponse = { if (message.acknowledgements) { obj.acknowledgements = message.acknowledgements.map(e => e ? PacketState.toAmino(e, useInterfaces) : undefined); } else { - obj.acknowledgements = []; + obj.acknowledgements = message.acknowledgements; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; obj.height = message.height ? Height.toAmino(message.height, useInterfaces) : {}; @@ -3032,12 +3032,12 @@ export const QueryUnreceivedPacketsRequest = { }, toAmino(message: QueryUnreceivedPacketsRequest, useInterfaces: boolean = false): QueryUnreceivedPacketsRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; if (message.packetCommitmentSequences) { obj.packet_commitment_sequences = message.packetCommitmentSequences.map(e => e.toString()); } else { - obj.packet_commitment_sequences = []; + obj.packet_commitment_sequences = message.packetCommitmentSequences; } return obj; }, @@ -3128,7 +3128,7 @@ export const QueryUnreceivedPacketsResponse = { if (message.sequences) { obj.sequences = message.sequences.map(e => e.toString()); } else { - obj.sequences = []; + obj.sequences = message.sequences; } obj.height = message.height ? Height.toAmino(message.height, useInterfaces) : {}; return obj; @@ -3228,12 +3228,12 @@ export const QueryUnreceivedAcksRequest = { }, toAmino(message: QueryUnreceivedAcksRequest, useInterfaces: boolean = false): QueryUnreceivedAcksRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; if (message.packetAckSequences) { obj.packet_ack_sequences = message.packetAckSequences.map(e => e.toString()); } else { - obj.packet_ack_sequences = []; + obj.packet_ack_sequences = message.packetAckSequences; } return obj; }, @@ -3324,7 +3324,7 @@ export const QueryUnreceivedAcksResponse = { if (message.sequences) { obj.sequences = message.sequences.map(e => e.toString()); } else { - obj.sequences = []; + obj.sequences = message.sequences; } obj.height = message.height ? Height.toAmino(message.height, useInterfaces) : {}; return obj; @@ -3406,8 +3406,8 @@ export const QueryNextSequenceReceiveRequest = { }, toAmino(message: QueryNextSequenceReceiveRequest, useInterfaces: boolean = false): QueryNextSequenceReceiveRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; return obj; }, fromAminoMsg(object: QueryNextSequenceReceiveRequestAminoMsg): QueryNextSequenceReceiveRequest { @@ -3498,7 +3498,7 @@ export const QueryNextSequenceReceiveResponse = { }, toAmino(message: QueryNextSequenceReceiveResponse, useInterfaces: boolean = false): QueryNextSequenceReceiveResponseAmino { const obj: any = {}; - obj.next_sequence_receive = message.nextSequenceReceive ? message.nextSequenceReceive.toString() : undefined; + obj.next_sequence_receive = message.nextSequenceReceive !== BigInt(0) ? message.nextSequenceReceive.toString() : undefined; obj.proof = message.proof ? base64FromBytes(message.proof) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; return obj; @@ -3580,8 +3580,8 @@ export const QueryNextSequenceSendRequest = { }, toAmino(message: QueryNextSequenceSendRequest, useInterfaces: boolean = false): QueryNextSequenceSendRequestAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; return obj; }, fromAminoMsg(object: QueryNextSequenceSendRequestAminoMsg): QueryNextSequenceSendRequest { @@ -3672,7 +3672,7 @@ export const QueryNextSequenceSendResponse = { }, toAmino(message: QueryNextSequenceSendResponse, useInterfaces: boolean = false): QueryNextSequenceSendResponseAmino { const obj: any = {}; - obj.next_sequence_send = message.nextSequenceSend ? message.nextSequenceSend.toString() : undefined; + obj.next_sequence_send = message.nextSequenceSend !== BigInt(0) ? message.nextSequenceSend.toString() : undefined; obj.proof = message.proof ? base64FromBytes(message.proof) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; return obj; diff --git a/packages/types/protobuf/codegen/ibc/core/channel/v1/tx.ts b/packages/types/protobuf/codegen/ibc/core/channel/v1/tx.ts index 1963123f35..0e0476d633 100644 --- a/packages/types/protobuf/codegen/ibc/core/channel/v1/tx.ts +++ b/packages/types/protobuf/codegen/ibc/core/channel/v1/tx.ts @@ -695,9 +695,9 @@ export const MsgChannelOpenInit = { }, toAmino(message: MsgChannelOpenInit, useInterfaces: boolean = false): MsgChannelOpenInitAmino { const obj: any = {}; - obj.port_id = message.portId; + obj.port_id = message.portId === "" ? undefined : message.portId; obj.channel = message.channel ? Channel.toAmino(message.channel, useInterfaces) : undefined; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenInitAminoMsg): MsgChannelOpenInit { @@ -777,8 +777,8 @@ export const MsgChannelOpenInitResponse = { }, toAmino(message: MsgChannelOpenInitResponse, useInterfaces: boolean = false): MsgChannelOpenInitResponseAmino { const obj: any = {}; - obj.channel_id = message.channelId; - obj.version = message.version; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.version = message.version === "" ? undefined : message.version; return obj; }, fromAminoMsg(object: MsgChannelOpenInitResponseAminoMsg): MsgChannelOpenInitResponse { @@ -913,13 +913,13 @@ export const MsgChannelOpenTry = { }, toAmino(message: MsgChannelOpenTry, useInterfaces: boolean = false): MsgChannelOpenTryAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.previous_channel_id = message.previousChannelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.previous_channel_id = message.previousChannelId === "" ? undefined : message.previousChannelId; obj.channel = message.channel ? Channel.toAmino(message.channel, useInterfaces) : undefined; - obj.counterparty_version = message.counterpartyVersion; + obj.counterparty_version = message.counterpartyVersion === "" ? undefined : message.counterpartyVersion; obj.proof_init = message.proofInit ? base64FromBytes(message.proofInit) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenTryAminoMsg): MsgChannelOpenTry { @@ -999,8 +999,8 @@ export const MsgChannelOpenTryResponse = { }, toAmino(message: MsgChannelOpenTryResponse, useInterfaces: boolean = false): MsgChannelOpenTryResponseAmino { const obj: any = {}; - obj.version = message.version; - obj.channel_id = message.channelId; + obj.version = message.version === "" ? undefined : message.version; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; return obj; }, fromAminoMsg(object: MsgChannelOpenTryResponseAminoMsg): MsgChannelOpenTryResponse { @@ -1135,13 +1135,13 @@ export const MsgChannelOpenAck = { }, toAmino(message: MsgChannelOpenAck, useInterfaces: boolean = false): MsgChannelOpenAckAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.counterparty_channel_id = message.counterpartyChannelId; - obj.counterparty_version = message.counterpartyVersion; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.counterparty_channel_id = message.counterpartyChannelId === "" ? undefined : message.counterpartyChannelId; + obj.counterparty_version = message.counterpartyVersion === "" ? undefined : message.counterpartyVersion; obj.proof_try = message.proofTry ? base64FromBytes(message.proofTry) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenAckAminoMsg): MsgChannelOpenAck { @@ -1310,11 +1310,11 @@ export const MsgChannelOpenConfirm = { }, toAmino(message: MsgChannelOpenConfirm, useInterfaces: boolean = false): MsgChannelOpenConfirmAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; obj.proof_ack = message.proofAck ? base64FromBytes(message.proofAck) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenConfirmAminoMsg): MsgChannelOpenConfirm { @@ -1461,9 +1461,9 @@ export const MsgChannelCloseInit = { }, toAmino(message: MsgChannelCloseInit, useInterfaces: boolean = false): MsgChannelCloseInitAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.signer = message.signer; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelCloseInitAminoMsg): MsgChannelCloseInit { @@ -1632,11 +1632,11 @@ export const MsgChannelCloseConfirm = { }, toAmino(message: MsgChannelCloseConfirm, useInterfaces: boolean = false): MsgChannelCloseConfirmAmino { const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; obj.proof_init = message.proofInit ? base64FromBytes(message.proofInit) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelCloseConfirmAminoMsg): MsgChannelCloseConfirm { @@ -1797,7 +1797,7 @@ export const MsgRecvPacket = { obj.packet = message.packet ? Packet.toAmino(message.packet, useInterfaces) : undefined; obj.proof_commitment = message.proofCommitment ? base64FromBytes(message.proofCommitment) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgRecvPacketAminoMsg): MsgRecvPacket { @@ -1860,13 +1860,13 @@ export const MsgRecvPacketResponse = { fromAmino(object: MsgRecvPacketResponseAmino): MsgRecvPacketResponse { const message = createBaseMsgRecvPacketResponse(); if (object.result !== undefined && object.result !== null) { - message.result = responseResultTypeFromJSON(object.result); + message.result = object.result; } return message; }, toAmino(message: MsgRecvPacketResponse, useInterfaces: boolean = false): MsgRecvPacketResponseAmino { const obj: any = {}; - obj.result = message.result; + obj.result = message.result === 0 ? undefined : message.result; return obj; }, fromAminoMsg(object: MsgRecvPacketResponseAminoMsg): MsgRecvPacketResponse { @@ -1982,8 +1982,8 @@ export const MsgTimeout = { obj.packet = message.packet ? Packet.toAmino(message.packet, useInterfaces) : undefined; obj.proof_unreceived = message.proofUnreceived ? base64FromBytes(message.proofUnreceived) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; - obj.next_sequence_recv = message.nextSequenceRecv ? message.nextSequenceRecv.toString() : undefined; - obj.signer = message.signer; + obj.next_sequence_recv = message.nextSequenceRecv !== BigInt(0) ? message.nextSequenceRecv.toString() : undefined; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgTimeoutAminoMsg): MsgTimeout { @@ -2046,13 +2046,13 @@ export const MsgTimeoutResponse = { fromAmino(object: MsgTimeoutResponseAmino): MsgTimeoutResponse { const message = createBaseMsgTimeoutResponse(); if (object.result !== undefined && object.result !== null) { - message.result = responseResultTypeFromJSON(object.result); + message.result = object.result; } return message; }, toAmino(message: MsgTimeoutResponse, useInterfaces: boolean = false): MsgTimeoutResponseAmino { const obj: any = {}; - obj.result = message.result; + obj.result = message.result === 0 ? undefined : message.result; return obj; }, fromAminoMsg(object: MsgTimeoutResponseAminoMsg): MsgTimeoutResponse { @@ -2180,8 +2180,8 @@ export const MsgTimeoutOnClose = { obj.proof_unreceived = message.proofUnreceived ? base64FromBytes(message.proofUnreceived) : undefined; obj.proof_close = message.proofClose ? base64FromBytes(message.proofClose) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; - obj.next_sequence_recv = message.nextSequenceRecv ? message.nextSequenceRecv.toString() : undefined; - obj.signer = message.signer; + obj.next_sequence_recv = message.nextSequenceRecv !== BigInt(0) ? message.nextSequenceRecv.toString() : undefined; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgTimeoutOnCloseAminoMsg): MsgTimeoutOnClose { @@ -2244,13 +2244,13 @@ export const MsgTimeoutOnCloseResponse = { fromAmino(object: MsgTimeoutOnCloseResponseAmino): MsgTimeoutOnCloseResponse { const message = createBaseMsgTimeoutOnCloseResponse(); if (object.result !== undefined && object.result !== null) { - message.result = responseResultTypeFromJSON(object.result); + message.result = object.result; } return message; }, toAmino(message: MsgTimeoutOnCloseResponse, useInterfaces: boolean = false): MsgTimeoutOnCloseResponseAmino { const obj: any = {}; - obj.result = message.result; + obj.result = message.result === 0 ? undefined : message.result; return obj; }, fromAminoMsg(object: MsgTimeoutOnCloseResponseAminoMsg): MsgTimeoutOnCloseResponse { @@ -2367,7 +2367,7 @@ export const MsgAcknowledgement = { obj.acknowledgement = message.acknowledgement ? base64FromBytes(message.acknowledgement) : undefined; obj.proof_acked = message.proofAcked ? base64FromBytes(message.proofAcked) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgAcknowledgementAminoMsg): MsgAcknowledgement { @@ -2430,13 +2430,13 @@ export const MsgAcknowledgementResponse = { fromAmino(object: MsgAcknowledgementResponseAmino): MsgAcknowledgementResponse { const message = createBaseMsgAcknowledgementResponse(); if (object.result !== undefined && object.result !== null) { - message.result = responseResultTypeFromJSON(object.result); + message.result = object.result; } return message; }, toAmino(message: MsgAcknowledgementResponse, useInterfaces: boolean = false): MsgAcknowledgementResponseAmino { const obj: any = {}; - obj.result = message.result; + obj.result = message.result === 0 ? undefined : message.result; return obj; }, fromAminoMsg(object: MsgAcknowledgementResponseAminoMsg): MsgAcknowledgementResponse { diff --git a/packages/types/protobuf/codegen/ibc/core/client/v1/client.ts b/packages/types/protobuf/codegen/ibc/core/client/v1/client.ts index e30d4acf10..9a854e24bb 100644 --- a/packages/types/protobuf/codegen/ibc/core/client/v1/client.ts +++ b/packages/types/protobuf/codegen/ibc/core/client/v1/client.ts @@ -370,7 +370,7 @@ export const IdentifiedClientState = { }, toAmino(message: IdentifiedClientState, useInterfaces: boolean = false): IdentifiedClientStateAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.client_state = message.clientState ? Any.toAmino(message.clientState, useInterfaces) : undefined; return obj; }, @@ -530,11 +530,11 @@ export const ClientConsensusStates = { }, toAmino(message: ClientConsensusStates, useInterfaces: boolean = false): ClientConsensusStatesAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; if (message.consensusStates) { obj.consensus_states = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toAmino(e, useInterfaces) : undefined); } else { - obj.consensus_states = []; + obj.consensus_states = message.consensusStates; } return obj; }, @@ -638,10 +638,10 @@ export const ClientUpdateProposal = { }, toAmino(message: ClientUpdateProposal, useInterfaces: boolean = false): ClientUpdateProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.subject_client_id = message.subjectClientId; - obj.substitute_client_id = message.substituteClientId; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.subject_client_id = message.subjectClientId === "" ? undefined : message.subjectClientId; + obj.substitute_client_id = message.substituteClientId === "" ? undefined : message.substituteClientId; return obj; }, fromAminoMsg(object: ClientUpdateProposalAminoMsg): ClientUpdateProposal { @@ -744,8 +744,8 @@ export const UpgradeProposal = { }, toAmino(message: UpgradeProposal, useInterfaces: boolean = false): UpgradeProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; obj.plan = message.plan ? Plan.toAmino(message.plan, useInterfaces) : undefined; obj.upgraded_client_state = message.upgradedClientState ? Any.toAmino(message.upgradedClientState, useInterfaces) : undefined; return obj; @@ -823,8 +823,8 @@ export const Height = { }, toAmino(message: Height, useInterfaces: boolean = false): HeightAmino { const obj: any = {}; - obj.revision_number = message.revisionNumber ? message.revisionNumber.toString() : undefined; - obj.revision_height = message.revisionHeight ? message.revisionHeight.toString() : undefined; + obj.revision_number = message.revisionNumber !== BigInt(0) ? message.revisionNumber.toString() : undefined; + obj.revision_height = message.revisionHeight !== BigInt(0) ? message.revisionHeight.toString() : undefined; return obj; }, fromAminoMsg(object: HeightAminoMsg): Height { @@ -894,7 +894,7 @@ export const Params = { if (message.allowedClients) { obj.allowed_clients = message.allowedClients.map(e => e); } else { - obj.allowed_clients = []; + obj.allowed_clients = message.allowedClients; } return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/core/client/v1/genesis.ts b/packages/types/protobuf/codegen/ibc/core/client/v1/genesis.ts index e595a98b95..f7bd27699a 100644 --- a/packages/types/protobuf/codegen/ibc/core/client/v1/genesis.ts +++ b/packages/types/protobuf/codegen/ibc/core/client/v1/genesis.ts @@ -220,21 +220,21 @@ export const GenesisState = { if (message.clients) { obj.clients = message.clients.map(e => e ? IdentifiedClientState.toAmino(e, useInterfaces) : undefined); } else { - obj.clients = []; + obj.clients = message.clients; } if (message.clientsConsensus) { obj.clients_consensus = message.clientsConsensus.map(e => e ? ClientConsensusStates.toAmino(e, useInterfaces) : undefined); } else { - obj.clients_consensus = []; + obj.clients_consensus = message.clientsConsensus; } if (message.clientsMetadata) { obj.clients_metadata = message.clientsMetadata.map(e => e ? IdentifiedGenesisMetadata.toAmino(e, useInterfaces) : undefined); } else { - obj.clients_metadata = []; + obj.clients_metadata = message.clientsMetadata; } obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; - obj.create_localhost = message.createLocalhost; - obj.next_client_sequence = message.nextClientSequence ? message.nextClientSequence.toString() : undefined; + obj.create_localhost = message.createLocalhost === false ? undefined : message.createLocalhost; + obj.next_client_sequence = message.nextClientSequence !== BigInt(0) ? message.nextClientSequence.toString() : undefined; return obj; }, fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { @@ -393,11 +393,11 @@ export const IdentifiedGenesisMetadata = { }, toAmino(message: IdentifiedGenesisMetadata, useInterfaces: boolean = false): IdentifiedGenesisMetadataAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; if (message.clientMetadata) { obj.client_metadata = message.clientMetadata.map(e => e ? GenesisMetadata.toAmino(e, useInterfaces) : undefined); } else { - obj.client_metadata = []; + obj.client_metadata = message.clientMetadata; } return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/core/client/v1/query.ts b/packages/types/protobuf/codegen/ibc/core/client/v1/query.ts index d6c0273b4b..386799e190 100644 --- a/packages/types/protobuf/codegen/ibc/core/client/v1/query.ts +++ b/packages/types/protobuf/codegen/ibc/core/client/v1/query.ts @@ -652,7 +652,7 @@ export const QueryClientStateRequest = { }, toAmino(message: QueryClientStateRequest, useInterfaces: boolean = false): QueryClientStateRequestAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; return obj; }, fromAminoMsg(object: QueryClientStateRequestAminoMsg): QueryClientStateRequest { @@ -895,7 +895,7 @@ export const QueryClientStatesResponse = { if (message.clientStates) { obj.client_states = message.clientStates.map(e => e ? IdentifiedClientState.toAmino(e, useInterfaces) : undefined); } else { - obj.client_states = []; + obj.client_states = message.clientStates; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -999,10 +999,10 @@ export const QueryConsensusStateRequest = { }, toAmino(message: QueryConsensusStateRequest, useInterfaces: boolean = false): QueryConsensusStateRequestAmino { const obj: any = {}; - obj.client_id = message.clientId; - obj.revision_number = message.revisionNumber ? message.revisionNumber.toString() : undefined; - obj.revision_height = message.revisionHeight ? message.revisionHeight.toString() : undefined; - obj.latest_height = message.latestHeight; + obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.revision_number = message.revisionNumber !== BigInt(0) ? message.revisionNumber.toString() : undefined; + obj.revision_height = message.revisionHeight !== BigInt(0) ? message.revisionHeight.toString() : undefined; + obj.latest_height = message.latestHeight === false ? undefined : message.latestHeight; return obj; }, fromAminoMsg(object: QueryConsensusStateRequestAminoMsg): QueryConsensusStateRequest { @@ -1175,7 +1175,7 @@ export const QueryConsensusStatesRequest = { }, toAmino(message: QueryConsensusStatesRequest, useInterfaces: boolean = false): QueryConsensusStatesRequestAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1257,7 +1257,7 @@ export const QueryConsensusStatesResponse = { if (message.consensusStates) { obj.consensus_states = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toAmino(e, useInterfaces) : undefined); } else { - obj.consensus_states = []; + obj.consensus_states = message.consensusStates; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1339,7 +1339,7 @@ export const QueryConsensusStateHeightsRequest = { }, toAmino(message: QueryConsensusStateHeightsRequest, useInterfaces: boolean = false): QueryConsensusStateHeightsRequestAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1421,7 +1421,7 @@ export const QueryConsensusStateHeightsResponse = { if (message.consensusStateHeights) { obj.consensus_state_heights = message.consensusStateHeights.map(e => e ? Height.toAmino(e, useInterfaces) : undefined); } else { - obj.consensus_state_heights = []; + obj.consensus_state_heights = message.consensusStateHeights; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1492,7 +1492,7 @@ export const QueryClientStatusRequest = { }, toAmino(message: QueryClientStatusRequest, useInterfaces: boolean = false): QueryClientStatusRequestAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; return obj; }, fromAminoMsg(object: QueryClientStatusRequestAminoMsg): QueryClientStatusRequest { @@ -1561,7 +1561,7 @@ export const QueryClientStatusResponse = { }, toAmino(message: QueryClientStatusResponse, useInterfaces: boolean = false): QueryClientStatusResponseAmino { const obj: any = {}; - obj.status = message.status; + obj.status = message.status === "" ? undefined : message.status; return obj; }, fromAminoMsg(object: QueryClientStatusResponseAminoMsg): QueryClientStatusResponse { diff --git a/packages/types/protobuf/codegen/ibc/core/client/v1/tx.ts b/packages/types/protobuf/codegen/ibc/core/client/v1/tx.ts index 4a43beed3a..14ecd7c42c 100644 --- a/packages/types/protobuf/codegen/ibc/core/client/v1/tx.ts +++ b/packages/types/protobuf/codegen/ibc/core/client/v1/tx.ts @@ -373,7 +373,7 @@ export const MsgCreateClient = { const obj: any = {}; obj.client_state = message.clientState ? Any.toAmino(message.clientState, useInterfaces) : undefined; obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState, useInterfaces) : undefined; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgCreateClientAminoMsg): MsgCreateClient { @@ -520,9 +520,9 @@ export const MsgUpdateClient = { }, toAmino(message: MsgUpdateClient, useInterfaces: boolean = false): MsgUpdateClientAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.client_message = message.clientMessage ? Any.toAmino(message.clientMessage, useInterfaces) : undefined; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgUpdateClientAminoMsg): MsgUpdateClient { @@ -702,12 +702,12 @@ export const MsgUpgradeClient = { }, toAmino(message: MsgUpgradeClient, useInterfaces: boolean = false): MsgUpgradeClientAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.client_state = message.clientState ? Any.toAmino(message.clientState, useInterfaces) : undefined; obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState, useInterfaces) : undefined; obj.proof_upgrade_client = message.proofUpgradeClient ? base64FromBytes(message.proofUpgradeClient) : undefined; obj.proof_upgrade_consensus_state = message.proofUpgradeConsensusState ? base64FromBytes(message.proofUpgradeConsensusState) : undefined; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgUpgradeClientAminoMsg): MsgUpgradeClient { @@ -854,9 +854,9 @@ export const MsgSubmitMisbehaviour = { }, toAmino(message: MsgSubmitMisbehaviour, useInterfaces: boolean = false): MsgSubmitMisbehaviourAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.misbehaviour = message.misbehaviour ? Any.toAmino(message.misbehaviour, useInterfaces) : undefined; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgSubmitMisbehaviourAminoMsg): MsgSubmitMisbehaviour { @@ -992,7 +992,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/core/commitment/v1/commitment.ts b/packages/types/protobuf/codegen/ibc/core/commitment/v1/commitment.ts index c7b7c28258..89dfe2c120 100644 --- a/packages/types/protobuf/codegen/ibc/core/commitment/v1/commitment.ts +++ b/packages/types/protobuf/codegen/ibc/core/commitment/v1/commitment.ts @@ -315,7 +315,7 @@ export const MerklePath = { if (message.keyPath) { obj.key_path = message.keyPath.map(e => e); } else { - obj.key_path = []; + obj.key_path = message.keyPath; } return obj; }, @@ -386,7 +386,7 @@ export const MerkleProof = { if (message.proofs) { obj.proofs = message.proofs.map(e => e ? CommitmentProof.toAmino(e, useInterfaces) : undefined); } else { - obj.proofs = []; + obj.proofs = message.proofs; } return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/core/connection/v1/connection.ts b/packages/types/protobuf/codegen/ibc/core/connection/v1/connection.ts index 6cc2bb4d21..79c9d4af47 100644 --- a/packages/types/protobuf/codegen/ibc/core/connection/v1/connection.ts +++ b/packages/types/protobuf/codegen/ibc/core/connection/v1/connection.ts @@ -421,7 +421,7 @@ export const ConnectionEnd = { } message.versions = object.versions?.map(e => Version.fromAmino(e)) || []; if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); + message.state = object.state; } if (object.counterparty !== undefined && object.counterparty !== null) { message.counterparty = Counterparty.fromAmino(object.counterparty); @@ -433,15 +433,15 @@ export const ConnectionEnd = { }, toAmino(message: ConnectionEnd, useInterfaces: boolean = false): ConnectionEndAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; if (message.versions) { obj.versions = message.versions.map(e => e ? Version.toAmino(e, useInterfaces) : undefined); } else { - obj.versions = []; + obj.versions = message.versions; } - obj.state = message.state; + obj.state = message.state === 0 ? undefined : message.state; obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty, useInterfaces) : undefined; - obj.delay_period = message.delayPeriod ? message.delayPeriod.toString() : undefined; + obj.delay_period = message.delayPeriod !== BigInt(0) ? message.delayPeriod.toString() : undefined; return obj; }, fromAminoMsg(object: ConnectionEndAminoMsg): ConnectionEnd { @@ -551,7 +551,7 @@ export const IdentifiedConnection = { } message.versions = object.versions?.map(e => Version.fromAmino(e)) || []; if (object.state !== undefined && object.state !== null) { - message.state = stateFromJSON(object.state); + message.state = object.state; } if (object.counterparty !== undefined && object.counterparty !== null) { message.counterparty = Counterparty.fromAmino(object.counterparty); @@ -563,16 +563,16 @@ export const IdentifiedConnection = { }, toAmino(message: IdentifiedConnection, useInterfaces: boolean = false): IdentifiedConnectionAmino { const obj: any = {}; - obj.id = message.id; - obj.client_id = message.clientId; + obj.id = message.id === "" ? undefined : message.id; + obj.client_id = message.clientId === "" ? undefined : message.clientId; if (message.versions) { obj.versions = message.versions.map(e => e ? Version.toAmino(e, useInterfaces) : undefined); } else { - obj.versions = []; + obj.versions = message.versions; } - obj.state = message.state; + obj.state = message.state === 0 ? undefined : message.state; obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty, useInterfaces) : undefined; - obj.delay_period = message.delayPeriod ? message.delayPeriod.toString() : undefined; + obj.delay_period = message.delayPeriod !== BigInt(0) ? message.delayPeriod.toString() : undefined; return obj; }, fromAminoMsg(object: IdentifiedConnectionAminoMsg): IdentifiedConnection { @@ -663,8 +663,8 @@ export const Counterparty = { }, toAmino(message: Counterparty, useInterfaces: boolean = false): CounterpartyAmino { const obj: any = {}; - obj.client_id = message.clientId; - obj.connection_id = message.connectionId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; obj.prefix = message.prefix ? MerklePrefix.toAmino(message.prefix, useInterfaces) : undefined; return obj; }, @@ -735,7 +735,7 @@ export const ClientPaths = { if (message.paths) { obj.paths = message.paths.map(e => e); } else { - obj.paths = []; + obj.paths = message.paths; } return obj; }, @@ -814,11 +814,11 @@ export const ConnectionPaths = { }, toAmino(message: ConnectionPaths, useInterfaces: boolean = false): ConnectionPathsAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; if (message.paths) { obj.paths = message.paths.map(e => e); } else { - obj.paths = []; + obj.paths = message.paths; } return obj; }, @@ -897,11 +897,11 @@ export const Version = { }, toAmino(message: Version, useInterfaces: boolean = false): VersionAmino { const obj: any = {}; - obj.identifier = message.identifier; + obj.identifier = message.identifier === "" ? undefined : message.identifier; if (message.features) { obj.features = message.features.map(e => e); } else { - obj.features = []; + obj.features = message.features; } return obj; }, @@ -971,7 +971,7 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.max_expected_time_per_block = message.maxExpectedTimePerBlock ? message.maxExpectedTimePerBlock.toString() : undefined; + obj.max_expected_time_per_block = message.maxExpectedTimePerBlock !== BigInt(0) ? message.maxExpectedTimePerBlock.toString() : undefined; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/ibc/core/connection/v1/genesis.ts b/packages/types/protobuf/codegen/ibc/core/connection/v1/genesis.ts index 356665513f..de1901119b 100644 --- a/packages/types/protobuf/codegen/ibc/core/connection/v1/genesis.ts +++ b/packages/types/protobuf/codegen/ibc/core/connection/v1/genesis.ts @@ -108,14 +108,14 @@ export const GenesisState = { if (message.connections) { obj.connections = message.connections.map(e => e ? IdentifiedConnection.toAmino(e, useInterfaces) : undefined); } else { - obj.connections = []; + obj.connections = message.connections; } if (message.clientConnectionPaths) { obj.client_connection_paths = message.clientConnectionPaths.map(e => e ? ConnectionPaths.toAmino(e, useInterfaces) : undefined); } else { - obj.client_connection_paths = []; + obj.client_connection_paths = message.clientConnectionPaths; } - obj.next_connection_sequence = message.nextConnectionSequence ? message.nextConnectionSequence.toString() : undefined; + obj.next_connection_sequence = message.nextConnectionSequence !== BigInt(0) ? message.nextConnectionSequence.toString() : undefined; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/core/connection/v1/query.ts b/packages/types/protobuf/codegen/ibc/core/connection/v1/query.ts index 8d282869f3..d9da09caad 100644 --- a/packages/types/protobuf/codegen/ibc/core/connection/v1/query.ts +++ b/packages/types/protobuf/codegen/ibc/core/connection/v1/query.ts @@ -457,7 +457,7 @@ export const QueryConnectionRequest = { }, toAmino(message: QueryConnectionRequest, useInterfaces: boolean = false): QueryConnectionRequestAmino { const obj: any = {}; - obj.connection_id = message.connectionId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; return obj; }, fromAminoMsg(object: QueryConnectionRequestAminoMsg): QueryConnectionRequest { @@ -711,7 +711,7 @@ export const QueryConnectionsResponse = { if (message.connections) { obj.connections = message.connections.map(e => e ? IdentifiedConnection.toAmino(e, useInterfaces) : undefined); } else { - obj.connections = []; + obj.connections = message.connections; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; obj.height = message.height ? Height.toAmino(message.height, useInterfaces) : {}; @@ -783,7 +783,7 @@ export const QueryClientConnectionsRequest = { }, toAmino(message: QueryClientConnectionsRequest, useInterfaces: boolean = false): QueryClientConnectionsRequestAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; return obj; }, fromAminoMsg(object: QueryClientConnectionsRequestAminoMsg): QueryClientConnectionsRequest { @@ -875,7 +875,7 @@ export const QueryClientConnectionsResponse = { if (message.connectionPaths) { obj.connection_paths = message.connectionPaths.map(e => e); } else { - obj.connection_paths = []; + obj.connection_paths = message.connectionPaths; } obj.proof = message.proof ? base64FromBytes(message.proof) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; @@ -947,7 +947,7 @@ export const QueryConnectionClientStateRequest = { }, toAmino(message: QueryConnectionClientStateRequest, useInterfaces: boolean = false): QueryConnectionClientStateRequestAmino { const obj: any = {}; - obj.connection_id = message.connectionId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; return obj; }, fromAminoMsg(object: QueryConnectionClientStateRequestAminoMsg): QueryConnectionClientStateRequest { @@ -1131,9 +1131,9 @@ export const QueryConnectionConsensusStateRequest = { }, toAmino(message: QueryConnectionConsensusStateRequest, useInterfaces: boolean = false): QueryConnectionConsensusStateRequestAmino { const obj: any = {}; - obj.connection_id = message.connectionId; - obj.revision_number = message.revisionNumber ? message.revisionNumber.toString() : undefined; - obj.revision_height = message.revisionHeight ? message.revisionHeight.toString() : undefined; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.revision_number = message.revisionNumber !== BigInt(0) ? message.revisionNumber.toString() : undefined; + obj.revision_height = message.revisionHeight !== BigInt(0) ? message.revisionHeight.toString() : undefined; return obj; }, fromAminoMsg(object: QueryConnectionConsensusStateRequestAminoMsg): QueryConnectionConsensusStateRequest { @@ -1236,7 +1236,7 @@ export const QueryConnectionConsensusStateResponse = { toAmino(message: QueryConnectionConsensusStateResponse, useInterfaces: boolean = false): QueryConnectionConsensusStateResponseAmino { const obj: any = {}; obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState, useInterfaces) : undefined; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.proof = message.proof ? base64FromBytes(message.proof) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; return obj; diff --git a/packages/types/protobuf/codegen/ibc/core/connection/v1/tx.ts b/packages/types/protobuf/codegen/ibc/core/connection/v1/tx.ts index 35fb9938f0..5d3b52f6fe 100644 --- a/packages/types/protobuf/codegen/ibc/core/connection/v1/tx.ts +++ b/packages/types/protobuf/codegen/ibc/core/connection/v1/tx.ts @@ -453,11 +453,11 @@ export const MsgConnectionOpenInit = { }, toAmino(message: MsgConnectionOpenInit, useInterfaces: boolean = false): MsgConnectionOpenInitAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty, useInterfaces) : undefined; obj.version = message.version ? Version.toAmino(message.version, useInterfaces) : undefined; - obj.delay_period = message.delayPeriod ? message.delayPeriod.toString() : undefined; - obj.signer = message.signer; + obj.delay_period = message.delayPeriod !== BigInt(0) ? message.delayPeriod.toString() : undefined; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgConnectionOpenInitAminoMsg): MsgConnectionOpenInit { @@ -712,22 +712,22 @@ export const MsgConnectionOpenTry = { }, toAmino(message: MsgConnectionOpenTry, useInterfaces: boolean = false): MsgConnectionOpenTryAmino { const obj: any = {}; - obj.client_id = message.clientId; - obj.previous_connection_id = message.previousConnectionId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.previous_connection_id = message.previousConnectionId === "" ? undefined : message.previousConnectionId; obj.client_state = message.clientState ? Any.toAmino(message.clientState, useInterfaces) : undefined; obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty, useInterfaces) : undefined; - obj.delay_period = message.delayPeriod ? message.delayPeriod.toString() : undefined; + obj.delay_period = message.delayPeriod !== BigInt(0) ? message.delayPeriod.toString() : undefined; if (message.counterpartyVersions) { obj.counterparty_versions = message.counterpartyVersions.map(e => e ? Version.toAmino(e, useInterfaces) : undefined); } else { - obj.counterparty_versions = []; + obj.counterparty_versions = message.counterpartyVersions; } obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; obj.proof_init = message.proofInit ? base64FromBytes(message.proofInit) : undefined; obj.proof_client = message.proofClient ? base64FromBytes(message.proofClient) : undefined; obj.proof_consensus = message.proofConsensus ? base64FromBytes(message.proofConsensus) : undefined; obj.consensus_height = message.consensusHeight ? Height.toAmino(message.consensusHeight, useInterfaces) : {}; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; obj.host_consensus_state_proof = message.hostConsensusStateProof ? base64FromBytes(message.hostConsensusStateProof) : undefined; return obj; }, @@ -963,8 +963,8 @@ export const MsgConnectionOpenAck = { }, toAmino(message: MsgConnectionOpenAck, useInterfaces: boolean = false): MsgConnectionOpenAckAmino { const obj: any = {}; - obj.connection_id = message.connectionId; - obj.counterparty_connection_id = message.counterpartyConnectionId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.counterparty_connection_id = message.counterpartyConnectionId === "" ? undefined : message.counterpartyConnectionId; obj.version = message.version ? Version.toAmino(message.version, useInterfaces) : undefined; obj.client_state = message.clientState ? Any.toAmino(message.clientState, useInterfaces) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; @@ -972,7 +972,7 @@ export const MsgConnectionOpenAck = { obj.proof_client = message.proofClient ? base64FromBytes(message.proofClient) : undefined; obj.proof_consensus = message.proofConsensus ? base64FromBytes(message.proofConsensus) : undefined; obj.consensus_height = message.consensusHeight ? Height.toAmino(message.consensusHeight, useInterfaces) : {}; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; obj.host_consensus_state_proof = message.hostConsensusStateProof ? base64FromBytes(message.hostConsensusStateProof) : undefined; return obj; }, @@ -1131,10 +1131,10 @@ export const MsgConnectionOpenConfirm = { }, toAmino(message: MsgConnectionOpenConfirm, useInterfaces: boolean = false): MsgConnectionOpenConfirmAmino { const obj: any = {}; - obj.connection_id = message.connectionId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; obj.proof_ack = message.proofAck ? base64FromBytes(message.proofAck) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight, useInterfaces) : {}; - obj.signer = message.signer; + obj.signer = message.signer === "" ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgConnectionOpenConfirmAminoMsg): MsgConnectionOpenConfirm { @@ -1270,7 +1270,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/ibc/lightclients/tendermint/v1/tendermint.ts b/packages/types/protobuf/codegen/ibc/lightclients/tendermint/v1/tendermint.ts index 65a63bce8c..06b3a066ff 100644 --- a/packages/types/protobuf/codegen/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/packages/types/protobuf/codegen/ibc/lightclients/tendermint/v1/tendermint.ts @@ -438,7 +438,7 @@ export const ClientState = { }, toAmino(message: ClientState, useInterfaces: boolean = false): ClientStateAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; obj.trust_level = message.trustLevel ? Fraction.toAmino(message.trustLevel, useInterfaces) : undefined; obj.trusting_period = message.trustingPeriod ? Duration.toAmino(message.trustingPeriod, useInterfaces) : undefined; obj.unbonding_period = message.unbondingPeriod ? Duration.toAmino(message.unbondingPeriod, useInterfaces) : undefined; @@ -448,15 +448,15 @@ export const ClientState = { if (message.proofSpecs) { obj.proof_specs = message.proofSpecs.map(e => e ? ProofSpec.toAmino(e, useInterfaces) : undefined); } else { - obj.proof_specs = []; + obj.proof_specs = message.proofSpecs; } if (message.upgradePath) { obj.upgrade_path = message.upgradePath.map(e => e); } else { - obj.upgrade_path = []; + obj.upgrade_path = message.upgradePath; } - obj.allow_update_after_expiry = message.allowUpdateAfterExpiry; - obj.allow_update_after_misbehaviour = message.allowUpdateAfterMisbehaviour; + obj.allow_update_after_expiry = message.allowUpdateAfterExpiry === false ? undefined : message.allowUpdateAfterExpiry; + obj.allow_update_after_misbehaviour = message.allowUpdateAfterMisbehaviour === false ? undefined : message.allowUpdateAfterMisbehaviour; return obj; }, fromAminoMsg(object: ClientStateAminoMsg): ClientState { @@ -640,7 +640,7 @@ export const Misbehaviour = { }, toAmino(message: Misbehaviour, useInterfaces: boolean = false): MisbehaviourAmino { const obj: any = {}; - obj.client_id = message.clientId; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.header_1 = message.header1 ? Header.toAmino(message.header1, useInterfaces) : undefined; obj.header_2 = message.header2 ? Header.toAmino(message.header2, useInterfaces) : undefined; return obj; @@ -827,8 +827,8 @@ export const Fraction = { }, toAmino(message: Fraction, useInterfaces: boolean = false): FractionAmino { const obj: any = {}; - obj.numerator = message.numerator ? message.numerator.toString() : undefined; - obj.denominator = message.denominator ? message.denominator.toString() : undefined; + obj.numerator = message.numerator !== BigInt(0) ? message.numerator.toString() : undefined; + obj.denominator = message.denominator !== BigInt(0) ? message.denominator.toString() : undefined; return obj; }, fromAminoMsg(object: FractionAminoMsg): Fraction { diff --git a/packages/types/protobuf/codegen/index.ts b/packages/types/protobuf/codegen/index.ts index 2f6f969974..6f6ff0db68 100644 --- a/packages/types/protobuf/codegen/index.ts +++ b/packages/types/protobuf/codegen/index.ts @@ -1,7 +1,7 @@ /** - * This file and any referenced files were automatically generated by @cosmology/telescope@1.4.12 + * This file and any referenced files were automatically generated by @cosmology/telescope@1.8.3 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain - * and run the transpile command or yarn proto command to regenerate this bundle. + * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ export * from "./alliance/bundle"; diff --git a/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/consumer.ts b/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/consumer.ts index 67c2d3ab62..4d46d744e1 100644 --- a/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/consumer.ts +++ b/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/consumer.ts @@ -186,9 +186,9 @@ export const CrossChainValidator = { toAmino(message: CrossChainValidator, useInterfaces: boolean = false): CrossChainValidatorAmino { const obj: any = {}; obj.address = message.address ? base64FromBytes(message.address) : undefined; - obj.power = message.power ? message.power.toString() : undefined; + obj.power = message.power !== BigInt(0) ? message.power.toString() : undefined; obj.pubkey = message.pubkey ? decodePubkey(message.pubkey) : undefined; - obj.opted_out = message.optedOut; + obj.opted_out = message.optedOut === false ? undefined : message.optedOut; return obj; }, fromAminoMsg(object: CrossChainValidatorAminoMsg): CrossChainValidator { @@ -262,7 +262,7 @@ export const SlashRecord = { }, toAmino(message: SlashRecord, useInterfaces: boolean = false): SlashRecordAmino { const obj: any = {}; - obj.waiting_on_reply = message.waitingOnReply; + obj.waiting_on_reply = message.waitingOnReply === false ? undefined : message.waitingOnReply; obj.send_time = message.sendTime ? Timestamp.toAmino(toTimestamp(message.sendTime)) : undefined; return obj; }, @@ -290,7 +290,7 @@ export const Cosmos_cryptoPubKey_InterfaceDecoder = (input: BinaryReader | Uint8 return data; } }; -export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino) => { +export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino): Any => { return encodePubkey(content); }; export const Cosmos_cryptoPubKey_ToAmino = (content: Any, useInterfaces: boolean = false): Pubkey | null => { diff --git a/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/genesis.ts b/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/genesis.ts index 13c7b67e8f..0e7df8aaca 100644 --- a/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/genesis.ts +++ b/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/genesis.ts @@ -153,11 +153,6 @@ export interface HeightToValsetUpdateIDSDKType { * the same downtime infraction. */ export interface OutstandingDowntime { - /** - * OutstandingDowntime defines the type used internally to the consumer CCV - * module and is used in order to not send multiple slashing requests for - * the same downtime infraction. - */ validatorConsensusAddress: string; } export interface OutstandingDowntimeProtoMsg { @@ -170,11 +165,6 @@ export interface OutstandingDowntimeProtoMsg { * the same downtime infraction. */ export interface OutstandingDowntimeAmino { - /** - * OutstandingDowntime defines the type used internally to the consumer CCV - * module and is used in order to not send multiple slashing requests for - * the same downtime infraction. - */ validator_consensus_address?: string; } export interface OutstandingDowntimeAminoMsg { @@ -195,11 +185,6 @@ export interface OutstandingDowntimeSDKType { * to the consumer CCV module. */ export interface LastTransmissionBlockHeight { - /** - * LastTransmissionBlockHeight is the last time validator holding - * pools were transmitted to the provider chain. This type is used internally - * to the consumer CCV module. - */ height: bigint; } export interface LastTransmissionBlockHeightProtoMsg { @@ -212,11 +197,6 @@ export interface LastTransmissionBlockHeightProtoMsg { * to the consumer CCV module. */ export interface LastTransmissionBlockHeightAmino { - /** - * LastTransmissionBlockHeight is the last time validator holding - * pools were transmitted to the provider chain. This type is used internally - * to the consumer CCV module. - */ height?: string; } export interface LastTransmissionBlockHeightAminoMsg { @@ -481,34 +461,34 @@ export const GenesisState = { toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; obj.params = message.params ? ConsumerParams.toAmino(message.params, useInterfaces) : undefined; - obj.provider_client_id = message.providerClientId; - obj.provider_channel_id = message.providerChannelId; - obj.new_chain = message.newChain; + obj.provider_client_id = message.providerClientId === "" ? undefined : message.providerClientId; + obj.provider_channel_id = message.providerChannelId === "" ? undefined : message.providerChannelId; + obj.new_chain = message.newChain === false ? undefined : message.newChain; obj.provider_client_state = message.providerClientState ? ClientState.toAmino(message.providerClientState, useInterfaces) : undefined; obj.provider_consensus_state = message.providerConsensusState ? ConsensusState.toAmino(message.providerConsensusState, useInterfaces) : undefined; if (message.maturingPackets) { obj.maturing_packets = message.maturingPackets.map(e => e ? MaturingVSCPacket.toAmino(e, useInterfaces) : undefined); } else { - obj.maturing_packets = []; + obj.maturing_packets = message.maturingPackets; } if (message.initialValSet) { obj.initial_val_set = message.initialValSet.map(e => e ? ValidatorUpdate.toAmino(e, useInterfaces) : undefined); } else { - obj.initial_val_set = []; + obj.initial_val_set = message.initialValSet; } if (message.heightToValsetUpdateId) { obj.height_to_valset_update_id = message.heightToValsetUpdateId.map(e => e ? HeightToValsetUpdateID.toAmino(e, useInterfaces) : undefined); } else { - obj.height_to_valset_update_id = []; + obj.height_to_valset_update_id = message.heightToValsetUpdateId; } if (message.outstandingDowntimeSlashing) { obj.outstanding_downtime_slashing = message.outstandingDowntimeSlashing.map(e => e ? OutstandingDowntime.toAmino(e, useInterfaces) : undefined); } else { - obj.outstanding_downtime_slashing = []; + obj.outstanding_downtime_slashing = message.outstandingDowntimeSlashing; } obj.pending_consumer_packets = message.pendingConsumerPackets ? ConsumerPacketDataList.toAmino(message.pendingConsumerPackets, useInterfaces) : undefined; obj.last_transmission_block_height = message.lastTransmissionBlockHeight ? LastTransmissionBlockHeight.toAmino(message.lastTransmissionBlockHeight, useInterfaces) : undefined; - obj.preCCV = message.preCCV; + obj.preCCV = message.preCCV === false ? undefined : message.preCCV; obj.provider = message.provider ? ProviderInfo.toAmino(message.provider, useInterfaces) : undefined; return obj; }, @@ -583,8 +563,8 @@ export const HeightToValsetUpdateID = { }, toAmino(message: HeightToValsetUpdateID, useInterfaces: boolean = false): HeightToValsetUpdateIDAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.valset_update_id = message.valsetUpdateId ? message.valsetUpdateId.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.valset_update_id = message.valsetUpdateId !== BigInt(0) ? message.valsetUpdateId.toString() : undefined; return obj; }, fromAminoMsg(object: HeightToValsetUpdateIDAminoMsg): HeightToValsetUpdateID { @@ -647,7 +627,7 @@ export const OutstandingDowntime = { }, toAmino(message: OutstandingDowntime, useInterfaces: boolean = false): OutstandingDowntimeAmino { const obj: any = {}; - obj.validator_consensus_address = message.validatorConsensusAddress; + obj.validator_consensus_address = message.validatorConsensusAddress === "" ? undefined : message.validatorConsensusAddress; return obj; }, fromAminoMsg(object: OutstandingDowntimeAminoMsg): OutstandingDowntime { @@ -710,7 +690,7 @@ export const LastTransmissionBlockHeight = { }, toAmino(message: LastTransmissionBlockHeight, useInterfaces: boolean = false): LastTransmissionBlockHeightAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; return obj; }, fromAminoMsg(object: LastTransmissionBlockHeightAminoMsg): LastTransmissionBlockHeight { @@ -784,7 +764,7 @@ export const MaturingVSCPacket = { }, toAmino(message: MaturingVSCPacket, useInterfaces: boolean = false): MaturingVSCPacketAmino { const obj: any = {}; - obj.vscId = message.vscId ? message.vscId.toString() : undefined; + obj.vscId = message.vscId !== BigInt(0) ? message.vscId.toString() : undefined; obj.maturity_time = message.maturityTime ? Timestamp.toAmino(toTimestamp(message.maturityTime)) : undefined; return obj; }, @@ -849,7 +829,7 @@ export const ConsumerPacketDataList = { if (message.list) { obj.list = message.list.map(e => e ? ConsumerPacketData.toAmino(e, useInterfaces) : undefined); } else { - obj.list = []; + obj.list = message.list; } return obj; }, diff --git a/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/query.ts b/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/query.ts index b2ae810ea7..42e6e0a9fa 100644 --- a/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/query.ts +++ b/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/query.ts @@ -314,13 +314,13 @@ export const NextFeeDistributionEstimate = { }, toAmino(message: NextFeeDistributionEstimate, useInterfaces: boolean = false): NextFeeDistributionEstimateAmino { const obj: any = {}; - obj.currentHeight = message.currentHeight ? message.currentHeight.toString() : undefined; - obj.lastHeight = message.lastHeight ? message.lastHeight.toString() : undefined; - obj.nextHeight = message.nextHeight ? message.nextHeight.toString() : undefined; - obj.distribution_fraction = message.distributionFraction; - obj.total = message.total; - obj.toProvider = message.toProvider; - obj.toConsumer = message.toConsumer; + obj.currentHeight = message.currentHeight !== BigInt(0) ? message.currentHeight.toString() : undefined; + obj.lastHeight = message.lastHeight !== BigInt(0) ? message.lastHeight.toString() : undefined; + obj.nextHeight = message.nextHeight !== BigInt(0) ? message.nextHeight.toString() : undefined; + obj.distribution_fraction = message.distributionFraction === "" ? undefined : message.distributionFraction; + obj.total = message.total === "" ? undefined : message.total; + obj.toProvider = message.toProvider === "" ? undefined : message.toProvider; + obj.toConsumer = message.toConsumer === "" ? undefined : message.toConsumer; return obj; }, fromAminoMsg(object: NextFeeDistributionEstimateAminoMsg): NextFeeDistributionEstimate { @@ -797,7 +797,7 @@ export const QueryThrottleStateResponse = { if (message.packetDataQueue) { obj.packet_data_queue = message.packetDataQueue.map(e => e ? ConsumerPacketData.toAmino(e, useInterfaces) : undefined); } else { - obj.packet_data_queue = []; + obj.packet_data_queue = message.packetDataQueue; } return obj; }, @@ -894,10 +894,10 @@ export const ChainInfo = { }, toAmino(message: ChainInfo, useInterfaces: boolean = false): ChainInfoAmino { const obj: any = {}; - obj.chainID = message.chainID; - obj.clientID = message.clientID; - obj.connectionID = message.connectionID; - obj.channelID = message.channelID; + obj.chainID = message.chainID === "" ? undefined : message.chainID; + obj.clientID = message.clientID === "" ? undefined : message.clientID; + obj.connectionID = message.connectionID === "" ? undefined : message.connectionID; + obj.channelID = message.channelID === "" ? undefined : message.channelID; return obj; }, fromAminoMsg(object: ChainInfoAminoMsg): ChainInfo { diff --git a/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/tx.ts b/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/tx.ts index 0afeaf0084..f84d02c212 100644 --- a/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/tx.ts +++ b/packages/types/protobuf/codegen/interchain_security/ccv/consumer/v1/tx.ts @@ -94,7 +94,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? ConsumerParams.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/interchain_security/ccv/v1/shared_consumer.ts b/packages/types/protobuf/codegen/interchain_security/ccv/v1/shared_consumer.ts index 0fc7b595d6..944af388af 100644 --- a/packages/types/protobuf/codegen/interchain_security/ccv/v1/shared_consumer.ts +++ b/packages/types/protobuf/codegen/interchain_security/ccv/v1/shared_consumer.ts @@ -413,25 +413,25 @@ export const ConsumerParams = { }, toAmino(message: ConsumerParams, useInterfaces: boolean = false): ConsumerParamsAmino { const obj: any = {}; - obj.enabled = message.enabled; - obj.blocks_per_distribution_transmission = message.blocksPerDistributionTransmission ? message.blocksPerDistributionTransmission.toString() : undefined; - obj.distribution_transmission_channel = message.distributionTransmissionChannel; - obj.provider_fee_pool_addr_str = message.providerFeePoolAddrStr; + obj.enabled = message.enabled === false ? undefined : message.enabled; + obj.blocks_per_distribution_transmission = message.blocksPerDistributionTransmission !== BigInt(0) ? message.blocksPerDistributionTransmission.toString() : undefined; + obj.distribution_transmission_channel = message.distributionTransmissionChannel === "" ? undefined : message.distributionTransmissionChannel; + obj.provider_fee_pool_addr_str = message.providerFeePoolAddrStr === "" ? undefined : message.providerFeePoolAddrStr; obj.ccv_timeout_period = message.ccvTimeoutPeriod ? Duration.toAmino(message.ccvTimeoutPeriod, useInterfaces) : undefined; obj.transfer_timeout_period = message.transferTimeoutPeriod ? Duration.toAmino(message.transferTimeoutPeriod, useInterfaces) : undefined; - obj.consumer_redistribution_fraction = message.consumerRedistributionFraction; - obj.historical_entries = message.historicalEntries ? message.historicalEntries.toString() : undefined; + obj.consumer_redistribution_fraction = message.consumerRedistributionFraction === "" ? undefined : message.consumerRedistributionFraction; + obj.historical_entries = message.historicalEntries !== BigInt(0) ? message.historicalEntries.toString() : undefined; obj.unbonding_period = message.unbondingPeriod ? Duration.toAmino(message.unbondingPeriod, useInterfaces) : undefined; - obj.soft_opt_out_threshold = message.softOptOutThreshold; + obj.soft_opt_out_threshold = message.softOptOutThreshold === "" ? undefined : message.softOptOutThreshold; if (message.rewardDenoms) { obj.reward_denoms = message.rewardDenoms.map(e => e); } else { - obj.reward_denoms = []; + obj.reward_denoms = message.rewardDenoms; } if (message.providerRewardDenoms) { obj.provider_reward_denoms = message.providerRewardDenoms.map(e => e); } else { - obj.provider_reward_denoms = []; + obj.provider_reward_denoms = message.providerRewardDenoms; } obj.retry_delay_period = message.retryDelayPeriod ? Duration.toAmino(message.retryDelayPeriod, useInterfaces) : undefined; return obj; @@ -520,7 +520,7 @@ export const ConsumerGenesisState = { const obj: any = {}; obj.params = message.params ? ConsumerParams.toAmino(message.params, useInterfaces) : undefined; obj.provider = message.provider ? ProviderInfo.toAmino(message.provider, useInterfaces) : undefined; - obj.new_chain = message.newChain; + obj.new_chain = message.newChain === false ? undefined : message.newChain; return obj; }, fromAminoMsg(object: ConsumerGenesisStateAminoMsg): ConsumerGenesisState { @@ -608,7 +608,7 @@ export const ProviderInfo = { if (message.initialValSet) { obj.initial_val_set = message.initialValSet.map(e => e ? ValidatorUpdate.toAmino(e, useInterfaces) : undefined); } else { - obj.initial_val_set = []; + obj.initial_val_set = message.initialValSet; } return obj; }, diff --git a/packages/types/protobuf/codegen/interchain_security/ccv/v1/wire.ts b/packages/types/protobuf/codegen/interchain_security/ccv/v1/wire.ts index cc5f28421a..f8723c6fe8 100644 --- a/packages/types/protobuf/codegen/interchain_security/ccv/v1/wire.ts +++ b/packages/types/protobuf/codegen/interchain_security/ccv/v1/wire.ts @@ -1,5 +1,5 @@ import { ValidatorUpdate, ValidatorUpdateAmino, ValidatorUpdateSDKType, Validator, ValidatorAmino, ValidatorSDKType } from "../../../tendermint/abci/types"; -import { Infraction, infractionFromJSON } from "../../../cosmos/staking/v1beta1/staking"; +import { Infraction } from "../../../cosmos/staking/v1beta1/staking"; import { BinaryReader, BinaryWriter } from "../../../binary"; /** ConsumerPacketType indicates interchain security specific packet types. */ export enum ConsumerPacketDataType { @@ -402,13 +402,13 @@ export const ValidatorSetChangePacketData = { if (message.validatorUpdates) { obj.validator_updates = message.validatorUpdates.map(e => e ? ValidatorUpdate.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_updates = []; + obj.validator_updates = message.validatorUpdates; } - obj.valset_update_id = message.valsetUpdateId ? message.valsetUpdateId.toString() : undefined; + obj.valset_update_id = message.valsetUpdateId !== BigInt(0) ? message.valsetUpdateId.toString() : undefined; if (message.slashAcks) { obj.slash_acks = message.slashAcks.map(e => e); } else { - obj.slash_acks = []; + obj.slash_acks = message.slashAcks; } return obj; }, @@ -472,7 +472,7 @@ export const VSCMaturedPacketData = { }, toAmino(message: VSCMaturedPacketData, useInterfaces: boolean = false): VSCMaturedPacketDataAmino { const obj: any = {}; - obj.valset_update_id = message.valsetUpdateId ? message.valsetUpdateId.toString() : undefined; + obj.valset_update_id = message.valsetUpdateId !== BigInt(0) ? message.valsetUpdateId.toString() : undefined; return obj; }, fromAminoMsg(object: VSCMaturedPacketDataAminoMsg): VSCMaturedPacketData { @@ -551,15 +551,15 @@ export const SlashPacketData = { message.valsetUpdateId = BigInt(object.valset_update_id); } if (object.infraction !== undefined && object.infraction !== null) { - message.infraction = infractionFromJSON(object.infraction); + message.infraction = object.infraction; } return message; }, toAmino(message: SlashPacketData, useInterfaces: boolean = false): SlashPacketDataAmino { const obj: any = {}; obj.validator = message.validator ? Validator.toAmino(message.validator, useInterfaces) : undefined; - obj.valset_update_id = message.valsetUpdateId ? message.valsetUpdateId.toString() : undefined; - obj.infraction = message.infraction; + obj.valset_update_id = message.valsetUpdateId !== BigInt(0) ? message.valsetUpdateId.toString() : undefined; + obj.infraction = message.infraction === 0 ? undefined : message.infraction; return obj; }, fromAminoMsg(object: SlashPacketDataAminoMsg): SlashPacketData { @@ -632,7 +632,7 @@ export const ConsumerPacketData = { fromAmino(object: ConsumerPacketDataAmino): ConsumerPacketData { const message = createBaseConsumerPacketData(); if (object.type !== undefined && object.type !== null) { - message.type = consumerPacketDataTypeFromJSON(object.type); + message.type = object.type; } if (object.slashPacketData !== undefined && object.slashPacketData !== null) { message.slashPacketData = SlashPacketData.fromAmino(object.slashPacketData); @@ -644,7 +644,7 @@ export const ConsumerPacketData = { }, toAmino(message: ConsumerPacketData, useInterfaces: boolean = false): ConsumerPacketDataAmino { const obj: any = {}; - obj.type = message.type; + obj.type = message.type === 0 ? undefined : message.type; obj.slashPacketData = message.slashPacketData ? SlashPacketData.toAmino(message.slashPacketData, useInterfaces) : undefined; obj.vscMaturedPacketData = message.vscMaturedPacketData ? VSCMaturedPacketData.toAmino(message.vscMaturedPacketData, useInterfaces) : undefined; return obj; @@ -720,8 +720,8 @@ export const HandshakeMetadata = { }, toAmino(message: HandshakeMetadata, useInterfaces: boolean = false): HandshakeMetadataAmino { const obj: any = {}; - obj.provider_fee_pool_addr = message.providerFeePoolAddr; - obj.version = message.version; + obj.provider_fee_pool_addr = message.providerFeePoolAddr === "" ? undefined : message.providerFeePoolAddr; + obj.version = message.version === "" ? undefined : message.version; return obj; }, fromAminoMsg(object: HandshakeMetadataAminoMsg): HandshakeMetadata { @@ -794,7 +794,7 @@ export const ConsumerPacketDataV1 = { fromAmino(object: ConsumerPacketDataV1Amino): ConsumerPacketDataV1 { const message = createBaseConsumerPacketDataV1(); if (object.type !== undefined && object.type !== null) { - message.type = consumerPacketDataTypeFromJSON(object.type); + message.type = object.type; } if (object.slashPacketData !== undefined && object.slashPacketData !== null) { message.slashPacketData = SlashPacketDataV1.fromAmino(object.slashPacketData); @@ -806,7 +806,7 @@ export const ConsumerPacketDataV1 = { }, toAmino(message: ConsumerPacketDataV1, useInterfaces: boolean = false): ConsumerPacketDataV1Amino { const obj: any = {}; - obj.type = message.type; + obj.type = message.type === 0 ? undefined : message.type; obj.slashPacketData = message.slashPacketData ? SlashPacketDataV1.toAmino(message.slashPacketData, useInterfaces) : undefined; obj.vscMaturedPacketData = message.vscMaturedPacketData ? VSCMaturedPacketData.toAmino(message.vscMaturedPacketData, useInterfaces) : undefined; return obj; @@ -887,15 +887,15 @@ export const SlashPacketDataV1 = { message.valsetUpdateId = BigInt(object.valset_update_id); } if (object.infraction !== undefined && object.infraction !== null) { - message.infraction = infractionTypeFromJSON(object.infraction); + message.infraction = object.infraction; } return message; }, toAmino(message: SlashPacketDataV1, useInterfaces: boolean = false): SlashPacketDataV1Amino { const obj: any = {}; obj.validator = message.validator ? Validator.toAmino(message.validator, useInterfaces) : undefined; - obj.valset_update_id = message.valsetUpdateId ? message.valsetUpdateId.toString() : undefined; - obj.infraction = message.infraction; + obj.valset_update_id = message.valsetUpdateId !== BigInt(0) ? message.valsetUpdateId.toString() : undefined; + obj.infraction = message.infraction === 0 ? undefined : message.infraction; return obj; }, fromAminoMsg(object: SlashPacketDataV1AminoMsg): SlashPacketDataV1 { diff --git a/packages/types/protobuf/codegen/juno/feeshare/v1/feeshare.ts b/packages/types/protobuf/codegen/juno/feeshare/v1/feeshare.ts index 98065ebdd7..b5ef7539aa 100644 --- a/packages/types/protobuf/codegen/juno/feeshare/v1/feeshare.ts +++ b/packages/types/protobuf/codegen/juno/feeshare/v1/feeshare.ts @@ -124,9 +124,9 @@ export const FeeShare = { }, toAmino(message: FeeShare, useInterfaces: boolean = false): FeeShareAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; - obj.deployer_address = message.deployerAddress; - obj.withdrawer_address = message.withdrawerAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; + obj.deployer_address = message.deployerAddress === "" ? undefined : message.deployerAddress; + obj.withdrawer_address = message.withdrawerAddress === "" ? undefined : message.withdrawerAddress; return obj; }, fromAminoMsg(object: FeeShareAminoMsg): FeeShare { diff --git a/packages/types/protobuf/codegen/juno/feeshare/v1/genesis.ts b/packages/types/protobuf/codegen/juno/feeshare/v1/genesis.ts index a0e36a21b6..4c7754210a 100644 --- a/packages/types/protobuf/codegen/juno/feeshare/v1/genesis.ts +++ b/packages/types/protobuf/codegen/juno/feeshare/v1/genesis.ts @@ -134,7 +134,7 @@ export const GenesisState = { if (message.feeShare) { obj.fee_share = message.feeShare.map(e => e ? FeeShare.toAmino(e, useInterfaces) : undefined); } else { - obj.fee_share = []; + obj.fee_share = message.feeShare; } return obj; }, @@ -218,12 +218,12 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.enable_fee_share = message.enableFeeShare; - obj.developer_shares = message.developerShares; + obj.enable_fee_share = message.enableFeeShare === false ? undefined : message.enableFeeShare; + obj.developer_shares = message.developerShares === "" ? undefined : message.developerShares; if (message.allowedDenoms) { obj.allowed_denoms = message.allowedDenoms.map(e => e); } else { - obj.allowed_denoms = []; + obj.allowed_denoms = message.allowedDenoms; } return obj; }, diff --git a/packages/types/protobuf/codegen/juno/feeshare/v1/query.ts b/packages/types/protobuf/codegen/juno/feeshare/v1/query.ts index 541d75a076..a1760ed5db 100644 --- a/packages/types/protobuf/codegen/juno/feeshare/v1/query.ts +++ b/packages/types/protobuf/codegen/juno/feeshare/v1/query.ts @@ -416,7 +416,7 @@ export const QueryFeeSharesResponse = { if (message.feeshare) { obj.feeshare = message.feeshare.map(e => e ? FeeShare.toAmino(e, useInterfaces) : undefined); } else { - obj.feeshare = []; + obj.feeshare = message.feeshare; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -481,7 +481,7 @@ export const QueryFeeShareRequest = { }, toAmino(message: QueryFeeShareRequest, useInterfaces: boolean = false): QueryFeeShareRequestAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; return obj; }, fromAminoMsg(object: QueryFeeShareRequestAminoMsg): QueryFeeShareRequest { @@ -731,7 +731,7 @@ export const QueryDeployerFeeSharesRequest = { }, toAmino(message: QueryDeployerFeeSharesRequest, useInterfaces: boolean = false): QueryDeployerFeeSharesRequestAmino { const obj: any = {}; - obj.deployer_address = message.deployerAddress; + obj.deployer_address = message.deployerAddress === "" ? undefined : message.deployerAddress; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -807,7 +807,7 @@ export const QueryDeployerFeeSharesResponse = { if (message.contractAddresses) { obj.contract_addresses = message.contractAddresses.map(e => e); } else { - obj.contract_addresses = []; + obj.contract_addresses = message.contractAddresses; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -883,7 +883,7 @@ export const QueryWithdrawerFeeSharesRequest = { }, toAmino(message: QueryWithdrawerFeeSharesRequest, useInterfaces: boolean = false): QueryWithdrawerFeeSharesRequestAmino { const obj: any = {}; - obj.withdrawer_address = message.withdrawerAddress; + obj.withdrawer_address = message.withdrawerAddress === "" ? undefined : message.withdrawerAddress; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -959,7 +959,7 @@ export const QueryWithdrawerFeeSharesResponse = { if (message.contractAddresses) { obj.contract_addresses = message.contractAddresses.map(e => e); } else { - obj.contract_addresses = []; + obj.contract_addresses = message.contractAddresses; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/juno/feeshare/v1/tx.ts b/packages/types/protobuf/codegen/juno/feeshare/v1/tx.ts index f0424847d0..d146782568 100644 --- a/packages/types/protobuf/codegen/juno/feeshare/v1/tx.ts +++ b/packages/types/protobuf/codegen/juno/feeshare/v1/tx.ts @@ -315,9 +315,9 @@ export const MsgRegisterFeeShare = { }, toAmino(message: MsgRegisterFeeShare, useInterfaces: boolean = false): MsgRegisterFeeShareAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; - obj.deployer_address = message.deployerAddress; - obj.withdrawer_address = message.withdrawerAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; + obj.deployer_address = message.deployerAddress === "" ? undefined : message.deployerAddress; + obj.withdrawer_address = message.withdrawerAddress === "" ? undefined : message.withdrawerAddress; return obj; }, fromAminoMsg(object: MsgRegisterFeeShareAminoMsg): MsgRegisterFeeShare { @@ -452,9 +452,9 @@ export const MsgUpdateFeeShare = { }, toAmino(message: MsgUpdateFeeShare, useInterfaces: boolean = false): MsgUpdateFeeShareAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; - obj.deployer_address = message.deployerAddress; - obj.withdrawer_address = message.withdrawerAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; + obj.deployer_address = message.deployerAddress === "" ? undefined : message.deployerAddress; + obj.withdrawer_address = message.withdrawerAddress === "" ? undefined : message.withdrawerAddress; return obj; }, fromAminoMsg(object: MsgUpdateFeeShareAminoMsg): MsgUpdateFeeShare { @@ -578,8 +578,8 @@ export const MsgCancelFeeShare = { }, toAmino(message: MsgCancelFeeShare, useInterfaces: boolean = false): MsgCancelFeeShareAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; - obj.deployer_address = message.deployerAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; + obj.deployer_address = message.deployerAddress === "" ? undefined : message.deployerAddress; return obj; }, fromAminoMsg(object: MsgCancelFeeShareAminoMsg): MsgCancelFeeShare { @@ -703,7 +703,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/juno/mint/mint.ts b/packages/types/protobuf/codegen/juno/mint/mint.ts index 59d5ba1f63..2566b116f0 100644 --- a/packages/types/protobuf/codegen/juno/mint/mint.ts +++ b/packages/types/protobuf/codegen/juno/mint/mint.ts @@ -151,11 +151,11 @@ export const Minter = { }, toAmino(message: Minter, useInterfaces: boolean = false): MinterAmino { const obj: any = {}; - obj.inflation = message.inflation; - obj.phase = message.phase ? message.phase.toString() : undefined; - obj.start_phase_block = message.startPhaseBlock ? message.startPhaseBlock.toString() : undefined; - obj.annual_provisions = message.annualProvisions; - obj.target_supply = message.targetSupply; + obj.inflation = message.inflation === "" ? undefined : message.inflation; + obj.phase = message.phase !== BigInt(0) ? message.phase.toString() : undefined; + obj.start_phase_block = message.startPhaseBlock !== BigInt(0) ? message.startPhaseBlock.toString() : undefined; + obj.annual_provisions = message.annualProvisions === "" ? undefined : message.annualProvisions; + obj.target_supply = message.targetSupply === "" ? undefined : message.targetSupply; return obj; }, fromAminoMsg(object: MinterAminoMsg): Minter { @@ -229,8 +229,8 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.mint_denom = message.mintDenom; - obj.blocks_per_year = message.blocksPerYear ? message.blocksPerYear.toString() : undefined; + obj.mint_denom = message.mintDenom === "" ? undefined : message.mintDenom; + obj.blocks_per_year = message.blocksPerYear !== BigInt(0) ? message.blocksPerYear.toString() : undefined; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/juno/mint/tx.ts b/packages/types/protobuf/codegen/juno/mint/tx.ts index 5c4d545a1d..d462e38af4 100644 --- a/packages/types/protobuf/codegen/juno/mint/tx.ts +++ b/packages/types/protobuf/codegen/juno/mint/tx.ts @@ -132,7 +132,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/kujira/denom/authorityMetadata.ts b/packages/types/protobuf/codegen/kujira/denom/authorityMetadata.ts index aa56c48476..399d32aee5 100644 --- a/packages/types/protobuf/codegen/kujira/denom/authorityMetadata.ts +++ b/packages/types/protobuf/codegen/kujira/denom/authorityMetadata.ts @@ -6,7 +6,7 @@ import { BinaryReader, BinaryWriter } from "../../binary"; */ export interface DenomAuthorityMetadata { /** Can be empty for no admin, or a valid kujira address */ - Admin: string; + admin: string; } export interface DenomAuthorityMetadataProtoMsg { typeUrl: "/kujira.denom.DenomAuthorityMetadata"; @@ -35,14 +35,14 @@ export interface DenomAuthorityMetadataSDKType { } function createBaseDenomAuthorityMetadata(): DenomAuthorityMetadata { return { - Admin: "" + admin: "" }; } export const DenomAuthorityMetadata = { typeUrl: "/kujira.denom.DenomAuthorityMetadata", encode(message: DenomAuthorityMetadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.Admin !== "") { - writer.uint32(10).string(message.Admin); + if (message.admin !== "") { + writer.uint32(10).string(message.admin); } return writer; }, @@ -54,7 +54,7 @@ export const DenomAuthorityMetadata = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.Admin = reader.string(); + message.admin = reader.string(); break; default: reader.skipType(tag & 7); @@ -65,19 +65,19 @@ export const DenomAuthorityMetadata = { }, fromPartial(object: Partial): DenomAuthorityMetadata { const message = createBaseDenomAuthorityMetadata(); - message.Admin = object.Admin ?? ""; + message.admin = object.admin ?? ""; return message; }, fromAmino(object: DenomAuthorityMetadataAmino): DenomAuthorityMetadata { const message = createBaseDenomAuthorityMetadata(); if (object.Admin !== undefined && object.Admin !== null) { - message.Admin = object.Admin; + message.admin = object.Admin; } return message; }, toAmino(message: DenomAuthorityMetadata, useInterfaces: boolean = false): DenomAuthorityMetadataAmino { const obj: any = {}; - obj.Admin = message.Admin; + obj.Admin = message.admin === "" ? undefined : message.admin; return obj; }, fromAminoMsg(object: DenomAuthorityMetadataAminoMsg): DenomAuthorityMetadata { diff --git a/packages/types/protobuf/codegen/kujira/denom/genesis.ts b/packages/types/protobuf/codegen/kujira/denom/genesis.ts index 3f866d8d15..4eeb2a72a7 100644 --- a/packages/types/protobuf/codegen/kujira/denom/genesis.ts +++ b/packages/types/protobuf/codegen/kujira/denom/genesis.ts @@ -104,7 +104,7 @@ export const GenesisState = { if (message.factoryDenoms) { obj.factory_denoms = message.factoryDenoms.map(e => e ? GenesisDenom.toAmino(e, useInterfaces) : undefined); } else { - obj.factory_denoms = []; + obj.factory_denoms = message.factoryDenoms; } return obj; }, @@ -179,7 +179,7 @@ export const GenesisDenom = { }, toAmino(message: GenesisDenom, useInterfaces: boolean = false): GenesisDenomAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; obj.authority_metadata = message.authorityMetadata ? DenomAuthorityMetadata.toAmino(message.authorityMetadata, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/kujira/denom/params.ts b/packages/types/protobuf/codegen/kujira/denom/params.ts index 1d4db470a0..fb414d0448 100644 --- a/packages/types/protobuf/codegen/kujira/denom/params.ts +++ b/packages/types/protobuf/codegen/kujira/denom/params.ts @@ -65,7 +65,7 @@ export const Params = { if (message.creationFee) { obj.creation_fee = message.creationFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.creation_fee = []; + obj.creation_fee = message.creationFee; } return obj; }, diff --git a/packages/types/protobuf/codegen/kujira/denom/query.ts b/packages/types/protobuf/codegen/kujira/denom/query.ts index dcf63a8542..a9b33a60e6 100644 --- a/packages/types/protobuf/codegen/kujira/denom/query.ts +++ b/packages/types/protobuf/codegen/kujira/denom/query.ts @@ -263,7 +263,7 @@ export const QueryDenomAuthorityMetadataRequest = { }, toAmino(message: QueryDenomAuthorityMetadataRequest, useInterfaces: boolean = false): QueryDenomAuthorityMetadataRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryDenomAuthorityMetadataRequestAminoMsg): QueryDenomAuthorityMetadataRequest { @@ -389,7 +389,7 @@ export const QueryDenomsFromCreatorRequest = { }, toAmino(message: QueryDenomsFromCreatorRequest, useInterfaces: boolean = false): QueryDenomsFromCreatorRequestAmino { const obj: any = {}; - obj.creator = message.creator; + obj.creator = message.creator === "" ? undefined : message.creator; return obj; }, fromAminoMsg(object: QueryDenomsFromCreatorRequestAminoMsg): QueryDenomsFromCreatorRequest { @@ -453,7 +453,7 @@ export const QueryDenomsFromCreatorResponse = { if (message.denoms) { obj.denoms = message.denoms.map(e => e); } else { - obj.denoms = []; + obj.denoms = message.denoms; } return obj; }, diff --git a/packages/types/protobuf/codegen/kujira/denom/tx.ts b/packages/types/protobuf/codegen/kujira/denom/tx.ts index 903fd00aec..a74087c82e 100644 --- a/packages/types/protobuf/codegen/kujira/denom/tx.ts +++ b/packages/types/protobuf/codegen/kujira/denom/tx.ts @@ -255,8 +255,8 @@ export const MsgCreateDenom = { }, toAmino(message: MsgCreateDenom, useInterfaces: boolean = false): MsgCreateDenomAmino { const obj: any = {}; - obj.sender = message.sender; - obj.nonce = message.nonce; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.nonce = message.nonce === "" ? undefined : message.nonce; return obj; }, fromAminoMsg(object: MsgCreateDenomAminoMsg): MsgCreateDenom { @@ -319,7 +319,7 @@ export const MsgCreateDenomResponse = { }, toAmino(message: MsgCreateDenomResponse, useInterfaces: boolean = false): MsgCreateDenomResponseAmino { const obj: any = {}; - obj.new_token_denom = message.newTokenDenom; + obj.new_token_denom = message.newTokenDenom === "" ? undefined : message.newTokenDenom; return obj; }, fromAminoMsg(object: MsgCreateDenomResponseAminoMsg): MsgCreateDenomResponse { @@ -404,9 +404,9 @@ export const MsgMint = { }, toAmino(message: MsgMint, useInterfaces: boolean = false): MsgMintAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; - obj.recipient = message.recipient; + obj.recipient = message.recipient === "" ? undefined : message.recipient; return obj; }, fromAminoMsg(object: MsgMintAminoMsg): MsgMint { @@ -530,7 +530,7 @@ export const MsgBurn = { }, toAmino(message: MsgBurn, useInterfaces: boolean = false): MsgBurnAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -666,9 +666,9 @@ export const MsgChangeAdmin = { }, toAmino(message: MsgChangeAdmin, useInterfaces: boolean = false): MsgChangeAdminAmino { const obj: any = {}; - obj.sender = message.sender; - obj.denom = message.denom; - obj.newAdmin = message.newAdmin; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.newAdmin = message.newAdmin === "" ? undefined : message.newAdmin; return obj; }, fromAminoMsg(object: MsgChangeAdminAminoMsg): MsgChangeAdmin { diff --git a/packages/types/protobuf/codegen/kujira/oracle/genesis.ts b/packages/types/protobuf/codegen/kujira/oracle/genesis.ts index 6a34410514..6f15ea61b3 100644 --- a/packages/types/protobuf/codegen/kujira/oracle/genesis.ts +++ b/packages/types/protobuf/codegen/kujira/oracle/genesis.ts @@ -196,27 +196,27 @@ export const GenesisState = { if (message.feederDelegations) { obj.feeder_delegations = message.feederDelegations.map(e => e ? FeederDelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.feeder_delegations = []; + obj.feeder_delegations = message.feederDelegations; } if (message.exchangeRates) { obj.exchange_rates = message.exchangeRates.map(e => e ? ExchangeRateTuple.toAmino(e, useInterfaces) : undefined); } else { - obj.exchange_rates = []; + obj.exchange_rates = message.exchangeRates; } if (message.missCounters) { obj.miss_counters = message.missCounters.map(e => e ? MissCounter.toAmino(e, useInterfaces) : undefined); } else { - obj.miss_counters = []; + obj.miss_counters = message.missCounters; } if (message.aggregateExchangeRatePrevotes) { obj.aggregate_exchange_rate_prevotes = message.aggregateExchangeRatePrevotes.map(e => e ? AggregateExchangeRatePrevote.toAmino(e, useInterfaces) : undefined); } else { - obj.aggregate_exchange_rate_prevotes = []; + obj.aggregate_exchange_rate_prevotes = message.aggregateExchangeRatePrevotes; } if (message.aggregateExchangeRateVotes) { obj.aggregate_exchange_rate_votes = message.aggregateExchangeRateVotes.map(e => e ? AggregateExchangeRateVote.toAmino(e, useInterfaces) : undefined); } else { - obj.aggregate_exchange_rate_votes = []; + obj.aggregate_exchange_rate_votes = message.aggregateExchangeRateVotes; } return obj; }, @@ -291,8 +291,8 @@ export const FeederDelegation = { }, toAmino(message: FeederDelegation, useInterfaces: boolean = false): FeederDelegationAmino { const obj: any = {}; - obj.feeder_address = message.feederAddress; - obj.validator_address = message.validatorAddress; + obj.feeder_address = message.feederAddress === "" ? undefined : message.feederAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: FeederDelegationAminoMsg): FeederDelegation { @@ -366,8 +366,8 @@ export const MissCounter = { }, toAmino(message: MissCounter, useInterfaces: boolean = false): MissCounterAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.miss_counter = message.missCounter ? message.missCounter.toString() : undefined; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.miss_counter = message.missCounter !== BigInt(0) ? message.missCounter.toString() : undefined; return obj; }, fromAminoMsg(object: MissCounterAminoMsg): MissCounter { diff --git a/packages/types/protobuf/codegen/kujira/oracle/oracle.ts b/packages/types/protobuf/codegen/kujira/oracle/oracle.ts index ad38eb7f54..565d8f6be5 100644 --- a/packages/types/protobuf/codegen/kujira/oracle/oracle.ts +++ b/packages/types/protobuf/codegen/kujira/oracle/oracle.ts @@ -264,18 +264,18 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.vote_period = message.votePeriod ? message.votePeriod.toString() : undefined; - obj.vote_threshold = message.voteThreshold; - obj.reward_band = message.rewardBand; - obj.reward_distribution_window = message.rewardDistributionWindow ? message.rewardDistributionWindow.toString() : undefined; + obj.vote_period = message.votePeriod !== BigInt(0) ? message.votePeriod.toString() : undefined; + obj.vote_threshold = message.voteThreshold === "" ? undefined : message.voteThreshold; + obj.reward_band = message.rewardBand === "" ? undefined : message.rewardBand; + obj.reward_distribution_window = message.rewardDistributionWindow !== BigInt(0) ? message.rewardDistributionWindow.toString() : undefined; if (message.whitelist) { obj.whitelist = message.whitelist.map(e => e ? Denom.toAmino(e, useInterfaces) : undefined); } else { - obj.whitelist = []; + obj.whitelist = message.whitelist; } - obj.slash_fraction = message.slashFraction; - obj.slash_window = message.slashWindow ? message.slashWindow.toString() : undefined; - obj.min_valid_per_window = message.minValidPerWindow; + obj.slash_fraction = message.slashFraction === "" ? undefined : message.slashFraction; + obj.slash_window = message.slashWindow !== BigInt(0) ? message.slashWindow.toString() : undefined; + obj.min_valid_per_window = message.minValidPerWindow === "" ? undefined : message.minValidPerWindow; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { @@ -338,7 +338,7 @@ export const Denom = { }, toAmino(message: Denom, useInterfaces: boolean = false): DenomAmino { const obj: any = {}; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; return obj; }, fromAminoMsg(object: DenomAminoMsg): Denom { @@ -423,9 +423,9 @@ export const AggregateExchangeRatePrevote = { }, toAmino(message: AggregateExchangeRatePrevote, useInterfaces: boolean = false): AggregateExchangeRatePrevoteAmino { const obj: any = {}; - obj.hash = message.hash; - obj.voter = message.voter; - obj.submit_block = message.submitBlock ? message.submitBlock.toString() : undefined; + obj.hash = message.hash === "" ? undefined : message.hash; + obj.voter = message.voter === "" ? undefined : message.voter; + obj.submit_block = message.submitBlock !== BigInt(0) ? message.submitBlock.toString() : undefined; return obj; }, fromAminoMsg(object: AggregateExchangeRatePrevoteAminoMsg): AggregateExchangeRatePrevote { @@ -500,9 +500,9 @@ export const AggregateExchangeRateVote = { if (message.exchangeRateTuples) { obj.exchange_rate_tuples = message.exchangeRateTuples.map(e => e ? ExchangeRateTuple.toAmino(e, useInterfaces) : undefined); } else { - obj.exchange_rate_tuples = []; + obj.exchange_rate_tuples = message.exchangeRateTuples; } - obj.voter = message.voter; + obj.voter = message.voter === "" ? undefined : message.voter; return obj; }, fromAminoMsg(object: AggregateExchangeRateVoteAminoMsg): AggregateExchangeRateVote { @@ -576,8 +576,8 @@ export const ExchangeRateTuple = { }, toAmino(message: ExchangeRateTuple, useInterfaces: boolean = false): ExchangeRateTupleAmino { const obj: any = {}; - obj.denom = message.denom; - obj.exchange_rate = message.exchangeRate; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.exchange_rate = message.exchangeRate === "" ? undefined : message.exchangeRate; return obj; }, fromAminoMsg(object: ExchangeRateTupleAminoMsg): ExchangeRateTuple { diff --git a/packages/types/protobuf/codegen/kujira/oracle/query.ts b/packages/types/protobuf/codegen/kujira/oracle/query.ts index 47da3981c7..73775bc4d6 100644 --- a/packages/types/protobuf/codegen/kujira/oracle/query.ts +++ b/packages/types/protobuf/codegen/kujira/oracle/query.ts @@ -579,7 +579,7 @@ export const QueryExchangeRateRequest = { }, toAmino(message: QueryExchangeRateRequest, useInterfaces: boolean = false): QueryExchangeRateRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryExchangeRateRequestAminoMsg): QueryExchangeRateRequest { @@ -642,7 +642,7 @@ export const QueryExchangeRateResponse = { }, toAmino(message: QueryExchangeRateResponse, useInterfaces: boolean = false): QueryExchangeRateResponseAmino { const obj: any = {}; - obj.exchange_rate = message.exchangeRate; + obj.exchange_rate = message.exchangeRate === "" ? undefined : message.exchangeRate; return obj; }, fromAminoMsg(object: QueryExchangeRateResponseAminoMsg): QueryExchangeRateResponse { @@ -756,7 +756,7 @@ export const QueryExchangeRatesResponse = { if (message.exchangeRates) { obj.exchange_rates = message.exchangeRates.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.exchange_rates = []; + obj.exchange_rates = message.exchangeRates; } return obj; }, @@ -871,7 +871,7 @@ export const QueryActivesResponse = { if (message.actives) { obj.actives = message.actives.map(e => e); } else { - obj.actives = []; + obj.actives = message.actives; } return obj; }, @@ -986,7 +986,7 @@ export const QueryVoteTargetsResponse = { if (message.voteTargets) { obj.vote_targets = message.voteTargets.map(e => e); } else { - obj.vote_targets = []; + obj.vote_targets = message.voteTargets; } return obj; }, @@ -1050,7 +1050,7 @@ export const QueryFeederDelegationRequest = { }, toAmino(message: QueryFeederDelegationRequest, useInterfaces: boolean = false): QueryFeederDelegationRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryFeederDelegationRequestAminoMsg): QueryFeederDelegationRequest { @@ -1113,7 +1113,7 @@ export const QueryFeederDelegationResponse = { }, toAmino(message: QueryFeederDelegationResponse, useInterfaces: boolean = false): QueryFeederDelegationResponseAmino { const obj: any = {}; - obj.feeder_addr = message.feederAddr; + obj.feeder_addr = message.feederAddr === "" ? undefined : message.feederAddr; return obj; }, fromAminoMsg(object: QueryFeederDelegationResponseAminoMsg): QueryFeederDelegationResponse { @@ -1176,7 +1176,7 @@ export const QueryMissCounterRequest = { }, toAmino(message: QueryMissCounterRequest, useInterfaces: boolean = false): QueryMissCounterRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryMissCounterRequestAminoMsg): QueryMissCounterRequest { @@ -1239,7 +1239,7 @@ export const QueryMissCounterResponse = { }, toAmino(message: QueryMissCounterResponse, useInterfaces: boolean = false): QueryMissCounterResponseAmino { const obj: any = {}; - obj.miss_counter = message.missCounter ? message.missCounter.toString() : undefined; + obj.miss_counter = message.missCounter !== BigInt(0) ? message.missCounter.toString() : undefined; return obj; }, fromAminoMsg(object: QueryMissCounterResponseAminoMsg): QueryMissCounterResponse { @@ -1302,7 +1302,7 @@ export const QueryAggregatePrevoteRequest = { }, toAmino(message: QueryAggregatePrevoteRequest, useInterfaces: boolean = false): QueryAggregatePrevoteRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryAggregatePrevoteRequestAminoMsg): QueryAggregatePrevoteRequest { @@ -1479,7 +1479,7 @@ export const QueryAggregatePrevotesResponse = { if (message.aggregatePrevotes) { obj.aggregate_prevotes = message.aggregatePrevotes.map(e => e ? AggregateExchangeRatePrevote.toAmino(e, useInterfaces) : undefined); } else { - obj.aggregate_prevotes = []; + obj.aggregate_prevotes = message.aggregatePrevotes; } return obj; }, @@ -1543,7 +1543,7 @@ export const QueryAggregateVoteRequest = { }, toAmino(message: QueryAggregateVoteRequest, useInterfaces: boolean = false): QueryAggregateVoteRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr; + obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryAggregateVoteRequestAminoMsg): QueryAggregateVoteRequest { @@ -1720,7 +1720,7 @@ export const QueryAggregateVotesResponse = { if (message.aggregateVotes) { obj.aggregate_votes = message.aggregateVotes.map(e => e ? AggregateExchangeRateVote.toAmino(e, useInterfaces) : undefined); } else { - obj.aggregate_votes = []; + obj.aggregate_votes = message.aggregateVotes; } return obj; }, diff --git a/packages/types/protobuf/codegen/kujira/oracle/tx.ts b/packages/types/protobuf/codegen/kujira/oracle/tx.ts index 9e861a72ab..46018b4270 100644 --- a/packages/types/protobuf/codegen/kujira/oracle/tx.ts +++ b/packages/types/protobuf/codegen/kujira/oracle/tx.ts @@ -213,9 +213,9 @@ export const MsgAggregateExchangeRatePrevote = { }, toAmino(message: MsgAggregateExchangeRatePrevote, useInterfaces: boolean = false): MsgAggregateExchangeRatePrevoteAmino { const obj: any = {}; - obj.hash = message.hash; - obj.feeder = message.feeder; - obj.validator = message.validator; + obj.hash = message.hash === "" ? undefined : message.hash; + obj.feeder = message.feeder === "" ? undefined : message.feeder; + obj.validator = message.validator === "" ? undefined : message.validator; return obj; }, fromAminoMsg(object: MsgAggregateExchangeRatePrevoteAminoMsg): MsgAggregateExchangeRatePrevote { @@ -361,10 +361,10 @@ export const MsgAggregateExchangeRateVote = { }, toAmino(message: MsgAggregateExchangeRateVote, useInterfaces: boolean = false): MsgAggregateExchangeRateVoteAmino { const obj: any = {}; - obj.salt = message.salt; - obj.exchange_rates = message.exchangeRates; - obj.feeder = message.feeder; - obj.validator = message.validator; + obj.salt = message.salt === "" ? undefined : message.salt; + obj.exchange_rates = message.exchangeRates === "" ? undefined : message.exchangeRates; + obj.feeder = message.feeder === "" ? undefined : message.feeder; + obj.validator = message.validator === "" ? undefined : message.validator; return obj; }, fromAminoMsg(object: MsgAggregateExchangeRateVoteAminoMsg): MsgAggregateExchangeRateVote { @@ -488,8 +488,8 @@ export const MsgDelegateFeedConsent = { }, toAmino(message: MsgDelegateFeedConsent, useInterfaces: boolean = false): MsgDelegateFeedConsentAmino { const obj: any = {}; - obj.operator = message.operator; - obj.delegate = message.delegate; + obj.operator = message.operator === "" ? undefined : message.operator; + obj.delegate = message.delegate === "" ? undefined : message.delegate; return obj; }, fromAminoMsg(object: MsgDelegateFeedConsentAminoMsg): MsgDelegateFeedConsent { diff --git a/packages/types/protobuf/codegen/kujira/scheduler/genesis.ts b/packages/types/protobuf/codegen/kujira/scheduler/genesis.ts index fb6a3bf197..8e2e35d38f 100644 --- a/packages/types/protobuf/codegen/kujira/scheduler/genesis.ts +++ b/packages/types/protobuf/codegen/kujira/scheduler/genesis.ts @@ -96,9 +96,9 @@ export const GenesisState = { if (message.hookList) { obj.hookList = message.hookList.map(e => e ? Hook.toAmino(e, useInterfaces) : undefined); } else { - obj.hookList = []; + obj.hookList = message.hookList; } - obj.hookCount = message.hookCount ? message.hookCount.toString() : undefined; + obj.hookCount = message.hookCount !== BigInt(0) ? message.hookCount.toString() : undefined; return obj; }, fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { diff --git a/packages/types/protobuf/codegen/kujira/scheduler/hook.ts b/packages/types/protobuf/codegen/kujira/scheduler/hook.ts index 5b459aea1d..22b23ac529 100644 --- a/packages/types/protobuf/codegen/kujira/scheduler/hook.ts +++ b/packages/types/protobuf/codegen/kujira/scheduler/hook.ts @@ -130,15 +130,15 @@ export const Hook = { }, toAmino(message: Hook, useInterfaces: boolean = false): HookAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.executor = message.executor; - obj.contract = message.contract; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.executor = message.executor === "" ? undefined : message.executor; + obj.contract = message.contract === "" ? undefined : message.contract; obj.msg = message.msg ? base64FromBytes(message.msg) : undefined; - obj.frequency = message.frequency ? message.frequency.toString() : undefined; + obj.frequency = message.frequency !== BigInt(0) ? message.frequency.toString() : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } return obj; }, diff --git a/packages/types/protobuf/codegen/kujira/scheduler/proposal.ts b/packages/types/protobuf/codegen/kujira/scheduler/proposal.ts index 769497fd2f..c29666ba27 100644 --- a/packages/types/protobuf/codegen/kujira/scheduler/proposal.ts +++ b/packages/types/protobuf/codegen/kujira/scheduler/proposal.ts @@ -221,16 +221,16 @@ export const CreateHookProposal = { }, toAmino(message: CreateHookProposal, useInterfaces: boolean = false): CreateHookProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.executor = message.executor; - obj.contract = message.contract; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.executor = message.executor === "" ? undefined : message.executor; + obj.contract = message.contract === "" ? undefined : message.contract; obj.msg = message.msg ? base64FromBytes(message.msg) : undefined; - obj.frequency = message.frequency ? message.frequency.toString() : undefined; + obj.frequency = message.frequency !== BigInt(0) ? message.frequency.toString() : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } return obj; }, @@ -369,17 +369,17 @@ export const UpdateHookProposal = { }, toAmino(message: UpdateHookProposal, useInterfaces: boolean = false): UpdateHookProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.id = message.id ? message.id.toString() : undefined; - obj.executor = message.executor; - obj.contract = message.contract; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.executor = message.executor === "" ? undefined : message.executor; + obj.contract = message.contract === "" ? undefined : message.contract; obj.msg = message.msg ? base64FromBytes(message.msg) : undefined; - obj.frequency = message.frequency ? message.frequency.toString() : undefined; + obj.frequency = message.frequency !== BigInt(0) ? message.frequency.toString() : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.funds = []; + obj.funds = message.funds; } return obj; }, @@ -465,9 +465,9 @@ export const DeleteHookProposal = { }, toAmino(message: DeleteHookProposal, useInterfaces: boolean = false): DeleteHookProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.id = message.id ? message.id.toString() : undefined; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; return obj; }, fromAminoMsg(object: DeleteHookProposalAminoMsg): DeleteHookProposal { diff --git a/packages/types/protobuf/codegen/kujira/scheduler/query.ts b/packages/types/protobuf/codegen/kujira/scheduler/query.ts index 82b22f83c4..67a25a2b0f 100644 --- a/packages/types/protobuf/codegen/kujira/scheduler/query.ts +++ b/packages/types/protobuf/codegen/kujira/scheduler/query.ts @@ -57,7 +57,7 @@ export interface QueryGetHookRequestSDKType { id: bigint; } export interface QueryGetHookResponse { - Hook: Hook | undefined; + hook: Hook | undefined; } export interface QueryGetHookResponseProtoMsg { typeUrl: "/kujira.scheduler.QueryGetHookResponse"; @@ -91,7 +91,7 @@ export interface QueryAllHookRequestSDKType { pagination?: PageRequestSDKType | undefined; } export interface QueryAllHookResponse { - Hook: Hook[]; + hook: Hook[]; pagination?: PageResponse | undefined; } export interface QueryAllHookResponseProtoMsg { @@ -267,7 +267,7 @@ export const QueryGetHookRequest = { }, toAmino(message: QueryGetHookRequest, useInterfaces: boolean = false): QueryGetHookRequestAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; return obj; }, fromAminoMsg(object: QueryGetHookRequestAminoMsg): QueryGetHookRequest { @@ -288,14 +288,14 @@ export const QueryGetHookRequest = { }; function createBaseQueryGetHookResponse(): QueryGetHookResponse { return { - Hook: Hook.fromPartial({}) + hook: Hook.fromPartial({}) }; } export const QueryGetHookResponse = { typeUrl: "/kujira.scheduler.QueryGetHookResponse", encode(message: QueryGetHookResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.Hook !== undefined) { - Hook.encode(message.Hook, writer.uint32(10).fork()).ldelim(); + if (message.hook !== undefined) { + Hook.encode(message.hook, writer.uint32(10).fork()).ldelim(); } return writer; }, @@ -307,7 +307,7 @@ export const QueryGetHookResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.Hook = Hook.decode(reader, reader.uint32(), useInterfaces); + message.hook = Hook.decode(reader, reader.uint32(), useInterfaces); break; default: reader.skipType(tag & 7); @@ -318,19 +318,19 @@ export const QueryGetHookResponse = { }, fromPartial(object: Partial): QueryGetHookResponse { const message = createBaseQueryGetHookResponse(); - message.Hook = object.Hook !== undefined && object.Hook !== null ? Hook.fromPartial(object.Hook) : undefined; + message.hook = object.hook !== undefined && object.hook !== null ? Hook.fromPartial(object.hook) : undefined; return message; }, fromAmino(object: QueryGetHookResponseAmino): QueryGetHookResponse { const message = createBaseQueryGetHookResponse(); if (object.Hook !== undefined && object.Hook !== null) { - message.Hook = Hook.fromAmino(object.Hook); + message.hook = Hook.fromAmino(object.Hook); } return message; }, toAmino(message: QueryGetHookResponse, useInterfaces: boolean = false): QueryGetHookResponseAmino { const obj: any = {}; - obj.Hook = message.Hook ? Hook.toAmino(message.Hook, useInterfaces) : undefined; + obj.Hook = message.hook ? Hook.toAmino(message.hook, useInterfaces) : undefined; return obj; }, fromAminoMsg(object: QueryGetHookResponseAminoMsg): QueryGetHookResponse { @@ -414,14 +414,14 @@ export const QueryAllHookRequest = { }; function createBaseQueryAllHookResponse(): QueryAllHookResponse { return { - Hook: [], + hook: [], pagination: undefined }; } export const QueryAllHookResponse = { typeUrl: "/kujira.scheduler.QueryAllHookResponse", encode(message: QueryAllHookResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.Hook) { + for (const v of message.hook) { Hook.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { @@ -437,7 +437,7 @@ export const QueryAllHookResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.Hook.push(Hook.decode(reader, reader.uint32(), useInterfaces)); + message.hook.push(Hook.decode(reader, reader.uint32(), useInterfaces)); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32(), useInterfaces); @@ -451,13 +451,13 @@ export const QueryAllHookResponse = { }, fromPartial(object: Partial): QueryAllHookResponse { const message = createBaseQueryAllHookResponse(); - message.Hook = object.Hook?.map(e => Hook.fromPartial(e)) || []; + message.hook = object.hook?.map(e => Hook.fromPartial(e)) || []; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; }, fromAmino(object: QueryAllHookResponseAmino): QueryAllHookResponse { const message = createBaseQueryAllHookResponse(); - message.Hook = object.Hook?.map(e => Hook.fromAmino(e)) || []; + message.hook = object.Hook?.map(e => Hook.fromAmino(e)) || []; if (object.pagination !== undefined && object.pagination !== null) { message.pagination = PageResponse.fromAmino(object.pagination); } @@ -465,10 +465,10 @@ export const QueryAllHookResponse = { }, toAmino(message: QueryAllHookResponse, useInterfaces: boolean = false): QueryAllHookResponseAmino { const obj: any = {}; - if (message.Hook) { - obj.Hook = message.Hook.map(e => e ? Hook.toAmino(e, useInterfaces) : undefined); + if (message.hook) { + obj.Hook = message.hook.map(e => e ? Hook.toAmino(e, useInterfaces) : undefined); } else { - obj.Hook = []; + obj.Hook = message.hook; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/neutron/contractmanager/v1/failure.ts b/packages/types/protobuf/codegen/neutron/contractmanager/v1/failure.ts index 8bdbbd5f08..83dcc5e200 100644 --- a/packages/types/protobuf/codegen/neutron/contractmanager/v1/failure.ts +++ b/packages/types/protobuf/codegen/neutron/contractmanager/v1/failure.ts @@ -129,11 +129,11 @@ export const Failure = { }, toAmino(message: Failure, useInterfaces: boolean = false): FailureAmino { const obj: any = {}; - obj.channel_id = message.channelId; - obj.address = message.address; - obj.id = message.id ? message.id.toString() : undefined; - obj.ack_id = message.ackId ? message.ackId.toString() : undefined; - obj.ack_type = message.ackType; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.address = message.address === "" ? undefined : message.address; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.ack_id = message.ackId !== BigInt(0) ? message.ackId.toString() : undefined; + obj.ack_type = message.ackType === "" ? undefined : message.ackType; return obj; }, fromAminoMsg(object: FailureAminoMsg): Failure { diff --git a/packages/types/protobuf/codegen/neutron/cron/genesis.ts b/packages/types/protobuf/codegen/neutron/cron/genesis.ts index bce1437cef..5ece76e2c6 100644 --- a/packages/types/protobuf/codegen/neutron/cron/genesis.ts +++ b/packages/types/protobuf/codegen/neutron/cron/genesis.ts @@ -81,7 +81,7 @@ export const GenesisState = { if (message.scheduleList) { obj.scheduleList = message.scheduleList.map(e => e ? Schedule.toAmino(e, useInterfaces) : undefined); } else { - obj.scheduleList = []; + obj.scheduleList = message.scheduleList; } obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/neutron/cron/params.ts b/packages/types/protobuf/codegen/neutron/cron/params.ts index 04f2f53e3c..f1a53f51aa 100644 --- a/packages/types/protobuf/codegen/neutron/cron/params.ts +++ b/packages/types/protobuf/codegen/neutron/cron/params.ts @@ -81,8 +81,8 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.security_address = message.securityAddress; - obj.limit = message.limit ? message.limit.toString() : undefined; + obj.security_address = message.securityAddress === "" ? undefined : message.securityAddress; + obj.limit = message.limit !== BigInt(0) ? message.limit.toString() : undefined; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/neutron/cron/query.ts b/packages/types/protobuf/codegen/neutron/cron/query.ts index 5ec981c8d4..87cad512ef 100644 --- a/packages/types/protobuf/codegen/neutron/cron/query.ts +++ b/packages/types/protobuf/codegen/neutron/cron/query.ts @@ -261,7 +261,7 @@ export const QueryGetScheduleRequest = { }, toAmino(message: QueryGetScheduleRequest, useInterfaces: boolean = false): QueryGetScheduleRequestAmino { const obj: any = {}; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; return obj; }, fromAminoMsg(object: QueryGetScheduleRequestAminoMsg): QueryGetScheduleRequest { @@ -462,7 +462,7 @@ export const QuerySchedulesResponse = { if (message.schedules) { obj.schedules = message.schedules.map(e => e ? Schedule.toAmino(e, useInterfaces) : undefined); } else { - obj.schedules = []; + obj.schedules = message.schedules; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/neutron/cron/schedule.ts b/packages/types/protobuf/codegen/neutron/cron/schedule.ts index 45d9942f65..b384be218c 100644 --- a/packages/types/protobuf/codegen/neutron/cron/schedule.ts +++ b/packages/types/protobuf/codegen/neutron/cron/schedule.ts @@ -151,14 +151,14 @@ export const Schedule = { }, toAmino(message: Schedule, useInterfaces: boolean = false): ScheduleAmino { const obj: any = {}; - obj.name = message.name; - obj.period = message.period ? message.period.toString() : undefined; + obj.name = message.name === "" ? undefined : message.name; + obj.period = message.period !== BigInt(0) ? message.period.toString() : undefined; if (message.msgs) { obj.msgs = message.msgs.map(e => e ? MsgExecuteContract.toAmino(e, useInterfaces) : undefined); } else { - obj.msgs = []; + obj.msgs = message.msgs; } - obj.last_execute_height = message.lastExecuteHeight ? message.lastExecuteHeight.toString() : undefined; + obj.last_execute_height = message.lastExecuteHeight !== BigInt(0) ? message.lastExecuteHeight.toString() : undefined; return obj; }, fromAminoMsg(object: ScheduleAminoMsg): Schedule { @@ -232,8 +232,8 @@ export const MsgExecuteContract = { }, toAmino(message: MsgExecuteContract, useInterfaces: boolean = false): MsgExecuteContractAmino { const obj: any = {}; - obj.contract = message.contract; - obj.msg = message.msg; + obj.contract = message.contract === "" ? undefined : message.contract; + obj.msg = message.msg === "" ? undefined : message.msg; return obj; }, fromAminoMsg(object: MsgExecuteContractAminoMsg): MsgExecuteContract { @@ -296,7 +296,7 @@ export const ScheduleCount = { }, toAmino(message: ScheduleCount, useInterfaces: boolean = false): ScheduleCountAmino { const obj: any = {}; - obj.count = message.count; + obj.count = message.count === 0 ? undefined : message.count; return obj; }, fromAminoMsg(object: ScheduleCountAminoMsg): ScheduleCount { diff --git a/packages/types/protobuf/codegen/neutron/cron/tx.ts b/packages/types/protobuf/codegen/neutron/cron/tx.ts index 5b2e1940f0..f184574c67 100644 --- a/packages/types/protobuf/codegen/neutron/cron/tx.ts +++ b/packages/types/protobuf/codegen/neutron/cron/tx.ts @@ -132,8 +132,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/neutron/dex/deposit_record.ts b/packages/types/protobuf/codegen/neutron/dex/deposit_record.ts index ec6594cc01..7341ff9479 100644 --- a/packages/types/protobuf/codegen/neutron/dex/deposit_record.ts +++ b/packages/types/protobuf/codegen/neutron/dex/deposit_record.ts @@ -14,7 +14,7 @@ export interface DepositRecordProtoMsg { } export interface DepositRecordAmino { pair_id?: PairIDAmino | undefined; - shares_owned?: string; + shares_owned: string; center_tick_index?: string; lower_tick_index?: string; upper_tick_index?: string; @@ -132,11 +132,11 @@ export const DepositRecord = { toAmino(message: DepositRecord, useInterfaces: boolean = false): DepositRecordAmino { const obj: any = {}; obj.pair_id = message.pairId ? PairID.toAmino(message.pairId, useInterfaces) : undefined; - obj.shares_owned = message.sharesOwned; - obj.center_tick_index = message.centerTickIndex ? message.centerTickIndex.toString() : undefined; - obj.lower_tick_index = message.lowerTickIndex ? message.lowerTickIndex.toString() : undefined; - obj.upper_tick_index = message.upperTickIndex ? message.upperTickIndex.toString() : undefined; - obj.fee = message.fee ? message.fee.toString() : undefined; + obj.shares_owned = message.sharesOwned ?? ""; + obj.center_tick_index = message.centerTickIndex !== BigInt(0) ? message.centerTickIndex.toString() : undefined; + obj.lower_tick_index = message.lowerTickIndex !== BigInt(0) ? message.lowerTickIndex.toString() : undefined; + obj.upper_tick_index = message.upperTickIndex !== BigInt(0) ? message.upperTickIndex.toString() : undefined; + obj.fee = message.fee !== BigInt(0) ? message.fee.toString() : undefined; return obj; }, fromAminoMsg(object: DepositRecordAminoMsg): DepositRecord { diff --git a/packages/types/protobuf/codegen/neutron/dex/genesis.ts b/packages/types/protobuf/codegen/neutron/dex/genesis.ts index 1e155e7dfe..6d616cb34f 100644 --- a/packages/types/protobuf/codegen/neutron/dex/genesis.ts +++ b/packages/types/protobuf/codegen/neutron/dex/genesis.ts @@ -135,24 +135,24 @@ export const GenesisState = { if (message.tickLiquidityList) { obj.tick_liquidity_list = message.tickLiquidityList.map(e => e ? TickLiquidity.toAmino(e, useInterfaces) : undefined); } else { - obj.tick_liquidity_list = []; + obj.tick_liquidity_list = message.tickLiquidityList; } if (message.inactiveLimitOrderTrancheList) { obj.inactive_limit_order_tranche_list = message.inactiveLimitOrderTrancheList.map(e => e ? LimitOrderTranche.toAmino(e, useInterfaces) : undefined); } else { - obj.inactive_limit_order_tranche_list = []; + obj.inactive_limit_order_tranche_list = message.inactiveLimitOrderTrancheList; } if (message.limitOrderTrancheUserList) { obj.limit_order_tranche_user_list = message.limitOrderTrancheUserList.map(e => e ? LimitOrderTrancheUser.toAmino(e, useInterfaces) : undefined); } else { - obj.limit_order_tranche_user_list = []; + obj.limit_order_tranche_user_list = message.limitOrderTrancheUserList; } if (message.poolMetadataList) { obj.pool_metadata_list = message.poolMetadataList.map(e => e ? PoolMetadata.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_metadata_list = []; + obj.pool_metadata_list = message.poolMetadataList; } - obj.pool_count = message.poolCount ? message.poolCount.toString() : undefined; + obj.pool_count = message.poolCount !== BigInt(0) ? message.poolCount.toString() : undefined; return obj; }, fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { diff --git a/packages/types/protobuf/codegen/neutron/dex/limit_order_tranche.ts b/packages/types/protobuf/codegen/neutron/dex/limit_order_tranche.ts index 1d0dab08cd..88fa56c27c 100644 --- a/packages/types/protobuf/codegen/neutron/dex/limit_order_tranche.ts +++ b/packages/types/protobuf/codegen/neutron/dex/limit_order_tranche.ts @@ -48,10 +48,10 @@ export interface LimitOrderTrancheProtoMsg { } export interface LimitOrderTrancheAmino { key?: LimitOrderTrancheKeyAmino | undefined; - reserves_maker_denom?: string; - reserves_taker_denom?: string; - total_maker_denom?: string; - total_taker_denom?: string; + reserves_maker_denom: string; + reserves_taker_denom: string; + total_maker_denom: string; + total_taker_denom: string; /** * expiration_time is represented as an RFC 3339 formatted date. * LimitOrders with expiration_time set are valid as long as blockTime <= expiration_time. @@ -61,7 +61,7 @@ export interface LimitOrderTrancheAmino { * same, and the orders will be deleted at the end of the block. */ expiration_time?: string | undefined; - price_taker_to_maker?: string; + price_taker_to_maker: string; } export interface LimitOrderTrancheAminoMsg { type: "/neutron.dex.LimitOrderTranche"; @@ -143,8 +143,8 @@ export const LimitOrderTrancheKey = { toAmino(message: LimitOrderTrancheKey, useInterfaces: boolean = false): LimitOrderTrancheKeyAmino { const obj: any = {}; obj.trade_pair_id = message.tradePairId ? TradePairID.toAmino(message.tradePairId, useInterfaces) : undefined; - obj.tick_index_taker_to_maker = message.tickIndexTakerToMaker ? message.tickIndexTakerToMaker.toString() : undefined; - obj.tranche_key = message.trancheKey; + obj.tick_index_taker_to_maker = message.tickIndexTakerToMaker !== BigInt(0) ? message.tickIndexTakerToMaker.toString() : undefined; + obj.tranche_key = message.trancheKey === "" ? undefined : message.trancheKey; return obj; }, fromAminoMsg(object: LimitOrderTrancheKeyAminoMsg): LimitOrderTrancheKey { @@ -274,12 +274,12 @@ export const LimitOrderTranche = { toAmino(message: LimitOrderTranche, useInterfaces: boolean = false): LimitOrderTrancheAmino { const obj: any = {}; obj.key = message.key ? LimitOrderTrancheKey.toAmino(message.key, useInterfaces) : undefined; - obj.reserves_maker_denom = message.reservesMakerDenom; - obj.reserves_taker_denom = message.reservesTakerDenom; - obj.total_maker_denom = message.totalMakerDenom; - obj.total_taker_denom = message.totalTakerDenom; + obj.reserves_maker_denom = message.reservesMakerDenom ?? ""; + obj.reserves_taker_denom = message.reservesTakerDenom ?? ""; + obj.total_maker_denom = message.totalMakerDenom ?? ""; + obj.total_taker_denom = message.totalTakerDenom ?? ""; obj.expiration_time = message.expirationTime ? Timestamp.toAmino(toTimestamp(message.expirationTime)) : undefined; - obj.price_taker_to_maker = message.priceTakerToMaker; + obj.price_taker_to_maker = message.priceTakerToMaker ?? ""; return obj; }, fromAminoMsg(object: LimitOrderTrancheAminoMsg): LimitOrderTranche { diff --git a/packages/types/protobuf/codegen/neutron/dex/limit_order_tranche_user.ts b/packages/types/protobuf/codegen/neutron/dex/limit_order_tranche_user.ts index 1096f9f524..9e1be2c52f 100644 --- a/packages/types/protobuf/codegen/neutron/dex/limit_order_tranche_user.ts +++ b/packages/types/protobuf/codegen/neutron/dex/limit_order_tranche_user.ts @@ -1,5 +1,5 @@ import { TradePairID, TradePairIDAmino, TradePairIDSDKType } from "./trade_pair_id"; -import { LimitOrderType, limitOrderTypeFromJSON } from "./tx"; +import { LimitOrderType } from "./tx"; import { BinaryReader, BinaryWriter } from "../../binary"; export interface LimitOrderTrancheUser { tradePairId?: TradePairID | undefined; @@ -20,9 +20,9 @@ export interface LimitOrderTrancheUserAmino { tick_index_taker_to_maker?: string; tranche_key?: string; address?: string; - shares_owned?: string; - shares_withdrawn?: string; - shares_cancelled?: string; + shares_owned: string; + shares_withdrawn: string; + shares_cancelled: string; order_type?: LimitOrderType; } export interface LimitOrderTrancheUserAminoMsg { @@ -154,20 +154,20 @@ export const LimitOrderTrancheUser = { message.sharesCancelled = object.shares_cancelled; } if (object.order_type !== undefined && object.order_type !== null) { - message.orderType = limitOrderTypeFromJSON(object.order_type); + message.orderType = object.order_type; } return message; }, toAmino(message: LimitOrderTrancheUser, useInterfaces: boolean = false): LimitOrderTrancheUserAmino { const obj: any = {}; obj.trade_pair_id = message.tradePairId ? TradePairID.toAmino(message.tradePairId, useInterfaces) : undefined; - obj.tick_index_taker_to_maker = message.tickIndexTakerToMaker ? message.tickIndexTakerToMaker.toString() : undefined; - obj.tranche_key = message.trancheKey; - obj.address = message.address; - obj.shares_owned = message.sharesOwned; - obj.shares_withdrawn = message.sharesWithdrawn; - obj.shares_cancelled = message.sharesCancelled; - obj.order_type = message.orderType; + obj.tick_index_taker_to_maker = message.tickIndexTakerToMaker !== BigInt(0) ? message.tickIndexTakerToMaker.toString() : undefined; + obj.tranche_key = message.trancheKey === "" ? undefined : message.trancheKey; + obj.address = message.address === "" ? undefined : message.address; + obj.shares_owned = message.sharesOwned ?? ""; + obj.shares_withdrawn = message.sharesWithdrawn ?? ""; + obj.shares_cancelled = message.sharesCancelled ?? ""; + obj.order_type = message.orderType === 0 ? undefined : message.orderType; return obj; }, fromAminoMsg(object: LimitOrderTrancheUserAminoMsg): LimitOrderTrancheUser { diff --git a/packages/types/protobuf/codegen/neutron/dex/pair_id.ts b/packages/types/protobuf/codegen/neutron/dex/pair_id.ts index ec2e8dd269..7d2391f0fd 100644 --- a/packages/types/protobuf/codegen/neutron/dex/pair_id.ts +++ b/packages/types/protobuf/codegen/neutron/dex/pair_id.ts @@ -74,8 +74,8 @@ export const PairID = { }, toAmino(message: PairID, useInterfaces: boolean = false): PairIDAmino { const obj: any = {}; - obj.token0 = message.token0; - obj.token1 = message.token1; + obj.token0 = message.token0 === "" ? undefined : message.token0; + obj.token1 = message.token1 === "" ? undefined : message.token1; return obj; }, fromAminoMsg(object: PairIDAminoMsg): PairID { diff --git a/packages/types/protobuf/codegen/neutron/dex/params.ts b/packages/types/protobuf/codegen/neutron/dex/params.ts index 6caf9accd3..01542b2bbf 100644 --- a/packages/types/protobuf/codegen/neutron/dex/params.ts +++ b/packages/types/protobuf/codegen/neutron/dex/params.ts @@ -11,7 +11,7 @@ export interface ParamsProtoMsg { /** Params defines the parameters for the module. */ export interface ParamsAmino { fee_tiers?: string[]; - max_true_taker_spread?: string; + max_true_taker_spread: string; } export interface ParamsAminoMsg { type: "/neutron.dex.Params"; @@ -87,9 +87,9 @@ export const Params = { if (message.feeTiers) { obj.fee_tiers = message.feeTiers.map(e => e.toString()); } else { - obj.fee_tiers = []; + obj.fee_tiers = message.feeTiers; } - obj.max_true_taker_spread = message.maxTrueTakerSpread; + obj.max_true_taker_spread = message.maxTrueTakerSpread ?? ""; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/neutron/dex/pool.ts b/packages/types/protobuf/codegen/neutron/dex/pool.ts index 286ece411c..544c1452cf 100644 --- a/packages/types/protobuf/codegen/neutron/dex/pool.ts +++ b/packages/types/protobuf/codegen/neutron/dex/pool.ts @@ -89,7 +89,7 @@ export const Pool = { }, toAmino(message: Pool, useInterfaces: boolean = false): PoolAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; obj.lower_tick0 = message.lowerTick0 ? PoolReserves.toAmino(message.lowerTick0, useInterfaces) : undefined; obj.upper_tick1 = message.upperTick1 ? PoolReserves.toAmino(message.upperTick1, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/neutron/dex/pool_metadata.ts b/packages/types/protobuf/codegen/neutron/dex/pool_metadata.ts index 132ba5596f..a819540e73 100644 --- a/packages/types/protobuf/codegen/neutron/dex/pool_metadata.ts +++ b/packages/types/protobuf/codegen/neutron/dex/pool_metadata.ts @@ -103,9 +103,9 @@ export const PoolMetadata = { }, toAmino(message: PoolMetadata, useInterfaces: boolean = false): PoolMetadataAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.tick = message.tick ? message.tick.toString() : undefined; - obj.fee = message.fee ? message.fee.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.tick = message.tick !== BigInt(0) ? message.tick.toString() : undefined; + obj.fee = message.fee !== BigInt(0) ? message.fee.toString() : undefined; obj.pair_id = message.pairId ? PairID.toAmino(message.pairId, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/neutron/dex/pool_reserves.ts b/packages/types/protobuf/codegen/neutron/dex/pool_reserves.ts index f7aacb90b3..d16f066982 100644 --- a/packages/types/protobuf/codegen/neutron/dex/pool_reserves.ts +++ b/packages/types/protobuf/codegen/neutron/dex/pool_reserves.ts @@ -35,9 +35,9 @@ export interface PoolReservesProtoMsg { } export interface PoolReservesAmino { key?: PoolReservesKeyAmino | undefined; - reserves_maker_denom?: string; - price_taker_to_maker?: string; - price_opposite_taker_to_maker?: string; + reserves_maker_denom: string; + price_taker_to_maker: string; + price_opposite_taker_to_maker: string; } export interface PoolReservesAminoMsg { type: "/neutron.dex.PoolReserves"; @@ -116,8 +116,8 @@ export const PoolReservesKey = { toAmino(message: PoolReservesKey, useInterfaces: boolean = false): PoolReservesKeyAmino { const obj: any = {}; obj.trade_pair_id = message.tradePairId ? TradePairID.toAmino(message.tradePairId, useInterfaces) : undefined; - obj.tick_index_taker_to_maker = message.tickIndexTakerToMaker ? message.tickIndexTakerToMaker.toString() : undefined; - obj.fee = message.fee ? message.fee.toString() : undefined; + obj.tick_index_taker_to_maker = message.tickIndexTakerToMaker !== BigInt(0) ? message.tickIndexTakerToMaker.toString() : undefined; + obj.fee = message.fee !== BigInt(0) ? message.fee.toString() : undefined; return obj; }, fromAminoMsg(object: PoolReservesKeyAminoMsg): PoolReservesKey { @@ -214,9 +214,9 @@ export const PoolReserves = { toAmino(message: PoolReserves, useInterfaces: boolean = false): PoolReservesAmino { const obj: any = {}; obj.key = message.key ? PoolReservesKey.toAmino(message.key, useInterfaces) : undefined; - obj.reserves_maker_denom = message.reservesMakerDenom; - obj.price_taker_to_maker = message.priceTakerToMaker; - obj.price_opposite_taker_to_maker = message.priceOppositeTakerToMaker; + obj.reserves_maker_denom = message.reservesMakerDenom ?? ""; + obj.price_taker_to_maker = message.priceTakerToMaker ?? ""; + obj.price_opposite_taker_to_maker = message.priceOppositeTakerToMaker ?? ""; return obj; }, fromAminoMsg(object: PoolReservesAminoMsg): PoolReserves { diff --git a/packages/types/protobuf/codegen/neutron/dex/query.ts b/packages/types/protobuf/codegen/neutron/dex/query.ts index 8e2d37dc6c..abcfa52c6e 100644 --- a/packages/types/protobuf/codegen/neutron/dex/query.ts +++ b/packages/types/protobuf/codegen/neutron/dex/query.ts @@ -1,6 +1,6 @@ //@ts-nocheck import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../cosmos/base/query/v1beta1/pagination"; -import { MultiHopRoute, MultiHopRouteAmino, MultiHopRouteSDKType, LimitOrderType, limitOrderTypeFromJSON } from "./tx"; +import { MultiHopRoute, MultiHopRouteAmino, MultiHopRouteSDKType, LimitOrderType } from "./tx"; import { Timestamp } from "../../google/protobuf/timestamp"; import { Params, ParamsAmino, ParamsSDKType } from "./params"; import { LimitOrderTrancheUser, LimitOrderTrancheUserAmino, LimitOrderTrancheUserSDKType } from "./limit_order_tranche_user"; @@ -518,8 +518,8 @@ export interface QueryEstimateMultiHopSwapRequestAmino { creator?: string; receiver?: string; routes?: MultiHopRouteAmino[]; - amount_in?: string; - exit_limit_price?: string; + amount_in: string; + exit_limit_price: string; /** * If pickBestRoute == true then all routes are run and the route with the * best price is chosen otherwise, the first succesful route is used. @@ -546,7 +546,7 @@ export interface QueryEstimateMultiHopSwapResponseProtoMsg { value: Uint8Array; } export interface QueryEstimateMultiHopSwapResponseAmino { - coin_out?: CoinAmino | undefined; + coin_out: CoinAmino | undefined; } export interface QueryEstimateMultiHopSwapResponseAminoMsg { type: "/neutron.dex.QueryEstimateMultiHopSwapResponse"; @@ -577,11 +577,11 @@ export interface QueryEstimatePlaceLimitOrderRequestAmino { token_in?: string; token_out?: string; tick_index_in_to_out?: string; - amount_in?: string; + amount_in: string; order_type?: LimitOrderType; /** expirationTime is only valid iff orderType == GOOD_TIL_TIME. */ expiration_time?: string | undefined; - maxAmount_out?: string; + maxAmount_out: string; } export interface QueryEstimatePlaceLimitOrderRequestAminoMsg { type: "/neutron.dex.QueryEstimatePlaceLimitOrderRequest"; @@ -625,16 +625,16 @@ export interface QueryEstimatePlaceLimitOrderResponseAmino { * You can derive makerLimitInCoin using the equation: totalInCoin = * swapInCoin + makerLimitInCoin */ - total_in_coin?: CoinAmino | undefined; + total_in_coin: CoinAmino | undefined; /** Total amount of the token in that was immediately swapped for swapOutCoin */ - swap_in_coin?: CoinAmino | undefined; + swap_in_coin: CoinAmino | undefined; /** * Total amount of coin received from the taker portion of the limit order * This is the amount of coin immediately available in the users account after * executing the limit order. It does not include any future proceeds from the * maker portion which will have withdrawn in the future */ - swap_out_coin?: CoinAmino | undefined; + swap_out_coin: CoinAmino | undefined; } export interface QueryEstimatePlaceLimitOrderResponseAminoMsg { type: "/neutron.dex.QueryEstimatePlaceLimitOrderResponse"; @@ -720,7 +720,7 @@ export interface QueryGetPoolMetadataRequestSDKType { id: bigint; } export interface QueryGetPoolMetadataResponse { - PoolMetadata: PoolMetadata | undefined; + poolMetadata: PoolMetadata | undefined; } export interface QueryGetPoolMetadataResponseProtoMsg { typeUrl: "/neutron.dex.QueryGetPoolMetadataResponse"; @@ -941,8 +941,8 @@ export const QueryGetLimitOrderTrancheUserRequest = { }, toAmino(message: QueryGetLimitOrderTrancheUserRequest, useInterfaces: boolean = false): QueryGetLimitOrderTrancheUserRequestAmino { const obj: any = {}; - obj.address = message.address; - obj.tranche_key = message.trancheKey; + obj.address = message.address === "" ? undefined : message.address; + obj.tranche_key = message.trancheKey === "" ? undefined : message.trancheKey; return obj; }, fromAminoMsg(object: QueryGetLimitOrderTrancheUserRequestAminoMsg): QueryGetLimitOrderTrancheUserRequest { @@ -1143,7 +1143,7 @@ export const QueryAllLimitOrderTrancheUserResponse = { if (message.limitOrderTrancheUser) { obj.limit_order_tranche_user = message.limitOrderTrancheUser.map(e => e ? LimitOrderTrancheUser.toAmino(e, useInterfaces) : undefined); } else { - obj.limit_order_tranche_user = []; + obj.limit_order_tranche_user = message.limitOrderTrancheUser; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1241,10 +1241,10 @@ export const QueryGetLimitOrderTrancheRequest = { }, toAmino(message: QueryGetLimitOrderTrancheRequest, useInterfaces: boolean = false): QueryGetLimitOrderTrancheRequestAmino { const obj: any = {}; - obj.pair_id = message.pairId; - obj.tick_index = message.tickIndex ? message.tickIndex.toString() : undefined; - obj.token_in = message.tokenIn; - obj.tranche_key = message.trancheKey; + obj.pair_id = message.pairId === "" ? undefined : message.pairId; + obj.tick_index = message.tickIndex !== BigInt(0) ? message.tickIndex.toString() : undefined; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; + obj.tranche_key = message.trancheKey === "" ? undefined : message.trancheKey; return obj; }, fromAminoMsg(object: QueryGetLimitOrderTrancheRequestAminoMsg): QueryGetLimitOrderTrancheRequest { @@ -1392,8 +1392,8 @@ export const QueryAllLimitOrderTrancheRequest = { }, toAmino(message: QueryAllLimitOrderTrancheRequest, useInterfaces: boolean = false): QueryAllLimitOrderTrancheRequestAmino { const obj: any = {}; - obj.pair_id = message.pairId; - obj.token_in = message.tokenIn; + obj.pair_id = message.pairId === "" ? undefined : message.pairId; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1469,7 +1469,7 @@ export const QueryAllLimitOrderTrancheResponse = { if (message.limitOrderTranche) { obj.limit_order_tranche = message.limitOrderTranche.map(e => e ? LimitOrderTranche.toAmino(e, useInterfaces) : undefined); } else { - obj.limit_order_tranche = []; + obj.limit_order_tranche = message.limitOrderTranche; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1545,7 +1545,7 @@ export const QueryAllUserDepositsRequest = { }, toAmino(message: QueryAllUserDepositsRequest, useInterfaces: boolean = false): QueryAllUserDepositsRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1621,7 +1621,7 @@ export const QueryAllUserDepositsResponse = { if (message.deposits) { obj.deposits = message.deposits.map(e => e ? DepositRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.deposits = []; + obj.deposits = message.deposits; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1697,7 +1697,7 @@ export const QueryAllUserLimitOrdersRequest = { }, toAmino(message: QueryAllUserLimitOrdersRequest, useInterfaces: boolean = false): QueryAllUserLimitOrdersRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1773,7 +1773,7 @@ export const QueryAllUserLimitOrdersResponse = { if (message.limitOrders) { obj.limit_orders = message.limitOrders.map(e => e ? LimitOrderTrancheUser.toAmino(e, useInterfaces) : undefined); } else { - obj.limit_orders = []; + obj.limit_orders = message.limitOrders; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1860,8 +1860,8 @@ export const QueryAllTickLiquidityRequest = { }, toAmino(message: QueryAllTickLiquidityRequest, useInterfaces: boolean = false): QueryAllTickLiquidityRequestAmino { const obj: any = {}; - obj.pair_id = message.pairId; - obj.token_in = message.tokenIn; + obj.pair_id = message.pairId === "" ? undefined : message.pairId; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1937,7 +1937,7 @@ export const QueryAllTickLiquidityResponse = { if (message.tickLiquidity) { obj.tick_liquidity = message.tickLiquidity.map(e => e ? TickLiquidity.toAmino(e, useInterfaces) : undefined); } else { - obj.tick_liquidity = []; + obj.tick_liquidity = message.tickLiquidity; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2035,10 +2035,10 @@ export const QueryGetInactiveLimitOrderTrancheRequest = { }, toAmino(message: QueryGetInactiveLimitOrderTrancheRequest, useInterfaces: boolean = false): QueryGetInactiveLimitOrderTrancheRequestAmino { const obj: any = {}; - obj.pair_id = message.pairId; - obj.token_in = message.tokenIn; - obj.tick_index = message.tickIndex ? message.tickIndex.toString() : undefined; - obj.tranche_key = message.trancheKey; + obj.pair_id = message.pairId === "" ? undefined : message.pairId; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; + obj.tick_index = message.tickIndex !== BigInt(0) ? message.tickIndex.toString() : undefined; + obj.tranche_key = message.trancheKey === "" ? undefined : message.trancheKey; return obj; }, fromAminoMsg(object: QueryGetInactiveLimitOrderTrancheRequestAminoMsg): QueryGetInactiveLimitOrderTrancheRequest { @@ -2239,7 +2239,7 @@ export const QueryAllInactiveLimitOrderTrancheResponse = { if (message.inactiveLimitOrderTranche) { obj.inactive_limit_order_tranche = message.inactiveLimitOrderTranche.map(e => e ? LimitOrderTranche.toAmino(e, useInterfaces) : undefined); } else { - obj.inactive_limit_order_tranche = []; + obj.inactive_limit_order_tranche = message.inactiveLimitOrderTranche; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2326,8 +2326,8 @@ export const QueryAllPoolReservesRequest = { }, toAmino(message: QueryAllPoolReservesRequest, useInterfaces: boolean = false): QueryAllPoolReservesRequestAmino { const obj: any = {}; - obj.pair_id = message.pairId; - obj.token_in = message.tokenIn; + obj.pair_id = message.pairId === "" ? undefined : message.pairId; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2403,7 +2403,7 @@ export const QueryAllPoolReservesResponse = { if (message.poolReserves) { obj.pool_reserves = message.poolReserves.map(e => e ? PoolReserves.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_reserves = []; + obj.pool_reserves = message.poolReserves; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2501,10 +2501,10 @@ export const QueryGetPoolReservesRequest = { }, toAmino(message: QueryGetPoolReservesRequest, useInterfaces: boolean = false): QueryGetPoolReservesRequestAmino { const obj: any = {}; - obj.pair_id = message.pairId; - obj.token_in = message.tokenIn; - obj.tick_index = message.tickIndex ? message.tickIndex.toString() : undefined; - obj.fee = message.fee ? message.fee.toString() : undefined; + obj.pair_id = message.pairId === "" ? undefined : message.pairId; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; + obj.tick_index = message.tickIndex !== BigInt(0) ? message.tickIndex.toString() : undefined; + obj.fee = message.fee !== BigInt(0) ? message.fee.toString() : undefined; return obj; }, fromAminoMsg(object: QueryGetPoolReservesRequestAminoMsg): QueryGetPoolReservesRequest { @@ -2683,16 +2683,16 @@ export const QueryEstimateMultiHopSwapRequest = { }, toAmino(message: QueryEstimateMultiHopSwapRequest, useInterfaces: boolean = false): QueryEstimateMultiHopSwapRequestAmino { const obj: any = {}; - obj.creator = message.creator; - obj.receiver = message.receiver; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.receiver = message.receiver === "" ? undefined : message.receiver; if (message.routes) { obj.routes = message.routes.map(e => e ? MultiHopRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } - obj.amount_in = message.amountIn; - obj.exit_limit_price = message.exitLimitPrice; - obj.pick_best_route = message.pickBestRoute; + obj.amount_in = message.amountIn ?? ""; + obj.exit_limit_price = message.exitLimitPrice ?? ""; + obj.pick_best_route = message.pickBestRoute === false ? undefined : message.pickBestRoute; return obj; }, fromAminoMsg(object: QueryEstimateMultiHopSwapRequestAminoMsg): QueryEstimateMultiHopSwapRequest { @@ -2755,7 +2755,7 @@ export const QueryEstimateMultiHopSwapResponse = { }, toAmino(message: QueryEstimateMultiHopSwapResponse, useInterfaces: boolean = false): QueryEstimateMultiHopSwapResponseAmino { const obj: any = {}; - obj.coin_out = message.coinOut ? Coin.toAmino(message.coinOut, useInterfaces) : undefined; + obj.coin_out = message.coinOut ? Coin.toAmino(message.coinOut, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: QueryEstimateMultiHopSwapResponseAminoMsg): QueryEstimateMultiHopSwapResponse { @@ -2894,7 +2894,7 @@ export const QueryEstimatePlaceLimitOrderRequest = { message.amountIn = object.amount_in; } if (object.order_type !== undefined && object.order_type !== null) { - message.orderType = limitOrderTypeFromJSON(object.order_type); + message.orderType = object.order_type; } if (object.expiration_time !== undefined && object.expiration_time !== null) { message.expirationTime = fromTimestamp(Timestamp.fromAmino(object.expiration_time)); @@ -2906,15 +2906,15 @@ export const QueryEstimatePlaceLimitOrderRequest = { }, toAmino(message: QueryEstimatePlaceLimitOrderRequest, useInterfaces: boolean = false): QueryEstimatePlaceLimitOrderRequestAmino { const obj: any = {}; - obj.creator = message.creator; - obj.receiver = message.receiver; - obj.token_in = message.tokenIn; - obj.token_out = message.tokenOut; - obj.tick_index_in_to_out = message.tickIndexInToOut ? message.tickIndexInToOut.toString() : undefined; - obj.amount_in = message.amountIn; - obj.order_type = message.orderType; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.receiver = message.receiver === "" ? undefined : message.receiver; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; + obj.token_out = message.tokenOut === "" ? undefined : message.tokenOut; + obj.tick_index_in_to_out = message.tickIndexInToOut !== BigInt(0) ? message.tickIndexInToOut.toString() : undefined; + obj.amount_in = message.amountIn ?? ""; + obj.order_type = message.orderType === 0 ? undefined : message.orderType; obj.expiration_time = message.expirationTime ? Timestamp.toAmino(toTimestamp(message.expirationTime)) : undefined; - obj.maxAmount_out = message.maxAmountOut; + obj.maxAmount_out = message.maxAmountOut ?? null; return obj; }, fromAminoMsg(object: QueryEstimatePlaceLimitOrderRequestAminoMsg): QueryEstimatePlaceLimitOrderRequest { @@ -2999,9 +2999,9 @@ export const QueryEstimatePlaceLimitOrderResponse = { }, toAmino(message: QueryEstimatePlaceLimitOrderResponse, useInterfaces: boolean = false): QueryEstimatePlaceLimitOrderResponseAmino { const obj: any = {}; - obj.total_in_coin = message.totalInCoin ? Coin.toAmino(message.totalInCoin, useInterfaces) : undefined; - obj.swap_in_coin = message.swapInCoin ? Coin.toAmino(message.swapInCoin, useInterfaces) : undefined; - obj.swap_out_coin = message.swapOutCoin ? Coin.toAmino(message.swapOutCoin, useInterfaces) : undefined; + obj.total_in_coin = message.totalInCoin ? Coin.toAmino(message.totalInCoin, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); + obj.swap_in_coin = message.swapInCoin ? Coin.toAmino(message.swapInCoin, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); + obj.swap_out_coin = message.swapOutCoin ? Coin.toAmino(message.swapOutCoin, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: QueryEstimatePlaceLimitOrderResponseAminoMsg): QueryEstimatePlaceLimitOrderResponse { @@ -3086,9 +3086,9 @@ export const QueryPoolRequest = { }, toAmino(message: QueryPoolRequest, useInterfaces: boolean = false): QueryPoolRequestAmino { const obj: any = {}; - obj.pair_id = message.pairId; - obj.tick_index = message.tickIndex ? message.tickIndex.toString() : undefined; - obj.fee = message.fee ? message.fee.toString() : undefined; + obj.pair_id = message.pairId === "" ? undefined : message.pairId; + obj.tick_index = message.tickIndex !== BigInt(0) ? message.tickIndex.toString() : undefined; + obj.fee = message.fee !== BigInt(0) ? message.fee.toString() : undefined; return obj; }, fromAminoMsg(object: QueryPoolRequestAminoMsg): QueryPoolRequest { @@ -3151,7 +3151,7 @@ export const QueryPoolByIDRequest = { }, toAmino(message: QueryPoolByIDRequest, useInterfaces: boolean = false): QueryPoolByIDRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryPoolByIDRequestAminoMsg): QueryPoolByIDRequest { @@ -3277,7 +3277,7 @@ export const QueryGetPoolMetadataRequest = { }, toAmino(message: QueryGetPoolMetadataRequest, useInterfaces: boolean = false): QueryGetPoolMetadataRequestAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; return obj; }, fromAminoMsg(object: QueryGetPoolMetadataRequestAminoMsg): QueryGetPoolMetadataRequest { @@ -3298,14 +3298,14 @@ export const QueryGetPoolMetadataRequest = { }; function createBaseQueryGetPoolMetadataResponse(): QueryGetPoolMetadataResponse { return { - PoolMetadata: PoolMetadata.fromPartial({}) + poolMetadata: PoolMetadata.fromPartial({}) }; } export const QueryGetPoolMetadataResponse = { typeUrl: "/neutron.dex.QueryGetPoolMetadataResponse", encode(message: QueryGetPoolMetadataResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.PoolMetadata !== undefined) { - PoolMetadata.encode(message.PoolMetadata, writer.uint32(10).fork()).ldelim(); + if (message.poolMetadata !== undefined) { + PoolMetadata.encode(message.poolMetadata, writer.uint32(10).fork()).ldelim(); } return writer; }, @@ -3317,7 +3317,7 @@ export const QueryGetPoolMetadataResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.PoolMetadata = PoolMetadata.decode(reader, reader.uint32(), useInterfaces); + message.poolMetadata = PoolMetadata.decode(reader, reader.uint32(), useInterfaces); break; default: reader.skipType(tag & 7); @@ -3328,19 +3328,19 @@ export const QueryGetPoolMetadataResponse = { }, fromPartial(object: Partial): QueryGetPoolMetadataResponse { const message = createBaseQueryGetPoolMetadataResponse(); - message.PoolMetadata = object.PoolMetadata !== undefined && object.PoolMetadata !== null ? PoolMetadata.fromPartial(object.PoolMetadata) : undefined; + message.poolMetadata = object.poolMetadata !== undefined && object.poolMetadata !== null ? PoolMetadata.fromPartial(object.poolMetadata) : undefined; return message; }, fromAmino(object: QueryGetPoolMetadataResponseAmino): QueryGetPoolMetadataResponse { const message = createBaseQueryGetPoolMetadataResponse(); if (object.Pool_metadata !== undefined && object.Pool_metadata !== null) { - message.PoolMetadata = PoolMetadata.fromAmino(object.Pool_metadata); + message.poolMetadata = PoolMetadata.fromAmino(object.Pool_metadata); } return message; }, toAmino(message: QueryGetPoolMetadataResponse, useInterfaces: boolean = false): QueryGetPoolMetadataResponseAmino { const obj: any = {}; - obj.Pool_metadata = message.PoolMetadata ? PoolMetadata.toAmino(message.PoolMetadata, useInterfaces) : undefined; + obj.Pool_metadata = message.poolMetadata ? PoolMetadata.toAmino(message.poolMetadata, useInterfaces) : undefined; return obj; }, fromAminoMsg(object: QueryGetPoolMetadataResponseAminoMsg): QueryGetPoolMetadataResponse { @@ -3478,7 +3478,7 @@ export const QueryAllPoolMetadataResponse = { if (message.poolMetadata) { obj.pool_metadata = message.poolMetadata.map(e => e ? PoolMetadata.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_metadata = []; + obj.pool_metadata = message.poolMetadata; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/neutron/dex/trade_pair_id.ts b/packages/types/protobuf/codegen/neutron/dex/trade_pair_id.ts index b24ba6f25e..f76cda538f 100644 --- a/packages/types/protobuf/codegen/neutron/dex/trade_pair_id.ts +++ b/packages/types/protobuf/codegen/neutron/dex/trade_pair_id.ts @@ -74,8 +74,8 @@ export const TradePairID = { }, toAmino(message: TradePairID, useInterfaces: boolean = false): TradePairIDAmino { const obj: any = {}; - obj.maker_denom = message.makerDenom; - obj.taker_denom = message.takerDenom; + obj.maker_denom = message.makerDenom === "" ? undefined : message.makerDenom; + obj.taker_denom = message.takerDenom === "" ? undefined : message.takerDenom; return obj; }, fromAminoMsg(object: TradePairIDAminoMsg): TradePairID { diff --git a/packages/types/protobuf/codegen/neutron/dex/tx.ts b/packages/types/protobuf/codegen/neutron/dex/tx.ts index dd881e381d..4105ec7a43 100644 --- a/packages/types/protobuf/codegen/neutron/dex/tx.ts +++ b/packages/types/protobuf/codegen/neutron/dex/tx.ts @@ -91,8 +91,8 @@ export interface MsgDepositAmino { receiver?: string; token_a?: string; token_b?: string; - amounts_a?: string[]; - amounts_b?: string[]; + amounts_a: string[]; + amounts_b: string[]; tick_indexes_a_to_b?: string[]; fees?: string[]; options?: DepositOptionsAmino[]; @@ -121,8 +121,8 @@ export interface MsgDepositResponseProtoMsg { value: Uint8Array; } export interface MsgDepositResponseAmino { - reserve0_deposited?: string[]; - reserve1_deposited?: string[]; + reserve0_deposited: string[]; + reserve1_deposited: string[]; } export interface MsgDepositResponseAminoMsg { type: "/neutron.dex.MsgDepositResponse"; @@ -150,7 +150,7 @@ export interface MsgWithdrawalAmino { receiver?: string; token_a?: string; token_b?: string; - shares_to_remove?: string[]; + shares_to_remove: string[]; tick_indexes_a_to_b?: string[]; fees?: string[]; } @@ -200,11 +200,11 @@ export interface MsgPlaceLimitOrderAmino { token_in?: string; token_out?: string; tick_index_in_to_out?: string; - amount_in?: string; + amount_in: string; order_type?: LimitOrderType; /** expirationTime is only valid iff orderType == GOOD_TIL_TIME. */ expiration_time?: string | undefined; - max_amount_out?: string; + max_amount_out: string; } export interface MsgPlaceLimitOrderAminoMsg { type: "/neutron.dex.MsgPlaceLimitOrder"; @@ -240,14 +240,14 @@ export interface MsgPlaceLimitOrderResponseProtoMsg { export interface MsgPlaceLimitOrderResponseAmino { trancheKey?: string; /** Total amount of coin used for the limit order */ - coin_in?: CoinAmino | undefined; + coin_in: CoinAmino | undefined; /** * Total amount of coin received from the taker portion of the limit order * This is the amount of coin immediately available in the users account after * executing the limit order. It does not include any future proceeds from the * maker portion which will have withdrawn in the future */ - taker_coin_out?: CoinAmino | undefined; + taker_coin_out: CoinAmino | undefined; } export interface MsgPlaceLimitOrderResponseAminoMsg { type: "/neutron.dex.MsgPlaceLimitOrderResponse"; @@ -357,8 +357,8 @@ export interface MsgMultiHopSwapAmino { creator?: string; receiver?: string; routes?: MultiHopRouteAmino[]; - amount_in?: string; - exit_limit_price?: string; + amount_in: string; + exit_limit_price: string; /** * If pickBestRoute == true then all routes are run and the route with the * best price is chosen otherwise, the first succesful route is used. @@ -385,7 +385,7 @@ export interface MsgMultiHopSwapResponseProtoMsg { value: Uint8Array; } export interface MsgMultiHopSwapResponseAmino { - coin_out?: CoinAmino | undefined; + coin_out: CoinAmino | undefined; } export interface MsgMultiHopSwapResponseAminoMsg { type: "/neutron.dex.MsgMultiHopSwapResponse"; @@ -491,7 +491,7 @@ export const DepositOptions = { }, toAmino(message: DepositOptions, useInterfaces: boolean = false): DepositOptionsAmino { const obj: any = {}; - obj.disable_autoswap = message.disableAutoswap; + obj.disable_autoswap = message.disableAutoswap === false ? undefined : message.disableAutoswap; return obj; }, fromAminoMsg(object: DepositOptionsAminoMsg): DepositOptions { @@ -650,34 +650,34 @@ export const MsgDeposit = { }, toAmino(message: MsgDeposit, useInterfaces: boolean = false): MsgDepositAmino { const obj: any = {}; - obj.creator = message.creator; - obj.receiver = message.receiver; - obj.token_a = message.tokenA; - obj.token_b = message.tokenB; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.receiver = message.receiver === "" ? undefined : message.receiver; + obj.token_a = message.tokenA === "" ? undefined : message.tokenA; + obj.token_b = message.tokenB === "" ? undefined : message.tokenB; if (message.amountsA) { obj.amounts_a = message.amountsA.map(e => e); } else { - obj.amounts_a = []; + obj.amounts_a = message.amountsA; } if (message.amountsB) { obj.amounts_b = message.amountsB.map(e => e); } else { - obj.amounts_b = []; + obj.amounts_b = message.amountsB; } if (message.tickIndexesAToB) { obj.tick_indexes_a_to_b = message.tickIndexesAToB.map(e => e.toString()); } else { - obj.tick_indexes_a_to_b = []; + obj.tick_indexes_a_to_b = message.tickIndexesAToB; } if (message.fees) { obj.fees = message.fees.map(e => e.toString()); } else { - obj.fees = []; + obj.fees = message.fees; } if (message.options) { obj.options = message.options.map(e => e ? DepositOptions.toAmino(e, useInterfaces) : undefined); } else { - obj.options = []; + obj.options = message.options; } return obj; }, @@ -751,12 +751,12 @@ export const MsgDepositResponse = { if (message.reserve0Deposited) { obj.reserve0_deposited = message.reserve0Deposited.map(e => e); } else { - obj.reserve0_deposited = []; + obj.reserve0_deposited = message.reserve0Deposited; } if (message.reserve1Deposited) { obj.reserve1_deposited = message.reserve1Deposited.map(e => e); } else { - obj.reserve1_deposited = []; + obj.reserve1_deposited = message.reserve1Deposited; } return obj; }, @@ -898,24 +898,24 @@ export const MsgWithdrawal = { }, toAmino(message: MsgWithdrawal, useInterfaces: boolean = false): MsgWithdrawalAmino { const obj: any = {}; - obj.creator = message.creator; - obj.receiver = message.receiver; - obj.token_a = message.tokenA; - obj.token_b = message.tokenB; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.receiver = message.receiver === "" ? undefined : message.receiver; + obj.token_a = message.tokenA === "" ? undefined : message.tokenA; + obj.token_b = message.tokenB === "" ? undefined : message.tokenB; if (message.sharesToRemove) { obj.shares_to_remove = message.sharesToRemove.map(e => e); } else { - obj.shares_to_remove = []; + obj.shares_to_remove = message.sharesToRemove; } if (message.tickIndexesAToB) { obj.tick_indexes_a_to_b = message.tickIndexesAToB.map(e => e.toString()); } else { - obj.tick_indexes_a_to_b = []; + obj.tick_indexes_a_to_b = message.tickIndexesAToB; } if (message.fees) { obj.fees = message.fees.map(e => e.toString()); } else { - obj.fees = []; + obj.fees = message.fees; } return obj; }, @@ -1105,7 +1105,7 @@ export const MsgPlaceLimitOrder = { message.amountIn = object.amount_in; } if (object.order_type !== undefined && object.order_type !== null) { - message.orderType = limitOrderTypeFromJSON(object.order_type); + message.orderType = object.order_type; } if (object.expiration_time !== undefined && object.expiration_time !== null) { message.expirationTime = fromTimestamp(Timestamp.fromAmino(object.expiration_time)); @@ -1117,15 +1117,15 @@ export const MsgPlaceLimitOrder = { }, toAmino(message: MsgPlaceLimitOrder, useInterfaces: boolean = false): MsgPlaceLimitOrderAmino { const obj: any = {}; - obj.creator = message.creator; - obj.receiver = message.receiver; - obj.token_in = message.tokenIn; - obj.token_out = message.tokenOut; - obj.tick_index_in_to_out = message.tickIndexInToOut ? message.tickIndexInToOut.toString() : undefined; - obj.amount_in = message.amountIn; - obj.order_type = message.orderType; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.receiver = message.receiver === "" ? undefined : message.receiver; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; + obj.token_out = message.tokenOut === "" ? undefined : message.tokenOut; + obj.tick_index_in_to_out = message.tickIndexInToOut !== BigInt(0) ? message.tickIndexInToOut.toString() : undefined; + obj.amount_in = message.amountIn ?? ""; + obj.order_type = message.orderType === 0 ? undefined : message.orderType; obj.expiration_time = message.expirationTime ? Timestamp.toAmino(toTimestamp(message.expirationTime)) : undefined; - obj.max_amount_out = message.maxAmountOut; + obj.max_amount_out = message.maxAmountOut ?? null; return obj; }, fromAminoMsg(object: MsgPlaceLimitOrderAminoMsg): MsgPlaceLimitOrder { @@ -1210,9 +1210,9 @@ export const MsgPlaceLimitOrderResponse = { }, toAmino(message: MsgPlaceLimitOrderResponse, useInterfaces: boolean = false): MsgPlaceLimitOrderResponseAmino { const obj: any = {}; - obj.trancheKey = message.trancheKey; - obj.coin_in = message.coinIn ? Coin.toAmino(message.coinIn, useInterfaces) : undefined; - obj.taker_coin_out = message.takerCoinOut ? Coin.toAmino(message.takerCoinOut, useInterfaces) : undefined; + obj.trancheKey = message.trancheKey === "" ? undefined : message.trancheKey; + obj.coin_in = message.coinIn ? Coin.toAmino(message.coinIn, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); + obj.taker_coin_out = message.takerCoinOut ? Coin.toAmino(message.takerCoinOut, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: MsgPlaceLimitOrderResponseAminoMsg): MsgPlaceLimitOrderResponse { @@ -1286,8 +1286,8 @@ export const MsgWithdrawFilledLimitOrder = { }, toAmino(message: MsgWithdrawFilledLimitOrder, useInterfaces: boolean = false): MsgWithdrawFilledLimitOrderAmino { const obj: any = {}; - obj.creator = message.creator; - obj.tranche_key = message.trancheKey; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.tranche_key = message.trancheKey === "" ? undefined : message.trancheKey; return obj; }, fromAminoMsg(object: MsgWithdrawFilledLimitOrderAminoMsg): MsgWithdrawFilledLimitOrder { @@ -1411,8 +1411,8 @@ export const MsgCancelLimitOrder = { }, toAmino(message: MsgCancelLimitOrder, useInterfaces: boolean = false): MsgCancelLimitOrderAmino { const obj: any = {}; - obj.creator = message.creator; - obj.tranche_key = message.trancheKey; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.tranche_key = message.trancheKey === "" ? undefined : message.trancheKey; return obj; }, fromAminoMsg(object: MsgCancelLimitOrderAminoMsg): MsgCancelLimitOrder { @@ -1526,7 +1526,7 @@ export const MultiHopRoute = { if (message.hops) { obj.hops = message.hops.map(e => e); } else { - obj.hops = []; + obj.hops = message.hops; } return obj; }, @@ -1643,16 +1643,16 @@ export const MsgMultiHopSwap = { }, toAmino(message: MsgMultiHopSwap, useInterfaces: boolean = false): MsgMultiHopSwapAmino { const obj: any = {}; - obj.creator = message.creator; - obj.receiver = message.receiver; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.receiver = message.receiver === "" ? undefined : message.receiver; if (message.routes) { obj.routes = message.routes.map(e => e ? MultiHopRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } - obj.amount_in = message.amountIn; - obj.exit_limit_price = message.exitLimitPrice; - obj.pick_best_route = message.pickBestRoute; + obj.amount_in = message.amountIn ?? ""; + obj.exit_limit_price = message.exitLimitPrice ?? ""; + obj.pick_best_route = message.pickBestRoute === false ? undefined : message.pickBestRoute; return obj; }, fromAminoMsg(object: MsgMultiHopSwapAminoMsg): MsgMultiHopSwap { @@ -1715,7 +1715,7 @@ export const MsgMultiHopSwapResponse = { }, toAmino(message: MsgMultiHopSwapResponse, useInterfaces: boolean = false): MsgMultiHopSwapResponseAmino { const obj: any = {}; - obj.coin_out = message.coinOut ? Coin.toAmino(message.coinOut, useInterfaces) : undefined; + obj.coin_out = message.coinOut ? Coin.toAmino(message.coinOut, useInterfaces) : Coin.toAmino(Coin.fromPartial({})); return obj; }, fromAminoMsg(object: MsgMultiHopSwapResponseAminoMsg): MsgMultiHopSwapResponse { @@ -1789,8 +1789,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/neutron/feeburner/params.ts b/packages/types/protobuf/codegen/neutron/feeburner/params.ts index 428ffe908d..be90f62294 100644 --- a/packages/types/protobuf/codegen/neutron/feeburner/params.ts +++ b/packages/types/protobuf/codegen/neutron/feeburner/params.ts @@ -103,9 +103,9 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.neutron_denom = message.neutronDenom; - obj.reserve_address = message.reserveAddress; - obj.treasury_address = message.treasuryAddress; + obj.neutron_denom = message.neutronDenom === "" ? undefined : message.neutronDenom; + obj.reserve_address = message.reserveAddress === "" ? undefined : message.reserveAddress; + obj.treasury_address = message.treasuryAddress === "" ? undefined : message.treasuryAddress; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/neutron/feeburner/tx.ts b/packages/types/protobuf/codegen/neutron/feeburner/tx.ts index 613fe2b2f8..9b29cbad95 100644 --- a/packages/types/protobuf/codegen/neutron/feeburner/tx.ts +++ b/packages/types/protobuf/codegen/neutron/feeburner/tx.ts @@ -132,8 +132,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/neutron/feerefunder/fee.ts b/packages/types/protobuf/codegen/neutron/feerefunder/fee.ts index de44e0ec22..fbab4d87b5 100644 --- a/packages/types/protobuf/codegen/neutron/feerefunder/fee.ts +++ b/packages/types/protobuf/codegen/neutron/feerefunder/fee.ts @@ -118,17 +118,17 @@ export const Fee = { if (message.recvFee) { obj.recv_fee = message.recvFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.recv_fee = []; + obj.recv_fee = message.recvFee; } if (message.ackFee) { obj.ack_fee = message.ackFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.ack_fee = []; + obj.ack_fee = message.ackFee; } if (message.timeoutFee) { obj.timeout_fee = message.timeoutFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.timeout_fee = []; + obj.timeout_fee = message.timeoutFee; } return obj; }, @@ -214,9 +214,9 @@ export const PacketID = { }, toAmino(message: PacketID, useInterfaces: boolean = false): PacketIDAmino { const obj: any = {}; - obj.channel_id = message.channelId; - obj.port_id = message.portId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: PacketIDAminoMsg): PacketID { diff --git a/packages/types/protobuf/codegen/neutron/feerefunder/genesis.ts b/packages/types/protobuf/codegen/neutron/feerefunder/genesis.ts index 2a6f22ece0..d6c25f4248 100644 --- a/packages/types/protobuf/codegen/neutron/feerefunder/genesis.ts +++ b/packages/types/protobuf/codegen/neutron/feerefunder/genesis.ts @@ -105,7 +105,7 @@ export const GenesisState = { if (message.feeInfos) { obj.fee_infos = message.feeInfos.map(e => e ? FeeInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.fee_infos = []; + obj.fee_infos = message.feeInfos; } return obj; }, @@ -191,7 +191,7 @@ export const FeeInfo = { }, toAmino(message: FeeInfo, useInterfaces: boolean = false): FeeInfoAmino { const obj: any = {}; - obj.payer = message.payer; + obj.payer = message.payer === "" ? undefined : message.payer; obj.packet_id = message.packetId ? PacketID.toAmino(message.packetId, useInterfaces) : undefined; obj.fee = message.fee ? Fee.toAmino(message.fee, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/neutron/feerefunder/query.ts b/packages/types/protobuf/codegen/neutron/feerefunder/query.ts index 73de74024f..94b5cf868a 100644 --- a/packages/types/protobuf/codegen/neutron/feerefunder/query.ts +++ b/packages/types/protobuf/codegen/neutron/feerefunder/query.ts @@ -257,9 +257,9 @@ export const FeeInfoRequest = { }, toAmino(message: FeeInfoRequest, useInterfaces: boolean = false): FeeInfoRequestAmino { const obj: any = {}; - obj.channel_id = message.channelId; - obj.port_id = message.portId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, fromAminoMsg(object: FeeInfoRequestAminoMsg): FeeInfoRequest { diff --git a/packages/types/protobuf/codegen/neutron/feerefunder/tx.ts b/packages/types/protobuf/codegen/neutron/feerefunder/tx.ts index cd5bf0a046..c2bb0f8f4c 100644 --- a/packages/types/protobuf/codegen/neutron/feerefunder/tx.ts +++ b/packages/types/protobuf/codegen/neutron/feerefunder/tx.ts @@ -132,8 +132,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/neutron/interchainqueries/genesis.ts b/packages/types/protobuf/codegen/neutron/interchainqueries/genesis.ts index ee55c8de5a..e75e533e67 100644 --- a/packages/types/protobuf/codegen/neutron/interchainqueries/genesis.ts +++ b/packages/types/protobuf/codegen/neutron/interchainqueries/genesis.ts @@ -291,26 +291,26 @@ export const RegisteredQuery = { }, toAmino(message: RegisteredQuery, useInterfaces: boolean = false): RegisteredQueryAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.owner = message.owner; - obj.query_type = message.queryType; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.query_type = message.queryType === "" ? undefined : message.queryType; if (message.keys) { obj.keys = message.keys.map(e => e ? KVKey.toAmino(e, useInterfaces) : undefined); } else { - obj.keys = []; + obj.keys = message.keys; } - obj.transactions_filter = message.transactionsFilter; - obj.connection_id = message.connectionId; - obj.update_period = message.updatePeriod ? message.updatePeriod.toString() : undefined; - obj.last_submitted_result_local_height = message.lastSubmittedResultLocalHeight ? message.lastSubmittedResultLocalHeight.toString() : undefined; + obj.transactions_filter = message.transactionsFilter === "" ? undefined : message.transactionsFilter; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.update_period = message.updatePeriod !== BigInt(0) ? message.updatePeriod.toString() : undefined; + obj.last_submitted_result_local_height = message.lastSubmittedResultLocalHeight !== BigInt(0) ? message.lastSubmittedResultLocalHeight.toString() : undefined; obj.last_submitted_result_remote_height = message.lastSubmittedResultRemoteHeight ? Height.toAmino(message.lastSubmittedResultRemoteHeight, useInterfaces) : {}; if (message.deposit) { obj.deposit = message.deposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.deposit = []; + obj.deposit = message.deposit; } - obj.submit_timeout = message.submitTimeout ? message.submitTimeout.toString() : undefined; - obj.registered_at_height = message.registeredAtHeight ? message.registeredAtHeight.toString() : undefined; + obj.submit_timeout = message.submitTimeout !== BigInt(0) ? message.submitTimeout.toString() : undefined; + obj.registered_at_height = message.registeredAtHeight !== BigInt(0) ? message.registeredAtHeight.toString() : undefined; return obj; }, fromAminoMsg(object: RegisteredQueryAminoMsg): RegisteredQuery { @@ -384,7 +384,7 @@ export const KVKey = { }, toAmino(message: KVKey, useInterfaces: boolean = false): KVKeyAmino { const obj: any = {}; - obj.path = message.path; + obj.path = message.path === "" ? undefined : message.path; obj.key = message.key ? base64FromBytes(message.key) : undefined; return obj; }, @@ -461,7 +461,7 @@ export const GenesisState = { if (message.registeredQueries) { obj.registered_queries = message.registeredQueries.map(e => e ? RegisteredQuery.toAmino(e, useInterfaces) : undefined); } else { - obj.registered_queries = []; + obj.registered_queries = message.registeredQueries; } return obj; }, diff --git a/packages/types/protobuf/codegen/neutron/interchainqueries/params.ts b/packages/types/protobuf/codegen/neutron/interchainqueries/params.ts index 7ca723c72f..688f2871bd 100644 --- a/packages/types/protobuf/codegen/neutron/interchainqueries/params.ts +++ b/packages/types/protobuf/codegen/neutron/interchainqueries/params.ts @@ -110,13 +110,13 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.query_submit_timeout = message.querySubmitTimeout ? message.querySubmitTimeout.toString() : undefined; + obj.query_submit_timeout = message.querySubmitTimeout !== BigInt(0) ? message.querySubmitTimeout.toString() : undefined; if (message.queryDeposit) { obj.query_deposit = message.queryDeposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.query_deposit = []; + obj.query_deposit = message.queryDeposit; } - obj.tx_query_removal_limit = message.txQueryRemovalLimit ? message.txQueryRemovalLimit.toString() : undefined; + obj.tx_query_removal_limit = message.txQueryRemovalLimit !== BigInt(0) ? message.txQueryRemovalLimit.toString() : undefined; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/neutron/interchainqueries/query.ts b/packages/types/protobuf/codegen/neutron/interchainqueries/query.ts index 4c1f0667a8..e44b78803b 100644 --- a/packages/types/protobuf/codegen/neutron/interchainqueries/query.ts +++ b/packages/types/protobuf/codegen/neutron/interchainqueries/query.ts @@ -391,9 +391,9 @@ export const QueryRegisteredQueriesRequest = { if (message.owners) { obj.owners = message.owners.map(e => e); } else { - obj.owners = []; + obj.owners = message.owners; } - obj.connection_id = message.connectionId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -469,7 +469,7 @@ export const QueryRegisteredQueriesResponse = { if (message.registeredQueries) { obj.registered_queries = message.registeredQueries.map(e => e ? RegisteredQuery.toAmino(e, useInterfaces) : undefined); } else { - obj.registered_queries = []; + obj.registered_queries = message.registeredQueries; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -534,7 +534,7 @@ export const QueryRegisteredQueryRequest = { }, toAmino(message: QueryRegisteredQueryRequest, useInterfaces: boolean = false): QueryRegisteredQueryRequestAmino { const obj: any = {}; - obj.query_id = message.queryId ? message.queryId.toString() : undefined; + obj.query_id = message.queryId !== BigInt(0) ? message.queryId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryRegisteredQueryRequestAminoMsg): QueryRegisteredQueryRequest { @@ -660,7 +660,7 @@ export const QueryRegisteredQueryResultRequest = { }, toAmino(message: QueryRegisteredQueryResultRequest, useInterfaces: boolean = false): QueryRegisteredQueryResultRequestAmino { const obj: any = {}; - obj.query_id = message.queryId ? message.queryId.toString() : undefined; + obj.query_id = message.queryId !== BigInt(0) ? message.queryId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryRegisteredQueryResultRequestAminoMsg): QueryRegisteredQueryResultRequest { @@ -808,8 +808,8 @@ export const Transaction = { }, toAmino(message: Transaction, useInterfaces: boolean = false): TransactionAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.height = message.height ? message.height.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -873,7 +873,7 @@ export const QueryLastRemoteHeight = { }, toAmino(message: QueryLastRemoteHeight, useInterfaces: boolean = false): QueryLastRemoteHeightAmino { const obj: any = {}; - obj.connection_id = message.connectionId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; return obj; }, fromAminoMsg(object: QueryLastRemoteHeightAminoMsg): QueryLastRemoteHeight { @@ -936,7 +936,7 @@ export const QueryLastRemoteHeightResponse = { }, toAmino(message: QueryLastRemoteHeightResponse, useInterfaces: boolean = false): QueryLastRemoteHeightResponseAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; return obj; }, fromAminoMsg(object: QueryLastRemoteHeightResponseAminoMsg): QueryLastRemoteHeightResponse { diff --git a/packages/types/protobuf/codegen/neutron/interchainqueries/tx.ts b/packages/types/protobuf/codegen/neutron/interchainqueries/tx.ts index 275f6b791e..6a157a2baa 100644 --- a/packages/types/protobuf/codegen/neutron/interchainqueries/tx.ts +++ b/packages/types/protobuf/codegen/neutron/interchainqueries/tx.ts @@ -3,6 +3,7 @@ import { KVKey, KVKeyAmino, KVKeySDKType } from "./genesis"; import { Params, ParamsAmino, ParamsSDKType } from "./params"; import { ProofOps, ProofOpsAmino, ProofOpsSDKType, Proof, ProofAmino, ProofSDKType } from "../../tendermint/crypto/proof"; import { Any, AnyAmino, AnySDKType } from "../../google/protobuf/any"; +import { ExecTxResult, ExecTxResultAmino, ExecTxResultSDKType } from "../../tendermint/abci/types"; import { BinaryReader, BinaryWriter } from "../../binary"; import { bytesFromBase64, base64FromBytes } from "../../helpers"; export interface MsgRegisterInterchainQuery { @@ -146,7 +147,7 @@ export interface StorageValue { * is the Merkle Proof which proves existence of key-value pair in IAVL * storage */ - Proof?: ProofOps | undefined; + proof?: ProofOps | undefined; } export interface StorageValueProtoMsg { typeUrl: "/neutron.interchainqueries.StorageValue"; @@ -211,6 +212,7 @@ export interface BlockSDKType { tx?: TxValueSDKType | undefined; } export interface TxValue { + response?: ExecTxResult | undefined; /** * is the Merkle Proof which proves existence of response in block with height * next_block_header.Height @@ -229,6 +231,7 @@ export interface TxValueProtoMsg { value: Uint8Array; } export interface TxValueAmino { + response?: ExecTxResultAmino | undefined; /** * is the Merkle Proof which proves existence of response in block with height * next_block_header.Height @@ -247,6 +250,7 @@ export interface TxValueAminoMsg { value: TxValueAmino; } export interface TxValueSDKType { + response?: ExecTxResultSDKType | undefined; delivery_proof?: ProofSDKType | undefined; inclusion_proof?: ProofSDKType | undefined; data: Uint8Array; @@ -510,16 +514,16 @@ export const MsgRegisterInterchainQuery = { }, toAmino(message: MsgRegisterInterchainQuery, useInterfaces: boolean = false): MsgRegisterInterchainQueryAmino { const obj: any = {}; - obj.query_type = message.queryType; + obj.query_type = message.queryType === "" ? undefined : message.queryType; if (message.keys) { obj.keys = message.keys.map(e => e ? KVKey.toAmino(e, useInterfaces) : undefined); } else { - obj.keys = []; + obj.keys = message.keys; } - obj.transactions_filter = message.transactionsFilter; - obj.connection_id = message.connectionId; - obj.update_period = message.updatePeriod ? message.updatePeriod.toString() : undefined; - obj.sender = message.sender; + obj.transactions_filter = message.transactionsFilter === "" ? undefined : message.transactionsFilter; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.update_period = message.updatePeriod !== BigInt(0) ? message.updatePeriod.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgRegisterInterchainQueryAminoMsg): MsgRegisterInterchainQuery { @@ -582,7 +586,7 @@ export const MsgRegisterInterchainQueryResponse = { }, toAmino(message: MsgRegisterInterchainQueryResponse, useInterfaces: boolean = false): MsgRegisterInterchainQueryResponseAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; return obj; }, fromAminoMsg(object: MsgRegisterInterchainQueryResponseAminoMsg): MsgRegisterInterchainQueryResponse { @@ -678,9 +682,9 @@ export const MsgSubmitQueryResult = { }, toAmino(message: MsgSubmitQueryResult, useInterfaces: boolean = false): MsgSubmitQueryResultAmino { const obj: any = {}; - obj.query_id = message.queryId ? message.queryId.toString() : undefined; - obj.sender = message.sender; - obj.client_id = message.clientId; + obj.query_id = message.queryId !== BigInt(0) ? message.queryId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.client_id = message.clientId === "" ? undefined : message.clientId; obj.result = message.result ? QueryResult.toAmino(message.result, useInterfaces) : undefined; return obj; }, @@ -789,12 +793,12 @@ export const QueryResult = { if (message.kvResults) { obj.kv_results = message.kvResults.map(e => e ? StorageValue.toAmino(e, useInterfaces) : undefined); } else { - obj.kv_results = []; + obj.kv_results = message.kvResults; } obj.block = message.block ? Block.toAmino(message.block, useInterfaces) : undefined; - obj.height = message.height ? message.height.toString() : undefined; - obj.revision = message.revision ? message.revision.toString() : undefined; - obj.allow_kv_callbacks = message.allowKvCallbacks; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.revision = message.revision !== BigInt(0) ? message.revision.toString() : undefined; + obj.allow_kv_callbacks = message.allowKvCallbacks === false ? undefined : message.allowKvCallbacks; return obj; }, fromAminoMsg(object: QueryResultAminoMsg): QueryResult { @@ -818,7 +822,7 @@ function createBaseStorageValue(): StorageValue { storagePrefix: "", key: new Uint8Array(), value: new Uint8Array(), - Proof: undefined + proof: undefined }; } export const StorageValue = { @@ -833,8 +837,8 @@ export const StorageValue = { if (message.value.length !== 0) { writer.uint32(26).bytes(message.value); } - if (message.Proof !== undefined) { - ProofOps.encode(message.Proof, writer.uint32(34).fork()).ldelim(); + if (message.proof !== undefined) { + ProofOps.encode(message.proof, writer.uint32(34).fork()).ldelim(); } return writer; }, @@ -855,7 +859,7 @@ export const StorageValue = { message.value = reader.bytes(); break; case 4: - message.Proof = ProofOps.decode(reader, reader.uint32(), useInterfaces); + message.proof = ProofOps.decode(reader, reader.uint32(), useInterfaces); break; default: reader.skipType(tag & 7); @@ -869,7 +873,7 @@ export const StorageValue = { message.storagePrefix = object.storagePrefix ?? ""; message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); - message.Proof = object.Proof !== undefined && object.Proof !== null ? ProofOps.fromPartial(object.Proof) : undefined; + message.proof = object.proof !== undefined && object.proof !== null ? ProofOps.fromPartial(object.proof) : undefined; return message; }, fromAmino(object: StorageValueAmino): StorageValue { @@ -884,16 +888,16 @@ export const StorageValue = { message.value = bytesFromBase64(object.value); } if (object.Proof !== undefined && object.Proof !== null) { - message.Proof = ProofOps.fromAmino(object.Proof); + message.proof = ProofOps.fromAmino(object.Proof); } return message; }, toAmino(message: StorageValue, useInterfaces: boolean = false): StorageValueAmino { const obj: any = {}; - obj.storage_prefix = message.storagePrefix; + obj.storage_prefix = message.storagePrefix === "" ? undefined : message.storagePrefix; obj.key = message.key ? base64FromBytes(message.key) : undefined; obj.value = message.value ? base64FromBytes(message.value) : undefined; - obj.Proof = message.Proof ? ProofOps.toAmino(message.Proof, useInterfaces) : undefined; + obj.Proof = message.proof ? ProofOps.toAmino(message.proof, useInterfaces) : undefined; return obj; }, fromAminoMsg(object: StorageValueAminoMsg): StorageValue { @@ -1001,6 +1005,7 @@ export const Block = { }; function createBaseTxValue(): TxValue { return { + response: undefined, deliveryProof: undefined, inclusionProof: undefined, data: new Uint8Array() @@ -1009,6 +1014,9 @@ function createBaseTxValue(): TxValue { export const TxValue = { typeUrl: "/neutron.interchainqueries.TxValue", encode(message: TxValue, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.response !== undefined) { + ExecTxResult.encode(message.response, writer.uint32(10).fork()).ldelim(); + } if (message.deliveryProof !== undefined) { Proof.encode(message.deliveryProof, writer.uint32(18).fork()).ldelim(); } @@ -1027,6 +1035,9 @@ export const TxValue = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.response = ExecTxResult.decode(reader, reader.uint32(), useInterfaces); + break; case 2: message.deliveryProof = Proof.decode(reader, reader.uint32(), useInterfaces); break; @@ -1045,6 +1056,7 @@ export const TxValue = { }, fromPartial(object: Partial): TxValue { const message = createBaseTxValue(); + message.response = object.response !== undefined && object.response !== null ? ExecTxResult.fromPartial(object.response) : undefined; message.deliveryProof = object.deliveryProof !== undefined && object.deliveryProof !== null ? Proof.fromPartial(object.deliveryProof) : undefined; message.inclusionProof = object.inclusionProof !== undefined && object.inclusionProof !== null ? Proof.fromPartial(object.inclusionProof) : undefined; message.data = object.data ?? new Uint8Array(); @@ -1052,6 +1064,9 @@ export const TxValue = { }, fromAmino(object: TxValueAmino): TxValue { const message = createBaseTxValue(); + if (object.response !== undefined && object.response !== null) { + message.response = ExecTxResult.fromAmino(object.response); + } if (object.delivery_proof !== undefined && object.delivery_proof !== null) { message.deliveryProof = Proof.fromAmino(object.delivery_proof); } @@ -1065,6 +1080,7 @@ export const TxValue = { }, toAmino(message: TxValue, useInterfaces: boolean = false): TxValueAmino { const obj: any = {}; + obj.response = message.response ? ExecTxResult.toAmino(message.response, useInterfaces) : undefined; obj.delivery_proof = message.deliveryProof ? Proof.toAmino(message.deliveryProof, useInterfaces) : undefined; obj.inclusion_proof = message.inclusionProof ? Proof.toAmino(message.inclusionProof, useInterfaces) : undefined; obj.data = message.data ? base64FromBytes(message.data) : undefined; @@ -1191,8 +1207,8 @@ export const MsgRemoveInterchainQueryRequest = { }, toAmino(message: MsgRemoveInterchainQueryRequest, useInterfaces: boolean = false): MsgRemoveInterchainQueryRequestAmino { const obj: any = {}; - obj.query_id = message.queryId ? message.queryId.toString() : undefined; - obj.sender = message.sender; + obj.query_id = message.queryId !== BigInt(0) ? message.queryId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgRemoveInterchainQueryRequestAminoMsg): MsgRemoveInterchainQueryRequest { @@ -1347,15 +1363,15 @@ export const MsgUpdateInterchainQueryRequest = { }, toAmino(message: MsgUpdateInterchainQueryRequest, useInterfaces: boolean = false): MsgUpdateInterchainQueryRequestAmino { const obj: any = {}; - obj.query_id = message.queryId ? message.queryId.toString() : undefined; + obj.query_id = message.queryId !== BigInt(0) ? message.queryId.toString() : undefined; if (message.newKeys) { obj.new_keys = message.newKeys.map(e => e ? KVKey.toAmino(e, useInterfaces) : undefined); } else { - obj.new_keys = []; + obj.new_keys = message.newKeys; } - obj.new_update_period = message.newUpdatePeriod ? message.newUpdatePeriod.toString() : undefined; - obj.new_transactions_filter = message.newTransactionsFilter; - obj.sender = message.sender; + obj.new_update_period = message.newUpdatePeriod !== BigInt(0) ? message.newUpdatePeriod.toString() : undefined; + obj.new_transactions_filter = message.newTransactionsFilter === "" ? undefined : message.newTransactionsFilter; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgUpdateInterchainQueryRequestAminoMsg): MsgUpdateInterchainQueryRequest { @@ -1479,8 +1495,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/neutron/interchaintxs/v1/params.ts b/packages/types/protobuf/codegen/neutron/interchaintxs/v1/params.ts index f68e58fb6b..ad022d10f6 100644 --- a/packages/types/protobuf/codegen/neutron/interchaintxs/v1/params.ts +++ b/packages/types/protobuf/codegen/neutron/interchaintxs/v1/params.ts @@ -80,11 +80,11 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.msg_submit_tx_max_messages = message.msgSubmitTxMaxMessages ? message.msgSubmitTxMaxMessages.toString() : undefined; + obj.msg_submit_tx_max_messages = message.msgSubmitTxMaxMessages !== BigInt(0) ? message.msgSubmitTxMaxMessages.toString() : undefined; if (message.registerFee) { obj.register_fee = message.registerFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.register_fee = []; + obj.register_fee = message.registerFee; } return obj; }, diff --git a/packages/types/protobuf/codegen/neutron/interchaintxs/v1/query.ts b/packages/types/protobuf/codegen/neutron/interchaintxs/v1/query.ts index 5967d0929f..2d028c8813 100644 --- a/packages/types/protobuf/codegen/neutron/interchaintxs/v1/query.ts +++ b/packages/types/protobuf/codegen/neutron/interchaintxs/v1/query.ts @@ -285,9 +285,9 @@ export const QueryInterchainAccountAddressRequest = { }, toAmino(message: QueryInterchainAccountAddressRequest, useInterfaces: boolean = false): QueryInterchainAccountAddressRequestAmino { const obj: any = {}; - obj.owner_address = message.ownerAddress; - obj.interchain_account_id = message.interchainAccountId; - obj.connection_id = message.connectionId; + obj.owner_address = message.ownerAddress === "" ? undefined : message.ownerAddress; + obj.interchain_account_id = message.interchainAccountId === "" ? undefined : message.interchainAccountId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; return obj; }, fromAminoMsg(object: QueryInterchainAccountAddressRequestAminoMsg): QueryInterchainAccountAddressRequest { @@ -350,7 +350,7 @@ export const QueryInterchainAccountAddressResponse = { }, toAmino(message: QueryInterchainAccountAddressResponse, useInterfaces: boolean = false): QueryInterchainAccountAddressResponseAmino { const obj: any = {}; - obj.interchain_account_address = message.interchainAccountAddress; + obj.interchain_account_address = message.interchainAccountAddress === "" ? undefined : message.interchainAccountAddress; return obj; }, fromAminoMsg(object: QueryInterchainAccountAddressResponseAminoMsg): QueryInterchainAccountAddressResponse { diff --git a/packages/types/protobuf/codegen/neutron/interchaintxs/v1/tx.ts b/packages/types/protobuf/codegen/neutron/interchaintxs/v1/tx.ts index 30851a0828..3ce33052c2 100644 --- a/packages/types/protobuf/codegen/neutron/interchaintxs/v1/tx.ts +++ b/packages/types/protobuf/codegen/neutron/interchaintxs/v1/tx.ts @@ -286,13 +286,13 @@ export const MsgRegisterInterchainAccount = { }, toAmino(message: MsgRegisterInterchainAccount, useInterfaces: boolean = false): MsgRegisterInterchainAccountAmino { const obj: any = {}; - obj.from_address = message.fromAddress; - obj.connection_id = message.connectionId; - obj.interchain_account_id = message.interchainAccountId; + obj.from_address = message.fromAddress === "" ? undefined : message.fromAddress; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.interchain_account_id = message.interchainAccountId === "" ? undefined : message.interchainAccountId; if (message.registerFee) { obj.register_fee = message.registerFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.register_fee = []; + obj.register_fee = message.registerFee; } return obj; }, @@ -470,16 +470,16 @@ export const MsgSubmitTx = { }, toAmino(message: MsgSubmitTx, useInterfaces: boolean = false): MsgSubmitTxAmino { const obj: any = {}; - obj.from_address = message.fromAddress; - obj.interchain_account_id = message.interchainAccountId; - obj.connection_id = message.connectionId; + obj.from_address = message.fromAddress === "" ? undefined : message.fromAddress; + obj.interchain_account_id = message.interchainAccountId === "" ? undefined : message.interchainAccountId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; if (message.msgs) { obj.msgs = message.msgs.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); } else { - obj.msgs = []; + obj.msgs = message.msgs; } - obj.memo = message.memo; - obj.timeout = message.timeout ? message.timeout.toString() : undefined; + obj.memo = message.memo === "" ? undefined : message.memo; + obj.timeout = message.timeout !== BigInt(0) ? message.timeout.toString() : undefined; obj.fee = message.fee ? Fee.toAmino(message.fee, useInterfaces) : undefined; return obj; }, @@ -554,8 +554,8 @@ export const MsgSubmitTxResponse = { }, toAmino(message: MsgSubmitTxResponse, useInterfaces: boolean = false): MsgSubmitTxResponseAmino { const obj: any = {}; - obj.sequence_id = message.sequenceId ? message.sequenceId.toString() : undefined; - obj.channel = message.channel; + obj.sequence_id = message.sequenceId !== BigInt(0) ? message.sequenceId.toString() : undefined; + obj.channel = message.channel === "" ? undefined : message.channel; return obj; }, fromAminoMsg(object: MsgSubmitTxResponseAminoMsg): MsgSubmitTxResponse { @@ -629,8 +629,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/osmosis/accum/v1beta1/accum.ts b/packages/types/protobuf/codegen/osmosis/accum/v1beta1/accum.ts index 3034dad708..146e0924e4 100644 --- a/packages/types/protobuf/codegen/osmosis/accum/v1beta1/accum.ts +++ b/packages/types/protobuf/codegen/osmosis/accum/v1beta1/accum.ts @@ -201,9 +201,9 @@ export const AccumulatorContent = { if (message.accumValue) { obj.accum_value = message.accumValue.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.accum_value = []; + obj.accum_value = message.accumValue; } - obj.total_shares = message.totalShares; + obj.total_shares = message.totalShares === "" ? undefined : message.totalShares; return obj; }, fromAminoMsg(object: AccumulatorContentAminoMsg): AccumulatorContent { @@ -357,16 +357,16 @@ export const Record = { }, toAmino(message: Record, useInterfaces: boolean = false): RecordAmino { const obj: any = {}; - obj.num_shares = message.numShares; + obj.num_shares = message.numShares === "" ? undefined : message.numShares; if (message.accumValuePerShare) { obj.accum_value_per_share = message.accumValuePerShare.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.accum_value_per_share = []; + obj.accum_value_per_share = message.accumValuePerShare; } if (message.unclaimedRewardsTotal) { obj.unclaimed_rewards_total = message.unclaimedRewardsTotal.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.unclaimed_rewards_total = []; + obj.unclaimed_rewards_total = message.unclaimedRewardsTotal; } obj.options = message.options ? Options.toAmino(message.options, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/params.ts b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/params.ts index 4420c0631d..83b79a0061 100644 --- a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/params.ts +++ b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/params.ts @@ -234,31 +234,31 @@ export const Params = { if (message.authorizedTickSpacing) { obj.authorized_tick_spacing = message.authorizedTickSpacing.map(e => e.toString()); } else { - obj.authorized_tick_spacing = []; + obj.authorized_tick_spacing = message.authorizedTickSpacing; } if (message.authorizedSpreadFactors) { obj.authorized_spread_factors = message.authorizedSpreadFactors.map(e => e); } else { - obj.authorized_spread_factors = []; + obj.authorized_spread_factors = message.authorizedSpreadFactors; } - obj.balancer_shares_reward_discount = message.balancerSharesRewardDiscount; + obj.balancer_shares_reward_discount = message.balancerSharesRewardDiscount === "" ? undefined : message.balancerSharesRewardDiscount; if (message.authorizedQuoteDenoms) { obj.authorized_quote_denoms = message.authorizedQuoteDenoms.map(e => e); } else { - obj.authorized_quote_denoms = []; + obj.authorized_quote_denoms = message.authorizedQuoteDenoms; } if (message.authorizedUptimes) { obj.authorized_uptimes = message.authorizedUptimes.map(e => e ? Duration.toAmino(e, useInterfaces) : undefined); } else { - obj.authorized_uptimes = []; + obj.authorized_uptimes = message.authorizedUptimes; } - obj.is_permissionless_pool_creation_enabled = message.isPermissionlessPoolCreationEnabled; + obj.is_permissionless_pool_creation_enabled = message.isPermissionlessPoolCreationEnabled === false ? undefined : message.isPermissionlessPoolCreationEnabled; if (message.unrestrictedPoolCreatorWhitelist) { obj.unrestricted_pool_creator_whitelist = message.unrestrictedPoolCreatorWhitelist.map(e => e); } else { - obj.unrestricted_pool_creator_whitelist = []; + obj.unrestricted_pool_creator_whitelist = message.unrestrictedPoolCreatorWhitelist; } - obj.hook_gas_limit = message.hookGasLimit ? message.hookGasLimit.toString() : undefined; + obj.hook_gas_limit = message.hookGasLimit !== BigInt(0) ? message.hookGasLimit.toString() : undefined; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/poolmodel/concentrated/v1beta1/tx.ts b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/poolmodel/concentrated/v1beta1/tx.ts index 25d8edadcb..e94cc03e9a 100644 --- a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/poolmodel/concentrated/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/poolmodel/concentrated/v1beta1/tx.ts @@ -141,11 +141,11 @@ export const MsgCreateConcentratedPool = { }, toAmino(message: MsgCreateConcentratedPool, useInterfaces: boolean = false): MsgCreateConcentratedPoolAmino { const obj: any = {}; - obj.sender = message.sender; - obj.denom0 = message.denom0; - obj.denom1 = message.denom1; - obj.tick_spacing = message.tickSpacing ? message.tickSpacing.toString() : undefined; - obj.spread_factor = message.spreadFactor; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.denom0 = message.denom0 === "" ? undefined : message.denom0; + obj.denom1 = message.denom1 === "" ? undefined : message.denom1; + obj.tick_spacing = message.tickSpacing !== BigInt(0) ? message.tickSpacing.toString() : undefined; + obj.spread_factor = message.spreadFactor === "" ? undefined : message.spreadFactor; return obj; }, fromAminoMsg(object: MsgCreateConcentratedPoolAminoMsg): MsgCreateConcentratedPool { @@ -214,7 +214,7 @@ export const MsgCreateConcentratedPoolResponse = { }, toAmino(message: MsgCreateConcentratedPoolResponse, useInterfaces: boolean = false): MsgCreateConcentratedPoolResponseAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCreateConcentratedPoolResponseAminoMsg): MsgCreateConcentratedPoolResponse { diff --git a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/genesis.ts b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/genesis.ts index ce34f2c41c..01bca5b9ac 100644 --- a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/genesis.ts @@ -257,8 +257,8 @@ export const FullTick = { }, toAmino(message: FullTick, useInterfaces: boolean = false): FullTickAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.tick_index = message.tickIndex ? message.tickIndex.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.tick_index = message.tickIndex !== BigInt(0) ? message.tickIndex.toString() : undefined; obj.info = message.info ? TickInfo.toAmino(message.info, useInterfaces) : undefined; return obj; }, @@ -370,18 +370,18 @@ export const PoolData = { if (message.ticks) { obj.ticks = message.ticks.map(e => e ? FullTick.toAmino(e, useInterfaces) : undefined); } else { - obj.ticks = []; + obj.ticks = message.ticks; } obj.spread_reward_accumulator = message.spreadRewardAccumulator ? AccumObject.toAmino(message.spreadRewardAccumulator, useInterfaces) : undefined; if (message.incentivesAccumulators) { obj.incentives_accumulators = message.incentivesAccumulators.map(e => e ? AccumObject.toAmino(e, useInterfaces) : undefined); } else { - obj.incentives_accumulators = []; + obj.incentives_accumulators = message.incentivesAccumulators; } if (message.incentiveRecords) { obj.incentive_records = message.incentiveRecords.map(e => e ? IncentiveRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.incentive_records = []; + obj.incentive_records = message.incentiveRecords; } return obj; }, @@ -483,12 +483,12 @@ export const PositionData = { toAmino(message: PositionData, useInterfaces: boolean = false): PositionDataAmino { const obj: any = {}; obj.position = message.position ? Position.toAmino(message.position, useInterfaces) : undefined; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; obj.spread_reward_accum_record = message.spreadRewardAccumRecord ? Record.toAmino(message.spreadRewardAccumRecord, useInterfaces) : undefined; if (message.uptimeAccumRecords) { obj.uptime_accum_records = message.uptimeAccumRecords.map(e => e ? Record.toAmino(e, useInterfaces) : undefined); } else { - obj.uptime_accum_records = []; + obj.uptime_accum_records = message.uptimeAccumRecords; } return obj; }, @@ -602,15 +602,15 @@ export const GenesisState = { if (message.poolData) { obj.pool_data = message.poolData.map(e => e ? PoolData.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_data = []; + obj.pool_data = message.poolData; } if (message.positionData) { obj.position_data = message.positionData.map(e => e ? PositionData.toAmino(e, useInterfaces) : undefined); } else { - obj.position_data = []; + obj.position_data = message.positionData; } - obj.next_position_id = message.nextPositionId ? message.nextPositionId.toString() : undefined; - obj.next_incentive_record_id = message.nextIncentiveRecordId ? message.nextIncentiveRecordId.toString() : undefined; + obj.next_position_id = message.nextPositionId !== BigInt(0) ? message.nextPositionId.toString() : undefined; + obj.next_incentive_record_id = message.nextIncentiveRecordId !== BigInt(0) ? message.nextIncentiveRecordId.toString() : undefined; return obj; }, fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { @@ -690,7 +690,7 @@ export const AccumObject = { }, toAmino(message: AccumObject, useInterfaces: boolean = false): AccumObjectAmino { const obj: any = {}; - obj.name = message.name; + obj.name = message.name === "" ? undefined : message.name; obj.accum_content = message.accumContent ? AccumulatorContent.toAmino(message.accumContent, useInterfaces) : undefined; return obj; }, @@ -732,7 +732,7 @@ export const PoolI_InterfaceDecoder = (input: BinaryReader | Uint8Array): Pool1 return data; } }; -export const PoolI_FromAmino = (content: AnyAmino) => { +export const PoolI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "osmosis/concentratedliquidity/pool": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/gov.ts b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/gov.ts index 89eb45ddbb..f973d809ab 100644 --- a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/gov.ts +++ b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/gov.ts @@ -202,12 +202,12 @@ export const CreateConcentratedLiquidityPoolsProposal = { }, toAmino(message: CreateConcentratedLiquidityPoolsProposal, useInterfaces: boolean = false): CreateConcentratedLiquidityPoolsProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.poolRecords) { obj.pool_records = message.poolRecords.map(e => e ? PoolRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_records = []; + obj.pool_records = message.poolRecords; } return obj; }, @@ -297,12 +297,12 @@ export const TickSpacingDecreaseProposal = { }, toAmino(message: TickSpacingDecreaseProposal, useInterfaces: boolean = false): TickSpacingDecreaseProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.poolIdToTickSpacingRecords) { obj.pool_id_to_tick_spacing_records = message.poolIdToTickSpacingRecords.map(e => e ? PoolIdToTickSpacingRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_id_to_tick_spacing_records = []; + obj.pool_id_to_tick_spacing_records = message.poolIdToTickSpacingRecords; } return obj; }, @@ -383,8 +383,8 @@ export const PoolIdToTickSpacingRecord = { }, toAmino(message: PoolIdToTickSpacingRecord, useInterfaces: boolean = false): PoolIdToTickSpacingRecordAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.new_tick_spacing = message.newTickSpacing ? message.newTickSpacing.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.new_tick_spacing = message.newTickSpacing !== BigInt(0) ? message.newTickSpacing.toString() : undefined; return obj; }, fromAminoMsg(object: PoolIdToTickSpacingRecordAminoMsg): PoolIdToTickSpacingRecord { @@ -486,10 +486,10 @@ export const PoolRecord = { }, toAmino(message: PoolRecord, useInterfaces: boolean = false): PoolRecordAmino { const obj: any = {}; - obj.denom0 = message.denom0; - obj.denom1 = message.denom1; - obj.tick_spacing = message.tickSpacing ? message.tickSpacing.toString() : undefined; - obj.spread_factor = message.spreadFactor; + obj.denom0 = message.denom0 === "" ? undefined : message.denom0; + obj.denom1 = message.denom1 === "" ? undefined : message.denom1; + obj.tick_spacing = message.tickSpacing !== BigInt(0) ? message.tickSpacing.toString() : undefined; + obj.spread_factor = message.spreadFactor === "" ? undefined : message.spreadFactor; return obj; }, fromAminoMsg(object: PoolRecordAminoMsg): PoolRecord { diff --git a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/incentive_record.ts b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/incentive_record.ts index 577afc846f..56920476dc 100644 --- a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/incentive_record.ts +++ b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/incentive_record.ts @@ -180,8 +180,8 @@ export const IncentiveRecord = { }, toAmino(message: IncentiveRecord, useInterfaces: boolean = false): IncentiveRecordAmino { const obj: any = {}; - obj.incentive_id = message.incentiveId ? message.incentiveId.toString() : undefined; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.incentive_id = message.incentiveId !== BigInt(0) ? message.incentiveId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; obj.incentive_record_body = message.incentiveRecordBody ? IncentiveRecordBody.toAmino(message.incentiveRecordBody, useInterfaces) : undefined; obj.min_uptime = message.minUptime ? Duration.toAmino(message.minUptime, useInterfaces) : undefined; return obj; @@ -275,7 +275,7 @@ export const IncentiveRecordBody = { toAmino(message: IncentiveRecordBody, useInterfaces: boolean = false): IncentiveRecordBodyAmino { const obj: any = {}; obj.remaining_coin = message.remainingCoin ? DecCoin.toAmino(message.remainingCoin, useInterfaces) : undefined; - obj.emission_rate = message.emissionRate; + obj.emission_rate = message.emissionRate === "" ? undefined : message.emissionRate; obj.start_time = message.startTime ? Timestamp.toAmino(toTimestamp(message.startTime)) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/pool.ts b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/pool.ts index 5fc24f88bb..7dc41871fc 100644 --- a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/pool.ts +++ b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/pool.ts @@ -260,18 +260,18 @@ export const Pool = { }, toAmino(message: Pool, useInterfaces: boolean = false): PoolAmino { const obj: any = {}; - obj.address = message.address; - obj.incentives_address = message.incentivesAddress; - obj.spread_rewards_address = message.spreadRewardsAddress; - obj.id = message.id ? message.id.toString() : undefined; - obj.current_tick_liquidity = message.currentTickLiquidity; - obj.token0 = message.token0; - obj.token1 = message.token1; - obj.current_sqrt_price = message.currentSqrtPrice; - obj.current_tick = message.currentTick ? message.currentTick.toString() : undefined; - obj.tick_spacing = message.tickSpacing ? message.tickSpacing.toString() : undefined; - obj.exponent_at_price_one = message.exponentAtPriceOne ? message.exponentAtPriceOne.toString() : undefined; - obj.spread_factor = message.spreadFactor; + obj.address = message.address === "" ? undefined : message.address; + obj.incentives_address = message.incentivesAddress === "" ? undefined : message.incentivesAddress; + obj.spread_rewards_address = message.spreadRewardsAddress === "" ? undefined : message.spreadRewardsAddress; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.current_tick_liquidity = message.currentTickLiquidity === "" ? undefined : message.currentTickLiquidity; + obj.token0 = message.token0 === "" ? undefined : message.token0; + obj.token1 = message.token1 === "" ? undefined : message.token1; + obj.current_sqrt_price = message.currentSqrtPrice === "" ? undefined : message.currentSqrtPrice; + obj.current_tick = message.currentTick !== BigInt(0) ? message.currentTick.toString() : undefined; + obj.tick_spacing = message.tickSpacing !== BigInt(0) ? message.tickSpacing.toString() : undefined; + obj.exponent_at_price_one = message.exponentAtPriceOne !== BigInt(0) ? message.exponentAtPriceOne.toString() : undefined; + obj.spread_factor = message.spreadFactor === "" ? undefined : message.spreadFactor; obj.last_liquidity_update = message.lastLiquidityUpdate ? Timestamp.toAmino(toTimestamp(message.lastLiquidityUpdate)) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/position.ts b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/position.ts index e19c34f8f6..c61c8e8d60 100644 --- a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/position.ts +++ b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/position.ts @@ -240,13 +240,13 @@ export const Position = { }, toAmino(message: Position, useInterfaces: boolean = false): PositionAmino { const obj: any = {}; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; - obj.address = message.address; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.lower_tick = message.lowerTick ? message.lowerTick.toString() : undefined; - obj.upper_tick = message.upperTick ? message.upperTick.toString() : undefined; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; + obj.address = message.address === "" ? undefined : message.address; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.lower_tick = message.lowerTick !== BigInt(0) ? message.lowerTick.toString() : undefined; + obj.upper_tick = message.upperTick !== BigInt(0) ? message.upperTick.toString() : undefined; obj.join_time = message.joinTime ? Timestamp.toAmino(toTimestamp(message.joinTime)) : undefined; - obj.liquidity = message.liquidity; + obj.liquidity = message.liquidity === "" ? undefined : message.liquidity; return obj; }, fromAminoMsg(object: PositionAminoMsg): Position { @@ -370,17 +370,17 @@ export const FullPositionBreakdown = { if (message.claimableSpreadRewards) { obj.claimable_spread_rewards = message.claimableSpreadRewards.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.claimable_spread_rewards = []; + obj.claimable_spread_rewards = message.claimableSpreadRewards; } if (message.claimableIncentives) { obj.claimable_incentives = message.claimableIncentives.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.claimable_incentives = []; + obj.claimable_incentives = message.claimableIncentives; } if (message.forfeitedIncentives) { obj.forfeited_incentives = message.forfeitedIncentives.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.forfeited_incentives = []; + obj.forfeited_incentives = message.forfeitedIncentives; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/query.ts b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/query.ts index d1b044c7b5..b8c9ce6d1d 100644 --- a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/query.ts @@ -748,8 +748,8 @@ export const UserPositionsRequest = { }, toAmino(message: UserPositionsRequest, useInterfaces: boolean = false): UserPositionsRequestAmino { const obj: any = {}; - obj.address = message.address; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.address = message.address === "" ? undefined : message.address; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -831,7 +831,7 @@ export const UserPositionsResponse = { if (message.positions) { obj.positions = message.positions.map(e => e ? FullPositionBreakdown.toAmino(e, useInterfaces) : undefined); } else { - obj.positions = []; + obj.positions = message.positions; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -902,7 +902,7 @@ export const PositionByIdRequest = { }, toAmino(message: PositionByIdRequest, useInterfaces: boolean = false): PositionByIdRequestAmino { const obj: any = {}; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; return obj; }, fromAminoMsg(object: PositionByIdRequestAminoMsg): PositionByIdRequest { @@ -1121,7 +1121,7 @@ export const PoolsResponse = { if (message.pools) { obj.pools = message.pools.map(e => e ? PoolI_ToAmino((e as Any), useInterfaces) : undefined); } else { - obj.pools = []; + obj.pools = message.pools; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1328,8 +1328,8 @@ export const TickLiquidityNet = { }, toAmino(message: TickLiquidityNet, useInterfaces: boolean = false): TickLiquidityNetAmino { const obj: any = {}; - obj.liquidity_net = message.liquidityNet; - obj.tick_index = message.tickIndex ? message.tickIndex.toString() : undefined; + obj.liquidity_net = message.liquidityNet === "" ? undefined : message.liquidityNet; + obj.tick_index = message.tickIndex !== BigInt(0) ? message.tickIndex.toString() : undefined; return obj; }, fromAminoMsg(object: TickLiquidityNetAminoMsg): TickLiquidityNet { @@ -1420,9 +1420,9 @@ export const LiquidityDepthWithRange = { }, toAmino(message: LiquidityDepthWithRange, useInterfaces: boolean = false): LiquidityDepthWithRangeAmino { const obj: any = {}; - obj.liquidity_amount = message.liquidityAmount; - obj.lower_tick = message.lowerTick ? message.lowerTick.toString() : undefined; - obj.upper_tick = message.upperTick ? message.upperTick.toString() : undefined; + obj.liquidity_amount = message.liquidityAmount === "" ? undefined : message.liquidityAmount; + obj.lower_tick = message.lowerTick !== BigInt(0) ? message.lowerTick.toString() : undefined; + obj.upper_tick = message.upperTick !== BigInt(0) ? message.upperTick.toString() : undefined; return obj; }, fromAminoMsg(object: LiquidityDepthWithRangeAminoMsg): LiquidityDepthWithRange { @@ -1546,12 +1546,12 @@ export const LiquidityNetInDirectionRequest = { }, toAmino(message: LiquidityNetInDirectionRequest, useInterfaces: boolean = false): LiquidityNetInDirectionRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in = message.tokenIn; - obj.start_tick = message.startTick ? message.startTick.toString() : undefined; - obj.use_cur_tick = message.useCurTick; - obj.bound_tick = message.boundTick ? message.boundTick.toString() : undefined; - obj.use_no_bound = message.useNoBound; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; + obj.start_tick = message.startTick !== BigInt(0) ? message.startTick.toString() : undefined; + obj.use_cur_tick = message.useCurTick === false ? undefined : message.useCurTick; + obj.bound_tick = message.boundTick !== BigInt(0) ? message.boundTick.toString() : undefined; + obj.use_no_bound = message.useNoBound === false ? undefined : message.useNoBound; return obj; }, fromAminoMsg(object: LiquidityNetInDirectionRequestAminoMsg): LiquidityNetInDirectionRequest { @@ -1654,11 +1654,11 @@ export const LiquidityNetInDirectionResponse = { if (message.liquidityDepths) { obj.liquidity_depths = message.liquidityDepths.map(e => e ? TickLiquidityNet.toAmino(e, useInterfaces) : undefined); } else { - obj.liquidity_depths = []; + obj.liquidity_depths = message.liquidityDepths; } - obj.current_tick = message.currentTick ? message.currentTick.toString() : undefined; - obj.current_liquidity = message.currentLiquidity; - obj.current_sqrt_price = message.currentSqrtPrice; + obj.current_tick = message.currentTick !== BigInt(0) ? message.currentTick.toString() : undefined; + obj.current_liquidity = message.currentLiquidity === "" ? undefined : message.currentLiquidity; + obj.current_sqrt_price = message.currentSqrtPrice === "" ? undefined : message.currentSqrtPrice; return obj; }, fromAminoMsg(object: LiquidityNetInDirectionResponseAminoMsg): LiquidityNetInDirectionResponse { @@ -1727,7 +1727,7 @@ export const LiquidityPerTickRangeRequest = { }, toAmino(message: LiquidityPerTickRangeRequest, useInterfaces: boolean = false): LiquidityPerTickRangeRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: LiquidityPerTickRangeRequestAminoMsg): LiquidityPerTickRangeRequest { @@ -1808,9 +1808,9 @@ export const LiquidityPerTickRangeResponse = { if (message.liquidity) { obj.liquidity = message.liquidity.map(e => e ? LiquidityDepthWithRange.toAmino(e, useInterfaces) : undefined); } else { - obj.liquidity = []; + obj.liquidity = message.liquidity; } - obj.bucket_index = message.bucketIndex ? message.bucketIndex.toString() : undefined; + obj.bucket_index = message.bucketIndex !== BigInt(0) ? message.bucketIndex.toString() : undefined; return obj; }, fromAminoMsg(object: LiquidityPerTickRangeResponseAminoMsg): LiquidityPerTickRangeResponse { @@ -1879,7 +1879,7 @@ export const ClaimableSpreadRewardsRequest = { }, toAmino(message: ClaimableSpreadRewardsRequest, useInterfaces: boolean = false): ClaimableSpreadRewardsRequestAmino { const obj: any = {}; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; return obj; }, fromAminoMsg(object: ClaimableSpreadRewardsRequestAminoMsg): ClaimableSpreadRewardsRequest { @@ -1949,7 +1949,7 @@ export const ClaimableSpreadRewardsResponse = { if (message.claimableSpreadRewards) { obj.claimable_spread_rewards = message.claimableSpreadRewards.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.claimable_spread_rewards = []; + obj.claimable_spread_rewards = message.claimableSpreadRewards; } return obj; }, @@ -2019,7 +2019,7 @@ export const ClaimableIncentivesRequest = { }, toAmino(message: ClaimableIncentivesRequest, useInterfaces: boolean = false): ClaimableIncentivesRequestAmino { const obj: any = {}; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; return obj; }, fromAminoMsg(object: ClaimableIncentivesRequestAminoMsg): ClaimableIncentivesRequest { @@ -2098,12 +2098,12 @@ export const ClaimableIncentivesResponse = { if (message.claimableIncentives) { obj.claimable_incentives = message.claimableIncentives.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.claimable_incentives = []; + obj.claimable_incentives = message.claimableIncentives; } if (message.forfeitedIncentives) { obj.forfeited_incentives = message.forfeitedIncentives.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.forfeited_incentives = []; + obj.forfeited_incentives = message.forfeitedIncentives; } return obj; }, @@ -2173,7 +2173,7 @@ export const PoolAccumulatorRewardsRequest = { }, toAmino(message: PoolAccumulatorRewardsRequest, useInterfaces: boolean = false): PoolAccumulatorRewardsRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: PoolAccumulatorRewardsRequestAminoMsg): PoolAccumulatorRewardsRequest { @@ -2252,12 +2252,12 @@ export const PoolAccumulatorRewardsResponse = { if (message.spreadRewardGrowthGlobal) { obj.spread_reward_growth_global = message.spreadRewardGrowthGlobal.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.spread_reward_growth_global = []; + obj.spread_reward_growth_global = message.spreadRewardGrowthGlobal; } if (message.uptimeGrowthGlobal) { obj.uptime_growth_global = message.uptimeGrowthGlobal.map(e => e ? UptimeTracker.toAmino(e, useInterfaces) : undefined); } else { - obj.uptime_growth_global = []; + obj.uptime_growth_global = message.uptimeGrowthGlobal; } return obj; }, @@ -2338,8 +2338,8 @@ export const TickAccumulatorTrackersRequest = { }, toAmino(message: TickAccumulatorTrackersRequest, useInterfaces: boolean = false): TickAccumulatorTrackersRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.tick_index = message.tickIndex ? message.tickIndex.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.tick_index = message.tickIndex !== BigInt(0) ? message.tickIndex.toString() : undefined; return obj; }, fromAminoMsg(object: TickAccumulatorTrackersRequestAminoMsg): TickAccumulatorTrackersRequest { @@ -2418,12 +2418,12 @@ export const TickAccumulatorTrackersResponse = { if (message.spreadRewardGrowthOppositeDirectionOfLastTraversal) { obj.spread_reward_growth_opposite_direction_of_last_traversal = message.spreadRewardGrowthOppositeDirectionOfLastTraversal.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.spread_reward_growth_opposite_direction_of_last_traversal = []; + obj.spread_reward_growth_opposite_direction_of_last_traversal = message.spreadRewardGrowthOppositeDirectionOfLastTraversal; } if (message.uptimeTrackers) { obj.uptime_trackers = message.uptimeTrackers.map(e => e ? UptimeTracker.toAmino(e, useInterfaces) : undefined); } else { - obj.uptime_trackers = []; + obj.uptime_trackers = message.uptimeTrackers; } return obj; }, @@ -2504,7 +2504,7 @@ export const IncentiveRecordsRequest = { }, toAmino(message: IncentiveRecordsRequest, useInterfaces: boolean = false): IncentiveRecordsRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2586,7 +2586,7 @@ export const IncentiveRecordsResponse = { if (message.incentiveRecords) { obj.incentive_records = message.incentiveRecords.map(e => e ? IncentiveRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.incentive_records = []; + obj.incentive_records = message.incentiveRecords; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2657,7 +2657,7 @@ export const CFMMPoolIdLinkFromConcentratedPoolIdRequest = { }, toAmino(message: CFMMPoolIdLinkFromConcentratedPoolIdRequest, useInterfaces: boolean = false): CFMMPoolIdLinkFromConcentratedPoolIdRequestAmino { const obj: any = {}; - obj.concentrated_pool_id = message.concentratedPoolId ? message.concentratedPoolId.toString() : undefined; + obj.concentrated_pool_id = message.concentratedPoolId !== BigInt(0) ? message.concentratedPoolId.toString() : undefined; return obj; }, fromAminoMsg(object: CFMMPoolIdLinkFromConcentratedPoolIdRequestAminoMsg): CFMMPoolIdLinkFromConcentratedPoolIdRequest { @@ -2726,7 +2726,7 @@ export const CFMMPoolIdLinkFromConcentratedPoolIdResponse = { }, toAmino(message: CFMMPoolIdLinkFromConcentratedPoolIdResponse, useInterfaces: boolean = false): CFMMPoolIdLinkFromConcentratedPoolIdResponseAmino { const obj: any = {}; - obj.cfmm_pool_id = message.cfmmPoolId ? message.cfmmPoolId.toString() : undefined; + obj.cfmm_pool_id = message.cfmmPoolId !== BigInt(0) ? message.cfmmPoolId.toString() : undefined; return obj; }, fromAminoMsg(object: CFMMPoolIdLinkFromConcentratedPoolIdResponseAminoMsg): CFMMPoolIdLinkFromConcentratedPoolIdResponse { @@ -2795,7 +2795,7 @@ export const UserUnbondingPositionsRequest = { }, toAmino(message: UserUnbondingPositionsRequest, useInterfaces: boolean = false): UserUnbondingPositionsRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; return obj; }, fromAminoMsg(object: UserUnbondingPositionsRequestAminoMsg): UserUnbondingPositionsRequest { @@ -2865,7 +2865,7 @@ export const UserUnbondingPositionsResponse = { if (message.positionsWithPeriodLock) { obj.positions_with_period_lock = message.positionsWithPeriodLock.map(e => e ? PositionWithPeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.positions_with_period_lock = []; + obj.positions_with_period_lock = message.positionsWithPeriodLock; } return obj; }, @@ -2992,7 +2992,7 @@ export const GetTotalLiquidityResponse = { if (message.totalLiquidity) { obj.total_liquidity = message.totalLiquidity.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_liquidity = []; + obj.total_liquidity = message.totalLiquidity; } return obj; }, @@ -3084,9 +3084,9 @@ export const NumNextInitializedTicksRequest = { }, toAmino(message: NumNextInitializedTicksRequest, useInterfaces: boolean = false): NumNextInitializedTicksRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in_denom = message.tokenInDenom; - obj.num_next_initialized_ticks = message.numNextInitializedTicks ? message.numNextInitializedTicks.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_in_denom = message.tokenInDenom === "" ? undefined : message.tokenInDenom; + obj.num_next_initialized_ticks = message.numNextInitializedTicks !== BigInt(0) ? message.numNextInitializedTicks.toString() : undefined; return obj; }, fromAminoMsg(object: NumNextInitializedTicksRequestAminoMsg): NumNextInitializedTicksRequest { @@ -3178,10 +3178,10 @@ export const NumNextInitializedTicksResponse = { if (message.liquidityDepths) { obj.liquidity_depths = message.liquidityDepths.map(e => e ? TickLiquidityNet.toAmino(e, useInterfaces) : undefined); } else { - obj.liquidity_depths = []; + obj.liquidity_depths = message.liquidityDepths; } - obj.current_tick = message.currentTick ? message.currentTick.toString() : undefined; - obj.current_liquidity = message.currentLiquidity; + obj.current_tick = message.currentTick !== BigInt(0) ? message.currentTick.toString() : undefined; + obj.current_liquidity = message.currentLiquidity === "" ? undefined : message.currentLiquidity; return obj; }, fromAminoMsg(object: NumNextInitializedTicksResponseAminoMsg): NumNextInitializedTicksResponse { @@ -3222,7 +3222,7 @@ export const PoolI_InterfaceDecoder = (input: BinaryReader | Uint8Array): Pool1 return data; } }; -export const PoolI_FromAmino = (content: AnyAmino) => { +export const PoolI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "osmosis/concentratedliquidity/pool": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/tickInfo.ts b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/tickInfo.ts index f8537fe5d6..8932038045 100644 --- a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/tickInfo.ts +++ b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/tickInfo.ts @@ -148,12 +148,12 @@ export const TickInfo = { }, toAmino(message: TickInfo, useInterfaces: boolean = false): TickInfoAmino { const obj: any = {}; - obj.liquidity_gross = message.liquidityGross; - obj.liquidity_net = message.liquidityNet; + obj.liquidity_gross = message.liquidityGross === "" ? undefined : message.liquidityGross; + obj.liquidity_net = message.liquidityNet === "" ? undefined : message.liquidityNet; if (message.spreadRewardGrowthOppositeDirectionOfLastTraversal) { obj.spread_reward_growth_opposite_direction_of_last_traversal = message.spreadRewardGrowthOppositeDirectionOfLastTraversal.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.spread_reward_growth_opposite_direction_of_last_traversal = []; + obj.spread_reward_growth_opposite_direction_of_last_traversal = message.spreadRewardGrowthOppositeDirectionOfLastTraversal; } obj.uptime_trackers = message.uptimeTrackers ? UptimeTrackers.toAmino(message.uptimeTrackers, useInterfaces) : undefined; return obj; @@ -225,7 +225,7 @@ export const UptimeTrackers = { if (message.list) { obj.list = message.list.map(e => e ? UptimeTracker.toAmino(e, useInterfaces) : undefined); } else { - obj.list = []; + obj.list = message.list; } return obj; }, @@ -296,7 +296,7 @@ export const UptimeTracker = { if (message.uptimeGrowthOutside) { obj.uptime_growth_outside = message.uptimeGrowthOutside.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.uptime_growth_outside = []; + obj.uptime_growth_outside = message.uptimeGrowthOutside; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/tx.ts b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/tx.ts index 64354ab634..a4296ce651 100644 --- a/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/concentratedliquidity/v1beta1/tx.ts @@ -496,17 +496,17 @@ export const MsgCreatePosition = { }, toAmino(message: MsgCreatePosition, useInterfaces: boolean = false): MsgCreatePositionAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.sender = message.sender; - obj.lower_tick = message.lowerTick ? message.lowerTick.toString() : undefined; - obj.upper_tick = message.upperTick ? message.upperTick.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.lower_tick = message.lowerTick !== BigInt(0) ? message.lowerTick.toString() : undefined; + obj.upper_tick = message.upperTick !== BigInt(0) ? message.upperTick.toString() : undefined; if (message.tokensProvided) { obj.tokens_provided = message.tokensProvided.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.tokens_provided = []; + obj.tokens_provided = message.tokensProvided; } - obj.token_min_amount0 = message.tokenMinAmount0; - obj.token_min_amount1 = message.tokenMinAmount1; + obj.token_min_amount0 = message.tokenMinAmount0 === "" ? undefined : message.tokenMinAmount0; + obj.token_min_amount1 = message.tokenMinAmount1 === "" ? undefined : message.tokenMinAmount1; return obj; }, fromAminoMsg(object: MsgCreatePositionAminoMsg): MsgCreatePosition { @@ -630,12 +630,12 @@ export const MsgCreatePositionResponse = { }, toAmino(message: MsgCreatePositionResponse, useInterfaces: boolean = false): MsgCreatePositionResponseAmino { const obj: any = {}; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; - obj.amount0 = message.amount0; - obj.amount1 = message.amount1; - obj.liquidity_created = message.liquidityCreated; - obj.lower_tick = message.lowerTick ? message.lowerTick.toString() : undefined; - obj.upper_tick = message.upperTick ? message.upperTick.toString() : undefined; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; + obj.amount0 = message.amount0 === "" ? undefined : message.amount0; + obj.amount1 = message.amount1 === "" ? undefined : message.amount1; + obj.liquidity_created = message.liquidityCreated === "" ? undefined : message.liquidityCreated; + obj.lower_tick = message.lowerTick !== BigInt(0) ? message.lowerTick.toString() : undefined; + obj.upper_tick = message.upperTick !== BigInt(0) ? message.upperTick.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCreatePositionResponseAminoMsg): MsgCreatePositionResponse { @@ -759,12 +759,12 @@ export const MsgAddToPosition = { }, toAmino(message: MsgAddToPosition, useInterfaces: boolean = false): MsgAddToPositionAmino { const obj: any = {}; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; - obj.sender = message.sender; - obj.amount0 = message.amount0; - obj.amount1 = message.amount1; - obj.token_min_amount0 = message.tokenMinAmount0; - obj.token_min_amount1 = message.tokenMinAmount1; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.amount0 = message.amount0 === "" ? undefined : message.amount0; + obj.amount1 = message.amount1 === "" ? undefined : message.amount1; + obj.token_min_amount0 = message.tokenMinAmount0 === "" ? undefined : message.tokenMinAmount0; + obj.token_min_amount1 = message.tokenMinAmount1 === "" ? undefined : message.tokenMinAmount1; return obj; }, fromAminoMsg(object: MsgAddToPositionAminoMsg): MsgAddToPosition { @@ -855,9 +855,9 @@ export const MsgAddToPositionResponse = { }, toAmino(message: MsgAddToPositionResponse, useInterfaces: boolean = false): MsgAddToPositionResponseAmino { const obj: any = {}; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; - obj.amount0 = message.amount0; - obj.amount1 = message.amount1; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; + obj.amount0 = message.amount0 === "" ? undefined : message.amount0; + obj.amount1 = message.amount1 === "" ? undefined : message.amount1; return obj; }, fromAminoMsg(object: MsgAddToPositionResponseAminoMsg): MsgAddToPositionResponse { @@ -948,9 +948,9 @@ export const MsgWithdrawPosition = { }, toAmino(message: MsgWithdrawPosition, useInterfaces: boolean = false): MsgWithdrawPositionAmino { const obj: any = {}; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; - obj.sender = message.sender; - obj.liquidity_amount = message.liquidityAmount; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.liquidity_amount = message.liquidityAmount === "" ? undefined : message.liquidityAmount; return obj; }, fromAminoMsg(object: MsgWithdrawPositionAminoMsg): MsgWithdrawPosition { @@ -1030,8 +1030,8 @@ export const MsgWithdrawPositionResponse = { }, toAmino(message: MsgWithdrawPositionResponse, useInterfaces: boolean = false): MsgWithdrawPositionResponseAmino { const obj: any = {}; - obj.amount0 = message.amount0; - obj.amount1 = message.amount1; + obj.amount0 = message.amount0 === "" ? undefined : message.amount0; + obj.amount1 = message.amount1 === "" ? undefined : message.amount1; return obj; }, fromAminoMsg(object: MsgWithdrawPositionResponseAminoMsg): MsgWithdrawPositionResponse { @@ -1121,9 +1121,9 @@ export const MsgCollectSpreadRewards = { if (message.positionIds) { obj.position_ids = message.positionIds.map(e => e.toString()); } else { - obj.position_ids = []; + obj.position_ids = message.positionIds; } - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgCollectSpreadRewardsAminoMsg): MsgCollectSpreadRewards { @@ -1193,7 +1193,7 @@ export const MsgCollectSpreadRewardsResponse = { if (message.collectedSpreadRewards) { obj.collected_spread_rewards = message.collectedSpreadRewards.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.collected_spread_rewards = []; + obj.collected_spread_rewards = message.collectedSpreadRewards; } return obj; }, @@ -1284,9 +1284,9 @@ export const MsgCollectIncentives = { if (message.positionIds) { obj.position_ids = message.positionIds.map(e => e.toString()); } else { - obj.position_ids = []; + obj.position_ids = message.positionIds; } - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgCollectIncentivesAminoMsg): MsgCollectIncentives { @@ -1365,12 +1365,12 @@ export const MsgCollectIncentivesResponse = { if (message.collectedIncentives) { obj.collected_incentives = message.collectedIncentives.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.collected_incentives = []; + obj.collected_incentives = message.collectedIncentives; } if (message.forfeitedIncentives) { obj.forfeited_incentives = message.forfeitedIncentives.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.forfeited_incentives = []; + obj.forfeited_incentives = message.forfeitedIncentives; } return obj; }, @@ -1461,9 +1461,9 @@ export const MsgFungifyChargedPositions = { if (message.positionIds) { obj.position_ids = message.positionIds.map(e => e.toString()); } else { - obj.position_ids = []; + obj.position_ids = message.positionIds; } - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgFungifyChargedPositionsAminoMsg): MsgFungifyChargedPositions { @@ -1532,7 +1532,7 @@ export const MsgFungifyChargedPositionsResponse = { }, toAmino(message: MsgFungifyChargedPositionsResponse, useInterfaces: boolean = false): MsgFungifyChargedPositionsResponseAmino { const obj: any = {}; - obj.new_position_id = message.newPositionId ? message.newPositionId.toString() : undefined; + obj.new_position_id = message.newPositionId !== BigInt(0) ? message.newPositionId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgFungifyChargedPositionsResponseAminoMsg): MsgFungifyChargedPositionsResponse { @@ -1633,10 +1633,10 @@ export const MsgTransferPositions = { if (message.positionIds) { obj.position_ids = message.positionIds.map(e => e.toString()); } else { - obj.position_ids = []; + obj.position_ids = message.positionIds; } - obj.sender = message.sender; - obj.new_owner = message.newOwner; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.new_owner = message.newOwner === "" ? undefined : message.newOwner; return obj; }, fromAminoMsg(object: MsgTransferPositionsAminoMsg): MsgTransferPositions { diff --git a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/genesis.ts b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/genesis.ts index b87473e06e..b4af15f073 100644 --- a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/genesis.ts @@ -97,7 +97,7 @@ export const GenesisState = { if (message.pools) { obj.pools = message.pools.map(e => e ? PoolI_ToAmino((e as Any), useInterfaces) : undefined); } else { - obj.pools = []; + obj.pools = message.pools; } return obj; }, @@ -139,7 +139,7 @@ export const PoolI_InterfaceDecoder = (input: BinaryReader | Uint8Array): Pool1 return data; } }; -export const PoolI_FromAmino = (content: AnyAmino) => { +export const PoolI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "osmosis/concentratedliquidity/pool": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/gov.ts b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/gov.ts index 638c0887d9..dc009da8da 100644 --- a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/gov.ts +++ b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/gov.ts @@ -261,8 +261,8 @@ export const UploadCosmWasmPoolCodeAndWhiteListProposal = { }, toAmino(message: UploadCosmWasmPoolCodeAndWhiteListProposal, useInterfaces: boolean = false): UploadCosmWasmPoolCodeAndWhiteListProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; return obj; }, @@ -395,14 +395,14 @@ export const MigratePoolContractsProposal = { }, toAmino(message: MigratePoolContractsProposal, useInterfaces: boolean = false): MigratePoolContractsProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.poolIds) { obj.pool_ids = message.poolIds.map(e => e.toString()); } else { - obj.pool_ids = []; + obj.pool_ids = message.poolIds; } - obj.new_code_id = message.newCodeId ? message.newCodeId.toString() : undefined; + obj.new_code_id = message.newCodeId !== BigInt(0) ? message.newCodeId.toString() : undefined; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; obj.migrate_msg = message.migrateMsg ? base64FromBytes(message.migrateMsg) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/instantiate_msg.ts b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/instantiate_msg.ts index 3a6d498e60..7c9135168a 100644 --- a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/instantiate_msg.ts +++ b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/instantiate_msg.ts @@ -72,7 +72,7 @@ export const InstantiateMsg = { if (message.poolAssetDenoms) { obj.pool_asset_denoms = message.poolAssetDenoms.map(e => e); } else { - obj.pool_asset_denoms = []; + obj.pool_asset_denoms = message.poolAssetDenoms; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/module_query_msg.ts b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/module_query_msg.ts index 7b902ee0f9..27cb042e60 100644 --- a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/module_query_msg.ts +++ b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/module_query_msg.ts @@ -220,8 +220,8 @@ export const CalcOutAmtGivenIn = { toAmino(message: CalcOutAmtGivenIn, useInterfaces: boolean = false): CalcOutAmtGivenInAmino { const obj: any = {}; obj.token_in = message.tokenIn ? Coin.toAmino(message.tokenIn, useInterfaces) : undefined; - obj.token_out_denom = message.tokenOutDenom; - obj.swap_fee = message.swapFee; + obj.token_out_denom = message.tokenOutDenom === "" ? undefined : message.tokenOutDenom; + obj.swap_fee = message.swapFee === "" ? undefined : message.swapFee; return obj; }, fromAminoMsg(object: CalcOutAmtGivenInAminoMsg): CalcOutAmtGivenIn { @@ -451,8 +451,8 @@ export const CalcInAmtGivenOut = { toAmino(message: CalcInAmtGivenOut, useInterfaces: boolean = false): CalcInAmtGivenOutAmino { const obj: any = {}; obj.token_out = message.tokenOut ? Coin.toAmino(message.tokenOut, useInterfaces) : undefined; - obj.token_in_denom = message.tokenInDenom; - obj.swap_fee = message.swapFee; + obj.token_in_denom = message.tokenInDenom === "" ? undefined : message.tokenInDenom; + obj.swap_fee = message.swapFee === "" ? undefined : message.swapFee; return obj; }, fromAminoMsg(object: CalcInAmtGivenOutAminoMsg): CalcInAmtGivenOut { diff --git a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/module_sudo_msg.ts b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/module_sudo_msg.ts index 54cb78ec33..036d663ec6 100644 --- a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/module_sudo_msg.ts +++ b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/module_sudo_msg.ts @@ -269,11 +269,11 @@ export const SwapExactAmountIn = { }, toAmino(message: SwapExactAmountIn, useInterfaces: boolean = false): SwapExactAmountInAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.token_in = message.tokenIn ? Coin.toAmino(message.tokenIn, useInterfaces) : undefined; - obj.token_out_denom = message.tokenOutDenom; - obj.token_out_min_amount = message.tokenOutMinAmount; - obj.swap_fee = message.swapFee; + obj.token_out_denom = message.tokenOutDenom === "" ? undefined : message.tokenOutDenom; + obj.token_out_min_amount = message.tokenOutMinAmount === "" ? undefined : message.tokenOutMinAmount; + obj.swap_fee = message.swapFee === "" ? undefined : message.swapFee; return obj; }, fromAminoMsg(object: SwapExactAmountInAminoMsg): SwapExactAmountIn { @@ -411,7 +411,7 @@ export const SwapExactAmountInSudoMsgResponse = { }, toAmino(message: SwapExactAmountInSudoMsgResponse, useInterfaces: boolean = false): SwapExactAmountInSudoMsgResponseAmino { const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; + obj.token_out_amount = message.tokenOutAmount === "" ? undefined : message.tokenOutAmount; return obj; }, fromAminoMsg(object: SwapExactAmountInSudoMsgResponseAminoMsg): SwapExactAmountInSudoMsgResponse { @@ -524,11 +524,11 @@ export const SwapExactAmountOut = { }, toAmino(message: SwapExactAmountOut, useInterfaces: boolean = false): SwapExactAmountOutAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.token_out = message.tokenOut ? Coin.toAmino(message.tokenOut, useInterfaces) : undefined; - obj.token_in_denom = message.tokenInDenom; - obj.token_in_max_amount = message.tokenInMaxAmount; - obj.swap_fee = message.swapFee; + obj.token_in_denom = message.tokenInDenom === "" ? undefined : message.tokenInDenom; + obj.token_in_max_amount = message.tokenInMaxAmount === "" ? undefined : message.tokenInMaxAmount; + obj.swap_fee = message.swapFee === "" ? undefined : message.swapFee; return obj; }, fromAminoMsg(object: SwapExactAmountOutAminoMsg): SwapExactAmountOut { @@ -666,7 +666,7 @@ export const SwapExactAmountOutSudoMsgResponse = { }, toAmino(message: SwapExactAmountOutSudoMsgResponse, useInterfaces: boolean = false): SwapExactAmountOutSudoMsgResponseAmino { const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; + obj.token_in_amount = message.tokenInAmount === "" ? undefined : message.tokenInAmount; return obj; }, fromAminoMsg(object: SwapExactAmountOutSudoMsgResponseAminoMsg): SwapExactAmountOutSudoMsgResponse { diff --git a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/pool.ts b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/pool.ts index 0fb7126989..4f9ce8fd13 100644 --- a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/pool.ts +++ b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/pool.ts @@ -106,9 +106,9 @@ export const CosmWasmPool = { }, toAmino(message: CosmWasmPool, useInterfaces: boolean = false): CosmWasmPoolAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.instantiate_msg = message.instantiateMsg ? base64FromBytes(message.instantiateMsg) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/pool_query_msg.ts b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/pool_query_msg.ts index 70aa5f9af5..ace92b2d23 100644 --- a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/pool_query_msg.ts +++ b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/pool_query_msg.ts @@ -337,7 +337,7 @@ export const GetSwapFeeQueryMsgResponse = { }, toAmino(message: GetSwapFeeQueryMsgResponse, useInterfaces: boolean = false): GetSwapFeeQueryMsgResponseAmino { const obj: any = {}; - obj.swap_fee = message.swapFee; + obj.swap_fee = message.swapFee === "" ? undefined : message.swapFee; return obj; }, fromAminoMsg(object: GetSwapFeeQueryMsgResponseAminoMsg): GetSwapFeeQueryMsgResponse { @@ -417,8 +417,8 @@ export const SpotPrice = { }, toAmino(message: SpotPrice, useInterfaces: boolean = false): SpotPriceAmino { const obj: any = {}; - obj.quote_asset_denom = message.quoteAssetDenom; - obj.base_asset_denom = message.baseAssetDenom; + obj.quote_asset_denom = message.quoteAssetDenom === "" ? undefined : message.quoteAssetDenom; + obj.base_asset_denom = message.baseAssetDenom === "" ? undefined : message.baseAssetDenom; return obj; }, fromAminoMsg(object: SpotPriceAminoMsg): SpotPrice { @@ -556,7 +556,7 @@ export const SpotPriceQueryMsgResponse = { }, toAmino(message: SpotPriceQueryMsgResponse, useInterfaces: boolean = false): SpotPriceQueryMsgResponseAmino { const obj: any = {}; - obj.spot_price = message.spotPrice; + obj.spot_price = message.spotPrice === "" ? undefined : message.spotPrice; return obj; }, fromAminoMsg(object: SpotPriceQueryMsgResponseAminoMsg): SpotPriceQueryMsgResponse { @@ -751,7 +751,7 @@ export const GetTotalPoolLiquidityQueryMsgResponse = { if (message.totalPoolLiquidity) { obj.total_pool_liquidity = message.totalPoolLiquidity.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_pool_liquidity = []; + obj.total_pool_liquidity = message.totalPoolLiquidity; } return obj; }, @@ -890,7 +890,7 @@ export const GetTotalSharesQueryMsgResponse = { }, toAmino(message: GetTotalSharesQueryMsgResponse, useInterfaces: boolean = false): GetTotalSharesQueryMsgResponseAmino { const obj: any = {}; - obj.total_shares = message.totalShares; + obj.total_shares = message.totalShares === "" ? undefined : message.totalShares; return obj; }, fromAminoMsg(object: GetTotalSharesQueryMsgResponseAminoMsg): GetTotalSharesQueryMsgResponse { diff --git a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/tx.ts b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/tx.ts index 169e088475..de8ef8dde0 100644 --- a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/model/tx.ts @@ -113,9 +113,9 @@ export const MsgCreateCosmWasmPool = { }, toAmino(message: MsgCreateCosmWasmPool, useInterfaces: boolean = false): MsgCreateCosmWasmPoolAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.instantiate_msg = message.instantiateMsg ? base64FromBytes(message.instantiateMsg) : undefined; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgCreateCosmWasmPoolAminoMsg): MsgCreateCosmWasmPool { @@ -184,7 +184,7 @@ export const MsgCreateCosmWasmPoolResponse = { }, toAmino(message: MsgCreateCosmWasmPoolResponse, useInterfaces: boolean = false): MsgCreateCosmWasmPoolResponseAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCreateCosmWasmPoolResponseAminoMsg): MsgCreateCosmWasmPoolResponse { diff --git a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/params.ts b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/params.ts index cba67706bc..e72448f33e 100644 --- a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/params.ts @@ -104,9 +104,9 @@ export const Params = { if (message.codeIdWhitelist) { obj.code_id_whitelist = message.codeIdWhitelist.map(e => e.toString()); } else { - obj.code_id_whitelist = []; + obj.code_id_whitelist = message.codeIdWhitelist; } - obj.pool_migration_limit = message.poolMigrationLimit ? message.poolMigrationLimit.toString() : undefined; + obj.pool_migration_limit = message.poolMigrationLimit !== BigInt(0) ? message.poolMigrationLimit.toString() : undefined; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/query.ts b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/query.ts index f46276d899..b222d276df 100644 --- a/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/osmosis/cosmwasmpool/v1beta1/query.ts @@ -393,7 +393,7 @@ export const PoolsResponse = { if (message.pools) { obj.pools = message.pools.map(e => e ? PoolI_ToAmino((e as Any), useInterfaces) : undefined); } else { - obj.pools = []; + obj.pools = message.pools; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -464,7 +464,7 @@ export const ContractInfoByPoolIdRequest = { }, toAmino(message: ContractInfoByPoolIdRequest, useInterfaces: boolean = false): ContractInfoByPoolIdRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: ContractInfoByPoolIdRequestAminoMsg): ContractInfoByPoolIdRequest { @@ -544,8 +544,8 @@ export const ContractInfoByPoolIdResponse = { }, toAmino(message: ContractInfoByPoolIdResponse, useInterfaces: boolean = false): ContractInfoByPoolIdResponseAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; return obj; }, fromAminoMsg(object: ContractInfoByPoolIdResponseAminoMsg): ContractInfoByPoolIdResponse { @@ -586,7 +586,7 @@ export const PoolI_InterfaceDecoder = (input: BinaryReader | Uint8Array): Pool1 return data; } }; -export const PoolI_FromAmino = (content: AnyAmino) => { +export const PoolI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "osmosis/concentratedliquidity/pool": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/osmosis/gamm/pool-models/balancer/balancerPool.ts b/packages/types/protobuf/codegen/osmosis/gamm/pool-models/balancer/balancerPool.ts index 1f31de5ee5..812980976f 100644 --- a/packages/types/protobuf/codegen/osmosis/gamm/pool-models/balancer/balancerPool.ts +++ b/packages/types/protobuf/codegen/osmosis/gamm/pool-models/balancer/balancerPool.ts @@ -355,12 +355,12 @@ export const SmoothWeightChangeParams = { if (message.initialPoolWeights) { obj.initial_pool_weights = message.initialPoolWeights.map(e => e ? PoolAsset.toAmino(e, useInterfaces) : undefined); } else { - obj.initial_pool_weights = []; + obj.initial_pool_weights = message.initialPoolWeights; } if (message.targetPoolWeights) { obj.target_pool_weights = message.targetPoolWeights.map(e => e ? PoolAsset.toAmino(e, useInterfaces) : undefined); } else { - obj.target_pool_weights = []; + obj.target_pool_weights = message.targetPoolWeights; } return obj; }, @@ -452,8 +452,8 @@ export const PoolParams = { }, toAmino(message: PoolParams, useInterfaces: boolean = false): PoolParamsAmino { const obj: any = {}; - obj.swap_fee = message.swapFee; - obj.exit_fee = message.exitFee; + obj.swap_fee = message.swapFee === "" ? undefined : message.swapFee; + obj.exit_fee = message.exitFee === "" ? undefined : message.exitFee; obj.smooth_weight_change_params = message.smoothWeightChangeParams ? SmoothWeightChangeParams.toAmino(message.smoothWeightChangeParams, useInterfaces) : undefined; return obj; }, @@ -535,7 +535,7 @@ export const PoolAsset = { toAmino(message: PoolAsset, useInterfaces: boolean = false): PoolAssetAmino { const obj: any = {}; obj.token = message.token ? Coin.toAmino(message.token, useInterfaces) : undefined; - obj.weight = message.weight; + obj.weight = message.weight === "" ? undefined : message.weight; return obj; }, fromAminoMsg(object: PoolAssetAminoMsg): PoolAsset { @@ -669,17 +669,17 @@ export const Pool = { }, toAmino(message: Pool, useInterfaces: boolean = false): PoolAmino { const obj: any = {}; - obj.address = message.address; - obj.id = message.id ? message.id.toString() : undefined; + obj.address = message.address === "" ? undefined : message.address; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; obj.pool_params = message.poolParams ? PoolParams.toAmino(message.poolParams, useInterfaces) : undefined; - obj.future_pool_governor = message.futurePoolGovernor; + obj.future_pool_governor = message.futurePoolGovernor === "" ? undefined : message.futurePoolGovernor; obj.total_shares = message.totalShares ? Coin.toAmino(message.totalShares, useInterfaces) : undefined; if (message.poolAssets) { obj.pool_assets = message.poolAssets.map(e => e ? PoolAsset.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_assets = []; + obj.pool_assets = message.poolAssets; } - obj.total_weight = message.totalWeight; + obj.total_weight = message.totalWeight === "" ? undefined : message.totalWeight; return obj; }, fromAminoMsg(object: PoolAminoMsg): Pool { diff --git a/packages/types/protobuf/codegen/osmosis/gamm/pool-models/balancer/tx/tx.ts b/packages/types/protobuf/codegen/osmosis/gamm/pool-models/balancer/tx/tx.ts index 991f81c603..a245bdbeb6 100644 --- a/packages/types/protobuf/codegen/osmosis/gamm/pool-models/balancer/tx/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/gamm/pool-models/balancer/tx/tx.ts @@ -125,14 +125,14 @@ export const MsgCreateBalancerPool = { }, toAmino(message: MsgCreateBalancerPool, useInterfaces: boolean = false): MsgCreateBalancerPoolAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.pool_params = message.poolParams ? PoolParams.toAmino(message.poolParams, useInterfaces) : undefined; if (message.poolAssets) { obj.pool_assets = message.poolAssets.map(e => e ? PoolAsset.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_assets = []; + obj.pool_assets = message.poolAssets; } - obj.future_pool_governor = message.futurePoolGovernor; + obj.future_pool_governor = message.futurePoolGovernor === "" ? undefined : message.futurePoolGovernor; return obj; }, fromAminoMsg(object: MsgCreateBalancerPoolAminoMsg): MsgCreateBalancerPool { @@ -201,7 +201,7 @@ export const MsgCreateBalancerPoolResponse = { }, toAmino(message: MsgCreateBalancerPoolResponse, useInterfaces: boolean = false): MsgCreateBalancerPoolResponseAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCreateBalancerPoolResponseAminoMsg): MsgCreateBalancerPoolResponse { diff --git a/packages/types/protobuf/codegen/osmosis/gamm/pool-models/stableswap/stableswap_pool.ts b/packages/types/protobuf/codegen/osmosis/gamm/pool-models/stableswap/stableswap_pool.ts index e9b7f7341c..d7c0e9b5c8 100644 --- a/packages/types/protobuf/codegen/osmosis/gamm/pool-models/stableswap/stableswap_pool.ts +++ b/packages/types/protobuf/codegen/osmosis/gamm/pool-models/stableswap/stableswap_pool.ts @@ -175,8 +175,8 @@ export const PoolParams = { }, toAmino(message: PoolParams, useInterfaces: boolean = false): PoolParamsAmino { const obj: any = {}; - obj.swap_fee = message.swapFee; - obj.exit_fee = message.exitFee; + obj.swap_fee = message.swapFee === "" ? undefined : message.swapFee; + obj.exit_fee = message.exitFee === "" ? undefined : message.exitFee; return obj; }, fromAminoMsg(object: PoolParamsAminoMsg): PoolParams { @@ -328,22 +328,22 @@ export const Pool = { }, toAmino(message: Pool, useInterfaces: boolean = false): PoolAmino { const obj: any = {}; - obj.address = message.address; - obj.id = message.id ? message.id.toString() : undefined; + obj.address = message.address === "" ? undefined : message.address; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; obj.pool_params = message.poolParams ? PoolParams.toAmino(message.poolParams, useInterfaces) : undefined; - obj.future_pool_governor = message.futurePoolGovernor; + obj.future_pool_governor = message.futurePoolGovernor === "" ? undefined : message.futurePoolGovernor; obj.total_shares = message.totalShares ? Coin.toAmino(message.totalShares, useInterfaces) : undefined; if (message.poolLiquidity) { obj.pool_liquidity = message.poolLiquidity.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_liquidity = []; + obj.pool_liquidity = message.poolLiquidity; } if (message.scalingFactors) { obj.scaling_factors = message.scalingFactors.map(e => e.toString()); } else { - obj.scaling_factors = []; + obj.scaling_factors = message.scalingFactors; } - obj.scaling_factor_controller = message.scalingFactorController; + obj.scaling_factor_controller = message.scalingFactorController === "" ? undefined : message.scalingFactorController; return obj; }, fromAminoMsg(object: PoolAminoMsg): Pool { diff --git a/packages/types/protobuf/codegen/osmosis/gamm/pool-models/stableswap/tx.ts b/packages/types/protobuf/codegen/osmosis/gamm/pool-models/stableswap/tx.ts index 46b6ac1d44..46494db766 100644 --- a/packages/types/protobuf/codegen/osmosis/gamm/pool-models/stableswap/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/gamm/pool-models/stableswap/tx.ts @@ -207,20 +207,20 @@ export const MsgCreateStableswapPool = { }, toAmino(message: MsgCreateStableswapPool, useInterfaces: boolean = false): MsgCreateStableswapPoolAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.pool_params = message.poolParams ? PoolParams.toAmino(message.poolParams, useInterfaces) : undefined; if (message.initialPoolLiquidity) { obj.initial_pool_liquidity = message.initialPoolLiquidity.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.initial_pool_liquidity = []; + obj.initial_pool_liquidity = message.initialPoolLiquidity; } if (message.scalingFactors) { obj.scaling_factors = message.scalingFactors.map(e => e.toString()); } else { - obj.scaling_factors = []; + obj.scaling_factors = message.scalingFactors; } - obj.future_pool_governor = message.futurePoolGovernor; - obj.scaling_factor_controller = message.scalingFactorController; + obj.future_pool_governor = message.futurePoolGovernor === "" ? undefined : message.futurePoolGovernor; + obj.scaling_factor_controller = message.scalingFactorController === "" ? undefined : message.scalingFactorController; return obj; }, fromAminoMsg(object: MsgCreateStableswapPoolAminoMsg): MsgCreateStableswapPool { @@ -289,7 +289,7 @@ export const MsgCreateStableswapPoolResponse = { }, toAmino(message: MsgCreateStableswapPoolResponse, useInterfaces: boolean = false): MsgCreateStableswapPoolResponseAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCreateStableswapPoolResponseAminoMsg): MsgCreateStableswapPoolResponse { @@ -387,12 +387,12 @@ export const MsgStableSwapAdjustScalingFactors = { }, toAmino(message: MsgStableSwapAdjustScalingFactors, useInterfaces: boolean = false): MsgStableSwapAdjustScalingFactorsAmino { const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; if (message.scalingFactors) { obj.scaling_factors = message.scalingFactors.map(e => e.toString()); } else { - obj.scaling_factors = []; + obj.scaling_factors = message.scalingFactors; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/genesis.ts b/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/genesis.ts index e709834e3f..0e0e7443a0 100644 --- a/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/genesis.ts @@ -112,7 +112,7 @@ export const Params = { if (message.poolCreationFee) { obj.pool_creation_fee = message.poolCreationFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_creation_fee = []; + obj.pool_creation_fee = message.poolCreationFee; } return obj; }, @@ -216,9 +216,9 @@ export const GenesisState = { if (message.pools) { obj.pools = message.pools.map(e => e ? PoolI_ToAmino((e as Any), useInterfaces) : undefined); } else { - obj.pools = []; + obj.pools = message.pools; } - obj.next_pool_number = message.nextPoolNumber ? message.nextPoolNumber.toString() : undefined; + obj.next_pool_number = message.nextPoolNumber !== BigInt(0) ? message.nextPoolNumber.toString() : undefined; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; obj.migration_records = message.migrationRecords ? MigrationRecords.toAmino(message.migrationRecords, useInterfaces) : undefined; return obj; @@ -261,7 +261,7 @@ export const PoolI_InterfaceDecoder = (input: BinaryReader | Uint8Array): Pool1 return data; } }; -export const PoolI_FromAmino = (content: AnyAmino) => { +export const PoolI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "osmosis/concentratedliquidity/pool": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/gov.ts b/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/gov.ts index ec6f91b731..a98278b570 100644 --- a/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/gov.ts +++ b/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/gov.ts @@ -277,12 +277,12 @@ export const ReplaceMigrationRecordsProposal = { }, toAmino(message: ReplaceMigrationRecordsProposal, useInterfaces: boolean = false): ReplaceMigrationRecordsProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.records) { obj.records = message.records.map(e => e ? BalancerToConcentratedPoolLink.toAmino(e, useInterfaces) : undefined); } else { - obj.records = []; + obj.records = message.records; } return obj; }, @@ -373,12 +373,12 @@ export const UpdateMigrationRecordsProposal = { }, toAmino(message: UpdateMigrationRecordsProposal, useInterfaces: boolean = false): UpdateMigrationRecordsProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.records) { obj.records = message.records.map(e => e ? BalancerToConcentratedPoolLink.toAmino(e, useInterfaces) : undefined); } else { - obj.records = []; + obj.records = message.records; } return obj; }, @@ -503,12 +503,12 @@ export const PoolRecordWithCFMMLink = { }, toAmino(message: PoolRecordWithCFMMLink, useInterfaces: boolean = false): PoolRecordWithCFMMLinkAmino { const obj: any = {}; - obj.denom0 = message.denom0; - obj.denom1 = message.denom1; - obj.tick_spacing = message.tickSpacing ? message.tickSpacing.toString() : undefined; - obj.exponent_at_price_one = message.exponentAtPriceOne; - obj.spread_factor = message.spreadFactor; - obj.balancer_pool_id = message.balancerPoolId ? message.balancerPoolId.toString() : undefined; + obj.denom0 = message.denom0 === "" ? undefined : message.denom0; + obj.denom1 = message.denom1 === "" ? undefined : message.denom1; + obj.tick_spacing = message.tickSpacing !== BigInt(0) ? message.tickSpacing.toString() : undefined; + obj.exponent_at_price_one = message.exponentAtPriceOne === "" ? undefined : message.exponentAtPriceOne; + obj.spread_factor = message.spreadFactor === "" ? undefined : message.spreadFactor; + obj.balancer_pool_id = message.balancerPoolId !== BigInt(0) ? message.balancerPoolId.toString() : undefined; return obj; }, fromAminoMsg(object: PoolRecordWithCFMMLinkAminoMsg): PoolRecordWithCFMMLink { @@ -598,12 +598,12 @@ export const CreateConcentratedLiquidityPoolsAndLinktoCFMMProposal = { }, toAmino(message: CreateConcentratedLiquidityPoolsAndLinktoCFMMProposal, useInterfaces: boolean = false): CreateConcentratedLiquidityPoolsAndLinktoCFMMProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.poolRecordsWithCfmmLink) { obj.pool_records_with_cfmm_link = message.poolRecordsWithCfmmLink.map(e => e ? PoolRecordWithCFMMLink.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_records_with_cfmm_link = []; + obj.pool_records_with_cfmm_link = message.poolRecordsWithCfmmLink; } return obj; }, @@ -707,10 +707,10 @@ export const SetScalingFactorControllerProposal = { }, toAmino(message: SetScalingFactorControllerProposal, useInterfaces: boolean = false): SetScalingFactorControllerProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.controller_address = message.controllerAddress; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.controller_address = message.controllerAddress === "" ? undefined : message.controllerAddress; return obj; }, fromAminoMsg(object: SetScalingFactorControllerProposalAminoMsg): SetScalingFactorControllerProposal { diff --git a/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/query.ts b/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/query.ts index 08f3030720..b9bdb2dc4a 100644 --- a/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/query.ts @@ -821,7 +821,7 @@ export const QueryPoolRequest = { }, toAmino(message: QueryPoolRequest, useInterfaces: boolean = false): QueryPoolRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryPoolRequestAminoMsg): QueryPoolRequest { @@ -1040,7 +1040,7 @@ export const QueryPoolsResponse = { if (message.pools) { obj.pools = message.pools.map(e => e ? PoolI_ToAmino((e as Any), useInterfaces) : undefined); } else { - obj.pools = []; + obj.pools = message.pools; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1167,7 +1167,7 @@ export const QueryNumPoolsResponse = { }, toAmino(message: QueryNumPoolsResponse, useInterfaces: boolean = false): QueryNumPoolsResponseAmino { const obj: any = {}; - obj.num_pools = message.numPools ? message.numPools.toString() : undefined; + obj.num_pools = message.numPools !== BigInt(0) ? message.numPools.toString() : undefined; return obj; }, fromAminoMsg(object: QueryNumPoolsResponseAminoMsg): QueryNumPoolsResponse { @@ -1236,7 +1236,7 @@ export const QueryPoolTypeRequest = { }, toAmino(message: QueryPoolTypeRequest, useInterfaces: boolean = false): QueryPoolTypeRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryPoolTypeRequestAminoMsg): QueryPoolTypeRequest { @@ -1305,7 +1305,7 @@ export const QueryPoolTypeResponse = { }, toAmino(message: QueryPoolTypeResponse, useInterfaces: boolean = false): QueryPoolTypeResponseAmino { const obj: any = {}; - obj.pool_type = message.poolType; + obj.pool_type = message.poolType === "" ? undefined : message.poolType; return obj; }, fromAminoMsg(object: QueryPoolTypeResponseAminoMsg): QueryPoolTypeResponse { @@ -1383,11 +1383,11 @@ export const QueryCalcJoinPoolSharesRequest = { }, toAmino(message: QueryCalcJoinPoolSharesRequest, useInterfaces: boolean = false): QueryCalcJoinPoolSharesRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; if (message.tokensIn) { obj.tokens_in = message.tokensIn.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.tokens_in = []; + obj.tokens_in = message.tokensIn; } return obj; }, @@ -1466,11 +1466,11 @@ export const QueryCalcJoinPoolSharesResponse = { }, toAmino(message: QueryCalcJoinPoolSharesResponse, useInterfaces: boolean = false): QueryCalcJoinPoolSharesResponseAmino { const obj: any = {}; - obj.share_out_amount = message.shareOutAmount; + obj.share_out_amount = message.shareOutAmount === "" ? undefined : message.shareOutAmount; if (message.tokensOut) { obj.tokens_out = message.tokensOut.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.tokens_out = []; + obj.tokens_out = message.tokensOut; } return obj; }, @@ -1551,8 +1551,8 @@ export const QueryCalcExitPoolCoinsFromSharesRequest = { }, toAmino(message: QueryCalcExitPoolCoinsFromSharesRequest, useInterfaces: boolean = false): QueryCalcExitPoolCoinsFromSharesRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.share_in_amount = message.shareInAmount; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.share_in_amount = message.shareInAmount === "" ? undefined : message.shareInAmount; return obj; }, fromAminoMsg(object: QueryCalcExitPoolCoinsFromSharesRequestAminoMsg): QueryCalcExitPoolCoinsFromSharesRequest { @@ -1622,7 +1622,7 @@ export const QueryCalcExitPoolCoinsFromSharesResponse = { if (message.tokensOut) { obj.tokens_out = message.tokensOut.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.tokens_out = []; + obj.tokens_out = message.tokensOut; } return obj; }, @@ -1692,7 +1692,7 @@ export const QueryPoolParamsRequest = { }, toAmino(message: QueryPoolParamsRequest, useInterfaces: boolean = false): QueryPoolParamsRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryPoolParamsRequestAminoMsg): QueryPoolParamsRequest { @@ -1830,7 +1830,7 @@ export const QueryTotalPoolLiquidityRequest = { }, toAmino(message: QueryTotalPoolLiquidityRequest, useInterfaces: boolean = false): QueryTotalPoolLiquidityRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryTotalPoolLiquidityRequestAminoMsg): QueryTotalPoolLiquidityRequest { @@ -1900,7 +1900,7 @@ export const QueryTotalPoolLiquidityResponse = { if (message.liquidity) { obj.liquidity = message.liquidity.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.liquidity = []; + obj.liquidity = message.liquidity; } return obj; }, @@ -1970,7 +1970,7 @@ export const QueryTotalSharesRequest = { }, toAmino(message: QueryTotalSharesRequest, useInterfaces: boolean = false): QueryTotalSharesRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryTotalSharesRequestAminoMsg): QueryTotalSharesRequest { @@ -2117,11 +2117,11 @@ export const QueryCalcJoinPoolNoSwapSharesRequest = { }, toAmino(message: QueryCalcJoinPoolNoSwapSharesRequest, useInterfaces: boolean = false): QueryCalcJoinPoolNoSwapSharesRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; if (message.tokensIn) { obj.tokens_in = message.tokensIn.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.tokens_in = []; + obj.tokens_in = message.tokensIn; } return obj; }, @@ -2203,9 +2203,9 @@ export const QueryCalcJoinPoolNoSwapSharesResponse = { if (message.tokensOut) { obj.tokens_out = message.tokensOut.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.tokens_out = []; + obj.tokens_out = message.tokensOut; } - obj.shares_out = message.sharesOut; + obj.shares_out = message.sharesOut === "" ? undefined : message.sharesOut; return obj; }, fromAminoMsg(object: QueryCalcJoinPoolNoSwapSharesResponseAminoMsg): QueryCalcJoinPoolNoSwapSharesResponse { @@ -2296,9 +2296,9 @@ export const QuerySpotPriceRequest = { }, toAmino(message: QuerySpotPriceRequest, useInterfaces: boolean = false): QuerySpotPriceRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.base_asset_denom = message.baseAssetDenom; - obj.quote_asset_denom = message.quoteAssetDenom; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.base_asset_denom = message.baseAssetDenom === "" ? undefined : message.baseAssetDenom; + obj.quote_asset_denom = message.quoteAssetDenom === "" ? undefined : message.quoteAssetDenom; return obj; }, fromAminoMsg(object: QuerySpotPriceRequestAminoMsg): QuerySpotPriceRequest { @@ -2389,8 +2389,8 @@ export const QueryPoolsWithFilterRequest = { }, toAmino(message: QueryPoolsWithFilterRequest, useInterfaces: boolean = false): QueryPoolsWithFilterRequestAmino { const obj: any = {}; - obj.min_liquidity = message.minLiquidity; - obj.pool_type = message.poolType; + obj.min_liquidity = message.minLiquidity === "" ? undefined : message.minLiquidity; + obj.pool_type = message.poolType === "" ? undefined : message.poolType; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -2472,7 +2472,7 @@ export const QueryPoolsWithFilterResponse = { if (message.pools) { obj.pools = message.pools.map(e => e ? PoolI_ToAmino((e as Any), useInterfaces) : undefined); } else { - obj.pools = []; + obj.pools = message.pools; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -2543,7 +2543,7 @@ export const QuerySpotPriceResponse = { }, toAmino(message: QuerySpotPriceResponse, useInterfaces: boolean = false): QuerySpotPriceResponseAmino { const obj: any = {}; - obj.spot_price = message.spotPrice; + obj.spot_price = message.spotPrice === "" ? undefined : message.spotPrice; return obj; }, fromAminoMsg(object: QuerySpotPriceResponseAminoMsg): QuerySpotPriceResponse { @@ -2643,13 +2643,13 @@ export const QuerySwapExactAmountInRequest = { }, toAmino(message: QuerySwapExactAmountInRequest, useInterfaces: boolean = false): QuerySwapExactAmountInRequestAmino { const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in = message.tokenIn; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; if (message.routes) { obj.routes = message.routes.map(e => e ? SwapAmountInRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } return obj; }, @@ -2719,7 +2719,7 @@ export const QuerySwapExactAmountInResponse = { }, toAmino(message: QuerySwapExactAmountInResponse, useInterfaces: boolean = false): QuerySwapExactAmountInResponseAmino { const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; + obj.token_out_amount = message.tokenOutAmount === "" ? undefined : message.tokenOutAmount; return obj; }, fromAminoMsg(object: QuerySwapExactAmountInResponseAminoMsg): QuerySwapExactAmountInResponse { @@ -2819,14 +2819,14 @@ export const QuerySwapExactAmountOutRequest = { }, toAmino(message: QuerySwapExactAmountOutRequest, useInterfaces: boolean = false): QuerySwapExactAmountOutRequestAmino { const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; if (message.routes) { obj.routes = message.routes.map(e => e ? SwapAmountOutRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } - obj.token_out = message.tokenOut; + obj.token_out = message.tokenOut === "" ? undefined : message.tokenOut; return obj; }, fromAminoMsg(object: QuerySwapExactAmountOutRequestAminoMsg): QuerySwapExactAmountOutRequest { @@ -2895,7 +2895,7 @@ export const QuerySwapExactAmountOutResponse = { }, toAmino(message: QuerySwapExactAmountOutResponse, useInterfaces: boolean = false): QuerySwapExactAmountOutResponseAmino { const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; + obj.token_in_amount = message.tokenInAmount === "" ? undefined : message.tokenInAmount; return obj; }, fromAminoMsg(object: QuerySwapExactAmountOutResponseAminoMsg): QuerySwapExactAmountOutResponse { @@ -3021,7 +3021,7 @@ export const QueryTotalLiquidityResponse = { if (message.liquidity) { obj.liquidity = message.liquidity.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.liquidity = []; + obj.liquidity = message.liquidity; } return obj; }, @@ -3091,7 +3091,7 @@ export const QueryConcentratedPoolIdLinkFromCFMMRequest = { }, toAmino(message: QueryConcentratedPoolIdLinkFromCFMMRequest, useInterfaces: boolean = false): QueryConcentratedPoolIdLinkFromCFMMRequestAmino { const obj: any = {}; - obj.cfmm_pool_id = message.cfmmPoolId ? message.cfmmPoolId.toString() : undefined; + obj.cfmm_pool_id = message.cfmmPoolId !== BigInt(0) ? message.cfmmPoolId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryConcentratedPoolIdLinkFromCFMMRequestAminoMsg): QueryConcentratedPoolIdLinkFromCFMMRequest { @@ -3160,7 +3160,7 @@ export const QueryConcentratedPoolIdLinkFromCFMMResponse = { }, toAmino(message: QueryConcentratedPoolIdLinkFromCFMMResponse, useInterfaces: boolean = false): QueryConcentratedPoolIdLinkFromCFMMResponseAmino { const obj: any = {}; - obj.concentrated_pool_id = message.concentratedPoolId ? message.concentratedPoolId.toString() : undefined; + obj.concentrated_pool_id = message.concentratedPoolId !== BigInt(0) ? message.concentratedPoolId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryConcentratedPoolIdLinkFromCFMMResponseAminoMsg): QueryConcentratedPoolIdLinkFromCFMMResponse { @@ -3326,7 +3326,7 @@ export const PoolI_InterfaceDecoder = (input: BinaryReader | Uint8Array): Pool1 return data; } }; -export const PoolI_FromAmino = (content: AnyAmino) => { +export const PoolI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "osmosis/concentratedliquidity/pool": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/shared.ts b/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/shared.ts index 5cb33aca5d..d22a0fd27d 100644 --- a/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/shared.ts +++ b/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/shared.ts @@ -117,7 +117,7 @@ export const MigrationRecords = { if (message.balancerToConcentratedPoolLinks) { obj.balancer_to_concentrated_pool_links = message.balancerToConcentratedPoolLinks.map(e => e ? BalancerToConcentratedPoolLink.toAmino(e, useInterfaces) : undefined); } else { - obj.balancer_to_concentrated_pool_links = []; + obj.balancer_to_concentrated_pool_links = message.balancerToConcentratedPoolLinks; } return obj; }, @@ -198,8 +198,8 @@ export const BalancerToConcentratedPoolLink = { }, toAmino(message: BalancerToConcentratedPoolLink, useInterfaces: boolean = false): BalancerToConcentratedPoolLinkAmino { const obj: any = {}; - obj.balancer_pool_id = message.balancerPoolId ? message.balancerPoolId.toString() : undefined; - obj.cl_pool_id = message.clPoolId ? message.clPoolId.toString() : undefined; + obj.balancer_pool_id = message.balancerPoolId !== BigInt(0) ? message.balancerPoolId.toString() : undefined; + obj.cl_pool_id = message.clPoolId !== BigInt(0) ? message.clPoolId.toString() : undefined; return obj; }, fromAminoMsg(object: BalancerToConcentratedPoolLinkAminoMsg): BalancerToConcentratedPoolLink { diff --git a/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/tx.ts b/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/tx.ts index a3ccc65096..1fd7c3899b 100644 --- a/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/gamm/v1beta1/tx.ts @@ -469,13 +469,13 @@ export const MsgJoinPool = { }, toAmino(message: MsgJoinPool, useInterfaces: boolean = false): MsgJoinPoolAmino { const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.share_out_amount = message.shareOutAmount; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.share_out_amount = message.shareOutAmount === "" ? undefined : message.shareOutAmount; if (message.tokenInMaxs) { obj.token_in_maxs = message.tokenInMaxs.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.token_in_maxs = []; + obj.token_in_maxs = message.tokenInMaxs; } return obj; }, @@ -554,11 +554,11 @@ export const MsgJoinPoolResponse = { }, toAmino(message: MsgJoinPoolResponse, useInterfaces: boolean = false): MsgJoinPoolResponseAmino { const obj: any = {}; - obj.share_out_amount = message.shareOutAmount; + obj.share_out_amount = message.shareOutAmount === "" ? undefined : message.shareOutAmount; if (message.tokenIn) { obj.token_in = message.tokenIn.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.token_in = []; + obj.token_in = message.tokenIn; } return obj; }, @@ -659,13 +659,13 @@ export const MsgExitPool = { }, toAmino(message: MsgExitPool, useInterfaces: boolean = false): MsgExitPoolAmino { const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.share_in_amount = message.shareInAmount; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.share_in_amount = message.shareInAmount === "" ? undefined : message.shareInAmount; if (message.tokenOutMins) { obj.token_out_mins = message.tokenOutMins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.token_out_mins = []; + obj.token_out_mins = message.tokenOutMins; } return obj; }, @@ -736,7 +736,7 @@ export const MsgExitPoolResponse = { if (message.tokenOut) { obj.token_out = message.tokenOut.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.token_out = []; + obj.token_out = message.tokenOut; } return obj; }, @@ -837,14 +837,14 @@ export const MsgSwapExactAmountIn = { }, toAmino(message: MsgSwapExactAmountIn, useInterfaces: boolean = false): MsgSwapExactAmountInAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.routes) { obj.routes = message.routes.map(e => e ? SwapAmountInRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } obj.token_in = message.tokenIn ? Coin.toAmino(message.tokenIn, useInterfaces) : undefined; - obj.token_out_min_amount = message.tokenOutMinAmount; + obj.token_out_min_amount = message.tokenOutMinAmount === "" ? undefined : message.tokenOutMinAmount; return obj; }, fromAminoMsg(object: MsgSwapExactAmountInAminoMsg): MsgSwapExactAmountIn { @@ -913,7 +913,7 @@ export const MsgSwapExactAmountInResponse = { }, toAmino(message: MsgSwapExactAmountInResponse, useInterfaces: boolean = false): MsgSwapExactAmountInResponseAmino { const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; + obj.token_out_amount = message.tokenOutAmount === "" ? undefined : message.tokenOutAmount; return obj; }, fromAminoMsg(object: MsgSwapExactAmountInResponseAminoMsg): MsgSwapExactAmountInResponse { @@ -1013,13 +1013,13 @@ export const MsgSwapExactAmountOut = { }, toAmino(message: MsgSwapExactAmountOut, useInterfaces: boolean = false): MsgSwapExactAmountOutAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.routes) { obj.routes = message.routes.map(e => e ? SwapAmountOutRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } - obj.token_in_max_amount = message.tokenInMaxAmount; + obj.token_in_max_amount = message.tokenInMaxAmount === "" ? undefined : message.tokenInMaxAmount; obj.token_out = message.tokenOut ? Coin.toAmino(message.tokenOut, useInterfaces) : undefined; return obj; }, @@ -1089,7 +1089,7 @@ export const MsgSwapExactAmountOutResponse = { }, toAmino(message: MsgSwapExactAmountOutResponse, useInterfaces: boolean = false): MsgSwapExactAmountOutResponseAmino { const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; + obj.token_in_amount = message.tokenInAmount === "" ? undefined : message.tokenInAmount; return obj; }, fromAminoMsg(object: MsgSwapExactAmountOutResponseAminoMsg): MsgSwapExactAmountOutResponse { @@ -1191,10 +1191,10 @@ export const MsgJoinSwapExternAmountIn = { }, toAmino(message: MsgJoinSwapExternAmountIn, useInterfaces: boolean = false): MsgJoinSwapExternAmountInAmino { const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; obj.token_in = message.tokenIn ? Coin.toAmino(message.tokenIn, useInterfaces) : undefined; - obj.share_out_min_amount = message.shareOutMinAmount; + obj.share_out_min_amount = message.shareOutMinAmount === "" ? undefined : message.shareOutMinAmount; return obj; }, fromAminoMsg(object: MsgJoinSwapExternAmountInAminoMsg): MsgJoinSwapExternAmountIn { @@ -1263,7 +1263,7 @@ export const MsgJoinSwapExternAmountInResponse = { }, toAmino(message: MsgJoinSwapExternAmountInResponse, useInterfaces: boolean = false): MsgJoinSwapExternAmountInResponseAmino { const obj: any = {}; - obj.share_out_amount = message.shareOutAmount; + obj.share_out_amount = message.shareOutAmount === "" ? undefined : message.shareOutAmount; return obj; }, fromAminoMsg(object: MsgJoinSwapExternAmountInResponseAminoMsg): MsgJoinSwapExternAmountInResponse { @@ -1376,11 +1376,11 @@ export const MsgJoinSwapShareAmountOut = { }, toAmino(message: MsgJoinSwapShareAmountOut, useInterfaces: boolean = false): MsgJoinSwapShareAmountOutAmino { const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in_denom = message.tokenInDenom; - obj.share_out_amount = message.shareOutAmount; - obj.token_in_max_amount = message.tokenInMaxAmount; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_in_denom = message.tokenInDenom === "" ? undefined : message.tokenInDenom; + obj.share_out_amount = message.shareOutAmount === "" ? undefined : message.shareOutAmount; + obj.token_in_max_amount = message.tokenInMaxAmount === "" ? undefined : message.tokenInMaxAmount; return obj; }, fromAminoMsg(object: MsgJoinSwapShareAmountOutAminoMsg): MsgJoinSwapShareAmountOut { @@ -1449,7 +1449,7 @@ export const MsgJoinSwapShareAmountOutResponse = { }, toAmino(message: MsgJoinSwapShareAmountOutResponse, useInterfaces: boolean = false): MsgJoinSwapShareAmountOutResponseAmino { const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; + obj.token_in_amount = message.tokenInAmount === "" ? undefined : message.tokenInAmount; return obj; }, fromAminoMsg(object: MsgJoinSwapShareAmountOutResponseAminoMsg): MsgJoinSwapShareAmountOutResponse { @@ -1562,11 +1562,11 @@ export const MsgExitSwapShareAmountIn = { }, toAmino(message: MsgExitSwapShareAmountIn, useInterfaces: boolean = false): MsgExitSwapShareAmountInAmino { const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_out_denom = message.tokenOutDenom; - obj.share_in_amount = message.shareInAmount; - obj.token_out_min_amount = message.tokenOutMinAmount; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_out_denom = message.tokenOutDenom === "" ? undefined : message.tokenOutDenom; + obj.share_in_amount = message.shareInAmount === "" ? undefined : message.shareInAmount; + obj.token_out_min_amount = message.tokenOutMinAmount === "" ? undefined : message.tokenOutMinAmount; return obj; }, fromAminoMsg(object: MsgExitSwapShareAmountInAminoMsg): MsgExitSwapShareAmountIn { @@ -1635,7 +1635,7 @@ export const MsgExitSwapShareAmountInResponse = { }, toAmino(message: MsgExitSwapShareAmountInResponse, useInterfaces: boolean = false): MsgExitSwapShareAmountInResponseAmino { const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; + obj.token_out_amount = message.tokenOutAmount === "" ? undefined : message.tokenOutAmount; return obj; }, fromAminoMsg(object: MsgExitSwapShareAmountInResponseAminoMsg): MsgExitSwapShareAmountInResponse { @@ -1737,10 +1737,10 @@ export const MsgExitSwapExternAmountOut = { }, toAmino(message: MsgExitSwapExternAmountOut, useInterfaces: boolean = false): MsgExitSwapExternAmountOutAmino { const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; obj.token_out = message.tokenOut ? Coin.toAmino(message.tokenOut, useInterfaces) : undefined; - obj.share_in_max_amount = message.shareInMaxAmount; + obj.share_in_max_amount = message.shareInMaxAmount === "" ? undefined : message.shareInMaxAmount; return obj; }, fromAminoMsg(object: MsgExitSwapExternAmountOutAminoMsg): MsgExitSwapExternAmountOut { @@ -1809,7 +1809,7 @@ export const MsgExitSwapExternAmountOutResponse = { }, toAmino(message: MsgExitSwapExternAmountOutResponse, useInterfaces: boolean = false): MsgExitSwapExternAmountOutResponseAmino { const obj: any = {}; - obj.share_in_amount = message.shareInAmount; + obj.share_in_amount = message.shareInAmount === "" ? undefined : message.shareInAmount; return obj; }, fromAminoMsg(object: MsgExitSwapExternAmountOutResponseAminoMsg): MsgExitSwapExternAmountOutResponse { diff --git a/packages/types/protobuf/codegen/osmosis/incentives/gauge.ts b/packages/types/protobuf/codegen/osmosis/incentives/gauge.ts index c69a7b36df..34630bea2e 100644 --- a/packages/types/protobuf/codegen/osmosis/incentives/gauge.ts +++ b/packages/types/protobuf/codegen/osmosis/incentives/gauge.ts @@ -245,21 +245,21 @@ export const Gauge = { }, toAmino(message: Gauge, useInterfaces: boolean = false): GaugeAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.is_perpetual = message.isPerpetual; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.is_perpetual = message.isPerpetual === false ? undefined : message.isPerpetual; obj.distribute_to = message.distributeTo ? QueryCondition.toAmino(message.distributeTo, useInterfaces) : undefined; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } obj.start_time = message.startTime ? Timestamp.toAmino(toTimestamp(message.startTime)) : undefined; - obj.num_epochs_paid_over = message.numEpochsPaidOver ? message.numEpochsPaidOver.toString() : undefined; - obj.filled_epochs = message.filledEpochs ? message.filledEpochs.toString() : undefined; + obj.num_epochs_paid_over = message.numEpochsPaidOver !== BigInt(0) ? message.numEpochsPaidOver.toString() : undefined; + obj.filled_epochs = message.filledEpochs !== BigInt(0) ? message.filledEpochs.toString() : undefined; if (message.distributedCoins) { obj.distributed_coins = message.distributedCoins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.distributed_coins = []; + obj.distributed_coins = message.distributedCoins; } return obj; }, @@ -330,7 +330,7 @@ export const LockableDurationsInfo = { if (message.lockableDurations) { obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e, useInterfaces) : undefined); } else { - obj.lockable_durations = []; + obj.lockable_durations = message.lockableDurations; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/incentives/genesis.ts b/packages/types/protobuf/codegen/osmosis/incentives/genesis.ts index 45ef7c5de5..23203596c9 100644 --- a/packages/types/protobuf/codegen/osmosis/incentives/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/incentives/genesis.ts @@ -173,23 +173,23 @@ export const GenesisState = { if (message.gauges) { obj.gauges = message.gauges.map(e => e ? Gauge.toAmino(e, useInterfaces) : undefined); } else { - obj.gauges = []; + obj.gauges = message.gauges; } if (message.lockableDurations) { obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e, useInterfaces) : undefined); } else { - obj.lockable_durations = []; + obj.lockable_durations = message.lockableDurations; } - obj.last_gauge_id = message.lastGaugeId ? message.lastGaugeId.toString() : undefined; + obj.last_gauge_id = message.lastGaugeId !== BigInt(0) ? message.lastGaugeId.toString() : undefined; if (message.groupGauges) { obj.group_gauges = message.groupGauges.map(e => e ? Gauge.toAmino(e, useInterfaces) : undefined); } else { - obj.group_gauges = []; + obj.group_gauges = message.groupGauges; } if (message.groups) { obj.groups = message.groups.map(e => e ? Group.toAmino(e, useInterfaces) : undefined); } else { - obj.groups = []; + obj.groups = message.groups; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/incentives/gov.ts b/packages/types/protobuf/codegen/osmosis/incentives/gov.ts index befb3168c4..914571d3cb 100644 --- a/packages/types/protobuf/codegen/osmosis/incentives/gov.ts +++ b/packages/types/protobuf/codegen/osmosis/incentives/gov.ts @@ -106,12 +106,12 @@ export const CreateGroupsProposal = { }, toAmino(message: CreateGroupsProposal, useInterfaces: boolean = false): CreateGroupsProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.createGroups) { obj.create_groups = message.createGroups.map(e => e ? CreateGroup.toAmino(e, useInterfaces) : undefined); } else { - obj.create_groups = []; + obj.create_groups = message.createGroups; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/incentives/group.ts b/packages/types/protobuf/codegen/osmosis/incentives/group.ts index 7bf2d7353c..e823471a3e 100644 --- a/packages/types/protobuf/codegen/osmosis/incentives/group.ts +++ b/packages/types/protobuf/codegen/osmosis/incentives/group.ts @@ -160,10 +160,6 @@ export interface GroupSDKType { * It takes an array of pool IDs to split the incentives across. */ export interface CreateGroup { - /** - * CreateGroup is called via governance to create a new group. - * It takes an array of pool IDs to split the incentives across. - */ poolIds: bigint[]; } export interface CreateGroupProtoMsg { @@ -175,10 +171,6 @@ export interface CreateGroupProtoMsg { * It takes an array of pool IDs to split the incentives across. */ export interface CreateGroupAmino { - /** - * CreateGroup is called via governance to create a new group. - * It takes an array of pool IDs to split the incentives across. - */ pool_ids?: string[]; } export interface CreateGroupAminoMsg { @@ -277,11 +269,11 @@ export const InternalGaugeInfo = { }, toAmino(message: InternalGaugeInfo, useInterfaces: boolean = false): InternalGaugeInfoAmino { const obj: any = {}; - obj.total_weight = message.totalWeight; + obj.total_weight = message.totalWeight === "" ? undefined : message.totalWeight; if (message.gaugeRecords) { obj.gauge_records = message.gaugeRecords.map(e => e ? InternalGaugeRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.gauge_records = []; + obj.gauge_records = message.gaugeRecords; } return obj; }, @@ -373,9 +365,9 @@ export const InternalGaugeRecord = { }, toAmino(message: InternalGaugeRecord, useInterfaces: boolean = false): InternalGaugeRecordAmino { const obj: any = {}; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - obj.current_weight = message.currentWeight; - obj.cumulative_weight = message.cumulativeWeight; + obj.gauge_id = message.gaugeId !== BigInt(0) ? message.gaugeId.toString() : undefined; + obj.current_weight = message.currentWeight === "" ? undefined : message.currentWeight; + obj.cumulative_weight = message.cumulativeWeight === "" ? undefined : message.cumulativeWeight; return obj; }, fromAminoMsg(object: InternalGaugeRecordAminoMsg): InternalGaugeRecord { @@ -460,15 +452,15 @@ export const Group = { message.internalGaugeInfo = InternalGaugeInfo.fromAmino(object.internal_gauge_info); } if (object.splitting_policy !== undefined && object.splitting_policy !== null) { - message.splittingPolicy = splittingPolicyFromJSON(object.splitting_policy); + message.splittingPolicy = object.splitting_policy; } return message; }, toAmino(message: Group, useInterfaces: boolean = false): GroupAmino { const obj: any = {}; - obj.group_gauge_id = message.groupGaugeId ? message.groupGaugeId.toString() : undefined; + obj.group_gauge_id = message.groupGaugeId !== BigInt(0) ? message.groupGaugeId.toString() : undefined; obj.internal_gauge_info = message.internalGaugeInfo ? InternalGaugeInfo.toAmino(message.internalGaugeInfo, useInterfaces) : undefined; - obj.splitting_policy = message.splittingPolicy; + obj.splitting_policy = message.splittingPolicy === 0 ? undefined : message.splittingPolicy; return obj; }, fromAminoMsg(object: GroupAminoMsg): Group { @@ -547,7 +539,7 @@ export const CreateGroup = { if (message.poolIds) { obj.pool_ids = message.poolIds.map(e => e.toString()); } else { - obj.pool_ids = []; + obj.pool_ids = message.poolIds; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/incentives/params.ts b/packages/types/protobuf/codegen/osmosis/incentives/params.ts index 72add4d5c4..3306f89f3b 100644 --- a/packages/types/protobuf/codegen/osmosis/incentives/params.ts +++ b/packages/types/protobuf/codegen/osmosis/incentives/params.ts @@ -126,16 +126,16 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.distr_epoch_identifier = message.distrEpochIdentifier; + obj.distr_epoch_identifier = message.distrEpochIdentifier === "" ? undefined : message.distrEpochIdentifier; if (message.groupCreationFee) { obj.group_creation_fee = message.groupCreationFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.group_creation_fee = []; + obj.group_creation_fee = message.groupCreationFee; } if (message.unrestrictedCreatorWhitelist) { obj.unrestricted_creator_whitelist = message.unrestrictedCreatorWhitelist.map(e => e); } else { - obj.unrestricted_creator_whitelist = []; + obj.unrestricted_creator_whitelist = message.unrestrictedCreatorWhitelist; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/incentives/query.ts b/packages/types/protobuf/codegen/osmosis/incentives/query.ts index 514c750e8a..0da5063fa5 100644 --- a/packages/types/protobuf/codegen/osmosis/incentives/query.ts +++ b/packages/types/protobuf/codegen/osmosis/incentives/query.ts @@ -662,7 +662,7 @@ export const ModuleToDistributeCoinsResponse = { if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -732,7 +732,7 @@ export const GaugeByIDRequest = { }, toAmino(message: GaugeByIDRequest, useInterfaces: boolean = false): GaugeByIDRequestAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; return obj; }, fromAminoMsg(object: GaugeByIDRequestAminoMsg): GaugeByIDRequest { @@ -951,7 +951,7 @@ export const GaugesResponse = { if (message.data) { obj.data = message.data.map(e => e ? Gauge.toAmino(e, useInterfaces) : undefined); } else { - obj.data = []; + obj.data = message.data; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1103,7 +1103,7 @@ export const ActiveGaugesResponse = { if (message.data) { obj.data = message.data.map(e => e ? Gauge.toAmino(e, useInterfaces) : undefined); } else { - obj.data = []; + obj.data = message.data; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1185,7 +1185,7 @@ export const ActiveGaugesPerDenomRequest = { }, toAmino(message: ActiveGaugesPerDenomRequest, useInterfaces: boolean = false): ActiveGaugesPerDenomRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1267,7 +1267,7 @@ export const ActiveGaugesPerDenomResponse = { if (message.data) { obj.data = message.data.map(e => e ? Gauge.toAmino(e, useInterfaces) : undefined); } else { - obj.data = []; + obj.data = message.data; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1419,7 +1419,7 @@ export const UpcomingGaugesResponse = { if (message.data) { obj.data = message.data.map(e => e ? Gauge.toAmino(e, useInterfaces) : undefined); } else { - obj.data = []; + obj.data = message.data; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1501,7 +1501,7 @@ export const UpcomingGaugesPerDenomRequest = { }, toAmino(message: UpcomingGaugesPerDenomRequest, useInterfaces: boolean = false): UpcomingGaugesPerDenomRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1583,7 +1583,7 @@ export const UpcomingGaugesPerDenomResponse = { if (message.upcomingGauges) { obj.upcoming_gauges = message.upcomingGauges.map(e => e ? Gauge.toAmino(e, useInterfaces) : undefined); } else { - obj.upcoming_gauges = []; + obj.upcoming_gauges = message.upcomingGauges; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1683,13 +1683,13 @@ export const RewardsEstRequest = { }, toAmino(message: RewardsEstRequest, useInterfaces: boolean = false): RewardsEstRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; if (message.lockIds) { obj.lock_ids = message.lockIds.map(e => e.toString()); } else { - obj.lock_ids = []; + obj.lock_ids = message.lockIds; } - obj.end_epoch = message.endEpoch ? message.endEpoch.toString() : undefined; + obj.end_epoch = message.endEpoch !== BigInt(0) ? message.endEpoch.toString() : undefined; return obj; }, fromAminoMsg(object: RewardsEstRequestAminoMsg): RewardsEstRequest { @@ -1759,7 +1759,7 @@ export const RewardsEstResponse = { if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -1886,7 +1886,7 @@ export const QueryLockableDurationsResponse = { if (message.lockableDurations) { obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e, useInterfaces) : undefined); } else { - obj.lockable_durations = []; + obj.lockable_durations = message.lockableDurations; } return obj; }, @@ -2013,7 +2013,7 @@ export const QueryAllGroupsResponse = { if (message.groups) { obj.groups = message.groups.map(e => e ? Group.toAmino(e, useInterfaces) : undefined); } else { - obj.groups = []; + obj.groups = message.groups; } return obj; }, @@ -2140,7 +2140,7 @@ export const QueryAllGroupsGaugesResponse = { if (message.gauges) { obj.gauges = message.gauges.map(e => e ? Gauge.toAmino(e, useInterfaces) : undefined); } else { - obj.gauges = []; + obj.gauges = message.gauges; } return obj; }, @@ -2267,7 +2267,7 @@ export const QueryAllGroupsWithGaugeResponse = { if (message.groupsWithGauge) { obj.groups_with_gauge = message.groupsWithGauge.map(e => e ? GroupsWithGauge.toAmino(e, useInterfaces) : undefined); } else { - obj.groups_with_gauge = []; + obj.groups_with_gauge = message.groupsWithGauge; } return obj; }, @@ -2337,7 +2337,7 @@ export const QueryGroupByGroupGaugeIDRequest = { }, toAmino(message: QueryGroupByGroupGaugeIDRequest, useInterfaces: boolean = false): QueryGroupByGroupGaugeIDRequestAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; return obj; }, fromAminoMsg(object: QueryGroupByGroupGaugeIDRequestAminoMsg): QueryGroupByGroupGaugeIDRequest { @@ -2475,7 +2475,7 @@ export const QueryCurrentWeightByGroupGaugeIDRequest = { }, toAmino(message: QueryCurrentWeightByGroupGaugeIDRequest, useInterfaces: boolean = false): QueryCurrentWeightByGroupGaugeIDRequestAmino { const obj: any = {}; - obj.group_gauge_id = message.groupGaugeId ? message.groupGaugeId.toString() : undefined; + obj.group_gauge_id = message.groupGaugeId !== BigInt(0) ? message.groupGaugeId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryCurrentWeightByGroupGaugeIDRequestAminoMsg): QueryCurrentWeightByGroupGaugeIDRequest { @@ -2545,7 +2545,7 @@ export const QueryCurrentWeightByGroupGaugeIDResponse = { if (message.gaugeWeight) { obj.gauge_weight = message.gaugeWeight.map(e => e ? GaugeWeight.toAmino(e, useInterfaces) : undefined); } else { - obj.gauge_weight = []; + obj.gauge_weight = message.gaugeWeight; } return obj; }, @@ -2626,8 +2626,8 @@ export const GaugeWeight = { }, toAmino(message: GaugeWeight, useInterfaces: boolean = false): GaugeWeightAmino { const obj: any = {}; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - obj.weight_ratio = message.weightRatio; + obj.gauge_id = message.gaugeId !== BigInt(0) ? message.gaugeId.toString() : undefined; + obj.weight_ratio = message.weightRatio === "" ? undefined : message.weightRatio; return obj; }, fromAminoMsg(object: GaugeWeightAminoMsg): GaugeWeight { diff --git a/packages/types/protobuf/codegen/osmosis/incentives/tx.ts b/packages/types/protobuf/codegen/osmosis/incentives/tx.ts index b647126482..b6e0c9f999 100644 --- a/packages/types/protobuf/codegen/osmosis/incentives/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/incentives/tx.ts @@ -320,17 +320,17 @@ export const MsgCreateGauge = { }, toAmino(message: MsgCreateGauge, useInterfaces: boolean = false): MsgCreateGaugeAmino { const obj: any = {}; - obj.is_perpetual = message.isPerpetual; - obj.owner = message.owner; + obj.is_perpetual = message.isPerpetual === false ? undefined : message.isPerpetual; + obj.owner = message.owner === "" ? undefined : message.owner; obj.distribute_to = message.distributeTo ? QueryCondition.toAmino(message.distributeTo, useInterfaces) : undefined; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } obj.start_time = message.startTime ? Timestamp.toAmino(toTimestamp(message.startTime)) : undefined; - obj.num_epochs_paid_over = message.numEpochsPaidOver ? message.numEpochsPaidOver.toString() : undefined; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.num_epochs_paid_over = message.numEpochsPaidOver !== BigInt(0) ? message.numEpochsPaidOver.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCreateGaugeAminoMsg): MsgCreateGauge { @@ -475,12 +475,12 @@ export const MsgAddToGauge = { }, toAmino(message: MsgAddToGauge, useInterfaces: boolean = false): MsgAddToGaugeAmino { const obj: any = {}; - obj.owner = message.owner; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.gauge_id = message.gaugeId !== BigInt(0) ? message.gaugeId.toString() : undefined; if (message.rewards) { obj.rewards = message.rewards.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.rewards = []; + obj.rewards = message.rewards; } return obj; }, @@ -647,14 +647,14 @@ export const MsgCreateGroup = { if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } - obj.num_epochs_paid_over = message.numEpochsPaidOver ? message.numEpochsPaidOver.toString() : undefined; - obj.owner = message.owner; + obj.num_epochs_paid_over = message.numEpochsPaidOver !== BigInt(0) ? message.numEpochsPaidOver.toString() : undefined; + obj.owner = message.owner === "" ? undefined : message.owner; if (message.poolIds) { obj.pool_ids = message.poolIds.map(e => e.toString()); } else { - obj.pool_ids = []; + obj.pool_ids = message.poolIds; } return obj; }, @@ -724,7 +724,7 @@ export const MsgCreateGroupResponse = { }, toAmino(message: MsgCreateGroupResponse, useInterfaces: boolean = false): MsgCreateGroupResponseAmino { const obj: any = {}; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; + obj.group_id = message.groupId !== BigInt(0) ? message.groupId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCreateGroupResponseAminoMsg): MsgCreateGroupResponse { diff --git a/packages/types/protobuf/codegen/osmosis/lockup/genesis.ts b/packages/types/protobuf/codegen/osmosis/lockup/genesis.ts index faec94dbe1..9718839b33 100644 --- a/packages/types/protobuf/codegen/osmosis/lockup/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/lockup/genesis.ts @@ -89,16 +89,16 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.last_lock_id = message.lastLockId ? message.lastLockId.toString() : undefined; + obj.last_lock_id = message.lastLockId !== BigInt(0) ? message.lastLockId.toString() : undefined; if (message.locks) { obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.locks = []; + obj.locks = message.locks; } if (message.syntheticLocks) { obj.synthetic_locks = message.syntheticLocks.map(e => e ? SyntheticLock.toAmino(e, useInterfaces) : undefined); } else { - obj.synthetic_locks = []; + obj.synthetic_locks = message.syntheticLocks; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/lockup/lock.ts b/packages/types/protobuf/codegen/osmosis/lockup/lock.ts index a8f8c17076..959d053722 100644 --- a/packages/types/protobuf/codegen/osmosis/lockup/lock.ts +++ b/packages/types/protobuf/codegen/osmosis/lockup/lock.ts @@ -58,7 +58,7 @@ export interface PeriodLock { * The ID of the lock is decided upon lock creation, incrementing by 1 for * every lock. */ - ID: bigint; + iD: bigint; /** * Owner is the account address of the lock owner. * Only the owner can modify the state of the lock. @@ -289,7 +289,7 @@ export interface SyntheticLockSDKType { } function createBasePeriodLock(): PeriodLock { return { - ID: BigInt(0), + iD: BigInt(0), owner: "", duration: Duration.fromPartial({}), endTime: new Date(), @@ -300,8 +300,8 @@ function createBasePeriodLock(): PeriodLock { export const PeriodLock = { typeUrl: "/osmosis.lockup.PeriodLock", encode(message: PeriodLock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.ID !== BigInt(0)) { - writer.uint32(8).uint64(message.ID); + if (message.iD !== BigInt(0)) { + writer.uint32(8).uint64(message.iD); } if (message.owner !== "") { writer.uint32(18).string(message.owner); @@ -328,7 +328,7 @@ export const PeriodLock = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.ID = reader.uint64(); + message.iD = reader.uint64(); break; case 2: message.owner = reader.string(); @@ -354,7 +354,7 @@ export const PeriodLock = { }, fromPartial(object: Partial): PeriodLock { const message = createBasePeriodLock(); - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); + message.iD = object.iD !== undefined && object.iD !== null ? BigInt(object.iD.toString()) : BigInt(0); message.owner = object.owner ?? ""; message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; message.endTime = object.endTime ?? undefined; @@ -365,7 +365,7 @@ export const PeriodLock = { fromAmino(object: PeriodLockAmino): PeriodLock { const message = createBasePeriodLock(); if (object.ID !== undefined && object.ID !== null) { - message.ID = BigInt(object.ID); + message.iD = BigInt(object.ID); } if (object.owner !== undefined && object.owner !== null) { message.owner = object.owner; @@ -384,16 +384,16 @@ export const PeriodLock = { }, toAmino(message: PeriodLock, useInterfaces: boolean = false): PeriodLockAmino { const obj: any = {}; - obj.ID = message.ID ? message.ID.toString() : undefined; - obj.owner = message.owner; + obj.ID = message.iD !== BigInt(0) ? message.iD.toString() : undefined; + obj.owner = message.owner === "" ? undefined : message.owner; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; obj.end_time = message.endTime ? Timestamp.toAmino(toTimestamp(message.endTime)) : undefined; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } - obj.reward_receiver_address = message.rewardReceiverAddress; + obj.reward_receiver_address = message.rewardReceiverAddress === "" ? undefined : message.rewardReceiverAddress; return obj; }, fromAminoMsg(object: PeriodLockAminoMsg): PeriodLock { @@ -480,7 +480,7 @@ export const QueryCondition = { fromAmino(object: QueryConditionAmino): QueryCondition { const message = createBaseQueryCondition(); if (object.lock_query_type !== undefined && object.lock_query_type !== null) { - message.lockQueryType = lockQueryTypeFromJSON(object.lock_query_type); + message.lockQueryType = object.lock_query_type; } if (object.denom !== undefined && object.denom !== null) { message.denom = object.denom; @@ -495,8 +495,8 @@ export const QueryCondition = { }, toAmino(message: QueryCondition, useInterfaces: boolean = false): QueryConditionAmino { const obj: any = {}; - obj.lock_query_type = message.lockQueryType; - obj.denom = message.denom; + obj.lock_query_type = message.lockQueryType === 0 ? undefined : message.lockQueryType; + obj.denom = message.denom === "" ? undefined : message.denom; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; return obj; @@ -600,8 +600,8 @@ export const SyntheticLock = { }, toAmino(message: SyntheticLock, useInterfaces: boolean = false): SyntheticLockAmino { const obj: any = {}; - obj.underlying_lock_id = message.underlyingLockId ? message.underlyingLockId.toString() : undefined; - obj.synth_denom = message.synthDenom; + obj.underlying_lock_id = message.underlyingLockId !== BigInt(0) ? message.underlyingLockId.toString() : undefined; + obj.synth_denom = message.synthDenom === "" ? undefined : message.synthDenom; obj.end_time = message.endTime ? Timestamp.toAmino(toTimestamp(message.endTime)) : undefined; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/osmosis/lockup/params.ts b/packages/types/protobuf/codegen/osmosis/lockup/params.ts index d7159bf13f..2cc8712b70 100644 --- a/packages/types/protobuf/codegen/osmosis/lockup/params.ts +++ b/packages/types/protobuf/codegen/osmosis/lockup/params.ts @@ -61,7 +61,7 @@ export const Params = { if (message.forceUnlockAllowedAddresses) { obj.force_unlock_allowed_addresses = message.forceUnlockAllowedAddresses.map(e => e); } else { - obj.force_unlock_allowed_addresses = []; + obj.force_unlock_allowed_addresses = message.forceUnlockAllowedAddresses; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/lockup/query.ts b/packages/types/protobuf/codegen/osmosis/lockup/query.ts index 36e5877364..c75b1b33b2 100644 --- a/packages/types/protobuf/codegen/osmosis/lockup/query.ts +++ b/packages/types/protobuf/codegen/osmosis/lockup/query.ts @@ -802,7 +802,7 @@ export const ModuleBalanceResponse = { if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -929,7 +929,7 @@ export const ModuleLockedAmountResponse = { if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -999,7 +999,7 @@ export const AccountUnlockableCoinsRequest = { }, toAmino(message: AccountUnlockableCoinsRequest, useInterfaces: boolean = false): AccountUnlockableCoinsRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; return obj; }, fromAminoMsg(object: AccountUnlockableCoinsRequestAminoMsg): AccountUnlockableCoinsRequest { @@ -1069,7 +1069,7 @@ export const AccountUnlockableCoinsResponse = { if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -1139,7 +1139,7 @@ export const AccountUnlockingCoinsRequest = { }, toAmino(message: AccountUnlockingCoinsRequest, useInterfaces: boolean = false): AccountUnlockingCoinsRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; return obj; }, fromAminoMsg(object: AccountUnlockingCoinsRequestAminoMsg): AccountUnlockingCoinsRequest { @@ -1209,7 +1209,7 @@ export const AccountUnlockingCoinsResponse = { if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -1279,7 +1279,7 @@ export const AccountLockedCoinsRequest = { }, toAmino(message: AccountLockedCoinsRequest, useInterfaces: boolean = false): AccountLockedCoinsRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; return obj; }, fromAminoMsg(object: AccountLockedCoinsRequestAminoMsg): AccountLockedCoinsRequest { @@ -1349,7 +1349,7 @@ export const AccountLockedCoinsResponse = { if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -1430,7 +1430,7 @@ export const AccountLockedPastTimeRequest = { }, toAmino(message: AccountLockedPastTimeRequest, useInterfaces: boolean = false): AccountLockedPastTimeRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; return obj; }, @@ -1501,7 +1501,7 @@ export const AccountLockedPastTimeResponse = { if (message.locks) { obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.locks = []; + obj.locks = message.locks; } return obj; }, @@ -1582,7 +1582,7 @@ export const AccountLockedPastTimeNotUnlockingOnlyRequest = { }, toAmino(message: AccountLockedPastTimeNotUnlockingOnlyRequest, useInterfaces: boolean = false): AccountLockedPastTimeNotUnlockingOnlyRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; return obj; }, @@ -1653,7 +1653,7 @@ export const AccountLockedPastTimeNotUnlockingOnlyResponse = { if (message.locks) { obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.locks = []; + obj.locks = message.locks; } return obj; }, @@ -1734,7 +1734,7 @@ export const AccountUnlockedBeforeTimeRequest = { }, toAmino(message: AccountUnlockedBeforeTimeRequest, useInterfaces: boolean = false): AccountUnlockedBeforeTimeRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; return obj; }, @@ -1805,7 +1805,7 @@ export const AccountUnlockedBeforeTimeResponse = { if (message.locks) { obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.locks = []; + obj.locks = message.locks; } return obj; }, @@ -1897,9 +1897,9 @@ export const AccountLockedPastTimeDenomRequest = { }, toAmino(message: AccountLockedPastTimeDenomRequest, useInterfaces: boolean = false): AccountLockedPastTimeDenomRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: AccountLockedPastTimeDenomRequestAminoMsg): AccountLockedPastTimeDenomRequest { @@ -1969,7 +1969,7 @@ export const AccountLockedPastTimeDenomResponse = { if (message.locks) { obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.locks = []; + obj.locks = message.locks; } return obj; }, @@ -2050,7 +2050,7 @@ export const LockedDenomRequest = { }, toAmino(message: LockedDenomRequest, useInterfaces: boolean = false): LockedDenomRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; return obj; }, @@ -2120,7 +2120,7 @@ export const LockedDenomResponse = { }, toAmino(message: LockedDenomResponse, useInterfaces: boolean = false): LockedDenomResponseAmino { const obj: any = {}; - obj.amount = message.amount; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: LockedDenomResponseAminoMsg): LockedDenomResponse { @@ -2189,7 +2189,7 @@ export const LockedRequest = { }, toAmino(message: LockedRequest, useInterfaces: boolean = false): LockedRequestAmino { const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; return obj; }, fromAminoMsg(object: LockedRequestAminoMsg): LockedRequest { @@ -2327,7 +2327,7 @@ export const LockRewardReceiverRequest = { }, toAmino(message: LockRewardReceiverRequest, useInterfaces: boolean = false): LockRewardReceiverRequestAmino { const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; return obj; }, fromAminoMsg(object: LockRewardReceiverRequestAminoMsg): LockRewardReceiverRequest { @@ -2396,7 +2396,7 @@ export const LockRewardReceiverResponse = { }, toAmino(message: LockRewardReceiverResponse, useInterfaces: boolean = false): LockRewardReceiverResponseAmino { const obj: any = {}; - obj.reward_receiver = message.rewardReceiver; + obj.reward_receiver = message.rewardReceiver === "" ? undefined : message.rewardReceiver; return obj; }, fromAminoMsg(object: LockRewardReceiverResponseAminoMsg): LockRewardReceiverResponse { @@ -2521,7 +2521,7 @@ export const NextLockIDResponse = { }, toAmino(message: NextLockIDResponse, useInterfaces: boolean = false): NextLockIDResponseAmino { const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; return obj; }, fromAminoMsg(object: NextLockIDResponseAminoMsg): NextLockIDResponse { @@ -2590,7 +2590,7 @@ export const SyntheticLockupsByLockupIDRequest = { }, toAmino(message: SyntheticLockupsByLockupIDRequest, useInterfaces: boolean = false): SyntheticLockupsByLockupIDRequestAmino { const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; return obj; }, fromAminoMsg(object: SyntheticLockupsByLockupIDRequestAminoMsg): SyntheticLockupsByLockupIDRequest { @@ -2660,7 +2660,7 @@ export const SyntheticLockupsByLockupIDResponse = { if (message.syntheticLocks) { obj.synthetic_locks = message.syntheticLocks.map(e => e ? SyntheticLock.toAmino(e, useInterfaces) : undefined); } else { - obj.synthetic_locks = []; + obj.synthetic_locks = message.syntheticLocks; } return obj; }, @@ -2730,7 +2730,7 @@ export const SyntheticLockupByLockupIDRequest = { }, toAmino(message: SyntheticLockupByLockupIDRequest, useInterfaces: boolean = false): SyntheticLockupByLockupIDRequestAmino { const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; return obj; }, fromAminoMsg(object: SyntheticLockupByLockupIDRequestAminoMsg): SyntheticLockupByLockupIDRequest { @@ -2879,7 +2879,7 @@ export const AccountLockedLongerDurationRequest = { }, toAmino(message: AccountLockedLongerDurationRequest, useInterfaces: boolean = false): AccountLockedLongerDurationRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; return obj; }, @@ -2950,7 +2950,7 @@ export const AccountLockedLongerDurationResponse = { if (message.locks) { obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.locks = []; + obj.locks = message.locks; } return obj; }, @@ -3031,7 +3031,7 @@ export const AccountLockedDurationRequest = { }, toAmino(message: AccountLockedDurationRequest, useInterfaces: boolean = false): AccountLockedDurationRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; return obj; }, @@ -3102,7 +3102,7 @@ export const AccountLockedDurationResponse = { if (message.locks) { obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.locks = []; + obj.locks = message.locks; } return obj; }, @@ -3183,7 +3183,7 @@ export const AccountLockedLongerDurationNotUnlockingOnlyRequest = { }, toAmino(message: AccountLockedLongerDurationNotUnlockingOnlyRequest, useInterfaces: boolean = false): AccountLockedLongerDurationNotUnlockingOnlyRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; return obj; }, @@ -3254,7 +3254,7 @@ export const AccountLockedLongerDurationNotUnlockingOnlyResponse = { if (message.locks) { obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.locks = []; + obj.locks = message.locks; } return obj; }, @@ -3346,9 +3346,9 @@ export const AccountLockedLongerDurationDenomRequest = { }, toAmino(message: AccountLockedLongerDurationDenomRequest, useInterfaces: boolean = false): AccountLockedLongerDurationDenomRequestAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: AccountLockedLongerDurationDenomRequestAminoMsg): AccountLockedLongerDurationDenomRequest { @@ -3418,7 +3418,7 @@ export const AccountLockedLongerDurationDenomResponse = { if (message.locks) { obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.locks = []; + obj.locks = message.locks; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/lockup/tx.ts b/packages/types/protobuf/codegen/osmosis/lockup/tx.ts index 3554d1fe4b..cd1432a97a 100644 --- a/packages/types/protobuf/codegen/osmosis/lockup/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/lockup/tx.ts @@ -27,7 +27,7 @@ export interface MsgLockTokensSDKType { coins: CoinSDKType[]; } export interface MsgLockTokensResponse { - ID: bigint; + iD: bigint; } export interface MsgLockTokensResponseProtoMsg { typeUrl: "/osmosis.lockup.MsgLockTokensResponse"; @@ -79,7 +79,7 @@ export interface MsgBeginUnlockingAllResponseSDKType { } export interface MsgBeginUnlocking { owner: string; - ID: bigint; + iD: bigint; /** Amount of unlocking coins. Unlock all if not set. */ coins: Coin[]; } @@ -128,7 +128,7 @@ export interface MsgBeginUnlockingResponseSDKType { */ export interface MsgExtendLockup { owner: string; - ID: bigint; + iD: bigint; /** * duration to be set. fails if lower than the current duration, or is * unlocking @@ -188,7 +188,7 @@ export interface MsgExtendLockupResponseSDKType { */ export interface MsgForceUnlock { owner: string; - ID: bigint; + iD: bigint; /** Amount of unlocking coins. Unlock all if not set. */ coins: Coin[]; } @@ -340,12 +340,12 @@ export const MsgLockTokens = { }, toAmino(message: MsgLockTokens, useInterfaces: boolean = false): MsgLockTokensAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -373,14 +373,14 @@ export const MsgLockTokens = { }; function createBaseMsgLockTokensResponse(): MsgLockTokensResponse { return { - ID: BigInt(0) + iD: BigInt(0) }; } export const MsgLockTokensResponse = { typeUrl: "/osmosis.lockup.MsgLockTokensResponse", encode(message: MsgLockTokensResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.ID !== BigInt(0)) { - writer.uint32(8).uint64(message.ID); + if (message.iD !== BigInt(0)) { + writer.uint32(8).uint64(message.iD); } return writer; }, @@ -392,7 +392,7 @@ export const MsgLockTokensResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.ID = reader.uint64(); + message.iD = reader.uint64(); break; default: reader.skipType(tag & 7); @@ -403,19 +403,19 @@ export const MsgLockTokensResponse = { }, fromPartial(object: Partial): MsgLockTokensResponse { const message = createBaseMsgLockTokensResponse(); - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); + message.iD = object.iD !== undefined && object.iD !== null ? BigInt(object.iD.toString()) : BigInt(0); return message; }, fromAmino(object: MsgLockTokensResponseAmino): MsgLockTokensResponse { const message = createBaseMsgLockTokensResponse(); if (object.ID !== undefined && object.ID !== null) { - message.ID = BigInt(object.ID); + message.iD = BigInt(object.ID); } return message; }, toAmino(message: MsgLockTokensResponse, useInterfaces: boolean = false): MsgLockTokensResponseAmino { const obj: any = {}; - obj.ID = message.ID ? message.ID.toString() : undefined; + obj.ID = message.iD !== BigInt(0) ? message.iD.toString() : undefined; return obj; }, fromAminoMsg(object: MsgLockTokensResponseAminoMsg): MsgLockTokensResponse { @@ -484,7 +484,7 @@ export const MsgBeginUnlockingAll = { }, toAmino(message: MsgBeginUnlockingAll, useInterfaces: boolean = false): MsgBeginUnlockingAllAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; return obj; }, fromAminoMsg(object: MsgBeginUnlockingAllAminoMsg): MsgBeginUnlockingAll { @@ -554,7 +554,7 @@ export const MsgBeginUnlockingAllResponse = { if (message.unlocks) { obj.unlocks = message.unlocks.map(e => e ? PeriodLock.toAmino(e, useInterfaces) : undefined); } else { - obj.unlocks = []; + obj.unlocks = message.unlocks; } return obj; }, @@ -583,7 +583,7 @@ export const MsgBeginUnlockingAllResponse = { function createBaseMsgBeginUnlocking(): MsgBeginUnlocking { return { owner: "", - ID: BigInt(0), + iD: BigInt(0), coins: [] }; } @@ -593,8 +593,8 @@ export const MsgBeginUnlocking = { if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.ID !== BigInt(0)) { - writer.uint32(16).uint64(message.ID); + if (message.iD !== BigInt(0)) { + writer.uint32(16).uint64(message.iD); } for (const v of message.coins) { Coin.encode(v!, writer.uint32(26).fork()).ldelim(); @@ -612,7 +612,7 @@ export const MsgBeginUnlocking = { message.owner = reader.string(); break; case 2: - message.ID = reader.uint64(); + message.iD = reader.uint64(); break; case 3: message.coins.push(Coin.decode(reader, reader.uint32(), useInterfaces)); @@ -627,7 +627,7 @@ export const MsgBeginUnlocking = { fromPartial(object: Partial): MsgBeginUnlocking { const message = createBaseMsgBeginUnlocking(); message.owner = object.owner ?? ""; - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); + message.iD = object.iD !== undefined && object.iD !== null ? BigInt(object.iD.toString()) : BigInt(0); message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -637,19 +637,19 @@ export const MsgBeginUnlocking = { message.owner = object.owner; } if (object.ID !== undefined && object.ID !== null) { - message.ID = BigInt(object.ID); + message.iD = BigInt(object.ID); } message.coins = object.coins?.map(e => Coin.fromAmino(e)) || []; return message; }, toAmino(message: MsgBeginUnlocking, useInterfaces: boolean = false): MsgBeginUnlockingAmino { const obj: any = {}; - obj.owner = message.owner; - obj.ID = message.ID ? message.ID.toString() : undefined; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.ID = message.iD !== BigInt(0) ? message.iD.toString() : undefined; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -730,8 +730,8 @@ export const MsgBeginUnlockingResponse = { }, toAmino(message: MsgBeginUnlockingResponse, useInterfaces: boolean = false): MsgBeginUnlockingResponseAmino { const obj: any = {}; - obj.success = message.success; - obj.unlockingLockID = message.unlockingLockID ? message.unlockingLockID.toString() : undefined; + obj.success = message.success === false ? undefined : message.success; + obj.unlockingLockID = message.unlockingLockID !== BigInt(0) ? message.unlockingLockID.toString() : undefined; return obj; }, fromAminoMsg(object: MsgBeginUnlockingResponseAminoMsg): MsgBeginUnlockingResponse { @@ -759,7 +759,7 @@ export const MsgBeginUnlockingResponse = { function createBaseMsgExtendLockup(): MsgExtendLockup { return { owner: "", - ID: BigInt(0), + iD: BigInt(0), duration: Duration.fromPartial({}) }; } @@ -769,8 +769,8 @@ export const MsgExtendLockup = { if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.ID !== BigInt(0)) { - writer.uint32(16).uint64(message.ID); + if (message.iD !== BigInt(0)) { + writer.uint32(16).uint64(message.iD); } if (message.duration !== undefined) { Duration.encode(message.duration, writer.uint32(26).fork()).ldelim(); @@ -788,7 +788,7 @@ export const MsgExtendLockup = { message.owner = reader.string(); break; case 2: - message.ID = reader.uint64(); + message.iD = reader.uint64(); break; case 3: message.duration = Duration.decode(reader, reader.uint32(), useInterfaces); @@ -803,7 +803,7 @@ export const MsgExtendLockup = { fromPartial(object: Partial): MsgExtendLockup { const message = createBaseMsgExtendLockup(); message.owner = object.owner ?? ""; - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); + message.iD = object.iD !== undefined && object.iD !== null ? BigInt(object.iD.toString()) : BigInt(0); message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; return message; }, @@ -813,7 +813,7 @@ export const MsgExtendLockup = { message.owner = object.owner; } if (object.ID !== undefined && object.ID !== null) { - message.ID = BigInt(object.ID); + message.iD = BigInt(object.ID); } if (object.duration !== undefined && object.duration !== null) { message.duration = Duration.fromAmino(object.duration); @@ -822,8 +822,8 @@ export const MsgExtendLockup = { }, toAmino(message: MsgExtendLockup, useInterfaces: boolean = false): MsgExtendLockupAmino { const obj: any = {}; - obj.owner = message.owner; - obj.ID = message.ID ? message.ID.toString() : undefined; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.ID = message.iD !== BigInt(0) ? message.iD.toString() : undefined; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; return obj; }, @@ -893,7 +893,7 @@ export const MsgExtendLockupResponse = { }, toAmino(message: MsgExtendLockupResponse, useInterfaces: boolean = false): MsgExtendLockupResponseAmino { const obj: any = {}; - obj.success = message.success; + obj.success = message.success === false ? undefined : message.success; return obj; }, fromAminoMsg(object: MsgExtendLockupResponseAminoMsg): MsgExtendLockupResponse { @@ -921,7 +921,7 @@ export const MsgExtendLockupResponse = { function createBaseMsgForceUnlock(): MsgForceUnlock { return { owner: "", - ID: BigInt(0), + iD: BigInt(0), coins: [] }; } @@ -931,8 +931,8 @@ export const MsgForceUnlock = { if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.ID !== BigInt(0)) { - writer.uint32(16).uint64(message.ID); + if (message.iD !== BigInt(0)) { + writer.uint32(16).uint64(message.iD); } for (const v of message.coins) { Coin.encode(v!, writer.uint32(26).fork()).ldelim(); @@ -950,7 +950,7 @@ export const MsgForceUnlock = { message.owner = reader.string(); break; case 2: - message.ID = reader.uint64(); + message.iD = reader.uint64(); break; case 3: message.coins.push(Coin.decode(reader, reader.uint32(), useInterfaces)); @@ -965,7 +965,7 @@ export const MsgForceUnlock = { fromPartial(object: Partial): MsgForceUnlock { const message = createBaseMsgForceUnlock(); message.owner = object.owner ?? ""; - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); + message.iD = object.iD !== undefined && object.iD !== null ? BigInt(object.iD.toString()) : BigInt(0); message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -975,19 +975,19 @@ export const MsgForceUnlock = { message.owner = object.owner; } if (object.ID !== undefined && object.ID !== null) { - message.ID = BigInt(object.ID); + message.iD = BigInt(object.ID); } message.coins = object.coins?.map(e => Coin.fromAmino(e)) || []; return message; }, toAmino(message: MsgForceUnlock, useInterfaces: boolean = false): MsgForceUnlockAmino { const obj: any = {}; - obj.owner = message.owner; - obj.ID = message.ID ? message.ID.toString() : undefined; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.ID = message.iD !== BigInt(0) ? message.iD.toString() : undefined; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } return obj; }, @@ -1057,7 +1057,7 @@ export const MsgForceUnlockResponse = { }, toAmino(message: MsgForceUnlockResponse, useInterfaces: boolean = false): MsgForceUnlockResponseAmino { const obj: any = {}; - obj.success = message.success; + obj.success = message.success === false ? undefined : message.success; return obj; }, fromAminoMsg(object: MsgForceUnlockResponseAminoMsg): MsgForceUnlockResponse { @@ -1148,9 +1148,9 @@ export const MsgSetRewardReceiverAddress = { }, toAmino(message: MsgSetRewardReceiverAddress, useInterfaces: boolean = false): MsgSetRewardReceiverAddressAmino { const obj: any = {}; - obj.owner = message.owner; - obj.lockID = message.lockID ? message.lockID.toString() : undefined; - obj.reward_receiver = message.rewardReceiver; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.lockID = message.lockID !== BigInt(0) ? message.lockID.toString() : undefined; + obj.reward_receiver = message.rewardReceiver === "" ? undefined : message.rewardReceiver; return obj; }, fromAminoMsg(object: MsgSetRewardReceiverAddressAminoMsg): MsgSetRewardReceiverAddress { @@ -1219,7 +1219,7 @@ export const MsgSetRewardReceiverAddressResponse = { }, toAmino(message: MsgSetRewardReceiverAddressResponse, useInterfaces: boolean = false): MsgSetRewardReceiverAddressResponseAmino { const obj: any = {}; - obj.success = message.success; + obj.success = message.success === false ? undefined : message.success; return obj; }, fromAminoMsg(object: MsgSetRewardReceiverAddressResponseAminoMsg): MsgSetRewardReceiverAddressResponse { diff --git a/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/genesis.ts b/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/genesis.ts index e2d26694cf..007282d16a 100644 --- a/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/genesis.ts @@ -112,7 +112,7 @@ export const GenesisState = { if (message.lockableDurations) { obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e, useInterfaces) : undefined); } else { - obj.lockable_durations = []; + obj.lockable_durations = message.lockableDurations; } obj.distr_info = message.distrInfo ? DistrInfo.toAmino(message.distrInfo, useInterfaces) : undefined; obj.pool_to_gauges = message.poolToGauges ? PoolToGauges.toAmino(message.poolToGauges, useInterfaces) : undefined; diff --git a/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/gov.ts b/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/gov.ts index 23c1d26280..63704dfa2e 100644 --- a/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/gov.ts +++ b/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/gov.ts @@ -170,12 +170,12 @@ export const ReplacePoolIncentivesProposal = { }, toAmino(message: ReplacePoolIncentivesProposal, useInterfaces: boolean = false): ReplacePoolIncentivesProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.records) { obj.records = message.records.map(e => e ? DistrRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.records = []; + obj.records = message.records; } return obj; }, @@ -266,12 +266,12 @@ export const UpdatePoolIncentivesProposal = { }, toAmino(message: UpdatePoolIncentivesProposal, useInterfaces: boolean = false): UpdatePoolIncentivesProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.records) { obj.records = message.records.map(e => e ? DistrRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.records = []; + obj.records = message.records; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/incentives.ts b/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/incentives.ts index abb7814b2f..61f5cc265c 100644 --- a/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/incentives.ts +++ b/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/incentives.ts @@ -170,7 +170,7 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.minted_denom = message.mintedDenom; + obj.minted_denom = message.mintedDenom === "" ? undefined : message.mintedDenom; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { @@ -240,7 +240,7 @@ export const LockableDurationsInfo = { if (message.lockableDurations) { obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e, useInterfaces) : undefined); } else { - obj.lockable_durations = []; + obj.lockable_durations = message.lockableDurations; } return obj; }, @@ -319,11 +319,11 @@ export const DistrInfo = { }, toAmino(message: DistrInfo, useInterfaces: boolean = false): DistrInfoAmino { const obj: any = {}; - obj.total_weight = message.totalWeight; + obj.total_weight = message.totalWeight === "" ? undefined : message.totalWeight; if (message.records) { obj.records = message.records.map(e => e ? DistrRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.records = []; + obj.records = message.records; } return obj; }, @@ -404,8 +404,8 @@ export const DistrRecord = { }, toAmino(message: DistrRecord, useInterfaces: boolean = false): DistrRecordAmino { const obj: any = {}; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - obj.weight = message.weight; + obj.gauge_id = message.gaugeId !== BigInt(0) ? message.gaugeId.toString() : undefined; + obj.weight = message.weight === "" ? undefined : message.weight; return obj; }, fromAminoMsg(object: DistrRecordAminoMsg): DistrRecord { @@ -496,8 +496,8 @@ export const PoolToGauge = { }, toAmino(message: PoolToGauge, useInterfaces: boolean = false): PoolToGaugeAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.gauge_id = message.gaugeId !== BigInt(0) ? message.gaugeId.toString() : undefined; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; return obj; }, @@ -568,7 +568,7 @@ export const PoolToGauges = { if (message.poolToGauge) { obj.pool_to_gauge = message.poolToGauge.map(e => e ? PoolToGauge.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_to_gauge = []; + obj.pool_to_gauge = message.poolToGauge; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/query.ts b/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/query.ts index b0bc933133..f8df253ed3 100644 --- a/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/query.ts @@ -267,7 +267,7 @@ export const QueryGaugeIdsRequest = { }, toAmino(message: QueryGaugeIdsRequest, useInterfaces: boolean = false): QueryGaugeIdsRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryGaugeIdsRequestAminoMsg): QueryGaugeIdsRequest { @@ -337,7 +337,7 @@ export const QueryGaugeIdsResponse = { if (message.gaugeIdsWithDuration) { obj.gauge_ids_with_duration = message.gaugeIdsWithDuration.map(e => e ? QueryGaugeIdsResponse_GaugeIdWithDuration.toAmino(e, useInterfaces) : undefined); } else { - obj.gauge_ids_with_duration = []; + obj.gauge_ids_with_duration = message.gaugeIdsWithDuration; } return obj; }, @@ -429,9 +429,9 @@ export const QueryGaugeIdsResponse_GaugeIdWithDuration = { }, toAmino(message: QueryGaugeIdsResponse_GaugeIdWithDuration, useInterfaces: boolean = false): QueryGaugeIdsResponse_GaugeIdWithDurationAmino { const obj: any = {}; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; + obj.gauge_id = message.gaugeId !== BigInt(0) ? message.gaugeId.toString() : undefined; obj.duration = message.duration ? Duration.toAmino(message.duration, useInterfaces) : undefined; - obj.gauge_incentive_percentage = message.gaugeIncentivePercentage; + obj.gauge_incentive_percentage = message.gaugeIncentivePercentage === "" ? undefined : message.gaugeIncentivePercentage; return obj; }, fromAminoMsg(object: QueryGaugeIdsResponse_GaugeIdWithDurationAminoMsg): QueryGaugeIdsResponse_GaugeIdWithDuration { @@ -807,7 +807,7 @@ export const QueryLockableDurationsResponse = { if (message.lockableDurations) { obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e, useInterfaces) : undefined); } else { - obj.lockable_durations = []; + obj.lockable_durations = message.lockableDurations; } return obj; }, @@ -955,9 +955,9 @@ export const IncentivizedPool = { }, toAmino(message: IncentivizedPool, useInterfaces: boolean = false): IncentivizedPoolAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; obj.lockable_duration = message.lockableDuration ? Duration.toAmino(message.lockableDuration, useInterfaces) : undefined; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; + obj.gauge_id = message.gaugeId !== BigInt(0) ? message.gaugeId.toString() : undefined; return obj; }, fromAminoMsg(object: IncentivizedPoolAminoMsg): IncentivizedPool { @@ -1027,7 +1027,7 @@ export const QueryIncentivizedPoolsResponse = { if (message.incentivizedPools) { obj.incentivized_pools = message.incentivizedPools.map(e => e ? IncentivizedPool.toAmino(e, useInterfaces) : undefined); } else { - obj.incentivized_pools = []; + obj.incentivized_pools = message.incentivizedPools; } return obj; }, @@ -1154,7 +1154,7 @@ export const QueryExternalIncentiveGaugesResponse = { if (message.data) { obj.data = message.data.map(e => e ? Gauge.toAmino(e, useInterfaces) : undefined); } else { - obj.data = []; + obj.data = message.data; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/shared.ts b/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/shared.ts index 723952943a..acffa17671 100644 --- a/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/shared.ts +++ b/packages/types/protobuf/codegen/osmosis/pool-incentives/v1beta1/shared.ts @@ -135,7 +135,7 @@ export const MigrationRecords = { if (message.balancerToConcentratedPoolLinks) { obj.balancer_to_concentrated_pool_links = message.balancerToConcentratedPoolLinks.map(e => e ? BalancerToConcentratedPoolLink.toAmino(e, useInterfaces) : undefined); } else { - obj.balancer_to_concentrated_pool_links = []; + obj.balancer_to_concentrated_pool_links = message.balancerToConcentratedPoolLinks; } return obj; }, @@ -216,8 +216,8 @@ export const BalancerToConcentratedPoolLink = { }, toAmino(message: BalancerToConcentratedPoolLink, useInterfaces: boolean = false): BalancerToConcentratedPoolLinkAmino { const obj: any = {}; - obj.balancer_pool_id = message.balancerPoolId ? message.balancerPoolId.toString() : undefined; - obj.cl_pool_id = message.clPoolId ? message.clPoolId.toString() : undefined; + obj.balancer_pool_id = message.balancerPoolId !== BigInt(0) ? message.balancerPoolId.toString() : undefined; + obj.cl_pool_id = message.clPoolId !== BigInt(0) ? message.clPoolId.toString() : undefined; return obj; }, fromAminoMsg(object: BalancerToConcentratedPoolLinkAminoMsg): BalancerToConcentratedPoolLink { diff --git a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/genesis.ts b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/genesis.ts index 213f75baef..414121e0b6 100644 --- a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/genesis.ts @@ -280,13 +280,13 @@ export const Params = { if (message.poolCreationFee) { obj.pool_creation_fee = message.poolCreationFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_creation_fee = []; + obj.pool_creation_fee = message.poolCreationFee; } obj.taker_fee_params = message.takerFeeParams ? TakerFeeParams.toAmino(message.takerFeeParams, useInterfaces) : undefined; if (message.authorizedQuoteDenoms) { obj.authorized_quote_denoms = message.authorizedQuoteDenoms.map(e => e); } else { - obj.authorized_quote_denoms = []; + obj.authorized_quote_denoms = message.authorizedQuoteDenoms; } return obj; }, @@ -376,12 +376,12 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.next_pool_id = message.nextPoolId ? message.nextPoolId.toString() : undefined; + obj.next_pool_id = message.nextPoolId !== BigInt(0) ? message.nextPoolId.toString() : undefined; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; if (message.poolRoutes) { obj.pool_routes = message.poolRoutes.map(e => e ? ModuleRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.pool_routes = []; + obj.pool_routes = message.poolRoutes; } return obj; }, @@ -493,15 +493,15 @@ export const TakerFeeParams = { }, toAmino(message: TakerFeeParams, useInterfaces: boolean = false): TakerFeeParamsAmino { const obj: any = {}; - obj.default_taker_fee = message.defaultTakerFee; + obj.default_taker_fee = message.defaultTakerFee === "" ? undefined : message.defaultTakerFee; obj.osmo_taker_fee_distribution = message.osmoTakerFeeDistribution ? TakerFeeDistributionPercentage.toAmino(message.osmoTakerFeeDistribution, useInterfaces) : undefined; obj.non_osmo_taker_fee_distribution = message.nonOsmoTakerFeeDistribution ? TakerFeeDistributionPercentage.toAmino(message.nonOsmoTakerFeeDistribution, useInterfaces) : undefined; if (message.adminAddresses) { obj.admin_addresses = message.adminAddresses.map(e => e); } else { - obj.admin_addresses = []; + obj.admin_addresses = message.adminAddresses; } - obj.community_pool_denom_to_swap_non_whitelisted_assets_to = message.communityPoolDenomToSwapNonWhitelistedAssetsTo; + obj.community_pool_denom_to_swap_non_whitelisted_assets_to = message.communityPoolDenomToSwapNonWhitelistedAssetsTo === "" ? undefined : message.communityPoolDenomToSwapNonWhitelistedAssetsTo; return obj; }, fromAminoMsg(object: TakerFeeParamsAminoMsg): TakerFeeParams { @@ -581,8 +581,8 @@ export const TakerFeeDistributionPercentage = { }, toAmino(message: TakerFeeDistributionPercentage, useInterfaces: boolean = false): TakerFeeDistributionPercentageAmino { const obj: any = {}; - obj.staking_rewards = message.stakingRewards; - obj.community_pool = message.communityPool; + obj.staking_rewards = message.stakingRewards === "" ? undefined : message.stakingRewards; + obj.community_pool = message.communityPool === "" ? undefined : message.communityPool; return obj; }, fromAminoMsg(object: TakerFeeDistributionPercentageAminoMsg): TakerFeeDistributionPercentage { diff --git a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/gov.ts b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/gov.ts index 30c1f44db5..a03ad0b720 100644 --- a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/gov.ts +++ b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/gov.ts @@ -100,12 +100,12 @@ export const DenomPairTakerFeeProposal = { }, toAmino(message: DenomPairTakerFeeProposal, useInterfaces: boolean = false): DenomPairTakerFeeProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.denomPairTakerFee) { obj.denom_pair_taker_fee = message.denomPairTakerFee.map(e => e ? DenomPairTakerFee.toAmino(e, useInterfaces) : undefined); } else { - obj.denom_pair_taker_fee = []; + obj.denom_pair_taker_fee = message.denomPairTakerFee; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/module_route.ts b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/module_route.ts index 088f2b19b9..9bce95dea0 100644 --- a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/module_route.ts +++ b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/module_route.ts @@ -143,7 +143,7 @@ export const ModuleRoute = { fromAmino(object: ModuleRouteAmino): ModuleRoute { const message = createBaseModuleRoute(); if (object.pool_type !== undefined && object.pool_type !== null) { - message.poolType = poolTypeFromJSON(object.pool_type); + message.poolType = object.pool_type; } if (object.pool_id !== undefined && object.pool_id !== null) { message.poolId = BigInt(object.pool_id); @@ -152,8 +152,8 @@ export const ModuleRoute = { }, toAmino(message: ModuleRoute, useInterfaces: boolean = false): ModuleRouteAmino { const obj: any = {}; - obj.pool_type = message.poolType; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_type = message.poolType === 0 ? undefined : message.poolType; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId?.toString() : undefined; return obj; }, fromAminoMsg(object: ModuleRouteAminoMsg): ModuleRoute { diff --git a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/query.ts b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/query.ts index bad7cf703e..c3c0d2eb2e 100644 --- a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/query.ts @@ -657,12 +657,12 @@ export const EstimateSwapExactAmountInRequest = { }, toAmino(message: EstimateSwapExactAmountInRequest, useInterfaces: boolean = false): EstimateSwapExactAmountInRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in = message.tokenIn; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; if (message.routes) { obj.routes = message.routes.map(e => e ? SwapAmountInRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } return obj; }, @@ -770,17 +770,17 @@ export const EstimateSwapExactAmountInWithPrimitiveTypesRequest = { }, toAmino(message: EstimateSwapExactAmountInWithPrimitiveTypesRequest, useInterfaces: boolean = false): EstimateSwapExactAmountInWithPrimitiveTypesRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in = message.tokenIn; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; if (message.routesPoolId) { obj.routes_pool_id = message.routesPoolId.map(e => e.toString()); } else { - obj.routes_pool_id = []; + obj.routes_pool_id = message.routesPoolId; } if (message.routesTokenOutDenom) { obj.routes_token_out_denom = message.routesTokenOutDenom.map(e => e); } else { - obj.routes_token_out_denom = []; + obj.routes_token_out_denom = message.routesTokenOutDenom; } return obj; }, @@ -872,9 +872,9 @@ export const EstimateSinglePoolSwapExactAmountInRequest = { }, toAmino(message: EstimateSinglePoolSwapExactAmountInRequest, useInterfaces: boolean = false): EstimateSinglePoolSwapExactAmountInRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in = message.tokenIn; - obj.token_out_denom = message.tokenOutDenom; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; + obj.token_out_denom = message.tokenOutDenom === "" ? undefined : message.tokenOutDenom; return obj; }, fromAminoMsg(object: EstimateSinglePoolSwapExactAmountInRequestAminoMsg): EstimateSinglePoolSwapExactAmountInRequest { @@ -943,7 +943,7 @@ export const EstimateSwapExactAmountInResponse = { }, toAmino(message: EstimateSwapExactAmountInResponse, useInterfaces: boolean = false): EstimateSwapExactAmountInResponseAmino { const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; + obj.token_out_amount = message.tokenOutAmount === "" ? undefined : message.tokenOutAmount; return obj; }, fromAminoMsg(object: EstimateSwapExactAmountInResponseAminoMsg): EstimateSwapExactAmountInResponse { @@ -1032,13 +1032,13 @@ export const EstimateSwapExactAmountOutRequest = { }, toAmino(message: EstimateSwapExactAmountOutRequest, useInterfaces: boolean = false): EstimateSwapExactAmountOutRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; if (message.routes) { obj.routes = message.routes.map(e => e ? SwapAmountOutRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } - obj.token_out = message.tokenOut; + obj.token_out = message.tokenOut === "" ? undefined : message.tokenOut; return obj; }, fromAminoMsg(object: EstimateSwapExactAmountOutRequestAminoMsg): EstimateSwapExactAmountOutRequest { @@ -1145,18 +1145,18 @@ export const EstimateSwapExactAmountOutWithPrimitiveTypesRequest = { }, toAmino(message: EstimateSwapExactAmountOutWithPrimitiveTypesRequest, useInterfaces: boolean = false): EstimateSwapExactAmountOutWithPrimitiveTypesRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; if (message.routesPoolId) { obj.routes_pool_id = message.routesPoolId.map(e => e.toString()); } else { - obj.routes_pool_id = []; + obj.routes_pool_id = message.routesPoolId; } if (message.routesTokenInDenom) { obj.routes_token_in_denom = message.routesTokenInDenom.map(e => e); } else { - obj.routes_token_in_denom = []; + obj.routes_token_in_denom = message.routesTokenInDenom; } - obj.token_out = message.tokenOut; + obj.token_out = message.tokenOut === "" ? undefined : message.tokenOut; return obj; }, fromAminoMsg(object: EstimateSwapExactAmountOutWithPrimitiveTypesRequestAminoMsg): EstimateSwapExactAmountOutWithPrimitiveTypesRequest { @@ -1247,9 +1247,9 @@ export const EstimateSinglePoolSwapExactAmountOutRequest = { }, toAmino(message: EstimateSinglePoolSwapExactAmountOutRequest, useInterfaces: boolean = false): EstimateSinglePoolSwapExactAmountOutRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in_denom = message.tokenInDenom; - obj.token_out = message.tokenOut; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_in_denom = message.tokenInDenom === "" ? undefined : message.tokenInDenom; + obj.token_out = message.tokenOut === "" ? undefined : message.tokenOut; return obj; }, fromAminoMsg(object: EstimateSinglePoolSwapExactAmountOutRequestAminoMsg): EstimateSinglePoolSwapExactAmountOutRequest { @@ -1318,7 +1318,7 @@ export const EstimateSwapExactAmountOutResponse = { }, toAmino(message: EstimateSwapExactAmountOutResponse, useInterfaces: boolean = false): EstimateSwapExactAmountOutResponseAmino { const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; + obj.token_in_amount = message.tokenInAmount === "" ? undefined : message.tokenInAmount; return obj; }, fromAminoMsg(object: EstimateSwapExactAmountOutResponseAminoMsg): EstimateSwapExactAmountOutResponse { @@ -1443,7 +1443,7 @@ export const NumPoolsResponse = { }, toAmino(message: NumPoolsResponse, useInterfaces: boolean = false): NumPoolsResponseAmino { const obj: any = {}; - obj.num_pools = message.numPools ? message.numPools.toString() : undefined; + obj.num_pools = message.numPools !== BigInt(0) ? message.numPools.toString() : undefined; return obj; }, fromAminoMsg(object: NumPoolsResponseAminoMsg): NumPoolsResponse { @@ -1512,7 +1512,7 @@ export const PoolRequest = { }, toAmino(message: PoolRequest, useInterfaces: boolean = false): PoolRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: PoolRequestAminoMsg): PoolRequest { @@ -1707,7 +1707,7 @@ export const AllPoolsResponse = { if (message.pools) { obj.pools = message.pools.map(e => e ? PoolI_ToAmino((e as Any), useInterfaces) : undefined); } else { - obj.pools = []; + obj.pools = message.pools; } return obj; }, @@ -1799,9 +1799,9 @@ export const SpotPriceRequest = { }, toAmino(message: SpotPriceRequest, useInterfaces: boolean = false): SpotPriceRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.base_asset_denom = message.baseAssetDenom; - obj.quote_asset_denom = message.quoteAssetDenom; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.base_asset_denom = message.baseAssetDenom === "" ? undefined : message.baseAssetDenom; + obj.quote_asset_denom = message.quoteAssetDenom === "" ? undefined : message.quoteAssetDenom; return obj; }, fromAminoMsg(object: SpotPriceRequestAminoMsg): SpotPriceRequest { @@ -1870,7 +1870,7 @@ export const SpotPriceResponse = { }, toAmino(message: SpotPriceResponse, useInterfaces: boolean = false): SpotPriceResponseAmino { const obj: any = {}; - obj.spot_price = message.spotPrice; + obj.spot_price = message.spotPrice === "" ? undefined : message.spotPrice; return obj; }, fromAminoMsg(object: SpotPriceResponseAminoMsg): SpotPriceResponse { @@ -1939,7 +1939,7 @@ export const TotalPoolLiquidityRequest = { }, toAmino(message: TotalPoolLiquidityRequest, useInterfaces: boolean = false): TotalPoolLiquidityRequestAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: TotalPoolLiquidityRequestAminoMsg): TotalPoolLiquidityRequest { @@ -2009,7 +2009,7 @@ export const TotalPoolLiquidityResponse = { if (message.liquidity) { obj.liquidity = message.liquidity.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.liquidity = []; + obj.liquidity = message.liquidity; } return obj; }, @@ -2136,7 +2136,7 @@ export const TotalLiquidityResponse = { if (message.liquidity) { obj.liquidity = message.liquidity.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.liquidity = []; + obj.liquidity = message.liquidity; } return obj; }, @@ -2178,7 +2178,7 @@ export const PoolI_InterfaceDecoder = (input: BinaryReader | Uint8Array): Pool1 return data; } }; -export const PoolI_FromAmino = (content: AnyAmino) => { +export const PoolI_FromAmino = (content: AnyAmino): Any => { switch (content.type) { case "osmosis/concentratedliquidity/pool": return Any.fromPartial({ diff --git a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/swap_route.ts b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/swap_route.ts index e56dc439c1..b4ef0ddb46 100644 --- a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/swap_route.ts +++ b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/swap_route.ts @@ -134,8 +134,8 @@ export const SwapAmountInRoute = { }, toAmino(message: SwapAmountInRoute, useInterfaces: boolean = false): SwapAmountInRouteAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_out_denom = message.tokenOutDenom; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_out_denom = message.tokenOutDenom === "" ? undefined : message.tokenOutDenom; return obj; }, fromAminoMsg(object: SwapAmountInRouteAminoMsg): SwapAmountInRoute { @@ -215,8 +215,8 @@ export const SwapAmountOutRoute = { }, toAmino(message: SwapAmountOutRoute, useInterfaces: boolean = false): SwapAmountOutRouteAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in_denom = message.tokenInDenom; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; + obj.token_in_denom = message.tokenInDenom === "" ? undefined : message.tokenInDenom; return obj; }, fromAminoMsg(object: SwapAmountOutRouteAminoMsg): SwapAmountOutRoute { @@ -297,9 +297,9 @@ export const SwapAmountInSplitRoute = { if (message.pools) { obj.pools = message.pools.map(e => e ? SwapAmountInRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.pools = []; + obj.pools = message.pools; } - obj.token_in_amount = message.tokenInAmount; + obj.token_in_amount = message.tokenInAmount === "" ? undefined : message.tokenInAmount; return obj; }, fromAminoMsg(object: SwapAmountInSplitRouteAminoMsg): SwapAmountInSplitRoute { @@ -380,9 +380,9 @@ export const SwapAmountOutSplitRoute = { if (message.pools) { obj.pools = message.pools.map(e => e ? SwapAmountOutRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.pools = []; + obj.pools = message.pools; } - obj.token_out_amount = message.tokenOutAmount; + obj.token_out_amount = message.tokenOutAmount === "" ? undefined : message.tokenOutAmount; return obj; }, fromAminoMsg(object: SwapAmountOutSplitRouteAminoMsg): SwapAmountOutSplitRoute { diff --git a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/tx.ts b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/tx.ts index a0b17f80f9..6262fc40bd 100644 --- a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/tx.ts @@ -333,14 +333,14 @@ export const MsgSwapExactAmountIn = { }, toAmino(message: MsgSwapExactAmountIn, useInterfaces: boolean = false): MsgSwapExactAmountInAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.routes) { obj.routes = message.routes.map(e => e ? SwapAmountInRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } obj.token_in = message.tokenIn ? Coin.toAmino(message.tokenIn, useInterfaces) : undefined; - obj.token_out_min_amount = message.tokenOutMinAmount; + obj.token_out_min_amount = message.tokenOutMinAmount === "" ? undefined : message.tokenOutMinAmount; return obj; }, fromAminoMsg(object: MsgSwapExactAmountInAminoMsg): MsgSwapExactAmountIn { @@ -409,7 +409,7 @@ export const MsgSwapExactAmountInResponse = { }, toAmino(message: MsgSwapExactAmountInResponse, useInterfaces: boolean = false): MsgSwapExactAmountInResponseAmino { const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; + obj.token_out_amount = message.tokenOutAmount === "" ? undefined : message.tokenOutAmount; return obj; }, fromAminoMsg(object: MsgSwapExactAmountInResponseAminoMsg): MsgSwapExactAmountInResponse { @@ -509,14 +509,14 @@ export const MsgSplitRouteSwapExactAmountIn = { }, toAmino(message: MsgSplitRouteSwapExactAmountIn, useInterfaces: boolean = false): MsgSplitRouteSwapExactAmountInAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.routes) { obj.routes = message.routes.map(e => e ? SwapAmountInSplitRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } - obj.token_in_denom = message.tokenInDenom; - obj.token_out_min_amount = message.tokenOutMinAmount; + obj.token_in_denom = message.tokenInDenom === "" ? undefined : message.tokenInDenom; + obj.token_out_min_amount = message.tokenOutMinAmount === "" ? undefined : message.tokenOutMinAmount; return obj; }, fromAminoMsg(object: MsgSplitRouteSwapExactAmountInAminoMsg): MsgSplitRouteSwapExactAmountIn { @@ -585,7 +585,7 @@ export const MsgSplitRouteSwapExactAmountInResponse = { }, toAmino(message: MsgSplitRouteSwapExactAmountInResponse, useInterfaces: boolean = false): MsgSplitRouteSwapExactAmountInResponseAmino { const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; + obj.token_out_amount = message.tokenOutAmount === "" ? undefined : message.tokenOutAmount; return obj; }, fromAminoMsg(object: MsgSplitRouteSwapExactAmountInResponseAminoMsg): MsgSplitRouteSwapExactAmountInResponse { @@ -685,13 +685,13 @@ export const MsgSwapExactAmountOut = { }, toAmino(message: MsgSwapExactAmountOut, useInterfaces: boolean = false): MsgSwapExactAmountOutAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.routes) { obj.routes = message.routes.map(e => e ? SwapAmountOutRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } - obj.token_in_max_amount = message.tokenInMaxAmount; + obj.token_in_max_amount = message.tokenInMaxAmount === "" ? undefined : message.tokenInMaxAmount; obj.token_out = message.tokenOut ? Coin.toAmino(message.tokenOut, useInterfaces) : undefined; return obj; }, @@ -761,7 +761,7 @@ export const MsgSwapExactAmountOutResponse = { }, toAmino(message: MsgSwapExactAmountOutResponse, useInterfaces: boolean = false): MsgSwapExactAmountOutResponseAmino { const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; + obj.token_in_amount = message.tokenInAmount === "" ? undefined : message.tokenInAmount; return obj; }, fromAminoMsg(object: MsgSwapExactAmountOutResponseAminoMsg): MsgSwapExactAmountOutResponse { @@ -861,14 +861,14 @@ export const MsgSplitRouteSwapExactAmountOut = { }, toAmino(message: MsgSplitRouteSwapExactAmountOut, useInterfaces: boolean = false): MsgSplitRouteSwapExactAmountOutAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.routes) { obj.routes = message.routes.map(e => e ? SwapAmountOutSplitRoute.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } - obj.token_out_denom = message.tokenOutDenom; - obj.token_in_max_amount = message.tokenInMaxAmount; + obj.token_out_denom = message.tokenOutDenom === "" ? undefined : message.tokenOutDenom; + obj.token_in_max_amount = message.tokenInMaxAmount === "" ? undefined : message.tokenInMaxAmount; return obj; }, fromAminoMsg(object: MsgSplitRouteSwapExactAmountOutAminoMsg): MsgSplitRouteSwapExactAmountOut { @@ -937,7 +937,7 @@ export const MsgSplitRouteSwapExactAmountOutResponse = { }, toAmino(message: MsgSplitRouteSwapExactAmountOutResponse, useInterfaces: boolean = false): MsgSplitRouteSwapExactAmountOutResponseAmino { const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; + obj.token_in_amount = message.tokenInAmount === "" ? undefined : message.tokenInAmount; return obj; }, fromAminoMsg(object: MsgSplitRouteSwapExactAmountOutResponseAminoMsg): MsgSplitRouteSwapExactAmountOutResponse { @@ -1015,11 +1015,11 @@ export const MsgSetDenomPairTakerFee = { }, toAmino(message: MsgSetDenomPairTakerFee, useInterfaces: boolean = false): MsgSetDenomPairTakerFeeAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.denomPairTakerFee) { obj.denom_pair_taker_fee = message.denomPairTakerFee.map(e => e ? DenomPairTakerFee.toAmino(e, useInterfaces) : undefined); } else { - obj.denom_pair_taker_fee = []; + obj.denom_pair_taker_fee = message.denomPairTakerFee; } return obj; }, @@ -1089,7 +1089,7 @@ export const MsgSetDenomPairTakerFeeResponse = { }, toAmino(message: MsgSetDenomPairTakerFeeResponse, useInterfaces: boolean = false): MsgSetDenomPairTakerFeeResponseAmino { const obj: any = {}; - obj.success = message.success; + obj.success = message.success === false ? undefined : message.success; return obj; }, fromAminoMsg(object: MsgSetDenomPairTakerFeeResponseAminoMsg): MsgSetDenomPairTakerFeeResponse { @@ -1180,9 +1180,9 @@ export const DenomPairTakerFee = { }, toAmino(message: DenomPairTakerFee, useInterfaces: boolean = false): DenomPairTakerFeeAmino { const obj: any = {}; - obj.denom0 = message.denom0; - obj.denom1 = message.denom1; - obj.taker_fee = message.takerFee; + obj.denom0 = message.denom0 === "" ? undefined : message.denom0; + obj.denom1 = message.denom1 === "" ? undefined : message.denom1; + obj.taker_fee = message.takerFee === "" ? undefined : message.takerFee; return obj; }, fromAminoMsg(object: DenomPairTakerFeeAminoMsg): DenomPairTakerFee { diff --git a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/genesis.ts b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/genesis.ts index b576673508..bb84e8dc0b 100644 --- a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/genesis.ts @@ -293,29 +293,29 @@ export const GenesisState = { if (message.tokenPairArbRoutes) { obj.token_pair_arb_routes = message.tokenPairArbRoutes.map(e => e ? TokenPairArbRoutes.toAmino(e, useInterfaces) : undefined); } else { - obj.token_pair_arb_routes = []; + obj.token_pair_arb_routes = message.tokenPairArbRoutes; } if (message.baseDenoms) { obj.base_denoms = message.baseDenoms.map(e => e ? BaseDenom.toAmino(e, useInterfaces) : undefined); } else { - obj.base_denoms = []; + obj.base_denoms = message.baseDenoms; } obj.pool_weights = message.poolWeights ? PoolWeights.toAmino(message.poolWeights, useInterfaces) : undefined; - obj.days_since_module_genesis = message.daysSinceModuleGenesis ? message.daysSinceModuleGenesis.toString() : undefined; + obj.days_since_module_genesis = message.daysSinceModuleGenesis !== BigInt(0) ? message.daysSinceModuleGenesis.toString() : undefined; if (message.developerFees) { obj.developer_fees = message.developerFees.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.developer_fees = []; + obj.developer_fees = message.developerFees; } - obj.latest_block_height = message.latestBlockHeight ? message.latestBlockHeight.toString() : undefined; - obj.developer_address = message.developerAddress; - obj.max_pool_points_per_block = message.maxPoolPointsPerBlock ? message.maxPoolPointsPerBlock.toString() : undefined; - obj.max_pool_points_per_tx = message.maxPoolPointsPerTx ? message.maxPoolPointsPerTx.toString() : undefined; - obj.point_count_for_block = message.pointCountForBlock ? message.pointCountForBlock.toString() : undefined; + obj.latest_block_height = message.latestBlockHeight !== BigInt(0) ? message.latestBlockHeight.toString() : undefined; + obj.developer_address = message.developerAddress === "" ? undefined : message.developerAddress; + obj.max_pool_points_per_block = message.maxPoolPointsPerBlock !== BigInt(0) ? message.maxPoolPointsPerBlock.toString() : undefined; + obj.max_pool_points_per_tx = message.maxPoolPointsPerTx !== BigInt(0) ? message.maxPoolPointsPerTx.toString() : undefined; + obj.point_count_for_block = message.pointCountForBlock !== BigInt(0) ? message.pointCountForBlock.toString() : undefined; if (message.profits) { obj.profits = message.profits.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.profits = []; + obj.profits = message.profits; } obj.info_by_pool_type = message.infoByPoolType ? InfoByPoolType.toAmino(message.infoByPoolType, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/gov.ts b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/gov.ts index 208471e270..fbb2456be8 100644 --- a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/gov.ts +++ b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/gov.ts @@ -144,9 +144,9 @@ export const SetProtoRevEnabledProposal = { }, toAmino(message: SetProtoRevEnabledProposal, useInterfaces: boolean = false): SetProtoRevEnabledProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.enabled = message.enabled; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.enabled = message.enabled === false ? undefined : message.enabled; return obj; }, fromAminoMsg(object: SetProtoRevEnabledProposalAminoMsg): SetProtoRevEnabledProposal { @@ -238,9 +238,9 @@ export const SetProtoRevAdminAccountProposal = { }, toAmino(message: SetProtoRevAdminAccountProposal, useInterfaces: boolean = false): SetProtoRevAdminAccountProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.account = message.account; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.account = message.account === "" ? undefined : message.account; return obj; }, fromAminoMsg(object: SetProtoRevAdminAccountProposalAminoMsg): SetProtoRevAdminAccountProposal { diff --git a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/params.ts b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/params.ts index 60442abcde..638c2042e9 100644 --- a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/params.ts @@ -81,8 +81,8 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.enabled = message.enabled; - obj.admin = message.admin; + obj.enabled = message.enabled === false ? undefined : message.enabled; + obj.admin = message.admin === "" ? undefined : message.admin; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/protorev.ts b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/protorev.ts index 5a3a56a681..f11164e61a 100644 --- a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/protorev.ts +++ b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/protorev.ts @@ -516,10 +516,10 @@ export const TokenPairArbRoutes = { if (message.arbRoutes) { obj.arb_routes = message.arbRoutes.map(e => e ? Route.toAmino(e, useInterfaces) : undefined); } else { - obj.arb_routes = []; + obj.arb_routes = message.arbRoutes; } - obj.token_in = message.tokenIn; - obj.token_out = message.tokenOut; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; + obj.token_out = message.tokenOut === "" ? undefined : message.tokenOut; return obj; }, fromAminoMsg(object: TokenPairArbRoutesAminoMsg): TokenPairArbRoutes { @@ -600,9 +600,9 @@ export const Route = { if (message.trades) { obj.trades = message.trades.map(e => e ? Trade.toAmino(e, useInterfaces) : undefined); } else { - obj.trades = []; + obj.trades = message.trades; } - obj.step_size = message.stepSize; + obj.step_size = message.stepSize === "" ? undefined : message.stepSize; return obj; }, fromAminoMsg(object: RouteAminoMsg): Route { @@ -693,9 +693,9 @@ export const Trade = { }, toAmino(message: Trade, useInterfaces: boolean = false): TradeAmino { const obj: any = {}; - obj.pool = message.pool ? message.pool.toString() : undefined; - obj.token_in = message.tokenIn; - obj.token_out = message.tokenOut; + obj.pool = message.pool !== BigInt(0) ? message.pool.toString() : undefined; + obj.token_in = message.tokenIn === "" ? undefined : message.tokenIn; + obj.token_out = message.tokenOut === "" ? undefined : message.tokenOut; return obj; }, fromAminoMsg(object: TradeAminoMsg): Trade { @@ -794,13 +794,13 @@ export const RouteStatistics = { if (message.profits) { obj.profits = message.profits.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.profits = []; + obj.profits = message.profits; } - obj.number_of_trades = message.numberOfTrades; + obj.number_of_trades = message.numberOfTrades === "" ? undefined : message.numberOfTrades; if (message.route) { obj.route = message.route.map(e => e.toString()); } else { - obj.route = []; + obj.route = message.route; } return obj; }, @@ -903,10 +903,10 @@ export const PoolWeights = { }, toAmino(message: PoolWeights, useInterfaces: boolean = false): PoolWeightsAmino { const obj: any = {}; - obj.stable_weight = message.stableWeight ? message.stableWeight.toString() : undefined; - obj.balancer_weight = message.balancerWeight ? message.balancerWeight.toString() : undefined; - obj.concentrated_weight = message.concentratedWeight ? message.concentratedWeight.toString() : undefined; - obj.cosmwasm_weight = message.cosmwasmWeight ? message.cosmwasmWeight.toString() : undefined; + obj.stable_weight = message.stableWeight !== BigInt(0) ? message.stableWeight.toString() : undefined; + obj.balancer_weight = message.balancerWeight !== BigInt(0) ? message.balancerWeight.toString() : undefined; + obj.concentrated_weight = message.concentratedWeight !== BigInt(0) ? message.concentratedWeight.toString() : undefined; + obj.cosmwasm_weight = message.cosmwasmWeight !== BigInt(0) ? message.cosmwasmWeight.toString() : undefined; return obj; }, fromAminoMsg(object: PoolWeightsAminoMsg): PoolWeights { @@ -1080,7 +1080,7 @@ export const StablePoolInfo = { }, toAmino(message: StablePoolInfo, useInterfaces: boolean = false): StablePoolInfoAmino { const obj: any = {}; - obj.weight = message.weight ? message.weight.toString() : undefined; + obj.weight = message.weight !== BigInt(0) ? message.weight.toString() : undefined; return obj; }, fromAminoMsg(object: StablePoolInfoAminoMsg): StablePoolInfo { @@ -1149,7 +1149,7 @@ export const BalancerPoolInfo = { }, toAmino(message: BalancerPoolInfo, useInterfaces: boolean = false): BalancerPoolInfoAmino { const obj: any = {}; - obj.weight = message.weight ? message.weight.toString() : undefined; + obj.weight = message.weight !== BigInt(0) ? message.weight.toString() : undefined; return obj; }, fromAminoMsg(object: BalancerPoolInfoAminoMsg): BalancerPoolInfo { @@ -1229,8 +1229,8 @@ export const ConcentratedPoolInfo = { }, toAmino(message: ConcentratedPoolInfo, useInterfaces: boolean = false): ConcentratedPoolInfoAmino { const obj: any = {}; - obj.weight = message.weight ? message.weight.toString() : undefined; - obj.max_ticks_crossed = message.maxTicksCrossed ? message.maxTicksCrossed.toString() : undefined; + obj.weight = message.weight !== BigInt(0) ? message.weight.toString() : undefined; + obj.max_ticks_crossed = message.maxTicksCrossed !== BigInt(0) ? message.maxTicksCrossed.toString() : undefined; return obj; }, fromAminoMsg(object: ConcentratedPoolInfoAminoMsg): ConcentratedPoolInfo { @@ -1300,7 +1300,7 @@ export const CosmwasmPoolInfo = { if (message.weightMaps) { obj.weight_maps = message.weightMaps.map(e => e ? WeightMap.toAmino(e, useInterfaces) : undefined); } else { - obj.weight_maps = []; + obj.weight_maps = message.weightMaps; } return obj; }, @@ -1381,8 +1381,8 @@ export const WeightMap = { }, toAmino(message: WeightMap, useInterfaces: boolean = false): WeightMapAmino { const obj: any = {}; - obj.weight = message.weight ? message.weight.toString() : undefined; - obj.contract_address = message.contractAddress; + obj.weight = message.weight !== BigInt(0) ? message.weight.toString() : undefined; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; return obj; }, fromAminoMsg(object: WeightMapAminoMsg): WeightMap { @@ -1462,8 +1462,8 @@ export const BaseDenom = { }, toAmino(message: BaseDenom, useInterfaces: boolean = false): BaseDenomAmino { const obj: any = {}; - obj.denom = message.denom; - obj.step_size = message.stepSize; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.step_size = message.stepSize === "" ? undefined : message.stepSize; return obj; }, fromAminoMsg(object: BaseDenomAminoMsg): BaseDenom { diff --git a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/query.ts b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/query.ts index 7d6acb1d1b..64287a967c 100644 --- a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/query.ts @@ -1091,7 +1091,7 @@ export const QueryGetProtoRevNumberOfTradesResponse = { }, toAmino(message: QueryGetProtoRevNumberOfTradesResponse, useInterfaces: boolean = false): QueryGetProtoRevNumberOfTradesResponseAmino { const obj: any = {}; - obj.number_of_trades = message.numberOfTrades; + obj.number_of_trades = message.numberOfTrades === "" ? undefined : message.numberOfTrades; return obj; }, fromAminoMsg(object: QueryGetProtoRevNumberOfTradesResponseAminoMsg): QueryGetProtoRevNumberOfTradesResponse { @@ -1160,7 +1160,7 @@ export const QueryGetProtoRevProfitsByDenomRequest = { }, toAmino(message: QueryGetProtoRevProfitsByDenomRequest, useInterfaces: boolean = false): QueryGetProtoRevProfitsByDenomRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryGetProtoRevProfitsByDenomRequestAminoMsg): QueryGetProtoRevProfitsByDenomRequest { @@ -1355,7 +1355,7 @@ export const QueryGetProtoRevAllProfitsResponse = { if (message.profits) { obj.profits = message.profits.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.profits = []; + obj.profits = message.profits; } return obj; }, @@ -1435,7 +1435,7 @@ export const QueryGetProtoRevStatisticsByRouteRequest = { if (message.route) { obj.route = message.route.map(e => e.toString()); } else { - obj.route = []; + obj.route = message.route; } return obj; }, @@ -1631,7 +1631,7 @@ export const QueryGetProtoRevAllRouteStatisticsResponse = { if (message.statistics) { obj.statistics = message.statistics.map(e => e ? RouteStatistics.toAmino(e, useInterfaces) : undefined); } else { - obj.statistics = []; + obj.statistics = message.statistics; } return obj; }, @@ -1758,7 +1758,7 @@ export const QueryGetProtoRevTokenPairArbRoutesResponse = { if (message.routes) { obj.routes = message.routes.map(e => e ? TokenPairArbRoutes.toAmino(e, useInterfaces) : undefined); } else { - obj.routes = []; + obj.routes = message.routes; } return obj; }, @@ -1884,7 +1884,7 @@ export const QueryGetProtoRevAdminAccountResponse = { }, toAmino(message: QueryGetProtoRevAdminAccountResponse, useInterfaces: boolean = false): QueryGetProtoRevAdminAccountResponseAmino { const obj: any = {}; - obj.admin_account = message.adminAccount; + obj.admin_account = message.adminAccount === "" ? undefined : message.adminAccount; return obj; }, fromAminoMsg(object: QueryGetProtoRevAdminAccountResponseAminoMsg): QueryGetProtoRevAdminAccountResponse { @@ -2009,7 +2009,7 @@ export const QueryGetProtoRevDeveloperAccountResponse = { }, toAmino(message: QueryGetProtoRevDeveloperAccountResponse, useInterfaces: boolean = false): QueryGetProtoRevDeveloperAccountResponseAmino { const obj: any = {}; - obj.developer_account = message.developerAccount; + obj.developer_account = message.developerAccount === "" ? undefined : message.developerAccount; return obj; }, fromAminoMsg(object: QueryGetProtoRevDeveloperAccountResponseAminoMsg): QueryGetProtoRevDeveloperAccountResponse { @@ -2259,7 +2259,7 @@ export const QueryGetProtoRevMaxPoolPointsPerBlockResponse = { }, toAmino(message: QueryGetProtoRevMaxPoolPointsPerBlockResponse, useInterfaces: boolean = false): QueryGetProtoRevMaxPoolPointsPerBlockResponseAmino { const obj: any = {}; - obj.max_pool_points_per_block = message.maxPoolPointsPerBlock ? message.maxPoolPointsPerBlock.toString() : undefined; + obj.max_pool_points_per_block = message.maxPoolPointsPerBlock !== BigInt(0) ? message.maxPoolPointsPerBlock.toString() : undefined; return obj; }, fromAminoMsg(object: QueryGetProtoRevMaxPoolPointsPerBlockResponseAminoMsg): QueryGetProtoRevMaxPoolPointsPerBlockResponse { @@ -2384,7 +2384,7 @@ export const QueryGetProtoRevMaxPoolPointsPerTxResponse = { }, toAmino(message: QueryGetProtoRevMaxPoolPointsPerTxResponse, useInterfaces: boolean = false): QueryGetProtoRevMaxPoolPointsPerTxResponseAmino { const obj: any = {}; - obj.max_pool_points_per_tx = message.maxPoolPointsPerTx ? message.maxPoolPointsPerTx.toString() : undefined; + obj.max_pool_points_per_tx = message.maxPoolPointsPerTx !== BigInt(0) ? message.maxPoolPointsPerTx.toString() : undefined; return obj; }, fromAminoMsg(object: QueryGetProtoRevMaxPoolPointsPerTxResponseAminoMsg): QueryGetProtoRevMaxPoolPointsPerTxResponse { @@ -2510,7 +2510,7 @@ export const QueryGetProtoRevBaseDenomsResponse = { if (message.baseDenoms) { obj.base_denoms = message.baseDenoms.map(e => e ? BaseDenom.toAmino(e, useInterfaces) : undefined); } else { - obj.base_denoms = []; + obj.base_denoms = message.baseDenoms; } return obj; }, @@ -2636,7 +2636,7 @@ export const QueryGetProtoRevEnabledResponse = { }, toAmino(message: QueryGetProtoRevEnabledResponse, useInterfaces: boolean = false): QueryGetProtoRevEnabledResponseAmino { const obj: any = {}; - obj.enabled = message.enabled; + obj.enabled = message.enabled === false ? undefined : message.enabled; return obj; }, fromAminoMsg(object: QueryGetProtoRevEnabledResponseAminoMsg): QueryGetProtoRevEnabledResponse { @@ -2716,8 +2716,8 @@ export const QueryGetProtoRevPoolRequest = { }, toAmino(message: QueryGetProtoRevPoolRequest, useInterfaces: boolean = false): QueryGetProtoRevPoolRequestAmino { const obj: any = {}; - obj.base_denom = message.baseDenom; - obj.other_denom = message.otherDenom; + obj.base_denom = message.baseDenom === "" ? undefined : message.baseDenom; + obj.other_denom = message.otherDenom === "" ? undefined : message.otherDenom; return obj; }, fromAminoMsg(object: QueryGetProtoRevPoolRequestAminoMsg): QueryGetProtoRevPoolRequest { @@ -2786,7 +2786,7 @@ export const QueryGetProtoRevPoolResponse = { }, toAmino(message: QueryGetProtoRevPoolResponse, useInterfaces: boolean = false): QueryGetProtoRevPoolResponseAmino { const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryGetProtoRevPoolResponseAminoMsg): QueryGetProtoRevPoolResponse { diff --git a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/tx.ts b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/tx.ts index 09ea8fb36e..6570e3949d 100644 --- a/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/protorev/v1beta1/tx.ts @@ -360,11 +360,11 @@ export const MsgSetHotRoutes = { }, toAmino(message: MsgSetHotRoutes, useInterfaces: boolean = false): MsgSetHotRoutesAmino { const obj: any = {}; - obj.admin = message.admin; + obj.admin = message.admin === "" ? undefined : message.admin; if (message.hotRoutes) { obj.hot_routes = message.hotRoutes.map(e => e ? TokenPairArbRoutes.toAmino(e, useInterfaces) : undefined); } else { - obj.hot_routes = []; + obj.hot_routes = message.hotRoutes; } return obj; }, @@ -501,8 +501,8 @@ export const MsgSetDeveloperAccount = { }, toAmino(message: MsgSetDeveloperAccount, useInterfaces: boolean = false): MsgSetDeveloperAccountAmino { const obj: any = {}; - obj.admin = message.admin; - obj.developer_account = message.developerAccount; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.developer_account = message.developerAccount === "" ? undefined : message.developerAccount; return obj; }, fromAminoMsg(object: MsgSetDeveloperAccountAminoMsg): MsgSetDeveloperAccount { @@ -638,7 +638,7 @@ export const MsgSetInfoByPoolType = { }, toAmino(message: MsgSetInfoByPoolType, useInterfaces: boolean = false): MsgSetInfoByPoolTypeAmino { const obj: any = {}; - obj.admin = message.admin; + obj.admin = message.admin === "" ? undefined : message.admin; obj.info_by_pool_type = message.infoByPoolType ? InfoByPoolType.toAmino(message.infoByPoolType, useInterfaces) : undefined; return obj; }, @@ -775,8 +775,8 @@ export const MsgSetMaxPoolPointsPerTx = { }, toAmino(message: MsgSetMaxPoolPointsPerTx, useInterfaces: boolean = false): MsgSetMaxPoolPointsPerTxAmino { const obj: any = {}; - obj.admin = message.admin; - obj.max_pool_points_per_tx = message.maxPoolPointsPerTx ? message.maxPoolPointsPerTx.toString() : undefined; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.max_pool_points_per_tx = message.maxPoolPointsPerTx !== BigInt(0) ? message.maxPoolPointsPerTx.toString() : undefined; return obj; }, fromAminoMsg(object: MsgSetMaxPoolPointsPerTxAminoMsg): MsgSetMaxPoolPointsPerTx { @@ -912,8 +912,8 @@ export const MsgSetMaxPoolPointsPerBlock = { }, toAmino(message: MsgSetMaxPoolPointsPerBlock, useInterfaces: boolean = false): MsgSetMaxPoolPointsPerBlockAmino { const obj: any = {}; - obj.admin = message.admin; - obj.max_pool_points_per_block = message.maxPoolPointsPerBlock ? message.maxPoolPointsPerBlock.toString() : undefined; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.max_pool_points_per_block = message.maxPoolPointsPerBlock !== BigInt(0) ? message.maxPoolPointsPerBlock.toString() : undefined; return obj; }, fromAminoMsg(object: MsgSetMaxPoolPointsPerBlockAminoMsg): MsgSetMaxPoolPointsPerBlock { @@ -1047,11 +1047,11 @@ export const MsgSetBaseDenoms = { }, toAmino(message: MsgSetBaseDenoms, useInterfaces: boolean = false): MsgSetBaseDenomsAmino { const obj: any = {}; - obj.admin = message.admin; + obj.admin = message.admin === "" ? undefined : message.admin; if (message.baseDenoms) { obj.base_denoms = message.baseDenoms.map(e => e ? BaseDenom.toAmino(e, useInterfaces) : undefined); } else { - obj.base_denoms = []; + obj.base_denoms = message.baseDenoms; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/genesis.ts b/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/genesis.ts index 0525073792..fcdd5f992a 100644 --- a/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/genesis.ts @@ -138,11 +138,11 @@ export const AuthenticatorData = { }, toAmino(message: AuthenticatorData, useInterfaces: boolean = false): AuthenticatorDataAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; if (message.authenticators) { obj.authenticators = message.authenticators.map(e => e ? AccountAuthenticator.toAmino(e, useInterfaces) : undefined); } else { - obj.authenticators = []; + obj.authenticators = message.authenticators; } return obj; }, @@ -233,11 +233,11 @@ export const GenesisState = { toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; - obj.next_authenticator_id = message.nextAuthenticatorId ? message.nextAuthenticatorId.toString() : undefined; + obj.next_authenticator_id = message.nextAuthenticatorId !== BigInt(0) ? message.nextAuthenticatorId.toString() : undefined; if (message.authenticatorData) { obj.authenticator_data = message.authenticatorData.map(e => e ? AuthenticatorData.toAmino(e, useInterfaces) : undefined); } else { - obj.authenticator_data = []; + obj.authenticator_data = message.authenticatorData; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/models.ts b/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/models.ts index 330cf8feaf..cb82b5304e 100644 --- a/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/models.ts +++ b/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/models.ts @@ -128,8 +128,8 @@ export const AccountAuthenticator = { }, toAmino(message: AccountAuthenticator, useInterfaces: boolean = false): AccountAuthenticatorAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.type = message.type; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.type = message.type === "" ? undefined : message.type; obj.config = message.config ? base64FromBytes(message.config) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/params.ts b/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/params.ts index 3d3563f933..6ff659f3aa 100644 --- a/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/params.ts @@ -117,12 +117,12 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.maximum_unauthenticated_gas = message.maximumUnauthenticatedGas ? message.maximumUnauthenticatedGas.toString() : undefined; - obj.is_smart_account_active = message.isSmartAccountActive; + obj.maximum_unauthenticated_gas = message.maximumUnauthenticatedGas !== BigInt(0) ? message.maximumUnauthenticatedGas.toString() : undefined; + obj.is_smart_account_active = message.isSmartAccountActive === false ? undefined : message.isSmartAccountActive; if (message.circuitBreakerControllers) { obj.circuit_breaker_controllers = message.circuitBreakerControllers.map(e => e); } else { - obj.circuit_breaker_controllers = []; + obj.circuit_breaker_controllers = message.circuitBreakerControllers; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/query.ts b/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/query.ts index f9592c165b..5b123bc071 100644 --- a/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/query.ts @@ -40,7 +40,6 @@ export interface QueryParamsResponseSDKType { } /** MsgGetAuthenticatorsRequest defines the Msg/GetAuthenticators request type. */ export interface GetAuthenticatorsRequest { - /** MsgGetAuthenticatorsRequest defines the Msg/GetAuthenticators request type. */ account: string; } export interface GetAuthenticatorsRequestProtoMsg { @@ -49,7 +48,6 @@ export interface GetAuthenticatorsRequestProtoMsg { } /** MsgGetAuthenticatorsRequest defines the Msg/GetAuthenticators request type. */ export interface GetAuthenticatorsRequestAmino { - /** MsgGetAuthenticatorsRequest defines the Msg/GetAuthenticators request type. */ account?: string; } export interface GetAuthenticatorsRequestAminoMsg { @@ -292,7 +290,7 @@ export const GetAuthenticatorsRequest = { }, toAmino(message: GetAuthenticatorsRequest, useInterfaces: boolean = false): GetAuthenticatorsRequestAmino { const obj: any = {}; - obj.account = message.account; + obj.account = message.account === "" ? undefined : message.account; return obj; }, fromAminoMsg(object: GetAuthenticatorsRequestAminoMsg): GetAuthenticatorsRequest { @@ -362,7 +360,7 @@ export const GetAuthenticatorsResponse = { if (message.accountAuthenticators) { obj.account_authenticators = message.accountAuthenticators.map(e => e ? AccountAuthenticator.toAmino(e, useInterfaces) : undefined); } else { - obj.account_authenticators = []; + obj.account_authenticators = message.accountAuthenticators; } return obj; }, @@ -443,8 +441,8 @@ export const GetAuthenticatorRequest = { }, toAmino(message: GetAuthenticatorRequest, useInterfaces: boolean = false): GetAuthenticatorRequestAmino { const obj: any = {}; - obj.account = message.account; - obj.authenticator_id = message.authenticatorId ? message.authenticatorId.toString() : undefined; + obj.account = message.account === "" ? undefined : message.account; + obj.authenticator_id = message.authenticatorId !== BigInt(0) ? message.authenticatorId.toString() : undefined; return obj; }, fromAminoMsg(object: GetAuthenticatorRequestAminoMsg): GetAuthenticatorRequest { diff --git a/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/tx.ts b/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/tx.ts index 82d8d6fee7..34c7f93b4c 100644 --- a/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/smartaccount/v1beta1/tx.ts @@ -29,7 +29,6 @@ export interface MsgAddAuthenticatorSDKType { } /** MsgAddAuthenticatorResponse defines the Msg/AddAuthenticator response type. */ export interface MsgAddAuthenticatorResponse { - /** MsgAddAuthenticatorResponse defines the Msg/AddAuthenticator response type. */ success: boolean; } export interface MsgAddAuthenticatorResponseProtoMsg { @@ -38,7 +37,6 @@ export interface MsgAddAuthenticatorResponseProtoMsg { } /** MsgAddAuthenticatorResponse defines the Msg/AddAuthenticator response type. */ export interface MsgAddAuthenticatorResponseAmino { - /** MsgAddAuthenticatorResponse defines the Msg/AddAuthenticator response type. */ success?: boolean; } export interface MsgAddAuthenticatorResponseAminoMsg { @@ -86,10 +84,6 @@ export interface MsgRemoveAuthenticatorSDKType { * type. */ export interface MsgRemoveAuthenticatorResponse { - /** - * MsgRemoveAuthenticatorResponse defines the Msg/RemoveAuthenticator response - * type. - */ success: boolean; } export interface MsgRemoveAuthenticatorResponseProtoMsg { @@ -101,10 +95,6 @@ export interface MsgRemoveAuthenticatorResponseProtoMsg { * type. */ export interface MsgRemoveAuthenticatorResponseAmino { - /** - * MsgRemoveAuthenticatorResponse defines the Msg/RemoveAuthenticator response - * type. - */ success?: boolean; } export interface MsgRemoveAuthenticatorResponseAminoMsg { @@ -252,8 +242,8 @@ export const MsgAddAuthenticator = { }, toAmino(message: MsgAddAuthenticator, useInterfaces: boolean = false): MsgAddAuthenticatorAmino { const obj: any = {}; - obj.sender = message.sender; - obj.type = message.type; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.type = message.type === "" ? undefined : message.type; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -323,7 +313,7 @@ export const MsgAddAuthenticatorResponse = { }, toAmino(message: MsgAddAuthenticatorResponse, useInterfaces: boolean = false): MsgAddAuthenticatorResponseAmino { const obj: any = {}; - obj.success = message.success; + obj.success = message.success === false ? undefined : message.success; return obj; }, fromAminoMsg(object: MsgAddAuthenticatorResponseAminoMsg): MsgAddAuthenticatorResponse { @@ -403,8 +393,8 @@ export const MsgRemoveAuthenticator = { }, toAmino(message: MsgRemoveAuthenticator, useInterfaces: boolean = false): MsgRemoveAuthenticatorAmino { const obj: any = {}; - obj.sender = message.sender; - obj.id = message.id ? message.id.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; return obj; }, fromAminoMsg(object: MsgRemoveAuthenticatorAminoMsg): MsgRemoveAuthenticator { @@ -473,7 +463,7 @@ export const MsgRemoveAuthenticatorResponse = { }, toAmino(message: MsgRemoveAuthenticatorResponse, useInterfaces: boolean = false): MsgRemoveAuthenticatorResponseAmino { const obj: any = {}; - obj.success = message.success; + obj.success = message.success === false ? undefined : message.success; return obj; }, fromAminoMsg(object: MsgRemoveAuthenticatorResponseAminoMsg): MsgRemoveAuthenticatorResponse { @@ -553,8 +543,8 @@ export const MsgSetActiveState = { }, toAmino(message: MsgSetActiveState, useInterfaces: boolean = false): MsgSetActiveStateAmino { const obj: any = {}; - obj.sender = message.sender; - obj.active = message.active; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.active = message.active === false ? undefined : message.active; return obj; }, fromAminoMsg(object: MsgSetActiveStateAminoMsg): MsgSetActiveState { @@ -689,7 +679,7 @@ export const TxExtension = { if (message.selectedAuthenticators) { obj.selected_authenticators = message.selectedAuthenticators.map(e => e.toString()); } else { - obj.selected_authenticators = []; + obj.selected_authenticators = message.selectedAuthenticators; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/superfluid/genesis.ts b/packages/types/protobuf/codegen/osmosis/superfluid/genesis.ts index 91587065cc..5d8210ee07 100644 --- a/packages/types/protobuf/codegen/osmosis/superfluid/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/superfluid/genesis.ts @@ -142,22 +142,22 @@ export const GenesisState = { if (message.superfluidAssets) { obj.superfluid_assets = message.superfluidAssets.map(e => e ? SuperfluidAsset.toAmino(e, useInterfaces) : undefined); } else { - obj.superfluid_assets = []; + obj.superfluid_assets = message.superfluidAssets; } if (message.osmoEquivalentMultipliers) { obj.osmo_equivalent_multipliers = message.osmoEquivalentMultipliers.map(e => e ? OsmoEquivalentMultiplierRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.osmo_equivalent_multipliers = []; + obj.osmo_equivalent_multipliers = message.osmoEquivalentMultipliers; } if (message.intermediaryAccounts) { obj.intermediary_accounts = message.intermediaryAccounts.map(e => e ? SuperfluidIntermediaryAccount.toAmino(e, useInterfaces) : undefined); } else { - obj.intermediary_accounts = []; + obj.intermediary_accounts = message.intermediaryAccounts; } if (message.intemediaryAccountConnections) { obj.intemediary_account_connections = message.intemediaryAccountConnections.map(e => e ? LockIdIntermediaryAccountConnection.toAmino(e, useInterfaces) : undefined); } else { - obj.intemediary_account_connections = []; + obj.intemediary_account_connections = message.intemediaryAccountConnections; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/superfluid/params.ts b/packages/types/protobuf/codegen/osmosis/superfluid/params.ts index b53febb7c3..2de3f5ab1b 100644 --- a/packages/types/protobuf/codegen/osmosis/superfluid/params.ts +++ b/packages/types/protobuf/codegen/osmosis/superfluid/params.ts @@ -76,7 +76,7 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.minimum_risk_factor = message.minimumRiskFactor; + obj.minimum_risk_factor = message.minimumRiskFactor === "" ? undefined : message.minimumRiskFactor; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/osmosis/superfluid/query.ts b/packages/types/protobuf/codegen/osmosis/superfluid/query.ts index 96b5998740..de2e0f3877 100644 --- a/packages/types/protobuf/codegen/osmosis/superfluid/query.ts +++ b/packages/types/protobuf/codegen/osmosis/superfluid/query.ts @@ -1,7 +1,7 @@ //@ts-nocheck import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../cosmos/base/query/v1beta1/pagination"; import { Params, ParamsAmino, ParamsSDKType } from "./params"; -import { SuperfluidAssetType, SuperfluidAsset, SuperfluidAssetAmino, SuperfluidAssetSDKType, OsmoEquivalentMultiplierRecord, OsmoEquivalentMultiplierRecordAmino, OsmoEquivalentMultiplierRecordSDKType, SuperfluidDelegationRecord, SuperfluidDelegationRecordAmino, SuperfluidDelegationRecordSDKType, ConcentratedPoolUserPositionRecord, ConcentratedPoolUserPositionRecordAmino, ConcentratedPoolUserPositionRecordSDKType, superfluidAssetTypeFromJSON } from "./superfluid"; +import { SuperfluidAssetType, SuperfluidAsset, SuperfluidAssetAmino, SuperfluidAssetSDKType, OsmoEquivalentMultiplierRecord, OsmoEquivalentMultiplierRecordAmino, OsmoEquivalentMultiplierRecordSDKType, SuperfluidDelegationRecord, SuperfluidDelegationRecordAmino, SuperfluidDelegationRecordSDKType, ConcentratedPoolUserPositionRecord, ConcentratedPoolUserPositionRecordAmino, ConcentratedPoolUserPositionRecordSDKType } from "./superfluid"; import { Coin, CoinAmino, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; import { SyntheticLock, SyntheticLockAmino, SyntheticLockSDKType } from "../lockup/lock"; import { DelegationResponse, DelegationResponseAmino, DelegationResponseSDKType } from "../../cosmos/staking/v1beta1/staking"; @@ -819,7 +819,7 @@ export const AssetTypeRequest = { }, toAmino(message: AssetTypeRequest, useInterfaces: boolean = false): AssetTypeRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: AssetTypeRequestAminoMsg): AssetTypeRequest { @@ -882,13 +882,13 @@ export const AssetTypeResponse = { fromAmino(object: AssetTypeResponseAmino): AssetTypeResponse { const message = createBaseAssetTypeResponse(); if (object.asset_type !== undefined && object.asset_type !== null) { - message.assetType = superfluidAssetTypeFromJSON(object.asset_type); + message.assetType = object.asset_type; } return message; }, toAmino(message: AssetTypeResponse, useInterfaces: boolean = false): AssetTypeResponseAmino { const obj: any = {}; - obj.asset_type = message.assetType; + obj.asset_type = message.assetType === 0 ? undefined : message.assetType; return obj; }, fromAminoMsg(object: AssetTypeResponseAminoMsg): AssetTypeResponse { @@ -1014,7 +1014,7 @@ export const AllAssetsResponse = { if (message.assets) { obj.assets = message.assets.map(e => e ? SuperfluidAsset.toAmino(e, useInterfaces) : undefined); } else { - obj.assets = []; + obj.assets = message.assets; } return obj; }, @@ -1084,7 +1084,7 @@ export const AssetMultiplierRequest = { }, toAmino(message: AssetMultiplierRequest, useInterfaces: boolean = false): AssetMultiplierRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: AssetMultiplierRequestAminoMsg): AssetMultiplierRequest { @@ -1255,10 +1255,10 @@ export const SuperfluidIntermediaryAccountInfo = { }, toAmino(message: SuperfluidIntermediaryAccountInfo, useInterfaces: boolean = false): SuperfluidIntermediaryAccountInfoAmino { const obj: any = {}; - obj.denom = message.denom; - obj.val_addr = message.valAddr; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - obj.address = message.address; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.val_addr = message.valAddr === "" ? undefined : message.valAddr; + obj.gauge_id = message.gaugeId !== BigInt(0) ? message.gaugeId.toString() : undefined; + obj.address = message.address === "" ? undefined : message.address; return obj; }, fromAminoMsg(object: SuperfluidIntermediaryAccountInfoAminoMsg): SuperfluidIntermediaryAccountInfo { @@ -1408,7 +1408,7 @@ export const AllIntermediaryAccountsResponse = { if (message.accounts) { obj.accounts = message.accounts.map(e => e ? SuperfluidIntermediaryAccountInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.accounts = []; + obj.accounts = message.accounts; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1479,7 +1479,7 @@ export const ConnectedIntermediaryAccountRequest = { }, toAmino(message: ConnectedIntermediaryAccountRequest, useInterfaces: boolean = false): ConnectedIntermediaryAccountRequestAmino { const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; return obj; }, fromAminoMsg(object: ConnectedIntermediaryAccountRequestAminoMsg): ConnectedIntermediaryAccountRequest { @@ -1617,7 +1617,7 @@ export const QueryTotalDelegationByValidatorForDenomRequest = { }, toAmino(message: QueryTotalDelegationByValidatorForDenomRequest, useInterfaces: boolean = false): QueryTotalDelegationByValidatorForDenomRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryTotalDelegationByValidatorForDenomRequestAminoMsg): QueryTotalDelegationByValidatorForDenomRequest { @@ -1687,7 +1687,7 @@ export const QueryTotalDelegationByValidatorForDenomResponse = { if (message.assets) { obj.assets = message.assets.map(e => e ? Delegations.toAmino(e, useInterfaces) : undefined); } else { - obj.assets = []; + obj.assets = message.assets; } return obj; }, @@ -1779,9 +1779,9 @@ export const Delegations = { }, toAmino(message: Delegations, useInterfaces: boolean = false): DelegationsAmino { const obj: any = {}; - obj.val_addr = message.valAddr; - obj.amount_sfsd = message.amountSfsd; - obj.osmo_equivalent = message.osmoEquivalent; + obj.val_addr = message.valAddr === "" ? undefined : message.valAddr; + obj.amount_sfsd = message.amountSfsd === "" ? undefined : message.amountSfsd; + obj.osmo_equivalent = message.osmoEquivalent === "" ? undefined : message.osmoEquivalent; return obj; }, fromAminoMsg(object: DelegationsAminoMsg): Delegations { @@ -1906,7 +1906,7 @@ export const TotalSuperfluidDelegationsResponse = { }, toAmino(message: TotalSuperfluidDelegationsResponse, useInterfaces: boolean = false): TotalSuperfluidDelegationsResponseAmino { const obj: any = {}; - obj.total_delegations = message.totalDelegations; + obj.total_delegations = message.totalDelegations === "" ? undefined : message.totalDelegations; return obj; }, fromAminoMsg(object: TotalSuperfluidDelegationsResponseAminoMsg): TotalSuperfluidDelegationsResponse { @@ -1997,9 +1997,9 @@ export const SuperfluidDelegationAmountRequest = { }, toAmino(message: SuperfluidDelegationAmountRequest, useInterfaces: boolean = false): SuperfluidDelegationAmountRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: SuperfluidDelegationAmountRequestAminoMsg): SuperfluidDelegationAmountRequest { @@ -2069,7 +2069,7 @@ export const SuperfluidDelegationAmountResponse = { if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, @@ -2139,7 +2139,7 @@ export const SuperfluidDelegationsByDelegatorRequest = { }, toAmino(message: SuperfluidDelegationsByDelegatorRequest, useInterfaces: boolean = false): SuperfluidDelegationsByDelegatorRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: SuperfluidDelegationsByDelegatorRequestAminoMsg): SuperfluidDelegationsByDelegatorRequest { @@ -2229,12 +2229,12 @@ export const SuperfluidDelegationsByDelegatorResponse = { if (message.superfluidDelegationRecords) { obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.superfluid_delegation_records = []; + obj.superfluid_delegation_records = message.superfluidDelegationRecords; } if (message.totalDelegatedCoins) { obj.total_delegated_coins = message.totalDelegatedCoins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_delegated_coins = []; + obj.total_delegated_coins = message.totalDelegatedCoins; } obj.total_equivalent_staked_amount = message.totalEquivalentStakedAmount ? Coin.toAmino(message.totalEquivalentStakedAmount, useInterfaces) : undefined; return obj; @@ -2316,8 +2316,8 @@ export const SuperfluidUndelegationsByDelegatorRequest = { }, toAmino(message: SuperfluidUndelegationsByDelegatorRequest, useInterfaces: boolean = false): SuperfluidUndelegationsByDelegatorRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.denom = message.denom; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: SuperfluidUndelegationsByDelegatorRequestAminoMsg): SuperfluidUndelegationsByDelegatorRequest { @@ -2405,17 +2405,17 @@ export const SuperfluidUndelegationsByDelegatorResponse = { if (message.superfluidDelegationRecords) { obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.superfluid_delegation_records = []; + obj.superfluid_delegation_records = message.superfluidDelegationRecords; } if (message.totalUndelegatedCoins) { obj.total_undelegated_coins = message.totalUndelegatedCoins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_undelegated_coins = []; + obj.total_undelegated_coins = message.totalUndelegatedCoins; } if (message.syntheticLocks) { obj.synthetic_locks = message.syntheticLocks.map(e => e ? SyntheticLock.toAmino(e, useInterfaces) : undefined); } else { - obj.synthetic_locks = []; + obj.synthetic_locks = message.syntheticLocks; } return obj; }, @@ -2496,8 +2496,8 @@ export const SuperfluidDelegationsByValidatorDenomRequest = { }, toAmino(message: SuperfluidDelegationsByValidatorDenomRequest, useInterfaces: boolean = false): SuperfluidDelegationsByValidatorDenomRequestAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: SuperfluidDelegationsByValidatorDenomRequestAminoMsg): SuperfluidDelegationsByValidatorDenomRequest { @@ -2567,7 +2567,7 @@ export const SuperfluidDelegationsByValidatorDenomResponse = { if (message.superfluidDelegationRecords) { obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.superfluid_delegation_records = []; + obj.superfluid_delegation_records = message.superfluidDelegationRecords; } return obj; }, @@ -2648,8 +2648,8 @@ export const EstimateSuperfluidDelegatedAmountByValidatorDenomRequest = { }, toAmino(message: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest, useInterfaces: boolean = false): EstimateSuperfluidDelegatedAmountByValidatorDenomRequestAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: EstimateSuperfluidDelegatedAmountByValidatorDenomRequestAminoMsg): EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { @@ -2719,7 +2719,7 @@ export const EstimateSuperfluidDelegatedAmountByValidatorDenomResponse = { if (message.totalDelegatedCoins) { obj.total_delegated_coins = message.totalDelegatedCoins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_delegated_coins = []; + obj.total_delegated_coins = message.totalDelegatedCoins; } return obj; }, @@ -2789,7 +2789,7 @@ export const QueryTotalDelegationByDelegatorRequest = { }, toAmino(message: QueryTotalDelegationByDelegatorRequest, useInterfaces: boolean = false): QueryTotalDelegationByDelegatorRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: QueryTotalDelegationByDelegatorRequestAminoMsg): QueryTotalDelegationByDelegatorRequest { @@ -2888,17 +2888,17 @@ export const QueryTotalDelegationByDelegatorResponse = { if (message.superfluidDelegationRecords) { obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.superfluid_delegation_records = []; + obj.superfluid_delegation_records = message.superfluidDelegationRecords; } if (message.delegationResponse) { obj.delegation_response = message.delegationResponse.map(e => e ? DelegationResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.delegation_response = []; + obj.delegation_response = message.delegationResponse; } if (message.totalDelegatedCoins) { obj.total_delegated_coins = message.totalDelegatedCoins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.total_delegated_coins = []; + obj.total_delegated_coins = message.totalDelegatedCoins; } obj.total_equivalent_staked_amount = message.totalEquivalentStakedAmount ? Coin.toAmino(message.totalEquivalentStakedAmount, useInterfaces) : undefined; return obj; @@ -3035,7 +3035,7 @@ export const QueryUnpoolWhitelistResponse = { if (message.poolIds) { obj.pool_ids = message.poolIds.map(e => e.toString()); } else { - obj.pool_ids = []; + obj.pool_ids = message.poolIds; } return obj; }, @@ -3105,7 +3105,7 @@ export const UserConcentratedSuperfluidPositionsDelegatedRequest = { }, toAmino(message: UserConcentratedSuperfluidPositionsDelegatedRequest, useInterfaces: boolean = false): UserConcentratedSuperfluidPositionsDelegatedRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: UserConcentratedSuperfluidPositionsDelegatedRequestAminoMsg): UserConcentratedSuperfluidPositionsDelegatedRequest { @@ -3175,7 +3175,7 @@ export const UserConcentratedSuperfluidPositionsDelegatedResponse = { if (message.clPoolUserPositionRecords) { obj.cl_pool_user_position_records = message.clPoolUserPositionRecords.map(e => e ? ConcentratedPoolUserPositionRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.cl_pool_user_position_records = []; + obj.cl_pool_user_position_records = message.clPoolUserPositionRecords; } return obj; }, @@ -3245,7 +3245,7 @@ export const UserConcentratedSuperfluidPositionsUndelegatingRequest = { }, toAmino(message: UserConcentratedSuperfluidPositionsUndelegatingRequest, useInterfaces: boolean = false): UserConcentratedSuperfluidPositionsUndelegatingRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: UserConcentratedSuperfluidPositionsUndelegatingRequestAminoMsg): UserConcentratedSuperfluidPositionsUndelegatingRequest { @@ -3315,7 +3315,7 @@ export const UserConcentratedSuperfluidPositionsUndelegatingResponse = { if (message.clPoolUserPositionRecords) { obj.cl_pool_user_position_records = message.clPoolUserPositionRecords.map(e => e ? ConcentratedPoolUserPositionRecord.toAmino(e, useInterfaces) : undefined); } else { - obj.cl_pool_user_position_records = []; + obj.cl_pool_user_position_records = message.clPoolUserPositionRecords; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/superfluid/superfluid.ts b/packages/types/protobuf/codegen/osmosis/superfluid/superfluid.ts index d4d8c8117a..618091006a 100644 --- a/packages/types/protobuf/codegen/osmosis/superfluid/superfluid.ts +++ b/packages/types/protobuf/codegen/osmosis/superfluid/superfluid.ts @@ -340,14 +340,14 @@ export const SuperfluidAsset = { message.denom = object.denom; } if (object.asset_type !== undefined && object.asset_type !== null) { - message.assetType = superfluidAssetTypeFromJSON(object.asset_type); + message.assetType = object.asset_type; } return message; }, toAmino(message: SuperfluidAsset, useInterfaces: boolean = false): SuperfluidAssetAmino { const obj: any = {}; - obj.denom = message.denom; - obj.asset_type = message.assetType; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.asset_type = message.assetType === 0 ? undefined : message.assetType; return obj; }, fromAminoMsg(object: SuperfluidAssetAminoMsg): SuperfluidAsset { @@ -438,9 +438,9 @@ export const SuperfluidIntermediaryAccount = { }, toAmino(message: SuperfluidIntermediaryAccount, useInterfaces: boolean = false): SuperfluidIntermediaryAccountAmino { const obj: any = {}; - obj.denom = message.denom; - obj.val_addr = message.valAddr; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.val_addr = message.valAddr === "" ? undefined : message.valAddr; + obj.gauge_id = message.gaugeId !== BigInt(0) ? message.gaugeId.toString() : undefined; return obj; }, fromAminoMsg(object: SuperfluidIntermediaryAccountAminoMsg): SuperfluidIntermediaryAccount { @@ -531,9 +531,9 @@ export const OsmoEquivalentMultiplierRecord = { }, toAmino(message: OsmoEquivalentMultiplierRecord, useInterfaces: boolean = false): OsmoEquivalentMultiplierRecordAmino { const obj: any = {}; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; - obj.denom = message.denom; - obj.multiplier = message.multiplier; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.multiplier = message.multiplier === "" ? undefined : message.multiplier; return obj; }, fromAminoMsg(object: OsmoEquivalentMultiplierRecordAminoMsg): OsmoEquivalentMultiplierRecord { @@ -635,8 +635,8 @@ export const SuperfluidDelegationRecord = { }, toAmino(message: SuperfluidDelegationRecord, useInterfaces: boolean = false): SuperfluidDelegationRecordAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; obj.delegation_amount = message.delegationAmount ? Coin.toAmino(message.delegationAmount, useInterfaces) : undefined; obj.equivalent_staked_amount = message.equivalentStakedAmount ? Coin.toAmino(message.equivalentStakedAmount, useInterfaces) : undefined; return obj; @@ -718,8 +718,8 @@ export const LockIdIntermediaryAccountConnection = { }, toAmino(message: LockIdIntermediaryAccountConnection, useInterfaces: boolean = false): LockIdIntermediaryAccountConnectionAmino { const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; - obj.intermediary_account = message.intermediaryAccount; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; + obj.intermediary_account = message.intermediaryAccount === "" ? undefined : message.intermediaryAccount; return obj; }, fromAminoMsg(object: LockIdIntermediaryAccountConnectionAminoMsg): LockIdIntermediaryAccountConnection { @@ -798,7 +798,7 @@ export const UnpoolWhitelistedPools = { if (message.ids) { obj.ids = message.ids.map(e => e.toString()); } else { - obj.ids = []; + obj.ids = message.ids; } return obj; }, @@ -923,9 +923,9 @@ export const ConcentratedPoolUserPositionRecord = { }, toAmino(message: ConcentratedPoolUserPositionRecord, useInterfaces: boolean = false): ConcentratedPoolUserPositionRecordAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; obj.synthetic_lock = message.syntheticLock ? SyntheticLock.toAmino(message.syntheticLock, useInterfaces) : undefined; obj.delegation_amount = message.delegationAmount ? Coin.toAmino(message.delegationAmount, useInterfaces) : undefined; obj.equivalent_staked_amount = message.equivalentStakedAmount ? Coin.toAmino(message.equivalentStakedAmount, useInterfaces) : undefined; diff --git a/packages/types/protobuf/codegen/osmosis/superfluid/tx.ts b/packages/types/protobuf/codegen/osmosis/superfluid/tx.ts index 1e1fda5d16..7b2fcc7b2c 100644 --- a/packages/types/protobuf/codegen/osmosis/superfluid/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/superfluid/tx.ts @@ -191,7 +191,7 @@ export interface MsgLockAndSuperfluidDelegateSDKType { val_addr: string; } export interface MsgLockAndSuperfluidDelegateResponse { - ID: bigint; + iD: bigint; } export interface MsgLockAndSuperfluidDelegateResponseProtoMsg { typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegateResponse"; @@ -611,9 +611,9 @@ export const MsgSuperfluidDelegate = { }, toAmino(message: MsgSuperfluidDelegate, useInterfaces: boolean = false): MsgSuperfluidDelegateAmino { const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; - obj.val_addr = message.valAddr; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; + obj.val_addr = message.valAddr === "" ? undefined : message.valAddr; return obj; }, fromAminoMsg(object: MsgSuperfluidDelegateAminoMsg): MsgSuperfluidDelegate { @@ -749,8 +749,8 @@ export const MsgSuperfluidUndelegate = { }, toAmino(message: MsgSuperfluidUndelegate, useInterfaces: boolean = false): MsgSuperfluidUndelegateAmino { const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgSuperfluidUndelegateAminoMsg): MsgSuperfluidUndelegate { @@ -886,8 +886,8 @@ export const MsgSuperfluidUnbondLock = { }, toAmino(message: MsgSuperfluidUnbondLock, useInterfaces: boolean = false): MsgSuperfluidUnbondLockAmino { const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgSuperfluidUnbondLockAminoMsg): MsgSuperfluidUnbondLock { @@ -1034,8 +1034,8 @@ export const MsgSuperfluidUndelegateAndUnbondLock = { }, toAmino(message: MsgSuperfluidUndelegateAndUnbondLock, useInterfaces: boolean = false): MsgSuperfluidUndelegateAndUnbondLockAmino { const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; obj.coin = message.coin ? Coin.toAmino(message.coin, useInterfaces) : undefined; return obj; }, @@ -1105,7 +1105,7 @@ export const MsgSuperfluidUndelegateAndUnbondLockResponse = { }, toAmino(message: MsgSuperfluidUndelegateAndUnbondLockResponse, useInterfaces: boolean = false): MsgSuperfluidUndelegateAndUnbondLockResponseAmino { const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgSuperfluidUndelegateAndUnbondLockResponseAminoMsg): MsgSuperfluidUndelegateAndUnbondLockResponse { @@ -1194,13 +1194,13 @@ export const MsgLockAndSuperfluidDelegate = { }, toAmino(message: MsgLockAndSuperfluidDelegate, useInterfaces: boolean = false): MsgLockAndSuperfluidDelegateAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } - obj.val_addr = message.valAddr; + obj.val_addr = message.valAddr === "" ? undefined : message.valAddr; return obj; }, fromAminoMsg(object: MsgLockAndSuperfluidDelegateAminoMsg): MsgLockAndSuperfluidDelegate { @@ -1227,14 +1227,14 @@ export const MsgLockAndSuperfluidDelegate = { }; function createBaseMsgLockAndSuperfluidDelegateResponse(): MsgLockAndSuperfluidDelegateResponse { return { - ID: BigInt(0) + iD: BigInt(0) }; } export const MsgLockAndSuperfluidDelegateResponse = { typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegateResponse", encode(message: MsgLockAndSuperfluidDelegateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.ID !== BigInt(0)) { - writer.uint32(8).uint64(message.ID); + if (message.iD !== BigInt(0)) { + writer.uint32(8).uint64(message.iD); } return writer; }, @@ -1246,7 +1246,7 @@ export const MsgLockAndSuperfluidDelegateResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.ID = reader.uint64(); + message.iD = reader.uint64(); break; default: reader.skipType(tag & 7); @@ -1257,19 +1257,19 @@ export const MsgLockAndSuperfluidDelegateResponse = { }, fromPartial(object: Partial): MsgLockAndSuperfluidDelegateResponse { const message = createBaseMsgLockAndSuperfluidDelegateResponse(); - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); + message.iD = object.iD !== undefined && object.iD !== null ? BigInt(object.iD.toString()) : BigInt(0); return message; }, fromAmino(object: MsgLockAndSuperfluidDelegateResponseAmino): MsgLockAndSuperfluidDelegateResponse { const message = createBaseMsgLockAndSuperfluidDelegateResponse(); if (object.ID !== undefined && object.ID !== null) { - message.ID = BigInt(object.ID); + message.iD = BigInt(object.ID); } return message; }, toAmino(message: MsgLockAndSuperfluidDelegateResponse, useInterfaces: boolean = false): MsgLockAndSuperfluidDelegateResponseAmino { const obj: any = {}; - obj.ID = message.ID ? message.ID.toString() : undefined; + obj.ID = message.iD !== BigInt(0) ? message.iD.toString() : undefined; return obj; }, fromAminoMsg(object: MsgLockAndSuperfluidDelegateResponseAminoMsg): MsgLockAndSuperfluidDelegateResponse { @@ -1369,14 +1369,14 @@ export const MsgCreateFullRangePositionAndSuperfluidDelegate = { }, toAmino(message: MsgCreateFullRangePositionAndSuperfluidDelegate, useInterfaces: boolean = false): MsgCreateFullRangePositionAndSuperfluidDelegateAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.coins = []; + obj.coins = message.coins; } - obj.val_addr = message.valAddr; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.val_addr = message.valAddr === "" ? undefined : message.valAddr; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCreateFullRangePositionAndSuperfluidDelegateAminoMsg): MsgCreateFullRangePositionAndSuperfluidDelegate { @@ -1456,8 +1456,8 @@ export const MsgCreateFullRangePositionAndSuperfluidDelegateResponse = { }, toAmino(message: MsgCreateFullRangePositionAndSuperfluidDelegateResponse, useInterfaces: boolean = false): MsgCreateFullRangePositionAndSuperfluidDelegateResponseAmino { const obj: any = {}; - obj.lockID = message.lockID ? message.lockID.toString() : undefined; - obj.positionID = message.positionID ? message.positionID.toString() : undefined; + obj.lockID = message.lockID !== BigInt(0) ? message.lockID.toString() : undefined; + obj.positionID = message.positionID !== BigInt(0) ? message.positionID.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCreateFullRangePositionAndSuperfluidDelegateResponseAminoMsg): MsgCreateFullRangePositionAndSuperfluidDelegateResponse { @@ -1537,8 +1537,8 @@ export const MsgUnPoolWhitelistedPool = { }, toAmino(message: MsgUnPoolWhitelistedPool, useInterfaces: boolean = false): MsgUnPoolWhitelistedPoolAmino { const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgUnPoolWhitelistedPoolAminoMsg): MsgUnPoolWhitelistedPool { @@ -1617,7 +1617,7 @@ export const MsgUnPoolWhitelistedPoolResponse = { if (message.exitedLockIds) { obj.exited_lock_ids = message.exitedLockIds.map(e => e.toString()); } else { - obj.exited_lock_ids = []; + obj.exited_lock_ids = message.exitedLockIds; } return obj; }, @@ -1718,13 +1718,13 @@ export const MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition = { }, toAmino(message: MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition, useInterfaces: boolean = false): MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionAmino { const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; obj.shares_to_migrate = message.sharesToMigrate ? Coin.toAmino(message.sharesToMigrate, useInterfaces) : undefined; if (message.tokenOutMins) { obj.token_out_mins = message.tokenOutMins.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.token_out_mins = []; + obj.token_out_mins = message.tokenOutMins; } return obj; }, @@ -1827,9 +1827,9 @@ export const MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse = }, toAmino(message: MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse, useInterfaces: boolean = false): MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponseAmino { const obj: any = {}; - obj.amount0 = message.amount0; - obj.amount1 = message.amount1; - obj.liquidity_created = message.liquidityCreated; + obj.amount0 = message.amount0 === "" ? undefined : message.amount0; + obj.amount1 = message.amount1 === "" ? undefined : message.amount1; + obj.liquidity_created = message.liquidityCreated === "" ? undefined : message.liquidityCreated; obj.join_time = message.joinTime ? Timestamp.toAmino(toTimestamp(message.joinTime)) : undefined; return obj; }, @@ -1932,8 +1932,8 @@ export const MsgAddToConcentratedLiquiditySuperfluidPosition = { }, toAmino(message: MsgAddToConcentratedLiquiditySuperfluidPosition, useInterfaces: boolean = false): MsgAddToConcentratedLiquiditySuperfluidPositionAmino { const obj: any = {}; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; - obj.sender = message.sender; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; obj.token_desired0 = message.tokenDesired0 ? Coin.toAmino(message.tokenDesired0, useInterfaces) : undefined; obj.token_desired1 = message.tokenDesired1 ? Coin.toAmino(message.tokenDesired1, useInterfaces) : undefined; return obj; @@ -2048,11 +2048,11 @@ export const MsgAddToConcentratedLiquiditySuperfluidPositionResponse = { }, toAmino(message: MsgAddToConcentratedLiquiditySuperfluidPositionResponse, useInterfaces: boolean = false): MsgAddToConcentratedLiquiditySuperfluidPositionResponseAmino { const obj: any = {}; - obj.position_id = message.positionId ? message.positionId.toString() : undefined; - obj.amount0 = message.amount0; - obj.amount1 = message.amount1; - obj.new_liquidity = message.newLiquidity; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; + obj.position_id = message.positionId !== BigInt(0) ? message.positionId.toString() : undefined; + obj.amount0 = message.amount0 === "" ? undefined : message.amount0; + obj.amount1 = message.amount1 === "" ? undefined : message.amount1; + obj.new_liquidity = message.newLiquidity === "" ? undefined : message.newLiquidity; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgAddToConcentratedLiquiditySuperfluidPositionResponseAminoMsg): MsgAddToConcentratedLiquiditySuperfluidPositionResponse { @@ -2165,10 +2165,10 @@ export const MsgUnbondConvertAndStake = { }, toAmino(message: MsgUnbondConvertAndStake, useInterfaces: boolean = false): MsgUnbondConvertAndStakeAmino { const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; - obj.sender = message.sender; - obj.val_addr = message.valAddr; - obj.min_amt_to_stake = message.minAmtToStake; + obj.lock_id = message.lockId !== BigInt(0) ? message.lockId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.val_addr = message.valAddr === "" ? undefined : message.valAddr; + obj.min_amt_to_stake = message.minAmtToStake === "" ? undefined : message.minAmtToStake; obj.shares_to_convert = message.sharesToConvert ? Coin.toAmino(message.sharesToConvert, useInterfaces) : undefined; return obj; }, @@ -2238,7 +2238,7 @@ export const MsgUnbondConvertAndStakeResponse = { }, toAmino(message: MsgUnbondConvertAndStakeResponse, useInterfaces: boolean = false): MsgUnbondConvertAndStakeResponseAmino { const obj: any = {}; - obj.total_amt_staked = message.totalAmtStaked; + obj.total_amt_staked = message.totalAmtStaked === "" ? undefined : message.totalAmtStaked; return obj; }, fromAminoMsg(object: MsgUnbondConvertAndStakeResponseAminoMsg): MsgUnbondConvertAndStakeResponse { diff --git a/packages/types/protobuf/codegen/osmosis/superfluid/v1beta1/gov.ts b/packages/types/protobuf/codegen/osmosis/superfluid/v1beta1/gov.ts index 2d33a32162..01362b108f 100644 --- a/packages/types/protobuf/codegen/osmosis/superfluid/v1beta1/gov.ts +++ b/packages/types/protobuf/codegen/osmosis/superfluid/v1beta1/gov.ts @@ -180,12 +180,12 @@ export const SetSuperfluidAssetsProposal = { }, toAmino(message: SetSuperfluidAssetsProposal, useInterfaces: boolean = false): SetSuperfluidAssetsProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.assets) { obj.assets = message.assets.map(e => e ? SuperfluidAsset.toAmino(e, useInterfaces) : undefined); } else { - obj.assets = []; + obj.assets = message.assets; } return obj; }, @@ -276,12 +276,12 @@ export const RemoveSuperfluidAssetsProposal = { }, toAmino(message: RemoveSuperfluidAssetsProposal, useInterfaces: boolean = false): RemoveSuperfluidAssetsProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.superfluidAssetDenoms) { obj.superfluid_asset_denoms = message.superfluidAssetDenoms.map(e => e); } else { - obj.superfluid_asset_denoms = []; + obj.superfluid_asset_denoms = message.superfluidAssetDenoms; } return obj; }, @@ -392,14 +392,14 @@ export const UpdateUnpoolWhiteListProposal = { }, toAmino(message: UpdateUnpoolWhiteListProposal, useInterfaces: boolean = false): UpdateUnpoolWhiteListProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.ids) { obj.ids = message.ids.map(e => e.toString()); } else { - obj.ids = []; + obj.ids = message.ids; } - obj.is_overwrite = message.isOverwrite; + obj.is_overwrite = message.isOverwrite === false ? undefined : message.isOverwrite; return obj; }, fromAminoMsg(object: UpdateUnpoolWhiteListProposalAminoMsg): UpdateUnpoolWhiteListProposal { diff --git a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/authorityMetadata.ts b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/authorityMetadata.ts index 2559dfa6c8..8029c67e3d 100644 --- a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/authorityMetadata.ts +++ b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/authorityMetadata.ts @@ -77,7 +77,7 @@ export const DenomAuthorityMetadata = { }, toAmino(message: DenomAuthorityMetadata, useInterfaces: boolean = false): DenomAuthorityMetadataAmino { const obj: any = {}; - obj.admin = message.admin; + obj.admin = message.admin === "" ? undefined : message.admin; return obj; }, fromAminoMsg(object: DenomAuthorityMetadataAminoMsg): DenomAuthorityMetadata { diff --git a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/genesis.ts b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/genesis.ts index 39fa9e6fb2..38e8ed97ad 100644 --- a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/genesis.ts @@ -119,7 +119,7 @@ export const GenesisState = { if (message.factoryDenoms) { obj.factory_denoms = message.factoryDenoms.map(e => e ? GenesisDenom.toAmino(e, useInterfaces) : undefined); } else { - obj.factory_denoms = []; + obj.factory_denoms = message.factoryDenoms; } return obj; }, @@ -200,7 +200,7 @@ export const GenesisDenom = { }, toAmino(message: GenesisDenom, useInterfaces: boolean = false): GenesisDenomAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; obj.authority_metadata = message.authorityMetadata ? DenomAuthorityMetadata.toAmino(message.authorityMetadata, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/params.ts b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/params.ts index 16be7d0648..55b9e2ee20 100644 --- a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/params.ts @@ -101,9 +101,9 @@ export const Params = { if (message.denomCreationFee) { obj.denom_creation_fee = message.denomCreationFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.denom_creation_fee = []; + obj.denom_creation_fee = message.denomCreationFee; } - obj.denom_creation_gas_consume = message.denomCreationGasConsume ? message.denomCreationGasConsume.toString() : undefined; + obj.denom_creation_gas_consume = message.denomCreationGasConsume !== BigInt(0) ? message.denomCreationGasConsume?.toString() : undefined; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/query.ts b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/query.ts index ede8116599..7bde2cab2d 100644 --- a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/query.ts @@ -369,7 +369,7 @@ export const QueryDenomAuthorityMetadataRequest = { }, toAmino(message: QueryDenomAuthorityMetadataRequest, useInterfaces: boolean = false): QueryDenomAuthorityMetadataRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryDenomAuthorityMetadataRequestAminoMsg): QueryDenomAuthorityMetadataRequest { @@ -507,7 +507,7 @@ export const QueryDenomsFromCreatorRequest = { }, toAmino(message: QueryDenomsFromCreatorRequest, useInterfaces: boolean = false): QueryDenomsFromCreatorRequestAmino { const obj: any = {}; - obj.creator = message.creator; + obj.creator = message.creator === "" ? undefined : message.creator; return obj; }, fromAminoMsg(object: QueryDenomsFromCreatorRequestAminoMsg): QueryDenomsFromCreatorRequest { @@ -577,7 +577,7 @@ export const QueryDenomsFromCreatorResponse = { if (message.denoms) { obj.denoms = message.denoms.map(e => e); } else { - obj.denoms = []; + obj.denoms = message.denoms; } return obj; }, @@ -647,7 +647,7 @@ export const QueryBeforeSendHookAddressRequest = { }, toAmino(message: QueryBeforeSendHookAddressRequest, useInterfaces: boolean = false): QueryBeforeSendHookAddressRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryBeforeSendHookAddressRequestAminoMsg): QueryBeforeSendHookAddressRequest { @@ -716,7 +716,7 @@ export const QueryBeforeSendHookAddressResponse = { }, toAmino(message: QueryBeforeSendHookAddressResponse, useInterfaces: boolean = false): QueryBeforeSendHookAddressResponseAmino { const obj: any = {}; - obj.cosmwasm_address = message.cosmwasmAddress; + obj.cosmwasm_address = message.cosmwasmAddress === "" ? undefined : message.cosmwasmAddress; return obj; }, fromAminoMsg(object: QueryBeforeSendHookAddressResponseAminoMsg): QueryBeforeSendHookAddressResponse { diff --git a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/tx.ts b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/tx.ts index 5c977194f5..e8678e82f4 100644 --- a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/tx.ts @@ -453,8 +453,8 @@ export const MsgCreateDenom = { }, toAmino(message: MsgCreateDenom, useInterfaces: boolean = false): MsgCreateDenomAmino { const obj: any = {}; - obj.sender = message.sender; - obj.subdenom = message.subdenom; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.subdenom = message.subdenom === "" ? undefined : message.subdenom; return obj; }, fromAminoMsg(object: MsgCreateDenomAminoMsg): MsgCreateDenom { @@ -523,7 +523,7 @@ export const MsgCreateDenomResponse = { }, toAmino(message: MsgCreateDenomResponse, useInterfaces: boolean = false): MsgCreateDenomResponseAmino { const obj: any = {}; - obj.new_token_denom = message.newTokenDenom; + obj.new_token_denom = message.newTokenDenom === "" ? undefined : message.newTokenDenom; return obj; }, fromAminoMsg(object: MsgCreateDenomResponseAminoMsg): MsgCreateDenomResponse { @@ -614,9 +614,9 @@ export const MsgMint = { }, toAmino(message: MsgMint, useInterfaces: boolean = false): MsgMintAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; - obj.mintToAddress = message.mintToAddress; + obj.mintToAddress = message.mintToAddress === "" ? undefined : message.mintToAddress; return obj; }, fromAminoMsg(object: MsgMintAminoMsg): MsgMint { @@ -763,9 +763,9 @@ export const MsgBurn = { }, toAmino(message: MsgBurn, useInterfaces: boolean = false): MsgBurnAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; - obj.burnFromAddress = message.burnFromAddress; + obj.burnFromAddress = message.burnFromAddress === "" ? undefined : message.burnFromAddress; return obj; }, fromAminoMsg(object: MsgBurnAminoMsg): MsgBurn { @@ -912,9 +912,9 @@ export const MsgChangeAdmin = { }, toAmino(message: MsgChangeAdmin, useInterfaces: boolean = false): MsgChangeAdminAmino { const obj: any = {}; - obj.sender = message.sender; - obj.denom = message.denom; - obj.new_admin = message.newAdmin; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; return obj; }, fromAminoMsg(object: MsgChangeAdminAminoMsg): MsgChangeAdmin { @@ -1061,9 +1061,9 @@ export const MsgSetBeforeSendHook = { }, toAmino(message: MsgSetBeforeSendHook, useInterfaces: boolean = false): MsgSetBeforeSendHookAmino { const obj: any = {}; - obj.sender = message.sender; - obj.denom = message.denom; - obj.cosmwasm_address = message.cosmwasmAddress; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.cosmwasm_address = message.cosmwasmAddress === "" ? undefined : message.cosmwasmAddress; return obj; }, fromAminoMsg(object: MsgSetBeforeSendHookAminoMsg): MsgSetBeforeSendHook { @@ -1199,7 +1199,7 @@ export const MsgSetDenomMetadata = { }, toAmino(message: MsgSetDenomMetadata, useInterfaces: boolean = false): MsgSetDenomMetadataAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.metadata = message.metadata ? Metadata.toAmino(message.metadata, useInterfaces) : undefined; return obj; }, @@ -1358,10 +1358,10 @@ export const MsgForceTransfer = { }, toAmino(message: MsgForceTransfer, useInterfaces: boolean = false): MsgForceTransferAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; - obj.transferFromAddress = message.transferFromAddress; - obj.transferToAddress = message.transferToAddress; + obj.transferFromAddress = message.transferFromAddress === "" ? undefined : message.transferFromAddress; + obj.transferToAddress = message.transferToAddress === "" ? undefined : message.transferToAddress; return obj; }, fromAminoMsg(object: MsgForceTransferAminoMsg): MsgForceTransfer { diff --git a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/feetoken.ts b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/feetoken.ts index 3555badabb..236309ecbd 100644 --- a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/feetoken.ts +++ b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/feetoken.ts @@ -92,8 +92,8 @@ export const FeeToken = { }, toAmino(message: FeeToken, useInterfaces: boolean = false): FeeTokenAmino { const obj: any = {}; - obj.denom = message.denom; - obj.poolID = message.poolID ? message.poolID.toString() : undefined; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.poolID = message.poolID !== BigInt(0) ? message.poolID.toString() : undefined; return obj; }, fromAminoMsg(object: FeeTokenAminoMsg): FeeToken { diff --git a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/genesis.ts b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/genesis.ts index 29f0ba8495..c72cb2b6b2 100644 --- a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/genesis.ts @@ -94,11 +94,11 @@ export const GenesisState = { }, toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; - obj.basedenom = message.basedenom; + obj.basedenom = message.basedenom === "" ? undefined : message.basedenom; if (message.feetokens) { obj.feetokens = message.feetokens.map(e => e ? FeeToken.toAmino(e, useInterfaces) : undefined); } else { - obj.feetokens = []; + obj.feetokens = message.feetokens; } obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/gov.ts b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/gov.ts index 5bffe5698a..ffc33a77d1 100644 --- a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/gov.ts +++ b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/gov.ts @@ -112,12 +112,12 @@ export const UpdateFeeTokenProposal = { }, toAmino(message: UpdateFeeTokenProposal, useInterfaces: boolean = false): UpdateFeeTokenProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; if (message.feetokens) { obj.feetokens = message.feetokens.map(e => e ? FeeToken.toAmino(e, useInterfaces) : undefined); } else { - obj.feetokens = []; + obj.feetokens = message.feetokens; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/params.ts b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/params.ts index 4002514bfc..ea3c8f9b5e 100644 --- a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/params.ts @@ -64,7 +64,7 @@ export const Params = { if (message.whitelistedFeeTokenSetters) { obj.whitelisted_fee_token_setters = message.whitelistedFeeTokenSetters.map(e => e); } else { - obj.whitelisted_fee_token_setters = []; + obj.whitelisted_fee_token_setters = message.whitelistedFeeTokenSetters; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/query.ts b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/query.ts index e6392c59d9..a1e0a7a279 100644 --- a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/query.ts @@ -282,7 +282,7 @@ export const QueryFeeTokensResponse = { if (message.feeTokens) { obj.fee_tokens = message.feeTokens.map(e => e ? FeeToken.toAmino(e, useInterfaces) : undefined); } else { - obj.fee_tokens = []; + obj.fee_tokens = message.feeTokens; } return obj; }, @@ -352,7 +352,7 @@ export const QueryDenomSpotPriceRequest = { }, toAmino(message: QueryDenomSpotPriceRequest, useInterfaces: boolean = false): QueryDenomSpotPriceRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryDenomSpotPriceRequestAminoMsg): QueryDenomSpotPriceRequest { @@ -432,8 +432,8 @@ export const QueryDenomSpotPriceResponse = { }, toAmino(message: QueryDenomSpotPriceResponse, useInterfaces: boolean = false): QueryDenomSpotPriceResponseAmino { const obj: any = {}; - obj.poolID = message.poolID ? message.poolID.toString() : undefined; - obj.spot_price = message.spotPrice; + obj.poolID = message.poolID !== BigInt(0) ? message.poolID.toString() : undefined; + obj.spot_price = message.spotPrice === "" ? undefined : message.spotPrice; return obj; }, fromAminoMsg(object: QueryDenomSpotPriceResponseAminoMsg): QueryDenomSpotPriceResponse { @@ -502,7 +502,7 @@ export const QueryDenomPoolIdRequest = { }, toAmino(message: QueryDenomPoolIdRequest, useInterfaces: boolean = false): QueryDenomPoolIdRequestAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryDenomPoolIdRequestAminoMsg): QueryDenomPoolIdRequest { @@ -571,7 +571,7 @@ export const QueryDenomPoolIdResponse = { }, toAmino(message: QueryDenomPoolIdResponse, useInterfaces: boolean = false): QueryDenomPoolIdResponseAmino { const obj: any = {}; - obj.poolID = message.poolID ? message.poolID.toString() : undefined; + obj.poolID = message.poolID !== BigInt(0) ? message.poolID.toString() : undefined; return obj; }, fromAminoMsg(object: QueryDenomPoolIdResponseAminoMsg): QueryDenomPoolIdResponse { @@ -696,7 +696,7 @@ export const QueryBaseDenomResponse = { }, toAmino(message: QueryBaseDenomResponse, useInterfaces: boolean = false): QueryBaseDenomResponseAmino { const obj: any = {}; - obj.base_denom = message.baseDenom; + obj.base_denom = message.baseDenom === "" ? undefined : message.baseDenom; return obj; }, fromAminoMsg(object: QueryBaseDenomResponseAminoMsg): QueryBaseDenomResponse { @@ -821,7 +821,7 @@ export const QueryEipBaseFeeResponse = { }, toAmino(message: QueryEipBaseFeeResponse, useInterfaces: boolean = false): QueryEipBaseFeeResponseAmino { const obj: any = {}; - obj.base_fee = message.baseFee; + obj.base_fee = message.baseFee === "" ? undefined : message.baseFee; return obj; }, fromAminoMsg(object: QueryEipBaseFeeResponseAminoMsg): QueryEipBaseFeeResponse { diff --git a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/tx.ts b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/tx.ts index b04d073950..5ec10b08c3 100644 --- a/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/txfees/v1beta1/tx.ts @@ -91,9 +91,9 @@ export const MsgSetFeeTokens = { if (message.feeTokens) { obj.fee_tokens = message.feeTokens.map(e => e ? FeeToken.toAmino(e, useInterfaces) : undefined); } else { - obj.fee_tokens = []; + obj.fee_tokens = message.feeTokens; } - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgSetFeeTokensAminoMsg): MsgSetFeeTokens { diff --git a/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/query.ts b/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/query.ts index 03ed4d8f44..910f7d1d18 100644 --- a/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/query.ts @@ -87,7 +87,7 @@ export const UserValidatorPreferencesRequest = { }, toAmino(message: UserValidatorPreferencesRequest, useInterfaces: boolean = false): UserValidatorPreferencesRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; return obj; }, fromAminoMsg(object: UserValidatorPreferencesRequestAminoMsg): UserValidatorPreferencesRequest { @@ -157,7 +157,7 @@ export const UserValidatorPreferencesResponse = { if (message.preferences) { obj.preferences = message.preferences.map(e => e ? ValidatorPreference.toAmino(e, useInterfaces) : undefined); } else { - obj.preferences = []; + obj.preferences = message.preferences; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/state.ts b/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/state.ts index 4601c5f7f0..6c549d9839 100644 --- a/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/state.ts +++ b/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/state.ts @@ -143,8 +143,8 @@ export const ValidatorPreference = { }, toAmino(message: ValidatorPreference, useInterfaces: boolean = false): ValidatorPreferenceAmino { const obj: any = {}; - obj.val_oper_address = message.valOperAddress; - obj.weight = message.weight; + obj.val_oper_address = message.valOperAddress === "" ? undefined : message.valOperAddress; + obj.weight = message.weight === "" ? undefined : message.weight; return obj; }, fromAminoMsg(object: ValidatorPreferenceAminoMsg): ValidatorPreference { @@ -214,7 +214,7 @@ export const ValidatorSetPreferences = { if (message.preferences) { obj.preferences = message.preferences.map(e => e ? ValidatorPreference.toAmino(e, useInterfaces) : undefined); } else { - obj.preferences = []; + obj.preferences = message.preferences; } return obj; }, diff --git a/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/tx.ts b/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/tx.ts index f10a14d58a..d534221d80 100644 --- a/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/osmosis/valset-pref/v1beta1/tx.ts @@ -324,11 +324,11 @@ export const MsgSetValidatorSetPreference = { }, toAmino(message: MsgSetValidatorSetPreference, useInterfaces: boolean = false): MsgSetValidatorSetPreferenceAmino { const obj: any = {}; - obj.delegator = message.delegator; + obj.delegator = message.delegator === "" ? undefined : message.delegator; if (message.preferences) { obj.preferences = message.preferences.map(e => e ? ValidatorPreference.toAmino(e, useInterfaces) : undefined); } else { - obj.preferences = []; + obj.preferences = message.preferences; } return obj; }, @@ -465,7 +465,7 @@ export const MsgDelegateToValidatorSet = { }, toAmino(message: MsgDelegateToValidatorSet, useInterfaces: boolean = false): MsgDelegateToValidatorSetAmino { const obj: any = {}; - obj.delegator = message.delegator; + obj.delegator = message.delegator === "" ? undefined : message.delegator; obj.coin = message.coin ? Coin.toAmino(message.coin, useInterfaces) : undefined; return obj; }, @@ -602,7 +602,7 @@ export const MsgUndelegateFromValidatorSet = { }, toAmino(message: MsgUndelegateFromValidatorSet, useInterfaces: boolean = false): MsgUndelegateFromValidatorSetAmino { const obj: any = {}; - obj.delegator = message.delegator; + obj.delegator = message.delegator === "" ? undefined : message.delegator; obj.coin = message.coin ? Coin.toAmino(message.coin, useInterfaces) : undefined; return obj; }, @@ -737,11 +737,11 @@ export const MsgRedelegateValidatorSet = { }, toAmino(message: MsgRedelegateValidatorSet, useInterfaces: boolean = false): MsgRedelegateValidatorSetAmino { const obj: any = {}; - obj.delegator = message.delegator; + obj.delegator = message.delegator === "" ? undefined : message.delegator; if (message.preferences) { obj.preferences = message.preferences.map(e => e ? ValidatorPreference.toAmino(e, useInterfaces) : undefined); } else { - obj.preferences = []; + obj.preferences = message.preferences; } return obj; }, @@ -867,7 +867,7 @@ export const MsgWithdrawDelegationRewards = { }, toAmino(message: MsgWithdrawDelegationRewards, useInterfaces: boolean = false): MsgWithdrawDelegationRewardsAmino { const obj: any = {}; - obj.delegator = message.delegator; + obj.delegator = message.delegator === "" ? undefined : message.delegator; return obj; }, fromAminoMsg(object: MsgWithdrawDelegationRewardsAminoMsg): MsgWithdrawDelegationRewards { @@ -1003,8 +1003,8 @@ export const MsgDelegateBondedTokens = { }, toAmino(message: MsgDelegateBondedTokens, useInterfaces: boolean = false): MsgDelegateBondedTokensAmino { const obj: any = {}; - obj.delegator = message.delegator; - obj.lockID = message.lockID ? message.lockID.toString() : undefined; + obj.delegator = message.delegator === "" ? undefined : message.delegator; + obj.lockID = message.lockID !== BigInt(0) ? message.lockID.toString() : undefined; return obj; }, fromAminoMsg(object: MsgDelegateBondedTokensAminoMsg): MsgDelegateBondedTokens { diff --git a/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/genesis.ts b/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/genesis.ts index a7fb6e7650..22d9e18446 100644 --- a/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/genesis.ts @@ -83,7 +83,7 @@ export const GenesisState = { if (message.liquidValidators) { obj.liquid_validators = message.liquidValidators.map(e => e ? LiquidValidator.toAmino(e, useInterfaces) : undefined); } else { - obj.liquid_validators = []; + obj.liquid_validators = message.liquidValidators; } return obj; }, diff --git a/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/liquidstake.ts b/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/liquidstake.ts index de33bdda65..361211b2b0 100644 --- a/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/liquidstake.ts +++ b/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/liquidstake.ts @@ -569,20 +569,20 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.liquid_bond_denom = message.liquidBondDenom; + obj.liquid_bond_denom = message.liquidBondDenom === "" ? undefined : message.liquidBondDenom; if (message.whitelistedValidators) { obj.whitelisted_validators = message.whitelistedValidators.map(e => e ? WhitelistedValidator.toAmino(e, useInterfaces) : undefined); } else { - obj.whitelisted_validators = []; - } - obj.unstake_fee_rate = message.unstakeFeeRate; - obj.lsm_disabled = message.lsmDisabled; - obj.min_liquid_stake_amount = message.minLiquidStakeAmount; - obj.cw_locked_pool_address = message.cwLockedPoolAddress; - obj.fee_account_address = message.feeAccountAddress; - obj.autocompound_fee_rate = message.autocompoundFeeRate; - obj.whitelist_admin_address = message.whitelistAdminAddress; - obj.module_paused = message.modulePaused; + obj.whitelisted_validators = message.whitelistedValidators; + } + obj.unstake_fee_rate = message.unstakeFeeRate === "" ? undefined : message.unstakeFeeRate; + obj.lsm_disabled = message.lsmDisabled === false ? undefined : message.lsmDisabled; + obj.min_liquid_stake_amount = message.minLiquidStakeAmount === "" ? undefined : message.minLiquidStakeAmount; + obj.cw_locked_pool_address = message.cwLockedPoolAddress === "" ? undefined : message.cwLockedPoolAddress; + obj.fee_account_address = message.feeAccountAddress === "" ? undefined : message.feeAccountAddress; + obj.autocompound_fee_rate = message.autocompoundFeeRate === "" ? undefined : message.autocompoundFeeRate; + obj.whitelist_admin_address = message.whitelistAdminAddress === "" ? undefined : message.whitelistAdminAddress; + obj.module_paused = message.modulePaused === false ? undefined : message.modulePaused; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { @@ -656,8 +656,8 @@ export const WhitelistedValidator = { }, toAmino(message: WhitelistedValidator, useInterfaces: boolean = false): WhitelistedValidatorAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.target_weight = message.targetWeight; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.target_weight = message.targetWeight === "" ? undefined : message.targetWeight; return obj; }, fromAminoMsg(object: WhitelistedValidatorAminoMsg): WhitelistedValidator { @@ -720,7 +720,7 @@ export const LiquidValidator = { }, toAmino(message: LiquidValidator, useInterfaces: boolean = false): LiquidValidatorAmino { const obj: any = {}; - obj.operator_address = message.operatorAddress; + obj.operator_address = message.operatorAddress === "" ? undefined : message.operatorAddress; return obj; }, fromAminoMsg(object: LiquidValidatorAminoMsg): LiquidValidator { @@ -815,7 +815,7 @@ export const LiquidValidatorState = { message.weight = object.weight; } if (object.status !== undefined && object.status !== null) { - message.status = validatorStatusFromJSON(object.status); + message.status = object.status; } if (object.del_shares !== undefined && object.del_shares !== null) { message.delShares = object.del_shares; @@ -827,11 +827,11 @@ export const LiquidValidatorState = { }, toAmino(message: LiquidValidatorState, useInterfaces: boolean = false): LiquidValidatorStateAmino { const obj: any = {}; - obj.operator_address = message.operatorAddress; - obj.weight = message.weight; - obj.status = message.status; - obj.del_shares = message.delShares; - obj.liquid_tokens = message.liquidTokens; + obj.operator_address = message.operatorAddress === "" ? undefined : message.operatorAddress; + obj.weight = message.weight === "" ? undefined : message.weight; + obj.status = message.status === 0 ? undefined : message.status; + obj.del_shares = message.delShares === "" ? undefined : message.delShares; + obj.liquid_tokens = message.liquidTokens === "" ? undefined : message.liquidTokens; return obj; }, fromAminoMsg(object: LiquidValidatorStateAminoMsg): LiquidValidatorState { @@ -971,14 +971,14 @@ export const NetAmountState = { }, toAmino(message: NetAmountState, useInterfaces: boolean = false): NetAmountStateAmino { const obj: any = {}; - obj.mint_rate = message.mintRate; - obj.stkxprt_total_supply = message.stkxprtTotalSupply; - obj.net_amount = message.netAmount; - obj.total_del_shares = message.totalDelShares; - obj.total_liquid_tokens = message.totalLiquidTokens; - obj.total_remaining_rewards = message.totalRemainingRewards; - obj.total_unbonding_balance = message.totalUnbondingBalance; - obj.proxy_acc_balance = message.proxyAccBalance; + obj.mint_rate = message.mintRate === "" ? undefined : message.mintRate; + obj.stkxprt_total_supply = message.stkxprtTotalSupply === "" ? undefined : message.stkxprtTotalSupply; + obj.net_amount = message.netAmount === "" ? undefined : message.netAmount; + obj.total_del_shares = message.totalDelShares === "" ? undefined : message.totalDelShares; + obj.total_liquid_tokens = message.totalLiquidTokens === "" ? undefined : message.totalLiquidTokens; + obj.total_remaining_rewards = message.totalRemainingRewards === "" ? undefined : message.totalRemainingRewards; + obj.total_unbonding_balance = message.totalUnbondingBalance === "" ? undefined : message.totalUnbondingBalance; + obj.proxy_acc_balance = message.proxyAccBalance === "" ? undefined : message.proxyAccBalance; return obj; }, fromAminoMsg(object: NetAmountStateAminoMsg): NetAmountState { diff --git a/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/query.ts b/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/query.ts index 727d7dfe7e..983630996b 100644 --- a/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/query.ts @@ -329,7 +329,7 @@ export const QueryLiquidValidatorsResponse = { if (message.liquidValidators) { obj.liquid_validators = message.liquidValidators.map(e => e ? LiquidValidatorState.toAmino(e, useInterfaces) : undefined); } else { - obj.liquid_validators = []; + obj.liquid_validators = message.liquidValidators; } return obj; }, diff --git a/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/tx.ts b/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/tx.ts index a910fccf81..db22addceb 100644 --- a/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/pstake/liquidstake/v1beta1/tx.ts @@ -373,7 +373,7 @@ export const MsgLiquidStake = { }, toAmino(message: MsgLiquidStake, useInterfaces: boolean = false): MsgLiquidStakeAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -520,8 +520,8 @@ export const MsgStakeToLP = { }, toAmino(message: MsgStakeToLP, useInterfaces: boolean = false): MsgStakeToLPAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; obj.staked_amount = message.stakedAmount ? Coin.toAmino(message.stakedAmount, useInterfaces) : undefined; obj.liquid_amount = message.liquidAmount ? Coin.toAmino(message.liquidAmount, useInterfaces) : undefined; return obj; @@ -647,7 +647,7 @@ export const MsgLiquidUnstake = { }, toAmino(message: MsgLiquidUnstake, useInterfaces: boolean = false): MsgLiquidUnstakeAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -785,7 +785,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, @@ -908,11 +908,11 @@ export const MsgUpdateWhitelistedValidators = { }, toAmino(message: MsgUpdateWhitelistedValidators, useInterfaces: boolean = false): MsgUpdateWhitelistedValidatorsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; if (message.whitelistedValidators) { obj.whitelisted_validators = message.whitelistedValidators.map(e => e ? WhitelistedValidator.toAmino(e, useInterfaces) : undefined); } else { - obj.whitelisted_validators = []; + obj.whitelisted_validators = message.whitelistedValidators; } return obj; }, @@ -1037,8 +1037,8 @@ export const MsgSetModulePaused = { }, toAmino(message: MsgSetModulePaused, useInterfaces: boolean = false): MsgSetModulePausedAmino { const obj: any = {}; - obj.authority = message.authority; - obj.is_paused = message.isPaused; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.is_paused = message.isPaused === false ? undefined : message.isPaused; return obj; }, fromAminoMsg(object: MsgSetModulePausedAminoMsg): MsgSetModulePaused { diff --git a/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/genesis.ts b/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/genesis.ts index 60a384036a..3b1910377a 100644 --- a/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/genesis.ts @@ -140,27 +140,27 @@ export const GenesisState = { if (message.hostChains) { obj.host_chains = message.hostChains.map(e => e ? HostChain.toAmino(e, useInterfaces) : undefined); } else { - obj.host_chains = []; + obj.host_chains = message.hostChains; } if (message.deposits) { obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e, useInterfaces) : undefined); } else { - obj.deposits = []; + obj.deposits = message.deposits; } if (message.unbondings) { obj.unbondings = message.unbondings.map(e => e ? Unbonding.toAmino(e, useInterfaces) : undefined); } else { - obj.unbondings = []; + obj.unbondings = message.unbondings; } if (message.userUnbondings) { obj.user_unbondings = message.userUnbondings.map(e => e ? UserUnbonding.toAmino(e, useInterfaces) : undefined); } else { - obj.user_unbondings = []; + obj.user_unbondings = message.userUnbondings; } if (message.validatorUnbondings) { obj.validator_unbondings = message.validatorUnbondings.map(e => e ? ValidatorUnbonding.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_unbondings = []; + obj.validator_unbondings = message.validatorUnbondings; } return obj; }, diff --git a/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/liquidstakeibc.ts b/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/liquidstakeibc.ts index af64c4880f..1913a076b3 100644 --- a/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/liquidstakeibc.ts +++ b/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/liquidstakeibc.ts @@ -375,6 +375,10 @@ export interface HostChainLSParams { restakeFee: string; unstakeFee: string; redemptionFee: string; + /** + * LSM validator cap + * Should be used only when HostChainFlag.Lsm == true, orelse default + */ lsmValidatorCap: string; /** * LSM bond factor @@ -397,6 +401,10 @@ export interface HostChainLSParamsAmino { restake_fee?: string; unstake_fee?: string; redemption_fee?: string; + /** + * LSM validator cap + * Should be used only when HostChainFlag.Lsm == true, orelse default + */ lsm_validator_cap?: string; /** * LSM bond factor @@ -1039,25 +1047,25 @@ export const HostChain = { }, toAmino(message: HostChain, useInterfaces: boolean = false): HostChainAmino { const obj: any = {}; - obj.chain_id = message.chainId; - obj.connection_id = message.connectionId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; obj.params = message.params ? HostChainLSParams.toAmino(message.params, useInterfaces) : undefined; - obj.host_denom = message.hostDenom; - obj.channel_id = message.channelId; - obj.port_id = message.portId; + obj.host_denom = message.hostDenom === "" ? undefined : message.hostDenom; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; obj.delegation_account = message.delegationAccount ? ICAAccount.toAmino(message.delegationAccount, useInterfaces) : undefined; obj.rewards_account = message.rewardsAccount ? ICAAccount.toAmino(message.rewardsAccount, useInterfaces) : undefined; if (message.validators) { obj.validators = message.validators.map(e => e ? Validator.toAmino(e, useInterfaces) : undefined); } else { - obj.validators = []; - } - obj.minimum_deposit = message.minimumDeposit; - obj.c_value = message.cValue; - obj.last_c_value = message.lastCValue; - obj.unbonding_factor = message.unbondingFactor ? message.unbondingFactor.toString() : undefined; - obj.active = message.active; - obj.auto_compound_factor = message.autoCompoundFactor; + obj.validators = message.validators; + } + obj.minimum_deposit = message.minimumDeposit === "" ? undefined : message.minimumDeposit; + obj.c_value = message.cValue === "" ? undefined : message.cValue; + obj.last_c_value = message.lastCValue === "" ? undefined : message.lastCValue; + obj.unbonding_factor = message.unbondingFactor !== BigInt(0) ? message.unbondingFactor.toString() : undefined; + obj.active = message.active === false ? undefined : message.active; + obj.auto_compound_factor = message.autoCompoundFactor === "" ? undefined : message.autoCompoundFactor; obj.flags = message.flags ? HostChainFlags.toAmino(message.flags, useInterfaces) : undefined; obj.reward_params = message.rewardParams ? RewardParams.toAmino(message.rewardParams, useInterfaces) : undefined; return obj; @@ -1122,7 +1130,7 @@ export const HostChainFlags = { }, toAmino(message: HostChainFlags, useInterfaces: boolean = false): HostChainFlagsAmino { const obj: any = {}; - obj.lsm = message.lsm; + obj.lsm = message.lsm === false ? undefined : message.lsm; return obj; }, fromAminoMsg(object: HostChainFlagsAminoMsg): HostChainFlags { @@ -1196,8 +1204,8 @@ export const RewardParams = { }, toAmino(message: RewardParams, useInterfaces: boolean = false): RewardParamsAmino { const obj: any = {}; - obj.denom = message.denom; - obj.destination = message.destination; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.destination = message.destination === "" ? undefined : message.destination; return obj; }, fromAminoMsg(object: RewardParamsAminoMsg): RewardParams { @@ -1359,16 +1367,16 @@ export const HostChainLSParams = { }, toAmino(message: HostChainLSParams, useInterfaces: boolean = false): HostChainLSParamsAmino { const obj: any = {}; - obj.deposit_fee = message.depositFee; - obj.restake_fee = message.restakeFee; - obj.unstake_fee = message.unstakeFee; - obj.redemption_fee = message.redemptionFee; - obj.lsm_validator_cap = message.lsmValidatorCap; - obj.lsm_bond_factor = message.lsmBondFactor; - obj.max_entries = message.maxEntries; - obj.redelegation_acceptable_delta = message.redelegationAcceptableDelta; - obj.upper_c_value_limit = message.upperCValueLimit; - obj.lower_c_value_limit = message.lowerCValueLimit; + obj.deposit_fee = message.depositFee === "" ? undefined : message.depositFee; + obj.restake_fee = message.restakeFee === "" ? undefined : message.restakeFee; + obj.unstake_fee = message.unstakeFee === "" ? undefined : message.unstakeFee; + obj.redemption_fee = message.redemptionFee === "" ? undefined : message.redemptionFee; + obj.lsm_validator_cap = message.lsmValidatorCap === "" ? undefined : message.lsmValidatorCap; + obj.lsm_bond_factor = message.lsmBondFactor === "" ? undefined : message.lsmBondFactor; + obj.max_entries = message.maxEntries === 0 ? undefined : message.maxEntries; + obj.redelegation_acceptable_delta = message.redelegationAcceptableDelta === "" ? undefined : message.redelegationAcceptableDelta; + obj.upper_c_value_limit = message.upperCValueLimit === "" ? undefined : message.upperCValueLimit; + obj.lower_c_value_limit = message.lowerCValueLimit === "" ? undefined : message.lowerCValueLimit; return obj; }, fromAminoMsg(object: HostChainLSParamsAminoMsg): HostChainLSParams { @@ -1458,16 +1466,16 @@ export const ICAAccount = { message.owner = object.owner; } if (object.channel_state !== undefined && object.channel_state !== null) { - message.channelState = iCAAccount_ChannelStateFromJSON(object.channel_state); + message.channelState = object.channel_state; } return message; }, toAmino(message: ICAAccount, useInterfaces: boolean = false): ICAAccountAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.balance = message.balance ? Coin.toAmino(message.balance, useInterfaces) : undefined; - obj.owner = message.owner; - obj.channel_state = message.channelState; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.channel_state = message.channelState === 0 ? undefined : message.channelState; return obj; }, fromAminoMsg(object: ICAAccountAminoMsg): ICAAccount { @@ -1596,13 +1604,13 @@ export const Validator = { }, toAmino(message: Validator, useInterfaces: boolean = false): ValidatorAmino { const obj: any = {}; - obj.operator_address = message.operatorAddress; - obj.status = message.status; - obj.weight = message.weight; - obj.delegated_amount = message.delegatedAmount; - obj.exchange_rate = message.exchangeRate; - obj.unbonding_epoch = message.unbondingEpoch ? message.unbondingEpoch.toString() : undefined; - obj.delegable = message.delegable; + obj.operator_address = message.operatorAddress === "" ? undefined : message.operatorAddress; + obj.status = message.status === "" ? undefined : message.status; + obj.weight = message.weight === "" ? undefined : message.weight; + obj.delegated_amount = message.delegatedAmount === "" ? undefined : message.delegatedAmount; + obj.exchange_rate = message.exchangeRate === "" ? undefined : message.exchangeRate; + obj.unbonding_epoch = message.unbondingEpoch !== BigInt(0) ? message.unbondingEpoch.toString() : undefined; + obj.delegable = message.delegable === false ? undefined : message.delegable; return obj; }, fromAminoMsg(object: ValidatorAminoMsg): Validator { @@ -1700,7 +1708,7 @@ export const Deposit = { message.epoch = BigInt(object.epoch); } if (object.state !== undefined && object.state !== null) { - message.state = deposit_DepositStateFromJSON(object.state); + message.state = object.state; } if (object.ibc_sequence_id !== undefined && object.ibc_sequence_id !== null) { message.ibcSequenceId = object.ibc_sequence_id; @@ -1709,11 +1717,11 @@ export const Deposit = { }, toAmino(message: Deposit, useInterfaces: boolean = false): DepositAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; - obj.epoch = message.epoch ? message.epoch.toString() : undefined; - obj.state = message.state; - obj.ibc_sequence_id = message.ibcSequenceId; + obj.epoch = message.epoch !== BigInt(0) ? message.epoch.toString() : undefined; + obj.state = message.state === 0 ? undefined : message.state; + obj.ibc_sequence_id = message.ibcSequenceId === "" ? undefined : message.ibcSequenceId; return obj; }, fromAminoMsg(object: DepositAminoMsg): Deposit { @@ -1844,7 +1852,7 @@ export const LSMDeposit = { message.delegatorAddress = object.delegator_address; } if (object.state !== undefined && object.state !== null) { - message.state = lSMDeposit_LSMDepositStateFromJSON(object.state); + message.state = object.state; } if (object.ibc_sequence_id !== undefined && object.ibc_sequence_id !== null) { message.ibcSequenceId = object.ibc_sequence_id; @@ -1853,14 +1861,14 @@ export const LSMDeposit = { }, toAmino(message: LSMDeposit, useInterfaces: boolean = false): LSMDepositAmino { const obj: any = {}; - obj.chain_id = message.chainId; - obj.amount = message.amount; - obj.shares = message.shares; - obj.denom = message.denom; - obj.ibc_denom = message.ibcDenom; - obj.delegator_address = message.delegatorAddress; - obj.state = message.state; - obj.ibc_sequence_id = message.ibcSequenceId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.shares = message.shares === "" ? undefined : message.shares; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.ibc_denom = message.ibcDenom === "" ? undefined : message.ibcDenom; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.state = message.state === 0 ? undefined : message.state; + obj.ibc_sequence_id = message.ibcSequenceId === "" ? undefined : message.ibcSequenceId; return obj; }, fromAminoMsg(object: LSMDepositAminoMsg): LSMDeposit { @@ -1983,19 +1991,19 @@ export const Unbonding = { message.ibcSequenceId = object.ibc_sequence_id; } if (object.state !== undefined && object.state !== null) { - message.state = unbonding_UnbondingStateFromJSON(object.state); + message.state = object.state; } return message; }, toAmino(message: Unbonding, useInterfaces: boolean = false): UnbondingAmino { const obj: any = {}; - obj.chain_id = message.chainId; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; obj.mature_time = message.matureTime ? Timestamp.toAmino(toTimestamp(message.matureTime)) : undefined; obj.burn_amount = message.burnAmount ? Coin.toAmino(message.burnAmount, useInterfaces) : undefined; obj.unbond_amount = message.unbondAmount ? Coin.toAmino(message.unbondAmount, useInterfaces) : undefined; - obj.ibc_sequence_id = message.ibcSequenceId; - obj.state = message.state; + obj.ibc_sequence_id = message.ibcSequenceId === "" ? undefined : message.ibcSequenceId; + obj.state = message.state === 0 ? undefined : message.state; return obj; }, fromAminoMsg(object: UnbondingAminoMsg): Unbonding { @@ -2102,9 +2110,9 @@ export const UserUnbonding = { }, toAmino(message: UserUnbonding, useInterfaces: boolean = false): UserUnbondingAmino { const obj: any = {}; - obj.chain_id = message.chainId; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; - obj.address = message.address; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; + obj.address = message.address === "" ? undefined : message.address; obj.stk_amount = message.stkAmount ? Coin.toAmino(message.stkAmount, useInterfaces) : undefined; obj.unbond_amount = message.unbondAmount ? Coin.toAmino(message.unbondAmount, useInterfaces) : undefined; return obj; @@ -2224,12 +2232,12 @@ export const ValidatorUnbonding = { }, toAmino(message: ValidatorUnbonding, useInterfaces: boolean = false): ValidatorUnbondingAmino { const obj: any = {}; - obj.chain_id = message.chainId; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; obj.mature_time = message.matureTime ? Timestamp.toAmino(toTimestamp(message.matureTime)) : undefined; - obj.validator_address = message.validatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; - obj.ibc_sequence_id = message.ibcSequenceId; + obj.ibc_sequence_id = message.ibcSequenceId === "" ? undefined : message.ibcSequenceId; return obj; }, fromAminoMsg(object: ValidatorUnbondingAminoMsg): ValidatorUnbonding { @@ -2303,8 +2311,8 @@ export const KVUpdate = { }, toAmino(message: KVUpdate, useInterfaces: boolean = false): KVUpdateAmino { const obj: any = {}; - obj.key = message.key; - obj.value = message.value; + obj.key = message.key === "" ? undefined : message.key; + obj.value = message.value === "" ? undefined : message.value; return obj; }, fromAminoMsg(object: KVUpdateAminoMsg): KVUpdate { @@ -2376,11 +2384,11 @@ export const Redelegations = { }, toAmino(message: Redelegations, useInterfaces: boolean = false): RedelegationsAmino { const obj: any = {}; - obj.chain_i_d = message.chainID; + obj.chain_i_d = message.chainID === "" ? undefined : message.chainID; if (message.redelegations) { obj.redelegations = message.redelegations.map(e => e ? Redelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.redelegations = []; + obj.redelegations = message.redelegations; } return obj; }, @@ -2460,15 +2468,15 @@ export const RedelegateTx = { message.ibcSequenceId = object.ibc_sequence_id; } if (object.state !== undefined && object.state !== null) { - message.state = redelegateTx_RedelegateTxStateFromJSON(object.state); + message.state = object.state; } return message; }, toAmino(message: RedelegateTx, useInterfaces: boolean = false): RedelegateTxAmino { const obj: any = {}; - obj.chain_id = message.chainId; - obj.ibc_sequence_id = message.ibcSequenceId; - obj.state = message.state; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.ibc_sequence_id = message.ibcSequenceId === "" ? undefined : message.ibcSequenceId; + obj.state = message.state === 0 ? undefined : message.state; return obj; }, fromAminoMsg(object: RedelegateTxAminoMsg): RedelegateTx { diff --git a/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/msgs.ts b/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/msgs.ts index 51b81be0ed..b29df204a8 100644 --- a/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/msgs.ts +++ b/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/msgs.ts @@ -422,18 +422,18 @@ export const MsgRegisterHostChain = { }, toAmino(message: MsgRegisterHostChain, useInterfaces: boolean = false): MsgRegisterHostChainAmino { const obj: any = {}; - obj.authority = message.authority; - obj.connection_id = message.connectionId; - obj.deposit_fee = message.depositFee; - obj.restake_fee = message.restakeFee; - obj.unstake_fee = message.unstakeFee; - obj.redemption_fee = message.redemptionFee; - obj.channel_id = message.channelId; - obj.port_id = message.portId; - obj.host_denom = message.hostDenom; - obj.minimum_deposit = message.minimumDeposit; - obj.unbonding_factor = message.unbondingFactor ? message.unbondingFactor.toString() : undefined; - obj.auto_compound_factor = message.autoCompoundFactor ? message.autoCompoundFactor.toString() : undefined; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.deposit_fee = message.depositFee === "" ? undefined : message.depositFee; + obj.restake_fee = message.restakeFee === "" ? undefined : message.restakeFee; + obj.unstake_fee = message.unstakeFee === "" ? undefined : message.unstakeFee; + obj.redemption_fee = message.redemptionFee === "" ? undefined : message.redemptionFee; + obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === "" ? undefined : message.portId; + obj.host_denom = message.hostDenom === "" ? undefined : message.hostDenom; + obj.minimum_deposit = message.minimumDeposit === "" ? undefined : message.minimumDeposit; + obj.unbonding_factor = message.unbondingFactor !== BigInt(0) ? message.unbondingFactor.toString() : undefined; + obj.auto_compound_factor = message.autoCompoundFactor !== BigInt(0) ? message.autoCompoundFactor.toString() : undefined; return obj; }, fromAminoMsg(object: MsgRegisterHostChainAminoMsg): MsgRegisterHostChain { @@ -572,12 +572,12 @@ export const MsgUpdateHostChain = { }, toAmino(message: MsgUpdateHostChain, useInterfaces: boolean = false): MsgUpdateHostChainAmino { const obj: any = {}; - obj.authority = message.authority; - obj.chain_id = message.chainId; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; if (message.updates) { obj.updates = message.updates.map(e => e ? KVUpdate.toAmino(e, useInterfaces) : undefined); } else { - obj.updates = []; + obj.updates = message.updates; } return obj; }, @@ -708,7 +708,7 @@ export const MsgLiquidStake = { }, toAmino(message: MsgLiquidStake, useInterfaces: boolean = false): MsgLiquidStakeAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -837,11 +837,11 @@ export const MsgLiquidStakeLSM = { }, toAmino(message: MsgLiquidStakeLSM, useInterfaces: boolean = false): MsgLiquidStakeLSMAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; if (message.delegations) { obj.delegations = message.delegations.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.delegations = []; + obj.delegations = message.delegations; } return obj; }, @@ -972,7 +972,7 @@ export const MsgLiquidUnstake = { }, toAmino(message: MsgLiquidUnstake, useInterfaces: boolean = false): MsgLiquidUnstakeAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -1103,7 +1103,7 @@ export const MsgRedeem = { }, toAmino(message: MsgRedeem, useInterfaces: boolean = false): MsgRedeemAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -1234,8 +1234,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/params.ts b/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/params.ts index dd5f9df73f..ba1819e230 100644 --- a/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/params.ts @@ -77,8 +77,8 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.admin_address = message.adminAddress; - obj.fee_address = message.feeAddress; + obj.admin_address = message.adminAddress === "" ? undefined : message.adminAddress; + obj.fee_address = message.feeAddress === "" ? undefined : message.feeAddress; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/query.ts b/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/query.ts index 8bdf573a29..ad8c10df22 100644 --- a/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/pstake/liquidstakeibc/v1beta1/query.ts @@ -635,7 +635,7 @@ export const QueryHostChainRequest = { }, toAmino(message: QueryHostChainRequest, useInterfaces: boolean = false): QueryHostChainRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; return obj; }, fromAminoMsg(object: QueryHostChainRequestAminoMsg): QueryHostChainRequest { @@ -812,7 +812,7 @@ export const QueryHostChainsResponse = { if (message.hostChains) { obj.host_chains = message.hostChains.map(e => e ? HostChain.toAmino(e, useInterfaces) : undefined); } else { - obj.host_chains = []; + obj.host_chains = message.hostChains; } return obj; }, @@ -876,7 +876,7 @@ export const QueryDepositsRequest = { }, toAmino(message: QueryDepositsRequest, useInterfaces: boolean = false): QueryDepositsRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; return obj; }, fromAminoMsg(object: QueryDepositsRequestAminoMsg): QueryDepositsRequest { @@ -940,7 +940,7 @@ export const QueryDepositsResponse = { if (message.deposits) { obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e, useInterfaces) : undefined); } else { - obj.deposits = []; + obj.deposits = message.deposits; } return obj; }, @@ -1004,7 +1004,7 @@ export const QueryLSMDepositsRequest = { }, toAmino(message: QueryLSMDepositsRequest, useInterfaces: boolean = false): QueryLSMDepositsRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; return obj; }, fromAminoMsg(object: QueryLSMDepositsRequestAminoMsg): QueryLSMDepositsRequest { @@ -1068,7 +1068,7 @@ export const QueryLSMDepositsResponse = { if (message.deposits) { obj.deposits = message.deposits.map(e => e ? LSMDeposit.toAmino(e, useInterfaces) : undefined); } else { - obj.deposits = []; + obj.deposits = message.deposits; } return obj; }, @@ -1132,7 +1132,7 @@ export const QueryUnbondingsRequest = { }, toAmino(message: QueryUnbondingsRequest, useInterfaces: boolean = false): QueryUnbondingsRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; return obj; }, fromAminoMsg(object: QueryUnbondingsRequestAminoMsg): QueryUnbondingsRequest { @@ -1196,7 +1196,7 @@ export const QueryUnbondingsResponse = { if (message.unbondings) { obj.unbondings = message.unbondings.map(e => e ? Unbonding.toAmino(e, useInterfaces) : undefined); } else { - obj.unbondings = []; + obj.unbondings = message.unbondings; } return obj; }, @@ -1271,8 +1271,8 @@ export const QueryUnbondingRequest = { }, toAmino(message: QueryUnbondingRequest, useInterfaces: boolean = false): QueryUnbondingRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; - obj.epoch = message.epoch ? message.epoch.toString() : undefined; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.epoch = message.epoch !== BigInt(0) ? message.epoch.toString() : undefined; return obj; }, fromAminoMsg(object: QueryUnbondingRequestAminoMsg): QueryUnbondingRequest { @@ -1398,7 +1398,7 @@ export const QueryUserUnbondingsRequest = { }, toAmino(message: QueryUserUnbondingsRequest, useInterfaces: boolean = false): QueryUserUnbondingsRequestAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; return obj; }, fromAminoMsg(object: QueryUserUnbondingsRequestAminoMsg): QueryUserUnbondingsRequest { @@ -1462,7 +1462,7 @@ export const QueryUserUnbondingsResponse = { if (message.userUnbondings) { obj.user_unbondings = message.userUnbondings.map(e => e ? UserUnbonding.toAmino(e, useInterfaces) : undefined); } else { - obj.user_unbondings = []; + obj.user_unbondings = message.userUnbondings; } return obj; }, @@ -1537,7 +1537,7 @@ export const QueryHostChainUserUnbondingsRequest = { }, toAmino(message: QueryHostChainUserUnbondingsRequest, useInterfaces: boolean = false): QueryHostChainUserUnbondingsRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined; return obj; }, @@ -1613,7 +1613,7 @@ export const QueryHostChainUserUnbondingsResponse = { if (message.userUnbondings) { obj.user_unbondings = message.userUnbondings.map(e => e ? UserUnbonding.toAmino(e, useInterfaces) : undefined); } else { - obj.user_unbondings = []; + obj.user_unbondings = message.userUnbondings; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; @@ -1678,7 +1678,7 @@ export const QueryValidatorUnbondingRequest = { }, toAmino(message: QueryValidatorUnbondingRequest, useInterfaces: boolean = false): QueryValidatorUnbondingRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; return obj; }, fromAminoMsg(object: QueryValidatorUnbondingRequestAminoMsg): QueryValidatorUnbondingRequest { @@ -1742,7 +1742,7 @@ export const QueryValidatorUnbondingResponse = { if (message.validatorUnbondings) { obj.validator_unbondings = message.validatorUnbondings.map(e => e ? ValidatorUnbonding.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_unbondings = []; + obj.validator_unbondings = message.validatorUnbondings; } return obj; }, @@ -1806,7 +1806,7 @@ export const QueryDepositAccountBalanceRequest = { }, toAmino(message: QueryDepositAccountBalanceRequest, useInterfaces: boolean = false): QueryDepositAccountBalanceRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; return obj; }, fromAminoMsg(object: QueryDepositAccountBalanceRequestAminoMsg): QueryDepositAccountBalanceRequest { @@ -1932,7 +1932,7 @@ export const QueryExchangeRateRequest = { }, toAmino(message: QueryExchangeRateRequest, useInterfaces: boolean = false): QueryExchangeRateRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; return obj; }, fromAminoMsg(object: QueryExchangeRateRequestAminoMsg): QueryExchangeRateRequest { @@ -1995,7 +1995,7 @@ export const QueryExchangeRateResponse = { }, toAmino(message: QueryExchangeRateResponse, useInterfaces: boolean = false): QueryExchangeRateResponseAmino { const obj: any = {}; - obj.rate = message.rate; + obj.rate = message.rate === "" ? undefined : message.rate; return obj; }, fromAminoMsg(object: QueryExchangeRateResponseAminoMsg): QueryExchangeRateResponse { @@ -2058,7 +2058,7 @@ export const QueryRedelegationsRequest = { }, toAmino(message: QueryRedelegationsRequest, useInterfaces: boolean = false): QueryRedelegationsRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; return obj; }, fromAminoMsg(object: QueryRedelegationsRequestAminoMsg): QueryRedelegationsRequest { @@ -2184,7 +2184,7 @@ export const QueryRedelegationTxRequest = { }, toAmino(message: QueryRedelegationTxRequest, useInterfaces: boolean = false): QueryRedelegationTxRequestAmino { const obj: any = {}; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; return obj; }, fromAminoMsg(object: QueryRedelegationTxRequestAminoMsg): QueryRedelegationTxRequest { @@ -2248,7 +2248,7 @@ export const QueryRedelegationTxResponse = { if (message.redelegationTx) { obj.redelegation_tx = message.redelegationTx.map(e => e ? RedelegateTx.toAmino(e, useInterfaces) : undefined); } else { - obj.redelegation_tx = []; + obj.redelegation_tx = message.redelegationTx; } return obj; }, diff --git a/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/genesis.ts b/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/genesis.ts index 573ad6ea8d..32689f0e4a 100644 --- a/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/genesis.ts @@ -191,7 +191,7 @@ export const GenesisState = { toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino { const obj: any = {}; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; - obj.module_enabled = message.moduleEnabled; + obj.module_enabled = message.moduleEnabled === false ? undefined : message.moduleEnabled; obj.host_chain_params = message.hostChainParams ? HostChainParams.toAmino(message.hostChainParams, useInterfaces) : undefined; obj.allow_listed_validators = message.allowListedValidators ? AllowListedValidators.toAmino(message.allowListedValidators, useInterfaces) : undefined; obj.delegation_state = message.delegationState ? DelegationState.toAmino(message.delegationState, useInterfaces) : undefined; @@ -200,12 +200,12 @@ export const GenesisState = { if (message.unbondingEpochCValues) { obj.unbonding_epoch_c_values = message.unbondingEpochCValues.map(e => e ? UnbondingEpochCValue.toAmino(e, useInterfaces) : undefined); } else { - obj.unbonding_epoch_c_values = []; + obj.unbonding_epoch_c_values = message.unbondingEpochCValues; } if (message.delegatorUnbondingEpochEntries) { obj.delegator_unbonding_epoch_entries = message.delegatorUnbondingEpochEntries.map(e => e ? DelegatorUnbondingEpochEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.delegator_unbonding_epoch_entries = []; + obj.delegator_unbonding_epoch_entries = message.delegatorUnbondingEpochEntries; } obj.host_accounts = message.hostAccounts ? HostAccounts.toAmino(message.hostAccounts, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/governance_proposal.ts b/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/governance_proposal.ts index f533806c46..fe0c286cf7 100644 --- a/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/governance_proposal.ts +++ b/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/governance_proposal.ts @@ -201,13 +201,13 @@ export const MinDepositAndFeeChangeProposal = { }, toAmino(message: MinDepositAndFeeChangeProposal, useInterfaces: boolean = false): MinDepositAndFeeChangeProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.min_deposit = message.minDeposit; - obj.pstake_deposit_fee = message.pstakeDepositFee; - obj.pstake_restake_fee = message.pstakeRestakeFee; - obj.pstake_unstake_fee = message.pstakeUnstakeFee; - obj.pstake_redemption_fee = message.pstakeRedemptionFee; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.min_deposit = message.minDeposit === "" ? undefined : message.minDeposit; + obj.pstake_deposit_fee = message.pstakeDepositFee === "" ? undefined : message.pstakeDepositFee; + obj.pstake_restake_fee = message.pstakeRestakeFee === "" ? undefined : message.pstakeRestakeFee; + obj.pstake_unstake_fee = message.pstakeUnstakeFee === "" ? undefined : message.pstakeUnstakeFee; + obj.pstake_redemption_fee = message.pstakeRedemptionFee === "" ? undefined : message.pstakeRedemptionFee; return obj; }, fromAminoMsg(object: MinDepositAndFeeChangeProposalAminoMsg): MinDepositAndFeeChangeProposal { @@ -292,9 +292,9 @@ export const PstakeFeeAddressChangeProposal = { }, toAmino(message: PstakeFeeAddressChangeProposal, useInterfaces: boolean = false): PstakeFeeAddressChangeProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.pstake_fee_address = message.pstakeFeeAddress; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.pstake_fee_address = message.pstakeFeeAddress === "" ? undefined : message.pstakeFeeAddress; return obj; }, fromAminoMsg(object: PstakeFeeAddressChangeProposalAminoMsg): PstakeFeeAddressChangeProposal { @@ -379,8 +379,8 @@ export const AllowListedValidatorSetChangeProposal = { }, toAmino(message: AllowListedValidatorSetChangeProposal, useInterfaces: boolean = false): AllowListedValidatorSetChangeProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; obj.allow_listed_validators = message.allowListedValidators ? AllowListedValidators.toAmino(message.allowListedValidators, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/lscosmos.ts b/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/lscosmos.ts index c892f4aad3..51fd23ea68 100644 --- a/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/lscosmos.ts +++ b/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/lscosmos.ts @@ -423,7 +423,7 @@ export const AllowListedValidators = { if (message.allowListedValidators) { obj.allow_listed_validators = message.allowListedValidators.map(e => e ? AllowListedValidator.toAmino(e, useInterfaces) : undefined); } else { - obj.allow_listed_validators = []; + obj.allow_listed_validators = message.allowListedValidators; } return obj; }, @@ -498,8 +498,8 @@ export const AllowListedValidator = { }, toAmino(message: AllowListedValidator, useInterfaces: boolean = false): AllowListedValidatorAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.target_weight = message.targetWeight; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.target_weight = message.targetWeight === "" ? undefined : message.targetWeight; return obj; }, fromAminoMsg(object: AllowListedValidatorAminoMsg): AllowListedValidator { @@ -606,11 +606,11 @@ export const PstakeParams = { }, toAmino(message: PstakeParams, useInterfaces: boolean = false): PstakeParamsAmino { const obj: any = {}; - obj.pstake_deposit_fee = message.pstakeDepositFee; - obj.pstake_restake_fee = message.pstakeRestakeFee; - obj.pstake_unstake_fee = message.pstakeUnstakeFee; - obj.pstake_redemption_fee = message.pstakeRedemptionFee; - obj.pstake_fee_address = message.pstakeFeeAddress; + obj.pstake_deposit_fee = message.pstakeDepositFee === "" ? undefined : message.pstakeDepositFee; + obj.pstake_restake_fee = message.pstakeRestakeFee === "" ? undefined : message.pstakeRestakeFee; + obj.pstake_unstake_fee = message.pstakeUnstakeFee === "" ? undefined : message.pstakeUnstakeFee; + obj.pstake_redemption_fee = message.pstakeRedemptionFee === "" ? undefined : message.pstakeRedemptionFee; + obj.pstake_fee_address = message.pstakeFeeAddress === "" ? undefined : message.pstakeFeeAddress; return obj; }, fromAminoMsg(object: PstakeParamsAminoMsg): PstakeParams { @@ -750,13 +750,13 @@ export const HostChainParams = { }, toAmino(message: HostChainParams, useInterfaces: boolean = false): HostChainParamsAmino { const obj: any = {}; - obj.chain_i_d = message.chainID; - obj.connection_i_d = message.connectionID; - obj.transfer_channel = message.transferChannel; - obj.transfer_port = message.transferPort; - obj.base_denom = message.baseDenom; - obj.mint_denom = message.mintDenom; - obj.min_deposit = message.minDeposit; + obj.chain_i_d = message.chainID === "" ? undefined : message.chainID; + obj.connection_i_d = message.connectionID === "" ? undefined : message.connectionID; + obj.transfer_channel = message.transferChannel === "" ? undefined : message.transferChannel; + obj.transfer_port = message.transferPort === "" ? undefined : message.transferPort; + obj.base_denom = message.baseDenom === "" ? undefined : message.baseDenom; + obj.mint_denom = message.mintDenom === "" ? undefined : message.mintDenom; + obj.min_deposit = message.minDeposit === "" ? undefined : message.minDeposit; obj.pstake_params = message.pstakeParams ? PstakeParams.toAmino(message.pstakeParams, useInterfaces) : undefined; return obj; }, @@ -850,18 +850,18 @@ export const DelegationState = { if (message.hostDelegationAccountBalance) { obj.host_delegation_account_balance = message.hostDelegationAccountBalance.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.host_delegation_account_balance = []; + obj.host_delegation_account_balance = message.hostDelegationAccountBalance; } - obj.host_chain_delegation_address = message.hostChainDelegationAddress; + obj.host_chain_delegation_address = message.hostChainDelegationAddress === "" ? undefined : message.hostChainDelegationAddress; if (message.hostAccountDelegations) { obj.host_account_delegations = message.hostAccountDelegations.map(e => e ? HostAccountDelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.host_account_delegations = []; + obj.host_account_delegations = message.hostAccountDelegations; } if (message.hostAccountUndelegations) { obj.host_account_undelegations = message.hostAccountUndelegations.map(e => e ? HostAccountUndelegation.toAmino(e, useInterfaces) : undefined); } else { - obj.host_account_undelegations = []; + obj.host_account_undelegations = message.hostAccountUndelegations; } return obj; }, @@ -936,7 +936,7 @@ export const HostAccountDelegation = { }, toAmino(message: HostAccountDelegation, useInterfaces: boolean = false): HostAccountDelegationAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -1031,13 +1031,13 @@ export const HostAccountUndelegation = { }, toAmino(message: HostAccountUndelegation, useInterfaces: boolean = false): HostAccountUndelegationAmino { const obj: any = {}; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; obj.total_undelegation_amount = message.totalUndelegationAmount ? Coin.toAmino(message.totalUndelegationAmount, useInterfaces) : undefined; obj.completion_time = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : undefined; if (message.undelegationEntries) { obj.undelegation_entries = message.undelegationEntries.map(e => e ? UndelegationEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.undelegation_entries = []; + obj.undelegation_entries = message.undelegationEntries; } return obj; }, @@ -1112,7 +1112,7 @@ export const UndelegationEntry = { }, toAmino(message: UndelegationEntry, useInterfaces: boolean = false): UndelegationEntryAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -1176,7 +1176,7 @@ export const HostChainRewardAddress = { }, toAmino(message: HostChainRewardAddress, useInterfaces: boolean = false): HostChainRewardAddressAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; return obj; }, fromAminoMsg(object: HostChainRewardAddressAminoMsg): HostChainRewardAddress { @@ -1260,13 +1260,13 @@ export const IBCAmountTransientStore = { if (message.iBCTransfer) { obj.i_b_c_transfer = message.iBCTransfer.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.i_b_c_transfer = []; + obj.i_b_c_transfer = message.iBCTransfer; } obj.i_c_a_delegate = message.iCADelegate ? Coin.toAmino(message.iCADelegate, useInterfaces) : undefined; if (message.undelegatonCompleteIBCTransfer) { obj.undelegaton_complete_i_b_c_transfer = message.undelegatonCompleteIBCTransfer.map(e => e ? TransientUndelegationTransfer.toAmino(e, useInterfaces) : undefined); } else { - obj.undelegaton_complete_i_b_c_transfer = []; + obj.undelegaton_complete_i_b_c_transfer = message.undelegatonCompleteIBCTransfer; } return obj; }, @@ -1341,7 +1341,7 @@ export const TransientUndelegationTransfer = { }, toAmino(message: TransientUndelegationTransfer, useInterfaces: boolean = false): TransientUndelegationTransferAmino { const obj: any = {}; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; obj.amount_unbonded = message.amountUnbonded ? Coin.toAmino(message.amountUnbonded, useInterfaces) : undefined; return obj; }, @@ -1449,11 +1449,11 @@ export const UnbondingEpochCValue = { }, toAmino(message: UnbondingEpochCValue, useInterfaces: boolean = false): UnbondingEpochCValueAmino { const obj: any = {}; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; obj.s_t_k_burn = message.sTKBurn ? Coin.toAmino(message.sTKBurn, useInterfaces) : undefined; obj.amount_unbonded = message.amountUnbonded ? Coin.toAmino(message.amountUnbonded, useInterfaces) : undefined; - obj.is_matured = message.isMatured; - obj.is_failed = message.isFailed; + obj.is_matured = message.isMatured === false ? undefined : message.isMatured; + obj.is_failed = message.isFailed === false ? undefined : message.isFailed; return obj; }, fromAminoMsg(object: UnbondingEpochCValueAminoMsg): UnbondingEpochCValue { @@ -1538,8 +1538,8 @@ export const DelegatorUnbondingEpochEntry = { }, toAmino(message: DelegatorUnbondingEpochEntry, useInterfaces: boolean = false): DelegatorUnbondingEpochEntryAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -1614,8 +1614,8 @@ export const HostAccounts = { }, toAmino(message: HostAccounts, useInterfaces: boolean = false): HostAccountsAmino { const obj: any = {}; - obj.delegator_account_owner_i_d = message.delegatorAccountOwnerID; - obj.rewards_account_owner_i_d = message.rewardsAccountOwnerID; + obj.delegator_account_owner_i_d = message.delegatorAccountOwnerID === "" ? undefined : message.delegatorAccountOwnerID; + obj.rewards_account_owner_i_d = message.rewardsAccountOwnerID === "" ? undefined : message.rewardsAccountOwnerID; return obj; }, fromAminoMsg(object: HostAccountsAminoMsg): HostAccounts { diff --git a/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/msgs.ts b/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/msgs.ts index 85178f4b20..c92e2304dd 100644 --- a/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/msgs.ts +++ b/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/msgs.ts @@ -325,7 +325,7 @@ export const MsgLiquidStake = { }, toAmino(message: MsgLiquidStake, useInterfaces: boolean = false): MsgLiquidStakeAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -450,7 +450,7 @@ export const MsgLiquidUnstake = { }, toAmino(message: MsgLiquidUnstake, useInterfaces: boolean = false): MsgLiquidUnstakeAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -575,7 +575,7 @@ export const MsgRedeem = { }, toAmino(message: MsgRedeem, useInterfaces: boolean = false): MsgRedeemAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount, useInterfaces) : undefined; return obj; }, @@ -689,7 +689,7 @@ export const MsgClaim = { }, toAmino(message: MsgClaim, useInterfaces: boolean = false): MsgClaimAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: MsgClaimAminoMsg): MsgClaim { @@ -802,7 +802,7 @@ export const MsgRecreateICA = { }, toAmino(message: MsgRecreateICA, useInterfaces: boolean = false): MsgRecreateICAAmino { const obj: any = {}; - obj.from_address = message.fromAddress; + obj.from_address = message.fromAddress === "" ? undefined : message.fromAddress; return obj; }, fromAminoMsg(object: MsgRecreateICAAminoMsg): MsgRecreateICA { @@ -1025,14 +1025,14 @@ export const MsgJumpStart = { }, toAmino(message: MsgJumpStart, useInterfaces: boolean = false): MsgJumpStartAmino { const obj: any = {}; - obj.pstake_address = message.pstakeAddress; - obj.chain_i_d = message.chainID; - obj.connection_i_d = message.connectionID; - obj.transfer_channel = message.transferChannel; - obj.transfer_port = message.transferPort; - obj.base_denom = message.baseDenom; - obj.mint_denom = message.mintDenom; - obj.min_deposit = message.minDeposit; + obj.pstake_address = message.pstakeAddress === "" ? undefined : message.pstakeAddress; + obj.chain_i_d = message.chainID === "" ? undefined : message.chainID; + obj.connection_i_d = message.connectionID === "" ? undefined : message.connectionID; + obj.transfer_channel = message.transferChannel === "" ? undefined : message.transferChannel; + obj.transfer_port = message.transferPort === "" ? undefined : message.transferPort; + obj.base_denom = message.baseDenom === "" ? undefined : message.baseDenom; + obj.mint_denom = message.mintDenom === "" ? undefined : message.mintDenom; + obj.min_deposit = message.minDeposit === "" ? undefined : message.minDeposit; obj.allow_listed_validators = message.allowListedValidators ? AllowListedValidators.toAmino(message.allowListedValidators, useInterfaces) : undefined; obj.pstake_params = message.pstakeParams ? PstakeParams.toAmino(message.pstakeParams, useInterfaces) : undefined; obj.host_accounts = message.hostAccounts ? HostAccounts.toAmino(message.hostAccounts, useInterfaces) : undefined; @@ -1159,8 +1159,8 @@ export const MsgChangeModuleState = { }, toAmino(message: MsgChangeModuleState, useInterfaces: boolean = false): MsgChangeModuleStateAmino { const obj: any = {}; - obj.pstake_address = message.pstakeAddress; - obj.module_state = message.moduleState; + obj.pstake_address = message.pstakeAddress === "" ? undefined : message.pstakeAddress; + obj.module_state = message.moduleState === false ? undefined : message.moduleState; return obj; }, fromAminoMsg(object: MsgChangeModuleStateAminoMsg): MsgChangeModuleState { @@ -1284,8 +1284,8 @@ export const MsgReportSlashing = { }, toAmino(message: MsgReportSlashing, useInterfaces: boolean = false): MsgReportSlashingAmino { const obj: any = {}; - obj.pstake_address = message.pstakeAddress; - obj.validator_address = message.validatorAddress; + obj.pstake_address = message.pstakeAddress === "" ? undefined : message.pstakeAddress; + obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: MsgReportSlashingAminoMsg): MsgReportSlashing { diff --git a/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/query.ts b/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/query.ts index 8efea99aa3..b43692b89c 100644 --- a/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/pstake/lscosmos/v1beta1/query.ts @@ -265,7 +265,6 @@ export interface QueryModuleStateRequestAminoMsg { export interface QueryModuleStateRequestSDKType {} /** QueryModuleStateRequest is a response for the Query/ModuleState methods. */ export interface QueryModuleStateResponse { - /** QueryModuleStateRequest is a response for the Query/ModuleState methods. */ moduleState: boolean; } export interface QueryModuleStateResponseProtoMsg { @@ -274,7 +273,6 @@ export interface QueryModuleStateResponseProtoMsg { } /** QueryModuleStateRequest is a response for the Query/ModuleState methods. */ export interface QueryModuleStateResponseAmino { - /** QueryModuleStateRequest is a response for the Query/ModuleState methods. */ module_state?: boolean; } export interface QueryModuleStateResponseAminoMsg { @@ -339,7 +337,6 @@ export interface QueryIBCTransientStoreResponseSDKType { } /** QueryUnclaimedRequest is a request for the Query/Unclaimed methods. */ export interface QueryUnclaimedRequest { - /** QueryUnclaimedRequest is a request for the Query/Unclaimed methods. */ delegatorAddress: string; } export interface QueryUnclaimedRequestProtoMsg { @@ -348,7 +345,6 @@ export interface QueryUnclaimedRequestProtoMsg { } /** QueryUnclaimedRequest is a request for the Query/Unclaimed methods. */ export interface QueryUnclaimedRequestAmino { - /** QueryUnclaimedRequest is a request for the Query/Unclaimed methods. */ delegator_address?: string; } export interface QueryUnclaimedRequestAminoMsg { @@ -384,10 +380,6 @@ export interface QueryUnclaimedResponseSDKType { * methods. */ export interface QueryFailedUnbondingsRequest { - /** - * QueryFailedUnbondingsRequest is a request for the Query/FailedUnbondings - * methods. - */ delegatorAddress: string; } export interface QueryFailedUnbondingsRequestProtoMsg { @@ -399,10 +391,6 @@ export interface QueryFailedUnbondingsRequestProtoMsg { * methods. */ export interface QueryFailedUnbondingsRequestAmino { - /** - * QueryFailedUnbondingsRequest is a request for the Query/FailedUnbondings - * methods. - */ delegator_address?: string; } export interface QueryFailedUnbondingsRequestAminoMsg { @@ -450,10 +438,6 @@ export interface QueryFailedUnbondingsResponseSDKType { * methods. */ export interface QueryPendingUnbondingsRequest { - /** - * QueryPendingUnbondingsRequest is a request for the Query/PendingUnbondings - * methods. - */ delegatorAddress: string; } export interface QueryPendingUnbondingsRequestProtoMsg { @@ -465,10 +449,6 @@ export interface QueryPendingUnbondingsRequestProtoMsg { * methods. */ export interface QueryPendingUnbondingsRequestAmino { - /** - * QueryPendingUnbondingsRequest is a request for the Query/PendingUnbondings - * methods. - */ delegator_address?: string; } export interface QueryPendingUnbondingsRequestAminoMsg { @@ -516,10 +496,6 @@ export interface QueryPendingUnbondingsResponseSDKType { * Query/UnbondingEpochCValue methods. */ export interface QueryUnbondingEpochCValueRequest { - /** - * QueryUnbondingEpochCValueRequest is a request for the - * Query/UnbondingEpochCValue methods. - */ epochNumber: bigint; } export interface QueryUnbondingEpochCValueRequestProtoMsg { @@ -531,10 +507,6 @@ export interface QueryUnbondingEpochCValueRequestProtoMsg { * Query/UnbondingEpochCValue methods. */ export interface QueryUnbondingEpochCValueRequestAmino { - /** - * QueryUnbondingEpochCValueRequest is a request for the - * Query/UnbondingEpochCValue methods. - */ epoch_number?: string; } export interface QueryUnbondingEpochCValueRequestAminoMsg { @@ -582,10 +554,6 @@ export interface QueryUnbondingEpochCValueResponseSDKType { * Query/HostAccountUndelegation methods. */ export interface QueryHostAccountUndelegationRequest { - /** - * QueryHostAccountUndelegationRequest is a request for the - * Query/HostAccountUndelegation methods. - */ epochNumber: bigint; } export interface QueryHostAccountUndelegationRequestProtoMsg { @@ -597,10 +565,6 @@ export interface QueryHostAccountUndelegationRequestProtoMsg { * Query/HostAccountUndelegation methods. */ export interface QueryHostAccountUndelegationRequestAmino { - /** - * QueryHostAccountUndelegationRequest is a request for the - * Query/HostAccountUndelegation methods. - */ epoch_number?: string; } export interface QueryHostAccountUndelegationRequestAminoMsg { @@ -1507,7 +1471,7 @@ export const QueryCValueResponse = { }, toAmino(message: QueryCValueResponse, useInterfaces: boolean = false): QueryCValueResponseAmino { const obj: any = {}; - obj.c_value = message.cValue; + obj.c_value = message.cValue === "" ? undefined : message.cValue; return obj; }, fromAminoMsg(object: QueryCValueResponseAminoMsg): QueryCValueResponse { @@ -1620,7 +1584,7 @@ export const QueryModuleStateResponse = { }, toAmino(message: QueryModuleStateResponse, useInterfaces: boolean = false): QueryModuleStateResponseAmino { const obj: any = {}; - obj.module_state = message.moduleState; + obj.module_state = message.moduleState === false ? undefined : message.moduleState; return obj; }, fromAminoMsg(object: QueryModuleStateResponseAminoMsg): QueryModuleStateResponse { @@ -1796,7 +1760,7 @@ export const QueryUnclaimedRequest = { }, toAmino(message: QueryUnclaimedRequest, useInterfaces: boolean = false): QueryUnclaimedRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: QueryUnclaimedRequestAminoMsg): QueryUnclaimedRequest { @@ -1860,7 +1824,7 @@ export const QueryUnclaimedResponse = { if (message.unclaimed) { obj.unclaimed = message.unclaimed.map(e => e ? UnbondingEpochCValue.toAmino(e, useInterfaces) : undefined); } else { - obj.unclaimed = []; + obj.unclaimed = message.unclaimed; } return obj; }, @@ -1924,7 +1888,7 @@ export const QueryFailedUnbondingsRequest = { }, toAmino(message: QueryFailedUnbondingsRequest, useInterfaces: boolean = false): QueryFailedUnbondingsRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: QueryFailedUnbondingsRequestAminoMsg): QueryFailedUnbondingsRequest { @@ -1988,7 +1952,7 @@ export const QueryFailedUnbondingsResponse = { if (message.failedUnbondings) { obj.failed_unbondings = message.failedUnbondings.map(e => e ? UnbondingEpochCValue.toAmino(e, useInterfaces) : undefined); } else { - obj.failed_unbondings = []; + obj.failed_unbondings = message.failedUnbondings; } return obj; }, @@ -2052,7 +2016,7 @@ export const QueryPendingUnbondingsRequest = { }, toAmino(message: QueryPendingUnbondingsRequest, useInterfaces: boolean = false): QueryPendingUnbondingsRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: QueryPendingUnbondingsRequestAminoMsg): QueryPendingUnbondingsRequest { @@ -2116,7 +2080,7 @@ export const QueryPendingUnbondingsResponse = { if (message.pendingUnbondings) { obj.pending_unbondings = message.pendingUnbondings.map(e => e ? UnbondingEpochCValue.toAmino(e, useInterfaces) : undefined); } else { - obj.pending_unbondings = []; + obj.pending_unbondings = message.pendingUnbondings; } return obj; }, @@ -2180,7 +2144,7 @@ export const QueryUnbondingEpochCValueRequest = { }, toAmino(message: QueryUnbondingEpochCValueRequest, useInterfaces: boolean = false): QueryUnbondingEpochCValueRequestAmino { const obj: any = {}; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; return obj; }, fromAminoMsg(object: QueryUnbondingEpochCValueRequestAminoMsg): QueryUnbondingEpochCValueRequest { @@ -2306,7 +2270,7 @@ export const QueryHostAccountUndelegationRequest = { }, toAmino(message: QueryHostAccountUndelegationRequest, useInterfaces: boolean = false): QueryHostAccountUndelegationRequestAmino { const obj: any = {}; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; return obj; }, fromAminoMsg(object: QueryHostAccountUndelegationRequestAminoMsg): QueryHostAccountUndelegationRequest { @@ -2443,8 +2407,8 @@ export const QueryDelegatorUnbondingEpochEntryRequest = { }, toAmino(message: QueryDelegatorUnbondingEpochEntryRequest, useInterfaces: boolean = false): QueryDelegatorUnbondingEpochEntryRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; + obj.epoch_number = message.epochNumber !== BigInt(0) ? message.epochNumber.toString() : undefined; return obj; }, fromAminoMsg(object: QueryDelegatorUnbondingEpochEntryRequestAminoMsg): QueryDelegatorUnbondingEpochEntryRequest { @@ -2796,7 +2760,7 @@ export const QueryAllDelegatorUnbondingEpochEntriesRequest = { }, toAmino(message: QueryAllDelegatorUnbondingEpochEntriesRequest, useInterfaces: boolean = false): QueryAllDelegatorUnbondingEpochEntriesRequestAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress; + obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; return obj; }, fromAminoMsg(object: QueryAllDelegatorUnbondingEpochEntriesRequestAminoMsg): QueryAllDelegatorUnbondingEpochEntriesRequest { @@ -2860,7 +2824,7 @@ export const QueryAllDelegatorUnbondingEpochEntriesResponse = { if (message.delegatorUnbondingEpochEntries) { obj.delegator_unbonding_epoch_entries = message.delegatorUnbondingEpochEntries.map(e => e ? DelegatorUnbondingEpochEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.delegator_unbonding_epoch_entries = []; + obj.delegator_unbonding_epoch_entries = message.delegatorUnbondingEpochEntries; } return obj; }, diff --git a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/contract.ts b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/contract.ts index fc04f5c71c..0883f0cf22 100644 --- a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/contract.ts +++ b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/contract.ts @@ -158,9 +158,9 @@ export const InstantiateLiquidStakeRateContract = { }, toAmino(message: InstantiateLiquidStakeRateContract, useInterfaces: boolean = false): InstantiateLiquidStakeRateContractAmino { const obj: any = {}; - obj.admin = message.admin; - obj.transfer_channel_i_d = message.transferChannelID; - obj.transfer_port_i_d = message.transferPortID; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.transfer_channel_i_d = message.transferChannelID === "" ? undefined : message.transferChannelID; + obj.transfer_port_i_d = message.transferPortID === "" ? undefined : message.transferPortID; return obj; }, fromAminoMsg(object: InstantiateLiquidStakeRateContractAminoMsg): InstantiateLiquidStakeRateContract { @@ -319,10 +319,10 @@ export const LiquidStakeRate = { }, toAmino(message: LiquidStakeRate, useInterfaces: boolean = false): LiquidStakeRateAmino { const obj: any = {}; - obj.default_bond_denom = message.defaultBondDenom; - obj.stk_denom = message.stkDenom; - obj.c_value = message.cValue; - obj.controller_chain_time = message.controllerChainTime ? message.controllerChainTime.toString() : undefined; + obj.default_bond_denom = message.defaultBondDenom === "" ? undefined : message.defaultBondDenom; + obj.stk_denom = message.stkDenom === "" ? undefined : message.stkDenom; + obj.c_value = message.cValue === "" ? undefined : message.cValue; + obj.controller_chain_time = message.controllerChainTime !== BigInt(0) ? message.controllerChainTime.toString() : undefined; return obj; }, fromAminoMsg(object: LiquidStakeRateAminoMsg): LiquidStakeRate { diff --git a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/genesis.ts b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/genesis.ts index 496eca190f..f2f39a4653 100644 --- a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/genesis.ts @@ -82,7 +82,7 @@ export const GenesisState = { if (message.hostChains) { obj.host_chains = message.hostChains.map(e => e ? HostChain.toAmino(e, useInterfaces) : undefined); } else { - obj.host_chains = []; + obj.host_chains = message.hostChains; } return obj; }, diff --git a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/params.ts b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/params.ts index f9004461fa..807f2d206d 100644 --- a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/params.ts @@ -63,7 +63,7 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.admin = message.admin; + obj.admin = message.admin === "" ? undefined : message.admin; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/query.ts b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/query.ts index 54e40d0ff8..c5ec7180d0 100644 --- a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/query.ts @@ -267,7 +267,7 @@ export const QueryGetHostChainRequest = { }, toAmino(message: QueryGetHostChainRequest, useInterfaces: boolean = false): QueryGetHostChainRequestAmino { const obj: any = {}; - obj.i_d = message.iD ? message.iD.toString() : undefined; + obj.i_d = message.iD !== BigInt(0) ? message.iD.toString() : undefined; return obj; }, fromAminoMsg(object: QueryGetHostChainRequestAminoMsg): QueryGetHostChainRequest { @@ -468,7 +468,7 @@ export const QueryAllHostChainsResponse = { if (message.hostChains) { obj.host_chains = message.hostChains.map(e => e ? HostChain.toAmino(e, useInterfaces) : undefined); } else { - obj.host_chains = []; + obj.host_chains = message.hostChains; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/ratesync.ts b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/ratesync.ts index 0ef81284ae..3c493d192d 100644 --- a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/ratesync.ts +++ b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/ratesync.ts @@ -324,13 +324,13 @@ export const HostChain = { }, toAmino(message: HostChain, useInterfaces: boolean = false): HostChainAmino { const obj: any = {}; - obj.i_d = message.iD ? message.iD.toString() : undefined; - obj.chain_i_d = message.chainID; - obj.connection_i_d = message.connectionID; - obj.i_c_a_account = message.iCAAccount ? ICAAccount.toAmino(message.iCAAccount, useInterfaces) : ICAAccount.fromPartial({}); - obj.features = message.features ? Feature.toAmino(message.features, useInterfaces) : Feature.fromPartial({}); - obj.transfer_channel_i_d = message.transferChannelID; - obj.transfer_port_i_d = message.transferPortID; + obj.i_d = message.iD !== BigInt(0) ? message.iD.toString() : undefined; + obj.chain_i_d = message.chainID === "" ? undefined : message.chainID; + obj.connection_i_d = message.connectionID === "" ? undefined : message.connectionID; + obj.i_c_a_account = message.iCAAccount ? ICAAccount.toAmino(message.iCAAccount, useInterfaces) : ICAAccount.toAmino(ICAAccount.fromPartial({})); + obj.features = message.features ? Feature.toAmino(message.features, useInterfaces) : Feature.toAmino(Feature.fromPartial({})); + obj.transfer_channel_i_d = message.transferChannelID === "" ? undefined : message.transferChannelID; + obj.transfer_port_i_d = message.transferPortID === "" ? undefined : message.transferPortID; return obj; }, fromAminoMsg(object: HostChainAminoMsg): HostChain { @@ -404,8 +404,8 @@ export const Feature = { }, toAmino(message: Feature, useInterfaces: boolean = false): FeatureAmino { const obj: any = {}; - obj.liquid_stake_i_b_c = message.liquidStakeIBC ? LiquidStake.toAmino(message.liquidStakeIBC, useInterfaces) : LiquidStake.fromPartial({}); - obj.liquid_stake = message.liquidStake ? LiquidStake.toAmino(message.liquidStake, useInterfaces) : LiquidStake.fromPartial({}); + obj.liquid_stake_i_b_c = message.liquidStakeIBC ? LiquidStake.toAmino(message.liquidStakeIBC, useInterfaces) : LiquidStake.toAmino(LiquidStake.fromPartial({})); + obj.liquid_stake = message.liquidStake ? LiquidStake.toAmino(message.liquidStake, useInterfaces) : LiquidStake.toAmino(LiquidStake.fromPartial({})); return obj; }, fromAminoMsg(object: FeatureAminoMsg): Feature { @@ -502,13 +502,13 @@ export const LiquidStake = { fromAmino(object: LiquidStakeAmino): LiquidStake { const message = createBaseLiquidStake(); if (object.feature_type !== undefined && object.feature_type !== null) { - message.featureType = featureTypeFromJSON(object.feature_type); + message.featureType = object.feature_type; } if (object.code_i_d !== undefined && object.code_i_d !== null) { message.codeID = BigInt(object.code_i_d); } if (object.instantiation !== undefined && object.instantiation !== null) { - message.instantiation = instantiationStateFromJSON(object.instantiation); + message.instantiation = object.instantiation; } if (object.contract_address !== undefined && object.contract_address !== null) { message.contractAddress = object.contract_address; @@ -521,16 +521,16 @@ export const LiquidStake = { }, toAmino(message: LiquidStake, useInterfaces: boolean = false): LiquidStakeAmino { const obj: any = {}; - obj.feature_type = message.featureType; - obj.code_i_d = message.codeID ? message.codeID.toString() : undefined; - obj.instantiation = message.instantiation; - obj.contract_address = message.contractAddress; + obj.feature_type = message.featureType === 0 ? undefined : message.featureType; + obj.code_i_d = message.codeID !== BigInt(0) ? message.codeID.toString() : undefined; + obj.instantiation = message.instantiation === 0 ? undefined : message.instantiation; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; if (message.denoms) { obj.denoms = message.denoms.map(e => e); } else { - obj.denoms = []; + obj.denoms = message.denoms; } - obj.enabled = message.enabled; + obj.enabled = message.enabled === false ? undefined : message.enabled; return obj; }, fromAminoMsg(object: LiquidStakeAminoMsg): LiquidStake { @@ -595,7 +595,7 @@ export const ICAMemo = { fromAmino(object: ICAMemoAmino): ICAMemo { const message = createBaseICAMemo(); if (object.feature_type !== undefined && object.feature_type !== null) { - message.featureType = featureTypeFromJSON(object.feature_type); + message.featureType = object.feature_type; } if (object.host_chain_i_d !== undefined && object.host_chain_i_d !== null) { message.hostChainID = BigInt(object.host_chain_i_d); @@ -604,8 +604,8 @@ export const ICAMemo = { }, toAmino(message: ICAMemo, useInterfaces: boolean = false): ICAMemoAmino { const obj: any = {}; - obj.feature_type = message.featureType; - obj.host_chain_i_d = message.hostChainID ? message.hostChainID.toString() : undefined; + obj.feature_type = message.featureType === 0 ? undefined : message.featureType; + obj.host_chain_i_d = message.hostChainID !== BigInt(0) ? message.hostChainID.toString() : undefined; return obj; }, fromAminoMsg(object: ICAMemoAminoMsg): ICAMemo { diff --git a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/tx.ts b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/tx.ts index 17680ff7c2..f7d8e0d244 100644 --- a/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/pstake/ratesync/v1beta1/tx.ts @@ -187,8 +187,8 @@ export const MsgCreateHostChain = { }, toAmino(message: MsgCreateHostChain, useInterfaces: boolean = false): MsgCreateHostChainAmino { const obj: any = {}; - obj.authority = message.authority; - obj.host_chain = message.hostChain ? HostChain.toAmino(message.hostChain, useInterfaces) : HostChain.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.host_chain = message.hostChain ? HostChain.toAmino(message.hostChain, useInterfaces) : HostChain.toAmino(HostChain.fromPartial({})); return obj; }, fromAminoMsg(object: MsgCreateHostChainAminoMsg): MsgCreateHostChain { @@ -257,7 +257,7 @@ export const MsgCreateHostChainResponse = { }, toAmino(message: MsgCreateHostChainResponse, useInterfaces: boolean = false): MsgCreateHostChainResponseAmino { const obj: any = {}; - obj.i_d = message.iD ? message.iD.toString() : undefined; + obj.i_d = message.iD !== BigInt(0) ? message.iD.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCreateHostChainResponseAminoMsg): MsgCreateHostChainResponse { @@ -331,8 +331,8 @@ export const MsgUpdateHostChain = { }, toAmino(message: MsgUpdateHostChain, useInterfaces: boolean = false): MsgUpdateHostChainAmino { const obj: any = {}; - obj.authority = message.authority; - obj.host_chain = message.hostChain ? HostChain.toAmino(message.hostChain, useInterfaces) : HostChain.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.host_chain = message.hostChain ? HostChain.toAmino(message.hostChain, useInterfaces) : HostChain.toAmino(HostChain.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateHostChainAminoMsg): MsgUpdateHostChain { @@ -462,8 +462,8 @@ export const MsgDeleteHostChain = { }, toAmino(message: MsgDeleteHostChain, useInterfaces: boolean = false): MsgDeleteHostChainAmino { const obj: any = {}; - obj.authority = message.authority; - obj.i_d = message.iD ? message.iD.toString() : undefined; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.i_d = message.iD !== BigInt(0) ? message.iD.toString() : undefined; return obj; }, fromAminoMsg(object: MsgDeleteHostChainAminoMsg): MsgDeleteHostChain { @@ -593,8 +593,8 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; - obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.fromPartial({}); + obj.authority = message.authority === "" ? undefined : message.authority; + obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/alloc/v1beta1/params.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/alloc/v1beta1/params.ts index 17ac0aabe9..8679796e24 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/alloc/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/alloc/v1beta1/params.ts @@ -139,8 +139,8 @@ export const WeightedAddress = { }, toAmino(message: WeightedAddress, useInterfaces: boolean = false): WeightedAddressAmino { const obj: any = {}; - obj.address = message.address; - obj.weight = message.weight; + obj.address = message.address === "" ? undefined : message.address; + obj.weight = message.weight === "" ? undefined : message.weight; return obj; }, fromAminoMsg(object: WeightedAddressAminoMsg): WeightedAddress { @@ -225,9 +225,9 @@ export const DistributionProportions = { }, toAmino(message: DistributionProportions, useInterfaces: boolean = false): DistributionProportionsAmino { const obj: any = {}; - obj.nft_incentives = message.nftIncentives; - obj.developer_rewards = message.developerRewards; - obj.community_pool = message.communityPool; + obj.nft_incentives = message.nftIncentives === "" ? undefined : message.nftIncentives; + obj.developer_rewards = message.developerRewards === "" ? undefined : message.developerRewards; + obj.community_pool = message.communityPool === "" ? undefined : message.communityPool; return obj; }, fromAminoMsg(object: DistributionProportionsAminoMsg): DistributionProportions { @@ -321,17 +321,17 @@ export const Params = { if (message.weightedDeveloperRewardsReceivers) { obj.weighted_developer_rewards_receivers = message.weightedDeveloperRewardsReceivers.map(e => e ? WeightedAddress.toAmino(e, useInterfaces) : undefined); } else { - obj.weighted_developer_rewards_receivers = []; + obj.weighted_developer_rewards_receivers = message.weightedDeveloperRewardsReceivers; } if (message.weightedIncentivesRewardsReceivers) { obj.weighted_incentives_rewards_receivers = message.weightedIncentivesRewardsReceivers.map(e => e ? WeightedAddress.toAmino(e, useInterfaces) : undefined); } else { - obj.weighted_incentives_rewards_receivers = []; + obj.weighted_incentives_rewards_receivers = message.weightedIncentivesRewardsReceivers; } if (message.supplementAmount) { obj.supplement_amount = message.supplementAmount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.supplement_amount = []; + obj.supplement_amount = message.supplementAmount; } return obj; }, diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/alloc/v1beta1/tx.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/alloc/v1beta1/tx.ts index e9384f84e4..af961d7f1e 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/alloc/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/alloc/v1beta1/tx.ts @@ -220,16 +220,16 @@ export const MsgCreateVestingAccount = { }, toAmino(message: MsgCreateVestingAccount, useInterfaces: boolean = false): MsgCreateVestingAccountAmino { const obj: any = {}; - obj.from_address = message.fromAddress; - obj.to_address = message.toAddress; + obj.from_address = message.fromAddress === "" ? undefined : message.fromAddress; + obj.to_address = message.toAddress === "" ? undefined : message.toAddress; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } - obj.start_time = message.startTime ? message.startTime.toString() : undefined; - obj.end_time = message.endTime ? message.endTime.toString() : undefined; - obj.delayed = message.delayed; + obj.start_time = message.startTime !== BigInt(0) ? message.startTime.toString() : undefined; + obj.end_time = message.endTime !== BigInt(0) ? message.endTime.toString() : undefined; + obj.delayed = message.delayed === false ? undefined : message.delayed; return obj; }, fromAminoMsg(object: MsgCreateVestingAccountAminoMsg): MsgCreateVestingAccount { @@ -351,11 +351,11 @@ export const MsgFundFairburnPool = { }, toAmino(message: MsgFundFairburnPool, useInterfaces: boolean = false): MsgFundFairburnPoolAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.amount = []; + obj.amount = message.amount; } return obj; }, diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/cron.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/cron.ts index cb0b52fac4..ae02d3cbad 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/cron.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/cron.ts @@ -72,7 +72,7 @@ export const Params = { if (message.adminAddresses) { obj.admin_addresses = message.adminAddresses.map(e => e); } else { - obj.admin_addresses = []; + obj.admin_addresses = message.adminAddresses; } return obj; }, diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/genesis.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/genesis.ts index c6ce462b2c..209b025b58 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/genesis.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/genesis.ts @@ -90,7 +90,7 @@ export const GenesisState = { if (message.privilegedContractAddresses) { obj.privileged_contract_addresses = message.privilegedContractAddresses.map(e => e); } else { - obj.privileged_contract_addresses = []; + obj.privileged_contract_addresses = message.privilegedContractAddresses; } obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/proposal.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/proposal.ts index ed971ca5a9..8f81e0f78c 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/proposal.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/proposal.ts @@ -164,9 +164,9 @@ export const PromoteToPrivilegedContractProposal = { }, toAmino(message: PromoteToPrivilegedContractProposal, useInterfaces: boolean = false): PromoteToPrivilegedContractProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.contract = message.contract === "" ? undefined : message.contract; return obj; }, fromAminoMsg(object: PromoteToPrivilegedContractProposalAminoMsg): PromoteToPrivilegedContractProposal { @@ -252,9 +252,9 @@ export const DemotePrivilegedContractProposal = { }, toAmino(message: DemotePrivilegedContractProposal, useInterfaces: boolean = false): DemotePrivilegedContractProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.contract = message.contract === "" ? undefined : message.contract; return obj; }, fromAminoMsg(object: DemotePrivilegedContractProposalAminoMsg): DemotePrivilegedContractProposal { diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/query.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/query.ts index 349c4a1606..d77c4db019 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/query.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/query.ts @@ -208,7 +208,7 @@ export const QueryListPrivilegedResponse = { if (message.contractAddresses) { obj.contract_addresses = message.contractAddresses.map(e => e); } else { - obj.contract_addresses = []; + obj.contract_addresses = message.contractAddresses; } return obj; }, diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/tx.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/tx.ts index 4fe9c99e08..a4e2ef0d3c 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/tx.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/cron/v1/tx.ts @@ -173,8 +173,8 @@ export const MsgPromoteToPrivilegedContract = { }, toAmino(message: MsgPromoteToPrivilegedContract, useInterfaces: boolean = false): MsgPromoteToPrivilegedContractAmino { const obj: any = {}; - obj.authority = message.authority; - obj.contract = message.contract; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.contract = message.contract === "" ? undefined : message.contract; return obj; }, fromAminoMsg(object: MsgPromoteToPrivilegedContractAminoMsg): MsgPromoteToPrivilegedContract { @@ -298,8 +298,8 @@ export const MsgDemoteFromPrivilegedContract = { }, toAmino(message: MsgDemoteFromPrivilegedContract, useInterfaces: boolean = false): MsgDemoteFromPrivilegedContractAmino { const obj: any = {}; - obj.authority = message.authority; - obj.contract = message.contract; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.contract = message.contract === "" ? undefined : message.contract; return obj; }, fromAminoMsg(object: MsgDemoteFromPrivilegedContractAminoMsg): MsgDemoteFromPrivilegedContract { @@ -423,7 +423,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/genesis.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/genesis.ts index e2a7893d0d..4ebd184f70 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/genesis.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/genesis.ts @@ -99,12 +99,12 @@ export const GenesisState = { if (message.codeAuthorizations) { obj.code_authorizations = message.codeAuthorizations.map(e => e ? CodeAuthorization.toAmino(e, useInterfaces) : undefined); } else { - obj.code_authorizations = []; + obj.code_authorizations = message.codeAuthorizations; } if (message.contractAuthorizations) { obj.contract_authorizations = message.contractAuthorizations.map(e => e ? ContractAuthorization.toAmino(e, useInterfaces) : undefined); } else { - obj.contract_authorizations = []; + obj.contract_authorizations = message.contractAuthorizations; } return obj; }, diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/globalfee.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/globalfee.ts index c6abd9457e..d4f293a0c6 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/globalfee.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/globalfee.ts @@ -135,12 +135,12 @@ export const Params = { if (message.privilegedAddresses) { obj.privileged_addresses = message.privilegedAddresses.map(e => e); } else { - obj.privileged_addresses = []; + obj.privileged_addresses = message.privilegedAddresses; } if (message.minimumGasPrices) { obj.minimum_gas_prices = message.minimumGasPrices.map(e => e ? DecCoin.toAmino(e, useInterfaces) : undefined); } else { - obj.minimum_gas_prices = []; + obj.minimum_gas_prices = message.minimumGasPrices; } return obj; }, @@ -213,11 +213,11 @@ export const CodeAuthorization = { }, toAmino(message: CodeAuthorization, useInterfaces: boolean = false): CodeAuthorizationAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; if (message.methods) { obj.methods = message.methods.map(e => e); } else { - obj.methods = []; + obj.methods = message.methods; } return obj; }, @@ -290,11 +290,11 @@ export const ContractAuthorization = { }, toAmino(message: ContractAuthorization, useInterfaces: boolean = false): ContractAuthorizationAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; if (message.methods) { obj.methods = message.methods.map(e => e); } else { - obj.methods = []; + obj.methods = message.methods; } return obj; }, diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/proposal.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/proposal.ts index bf7ec809fb..58e2362bbb 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/proposal.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/proposal.ts @@ -179,8 +179,8 @@ export const SetCodeAuthorizationProposal = { }, toAmino(message: SetCodeAuthorizationProposal, useInterfaces: boolean = false): SetCodeAuthorizationProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; obj.code_authorization = message.codeAuthorization ? CodeAuthorization.toAmino(message.codeAuthorization, useInterfaces) : undefined; return obj; }, @@ -267,9 +267,9 @@ export const RemoveCodeAuthorizationProposal = { }, toAmino(message: RemoveCodeAuthorizationProposal, useInterfaces: boolean = false): RemoveCodeAuthorizationProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; return obj; }, fromAminoMsg(object: RemoveCodeAuthorizationProposalAminoMsg): RemoveCodeAuthorizationProposal { @@ -355,8 +355,8 @@ export const SetContractAuthorizationProposal = { }, toAmino(message: SetContractAuthorizationProposal, useInterfaces: boolean = false): SetContractAuthorizationProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; obj.contract_authorization = message.contractAuthorization ? ContractAuthorization.toAmino(message.contractAuthorization, useInterfaces) : undefined; return obj; }, @@ -443,9 +443,9 @@ export const RemoveContractAuthorizationProposal = { }, toAmino(message: RemoveContractAuthorizationProposal, useInterfaces: boolean = false): RemoveContractAuthorizationProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract_address = message.contractAddress; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; return obj; }, fromAminoMsg(object: RemoveContractAuthorizationProposalAminoMsg): RemoveContractAuthorizationProposal { diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/query.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/query.ts index 3334cad832..29344bc15a 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/query.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/query.ts @@ -172,7 +172,7 @@ export const QueryCodeAuthorizationRequest = { }, toAmino(message: QueryCodeAuthorizationRequest, useInterfaces: boolean = false): QueryCodeAuthorizationRequestAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryCodeAuthorizationRequestAminoMsg): QueryCodeAuthorizationRequest { @@ -236,7 +236,7 @@ export const QueryCodeAuthorizationResponse = { if (message.methods) { obj.methods = message.methods.map(e => e); } else { - obj.methods = []; + obj.methods = message.methods; } return obj; }, @@ -300,7 +300,7 @@ export const QueryContractAuthorizationRequest = { }, toAmino(message: QueryContractAuthorizationRequest, useInterfaces: boolean = false): QueryContractAuthorizationRequestAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; return obj; }, fromAminoMsg(object: QueryContractAuthorizationRequestAminoMsg): QueryContractAuthorizationRequest { @@ -364,7 +364,7 @@ export const QueryContractAuthorizationResponse = { if (message.methods) { obj.methods = message.methods.map(e => e); } else { - obj.methods = []; + obj.methods = message.methods; } return obj; }, @@ -601,12 +601,12 @@ export const QueryAuthorizationsResponse = { if (message.codeAuthorizations) { obj.code_authorizations = message.codeAuthorizations.map(e => e ? CodeAuthorization.toAmino(e, useInterfaces) : undefined); } else { - obj.code_authorizations = []; + obj.code_authorizations = message.codeAuthorizations; } if (message.contractAuthorizations) { obj.contract_authorizations = message.contractAuthorizations.map(e => e ? ContractAuthorization.toAmino(e, useInterfaces) : undefined); } else { - obj.contract_authorizations = []; + obj.contract_authorizations = message.contractAuthorizations; } return obj; }, diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/tx.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/tx.ts index 19a34bb853..baf951cbfb 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/tx.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/globalfee/v1/tx.ts @@ -213,7 +213,7 @@ export const MsgSetCodeAuthorization = { }, toAmino(message: MsgSetCodeAuthorization, useInterfaces: boolean = false): MsgSetCodeAuthorizationAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.code_authorization = message.codeAuthorization ? CodeAuthorization.toAmino(message.codeAuthorization, useInterfaces) : undefined; return obj; }, @@ -338,8 +338,8 @@ export const MsgRemoveCodeAuthorization = { }, toAmino(message: MsgRemoveCodeAuthorization, useInterfaces: boolean = false): MsgRemoveCodeAuthorizationAmino { const obj: any = {}; - obj.sender = message.sender; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgRemoveCodeAuthorizationAminoMsg): MsgRemoveCodeAuthorization { @@ -463,7 +463,7 @@ export const MsgSetContractAuthorization = { }, toAmino(message: MsgSetContractAuthorization, useInterfaces: boolean = false): MsgSetContractAuthorizationAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.contract_authorization = message.contractAuthorization ? ContractAuthorization.toAmino(message.contractAuthorization, useInterfaces) : undefined; return obj; }, @@ -588,8 +588,8 @@ export const MsgRemoveContractAuthorization = { }, toAmino(message: MsgRemoveContractAuthorization, useInterfaces: boolean = false): MsgRemoveContractAuthorizationAmino { const obj: any = {}; - obj.sender = message.sender; - obj.contract_address = message.contractAddress; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; return obj; }, fromAminoMsg(object: MsgRemoveContractAuthorizationAminoMsg): MsgRemoveContractAuthorization { @@ -713,7 +713,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams, useInterfaces: boolean = false): MsgUpdateParamsAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/publicawesome/stargaze/mint/v1beta1/mint.ts b/packages/types/protobuf/codegen/publicawesome/stargaze/mint/v1beta1/mint.ts index 7e3e27d37d..8d92575d04 100644 --- a/packages/types/protobuf/codegen/publicawesome/stargaze/mint/v1beta1/mint.ts +++ b/packages/types/protobuf/codegen/publicawesome/stargaze/mint/v1beta1/mint.ts @@ -110,7 +110,7 @@ export const Minter = { }, toAmino(message: Minter, useInterfaces: boolean = false): MinterAmino { const obj: any = {}; - obj.annual_provisions = message.annualProvisions; + obj.annual_provisions = message.annualProvisions === "" ? undefined : message.annualProvisions; return obj; }, fromAminoMsg(object: MinterAminoMsg): Minter { @@ -217,11 +217,11 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.mint_denom = message.mintDenom; + obj.mint_denom = message.mintDenom === "" ? undefined : message.mintDenom; obj.start_time = message.startTime ? Timestamp.toAmino(toTimestamp(message.startTime)) : undefined; - obj.initial_annual_provisions = message.initialAnnualProvisions; - obj.reduction_factor = message.reductionFactor; - obj.blocks_per_year = message.blocksPerYear ? message.blocksPerYear.toString() : undefined; + obj.initial_annual_provisions = message.initialAnnualProvisions === "" ? undefined : message.initialAnnualProvisions; + obj.reduction_factor = message.reductionFactor === "" ? undefined : message.reductionFactor; + obj.blocks_per_year = message.blocksPerYear !== BigInt(0) ? message.blocksPerYear.toString() : undefined; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/regen/data/v1/events.ts b/packages/types/protobuf/codegen/regen/data/v1/events.ts index 76955141f7..deb5dcffcf 100644 --- a/packages/types/protobuf/codegen/regen/data/v1/events.ts +++ b/packages/types/protobuf/codegen/regen/data/v1/events.ts @@ -156,7 +156,7 @@ export const EventAnchor = { }, toAmino(message: EventAnchor, useInterfaces: boolean = false): EventAnchorAmino { const obj: any = {}; - obj.iri = message.iri; + obj.iri = message.iri === "" ? undefined : message.iri; return obj; }, fromAminoMsg(object: EventAnchorAminoMsg): EventAnchor { @@ -230,8 +230,8 @@ export const EventAttest = { }, toAmino(message: EventAttest, useInterfaces: boolean = false): EventAttestAmino { const obj: any = {}; - obj.iri = message.iri; - obj.attestor = message.attestor; + obj.iri = message.iri === "" ? undefined : message.iri; + obj.attestor = message.attestor === "" ? undefined : message.attestor; return obj; }, fromAminoMsg(object: EventAttestAminoMsg): EventAttest { @@ -294,7 +294,7 @@ export const EventDefineResolver = { }, toAmino(message: EventDefineResolver, useInterfaces: boolean = false): EventDefineResolverAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; return obj; }, fromAminoMsg(object: EventDefineResolverAminoMsg): EventDefineResolver { @@ -368,8 +368,8 @@ export const EventRegisterResolver = { }, toAmino(message: EventRegisterResolver, useInterfaces: boolean = false): EventRegisterResolverAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.iri = message.iri; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.iri = message.iri === "" ? undefined : message.iri; return obj; }, fromAminoMsg(object: EventRegisterResolverAminoMsg): EventRegisterResolver { diff --git a/packages/types/protobuf/codegen/regen/data/v1/state.ts b/packages/types/protobuf/codegen/regen/data/v1/state.ts index bdaacb24a8..a676ab8b77 100644 --- a/packages/types/protobuf/codegen/regen/data/v1/state.ts +++ b/packages/types/protobuf/codegen/regen/data/v1/state.ts @@ -223,7 +223,7 @@ export const DataID = { toAmino(message: DataID, useInterfaces: boolean = false): DataIDAmino { const obj: any = {}; obj.id = message.id ? base64FromBytes(message.id) : undefined; - obj.iri = message.iri; + obj.iri = message.iri === "" ? undefined : message.iri; return obj; }, fromAminoMsg(object: DataIDAminoMsg): DataID { @@ -470,8 +470,8 @@ export const Resolver = { }, toAmino(message: Resolver, useInterfaces: boolean = false): ResolverAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.url = message.url; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.url = message.url === "" ? undefined : message.url; obj.manager = message.manager ? base64FromBytes(message.manager) : undefined; return obj; }, @@ -547,7 +547,7 @@ export const DataResolver = { toAmino(message: DataResolver, useInterfaces: boolean = false): DataResolverAmino { const obj: any = {}; obj.id = message.id ? base64FromBytes(message.id) : undefined; - obj.resolver_id = message.resolverId ? message.resolverId.toString() : undefined; + obj.resolver_id = message.resolverId !== BigInt(0) ? message.resolverId.toString() : undefined; return obj; }, fromAminoMsg(object: DataResolverAminoMsg): DataResolver { diff --git a/packages/types/protobuf/codegen/regen/data/v1/tx.ts b/packages/types/protobuf/codegen/regen/data/v1/tx.ts index 5bd95374c0..af83becfee 100644 --- a/packages/types/protobuf/codegen/regen/data/v1/tx.ts +++ b/packages/types/protobuf/codegen/regen/data/v1/tx.ts @@ -335,7 +335,7 @@ export const MsgAnchor = { }, toAmino(message: MsgAnchor, useInterfaces: boolean = false): MsgAnchorAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.content_hash = message.contentHash ? ContentHash.toAmino(message.contentHash, useInterfaces) : undefined; return obj; }, @@ -410,7 +410,7 @@ export const MsgAnchorResponse = { }, toAmino(message: MsgAnchorResponse, useInterfaces: boolean = false): MsgAnchorResponseAmino { const obj: any = {}; - obj.iri = message.iri; + obj.iri = message.iri === "" ? undefined : message.iri; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; return obj; }, @@ -483,11 +483,11 @@ export const MsgAttest = { }, toAmino(message: MsgAttest, useInterfaces: boolean = false): MsgAttestAmino { const obj: any = {}; - obj.attestor = message.attestor; + obj.attestor = message.attestor === "" ? undefined : message.attestor; if (message.contentHashes) { obj.content_hashes = message.contentHashes.map(e => e ? ContentHash_Graph.toAmino(e, useInterfaces) : undefined); } else { - obj.content_hashes = []; + obj.content_hashes = message.contentHashes; } return obj; }, @@ -563,7 +563,7 @@ export const MsgAttestResponse = { if (message.iris) { obj.iris = message.iris.map(e => e); } else { - obj.iris = []; + obj.iris = message.iris; } obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; return obj; @@ -639,8 +639,8 @@ export const MsgDefineResolver = { }, toAmino(message: MsgDefineResolver, useInterfaces: boolean = false): MsgDefineResolverAmino { const obj: any = {}; - obj.manager = message.manager; - obj.resolver_url = message.resolverUrl; + obj.manager = message.manager === "" ? undefined : message.manager; + obj.resolver_url = message.resolverUrl === "" ? undefined : message.resolverUrl; return obj; }, fromAminoMsg(object: MsgDefineResolverAminoMsg): MsgDefineResolver { @@ -703,7 +703,7 @@ export const MsgDefineResolverResponse = { }, toAmino(message: MsgDefineResolverResponse, useInterfaces: boolean = false): MsgDefineResolverResponseAmino { const obj: any = {}; - obj.resolver_id = message.resolverId ? message.resolverId.toString() : undefined; + obj.resolver_id = message.resolverId !== BigInt(0) ? message.resolverId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgDefineResolverResponseAminoMsg): MsgDefineResolverResponse { @@ -786,12 +786,12 @@ export const MsgRegisterResolver = { }, toAmino(message: MsgRegisterResolver, useInterfaces: boolean = false): MsgRegisterResolverAmino { const obj: any = {}; - obj.manager = message.manager; - obj.resolver_id = message.resolverId ? message.resolverId.toString() : undefined; + obj.manager = message.manager === "" ? undefined : message.manager; + obj.resolver_id = message.resolverId !== BigInt(0) ? message.resolverId.toString() : undefined; if (message.contentHashes) { obj.content_hashes = message.contentHashes.map(e => e ? ContentHash.toAmino(e, useInterfaces) : undefined); } else { - obj.content_hashes = []; + obj.content_hashes = message.contentHashes; } return obj; }, diff --git a/packages/types/protobuf/codegen/regen/data/v1/types.ts b/packages/types/protobuf/codegen/regen/data/v1/types.ts index 593771803e..09c8903c31 100644 --- a/packages/types/protobuf/codegen/regen/data/v1/types.ts +++ b/packages/types/protobuf/codegen/regen/data/v1/types.ts @@ -537,18 +537,18 @@ export const ContentHash_Raw = { message.hash = bytesFromBase64(object.hash); } if (object.digest_algorithm !== undefined && object.digest_algorithm !== null) { - message.digestAlgorithm = digestAlgorithmFromJSON(object.digest_algorithm); + message.digestAlgorithm = object.digest_algorithm; } if (object.media_type !== undefined && object.media_type !== null) { - message.mediaType = rawMediaTypeFromJSON(object.media_type); + message.mediaType = object.media_type; } return message; }, toAmino(message: ContentHash_Raw, useInterfaces: boolean = false): ContentHash_RawAmino { const obj: any = {}; obj.hash = message.hash ? base64FromBytes(message.hash) : undefined; - obj.digest_algorithm = message.digestAlgorithm; - obj.media_type = message.mediaType; + obj.digest_algorithm = message.digestAlgorithm === 0 ? undefined : message.digestAlgorithm; + obj.media_type = message.mediaType === 0 ? undefined : message.mediaType; return obj; }, fromAminoMsg(object: ContentHash_RawAminoMsg): ContentHash_Raw { @@ -632,22 +632,22 @@ export const ContentHash_Graph = { message.hash = bytesFromBase64(object.hash); } if (object.digest_algorithm !== undefined && object.digest_algorithm !== null) { - message.digestAlgorithm = digestAlgorithmFromJSON(object.digest_algorithm); + message.digestAlgorithm = object.digest_algorithm; } if (object.canonicalization_algorithm !== undefined && object.canonicalization_algorithm !== null) { - message.canonicalizationAlgorithm = graphCanonicalizationAlgorithmFromJSON(object.canonicalization_algorithm); + message.canonicalizationAlgorithm = object.canonicalization_algorithm; } if (object.merkle_tree !== undefined && object.merkle_tree !== null) { - message.merkleTree = graphMerkleTreeFromJSON(object.merkle_tree); + message.merkleTree = object.merkle_tree; } return message; }, toAmino(message: ContentHash_Graph, useInterfaces: boolean = false): ContentHash_GraphAmino { const obj: any = {}; obj.hash = message.hash ? base64FromBytes(message.hash) : undefined; - obj.digest_algorithm = message.digestAlgorithm; - obj.canonicalization_algorithm = message.canonicalizationAlgorithm; - obj.merkle_tree = message.merkleTree; + obj.digest_algorithm = message.digestAlgorithm === 0 ? undefined : message.digestAlgorithm; + obj.canonicalization_algorithm = message.canonicalizationAlgorithm === 0 ? undefined : message.canonicalizationAlgorithm; + obj.merkle_tree = message.merkleTree === 0 ? undefined : message.merkleTree; return obj; }, fromAminoMsg(object: ContentHash_GraphAminoMsg): ContentHash_Graph { @@ -711,7 +711,7 @@ export const ContentHashes = { if (message.contentHashes) { obj.content_hashes = message.contentHashes.map(e => e ? ContentHash.toAmino(e, useInterfaces) : undefined); } else { - obj.content_hashes = []; + obj.content_hashes = message.contentHashes; } return obj; }, diff --git a/packages/types/protobuf/codegen/regen/data/v2/events.ts b/packages/types/protobuf/codegen/regen/data/v2/events.ts index 14efdd3f86..aa569a7f90 100644 --- a/packages/types/protobuf/codegen/regen/data/v2/events.ts +++ b/packages/types/protobuf/codegen/regen/data/v2/events.ts @@ -156,7 +156,7 @@ export const EventAnchor = { }, toAmino(message: EventAnchor, useInterfaces: boolean = false): EventAnchorAmino { const obj: any = {}; - obj.iri = message.iri; + obj.iri = message.iri === "" ? undefined : message.iri; return obj; }, fromAminoMsg(object: EventAnchorAminoMsg): EventAnchor { @@ -230,8 +230,8 @@ export const EventAttest = { }, toAmino(message: EventAttest, useInterfaces: boolean = false): EventAttestAmino { const obj: any = {}; - obj.iri = message.iri; - obj.attestor = message.attestor; + obj.iri = message.iri === "" ? undefined : message.iri; + obj.attestor = message.attestor === "" ? undefined : message.attestor; return obj; }, fromAminoMsg(object: EventAttestAminoMsg): EventAttest { @@ -294,7 +294,7 @@ export const EventDefineResolver = { }, toAmino(message: EventDefineResolver, useInterfaces: boolean = false): EventDefineResolverAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; return obj; }, fromAminoMsg(object: EventDefineResolverAminoMsg): EventDefineResolver { @@ -368,8 +368,8 @@ export const EventRegisterResolver = { }, toAmino(message: EventRegisterResolver, useInterfaces: boolean = false): EventRegisterResolverAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.iri = message.iri; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.iri = message.iri === "" ? undefined : message.iri; return obj; }, fromAminoMsg(object: EventRegisterResolverAminoMsg): EventRegisterResolver { diff --git a/packages/types/protobuf/codegen/regen/data/v2/state.ts b/packages/types/protobuf/codegen/regen/data/v2/state.ts index 5988c50f44..9f1db8ae56 100644 --- a/packages/types/protobuf/codegen/regen/data/v2/state.ts +++ b/packages/types/protobuf/codegen/regen/data/v2/state.ts @@ -223,7 +223,7 @@ export const DataID = { toAmino(message: DataID, useInterfaces: boolean = false): DataIDAmino { const obj: any = {}; obj.id = message.id ? base64FromBytes(message.id) : undefined; - obj.iri = message.iri; + obj.iri = message.iri === "" ? undefined : message.iri; return obj; }, fromAminoMsg(object: DataIDAminoMsg): DataID { @@ -470,8 +470,8 @@ export const Resolver = { }, toAmino(message: Resolver, useInterfaces: boolean = false): ResolverAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.url = message.url; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.url = message.url === "" ? undefined : message.url; obj.manager = message.manager ? base64FromBytes(message.manager) : undefined; return obj; }, @@ -547,7 +547,7 @@ export const DataResolver = { toAmino(message: DataResolver, useInterfaces: boolean = false): DataResolverAmino { const obj: any = {}; obj.id = message.id ? base64FromBytes(message.id) : undefined; - obj.resolver_id = message.resolverId ? message.resolverId.toString() : undefined; + obj.resolver_id = message.resolverId !== BigInt(0) ? message.resolverId.toString() : undefined; return obj; }, fromAminoMsg(object: DataResolverAminoMsg): DataResolver { diff --git a/packages/types/protobuf/codegen/regen/data/v2/tx.ts b/packages/types/protobuf/codegen/regen/data/v2/tx.ts index f0e94453b6..fd77851258 100644 --- a/packages/types/protobuf/codegen/regen/data/v2/tx.ts +++ b/packages/types/protobuf/codegen/regen/data/v2/tx.ts @@ -335,7 +335,7 @@ export const MsgAnchor = { }, toAmino(message: MsgAnchor, useInterfaces: boolean = false): MsgAnchorAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; obj.content_hash = message.contentHash ? ContentHash.toAmino(message.contentHash, useInterfaces) : undefined; return obj; }, @@ -410,7 +410,7 @@ export const MsgAnchorResponse = { }, toAmino(message: MsgAnchorResponse, useInterfaces: boolean = false): MsgAnchorResponseAmino { const obj: any = {}; - obj.iri = message.iri; + obj.iri = message.iri === "" ? undefined : message.iri; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; return obj; }, @@ -483,11 +483,11 @@ export const MsgAttest = { }, toAmino(message: MsgAttest, useInterfaces: boolean = false): MsgAttestAmino { const obj: any = {}; - obj.attestor = message.attestor; + obj.attestor = message.attestor === "" ? undefined : message.attestor; if (message.contentHashes) { obj.content_hashes = message.contentHashes.map(e => e ? ContentHash_Graph.toAmino(e, useInterfaces) : undefined); } else { - obj.content_hashes = []; + obj.content_hashes = message.contentHashes; } return obj; }, @@ -563,7 +563,7 @@ export const MsgAttestResponse = { if (message.iris) { obj.iris = message.iris.map(e => e); } else { - obj.iris = []; + obj.iris = message.iris; } obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; return obj; @@ -639,8 +639,8 @@ export const MsgDefineResolver = { }, toAmino(message: MsgDefineResolver, useInterfaces: boolean = false): MsgDefineResolverAmino { const obj: any = {}; - obj.manager = message.manager; - obj.resolver_url = message.resolverUrl; + obj.manager = message.manager === "" ? undefined : message.manager; + obj.resolver_url = message.resolverUrl === "" ? undefined : message.resolverUrl; return obj; }, fromAminoMsg(object: MsgDefineResolverAminoMsg): MsgDefineResolver { @@ -703,7 +703,7 @@ export const MsgDefineResolverResponse = { }, toAmino(message: MsgDefineResolverResponse, useInterfaces: boolean = false): MsgDefineResolverResponseAmino { const obj: any = {}; - obj.resolver_id = message.resolverId ? message.resolverId.toString() : undefined; + obj.resolver_id = message.resolverId !== BigInt(0) ? message.resolverId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgDefineResolverResponseAminoMsg): MsgDefineResolverResponse { @@ -786,12 +786,12 @@ export const MsgRegisterResolver = { }, toAmino(message: MsgRegisterResolver, useInterfaces: boolean = false): MsgRegisterResolverAmino { const obj: any = {}; - obj.manager = message.manager; - obj.resolver_id = message.resolverId ? message.resolverId.toString() : undefined; + obj.manager = message.manager === "" ? undefined : message.manager; + obj.resolver_id = message.resolverId !== BigInt(0) ? message.resolverId.toString() : undefined; if (message.contentHashes) { obj.content_hashes = message.contentHashes.map(e => e ? ContentHash.toAmino(e, useInterfaces) : undefined); } else { - obj.content_hashes = []; + obj.content_hashes = message.contentHashes; } return obj; }, diff --git a/packages/types/protobuf/codegen/regen/data/v2/types.ts b/packages/types/protobuf/codegen/regen/data/v2/types.ts index 5582e0c358..e2b12defe7 100644 --- a/packages/types/protobuf/codegen/regen/data/v2/types.ts +++ b/packages/types/protobuf/codegen/regen/data/v2/types.ts @@ -462,8 +462,8 @@ export const ContentHash_Raw = { toAmino(message: ContentHash_Raw, useInterfaces: boolean = false): ContentHash_RawAmino { const obj: any = {}; obj.hash = message.hash ? base64FromBytes(message.hash) : undefined; - obj.digest_algorithm = message.digestAlgorithm; - obj.file_extension = message.fileExtension; + obj.digest_algorithm = message.digestAlgorithm === 0 ? undefined : message.digestAlgorithm; + obj.file_extension = message.fileExtension === "" ? undefined : message.fileExtension; return obj; }, fromAminoMsg(object: ContentHash_RawAminoMsg): ContentHash_Raw { @@ -560,9 +560,9 @@ export const ContentHash_Graph = { toAmino(message: ContentHash_Graph, useInterfaces: boolean = false): ContentHash_GraphAmino { const obj: any = {}; obj.hash = message.hash ? base64FromBytes(message.hash) : undefined; - obj.digest_algorithm = message.digestAlgorithm; - obj.canonicalization_algorithm = message.canonicalizationAlgorithm; - obj.merkle_tree = message.merkleTree; + obj.digest_algorithm = message.digestAlgorithm === 0 ? undefined : message.digestAlgorithm; + obj.canonicalization_algorithm = message.canonicalizationAlgorithm === 0 ? undefined : message.canonicalizationAlgorithm; + obj.merkle_tree = message.merkleTree === 0 ? undefined : message.merkleTree; return obj; }, fromAminoMsg(object: ContentHash_GraphAminoMsg): ContentHash_Graph { @@ -626,7 +626,7 @@ export const ContentHashes = { if (message.contentHashes) { obj.content_hashes = message.contentHashes.map(e => e ? ContentHash.toAmino(e, useInterfaces) : undefined); } else { - obj.content_hashes = []; + obj.content_hashes = message.contentHashes; } return obj; }, diff --git a/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/events.ts b/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/events.ts index 3555a216e9..8324953113 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/events.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/events.ts @@ -312,8 +312,8 @@ export const EventCreate = { }, toAmino(message: EventCreate, useInterfaces: boolean = false): EventCreateAmino { const obj: any = {}; - obj.basket_denom = message.basketDenom; - obj.curator = message.curator; + obj.basket_denom = message.basketDenom === "" ? undefined : message.basketDenom; + obj.curator = message.curator === "" ? undefined : message.curator; return obj; }, fromAminoMsg(object: EventCreateAminoMsg): EventCreate { @@ -407,14 +407,14 @@ export const EventPut = { }, toAmino(message: EventPut, useInterfaces: boolean = false): EventPutAmino { const obj: any = {}; - obj.owner = message.owner; - obj.basket_denom = message.basketDenom; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.basket_denom = message.basketDenom === "" ? undefined : message.basketDenom; if (message.credits) { obj.credits = message.credits.map(e => e ? BasketCredit.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } - obj.amount = message.amount; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: EventPutAminoMsg): EventPut { @@ -508,14 +508,14 @@ export const EventTake = { }, toAmino(message: EventTake, useInterfaces: boolean = false): EventTakeAmino { const obj: any = {}; - obj.owner = message.owner; - obj.basket_denom = message.basketDenom; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.basket_denom = message.basketDenom === "" ? undefined : message.basketDenom; if (message.credits) { obj.credits = message.credits.map(e => e ? BasketCredit.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } - obj.amount = message.amount; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: EventTakeAminoMsg): EventTake { @@ -578,7 +578,7 @@ export const EventUpdateCurator = { }, toAmino(message: EventUpdateCurator, useInterfaces: boolean = false): EventUpdateCuratorAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: EventUpdateCuratorAminoMsg): EventUpdateCurator { @@ -641,7 +641,7 @@ export const EventUpdateDateCriteria = { }, toAmino(message: EventUpdateDateCriteria, useInterfaces: boolean = false): EventUpdateDateCriteriaAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: EventUpdateDateCriteriaAminoMsg): EventUpdateDateCriteria { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/state.ts b/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/state.ts index a85f754d4d..678a525a72 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/state.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/state.ts @@ -381,13 +381,13 @@ export const Basket = { }, toAmino(message: Basket, useInterfaces: boolean = false): BasketAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.basket_denom = message.basketDenom; - obj.name = message.name; - obj.disable_auto_retire = message.disableAutoRetire; - obj.credit_type_abbrev = message.creditTypeAbbrev; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.basket_denom = message.basketDenom === "" ? undefined : message.basketDenom; + obj.name = message.name === "" ? undefined : message.name; + obj.disable_auto_retire = message.disableAutoRetire === false ? undefined : message.disableAutoRetire; + obj.credit_type_abbrev = message.creditTypeAbbrev === "" ? undefined : message.creditTypeAbbrev; obj.date_criteria = message.dateCriteria ? DateCriteria.toAmino(message.dateCriteria, useInterfaces) : undefined; - obj.exponent = message.exponent; + obj.exponent = message.exponent === 0 ? undefined : message.exponent; obj.curator = message.curator ? base64FromBytes(message.curator) : undefined; return obj; }, @@ -462,8 +462,8 @@ export const BasketClass = { }, toAmino(message: BasketClass, useInterfaces: boolean = false): BasketClassAmino { const obj: any = {}; - obj.basket_id = message.basketId ? message.basketId.toString() : undefined; - obj.class_id = message.classId; + obj.basket_id = message.basketId !== BigInt(0) ? message.basketId.toString() : undefined; + obj.class_id = message.classId === "" ? undefined : message.classId; return obj; }, fromAminoMsg(object: BasketClassAminoMsg): BasketClass { @@ -559,9 +559,9 @@ export const BasketBalance = { }, toAmino(message: BasketBalance, useInterfaces: boolean = false): BasketBalanceAmino { const obj: any = {}; - obj.basket_id = message.basketId ? message.basketId.toString() : undefined; - obj.batch_denom = message.batchDenom; - obj.balance = message.balance; + obj.basket_id = message.basketId !== BigInt(0) ? message.basketId.toString() : undefined; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.balance = message.balance === "" ? undefined : message.balance; obj.batch_start_date = message.batchStartDate ? Timestamp.toAmino(toTimestamp(message.batchStartDate)) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/tx.ts b/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/tx.ts index 9d6a1a92cf..612758e0bb 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/tx.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/tx.ts @@ -709,22 +709,22 @@ export const MsgCreate = { }, toAmino(message: MsgCreate, useInterfaces: boolean = false): MsgCreateAmino { const obj: any = {}; - obj.curator = message.curator; - obj.name = message.name; - obj.description = message.description; - obj.exponent = message.exponent; - obj.disable_auto_retire = message.disableAutoRetire; - obj.credit_type_abbrev = message.creditTypeAbbrev; + obj.curator = message.curator === "" ? undefined : message.curator; + obj.name = message.name === "" ? undefined : message.name; + obj.description = message.description === "" ? undefined : message.description; + obj.exponent = message.exponent === 0 ? undefined : message.exponent; + obj.disable_auto_retire = message.disableAutoRetire === false ? undefined : message.disableAutoRetire; + obj.credit_type_abbrev = message.creditTypeAbbrev === "" ? undefined : message.creditTypeAbbrev; if (message.allowedClasses) { obj.allowed_classes = message.allowedClasses.map(e => e); } else { - obj.allowed_classes = []; + obj.allowed_classes = message.allowedClasses; } obj.date_criteria = message.dateCriteria ? DateCriteria.toAmino(message.dateCriteria, useInterfaces) : undefined; if (message.fee) { obj.fee = message.fee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.fee = []; + obj.fee = message.fee; } return obj; }, @@ -788,7 +788,7 @@ export const MsgCreateResponse = { }, toAmino(message: MsgCreateResponse, useInterfaces: boolean = false): MsgCreateResponseAmino { const obj: any = {}; - obj.basket_denom = message.basketDenom; + obj.basket_denom = message.basketDenom === "" ? undefined : message.basketDenom; return obj; }, fromAminoMsg(object: MsgCreateResponseAminoMsg): MsgCreateResponse { @@ -871,12 +871,12 @@ export const MsgPut = { }, toAmino(message: MsgPut, useInterfaces: boolean = false): MsgPutAmino { const obj: any = {}; - obj.owner = message.owner; - obj.basket_denom = message.basketDenom; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.basket_denom = message.basketDenom === "" ? undefined : message.basketDenom; if (message.credits) { obj.credits = message.credits.map(e => e ? BasketCredit.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } return obj; }, @@ -940,7 +940,7 @@ export const MsgPutResponse = { }, toAmino(message: MsgPutResponse, useInterfaces: boolean = false): MsgPutResponseAmino { const obj: any = {}; - obj.amount_received = message.amountReceived; + obj.amount_received = message.amountReceived === "" ? undefined : message.amountReceived; return obj; }, fromAminoMsg(object: MsgPutResponseAminoMsg): MsgPutResponse { @@ -1069,13 +1069,13 @@ export const MsgTake = { }, toAmino(message: MsgTake, useInterfaces: boolean = false): MsgTakeAmino { const obj: any = {}; - obj.owner = message.owner; - obj.basket_denom = message.basketDenom; - obj.amount = message.amount; - obj.retirement_location = message.retirementLocation; - obj.retire_on_take = message.retireOnTake; - obj.retirement_jurisdiction = message.retirementJurisdiction; - obj.retirement_reason = message.retirementReason; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.basket_denom = message.basketDenom === "" ? undefined : message.basketDenom; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.retirement_location = message.retirementLocation === "" ? undefined : message.retirementLocation; + obj.retire_on_take = message.retireOnTake === false ? undefined : message.retireOnTake; + obj.retirement_jurisdiction = message.retirementJurisdiction === "" ? undefined : message.retirementJurisdiction; + obj.retirement_reason = message.retirementReason === "" ? undefined : message.retirementReason; return obj; }, fromAminoMsg(object: MsgTakeAminoMsg): MsgTake { @@ -1139,7 +1139,7 @@ export const MsgTakeResponse = { if (message.credits) { obj.credits = message.credits.map(e => e ? BasketCredit.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } return obj; }, @@ -1214,7 +1214,7 @@ export const MsgUpdateBasketFee = { }, toAmino(message: MsgUpdateBasketFee, useInterfaces: boolean = false): MsgUpdateBasketFeeAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.fee = message.fee ? Coin.toAmino(message.fee, useInterfaces) : undefined; return obj; }, @@ -1350,9 +1350,9 @@ export const MsgUpdateCurator = { }, toAmino(message: MsgUpdateCurator, useInterfaces: boolean = false): MsgUpdateCuratorAmino { const obj: any = {}; - obj.curator = message.curator; - obj.denom = message.denom; - obj.new_curator = message.newCurator; + obj.curator = message.curator === "" ? undefined : message.curator; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.new_curator = message.newCurator === "" ? undefined : message.newCurator; return obj; }, fromAminoMsg(object: MsgUpdateCuratorAminoMsg): MsgUpdateCurator { @@ -1487,8 +1487,8 @@ export const MsgUpdateDateCriteria = { }, toAmino(message: MsgUpdateDateCriteria, useInterfaces: boolean = false): MsgUpdateDateCriteriaAmino { const obj: any = {}; - obj.authority = message.authority; - obj.denom = message.denom; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.denom = message.denom === "" ? undefined : message.denom; obj.new_date_criteria = message.newDateCriteria ? DateCriteria.toAmino(message.newDateCriteria, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/types.ts b/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/types.ts index a00465f072..682e2e7363 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/types.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/basket/v1/types.ts @@ -173,8 +173,8 @@ export const BasketCredit = { }, toAmino(message: BasketCredit, useInterfaces: boolean = false): BasketCreditAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; - obj.amount = message.amount; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: BasketCreditAminoMsg): BasketCredit { @@ -261,7 +261,7 @@ export const DateCriteria = { const obj: any = {}; obj.min_start_date = message.minStartDate ? Timestamp.toAmino(toTimestamp(message.minStartDate)) : undefined; obj.start_date_window = message.startDateWindow ? Duration.toAmino(message.startDateWindow, useInterfaces) : undefined; - obj.years_in_the_past = message.yearsInThePast; + obj.years_in_the_past = message.yearsInThePast === 0 ? undefined : message.yearsInThePast; return obj; }, fromAminoMsg(object: DateCriteriaAminoMsg): DateCriteria { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/events.ts b/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/events.ts index c0ee77a674..37c3615ba4 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/events.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/events.ts @@ -223,7 +223,7 @@ export const EventSell = { }, toAmino(message: EventSell, useInterfaces: boolean = false): EventSellAmino { const obj: any = {}; - obj.sell_order_id = message.sellOrderId ? message.sellOrderId.toString() : undefined; + obj.sell_order_id = message.sellOrderId !== BigInt(0) ? message.sellOrderId.toString() : undefined; return obj; }, fromAminoMsg(object: EventSellAminoMsg): EventSell { @@ -286,7 +286,7 @@ export const EventBuyDirect = { }, toAmino(message: EventBuyDirect, useInterfaces: boolean = false): EventBuyDirectAmino { const obj: any = {}; - obj.sell_order_id = message.sellOrderId ? message.sellOrderId.toString() : undefined; + obj.sell_order_id = message.sellOrderId !== BigInt(0) ? message.sellOrderId.toString() : undefined; return obj; }, fromAminoMsg(object: EventBuyDirectAminoMsg): EventBuyDirect { @@ -349,7 +349,7 @@ export const EventUpdateSellOrder = { }, toAmino(message: EventUpdateSellOrder, useInterfaces: boolean = false): EventUpdateSellOrderAmino { const obj: any = {}; - obj.sell_order_id = message.sellOrderId ? message.sellOrderId.toString() : undefined; + obj.sell_order_id = message.sellOrderId !== BigInt(0) ? message.sellOrderId.toString() : undefined; return obj; }, fromAminoMsg(object: EventUpdateSellOrderAminoMsg): EventUpdateSellOrder { @@ -412,7 +412,7 @@ export const EventCancelSellOrder = { }, toAmino(message: EventCancelSellOrder, useInterfaces: boolean = false): EventCancelSellOrderAmino { const obj: any = {}; - obj.sell_order_id = message.sellOrderId ? message.sellOrderId.toString() : undefined; + obj.sell_order_id = message.sellOrderId !== BigInt(0) ? message.sellOrderId.toString() : undefined; return obj; }, fromAminoMsg(object: EventCancelSellOrderAminoMsg): EventCancelSellOrder { @@ -475,7 +475,7 @@ export const EventAllowDenom = { }, toAmino(message: EventAllowDenom, useInterfaces: boolean = false): EventAllowDenomAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: EventAllowDenomAminoMsg): EventAllowDenom { @@ -538,7 +538,7 @@ export const EventRemoveAllowedDenom = { }, toAmino(message: EventRemoveAllowedDenom, useInterfaces: boolean = false): EventRemoveAllowedDenomAmino { const obj: any = {}; - obj.denom = message.denom; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: EventRemoveAllowedDenomAminoMsg): EventRemoveAllowedDenom { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/state.ts b/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/state.ts index 98b9840594..7496fc17cc 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/state.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/state.ts @@ -402,15 +402,15 @@ export const SellOrder = { }, toAmino(message: SellOrder, useInterfaces: boolean = false): SellOrderAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; obj.seller = message.seller ? base64FromBytes(message.seller) : undefined; - obj.batch_key = message.batchKey ? message.batchKey.toString() : undefined; - obj.quantity = message.quantity; - obj.market_id = message.marketId ? message.marketId.toString() : undefined; - obj.ask_amount = message.askAmount; - obj.disable_auto_retire = message.disableAutoRetire; + obj.batch_key = message.batchKey !== BigInt(0) ? message.batchKey.toString() : undefined; + obj.quantity = message.quantity === "" ? undefined : message.quantity; + obj.market_id = message.marketId !== BigInt(0) ? message.marketId.toString() : undefined; + obj.ask_amount = message.askAmount === "" ? undefined : message.askAmount; + obj.disable_auto_retire = message.disableAutoRetire === false ? undefined : message.disableAutoRetire; obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined; - obj.maker = message.maker; + obj.maker = message.maker === false ? undefined : message.maker; return obj; }, fromAminoMsg(object: SellOrderAminoMsg): SellOrder { @@ -495,9 +495,9 @@ export const AllowedDenom = { }, toAmino(message: AllowedDenom, useInterfaces: boolean = false): AllowedDenomAmino { const obj: any = {}; - obj.bank_denom = message.bankDenom; - obj.display_denom = message.displayDenom; - obj.exponent = message.exponent; + obj.bank_denom = message.bankDenom === "" ? undefined : message.bankDenom; + obj.display_denom = message.displayDenom === "" ? undefined : message.displayDenom; + obj.exponent = message.exponent === 0 ? undefined : message.exponent; return obj; }, fromAminoMsg(object: AllowedDenomAminoMsg): AllowedDenom { @@ -593,10 +593,10 @@ export const Market = { }, toAmino(message: Market, useInterfaces: boolean = false): MarketAmino { const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.credit_type_abbrev = message.creditTypeAbbrev; - obj.bank_denom = message.bankDenom; - obj.precision_modifier = message.precisionModifier; + obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; + obj.credit_type_abbrev = message.creditTypeAbbrev === "" ? undefined : message.creditTypeAbbrev; + obj.bank_denom = message.bankDenom === "" ? undefined : message.bankDenom; + obj.precision_modifier = message.precisionModifier === 0 ? undefined : message.precisionModifier; return obj; }, fromAminoMsg(object: MarketAminoMsg): Market { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/tx.ts b/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/tx.ts index 9a683bf72e..42abc71a6b 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/tx.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/tx.ts @@ -601,11 +601,11 @@ export const MsgSell = { }, toAmino(message: MsgSell, useInterfaces: boolean = false): MsgSellAmino { const obj: any = {}; - obj.seller = message.seller; + obj.seller = message.seller === "" ? undefined : message.seller; if (message.orders) { obj.orders = message.orders.map(e => e ? MsgSell_Order.toAmino(e, useInterfaces) : undefined); } else { - obj.orders = []; + obj.orders = message.orders; } return obj; }, @@ -713,10 +713,10 @@ export const MsgSell_Order = { }, toAmino(message: MsgSell_Order, useInterfaces: boolean = false): MsgSell_OrderAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; - obj.quantity = message.quantity; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.quantity = message.quantity === "" ? undefined : message.quantity; obj.ask_price = message.askPrice ? Coin.toAmino(message.askPrice, useInterfaces) : undefined; - obj.disable_auto_retire = message.disableAutoRetire; + obj.disable_auto_retire = message.disableAutoRetire === false ? undefined : message.disableAutoRetire; obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined; return obj; }, @@ -790,7 +790,7 @@ export const MsgSellResponse = { if (message.sellOrderIds) { obj.sell_order_ids = message.sellOrderIds.map(e => e.toString()); } else { - obj.sell_order_ids = []; + obj.sell_order_ids = message.sellOrderIds; } return obj; }, @@ -863,11 +863,11 @@ export const MsgUpdateSellOrders = { }, toAmino(message: MsgUpdateSellOrders, useInterfaces: boolean = false): MsgUpdateSellOrdersAmino { const obj: any = {}; - obj.seller = message.seller; + obj.seller = message.seller === "" ? undefined : message.seller; if (message.updates) { obj.updates = message.updates.map(e => e ? MsgUpdateSellOrders_Update.toAmino(e, useInterfaces) : undefined); } else { - obj.updates = []; + obj.updates = message.updates; } return obj; }, @@ -975,10 +975,10 @@ export const MsgUpdateSellOrders_Update = { }, toAmino(message: MsgUpdateSellOrders_Update, useInterfaces: boolean = false): MsgUpdateSellOrders_UpdateAmino { const obj: any = {}; - obj.sell_order_id = message.sellOrderId ? message.sellOrderId.toString() : undefined; - obj.new_quantity = message.newQuantity; + obj.sell_order_id = message.sellOrderId !== BigInt(0) ? message.sellOrderId.toString() : undefined; + obj.new_quantity = message.newQuantity === "" ? undefined : message.newQuantity; obj.new_ask_price = message.newAskPrice ? Coin.toAmino(message.newAskPrice, useInterfaces) : undefined; - obj.disable_auto_retire = message.disableAutoRetire; + obj.disable_auto_retire = message.disableAutoRetire === false ? undefined : message.disableAutoRetire; obj.new_expiration = message.newExpiration ? Timestamp.toAmino(toTimestamp(message.newExpiration)) : undefined; return obj; }, @@ -1103,8 +1103,8 @@ export const MsgCancelSellOrder = { }, toAmino(message: MsgCancelSellOrder, useInterfaces: boolean = false): MsgCancelSellOrderAmino { const obj: any = {}; - obj.seller = message.seller; - obj.sell_order_id = message.sellOrderId ? message.sellOrderId.toString() : undefined; + obj.seller = message.seller === "" ? undefined : message.seller; + obj.sell_order_id = message.sellOrderId !== BigInt(0) ? message.sellOrderId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgCancelSellOrderAminoMsg): MsgCancelSellOrder { @@ -1226,11 +1226,11 @@ export const MsgBuyDirect = { }, toAmino(message: MsgBuyDirect, useInterfaces: boolean = false): MsgBuyDirectAmino { const obj: any = {}; - obj.buyer = message.buyer; + obj.buyer = message.buyer === "" ? undefined : message.buyer; if (message.orders) { obj.orders = message.orders.map(e => e ? MsgBuyDirect_Order.toAmino(e, useInterfaces) : undefined); } else { - obj.orders = []; + obj.orders = message.orders; } return obj; }, @@ -1349,12 +1349,12 @@ export const MsgBuyDirect_Order = { }, toAmino(message: MsgBuyDirect_Order, useInterfaces: boolean = false): MsgBuyDirect_OrderAmino { const obj: any = {}; - obj.sell_order_id = message.sellOrderId ? message.sellOrderId.toString() : undefined; - obj.quantity = message.quantity; + obj.sell_order_id = message.sellOrderId !== BigInt(0) ? message.sellOrderId.toString() : undefined; + obj.quantity = message.quantity === "" ? undefined : message.quantity; obj.bid_price = message.bidPrice ? Coin.toAmino(message.bidPrice, useInterfaces) : undefined; - obj.disable_auto_retire = message.disableAutoRetire; - obj.retirement_jurisdiction = message.retirementJurisdiction; - obj.retirement_reason = message.retirementReason; + obj.disable_auto_retire = message.disableAutoRetire === false ? undefined : message.disableAutoRetire; + obj.retirement_jurisdiction = message.retirementJurisdiction === "" ? undefined : message.retirementJurisdiction; + obj.retirement_reason = message.retirementReason === "" ? undefined : message.retirementReason; return obj; }, fromAminoMsg(object: MsgBuyDirect_OrderAminoMsg): MsgBuyDirect_Order { @@ -1500,10 +1500,10 @@ export const MsgAddAllowedDenom = { }, toAmino(message: MsgAddAllowedDenom, useInterfaces: boolean = false): MsgAddAllowedDenomAmino { const obj: any = {}; - obj.authority = message.authority; - obj.bank_denom = message.bankDenom; - obj.display_denom = message.displayDenom; - obj.exponent = message.exponent; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.bank_denom = message.bankDenom === "" ? undefined : message.bankDenom; + obj.display_denom = message.displayDenom === "" ? undefined : message.displayDenom; + obj.exponent = message.exponent === 0 ? undefined : message.exponent; return obj; }, fromAminoMsg(object: MsgAddAllowedDenomAminoMsg): MsgAddAllowedDenom { @@ -1627,8 +1627,8 @@ export const MsgRemoveAllowedDenom = { }, toAmino(message: MsgRemoveAllowedDenom, useInterfaces: boolean = false): MsgRemoveAllowedDenomAmino { const obj: any = {}; - obj.authority = message.authority; - obj.denom = message.denom; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.denom = message.denom === "" ? undefined : message.denom; return obj; }, fromAminoMsg(object: MsgRemoveAllowedDenomAminoMsg): MsgRemoveAllowedDenom { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/types.ts b/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/types.ts index 6bfe64171f..f673064432 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/types.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/marketplace/v1/types.ts @@ -125,8 +125,8 @@ export const AllowDenomProposal = { }, toAmino(message: AllowDenomProposal, useInterfaces: boolean = false): AllowDenomProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; obj.denom = message.denom ? AllowedDenom.toAmino(message.denom, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/regen/ecocredit/orderbook/v1alpha1/memory.ts b/packages/types/protobuf/codegen/regen/ecocredit/orderbook/v1alpha1/memory.ts index 8e30fa5b4f..9d95d11707 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/orderbook/v1alpha1/memory.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/orderbook/v1alpha1/memory.ts @@ -262,11 +262,11 @@ export const BuyOrderSellOrderMatch = { }, toAmino(message: BuyOrderSellOrderMatch, useInterfaces: boolean = false): BuyOrderSellOrderMatchAmino { const obj: any = {}; - obj.market_id = message.marketId ? message.marketId.toString() : undefined; - obj.buy_order_id = message.buyOrderId ? message.buyOrderId.toString() : undefined; - obj.sell_order_id = message.sellOrderId ? message.sellOrderId.toString() : undefined; - obj.bid_price_complement = message.bidPriceComplement; - obj.ask_price = message.askPrice; + obj.market_id = message.marketId !== BigInt(0) ? message.marketId.toString() : undefined; + obj.buy_order_id = message.buyOrderId !== BigInt(0) ? message.buyOrderId.toString() : undefined; + obj.sell_order_id = message.sellOrderId !== BigInt(0) ? message.sellOrderId.toString() : undefined; + obj.bid_price_complement = message.bidPriceComplement === 0 ? undefined : message.bidPriceComplement; + obj.ask_price = message.askPrice === 0 ? undefined : message.askPrice; return obj; }, fromAminoMsg(object: BuyOrderSellOrderMatchAminoMsg): BuyOrderSellOrderMatch { @@ -373,9 +373,9 @@ export const BuyOrderClassSelector = { }, toAmino(message: BuyOrderClassSelector, useInterfaces: boolean = false): BuyOrderClassSelectorAmino { const obj: any = {}; - obj.buy_order_id = message.buyOrderId ? message.buyOrderId.toString() : undefined; - obj.class_id = message.classId ? message.classId.toString() : undefined; - obj.project_location = message.projectLocation; + obj.buy_order_id = message.buyOrderId !== BigInt(0) ? message.buyOrderId.toString() : undefined; + obj.class_id = message.classId !== BigInt(0) ? message.classId.toString() : undefined; + obj.project_location = message.projectLocation === "" ? undefined : message.projectLocation; obj.min_start_date = message.minStartDate ? Timestamp.toAmino(toTimestamp(message.minStartDate)) : undefined; obj.max_end_date = message.maxEndDate ? Timestamp.toAmino(toTimestamp(message.maxEndDate)) : undefined; return obj; @@ -473,8 +473,8 @@ export const BuyOrderProjectSelector = { }, toAmino(message: BuyOrderProjectSelector, useInterfaces: boolean = false): BuyOrderProjectSelectorAmino { const obj: any = {}; - obj.buy_order_id = message.buyOrderId ? message.buyOrderId.toString() : undefined; - obj.project_id = message.projectId ? message.projectId.toString() : undefined; + obj.buy_order_id = message.buyOrderId !== BigInt(0) ? message.buyOrderId.toString() : undefined; + obj.project_id = message.projectId !== BigInt(0) ? message.projectId.toString() : undefined; obj.min_start_date = message.minStartDate ? Timestamp.toAmino(toTimestamp(message.minStartDate)) : undefined; obj.max_end_date = message.maxEndDate ? Timestamp.toAmino(toTimestamp(message.maxEndDate)) : undefined; return obj; @@ -550,8 +550,8 @@ export const BuyOrderBatchSelector = { }, toAmino(message: BuyOrderBatchSelector, useInterfaces: boolean = false): BuyOrderBatchSelectorAmino { const obj: any = {}; - obj.buy_order_id = message.buyOrderId ? message.buyOrderId.toString() : undefined; - obj.batch_id = message.batchId ? message.batchId.toString() : undefined; + obj.buy_order_id = message.buyOrderId !== BigInt(0) ? message.buyOrderId.toString() : undefined; + obj.batch_id = message.batchId !== BigInt(0) ? message.batchId.toString() : undefined; return obj; }, fromAminoMsg(object: BuyOrderBatchSelectorAminoMsg): BuyOrderBatchSelector { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/v1/events.ts b/packages/types/protobuf/codegen/regen/ecocredit/v1/events.ts index 334bc3f0f1..1a852fe274 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/v1/events.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/v1/events.ts @@ -816,7 +816,7 @@ export const EventCreateClass = { }, toAmino(message: EventCreateClass, useInterfaces: boolean = false): EventCreateClassAmino { const obj: any = {}; - obj.class_id = message.classId; + obj.class_id = message.classId === "" ? undefined : message.classId; return obj; }, fromAminoMsg(object: EventCreateClassAminoMsg): EventCreateClass { @@ -879,7 +879,7 @@ export const EventCreateProject = { }, toAmino(message: EventCreateProject, useInterfaces: boolean = false): EventCreateProjectAmino { const obj: any = {}; - obj.project_id = message.projectId; + obj.project_id = message.projectId === "" ? undefined : message.projectId; return obj; }, fromAminoMsg(object: EventCreateProjectAminoMsg): EventCreateProject { @@ -953,7 +953,7 @@ export const EventCreateBatch = { }, toAmino(message: EventCreateBatch, useInterfaces: boolean = false): EventCreateBatchAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; obj.origin_tx = message.originTx ? OriginTx.toAmino(message.originTx, useInterfaces) : undefined; return obj; }, @@ -1039,9 +1039,9 @@ export const EventMint = { }, toAmino(message: EventMint, useInterfaces: boolean = false): EventMintAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; - obj.tradable_amount = message.tradableAmount; - obj.retired_amount = message.retiredAmount; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.tradable_amount = message.tradableAmount === "" ? undefined : message.tradableAmount; + obj.retired_amount = message.retiredAmount === "" ? undefined : message.retiredAmount; return obj; }, fromAminoMsg(object: EventMintAminoMsg): EventMint { @@ -1115,7 +1115,7 @@ export const EventMintBatchCredits = { }, toAmino(message: EventMintBatchCredits, useInterfaces: boolean = false): EventMintBatchCreditsAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; obj.origin_tx = message.originTx ? OriginTx.toAmino(message.originTx, useInterfaces) : undefined; return obj; }, @@ -1223,11 +1223,11 @@ export const EventTransfer = { }, toAmino(message: EventTransfer, useInterfaces: boolean = false): EventTransferAmino { const obj: any = {}; - obj.sender = message.sender; - obj.recipient = message.recipient; - obj.batch_denom = message.batchDenom; - obj.tradable_amount = message.tradableAmount; - obj.retired_amount = message.retiredAmount; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.recipient = message.recipient === "" ? undefined : message.recipient; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.tradable_amount = message.tradableAmount === "" ? undefined : message.tradableAmount; + obj.retired_amount = message.retiredAmount === "" ? undefined : message.retiredAmount; return obj; }, fromAminoMsg(object: EventTransferAminoMsg): EventTransfer { @@ -1334,11 +1334,11 @@ export const EventRetire = { }, toAmino(message: EventRetire, useInterfaces: boolean = false): EventRetireAmino { const obj: any = {}; - obj.owner = message.owner; - obj.batch_denom = message.batchDenom; - obj.amount = message.amount; - obj.jurisdiction = message.jurisdiction; - obj.reason = message.reason; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.jurisdiction = message.jurisdiction === "" ? undefined : message.jurisdiction; + obj.reason = message.reason === "" ? undefined : message.reason; return obj; }, fromAminoMsg(object: EventRetireAminoMsg): EventRetire { @@ -1434,10 +1434,10 @@ export const EventCancel = { }, toAmino(message: EventCancel, useInterfaces: boolean = false): EventCancelAmino { const obj: any = {}; - obj.owner = message.owner; - obj.batch_denom = message.batchDenom; - obj.amount = message.amount; - obj.reason = message.reason; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.reason = message.reason === "" ? undefined : message.reason; return obj; }, fromAminoMsg(object: EventCancelAminoMsg): EventCancel { @@ -1500,7 +1500,7 @@ export const EventUpdateClassAdmin = { }, toAmino(message: EventUpdateClassAdmin, useInterfaces: boolean = false): EventUpdateClassAdminAmino { const obj: any = {}; - obj.class_id = message.classId; + obj.class_id = message.classId === "" ? undefined : message.classId; return obj; }, fromAminoMsg(object: EventUpdateClassAdminAminoMsg): EventUpdateClassAdmin { @@ -1563,7 +1563,7 @@ export const EventUpdateClassIssuers = { }, toAmino(message: EventUpdateClassIssuers, useInterfaces: boolean = false): EventUpdateClassIssuersAmino { const obj: any = {}; - obj.class_id = message.classId; + obj.class_id = message.classId === "" ? undefined : message.classId; return obj; }, fromAminoMsg(object: EventUpdateClassIssuersAminoMsg): EventUpdateClassIssuers { @@ -1626,7 +1626,7 @@ export const EventUpdateClassMetadata = { }, toAmino(message: EventUpdateClassMetadata, useInterfaces: boolean = false): EventUpdateClassMetadataAmino { const obj: any = {}; - obj.class_id = message.classId; + obj.class_id = message.classId === "" ? undefined : message.classId; return obj; }, fromAminoMsg(object: EventUpdateClassMetadataAminoMsg): EventUpdateClassMetadata { @@ -1689,7 +1689,7 @@ export const EventUpdateProjectAdmin = { }, toAmino(message: EventUpdateProjectAdmin, useInterfaces: boolean = false): EventUpdateProjectAdminAmino { const obj: any = {}; - obj.project_id = message.projectId; + obj.project_id = message.projectId === "" ? undefined : message.projectId; return obj; }, fromAminoMsg(object: EventUpdateProjectAdminAminoMsg): EventUpdateProjectAdmin { @@ -1752,7 +1752,7 @@ export const EventUpdateProjectMetadata = { }, toAmino(message: EventUpdateProjectMetadata, useInterfaces: boolean = false): EventUpdateProjectMetadataAmino { const obj: any = {}; - obj.project_id = message.projectId; + obj.project_id = message.projectId === "" ? undefined : message.projectId; return obj; }, fromAminoMsg(object: EventUpdateProjectMetadataAminoMsg): EventUpdateProjectMetadata { @@ -1815,7 +1815,7 @@ export const EventUpdateBatchMetadata = { }, toAmino(message: EventUpdateBatchMetadata, useInterfaces: boolean = false): EventUpdateBatchMetadataAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; return obj; }, fromAminoMsg(object: EventUpdateBatchMetadataAminoMsg): EventUpdateBatchMetadata { @@ -1878,7 +1878,7 @@ export const EventSealBatch = { }, toAmino(message: EventSealBatch, useInterfaces: boolean = false): EventSealBatchAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; return obj; }, fromAminoMsg(object: EventSealBatchAminoMsg): EventSealBatch { @@ -1941,7 +1941,7 @@ export const EventAddCreditType = { }, toAmino(message: EventAddCreditType, useInterfaces: boolean = false): EventAddCreditTypeAmino { const obj: any = {}; - obj.abbreviation = message.abbreviation; + obj.abbreviation = message.abbreviation === "" ? undefined : message.abbreviation; return obj; }, fromAminoMsg(object: EventAddCreditTypeAminoMsg): EventAddCreditType { @@ -2059,12 +2059,12 @@ export const EventBridge = { }, toAmino(message: EventBridge, useInterfaces: boolean = false): EventBridgeAmino { const obj: any = {}; - obj.target = message.target; - obj.recipient = message.recipient; - obj.contract = message.contract; - obj.amount = message.amount; - obj.owner = message.owner; - obj.batch_denom = message.batchDenom; + obj.target = message.target === "" ? undefined : message.target; + obj.recipient = message.recipient === "" ? undefined : message.recipient; + obj.contract = message.contract === "" ? undefined : message.contract; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; return obj; }, fromAminoMsg(object: EventBridgeAminoMsg): EventBridge { @@ -2160,9 +2160,9 @@ export const EventBridgeReceive = { }, toAmino(message: EventBridgeReceive, useInterfaces: boolean = false): EventBridgeReceiveAmino { const obj: any = {}; - obj.project_id = message.projectId; - obj.batch_denom = message.batchDenom; - obj.amount = message.amount; + obj.project_id = message.projectId === "" ? undefined : message.projectId; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.amount = message.amount === "" ? undefined : message.amount; obj.origin_tx = message.originTx ? OriginTx.toAmino(message.originTx, useInterfaces) : undefined; return obj; }, @@ -2248,9 +2248,9 @@ export const EventBurnRegen = { }, toAmino(message: EventBurnRegen, useInterfaces: boolean = false): EventBurnRegenAmino { const obj: any = {}; - obj.burner = message.burner; - obj.amount = message.amount; - obj.reason = message.reason; + obj.burner = message.burner === "" ? undefined : message.burner; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.reason = message.reason === "" ? undefined : message.reason; return obj; }, fromAminoMsg(object: EventBurnRegenAminoMsg): EventBurnRegen { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/v1/state.ts b/packages/types/protobuf/codegen/regen/ecocredit/v1/state.ts index a5b6ffc805..4b59c529c4 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/v1/state.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/v1/state.ts @@ -995,10 +995,10 @@ export const CreditType = { }, toAmino(message: CreditType, useInterfaces: boolean = false): CreditTypeAmino { const obj: any = {}; - obj.abbreviation = message.abbreviation; - obj.name = message.name; - obj.unit = message.unit; - obj.precision = message.precision; + obj.abbreviation = message.abbreviation === "" ? undefined : message.abbreviation; + obj.name = message.name === "" ? undefined : message.name; + obj.unit = message.unit === "" ? undefined : message.unit; + obj.precision = message.precision === 0 ? undefined : message.precision; return obj; }, fromAminoMsg(object: CreditTypeAminoMsg): CreditType { @@ -1105,11 +1105,11 @@ export const Class = { }, toAmino(message: Class, useInterfaces: boolean = false): ClassAmino { const obj: any = {}; - obj.key = message.key ? message.key.toString() : undefined; - obj.id = message.id; + obj.key = message.key !== BigInt(0) ? message.key.toString() : undefined; + obj.id = message.id === "" ? undefined : message.id; obj.admin = message.admin ? base64FromBytes(message.admin) : undefined; - obj.metadata = message.metadata; - obj.credit_type_abbrev = message.creditTypeAbbrev; + obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.credit_type_abbrev = message.creditTypeAbbrev === "" ? undefined : message.creditTypeAbbrev; return obj; }, fromAminoMsg(object: ClassAminoMsg): Class { @@ -1183,7 +1183,7 @@ export const ClassIssuer = { }, toAmino(message: ClassIssuer, useInterfaces: boolean = false): ClassIssuerAmino { const obj: any = {}; - obj.class_key = message.classKey ? message.classKey.toString() : undefined; + obj.class_key = message.classKey !== BigInt(0) ? message.classKey.toString() : undefined; obj.issuer = message.issuer ? base64FromBytes(message.issuer) : undefined; return obj; }, @@ -1313,13 +1313,13 @@ export const Project = { }, toAmino(message: Project, useInterfaces: boolean = false): ProjectAmino { const obj: any = {}; - obj.key = message.key ? message.key.toString() : undefined; - obj.id = message.id; + obj.key = message.key !== BigInt(0) ? message.key.toString() : undefined; + obj.id = message.id === "" ? undefined : message.id; obj.admin = message.admin ? base64FromBytes(message.admin) : undefined; - obj.class_key = message.classKey ? message.classKey.toString() : undefined; - obj.jurisdiction = message.jurisdiction; - obj.metadata = message.metadata; - obj.reference_id = message.referenceId; + obj.class_key = message.classKey !== BigInt(0) ? message.classKey.toString() : undefined; + obj.jurisdiction = message.jurisdiction === "" ? undefined : message.jurisdiction; + obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.reference_id = message.referenceId === "" ? undefined : message.referenceId; return obj; }, fromAminoMsg(object: ProjectAminoMsg): Project { @@ -1470,15 +1470,15 @@ export const Batch = { }, toAmino(message: Batch, useInterfaces: boolean = false): BatchAmino { const obj: any = {}; - obj.key = message.key ? message.key.toString() : undefined; + obj.key = message.key !== BigInt(0) ? message.key.toString() : undefined; obj.issuer = message.issuer ? base64FromBytes(message.issuer) : undefined; - obj.project_key = message.projectKey ? message.projectKey.toString() : undefined; - obj.denom = message.denom; - obj.metadata = message.metadata; + obj.project_key = message.projectKey !== BigInt(0) ? message.projectKey.toString() : undefined; + obj.denom = message.denom === "" ? undefined : message.denom; + obj.metadata = message.metadata === "" ? undefined : message.metadata; obj.start_date = message.startDate ? Timestamp.toAmino(toTimestamp(message.startDate)) : undefined; obj.end_date = message.endDate ? Timestamp.toAmino(toTimestamp(message.endDate)) : undefined; obj.issuance_date = message.issuanceDate ? Timestamp.toAmino(toTimestamp(message.issuanceDate)) : undefined; - obj.open = message.open; + obj.open = message.open === false ? undefined : message.open; return obj; }, fromAminoMsg(object: BatchAminoMsg): Batch { @@ -1552,8 +1552,8 @@ export const ClassSequence = { }, toAmino(message: ClassSequence, useInterfaces: boolean = false): ClassSequenceAmino { const obj: any = {}; - obj.credit_type_abbrev = message.creditTypeAbbrev; - obj.next_sequence = message.nextSequence ? message.nextSequence.toString() : undefined; + obj.credit_type_abbrev = message.creditTypeAbbrev === "" ? undefined : message.creditTypeAbbrev; + obj.next_sequence = message.nextSequence !== BigInt(0) ? message.nextSequence.toString() : undefined; return obj; }, fromAminoMsg(object: ClassSequenceAminoMsg): ClassSequence { @@ -1627,8 +1627,8 @@ export const ProjectSequence = { }, toAmino(message: ProjectSequence, useInterfaces: boolean = false): ProjectSequenceAmino { const obj: any = {}; - obj.class_key = message.classKey ? message.classKey.toString() : undefined; - obj.next_sequence = message.nextSequence ? message.nextSequence.toString() : undefined; + obj.class_key = message.classKey !== BigInt(0) ? message.classKey.toString() : undefined; + obj.next_sequence = message.nextSequence !== BigInt(0) ? message.nextSequence.toString() : undefined; return obj; }, fromAminoMsg(object: ProjectSequenceAminoMsg): ProjectSequence { @@ -1702,8 +1702,8 @@ export const BatchSequence = { }, toAmino(message: BatchSequence, useInterfaces: boolean = false): BatchSequenceAmino { const obj: any = {}; - obj.project_key = message.projectKey ? message.projectKey.toString() : undefined; - obj.next_sequence = message.nextSequence ? message.nextSequence.toString() : undefined; + obj.project_key = message.projectKey !== BigInt(0) ? message.projectKey.toString() : undefined; + obj.next_sequence = message.nextSequence !== BigInt(0) ? message.nextSequence.toString() : undefined; return obj; }, fromAminoMsg(object: BatchSequenceAminoMsg): BatchSequence { @@ -1810,11 +1810,11 @@ export const BatchBalance = { }, toAmino(message: BatchBalance, useInterfaces: boolean = false): BatchBalanceAmino { const obj: any = {}; - obj.batch_key = message.batchKey ? message.batchKey.toString() : undefined; + obj.batch_key = message.batchKey !== BigInt(0) ? message.batchKey.toString() : undefined; obj.address = message.address ? base64FromBytes(message.address) : undefined; - obj.tradable_amount = message.tradableAmount; - obj.retired_amount = message.retiredAmount; - obj.escrowed_amount = message.escrowedAmount; + obj.tradable_amount = message.tradableAmount === "" ? undefined : message.tradableAmount; + obj.retired_amount = message.retiredAmount === "" ? undefined : message.retiredAmount; + obj.escrowed_amount = message.escrowedAmount === "" ? undefined : message.escrowedAmount; return obj; }, fromAminoMsg(object: BatchBalanceAminoMsg): BatchBalance { @@ -1910,10 +1910,10 @@ export const BatchSupply = { }, toAmino(message: BatchSupply, useInterfaces: boolean = false): BatchSupplyAmino { const obj: any = {}; - obj.batch_key = message.batchKey ? message.batchKey.toString() : undefined; - obj.tradable_amount = message.tradableAmount; - obj.retired_amount = message.retiredAmount; - obj.cancelled_amount = message.cancelledAmount; + obj.batch_key = message.batchKey !== BigInt(0) ? message.batchKey.toString() : undefined; + obj.tradable_amount = message.tradableAmount === "" ? undefined : message.tradableAmount; + obj.retired_amount = message.retiredAmount === "" ? undefined : message.retiredAmount; + obj.cancelled_amount = message.cancelledAmount === "" ? undefined : message.cancelledAmount; return obj; }, fromAminoMsg(object: BatchSupplyAminoMsg): BatchSupply { @@ -1998,9 +1998,9 @@ export const OriginTxIndex = { }, toAmino(message: OriginTxIndex, useInterfaces: boolean = false): OriginTxIndexAmino { const obj: any = {}; - obj.class_key = message.classKey ? message.classKey.toString() : undefined; - obj.id = message.id; - obj.source = message.source; + obj.class_key = message.classKey !== BigInt(0) ? message.classKey.toString() : undefined; + obj.id = message.id === "" ? undefined : message.id; + obj.source = message.source === "" ? undefined : message.source; return obj; }, fromAminoMsg(object: OriginTxIndexAminoMsg): OriginTxIndex { @@ -2085,9 +2085,9 @@ export const BatchContract = { }, toAmino(message: BatchContract, useInterfaces: boolean = false): BatchContractAmino { const obj: any = {}; - obj.batch_key = message.batchKey ? message.batchKey.toString() : undefined; - obj.class_key = message.classKey ? message.classKey.toString() : undefined; - obj.contract = message.contract; + obj.batch_key = message.batchKey !== BigInt(0) ? message.batchKey.toString() : undefined; + obj.class_key = message.classKey !== BigInt(0) ? message.classKey.toString() : undefined; + obj.contract = message.contract === "" ? undefined : message.contract; return obj; }, fromAminoMsg(object: BatchContractAminoMsg): BatchContract { @@ -2150,7 +2150,7 @@ export const ClassCreatorAllowlist = { }, toAmino(message: ClassCreatorAllowlist, useInterfaces: boolean = false): ClassCreatorAllowlistAmino { const obj: any = {}; - obj.enabled = message.enabled; + obj.enabled = message.enabled === false ? undefined : message.enabled; return obj; }, fromAminoMsg(object: ClassCreatorAllowlistAminoMsg): ClassCreatorAllowlist { @@ -2339,7 +2339,7 @@ export const AllowedBridgeChain = { }, toAmino(message: AllowedBridgeChain, useInterfaces: boolean = false): AllowedBridgeChainAmino { const obj: any = {}; - obj.chain_name = message.chainName; + obj.chain_name = message.chainName === "" ? undefined : message.chainName; return obj; }, fromAminoMsg(object: AllowedBridgeChainAminoMsg): AllowedBridgeChain { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/v1/tx.ts b/packages/types/protobuf/codegen/regen/ecocredit/v1/tx.ts index 3ceaca8b7f..a2e67c54ee 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/v1/tx.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/v1/tx.ts @@ -1992,7 +1992,7 @@ export const MsgAddCreditType = { }, toAmino(message: MsgAddCreditType, useInterfaces: boolean = false): MsgAddCreditTypeAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.credit_type = message.creditType ? CreditType.toAmino(message.creditType, useInterfaces) : undefined; return obj; }, @@ -2148,14 +2148,14 @@ export const MsgCreateClass = { }, toAmino(message: MsgCreateClass, useInterfaces: boolean = false): MsgCreateClassAmino { const obj: any = {}; - obj.admin = message.admin; + obj.admin = message.admin === "" ? undefined : message.admin; if (message.issuers) { obj.issuers = message.issuers.map(e => e); } else { - obj.issuers = []; + obj.issuers = message.issuers; } - obj.metadata = message.metadata; - obj.credit_type_abbrev = message.creditTypeAbbrev; + obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.credit_type_abbrev = message.creditTypeAbbrev === "" ? undefined : message.creditTypeAbbrev; obj.fee = message.fee ? Coin.toAmino(message.fee, useInterfaces) : undefined; return obj; }, @@ -2219,7 +2219,7 @@ export const MsgCreateClassResponse = { }, toAmino(message: MsgCreateClassResponse, useInterfaces: boolean = false): MsgCreateClassResponseAmino { const obj: any = {}; - obj.class_id = message.classId; + obj.class_id = message.classId === "" ? undefined : message.classId; return obj; }, fromAminoMsg(object: MsgCreateClassResponseAminoMsg): MsgCreateClassResponse { @@ -2326,11 +2326,11 @@ export const MsgCreateProject = { }, toAmino(message: MsgCreateProject, useInterfaces: boolean = false): MsgCreateProjectAmino { const obj: any = {}; - obj.admin = message.admin; - obj.class_id = message.classId; - obj.metadata = message.metadata; - obj.jurisdiction = message.jurisdiction; - obj.reference_id = message.referenceId; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.class_id = message.classId === "" ? undefined : message.classId; + obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.jurisdiction = message.jurisdiction === "" ? undefined : message.jurisdiction; + obj.reference_id = message.referenceId === "" ? undefined : message.referenceId; return obj; }, fromAminoMsg(object: MsgCreateProjectAminoMsg): MsgCreateProject { @@ -2393,7 +2393,7 @@ export const MsgCreateProjectResponse = { }, toAmino(message: MsgCreateProjectResponse, useInterfaces: boolean = false): MsgCreateProjectResponseAmino { const obj: any = {}; - obj.project_id = message.projectId; + obj.project_id = message.projectId === "" ? undefined : message.projectId; return obj; }, fromAminoMsg(object: MsgCreateProjectResponseAminoMsg): MsgCreateProjectResponse { @@ -2531,17 +2531,17 @@ export const MsgCreateBatch = { }, toAmino(message: MsgCreateBatch, useInterfaces: boolean = false): MsgCreateBatchAmino { const obj: any = {}; - obj.issuer = message.issuer; - obj.project_id = message.projectId; + obj.issuer = message.issuer === "" ? undefined : message.issuer; + obj.project_id = message.projectId === "" ? undefined : message.projectId; if (message.issuance) { obj.issuance = message.issuance.map(e => e ? BatchIssuance.toAmino(e, useInterfaces) : undefined); } else { - obj.issuance = []; + obj.issuance = message.issuance; } - obj.metadata = message.metadata; + obj.metadata = message.metadata === "" ? undefined : message.metadata; obj.start_date = message.startDate ? Timestamp.toAmino(toTimestamp(message.startDate)) : undefined; obj.end_date = message.endDate ? Timestamp.toAmino(toTimestamp(message.endDate)) : undefined; - obj.open = message.open; + obj.open = message.open === false ? undefined : message.open; obj.origin_tx = message.originTx ? OriginTx.toAmino(message.originTx, useInterfaces) : undefined; return obj; }, @@ -2605,7 +2605,7 @@ export const MsgCreateBatchResponse = { }, toAmino(message: MsgCreateBatchResponse, useInterfaces: boolean = false): MsgCreateBatchResponseAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; return obj; }, fromAminoMsg(object: MsgCreateBatchResponseAminoMsg): MsgCreateBatchResponse { @@ -2699,12 +2699,12 @@ export const MsgMintBatchCredits = { }, toAmino(message: MsgMintBatchCredits, useInterfaces: boolean = false): MsgMintBatchCreditsAmino { const obj: any = {}; - obj.issuer = message.issuer; - obj.batch_denom = message.batchDenom; + obj.issuer = message.issuer === "" ? undefined : message.issuer; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; if (message.issuance) { obj.issuance = message.issuance.map(e => e ? BatchIssuance.toAmino(e, useInterfaces) : undefined); } else { - obj.issuance = []; + obj.issuance = message.issuance; } obj.origin_tx = message.originTx ? OriginTx.toAmino(message.originTx, useInterfaces) : undefined; return obj; @@ -2830,8 +2830,8 @@ export const MsgSealBatch = { }, toAmino(message: MsgSealBatch, useInterfaces: boolean = false): MsgSealBatchAmino { const obj: any = {}; - obj.issuer = message.issuer; - obj.batch_denom = message.batchDenom; + obj.issuer = message.issuer === "" ? undefined : message.issuer; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; return obj; }, fromAminoMsg(object: MsgSealBatchAminoMsg): MsgSealBatch { @@ -2964,12 +2964,12 @@ export const MsgSend = { }, toAmino(message: MsgSend, useInterfaces: boolean = false): MsgSendAmino { const obj: any = {}; - obj.sender = message.sender; - obj.recipient = message.recipient; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.recipient = message.recipient === "" ? undefined : message.recipient; if (message.credits) { obj.credits = message.credits.map(e => e ? MsgSend_SendCredits.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } return obj; }, @@ -3077,11 +3077,11 @@ export const MsgSend_SendCredits = { }, toAmino(message: MsgSend_SendCredits, useInterfaces: boolean = false): MsgSend_SendCreditsAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; - obj.tradable_amount = message.tradableAmount; - obj.retired_amount = message.retiredAmount; - obj.retirement_jurisdiction = message.retirementJurisdiction; - obj.retirement_reason = message.retirementReason; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.tradable_amount = message.tradableAmount === "" ? undefined : message.tradableAmount; + obj.retired_amount = message.retiredAmount === "" ? undefined : message.retiredAmount; + obj.retirement_jurisdiction = message.retirementJurisdiction === "" ? undefined : message.retirementJurisdiction; + obj.retirement_reason = message.retirementReason === "" ? undefined : message.retirementReason; return obj; }, fromAminoMsg(object: MsgSend_SendCreditsAminoMsg): MsgSend_SendCredits { @@ -3225,14 +3225,14 @@ export const MsgRetire = { }, toAmino(message: MsgRetire, useInterfaces: boolean = false): MsgRetireAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; if (message.credits) { obj.credits = message.credits.map(e => e ? Credits.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } - obj.jurisdiction = message.jurisdiction; - obj.reason = message.reason; + obj.jurisdiction = message.jurisdiction === "" ? undefined : message.jurisdiction; + obj.reason = message.reason === "" ? undefined : message.reason; return obj; }, fromAminoMsg(object: MsgRetireAminoMsg): MsgRetire { @@ -3365,13 +3365,13 @@ export const MsgCancel = { }, toAmino(message: MsgCancel, useInterfaces: boolean = false): MsgCancelAmino { const obj: any = {}; - obj.owner = message.owner; + obj.owner = message.owner === "" ? undefined : message.owner; if (message.credits) { obj.credits = message.credits.map(e => e ? Credits.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } - obj.reason = message.reason; + obj.reason = message.reason === "" ? undefined : message.reason; return obj; }, fromAminoMsg(object: MsgCancelAminoMsg): MsgCancel { @@ -3506,9 +3506,9 @@ export const MsgUpdateClassAdmin = { }, toAmino(message: MsgUpdateClassAdmin, useInterfaces: boolean = false): MsgUpdateClassAdminAmino { const obj: any = {}; - obj.admin = message.admin; - obj.class_id = message.classId; - obj.new_admin = message.newAdmin; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.class_id = message.classId === "" ? undefined : message.classId; + obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; return obj; }, fromAminoMsg(object: MsgUpdateClassAdminAminoMsg): MsgUpdateClassAdmin { @@ -3650,17 +3650,17 @@ export const MsgUpdateClassIssuers = { }, toAmino(message: MsgUpdateClassIssuers, useInterfaces: boolean = false): MsgUpdateClassIssuersAmino { const obj: any = {}; - obj.admin = message.admin; - obj.class_id = message.classId; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.class_id = message.classId === "" ? undefined : message.classId; if (message.addIssuers) { obj.add_issuers = message.addIssuers.map(e => e); } else { - obj.add_issuers = []; + obj.add_issuers = message.addIssuers; } if (message.removeIssuers) { obj.remove_issuers = message.removeIssuers.map(e => e); } else { - obj.remove_issuers = []; + obj.remove_issuers = message.removeIssuers; } return obj; }, @@ -3796,9 +3796,9 @@ export const MsgUpdateClassMetadata = { }, toAmino(message: MsgUpdateClassMetadata, useInterfaces: boolean = false): MsgUpdateClassMetadataAmino { const obj: any = {}; - obj.admin = message.admin; - obj.class_id = message.classId; - obj.new_metadata = message.newMetadata; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.class_id = message.classId === "" ? undefined : message.classId; + obj.new_metadata = message.newMetadata === "" ? undefined : message.newMetadata; return obj; }, fromAminoMsg(object: MsgUpdateClassMetadataAminoMsg): MsgUpdateClassMetadata { @@ -3933,9 +3933,9 @@ export const MsgUpdateProjectAdmin = { }, toAmino(message: MsgUpdateProjectAdmin, useInterfaces: boolean = false): MsgUpdateProjectAdminAmino { const obj: any = {}; - obj.admin = message.admin; - obj.project_id = message.projectId; - obj.new_admin = message.newAdmin; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.project_id = message.projectId === "" ? undefined : message.projectId; + obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; return obj; }, fromAminoMsg(object: MsgUpdateProjectAdminAminoMsg): MsgUpdateProjectAdmin { @@ -4070,9 +4070,9 @@ export const MsgUpdateProjectMetadata = { }, toAmino(message: MsgUpdateProjectMetadata, useInterfaces: boolean = false): MsgUpdateProjectMetadataAmino { const obj: any = {}; - obj.admin = message.admin; - obj.project_id = message.projectId; - obj.new_metadata = message.newMetadata; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.project_id = message.projectId === "" ? undefined : message.projectId; + obj.new_metadata = message.newMetadata === "" ? undefined : message.newMetadata; return obj; }, fromAminoMsg(object: MsgUpdateProjectMetadataAminoMsg): MsgUpdateProjectMetadata { @@ -4216,13 +4216,13 @@ export const MsgBridge = { }, toAmino(message: MsgBridge, useInterfaces: boolean = false): MsgBridgeAmino { const obj: any = {}; - obj.owner = message.owner; - obj.target = message.target; - obj.recipient = message.recipient; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.target = message.target === "" ? undefined : message.target; + obj.recipient = message.recipient === "" ? undefined : message.recipient; if (message.credits) { obj.credits = message.credits.map(e => e ? Credits.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } return obj; }, @@ -4308,9 +4308,9 @@ export const MsgUpdateBatchMetadata = { }, toAmino(message: MsgUpdateBatchMetadata, useInterfaces: boolean = false): MsgUpdateBatchMetadataAmino { const obj: any = {}; - obj.issuer = message.issuer; - obj.batch_denom = message.batchDenom; - obj.new_metadata = message.newMetadata; + obj.issuer = message.issuer === "" ? undefined : message.issuer; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.new_metadata = message.newMetadata === "" ? undefined : message.newMetadata; return obj; }, fromAminoMsg(object: MsgUpdateBatchMetadataAminoMsg): MsgUpdateBatchMetadata { @@ -4517,8 +4517,8 @@ export const MsgBridgeReceive = { }, toAmino(message: MsgBridgeReceive, useInterfaces: boolean = false): MsgBridgeReceiveAmino { const obj: any = {}; - obj.issuer = message.issuer; - obj.class_id = message.classId; + obj.issuer = message.issuer === "" ? undefined : message.issuer; + obj.class_id = message.classId === "" ? undefined : message.classId; obj.project = message.project ? MsgBridgeReceive_Project.toAmino(message.project, useInterfaces) : undefined; obj.batch = message.batch ? MsgBridgeReceive_Batch.toAmino(message.batch, useInterfaces) : undefined; obj.origin_tx = message.originTx ? OriginTx.toAmino(message.originTx, useInterfaces) : undefined; @@ -4628,11 +4628,11 @@ export const MsgBridgeReceive_Batch = { }, toAmino(message: MsgBridgeReceive_Batch, useInterfaces: boolean = false): MsgBridgeReceive_BatchAmino { const obj: any = {}; - obj.recipient = message.recipient; - obj.amount = message.amount; + obj.recipient = message.recipient === "" ? undefined : message.recipient; + obj.amount = message.amount === "" ? undefined : message.amount; obj.start_date = message.startDate ? Timestamp.toAmino(toTimestamp(message.startDate)) : undefined; obj.end_date = message.endDate ? Timestamp.toAmino(toTimestamp(message.endDate)) : undefined; - obj.metadata = message.metadata; + obj.metadata = message.metadata === "" ? undefined : message.metadata; return obj; }, fromAminoMsg(object: MsgBridgeReceive_BatchAminoMsg): MsgBridgeReceive_Batch { @@ -4717,9 +4717,9 @@ export const MsgBridgeReceive_Project = { }, toAmino(message: MsgBridgeReceive_Project, useInterfaces: boolean = false): MsgBridgeReceive_ProjectAmino { const obj: any = {}; - obj.reference_id = message.referenceId; - obj.jurisdiction = message.jurisdiction; - obj.metadata = message.metadata; + obj.reference_id = message.referenceId === "" ? undefined : message.referenceId; + obj.jurisdiction = message.jurisdiction === "" ? undefined : message.jurisdiction; + obj.metadata = message.metadata === "" ? undefined : message.metadata; return obj; }, fromAminoMsg(object: MsgBridgeReceive_ProjectAminoMsg): MsgBridgeReceive_Project { @@ -4793,8 +4793,8 @@ export const MsgBridgeReceiveResponse = { }, toAmino(message: MsgBridgeReceiveResponse, useInterfaces: boolean = false): MsgBridgeReceiveResponseAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; - obj.project_id = message.projectId; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.project_id = message.projectId === "" ? undefined : message.projectId; return obj; }, fromAminoMsg(object: MsgBridgeReceiveResponseAminoMsg): MsgBridgeReceiveResponse { @@ -4868,8 +4868,8 @@ export const MsgAddClassCreator = { }, toAmino(message: MsgAddClassCreator, useInterfaces: boolean = false): MsgAddClassCreatorAmino { const obj: any = {}; - obj.authority = message.authority; - obj.creator = message.creator; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.creator = message.creator === "" ? undefined : message.creator; return obj; }, fromAminoMsg(object: MsgAddClassCreatorAminoMsg): MsgAddClassCreator { @@ -4993,8 +4993,8 @@ export const MsgSetClassCreatorAllowlist = { }, toAmino(message: MsgSetClassCreatorAllowlist, useInterfaces: boolean = false): MsgSetClassCreatorAllowlistAmino { const obj: any = {}; - obj.authority = message.authority; - obj.enabled = message.enabled; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.enabled = message.enabled === false ? undefined : message.enabled; return obj; }, fromAminoMsg(object: MsgSetClassCreatorAllowlistAminoMsg): MsgSetClassCreatorAllowlist { @@ -5118,8 +5118,8 @@ export const MsgRemoveClassCreator = { }, toAmino(message: MsgRemoveClassCreator, useInterfaces: boolean = false): MsgRemoveClassCreatorAmino { const obj: any = {}; - obj.authority = message.authority; - obj.creator = message.creator; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.creator = message.creator === "" ? undefined : message.creator; return obj; }, fromAminoMsg(object: MsgRemoveClassCreatorAminoMsg): MsgRemoveClassCreator { @@ -5243,7 +5243,7 @@ export const MsgUpdateClassFee = { }, toAmino(message: MsgUpdateClassFee, useInterfaces: boolean = false): MsgUpdateClassFeeAmino { const obj: any = {}; - obj.authority = message.authority; + obj.authority = message.authority === "" ? undefined : message.authority; obj.fee = message.fee ? Coin.toAmino(message.fee, useInterfaces) : undefined; return obj; }, @@ -5368,8 +5368,8 @@ export const MsgAddAllowedBridgeChain = { }, toAmino(message: MsgAddAllowedBridgeChain, useInterfaces: boolean = false): MsgAddAllowedBridgeChainAmino { const obj: any = {}; - obj.authority = message.authority; - obj.chain_name = message.chainName; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.chain_name = message.chainName === "" ? undefined : message.chainName; return obj; }, fromAminoMsg(object: MsgAddAllowedBridgeChainAminoMsg): MsgAddAllowedBridgeChain { @@ -5493,8 +5493,8 @@ export const MsgRemoveAllowedBridgeChain = { }, toAmino(message: MsgRemoveAllowedBridgeChain, useInterfaces: boolean = false): MsgRemoveAllowedBridgeChainAmino { const obj: any = {}; - obj.authority = message.authority; - obj.chain_name = message.chainName; + obj.authority = message.authority === "" ? undefined : message.authority; + obj.chain_name = message.chainName === "" ? undefined : message.chainName; return obj; }, fromAminoMsg(object: MsgRemoveAllowedBridgeChainAminoMsg): MsgRemoveAllowedBridgeChain { @@ -5629,9 +5629,9 @@ export const MsgBurnRegen = { }, toAmino(message: MsgBurnRegen, useInterfaces: boolean = false): MsgBurnRegenAmino { const obj: any = {}; - obj.burner = message.burner; - obj.amount = message.amount; - obj.reason = message.reason; + obj.burner = message.burner === "" ? undefined : message.burner; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.reason = message.reason === "" ? undefined : message.reason; return obj; }, fromAminoMsg(object: MsgBurnRegenAminoMsg): MsgBurnRegen { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/v1/types.ts b/packages/types/protobuf/codegen/regen/ecocredit/v1/types.ts index 7c286c418d..8606a73dc0 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/v1/types.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/v1/types.ts @@ -513,28 +513,28 @@ export const Params = { if (message.creditClassFee) { obj.credit_class_fee = message.creditClassFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.credit_class_fee = []; + obj.credit_class_fee = message.creditClassFee; } if (message.basketFee) { obj.basket_fee = message.basketFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.basket_fee = []; + obj.basket_fee = message.basketFee; } if (message.allowedClassCreators) { obj.allowed_class_creators = message.allowedClassCreators.map(e => e); } else { - obj.allowed_class_creators = []; + obj.allowed_class_creators = message.allowedClassCreators; } - obj.allowlist_enabled = message.allowlistEnabled; + obj.allowlist_enabled = message.allowlistEnabled === false ? undefined : message.allowlistEnabled; if (message.allowedDenoms) { obj.allowed_denoms = message.allowedDenoms.map(e => e ? AllowedDenom.toAmino(e, useInterfaces) : undefined); } else { - obj.allowed_denoms = []; + obj.allowed_denoms = message.allowedDenoms; } if (message.allowedBridgeChains) { obj.allowed_bridge_chains = message.allowedBridgeChains.map(e => e); } else { - obj.allowed_bridge_chains = []; + obj.allowed_bridge_chains = message.allowedBridgeChains; } return obj; }, @@ -609,8 +609,8 @@ export const Credits = { }, toAmino(message: Credits, useInterfaces: boolean = false): CreditsAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; - obj.amount = message.amount; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: CreditsAminoMsg): Credits { @@ -717,11 +717,11 @@ export const BatchIssuance = { }, toAmino(message: BatchIssuance, useInterfaces: boolean = false): BatchIssuanceAmino { const obj: any = {}; - obj.recipient = message.recipient; - obj.tradable_amount = message.tradableAmount; - obj.retired_amount = message.retiredAmount; - obj.retirement_jurisdiction = message.retirementJurisdiction; - obj.retirement_reason = message.retirementReason; + obj.recipient = message.recipient === "" ? undefined : message.recipient; + obj.tradable_amount = message.tradableAmount === "" ? undefined : message.tradableAmount; + obj.retired_amount = message.retiredAmount === "" ? undefined : message.retiredAmount; + obj.retirement_jurisdiction = message.retirementJurisdiction === "" ? undefined : message.retirementJurisdiction; + obj.retirement_reason = message.retirementReason === "" ? undefined : message.retirementReason; return obj; }, fromAminoMsg(object: BatchIssuanceAminoMsg): BatchIssuance { @@ -817,10 +817,10 @@ export const OriginTx = { }, toAmino(message: OriginTx, useInterfaces: boolean = false): OriginTxAmino { const obj: any = {}; - obj.id = message.id; - obj.source = message.source; - obj.contract = message.contract; - obj.note = message.note; + obj.id = message.id === "" ? undefined : message.id; + obj.source = message.source === "" ? undefined : message.source; + obj.contract = message.contract === "" ? undefined : message.contract; + obj.note = message.note === "" ? undefined : message.note; return obj; }, fromAminoMsg(object: OriginTxAminoMsg): OriginTx { @@ -906,8 +906,8 @@ export const CreditTypeProposal = { }, toAmino(message: CreditTypeProposal, useInterfaces: boolean = false): CreditTypeProposalAmino { const obj: any = {}; - obj.title = message.title; - obj.description = message.description; + obj.title = message.title === "" ? undefined : message.title; + obj.description = message.description === "" ? undefined : message.description; obj.credit_type = message.creditType ? CreditType.toAmino(message.creditType, useInterfaces) : undefined; return obj; }, @@ -993,9 +993,9 @@ export const AllowedDenom = { }, toAmino(message: AllowedDenom, useInterfaces: boolean = false): AllowedDenomAmino { const obj: any = {}; - obj.bank_denom = message.bankDenom; - obj.display_denom = message.displayDenom; - obj.exponent = message.exponent; + obj.bank_denom = message.bankDenom === "" ? undefined : message.bankDenom; + obj.display_denom = message.displayDenom === "" ? undefined : message.displayDenom; + obj.exponent = message.exponent === 0 ? undefined : message.exponent; return obj; }, fromAminoMsg(object: AllowedDenomAminoMsg): AllowedDenom { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/events.ts b/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/events.ts index 0589c07af7..d8f9d372ad 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/events.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/events.ts @@ -350,8 +350,8 @@ export const EventCreateClass = { }, toAmino(message: EventCreateClass, useInterfaces: boolean = false): EventCreateClassAmino { const obj: any = {}; - obj.class_id = message.classId; - obj.admin = message.admin; + obj.class_id = message.classId === "" ? undefined : message.classId; + obj.admin = message.admin === "" ? undefined : message.admin; return obj; }, fromAminoMsg(object: EventCreateClassAminoMsg): EventCreateClass { @@ -480,13 +480,13 @@ export const EventCreateBatch = { }, toAmino(message: EventCreateBatch, useInterfaces: boolean = false): EventCreateBatchAmino { const obj: any = {}; - obj.class_id = message.classId; - obj.batch_denom = message.batchDenom; - obj.issuer = message.issuer; - obj.total_amount = message.totalAmount; - obj.start_date = message.startDate; - obj.end_date = message.endDate; - obj.project_location = message.projectLocation; + obj.class_id = message.classId === "" ? undefined : message.classId; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.issuer = message.issuer === "" ? undefined : message.issuer; + obj.total_amount = message.totalAmount === "" ? undefined : message.totalAmount; + obj.start_date = message.startDate === "" ? undefined : message.startDate; + obj.end_date = message.endDate === "" ? undefined : message.endDate; + obj.project_location = message.projectLocation === "" ? undefined : message.projectLocation; return obj; }, fromAminoMsg(object: EventCreateBatchAminoMsg): EventCreateBatch { @@ -604,12 +604,12 @@ export const EventReceive = { }, toAmino(message: EventReceive, useInterfaces: boolean = false): EventReceiveAmino { const obj: any = {}; - obj.sender = message.sender; - obj.recipient = message.recipient; - obj.batch_denom = message.batchDenom; - obj.tradable_amount = message.tradableAmount; - obj.retired_amount = message.retiredAmount; - obj.basket_denom = message.basketDenom; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.recipient = message.recipient === "" ? undefined : message.recipient; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.tradable_amount = message.tradableAmount === "" ? undefined : message.tradableAmount; + obj.retired_amount = message.retiredAmount === "" ? undefined : message.retiredAmount; + obj.basket_denom = message.basketDenom === "" ? undefined : message.basketDenom; return obj; }, fromAminoMsg(object: EventReceiveAminoMsg): EventReceive { @@ -705,10 +705,10 @@ export const EventRetire = { }, toAmino(message: EventRetire, useInterfaces: boolean = false): EventRetireAmino { const obj: any = {}; - obj.retirer = message.retirer; - obj.batch_denom = message.batchDenom; - obj.amount = message.amount; - obj.location = message.location; + obj.retirer = message.retirer === "" ? undefined : message.retirer; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.amount = message.amount === "" ? undefined : message.amount; + obj.location = message.location === "" ? undefined : message.location; return obj; }, fromAminoMsg(object: EventRetireAminoMsg): EventRetire { @@ -793,9 +793,9 @@ export const EventCancel = { }, toAmino(message: EventCancel, useInterfaces: boolean = false): EventCancelAmino { const obj: any = {}; - obj.canceller = message.canceller; - obj.batch_denom = message.batchDenom; - obj.amount = message.amount; + obj.canceller = message.canceller === "" ? undefined : message.canceller; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: EventCancelAminoMsg): EventCancel { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/genesis.ts b/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/genesis.ts index 46c8090bc3..2aace51e7b 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/genesis.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/genesis.ts @@ -225,27 +225,27 @@ export const GenesisState = { if (message.classInfo) { obj.class_info = message.classInfo.map(e => e ? ClassInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.class_info = []; + obj.class_info = message.classInfo; } if (message.batchInfo) { obj.batch_info = message.batchInfo.map(e => e ? BatchInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.batch_info = []; + obj.batch_info = message.batchInfo; } if (message.sequences) { obj.sequences = message.sequences.map(e => e ? CreditTypeSeq.toAmino(e, useInterfaces) : undefined); } else { - obj.sequences = []; + obj.sequences = message.sequences; } if (message.balances) { obj.balances = message.balances.map(e => e ? Balance.toAmino(e, useInterfaces) : undefined); } else { - obj.balances = []; + obj.balances = message.balances; } if (message.supplies) { obj.supplies = message.supplies.map(e => e ? Supply.toAmino(e, useInterfaces) : undefined); } else { - obj.supplies = []; + obj.supplies = message.supplies; } return obj; }, @@ -342,10 +342,10 @@ export const Balance = { }, toAmino(message: Balance, useInterfaces: boolean = false): BalanceAmino { const obj: any = {}; - obj.address = message.address; - obj.batch_denom = message.batchDenom; - obj.tradable_balance = message.tradableBalance; - obj.retired_balance = message.retiredBalance; + obj.address = message.address === "" ? undefined : message.address; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.tradable_balance = message.tradableBalance === "" ? undefined : message.tradableBalance; + obj.retired_balance = message.retiredBalance === "" ? undefined : message.retiredBalance; return obj; }, fromAminoMsg(object: BalanceAminoMsg): Balance { @@ -430,9 +430,9 @@ export const Supply = { }, toAmino(message: Supply, useInterfaces: boolean = false): SupplyAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; - obj.tradable_supply = message.tradableSupply; - obj.retired_supply = message.retiredSupply; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.tradable_supply = message.tradableSupply === "" ? undefined : message.tradableSupply; + obj.retired_supply = message.retiredSupply === "" ? undefined : message.retiredSupply; return obj; }, fromAminoMsg(object: SupplyAminoMsg): Supply { diff --git a/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/tx.ts b/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/tx.ts index c4fdfdf20c..394795aa7f 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/tx.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/tx.ts @@ -754,14 +754,14 @@ export const MsgCreateClass = { }, toAmino(message: MsgCreateClass, useInterfaces: boolean = false): MsgCreateClassAmino { const obj: any = {}; - obj.admin = message.admin; + obj.admin = message.admin === "" ? undefined : message.admin; if (message.issuers) { obj.issuers = message.issuers.map(e => e); } else { - obj.issuers = []; + obj.issuers = message.issuers; } obj.metadata = message.metadata ? base64FromBytes(message.metadata) : undefined; - obj.credit_type_name = message.creditTypeName; + obj.credit_type_name = message.creditTypeName === "" ? undefined : message.creditTypeName; return obj; }, fromAminoMsg(object: MsgCreateClassAminoMsg): MsgCreateClass { @@ -824,7 +824,7 @@ export const MsgCreateClassResponse = { }, toAmino(message: MsgCreateClassResponse, useInterfaces: boolean = false): MsgCreateClassResponseAmino { const obj: any = {}; - obj.class_id = message.classId; + obj.class_id = message.classId === "" ? undefined : message.classId; return obj; }, fromAminoMsg(object: MsgCreateClassResponseAminoMsg): MsgCreateClassResponse { @@ -951,17 +951,17 @@ export const MsgCreateBatch = { }, toAmino(message: MsgCreateBatch, useInterfaces: boolean = false): MsgCreateBatchAmino { const obj: any = {}; - obj.issuer = message.issuer; - obj.class_id = message.classId; + obj.issuer = message.issuer === "" ? undefined : message.issuer; + obj.class_id = message.classId === "" ? undefined : message.classId; if (message.issuance) { obj.issuance = message.issuance.map(e => e ? MsgCreateBatch_BatchIssuance.toAmino(e, useInterfaces) : undefined); } else { - obj.issuance = []; + obj.issuance = message.issuance; } obj.metadata = message.metadata ? base64FromBytes(message.metadata) : undefined; obj.start_date = message.startDate ? Timestamp.toAmino(toTimestamp(message.startDate)) : undefined; obj.end_date = message.endDate ? Timestamp.toAmino(toTimestamp(message.endDate)) : undefined; - obj.project_location = message.projectLocation; + obj.project_location = message.projectLocation === "" ? undefined : message.projectLocation; return obj; }, fromAminoMsg(object: MsgCreateBatchAminoMsg): MsgCreateBatch { @@ -1057,10 +1057,10 @@ export const MsgCreateBatch_BatchIssuance = { }, toAmino(message: MsgCreateBatch_BatchIssuance, useInterfaces: boolean = false): MsgCreateBatch_BatchIssuanceAmino { const obj: any = {}; - obj.recipient = message.recipient; - obj.tradable_amount = message.tradableAmount; - obj.retired_amount = message.retiredAmount; - obj.retirement_location = message.retirementLocation; + obj.recipient = message.recipient === "" ? undefined : message.recipient; + obj.tradable_amount = message.tradableAmount === "" ? undefined : message.tradableAmount; + obj.retired_amount = message.retiredAmount === "" ? undefined : message.retiredAmount; + obj.retirement_location = message.retirementLocation === "" ? undefined : message.retirementLocation; return obj; }, fromAminoMsg(object: MsgCreateBatch_BatchIssuanceAminoMsg): MsgCreateBatch_BatchIssuance { @@ -1123,7 +1123,7 @@ export const MsgCreateBatchResponse = { }, toAmino(message: MsgCreateBatchResponse, useInterfaces: boolean = false): MsgCreateBatchResponseAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; return obj; }, fromAminoMsg(object: MsgCreateBatchResponseAminoMsg): MsgCreateBatchResponse { @@ -1206,12 +1206,12 @@ export const MsgSend = { }, toAmino(message: MsgSend, useInterfaces: boolean = false): MsgSendAmino { const obj: any = {}; - obj.sender = message.sender; - obj.recipient = message.recipient; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.recipient = message.recipient === "" ? undefined : message.recipient; if (message.credits) { obj.credits = message.credits.map(e => e ? MsgSend_SendCredits.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } return obj; }, @@ -1308,10 +1308,10 @@ export const MsgSend_SendCredits = { }, toAmino(message: MsgSend_SendCredits, useInterfaces: boolean = false): MsgSend_SendCreditsAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; - obj.tradable_amount = message.tradableAmount; - obj.retired_amount = message.retiredAmount; - obj.retirement_location = message.retirementLocation; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.tradable_amount = message.tradableAmount === "" ? undefined : message.tradableAmount; + obj.retired_amount = message.retiredAmount === "" ? undefined : message.retiredAmount; + obj.retirement_location = message.retirementLocation === "" ? undefined : message.retirementLocation; return obj; }, fromAminoMsg(object: MsgSend_SendCreditsAminoMsg): MsgSend_SendCredits { @@ -1444,13 +1444,13 @@ export const MsgRetire = { }, toAmino(message: MsgRetire, useInterfaces: boolean = false): MsgRetireAmino { const obj: any = {}; - obj.holder = message.holder; + obj.holder = message.holder === "" ? undefined : message.holder; if (message.credits) { obj.credits = message.credits.map(e => e ? MsgRetire_RetireCredits.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } - obj.location = message.location; + obj.location = message.location === "" ? undefined : message.location; return obj; }, fromAminoMsg(object: MsgRetireAminoMsg): MsgRetire { @@ -1524,8 +1524,8 @@ export const MsgRetire_RetireCredits = { }, toAmino(message: MsgRetire_RetireCredits, useInterfaces: boolean = false): MsgRetire_RetireCreditsAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; - obj.amount = message.amount; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: MsgRetire_RetireCreditsAminoMsg): MsgRetire_RetireCredits { @@ -1647,11 +1647,11 @@ export const MsgCancel = { }, toAmino(message: MsgCancel, useInterfaces: boolean = false): MsgCancelAmino { const obj: any = {}; - obj.holder = message.holder; + obj.holder = message.holder === "" ? undefined : message.holder; if (message.credits) { obj.credits = message.credits.map(e => e ? MsgCancel_CancelCredits.toAmino(e, useInterfaces) : undefined); } else { - obj.credits = []; + obj.credits = message.credits; } return obj; }, @@ -1726,8 +1726,8 @@ export const MsgCancel_CancelCredits = { }, toAmino(message: MsgCancel_CancelCredits, useInterfaces: boolean = false): MsgCancel_CancelCreditsAmino { const obj: any = {}; - obj.batch_denom = message.batchDenom; - obj.amount = message.amount; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.amount = message.amount === "" ? undefined : message.amount; return obj; }, fromAminoMsg(object: MsgCancel_CancelCreditsAminoMsg): MsgCancel_CancelCredits { @@ -1862,9 +1862,9 @@ export const MsgUpdateClassAdmin = { }, toAmino(message: MsgUpdateClassAdmin, useInterfaces: boolean = false): MsgUpdateClassAdminAmino { const obj: any = {}; - obj.admin = message.admin; - obj.class_id = message.classId; - obj.new_admin = message.newAdmin; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.class_id = message.classId === "" ? undefined : message.classId; + obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; return obj; }, fromAminoMsg(object: MsgUpdateClassAdminAminoMsg): MsgUpdateClassAdmin { @@ -1997,12 +1997,12 @@ export const MsgUpdateClassIssuers = { }, toAmino(message: MsgUpdateClassIssuers, useInterfaces: boolean = false): MsgUpdateClassIssuersAmino { const obj: any = {}; - obj.admin = message.admin; - obj.class_id = message.classId; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.class_id = message.classId === "" ? undefined : message.classId; if (message.issuers) { obj.issuers = message.issuers.map(e => e); } else { - obj.issuers = []; + obj.issuers = message.issuers; } return obj; }, @@ -2138,8 +2138,8 @@ export const MsgUpdateClassMetadata = { }, toAmino(message: MsgUpdateClassMetadata, useInterfaces: boolean = false): MsgUpdateClassMetadataAmino { const obj: any = {}; - obj.admin = message.admin; - obj.class_id = message.classId; + obj.admin = message.admin === "" ? undefined : message.admin; + obj.class_id = message.classId === "" ? undefined : message.classId; obj.metadata = message.metadata ? base64FromBytes(message.metadata) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/types.ts b/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/types.ts index c961139163..855b6cf61d 100644 --- a/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/types.ts +++ b/packages/types/protobuf/codegen/regen/ecocredit/v1alpha1/types.ts @@ -405,16 +405,16 @@ export const ClassInfo = { }, toAmino(message: ClassInfo, useInterfaces: boolean = false): ClassInfoAmino { const obj: any = {}; - obj.class_id = message.classId; - obj.admin = message.admin; + obj.class_id = message.classId === "" ? undefined : message.classId; + obj.admin = message.admin === "" ? undefined : message.admin; if (message.issuers) { obj.issuers = message.issuers.map(e => e); } else { - obj.issuers = []; + obj.issuers = message.issuers; } obj.metadata = message.metadata ? base64FromBytes(message.metadata) : undefined; obj.credit_type = message.creditType ? CreditType.toAmino(message.creditType, useInterfaces) : undefined; - obj.num_batches = message.numBatches ? message.numBatches.toString() : undefined; + obj.num_batches = message.numBatches !== BigInt(0) ? message.numBatches.toString() : undefined; return obj; }, fromAminoMsg(object: ClassInfoAminoMsg): ClassInfo { @@ -565,15 +565,15 @@ export const BatchInfo = { }, toAmino(message: BatchInfo, useInterfaces: boolean = false): BatchInfoAmino { const obj: any = {}; - obj.class_id = message.classId; - obj.batch_denom = message.batchDenom; - obj.issuer = message.issuer; - obj.total_amount = message.totalAmount; + obj.class_id = message.classId === "" ? undefined : message.classId; + obj.batch_denom = message.batchDenom === "" ? undefined : message.batchDenom; + obj.issuer = message.issuer === "" ? undefined : message.issuer; + obj.total_amount = message.totalAmount === "" ? undefined : message.totalAmount; obj.metadata = message.metadata ? base64FromBytes(message.metadata) : undefined; - obj.amount_cancelled = message.amountCancelled; + obj.amount_cancelled = message.amountCancelled === "" ? undefined : message.amountCancelled; obj.start_date = message.startDate ? Timestamp.toAmino(toTimestamp(message.startDate)) : undefined; obj.end_date = message.endDate ? Timestamp.toAmino(toTimestamp(message.endDate)) : undefined; - obj.project_location = message.projectLocation; + obj.project_location = message.projectLocation === "" ? undefined : message.projectLocation; return obj; }, fromAminoMsg(object: BatchInfoAminoMsg): BatchInfo { @@ -675,23 +675,23 @@ export const Params = { if (message.creditClassFee) { obj.credit_class_fee = message.creditClassFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.credit_class_fee = []; + obj.credit_class_fee = message.creditClassFee; } if (message.allowedClassCreators) { obj.allowed_class_creators = message.allowedClassCreators.map(e => e); } else { - obj.allowed_class_creators = []; + obj.allowed_class_creators = message.allowedClassCreators; } - obj.allowlist_enabled = message.allowlistEnabled; + obj.allowlist_enabled = message.allowlistEnabled === false ? undefined : message.allowlistEnabled; if (message.creditTypes) { obj.credit_types = message.creditTypes.map(e => e ? CreditType.toAmino(e, useInterfaces) : undefined); } else { - obj.credit_types = []; + obj.credit_types = message.creditTypes; } if (message.basketCreationFee) { obj.basket_creation_fee = message.basketCreationFee.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.basket_creation_fee = []; + obj.basket_creation_fee = message.basketCreationFee; } return obj; }, @@ -788,10 +788,10 @@ export const CreditType = { }, toAmino(message: CreditType, useInterfaces: boolean = false): CreditTypeAmino { const obj: any = {}; - obj.name = message.name; - obj.abbreviation = message.abbreviation; - obj.unit = message.unit; - obj.precision = message.precision; + obj.name = message.name === "" ? undefined : message.name; + obj.abbreviation = message.abbreviation === "" ? undefined : message.abbreviation; + obj.unit = message.unit === "" ? undefined : message.unit; + obj.precision = message.precision === 0 ? undefined : message.precision; return obj; }, fromAminoMsg(object: CreditTypeAminoMsg): CreditType { @@ -865,8 +865,8 @@ export const CreditTypeSeq = { }, toAmino(message: CreditTypeSeq, useInterfaces: boolean = false): CreditTypeSeqAmino { const obj: any = {}; - obj.abbreviation = message.abbreviation; - obj.seq_number = message.seqNumber ? message.seqNumber.toString() : undefined; + obj.abbreviation = message.abbreviation === "" ? undefined : message.abbreviation; + obj.seq_number = message.seqNumber !== BigInt(0) ? message.seqNumber.toString() : undefined; return obj; }, fromAminoMsg(object: CreditTypeSeqAminoMsg): CreditTypeSeq { diff --git a/packages/types/protobuf/codegen/regen/intertx/v1/query.ts b/packages/types/protobuf/codegen/regen/intertx/v1/query.ts index e96313fdd0..d08eb651da 100644 --- a/packages/types/protobuf/codegen/regen/intertx/v1/query.ts +++ b/packages/types/protobuf/codegen/regen/intertx/v1/query.ts @@ -122,8 +122,8 @@ export const QueryInterchainAccountRequest = { }, toAmino(message: QueryInterchainAccountRequest, useInterfaces: boolean = false): QueryInterchainAccountRequestAmino { const obj: any = {}; - obj.owner = message.owner; - obj.connection_id = message.connectionId; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; return obj; }, fromAminoMsg(object: QueryInterchainAccountRequestAminoMsg): QueryInterchainAccountRequest { @@ -186,7 +186,7 @@ export const QueryInterchainAccountResponse = { }, toAmino(message: QueryInterchainAccountResponse, useInterfaces: boolean = false): QueryInterchainAccountResponseAmino { const obj: any = {}; - obj.interchain_account_address = message.interchainAccountAddress; + obj.interchain_account_address = message.interchainAccountAddress === "" ? undefined : message.interchainAccountAddress; return obj; }, fromAminoMsg(object: QueryInterchainAccountResponseAminoMsg): QueryInterchainAccountResponse { diff --git a/packages/types/protobuf/codegen/regen/intertx/v1/tx.ts b/packages/types/protobuf/codegen/regen/intertx/v1/tx.ts index d4a15818fe..7ff905de12 100644 --- a/packages/types/protobuf/codegen/regen/intertx/v1/tx.ts +++ b/packages/types/protobuf/codegen/regen/intertx/v1/tx.ts @@ -167,9 +167,9 @@ export const MsgRegisterAccount = { }, toAmino(message: MsgRegisterAccount, useInterfaces: boolean = false): MsgRegisterAccountAmino { const obj: any = {}; - obj.owner = message.owner; - obj.connection_id = message.connectionId; - obj.version = message.version; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.version = message.version === "" ? undefined : message.version; return obj; }, fromAminoMsg(object: MsgRegisterAccountAminoMsg): MsgRegisterAccount { @@ -304,8 +304,8 @@ export const MsgSubmitTx = { }, toAmino(message: MsgSubmitTx, useInterfaces: boolean = false): MsgSubmitTxAmino { const obj: any = {}; - obj.owner = message.owner; - obj.connection_id = message.connectionId; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; obj.msg = message.msg ? Any.toAmino(message.msg, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/secret/compute/v1beta1/genesis.ts b/packages/types/protobuf/codegen/secret/compute/v1beta1/genesis.ts index 756255e4e2..b2770d4154 100644 --- a/packages/types/protobuf/codegen/secret/compute/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/secret/compute/v1beta1/genesis.ts @@ -171,17 +171,17 @@ export const GenesisState = { if (message.codes) { obj.codes = message.codes.map(e => e ? Code.toAmino(e, useInterfaces) : undefined); } else { - obj.codes = []; + obj.codes = message.codes; } if (message.contracts) { obj.contracts = message.contracts.map(e => e ? Contract.toAmino(e, useInterfaces) : undefined); } else { - obj.contracts = []; + obj.contracts = message.contracts; } if (message.sequences) { obj.sequences = message.sequences.map(e => e ? Sequence.toAmino(e, useInterfaces) : undefined); } else { - obj.sequences = []; + obj.sequences = message.sequences; } return obj; }, @@ -267,7 +267,7 @@ export const Code = { }, toAmino(message: Code, useInterfaces: boolean = false): CodeAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.code_info = message.codeInfo ? CodeInfo.toAmino(message.codeInfo, useInterfaces) : undefined; obj.code_bytes = message.codeBytes ? base64FromBytes(message.codeBytes) : undefined; return obj; @@ -368,7 +368,7 @@ export const Contract = { if (message.contractState) { obj.contract_state = message.contractState.map(e => e ? Model.toAmino(e, useInterfaces) : undefined); } else { - obj.contract_state = []; + obj.contract_state = message.contractState; } obj.contract_custom_info = message.contractCustomInfo ? ContractCustomInfo.toAmino(message.contractCustomInfo, useInterfaces) : undefined; return obj; @@ -445,7 +445,7 @@ export const Sequence = { toAmino(message: Sequence, useInterfaces: boolean = false): SequenceAmino { const obj: any = {}; obj.id_key = message.idKey ? base64FromBytes(message.idKey) : undefined; - obj.value = message.value ? message.value.toString() : undefined; + obj.value = message.value !== BigInt(0) ? message.value.toString() : undefined; return obj; }, fromAminoMsg(object: SequenceAminoMsg): Sequence { diff --git a/packages/types/protobuf/codegen/secret/compute/v1beta1/msg.ts b/packages/types/protobuf/codegen/secret/compute/v1beta1/msg.ts index 6db30fad05..962b626ac9 100644 --- a/packages/types/protobuf/codegen/secret/compute/v1beta1/msg.ts +++ b/packages/types/protobuf/codegen/secret/compute/v1beta1/msg.ts @@ -446,8 +446,8 @@ export const MsgStoreCode = { const obj: any = {}; obj.sender = message.sender ? base64FromBytes(message.sender) : undefined; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; - obj.source = message.source; - obj.builder = message.builder; + obj.source = message.source === "" ? undefined : message.source; + obj.builder = message.builder === "" ? undefined : message.builder; return obj; }, fromAminoMsg(object: MsgStoreCodeAminoMsg): MsgStoreCode { @@ -510,7 +510,7 @@ export const MsgStoreCodeResponse = { }, toAmino(message: MsgStoreCodeResponse, useInterfaces: boolean = false): MsgStoreCodeResponseAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; return obj; }, fromAminoMsg(object: MsgStoreCodeResponseAminoMsg): MsgStoreCodeResponse { @@ -649,17 +649,17 @@ export const MsgInstantiateContract = { toAmino(message: MsgInstantiateContract, useInterfaces: boolean = false): MsgInstantiateContractAmino { const obj: any = {}; obj.sender = message.sender ? base64FromBytes(message.sender) : undefined; - obj.callback_code_hash = message.callbackCodeHash; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.label = message.label; + obj.callback_code_hash = message.callbackCodeHash === "" ? undefined : message.callbackCodeHash; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.label = message.label === "" ? undefined : message.label; obj.init_msg = message.initMsg ? base64FromBytes(message.initMsg) : undefined; if (message.initFunds) { obj.init_funds = message.initFunds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.init_funds = []; + obj.init_funds = message.initFunds; } obj.callback_sig = message.callbackSig ? base64FromBytes(message.callbackSig) : undefined; - obj.admin = message.admin; + obj.admin = message.admin === "" ? undefined : message.admin; return obj; }, fromAminoMsg(object: MsgInstantiateContractAminoMsg): MsgInstantiateContract { @@ -733,7 +733,7 @@ export const MsgInstantiateContractResponse = { }, toAmino(message: MsgInstantiateContractResponse, useInterfaces: boolean = false): MsgInstantiateContractResponseAmino { const obj: any = {}; - obj.address = message.address; + obj.address = message.address === "" ? undefined : message.address; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -853,11 +853,11 @@ export const MsgExecuteContract = { obj.sender = message.sender ? base64FromBytes(message.sender) : undefined; obj.contract = message.contract ? base64FromBytes(message.contract) : undefined; obj.msg = message.msg ? base64FromBytes(message.msg) : undefined; - obj.callback_code_hash = message.callbackCodeHash; + obj.callback_code_hash = message.callbackCodeHash === "" ? undefined : message.callbackCodeHash; if (message.sentFunds) { obj.sent_funds = message.sentFunds.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); } else { - obj.sent_funds = []; + obj.sent_funds = message.sentFunds; } obj.callback_sig = message.callbackSig ? base64FromBytes(message.callbackSig) : undefined; return obj; @@ -1040,12 +1040,12 @@ export const MsgMigrateContract = { }, toAmino(message: MsgMigrateContract, useInterfaces: boolean = false): MsgMigrateContractAmino { const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.contract = message.contract === "" ? undefined : message.contract; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.msg = message.msg ? base64FromBytes(message.msg) : undefined; obj.callback_sig = message.callbackSig ? base64FromBytes(message.callbackSig) : undefined; - obj.callback_code_hash = message.callbackCodeHash; + obj.callback_code_hash = message.callbackCodeHash === "" ? undefined : message.callbackCodeHash; return obj; }, fromAminoMsg(object: MsgMigrateContractAminoMsg): MsgMigrateContract { @@ -1204,9 +1204,9 @@ export const MsgUpdateAdmin = { }, toAmino(message: MsgUpdateAdmin, useInterfaces: boolean = false): MsgUpdateAdminAmino { const obj: any = {}; - obj.sender = message.sender; - obj.new_admin = message.newAdmin; - obj.contract = message.contract; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; + obj.contract = message.contract === "" ? undefined : message.contract; obj.callback_sig = message.callbackSig ? base64FromBytes(message.callbackSig) : undefined; return obj; }, @@ -1342,8 +1342,8 @@ export const MsgClearAdmin = { }, toAmino(message: MsgClearAdmin, useInterfaces: boolean = false): MsgClearAdminAmino { const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; + obj.sender = message.sender === "" ? undefined : message.sender; + obj.contract = message.contract === "" ? undefined : message.contract; obj.callback_sig = message.callbackSig ? base64FromBytes(message.callbackSig) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/secret/compute/v1beta1/query.ts b/packages/types/protobuf/codegen/secret/compute/v1beta1/query.ts index 36b0201e27..2cf05872f2 100644 --- a/packages/types/protobuf/codegen/secret/compute/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/secret/compute/v1beta1/query.ts @@ -453,7 +453,7 @@ export const QuerySecretContractRequest = { }, toAmino(message: QuerySecretContractRequest, useInterfaces: boolean = false): QuerySecretContractRequestAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; obj.query = message.query ? base64FromBytes(message.query) : undefined; return obj; }, @@ -517,7 +517,7 @@ export const QueryByLabelRequest = { }, toAmino(message: QueryByLabelRequest, useInterfaces: boolean = false): QueryByLabelRequestAmino { const obj: any = {}; - obj.label = message.label; + obj.label = message.label === "" ? undefined : message.label; return obj; }, fromAminoMsg(object: QueryByLabelRequestAminoMsg): QueryByLabelRequest { @@ -580,7 +580,7 @@ export const QueryByContractAddressRequest = { }, toAmino(message: QueryByContractAddressRequest, useInterfaces: boolean = false): QueryByContractAddressRequestAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; return obj; }, fromAminoMsg(object: QueryByContractAddressRequestAminoMsg): QueryByContractAddressRequest { @@ -643,7 +643,7 @@ export const QueryByCodeIdRequest = { }, toAmino(message: QueryByCodeIdRequest, useInterfaces: boolean = false): QueryByCodeIdRequestAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; return obj; }, fromAminoMsg(object: QueryByCodeIdRequestAminoMsg): QueryByCodeIdRequest { @@ -780,7 +780,7 @@ export const QueryContractInfoResponse = { }, toAmino(message: QueryContractInfoResponse, useInterfaces: boolean = false): QueryContractInfoResponseAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; obj.contract_info = message.contractInfo ? ContractInfo.toAmino(message.contractInfo, useInterfaces) : undefined; return obj; }, @@ -855,7 +855,7 @@ export const ContractInfoWithAddress = { }, toAmino(message: ContractInfoWithAddress, useInterfaces: boolean = false): ContractInfoWithAddressAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; obj.contract_info = message.contractInfo ? ContractInfo.toAmino(message.contractInfo, useInterfaces) : undefined; return obj; }, @@ -920,7 +920,7 @@ export const QueryContractsByCodeIdResponse = { if (message.contractInfos) { obj.contract_infos = message.contractInfos.map(e => e ? ContractInfoWithAddress.toAmino(e, useInterfaces) : undefined); } else { - obj.contract_infos = []; + obj.contract_infos = message.contractInfos; } return obj; }, @@ -1028,11 +1028,11 @@ export const CodeInfoResponse = { }, toAmino(message: CodeInfoResponse, useInterfaces: boolean = false): CodeInfoResponseAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.creator = message.creator; - obj.code_hash = message.codeHash; - obj.source = message.source; - obj.builder = message.builder; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.creator = message.creator === "" ? undefined : message.creator; + obj.code_hash = message.codeHash === "" ? undefined : message.codeHash; + obj.source = message.source === "" ? undefined : message.source; + obj.builder = message.builder === "" ? undefined : message.builder; return obj; }, fromAminoMsg(object: CodeInfoResponseAminoMsg): CodeInfoResponse { @@ -1171,7 +1171,7 @@ export const QueryCodesResponse = { if (message.codeInfos) { obj.code_infos = message.codeInfos.map(e => e ? CodeInfoResponse.toAmino(e, useInterfaces) : undefined); } else { - obj.code_infos = []; + obj.code_infos = message.codeInfos; } return obj; }, @@ -1235,7 +1235,7 @@ export const QueryContractAddressResponse = { }, toAmino(message: QueryContractAddressResponse, useInterfaces: boolean = false): QueryContractAddressResponseAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; return obj; }, fromAminoMsg(object: QueryContractAddressResponseAminoMsg): QueryContractAddressResponse { @@ -1298,7 +1298,7 @@ export const QueryContractLabelResponse = { }, toAmino(message: QueryContractLabelResponse, useInterfaces: boolean = false): QueryContractLabelResponseAmino { const obj: any = {}; - obj.label = message.label; + obj.label = message.label === "" ? undefined : message.label; return obj; }, fromAminoMsg(object: QueryContractLabelResponseAminoMsg): QueryContractLabelResponse { @@ -1361,7 +1361,7 @@ export const QueryCodeHashResponse = { }, toAmino(message: QueryCodeHashResponse, useInterfaces: boolean = false): QueryCodeHashResponseAmino { const obj: any = {}; - obj.code_hash = message.codeHash; + obj.code_hash = message.codeHash === "" ? undefined : message.codeHash; return obj; }, fromAminoMsg(object: QueryCodeHashResponseAminoMsg): QueryCodeHashResponse { @@ -1457,10 +1457,10 @@ export const DecryptedAnswer = { }, toAmino(message: DecryptedAnswer, useInterfaces: boolean = false): DecryptedAnswerAmino { const obj: any = {}; - obj.type = message.type; - obj.input = message.input; - obj.output_data = message.outputData; - obj.output_data_as_string = message.outputDataAsString; + obj.type = message.type === "" ? undefined : message.type; + obj.input = message.input === "" ? undefined : message.input; + obj.output_data = message.outputData === "" ? undefined : message.outputData; + obj.output_data_as_string = message.outputDataAsString === "" ? undefined : message.outputDataAsString; return obj; }, fromAminoMsg(object: DecryptedAnswerAminoMsg): DecryptedAnswer { @@ -1555,15 +1555,15 @@ export const DecryptedAnswers = { if (message.answers) { obj.answers = message.answers.map(e => e ? DecryptedAnswer.toAmino(e, useInterfaces) : undefined); } else { - obj.answers = []; + obj.answers = message.answers; } if (message.outputLogs) { obj.output_logs = message.outputLogs.map(e => e ? StringEvent.toAmino(e, useInterfaces) : undefined); } else { - obj.output_logs = []; + obj.output_logs = message.outputLogs; } - obj.output_error = message.outputError; - obj.plaintext_error = message.plaintextError; + obj.output_error = message.outputError === "" ? undefined : message.outputError; + obj.plaintext_error = message.plaintextError === "" ? undefined : message.plaintextError; return obj; }, fromAminoMsg(object: DecryptedAnswersAminoMsg): DecryptedAnswers { @@ -1626,7 +1626,7 @@ export const QueryContractHistoryRequest = { }, toAmino(message: QueryContractHistoryRequest, useInterfaces: boolean = false): QueryContractHistoryRequestAmino { const obj: any = {}; - obj.contract_address = message.contractAddress; + obj.contract_address = message.contractAddress === "" ? undefined : message.contractAddress; return obj; }, fromAminoMsg(object: QueryContractHistoryRequestAminoMsg): QueryContractHistoryRequest { @@ -1690,7 +1690,7 @@ export const QueryContractHistoryResponse = { if (message.entries) { obj.entries = message.entries.map(e => e ? ContractCodeHistoryEntry.toAmino(e, useInterfaces) : undefined); } else { - obj.entries = []; + obj.entries = message.entries; } return obj; }, diff --git a/packages/types/protobuf/codegen/secret/compute/v1beta1/types.ts b/packages/types/protobuf/codegen/secret/compute/v1beta1/types.ts index 40e548a870..a3bc224549 100644 --- a/packages/types/protobuf/codegen/secret/compute/v1beta1/types.ts +++ b/packages/types/protobuf/codegen/secret/compute/v1beta1/types.ts @@ -262,9 +262,9 @@ export interface AbsoluteTxPositionSDKType { /** Model is a struct that holds a KV pair */ export interface Model { /** hex-encode key to read it better (this is often ascii) */ - Key: Uint8Array; + key: Uint8Array; /** base64-encode raw value */ - Value: Uint8Array; + value: Uint8Array; } export interface ModelProtoMsg { typeUrl: "/secret.compute.v1beta1.Model"; @@ -357,13 +357,13 @@ export const AccessTypeParam = { fromAmino(object: AccessTypeParamAmino): AccessTypeParam { const message = createBaseAccessTypeParam(); if (object.value !== undefined && object.value !== null) { - message.value = accessTypeFromJSON(object.value); + message.value = object.value; } return message; }, toAmino(message: AccessTypeParam, useInterfaces: boolean = false): AccessTypeParamAmino { const obj: any = {}; - obj.value = message.value; + obj.value = message.value === 0 ? undefined : message.value; return obj; }, fromAminoMsg(object: AccessTypeParamAminoMsg): AccessTypeParam { @@ -461,8 +461,8 @@ export const CodeInfo = { const obj: any = {}; obj.code_hash = message.codeHash ? base64FromBytes(message.codeHash) : undefined; obj.creator = message.creator ? base64FromBytes(message.creator) : undefined; - obj.source = message.source; - obj.builder = message.builder; + obj.source = message.source === "" ? undefined : message.source; + obj.builder = message.builder === "" ? undefined : message.builder; return obj; }, fromAminoMsg(object: CodeInfoAminoMsg): CodeInfo { @@ -624,7 +624,7 @@ export const ContractCustomInfo = { toAmino(message: ContractCustomInfo, useInterfaces: boolean = false): ContractCustomInfoAmino { const obj: any = {}; obj.enclave_key = message.enclaveKey ? ContractKey.toAmino(message.enclaveKey, useInterfaces) : undefined; - obj.label = message.label; + obj.label = message.label === "" ? undefined : message.label; return obj; }, fromAminoMsg(object: ContractCustomInfoAminoMsg): ContractCustomInfo { @@ -753,12 +753,12 @@ export const ContractInfo = { }, toAmino(message: ContractInfo, useInterfaces: boolean = false): ContractInfoAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.creator = message.creator ? base64FromBytes(message.creator) : undefined; - obj.label = message.label; + obj.label = message.label === "" ? undefined : message.label; obj.created = message.created ? AbsoluteTxPosition.toAmino(message.created, useInterfaces) : undefined; - obj.ibc_port_id = message.ibcPortId; - obj.admin = message.admin; + obj.ibc_port_id = message.ibcPortId === "" ? undefined : message.ibcPortId; + obj.admin = message.admin === "" ? undefined : message.admin; obj.admin_proof = message.adminProof ? base64FromBytes(message.adminProof) : undefined; return obj; }, @@ -833,8 +833,8 @@ export const AbsoluteTxPosition = { }, toAmino(message: AbsoluteTxPosition, useInterfaces: boolean = false): AbsoluteTxPositionAmino { const obj: any = {}; - obj.block_height = message.blockHeight ? message.blockHeight.toString() : undefined; - obj.tx_index = message.txIndex ? message.txIndex.toString() : undefined; + obj.block_height = message.blockHeight !== BigInt(0) ? message.blockHeight.toString() : undefined; + obj.tx_index = message.txIndex !== BigInt(0) ? message.txIndex.toString() : undefined; return obj; }, fromAminoMsg(object: AbsoluteTxPositionAminoMsg): AbsoluteTxPosition { @@ -855,18 +855,18 @@ export const AbsoluteTxPosition = { }; function createBaseModel(): Model { return { - Key: new Uint8Array(), - Value: new Uint8Array() + key: new Uint8Array(), + value: new Uint8Array() }; } export const Model = { typeUrl: "/secret.compute.v1beta1.Model", encode(message: Model, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.Key.length !== 0) { - writer.uint32(10).bytes(message.Key); + if (message.key.length !== 0) { + writer.uint32(10).bytes(message.key); } - if (message.Value.length !== 0) { - writer.uint32(18).bytes(message.Value); + if (message.value.length !== 0) { + writer.uint32(18).bytes(message.value); } return writer; }, @@ -878,10 +878,10 @@ export const Model = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.Key = reader.bytes(); + message.key = reader.bytes(); break; case 2: - message.Value = reader.bytes(); + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -892,24 +892,24 @@ export const Model = { }, fromPartial(object: Partial): Model { const message = createBaseModel(); - message.Key = object.Key ?? new Uint8Array(); - message.Value = object.Value ?? new Uint8Array(); + message.key = object.key ?? new Uint8Array(); + message.value = object.value ?? new Uint8Array(); return message; }, fromAmino(object: ModelAmino): Model { const message = createBaseModel(); if (object.Key !== undefined && object.Key !== null) { - message.Key = bytesFromBase64(object.Key); + message.key = bytesFromBase64(object.Key); } if (object.Value !== undefined && object.Value !== null) { - message.Value = bytesFromBase64(object.Value); + message.value = bytesFromBase64(object.Value); } return message; }, toAmino(message: Model, useInterfaces: boolean = false): ModelAmino { const obj: any = {}; - obj.Key = message.Key ? base64FromBytes(message.Key) : undefined; - obj.Value = message.Value ? base64FromBytes(message.Value) : undefined; + obj.Key = message.key ? base64FromBytes(message.key) : undefined; + obj.Value = message.value ? base64FromBytes(message.value) : undefined; return obj; }, fromAminoMsg(object: ModelAminoMsg): Model { @@ -990,7 +990,7 @@ export const ContractCodeHistoryEntry = { fromAmino(object: ContractCodeHistoryEntryAmino): ContractCodeHistoryEntry { const message = createBaseContractCodeHistoryEntry(); if (object.operation !== undefined && object.operation !== null) { - message.operation = contractCodeHistoryOperationTypeFromJSON(object.operation); + message.operation = object.operation; } if (object.code_id !== undefined && object.code_id !== null) { message.codeId = BigInt(object.code_id); @@ -1005,8 +1005,8 @@ export const ContractCodeHistoryEntry = { }, toAmino(message: ContractCodeHistoryEntry, useInterfaces: boolean = false): ContractCodeHistoryEntryAmino { const obj: any = {}; - obj.operation = message.operation; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.operation = message.operation === 0 ? undefined : message.operation; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.updated = message.updated ? AbsoluteTxPosition.toAmino(message.updated, useInterfaces) : undefined; obj.msg = message.msg ? base64FromBytes(message.msg) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/secret/emergencybutton/v1beta1/params.ts b/packages/types/protobuf/codegen/secret/emergencybutton/v1beta1/params.ts index 84c90defdf..5e75f9f9be 100644 --- a/packages/types/protobuf/codegen/secret/emergencybutton/v1beta1/params.ts +++ b/packages/types/protobuf/codegen/secret/emergencybutton/v1beta1/params.ts @@ -77,8 +77,8 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.switch_status = message.switchStatus; - obj.pauser_address = message.pauserAddress; + obj.switch_status = message.switchStatus === "" ? undefined : message.switchStatus; + obj.pauser_address = message.pauserAddress === "" ? undefined : message.pauserAddress; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { diff --git a/packages/types/protobuf/codegen/secret/emergencybutton/v1beta1/tx.ts b/packages/types/protobuf/codegen/secret/emergencybutton/v1beta1/tx.ts index 123f2a71bf..d15c5a6556 100644 --- a/packages/types/protobuf/codegen/secret/emergencybutton/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/secret/emergencybutton/v1beta1/tx.ts @@ -78,7 +78,7 @@ export const MsgToggleIbcSwitch = { }, toAmino(message: MsgToggleIbcSwitch, useInterfaces: boolean = false): MsgToggleIbcSwitchAmino { const obj: any = {}; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: MsgToggleIbcSwitchAminoMsg): MsgToggleIbcSwitch { diff --git a/packages/types/protobuf/codegen/secret/intertx/v1beta1/query.ts b/packages/types/protobuf/codegen/secret/intertx/v1beta1/query.ts index e9f877add9..a73722d110 100644 --- a/packages/types/protobuf/codegen/secret/intertx/v1beta1/query.ts +++ b/packages/types/protobuf/codegen/secret/intertx/v1beta1/query.ts @@ -98,8 +98,8 @@ export const QueryInterchainAccountFromAddressRequest = { }, toAmino(message: QueryInterchainAccountFromAddressRequest, useInterfaces: boolean = false): QueryInterchainAccountFromAddressRequestAmino { const obj: any = {}; - obj.owner = message.owner; - obj.connection_id = message.connectionId; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; return obj; }, fromAminoMsg(object: QueryInterchainAccountFromAddressRequestAminoMsg): QueryInterchainAccountFromAddressRequest { @@ -162,7 +162,7 @@ export const QueryInterchainAccountFromAddressResponse = { }, toAmino(message: QueryInterchainAccountFromAddressResponse, useInterfaces: boolean = false): QueryInterchainAccountFromAddressResponseAmino { const obj: any = {}; - obj.interchain_account_address = message.interchainAccountAddress; + obj.interchain_account_address = message.interchainAccountAddress === "" ? undefined : message.interchainAccountAddress; return obj; }, fromAminoMsg(object: QueryInterchainAccountFromAddressResponseAminoMsg): QueryInterchainAccountFromAddressResponse { diff --git a/packages/types/protobuf/codegen/secret/intertx/v1beta1/tx.ts b/packages/types/protobuf/codegen/secret/intertx/v1beta1/tx.ts index 2149749848..e9680f5c76 100644 --- a/packages/types/protobuf/codegen/secret/intertx/v1beta1/tx.ts +++ b/packages/types/protobuf/codegen/secret/intertx/v1beta1/tx.ts @@ -148,9 +148,9 @@ export const MsgRegisterAccount = { }, toAmino(message: MsgRegisterAccount, useInterfaces: boolean = false): MsgRegisterAccountAmino { const obj: any = {}; - obj.owner = message.owner; - obj.connection_id = message.connectionId; - obj.version = message.version; + obj.owner = message.owner === "" ? undefined : message.owner; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.version = message.version === "" ? undefined : message.version; return obj; }, fromAminoMsg(object: MsgRegisterAccountAminoMsg): MsgRegisterAccount { @@ -286,7 +286,7 @@ export const MsgSubmitTx = { toAmino(message: MsgSubmitTx, useInterfaces: boolean = false): MsgSubmitTxAmino { const obj: any = {}; obj.owner = message.owner ? base64FromBytes(message.owner) : undefined; - obj.connection_id = message.connectionId; + obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; obj.msg = message.msg ? Any.toAmino(message.msg, useInterfaces) : undefined; return obj; }, diff --git a/packages/types/protobuf/codegen/secret/registration/v1beta1/genesis.ts b/packages/types/protobuf/codegen/secret/registration/v1beta1/genesis.ts index 2c7690cd88..083eaf16d0 100644 --- a/packages/types/protobuf/codegen/secret/registration/v1beta1/genesis.ts +++ b/packages/types/protobuf/codegen/secret/registration/v1beta1/genesis.ts @@ -12,9 +12,9 @@ export interface GenesisStateProtoMsg { value: Uint8Array; } export interface GenesisStateAmino { - registration?: RegistrationNodeInfoAmino[]; - node_exch_master_key?: MasterKeyAmino | undefined; - io_master_key?: MasterKeyAmino | undefined; + registration: RegistrationNodeInfoAmino[]; + node_exch_master_key: MasterKeyAmino | undefined; + io_master_key: MasterKeyAmino | undefined; } export interface GenesisStateAminoMsg { type: "/secret.registration.v1beta1.GenesisState"; @@ -92,10 +92,10 @@ export const GenesisState = { if (message.registration) { obj.registration = message.registration.map(e => e ? RegistrationNodeInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.registration = []; + obj.registration = message.registration; } - obj.node_exch_master_key = message.nodeExchMasterKey ? MasterKey.toAmino(message.nodeExchMasterKey, useInterfaces) : undefined; - obj.io_master_key = message.ioMasterKey ? MasterKey.toAmino(message.ioMasterKey, useInterfaces) : undefined; + obj.node_exch_master_key = message.nodeExchMasterKey ? MasterKey.toAmino(message.nodeExchMasterKey, useInterfaces) : MasterKey.toAmino(MasterKey.fromPartial({})); + obj.io_master_key = message.ioMasterKey ? MasterKey.toAmino(message.ioMasterKey, useInterfaces) : MasterKey.toAmino(MasterKey.fromPartial({})); return obj; }, fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { diff --git a/packages/types/protobuf/codegen/secret/registration/v1beta1/msg.ts b/packages/types/protobuf/codegen/secret/registration/v1beta1/msg.ts index c8f3595b62..25dcc25c75 100644 --- a/packages/types/protobuf/codegen/secret/registration/v1beta1/msg.ts +++ b/packages/types/protobuf/codegen/secret/registration/v1beta1/msg.ts @@ -10,7 +10,7 @@ export interface RaAuthenticateProtoMsg { } export interface RaAuthenticateAmino { sender?: string; - certificate?: string; + certificate: string; } export interface RaAuthenticateAminoMsg { type: "/secret.registration.v1beta1.RaAuthenticate"; @@ -45,7 +45,7 @@ export interface KeyProtoMsg { value: Uint8Array; } export interface KeyAmino { - key?: string; + key: string; } export interface KeyAminoMsg { type: "/secret.registration.v1beta1.Key"; @@ -110,7 +110,7 @@ export const RaAuthenticate = { toAmino(message: RaAuthenticate, useInterfaces: boolean = false): RaAuthenticateAmino { const obj: any = {}; obj.sender = message.sender ? base64FromBytes(message.sender) : undefined; - obj.certificate = message.certificate ? base64FromBytes(message.certificate) : undefined; + obj.certificate = message.certificate ? base64FromBytes(message.certificate) : ""; return obj; }, fromAminoMsg(object: RaAuthenticateAminoMsg): RaAuthenticate { @@ -236,7 +236,7 @@ export const Key = { }, toAmino(message: Key, useInterfaces: boolean = false): KeyAmino { const obj: any = {}; - obj.key = message.key ? base64FromBytes(message.key) : undefined; + obj.key = message.key ? base64FromBytes(message.key) : ""; return obj; }, fromAminoMsg(object: KeyAminoMsg): Key { diff --git a/packages/types/protobuf/codegen/secret/registration/v1beta1/types.ts b/packages/types/protobuf/codegen/secret/registration/v1beta1/types.ts index 993339f68d..802c37789e 100644 --- a/packages/types/protobuf/codegen/secret/registration/v1beta1/types.ts +++ b/packages/types/protobuf/codegen/secret/registration/v1beta1/types.ts @@ -10,9 +10,9 @@ export interface SeedConfigProtoMsg { value: Uint8Array; } export interface SeedConfigAmino { - master_key?: string; - encrypted_key?: string; - version?: number; + master_key: string; + encrypted_key: string; + version: number; } export interface SeedConfigAminoMsg { type: "/secret.registration.v1beta1.SeedConfig"; @@ -32,8 +32,8 @@ export interface LegacySeedConfigProtoMsg { value: Uint8Array; } export interface LegacySeedConfigAmino { - master_cert?: string; - encrypted_key?: string; + master_cert: string; + encrypted_key: string; } export interface LegacySeedConfigAminoMsg { type: "/secret.registration.v1beta1.LegacySeedConfig"; @@ -129,9 +129,9 @@ export const SeedConfig = { }, toAmino(message: SeedConfig, useInterfaces: boolean = false): SeedConfigAmino { const obj: any = {}; - obj.master_key = message.masterKey; - obj.encrypted_key = message.encryptedKey; - obj.version = message.version; + obj.master_key = message.masterKey ?? ""; + obj.encrypted_key = message.encryptedKey ?? ""; + obj.version = message.version ?? 0; return obj; }, fromAminoMsg(object: SeedConfigAminoMsg): SeedConfig { @@ -205,8 +205,8 @@ export const LegacySeedConfig = { }, toAmino(message: LegacySeedConfig, useInterfaces: boolean = false): LegacySeedConfigAmino { const obj: any = {}; - obj.master_cert = message.masterCert; - obj.encrypted_key = message.encryptedKey; + obj.master_cert = message.masterCert ?? ""; + obj.encrypted_key = message.encryptedKey ?? ""; return obj; }, fromAminoMsg(object: LegacySeedConfigAminoMsg): LegacySeedConfig { diff --git a/packages/types/protobuf/codegen/tariff/params.ts b/packages/types/protobuf/codegen/tariff/params.ts index 648ca8276c..7b32b8518e 100644 --- a/packages/types/protobuf/codegen/tariff/params.ts +++ b/packages/types/protobuf/codegen/tariff/params.ts @@ -151,15 +151,15 @@ export const Params = { }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.share = message.share; + obj.share = message.share === "" ? undefined : message.share; if (message.distributionEntities) { obj.distribution_entities = message.distributionEntities.map(e => e ? DistributionEntity.toAmino(e, useInterfaces) : undefined); } else { - obj.distribution_entities = []; + obj.distribution_entities = message.distributionEntities; } - obj.transfer_fee_bps = message.transferFeeBps; - obj.transfer_fee_max = message.transferFeeMax; - obj.transfer_fee_denom = message.transferFeeDenom; + obj.transfer_fee_bps = message.transferFeeBps === "" ? undefined : message.transferFeeBps; + obj.transfer_fee_max = message.transferFeeMax === "" ? undefined : message.transferFeeMax; + obj.transfer_fee_denom = message.transferFeeDenom === "" ? undefined : message.transferFeeDenom; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { @@ -233,8 +233,8 @@ export const DistributionEntity = { }, toAmino(message: DistributionEntity, useInterfaces: boolean = false): DistributionEntityAmino { const obj: any = {}; - obj.address = message.address; - obj.share = message.share; + obj.address = message.address === "" ? undefined : message.address; + obj.share = message.share === "" ? undefined : message.share; return obj; }, fromAminoMsg(object: DistributionEntityAminoMsg): DistributionEntity { diff --git a/packages/types/protobuf/codegen/tendermint/abci/types.ts b/packages/types/protobuf/codegen/tendermint/abci/types.ts index b9877f8c73..7d28d23b3a 100644 --- a/packages/types/protobuf/codegen/tendermint/abci/types.ts +++ b/packages/types/protobuf/codegen/tendermint/abci/types.ts @@ -2,7 +2,7 @@ import { Timestamp } from "../../google/protobuf/timestamp"; import { ConsensusParams, ConsensusParamsAmino, ConsensusParamsSDKType } from "../types/params"; import { ProofOps, ProofOpsAmino, ProofOpsSDKType } from "../crypto/proof"; import { PublicKey, PublicKeyAmino, PublicKeySDKType } from "../crypto/keys"; -import { BlockIDFlag, blockIDFlagFromJSON } from "../types/validator"; +import { BlockIDFlag } from "../types/validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes } from "../../helpers"; export enum CheckTxType { @@ -1462,12 +1462,9 @@ export interface TxResultSDKType { result: ExecTxResultSDKType | undefined; } export interface Validator { - /** - * The first 20 bytes of SHA256(public key) - * PubKey pub_key = 2 [(gogoproto.nullable)=false]; - */ + /** The first 20 bytes of SHA256(public key) */ address: Uint8Array; - /** The voting power */ + /** PubKey pub_key = 2 [(gogoproto.nullable)=false]; */ power: bigint; } export interface ValidatorProtoMsg { @@ -1475,12 +1472,9 @@ export interface ValidatorProtoMsg { value: Uint8Array; } export interface ValidatorAmino { - /** - * The first 20 bytes of SHA256(public key) - * PubKey pub_key = 2 [(gogoproto.nullable)=false]; - */ + /** The first 20 bytes of SHA256(public key) */ address?: string; - /** The voting power */ + /** PubKey pub_key = 2 [(gogoproto.nullable)=false]; */ power?: string; } export interface ValidatorAminoMsg { @@ -1936,7 +1930,7 @@ export const RequestEcho = { }, toAmino(message: RequestEcho, useInterfaces: boolean = false): RequestEchoAmino { const obj: any = {}; - obj.message = message.message; + obj.message = message.message === "" ? undefined : message.message; return obj; }, fromAminoMsg(object: RequestEchoAminoMsg): RequestEcho { @@ -2082,10 +2076,10 @@ export const RequestInfo = { }, toAmino(message: RequestInfo, useInterfaces: boolean = false): RequestInfoAmino { const obj: any = {}; - obj.version = message.version; - obj.block_version = message.blockVersion ? message.blockVersion.toString() : undefined; - obj.p2p_version = message.p2pVersion ? message.p2pVersion.toString() : undefined; - obj.abci_version = message.abciVersion; + obj.version = message.version === "" ? undefined : message.version; + obj.block_version = message.blockVersion !== BigInt(0) ? message.blockVersion.toString() : undefined; + obj.p2p_version = message.p2pVersion !== BigInt(0) ? message.p2pVersion.toString() : undefined; + obj.abci_version = message.abciVersion === "" ? undefined : message.abciVersion; return obj; }, fromAminoMsg(object: RequestInfoAminoMsg): RequestInfo { @@ -2202,15 +2196,15 @@ export const RequestInitChain = { toAmino(message: RequestInitChain, useInterfaces: boolean = false): RequestInitChainAmino { const obj: any = {}; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : undefined; - obj.chain_id = message.chainId; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; obj.consensus_params = message.consensusParams ? ConsensusParams.toAmino(message.consensusParams, useInterfaces) : undefined; if (message.validators) { obj.validators = message.validators.map(e => e ? ValidatorUpdate.toAmino(e, useInterfaces) : undefined); } else { - obj.validators = []; + obj.validators = message.validators; } obj.app_state_bytes = message.appStateBytes ? base64FromBytes(message.appStateBytes) : undefined; - obj.initial_height = message.initialHeight ? message.initialHeight.toString() : undefined; + obj.initial_height = message.initialHeight !== BigInt(0) ? message.initialHeight.toString() : undefined; return obj; }, fromAminoMsg(object: RequestInitChainAminoMsg): RequestInitChain { @@ -2307,9 +2301,9 @@ export const RequestQuery = { toAmino(message: RequestQuery, useInterfaces: boolean = false): RequestQueryAmino { const obj: any = {}; obj.data = message.data ? base64FromBytes(message.data) : undefined; - obj.path = message.path; - obj.height = message.height ? message.height.toString() : undefined; - obj.prove = message.prove; + obj.path = message.path === "" ? undefined : message.path; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.prove = message.prove === false ? undefined : message.prove; return obj; }, fromAminoMsg(object: RequestQueryAminoMsg): RequestQuery { @@ -2377,14 +2371,14 @@ export const RequestCheckTx = { message.tx = bytesFromBase64(object.tx); } if (object.type !== undefined && object.type !== null) { - message.type = checkTxTypeFromJSON(object.type); + message.type = object.type; } return message; }, toAmino(message: RequestCheckTx, useInterfaces: boolean = false): RequestCheckTxAmino { const obj: any = {}; obj.tx = message.tx ? base64FromBytes(message.tx) : undefined; - obj.type = message.type; + obj.type = message.type === 0 ? undefined : message.type; return obj; }, fromAminoMsg(object: RequestCheckTxAminoMsg): RequestCheckTx { @@ -2644,9 +2638,9 @@ export const RequestLoadSnapshotChunk = { }, toAmino(message: RequestLoadSnapshotChunk, useInterfaces: boolean = false): RequestLoadSnapshotChunkAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.format = message.format; - obj.chunk = message.chunk; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.format = message.format === 0 ? undefined : message.format; + obj.chunk = message.chunk === 0 ? undefined : message.chunk; return obj; }, fromAminoMsg(object: RequestLoadSnapshotChunkAminoMsg): RequestLoadSnapshotChunk { @@ -2731,9 +2725,9 @@ export const RequestApplySnapshotChunk = { }, toAmino(message: RequestApplySnapshotChunk, useInterfaces: boolean = false): RequestApplySnapshotChunkAmino { const obj: any = {}; - obj.index = message.index; + obj.index = message.index === 0 ? undefined : message.index; obj.chunk = message.chunk ? base64FromBytes(message.chunk) : undefined; - obj.sender = message.sender; + obj.sender = message.sender === "" ? undefined : message.sender; return obj; }, fromAminoMsg(object: RequestApplySnapshotChunkAminoMsg): RequestApplySnapshotChunk { @@ -2869,19 +2863,19 @@ export const RequestPrepareProposal = { }, toAmino(message: RequestPrepareProposal, useInterfaces: boolean = false): RequestPrepareProposalAmino { const obj: any = {}; - obj.max_tx_bytes = message.maxTxBytes ? message.maxTxBytes.toString() : undefined; + obj.max_tx_bytes = message.maxTxBytes !== BigInt(0) ? message.maxTxBytes.toString() : undefined; if (message.txs) { obj.txs = message.txs.map(e => base64FromBytes(e)); } else { - obj.txs = []; + obj.txs = message.txs; } obj.local_last_commit = message.localLastCommit ? ExtendedCommitInfo.toAmino(message.localLastCommit, useInterfaces) : undefined; if (message.misbehavior) { obj.misbehavior = message.misbehavior.map(e => e ? Misbehavior.toAmino(e, useInterfaces) : undefined); } else { - obj.misbehavior = []; + obj.misbehavior = message.misbehavior; } - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : undefined; obj.next_validators_hash = message.nextValidatorsHash ? base64FromBytes(message.nextValidatorsHash) : undefined; obj.proposer_address = message.proposerAddress ? base64FromBytes(message.proposerAddress) : undefined; @@ -3023,16 +3017,16 @@ export const RequestProcessProposal = { if (message.txs) { obj.txs = message.txs.map(e => base64FromBytes(e)); } else { - obj.txs = []; + obj.txs = message.txs; } obj.proposed_last_commit = message.proposedLastCommit ? CommitInfo.toAmino(message.proposedLastCommit, useInterfaces) : undefined; if (message.misbehavior) { obj.misbehavior = message.misbehavior.map(e => e ? Misbehavior.toAmino(e, useInterfaces) : undefined); } else { - obj.misbehavior = []; + obj.misbehavior = message.misbehavior; } obj.hash = message.hash ? base64FromBytes(message.hash) : undefined; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : undefined; obj.next_validators_hash = message.nextValidatorsHash ? base64FromBytes(message.nextValidatorsHash) : undefined; obj.proposer_address = message.proposerAddress ? base64FromBytes(message.proposerAddress) : undefined; @@ -3110,7 +3104,7 @@ export const RequestExtendVote = { toAmino(message: RequestExtendVote, useInterfaces: boolean = false): RequestExtendVoteAmino { const obj: any = {}; obj.hash = message.hash ? base64FromBytes(message.hash) : undefined; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; return obj; }, fromAminoMsg(object: RequestExtendVoteAminoMsg): RequestExtendVote { @@ -3208,7 +3202,7 @@ export const RequestVerifyVoteExtension = { const obj: any = {}; obj.hash = message.hash ? base64FromBytes(message.hash) : undefined; obj.validator_address = message.validatorAddress ? base64FromBytes(message.validatorAddress) : undefined; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.vote_extension = message.voteExtension ? base64FromBytes(message.voteExtension) : undefined; return obj; }, @@ -3348,16 +3342,16 @@ export const RequestFinalizeBlock = { if (message.txs) { obj.txs = message.txs.map(e => base64FromBytes(e)); } else { - obj.txs = []; + obj.txs = message.txs; } obj.decided_last_commit = message.decidedLastCommit ? CommitInfo.toAmino(message.decidedLastCommit, useInterfaces) : undefined; if (message.misbehavior) { obj.misbehavior = message.misbehavior.map(e => e ? Misbehavior.toAmino(e, useInterfaces) : undefined); } else { - obj.misbehavior = []; + obj.misbehavior = message.misbehavior; } obj.hash = message.hash ? base64FromBytes(message.hash) : undefined; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : undefined; obj.next_validators_hash = message.nextValidatorsHash ? base64FromBytes(message.nextValidatorsHash) : undefined; obj.proposer_address = message.proposerAddress ? base64FromBytes(message.proposerAddress) : undefined; @@ -3678,7 +3672,7 @@ export const ResponseException = { }, toAmino(message: ResponseException, useInterfaces: boolean = false): ResponseExceptionAmino { const obj: any = {}; - obj.error = message.error; + obj.error = message.error === "" ? undefined : message.error; return obj; }, fromAminoMsg(object: ResponseExceptionAminoMsg): ResponseException { @@ -3741,7 +3735,7 @@ export const ResponseEcho = { }, toAmino(message: ResponseEcho, useInterfaces: boolean = false): ResponseEchoAmino { const obj: any = {}; - obj.message = message.message; + obj.message = message.message === "" ? undefined : message.message; return obj; }, fromAminoMsg(object: ResponseEchoAminoMsg): ResponseEcho { @@ -3898,10 +3892,10 @@ export const ResponseInfo = { }, toAmino(message: ResponseInfo, useInterfaces: boolean = false): ResponseInfoAmino { const obj: any = {}; - obj.data = message.data; - obj.version = message.version; - obj.app_version = message.appVersion ? message.appVersion.toString() : undefined; - obj.last_block_height = message.lastBlockHeight ? message.lastBlockHeight.toString() : undefined; + obj.data = message.data === "" ? undefined : message.data; + obj.version = message.version === "" ? undefined : message.version; + obj.app_version = message.appVersion !== BigInt(0) ? message.appVersion.toString() : undefined; + obj.last_block_height = message.lastBlockHeight !== BigInt(0) ? message.lastBlockHeight.toString() : undefined; obj.last_block_app_hash = message.lastBlockAppHash ? base64FromBytes(message.lastBlockAppHash) : undefined; return obj; }, @@ -3989,7 +3983,7 @@ export const ResponseInitChain = { if (message.validators) { obj.validators = message.validators.map(e => e ? ValidatorUpdate.toAmino(e, useInterfaces) : undefined); } else { - obj.validators = []; + obj.validators = message.validators; } obj.app_hash = message.appHash ? base64FromBytes(message.appHash) : undefined; return obj; @@ -4142,15 +4136,15 @@ export const ResponseQuery = { }, toAmino(message: ResponseQuery, useInterfaces: boolean = false): ResponseQueryAmino { const obj: any = {}; - obj.code = message.code; - obj.log = message.log; - obj.info = message.info; - obj.index = message.index ? message.index.toString() : undefined; + obj.code = message.code === 0 ? undefined : message.code; + obj.log = message.log === "" ? undefined : message.log; + obj.info = message.info === "" ? undefined : message.info; + obj.index = message.index !== BigInt(0) ? message.index.toString() : undefined; obj.key = message.key ? base64FromBytes(message.key) : undefined; obj.value = message.value ? base64FromBytes(message.value) : undefined; obj.proof_ops = message.proofOps ? ProofOps.toAmino(message.proofOps, useInterfaces) : undefined; - obj.height = message.height ? message.height.toString() : undefined; - obj.codespace = message.codespace; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.codespace = message.codespace === "" ? undefined : message.codespace; return obj; }, fromAminoMsg(object: ResponseQueryAminoMsg): ResponseQuery { @@ -4288,18 +4282,18 @@ export const ResponseCheckTx = { }, toAmino(message: ResponseCheckTx, useInterfaces: boolean = false): ResponseCheckTxAmino { const obj: any = {}; - obj.code = message.code; + obj.code = message.code === 0 ? undefined : message.code; obj.data = message.data ? base64FromBytes(message.data) : undefined; - obj.log = message.log; - obj.info = message.info; - obj.gas_wanted = message.gasWanted ? message.gasWanted.toString() : undefined; - obj.gas_used = message.gasUsed ? message.gasUsed.toString() : undefined; + obj.log = message.log === "" ? undefined : message.log; + obj.info = message.info === "" ? undefined : message.info; + obj.gas_wanted = message.gasWanted !== BigInt(0) ? message.gasWanted.toString() : undefined; + obj.gas_used = message.gasUsed !== BigInt(0) ? message.gasUsed.toString() : undefined; if (message.events) { obj.events = message.events.map(e => e ? Event.toAmino(e, useInterfaces) : undefined); } else { - obj.events = []; + obj.events = message.events; } - obj.codespace = message.codespace; + obj.codespace = message.codespace === "" ? undefined : message.codespace; return obj; }, fromAminoMsg(object: ResponseCheckTxAminoMsg): ResponseCheckTx { @@ -4362,7 +4356,7 @@ export const ResponseCommit = { }, toAmino(message: ResponseCommit, useInterfaces: boolean = false): ResponseCommitAmino { const obj: any = {}; - obj.retain_height = message.retainHeight ? message.retainHeight.toString() : undefined; + obj.retain_height = message.retainHeight !== BigInt(0) ? message.retainHeight.toString() : undefined; return obj; }, fromAminoMsg(object: ResponseCommitAminoMsg): ResponseCommit { @@ -4426,7 +4420,7 @@ export const ResponseListSnapshots = { if (message.snapshots) { obj.snapshots = message.snapshots.map(e => e ? Snapshot.toAmino(e, useInterfaces) : undefined); } else { - obj.snapshots = []; + obj.snapshots = message.snapshots; } return obj; }, @@ -4484,13 +4478,13 @@ export const ResponseOfferSnapshot = { fromAmino(object: ResponseOfferSnapshotAmino): ResponseOfferSnapshot { const message = createBaseResponseOfferSnapshot(); if (object.result !== undefined && object.result !== null) { - message.result = responseOfferSnapshot_ResultFromJSON(object.result); + message.result = object.result; } return message; }, toAmino(message: ResponseOfferSnapshot, useInterfaces: boolean = false): ResponseOfferSnapshotAmino { const obj: any = {}; - obj.result = message.result; + obj.result = message.result === 0 ? undefined : message.result; return obj; }, fromAminoMsg(object: ResponseOfferSnapshotAminoMsg): ResponseOfferSnapshot { @@ -4635,7 +4629,7 @@ export const ResponseApplySnapshotChunk = { fromAmino(object: ResponseApplySnapshotChunkAmino): ResponseApplySnapshotChunk { const message = createBaseResponseApplySnapshotChunk(); if (object.result !== undefined && object.result !== null) { - message.result = responseApplySnapshotChunk_ResultFromJSON(object.result); + message.result = object.result; } message.refetchChunks = object.refetch_chunks?.map(e => e) || []; message.rejectSenders = object.reject_senders?.map(e => e) || []; @@ -4643,16 +4637,16 @@ export const ResponseApplySnapshotChunk = { }, toAmino(message: ResponseApplySnapshotChunk, useInterfaces: boolean = false): ResponseApplySnapshotChunkAmino { const obj: any = {}; - obj.result = message.result; + obj.result = message.result === 0 ? undefined : message.result; if (message.refetchChunks) { obj.refetch_chunks = message.refetchChunks.map(e => e); } else { - obj.refetch_chunks = []; + obj.refetch_chunks = message.refetchChunks; } if (message.rejectSenders) { obj.reject_senders = message.rejectSenders.map(e => e); } else { - obj.reject_senders = []; + obj.reject_senders = message.rejectSenders; } return obj; }, @@ -4717,7 +4711,7 @@ export const ResponsePrepareProposal = { if (message.txs) { obj.txs = message.txs.map(e => base64FromBytes(e)); } else { - obj.txs = []; + obj.txs = message.txs; } return obj; }, @@ -4775,13 +4769,13 @@ export const ResponseProcessProposal = { fromAmino(object: ResponseProcessProposalAmino): ResponseProcessProposal { const message = createBaseResponseProcessProposal(); if (object.status !== undefined && object.status !== null) { - message.status = responseProcessProposal_ProposalStatusFromJSON(object.status); + message.status = object.status; } return message; }, toAmino(message: ResponseProcessProposal, useInterfaces: boolean = false): ResponseProcessProposalAmino { const obj: any = {}; - obj.status = message.status; + obj.status = message.status === 0 ? undefined : message.status; return obj; }, fromAminoMsg(object: ResponseProcessProposalAminoMsg): ResponseProcessProposal { @@ -4901,13 +4895,13 @@ export const ResponseVerifyVoteExtension = { fromAmino(object: ResponseVerifyVoteExtensionAmino): ResponseVerifyVoteExtension { const message = createBaseResponseVerifyVoteExtension(); if (object.status !== undefined && object.status !== null) { - message.status = responseVerifyVoteExtension_VerifyStatusFromJSON(object.status); + message.status = object.status; } return message; }, toAmino(message: ResponseVerifyVoteExtension, useInterfaces: boolean = false): ResponseVerifyVoteExtensionAmino { const obj: any = {}; - obj.status = message.status; + obj.status = message.status === 0 ? undefined : message.status; return obj; }, fromAminoMsg(object: ResponseVerifyVoteExtensionAminoMsg): ResponseVerifyVoteExtension { @@ -5011,17 +5005,17 @@ export const ResponseFinalizeBlock = { if (message.events) { obj.events = message.events.map(e => e ? Event.toAmino(e, useInterfaces) : undefined); } else { - obj.events = []; + obj.events = message.events; } if (message.txResults) { obj.tx_results = message.txResults.map(e => e ? ExecTxResult.toAmino(e, useInterfaces) : undefined); } else { - obj.tx_results = []; + obj.tx_results = message.txResults; } if (message.validatorUpdates) { obj.validator_updates = message.validatorUpdates.map(e => e ? ValidatorUpdate.toAmino(e, useInterfaces) : undefined); } else { - obj.validator_updates = []; + obj.validator_updates = message.validatorUpdates; } obj.consensus_param_updates = message.consensusParamUpdates ? ConsensusParams.toAmino(message.consensusParamUpdates, useInterfaces) : undefined; obj.app_hash = message.appHash ? base64FromBytes(message.appHash) : undefined; @@ -5096,11 +5090,11 @@ export const CommitInfo = { }, toAmino(message: CommitInfo, useInterfaces: boolean = false): CommitInfoAmino { const obj: any = {}; - obj.round = message.round; + obj.round = message.round === 0 ? undefined : message.round; if (message.votes) { obj.votes = message.votes.map(e => e ? VoteInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.votes = []; + obj.votes = message.votes; } return obj; }, @@ -5173,11 +5167,11 @@ export const ExtendedCommitInfo = { }, toAmino(message: ExtendedCommitInfo, useInterfaces: boolean = false): ExtendedCommitInfoAmino { const obj: any = {}; - obj.round = message.round; + obj.round = message.round === 0 ? undefined : message.round; if (message.votes) { obj.votes = message.votes.map(e => e ? ExtendedVoteInfo.toAmino(e, useInterfaces) : undefined); } else { - obj.votes = []; + obj.votes = message.votes; } return obj; }, @@ -5250,11 +5244,11 @@ export const Event = { }, toAmino(message: Event, useInterfaces: boolean = false): EventAmino { const obj: any = {}; - obj.type = message.type; + obj.type = message.type === "" ? undefined : message.type; if (message.attributes) { obj.attributes = message.attributes.map(e => e ? EventAttribute.toAmino(e, useInterfaces) : undefined); } else { - obj.attributes = []; + obj.attributes = message.attributes; } return obj; }, @@ -5340,9 +5334,9 @@ export const EventAttribute = { }, toAmino(message: EventAttribute, useInterfaces: boolean = false): EventAttributeAmino { const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - obj.index = message.index; + obj.key = message.key === "" ? undefined : message.key; + obj.value = message.value === "" ? undefined : message.value; + obj.index = message.index === false ? undefined : message.index; return obj; }, fromAminoMsg(object: EventAttributeAminoMsg): EventAttribute { @@ -5480,18 +5474,18 @@ export const ExecTxResult = { }, toAmino(message: ExecTxResult, useInterfaces: boolean = false): ExecTxResultAmino { const obj: any = {}; - obj.code = message.code; + obj.code = message.code === 0 ? undefined : message.code; obj.data = message.data ? base64FromBytes(message.data) : undefined; - obj.log = message.log; - obj.info = message.info; - obj.gas_wanted = message.gasWanted ? message.gasWanted.toString() : undefined; - obj.gas_used = message.gasUsed ? message.gasUsed.toString() : undefined; + obj.log = message.log === "" ? undefined : message.log; + obj.info = message.info === "" ? undefined : message.info; + obj.gas_wanted = message.gasWanted !== BigInt(0) ? message.gasWanted.toString() : undefined; + obj.gas_used = message.gasUsed !== BigInt(0) ? message.gasUsed.toString() : undefined; if (message.events) { obj.events = message.events.map(e => e ? Event.toAmino(e, useInterfaces) : undefined); } else { - obj.events = []; + obj.events = message.events; } - obj.codespace = message.codespace; + obj.codespace = message.codespace === "" ? undefined : message.codespace; return obj; }, fromAminoMsg(object: ExecTxResultAminoMsg): ExecTxResult { @@ -5587,8 +5581,8 @@ export const TxResult = { }, toAmino(message: TxResult, useInterfaces: boolean = false): TxResultAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.index = message.index; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.index = message.index === 0 ? undefined : message.index; obj.tx = message.tx ? base64FromBytes(message.tx) : undefined; obj.result = message.result ? ExecTxResult.toAmino(message.result, useInterfaces) : undefined; return obj; @@ -5665,7 +5659,7 @@ export const Validator = { toAmino(message: Validator, useInterfaces: boolean = false): ValidatorAmino { const obj: any = {}; obj.address = message.address ? base64FromBytes(message.address) : undefined; - obj.power = message.power ? message.power.toString() : undefined; + obj.power = message.power !== BigInt(0) ? message.power.toString() : undefined; return obj; }, fromAminoMsg(object: ValidatorAminoMsg): Validator { @@ -5740,7 +5734,7 @@ export const ValidatorUpdate = { toAmino(message: ValidatorUpdate, useInterfaces: boolean = false): ValidatorUpdateAmino { const obj: any = {}; obj.pub_key = message.pubKey ? PublicKey.toAmino(message.pubKey, useInterfaces) : undefined; - obj.power = message.power ? message.power.toString() : undefined; + obj.power = message.power !== BigInt(0) ? message.power.toString() : undefined; return obj; }, fromAminoMsg(object: ValidatorUpdateAminoMsg): ValidatorUpdate { @@ -5808,14 +5802,14 @@ export const VoteInfo = { message.validator = Validator.fromAmino(object.validator); } if (object.block_id_flag !== undefined && object.block_id_flag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.block_id_flag); + message.blockIdFlag = object.block_id_flag; } return message; }, toAmino(message: VoteInfo, useInterfaces: boolean = false): VoteInfoAmino { const obj: any = {}; obj.validator = message.validator ? Validator.toAmino(message.validator, useInterfaces) : undefined; - obj.block_id_flag = message.blockIdFlag; + obj.block_id_flag = message.blockIdFlag === 0 ? undefined : message.blockIdFlag; return obj; }, fromAminoMsg(object: VoteInfoAminoMsg): VoteInfo { @@ -5905,7 +5899,7 @@ export const ExtendedVoteInfo = { message.extensionSignature = bytesFromBase64(object.extension_signature); } if (object.block_id_flag !== undefined && object.block_id_flag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.block_id_flag); + message.blockIdFlag = object.block_id_flag; } return message; }, @@ -5914,7 +5908,7 @@ export const ExtendedVoteInfo = { obj.validator = message.validator ? Validator.toAmino(message.validator, useInterfaces) : undefined; obj.vote_extension = message.voteExtension ? base64FromBytes(message.voteExtension) : undefined; obj.extension_signature = message.extensionSignature ? base64FromBytes(message.extensionSignature) : undefined; - obj.block_id_flag = message.blockIdFlag; + obj.block_id_flag = message.blockIdFlag === 0 ? undefined : message.blockIdFlag; return obj; }, fromAminoMsg(object: ExtendedVoteInfoAminoMsg): ExtendedVoteInfo { @@ -6003,7 +5997,7 @@ export const Misbehavior = { fromAmino(object: MisbehaviorAmino): Misbehavior { const message = createBaseMisbehavior(); if (object.type !== undefined && object.type !== null) { - message.type = misbehaviorTypeFromJSON(object.type); + message.type = object.type; } if (object.validator !== undefined && object.validator !== null) { message.validator = Validator.fromAmino(object.validator); @@ -6021,11 +6015,11 @@ export const Misbehavior = { }, toAmino(message: Misbehavior, useInterfaces: boolean = false): MisbehaviorAmino { const obj: any = {}; - obj.type = message.type; + obj.type = message.type === 0 ? undefined : message.type; obj.validator = message.validator ? Validator.toAmino(message.validator, useInterfaces) : undefined; - obj.height = message.height ? message.height.toString() : undefined; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : undefined; - obj.total_voting_power = message.totalVotingPower ? message.totalVotingPower.toString() : undefined; + obj.total_voting_power = message.totalVotingPower !== BigInt(0) ? message.totalVotingPower.toString() : undefined; return obj; }, fromAminoMsg(object: MisbehaviorAminoMsg): Misbehavior { @@ -6132,9 +6126,9 @@ export const Snapshot = { }, toAmino(message: Snapshot, useInterfaces: boolean = false): SnapshotAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.format = message.format; - obj.chunks = message.chunks; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.format = message.format === 0 ? undefined : message.format; + obj.chunks = message.chunks === 0 ? undefined : message.chunks; obj.hash = message.hash ? base64FromBytes(message.hash) : undefined; obj.metadata = message.metadata ? base64FromBytes(message.metadata) : undefined; return obj; diff --git a/packages/types/protobuf/codegen/tendermint/crypto/proof.ts b/packages/types/protobuf/codegen/tendermint/crypto/proof.ts index d9c479e6b7..0956dcb9e1 100644 --- a/packages/types/protobuf/codegen/tendermint/crypto/proof.ts +++ b/packages/types/protobuf/codegen/tendermint/crypto/proof.ts @@ -206,13 +206,13 @@ export const Proof = { }, toAmino(message: Proof, useInterfaces: boolean = false): ProofAmino { const obj: any = {}; - obj.total = message.total ? message.total.toString() : undefined; - obj.index = message.index ? message.index.toString() : undefined; + obj.total = message.total !== BigInt(0) ? message.total.toString() : undefined; + obj.index = message.index !== BigInt(0) ? message.index.toString() : undefined; obj.leaf_hash = message.leafHash ? base64FromBytes(message.leafHash) : undefined; if (message.aunts) { obj.aunts = message.aunts.map(e => base64FromBytes(e)); } else { - obj.aunts = []; + obj.aunts = message.aunts; } return obj; }, @@ -373,9 +373,9 @@ export const DominoOp = { }, toAmino(message: DominoOp, useInterfaces: boolean = false): DominoOpAmino { const obj: any = {}; - obj.key = message.key; - obj.input = message.input; - obj.output = message.output; + obj.key = message.key === "" ? undefined : message.key; + obj.input = message.input === "" ? undefined : message.input; + obj.output = message.output === "" ? undefined : message.output; return obj; }, fromAminoMsg(object: DominoOpAminoMsg): DominoOp { @@ -460,7 +460,7 @@ export const ProofOp = { }, toAmino(message: ProofOp, useInterfaces: boolean = false): ProofOpAmino { const obj: any = {}; - obj.type = message.type; + obj.type = message.type === "" ? undefined : message.type; obj.key = message.key ? base64FromBytes(message.key) : undefined; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; @@ -526,7 +526,7 @@ export const ProofOps = { if (message.ops) { obj.ops = message.ops.map(e => e ? ProofOp.toAmino(e, useInterfaces) : undefined); } else { - obj.ops = []; + obj.ops = message.ops; } return obj; }, diff --git a/packages/types/protobuf/codegen/tendermint/p2p/types.ts b/packages/types/protobuf/codegen/tendermint/p2p/types.ts index ef6d5dac9c..741759cf4e 100644 --- a/packages/types/protobuf/codegen/tendermint/p2p/types.ts +++ b/packages/types/protobuf/codegen/tendermint/p2p/types.ts @@ -170,9 +170,9 @@ export const NetAddress = { }, toAmino(message: NetAddress, useInterfaces: boolean = false): NetAddressAmino { const obj: any = {}; - obj.id = message.id; - obj.ip = message.ip; - obj.port = message.port; + obj.id = message.id === "" ? undefined : message.id; + obj.ip = message.ip === "" ? undefined : message.ip; + obj.port = message.port === 0 ? undefined : message.port; return obj; }, fromAminoMsg(object: NetAddressAminoMsg): NetAddress { @@ -257,9 +257,9 @@ export const ProtocolVersion = { }, toAmino(message: ProtocolVersion, useInterfaces: boolean = false): ProtocolVersionAmino { const obj: any = {}; - obj.p2p = message.p2p ? message.p2p.toString() : undefined; - obj.block = message.block ? message.block.toString() : undefined; - obj.app = message.app ? message.app.toString() : undefined; + obj.p2p = message.p2p !== BigInt(0) ? message.p2p.toString() : undefined; + obj.block = message.block !== BigInt(0) ? message.block.toString() : undefined; + obj.app = message.app !== BigInt(0) ? message.app.toString() : undefined; return obj; }, fromAminoMsg(object: ProtocolVersionAminoMsg): ProtocolVersion { @@ -400,12 +400,12 @@ export const DefaultNodeInfo = { toAmino(message: DefaultNodeInfo, useInterfaces: boolean = false): DefaultNodeInfoAmino { const obj: any = {}; obj.protocol_version = message.protocolVersion ? ProtocolVersion.toAmino(message.protocolVersion, useInterfaces) : undefined; - obj.default_node_id = message.defaultNodeId; - obj.listen_addr = message.listenAddr; - obj.network = message.network; - obj.version = message.version; + obj.default_node_id = message.defaultNodeId === "" ? undefined : message.defaultNodeId; + obj.listen_addr = message.listenAddr === "" ? undefined : message.listenAddr; + obj.network = message.network === "" ? undefined : message.network; + obj.version = message.version === "" ? undefined : message.version; obj.channels = message.channels ? base64FromBytes(message.channels) : undefined; - obj.moniker = message.moniker; + obj.moniker = message.moniker === "" ? undefined : message.moniker; obj.other = message.other ? DefaultNodeInfoOther.toAmino(message.other, useInterfaces) : undefined; return obj; }, @@ -480,8 +480,8 @@ export const DefaultNodeInfoOther = { }, toAmino(message: DefaultNodeInfoOther, useInterfaces: boolean = false): DefaultNodeInfoOtherAmino { const obj: any = {}; - obj.tx_index = message.txIndex; - obj.rpc_address = message.rpcAddress; + obj.tx_index = message.txIndex === "" ? undefined : message.txIndex; + obj.rpc_address = message.rpcAddress === "" ? undefined : message.rpcAddress; return obj; }, fromAminoMsg(object: DefaultNodeInfoOtherAminoMsg): DefaultNodeInfoOther { diff --git a/packages/types/protobuf/codegen/tendermint/types/evidence.ts b/packages/types/protobuf/codegen/tendermint/types/evidence.ts index 71812a8678..8c232c4330 100644 --- a/packages/types/protobuf/codegen/tendermint/types/evidence.ts +++ b/packages/types/protobuf/codegen/tendermint/types/evidence.ts @@ -269,8 +269,8 @@ export const DuplicateVoteEvidence = { const obj: any = {}; obj.vote_a = message.voteA ? Vote.toAmino(message.voteA, useInterfaces) : undefined; obj.vote_b = message.voteB ? Vote.toAmino(message.voteB, useInterfaces) : undefined; - obj.total_voting_power = message.totalVotingPower ? message.totalVotingPower.toString() : undefined; - obj.validator_power = message.validatorPower ? message.validatorPower.toString() : undefined; + obj.total_voting_power = message.totalVotingPower !== BigInt(0) ? message.totalVotingPower.toString() : undefined; + obj.validator_power = message.validatorPower !== BigInt(0) ? message.validatorPower.toString() : undefined; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; return obj; }, @@ -377,13 +377,13 @@ export const LightClientAttackEvidence = { toAmino(message: LightClientAttackEvidence, useInterfaces: boolean = false): LightClientAttackEvidenceAmino { const obj: any = {}; obj.conflicting_block = message.conflictingBlock ? LightBlock.toAmino(message.conflictingBlock, useInterfaces) : undefined; - obj.common_height = message.commonHeight ? message.commonHeight.toString() : undefined; + obj.common_height = message.commonHeight !== BigInt(0) ? message.commonHeight.toString() : undefined; if (message.byzantineValidators) { obj.byzantine_validators = message.byzantineValidators.map(e => e ? Validator.toAmino(e, useInterfaces) : undefined); } else { - obj.byzantine_validators = []; + obj.byzantine_validators = message.byzantineValidators; } - obj.total_voting_power = message.totalVotingPower ? message.totalVotingPower.toString() : undefined; + obj.total_voting_power = message.totalVotingPower !== BigInt(0) ? message.totalVotingPower.toString() : undefined; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; return obj; }, @@ -448,7 +448,7 @@ export const EvidenceList = { if (message.evidence) { obj.evidence = message.evidence.map(e => e ? Evidence.toAmino(e, useInterfaces) : undefined); } else { - obj.evidence = []; + obj.evidence = message.evidence; } return obj; }, diff --git a/packages/types/protobuf/codegen/tendermint/types/params.ts b/packages/types/protobuf/codegen/tendermint/types/params.ts index e6cc6511f4..6f9f39c53b 100644 --- a/packages/types/protobuf/codegen/tendermint/types/params.ts +++ b/packages/types/protobuf/codegen/tendermint/types/params.ts @@ -434,8 +434,8 @@ export const BlockParams = { }, toAmino(message: BlockParams, useInterfaces: boolean = false): BlockParamsAmino { const obj: any = {}; - obj.max_bytes = message.maxBytes ? message.maxBytes.toString() : undefined; - obj.max_gas = message.maxGas ? message.maxGas.toString() : undefined; + obj.max_bytes = message.maxBytes !== BigInt(0) ? message.maxBytes.toString() : undefined; + obj.max_gas = message.maxGas !== BigInt(0) ? message.maxGas.toString() : undefined; return obj; }, fromAminoMsg(object: BlockParamsAminoMsg): BlockParams { @@ -520,9 +520,9 @@ export const EvidenceParams = { }, toAmino(message: EvidenceParams, useInterfaces: boolean = false): EvidenceParamsAmino { const obj: any = {}; - obj.max_age_num_blocks = message.maxAgeNumBlocks ? message.maxAgeNumBlocks.toString() : undefined; + obj.max_age_num_blocks = message.maxAgeNumBlocks !== BigInt(0) ? message.maxAgeNumBlocks.toString() : undefined; obj.max_age_duration = message.maxAgeDuration ? Duration.toAmino(message.maxAgeDuration, useInterfaces) : undefined; - obj.max_bytes = message.maxBytes ? message.maxBytes.toString() : undefined; + obj.max_bytes = message.maxBytes !== BigInt(0) ? message.maxBytes.toString() : undefined; return obj; }, fromAminoMsg(object: EvidenceParamsAminoMsg): EvidenceParams { @@ -586,7 +586,7 @@ export const ValidatorParams = { if (message.pubKeyTypes) { obj.pub_key_types = message.pubKeyTypes.map(e => e); } else { - obj.pub_key_types = []; + obj.pub_key_types = message.pubKeyTypes; } return obj; }, @@ -650,7 +650,7 @@ export const VersionParams = { }, toAmino(message: VersionParams, useInterfaces: boolean = false): VersionParamsAmino { const obj: any = {}; - obj.app = message.app ? message.app.toString() : undefined; + obj.app = message.app !== BigInt(0) ? message.app.toString() : undefined; return obj; }, fromAminoMsg(object: VersionParamsAminoMsg): VersionParams { @@ -724,8 +724,8 @@ export const HashedParams = { }, toAmino(message: HashedParams, useInterfaces: boolean = false): HashedParamsAmino { const obj: any = {}; - obj.block_max_bytes = message.blockMaxBytes ? message.blockMaxBytes.toString() : undefined; - obj.block_max_gas = message.blockMaxGas ? message.blockMaxGas.toString() : undefined; + obj.block_max_bytes = message.blockMaxBytes !== BigInt(0) ? message.blockMaxBytes.toString() : undefined; + obj.block_max_gas = message.blockMaxGas !== BigInt(0) ? message.blockMaxGas.toString() : undefined; return obj; }, fromAminoMsg(object: HashedParamsAminoMsg): HashedParams { @@ -788,7 +788,7 @@ export const ABCIParams = { }, toAmino(message: ABCIParams, useInterfaces: boolean = false): ABCIParamsAmino { const obj: any = {}; - obj.vote_extensions_enable_height = message.voteExtensionsEnableHeight ? message.voteExtensionsEnableHeight.toString() : undefined; + obj.vote_extensions_enable_height = message.voteExtensionsEnableHeight !== BigInt(0) ? message.voteExtensionsEnableHeight.toString() : undefined; return obj; }, fromAminoMsg(object: ABCIParamsAminoMsg): ABCIParams { diff --git a/packages/types/protobuf/codegen/tendermint/types/types.ts b/packages/types/protobuf/codegen/tendermint/types/types.ts index 85624e0214..02291bf2e5 100644 --- a/packages/types/protobuf/codegen/tendermint/types/types.ts +++ b/packages/types/protobuf/codegen/tendermint/types/types.ts @@ -1,7 +1,7 @@ import { Proof, ProofAmino, ProofSDKType } from "../crypto/proof"; import { Consensus, ConsensusAmino, ConsensusSDKType } from "../version/types"; import { Timestamp } from "../../google/protobuf/timestamp"; -import { BlockIDFlag, ValidatorSet, ValidatorSetAmino, ValidatorSetSDKType, blockIDFlagFromJSON } from "./validator"; +import { BlockIDFlag, ValidatorSet, ValidatorSetAmino, ValidatorSetSDKType } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { bytesFromBase64, base64FromBytes, toTimestamp, fromTimestamp } from "../../helpers"; /** SignedMsgType is a type of signed message in the consensus. */ @@ -131,6 +131,7 @@ export interface Header { lastBlockId: BlockID | undefined; /** hashes of block data */ lastCommitHash: Uint8Array; + /** transactions */ dataHash: Uint8Array; /** hashes from the app output from the prev block */ validatorsHash: Uint8Array; @@ -140,6 +141,7 @@ export interface Header { consensusHash: Uint8Array; /** state after txs from the previous block */ appHash: Uint8Array; + /** root hash of all results from the txs from the previous block */ lastResultsHash: Uint8Array; /** consensus info */ evidenceHash: Uint8Array; @@ -161,6 +163,7 @@ export interface HeaderAmino { last_block_id?: BlockIDAmino | undefined; /** hashes of block data */ last_commit_hash?: string; + /** transactions */ data_hash?: string; /** hashes from the app output from the prev block */ validators_hash?: string; @@ -170,6 +173,7 @@ export interface HeaderAmino { consensus_hash?: string; /** state after txs from the previous block */ app_hash?: string; + /** root hash of all results from the txs from the previous block */ last_results_hash?: string; /** consensus info */ evidence_hash?: string; @@ -626,7 +630,7 @@ export const PartSetHeader = { }, toAmino(message: PartSetHeader, useInterfaces: boolean = false): PartSetHeaderAmino { const obj: any = {}; - obj.total = message.total; + obj.total = message.total === 0 ? undefined : message.total; obj.hash = message.hash ? base64FromBytes(message.hash) : undefined; return obj; }, @@ -712,7 +716,7 @@ export const Part = { }, toAmino(message: Part, useInterfaces: boolean = false): PartAmino { const obj: any = {}; - obj.index = message.index; + obj.index = message.index === 0 ? undefined : message.index; obj.bytes = message.bytes ? base64FromBytes(message.bytes) : undefined; obj.proof = message.proof ? Proof.toAmino(message.proof, useInterfaces) : undefined; return obj; @@ -996,8 +1000,8 @@ export const Header = { toAmino(message: Header, useInterfaces: boolean = false): HeaderAmino { const obj: any = {}; obj.version = message.version ? Consensus.toAmino(message.version, useInterfaces) : undefined; - obj.chain_id = message.chainId; - obj.height = message.height ? message.height.toString() : undefined; + obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : undefined; obj.last_block_id = message.lastBlockId ? BlockID.toAmino(message.lastBlockId, useInterfaces) : undefined; obj.last_commit_hash = message.lastCommitHash ? base64FromBytes(message.lastCommitHash) : undefined; @@ -1072,7 +1076,7 @@ export const Data = { if (message.txs) { obj.txs = message.txs.map(e => base64FromBytes(e)); } else { - obj.txs = []; + obj.txs = message.txs; } return obj; }, @@ -1202,7 +1206,7 @@ export const Vote = { fromAmino(object: VoteAmino): Vote { const message = createBaseVote(); if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); + message.type = object.type; } if (object.height !== undefined && object.height !== null) { message.height = BigInt(object.height); @@ -1235,13 +1239,13 @@ export const Vote = { }, toAmino(message: Vote, useInterfaces: boolean = false): VoteAmino { const obj: any = {}; - obj.type = message.type; - obj.height = message.height ? message.height.toString() : undefined; - obj.round = message.round; + obj.type = message.type === 0 ? undefined : message.type; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.round = message.round === 0 ? undefined : message.round; obj.block_id = message.blockId ? BlockID.toAmino(message.blockId, useInterfaces) : undefined; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; obj.validator_address = message.validatorAddress ? base64FromBytes(message.validatorAddress) : undefined; - obj.validator_index = message.validatorIndex; + obj.validator_index = message.validatorIndex === 0 ? undefined : message.validatorIndex; obj.signature = message.signature ? base64FromBytes(message.signature) : undefined; obj.extension = message.extension ? base64FromBytes(message.extension) : undefined; obj.extension_signature = message.extensionSignature ? base64FromBytes(message.extensionSignature) : undefined; @@ -1338,13 +1342,13 @@ export const Commit = { }, toAmino(message: Commit, useInterfaces: boolean = false): CommitAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.round = message.round; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.round = message.round === 0 ? undefined : message.round; obj.block_id = message.blockId ? BlockID.toAmino(message.blockId, useInterfaces) : undefined; if (message.signatures) { obj.signatures = message.signatures.map(e => e ? CommitSig.toAmino(e, useInterfaces) : undefined); } else { - obj.signatures = []; + obj.signatures = message.signatures; } return obj; }, @@ -1426,7 +1430,7 @@ export const CommitSig = { fromAmino(object: CommitSigAmino): CommitSig { const message = createBaseCommitSig(); if (object.block_id_flag !== undefined && object.block_id_flag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.block_id_flag); + message.blockIdFlag = object.block_id_flag; } if (object.validator_address !== undefined && object.validator_address !== null) { message.validatorAddress = bytesFromBase64(object.validator_address); @@ -1441,7 +1445,7 @@ export const CommitSig = { }, toAmino(message: CommitSig, useInterfaces: boolean = false): CommitSigAmino { const obj: any = {}; - obj.block_id_flag = message.blockIdFlag; + obj.block_id_flag = message.blockIdFlag === 0 ? undefined : message.blockIdFlag; obj.validator_address = message.validatorAddress ? base64FromBytes(message.validatorAddress) : undefined; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; obj.signature = message.signature ? base64FromBytes(message.signature) : undefined; @@ -1538,13 +1542,13 @@ export const ExtendedCommit = { }, toAmino(message: ExtendedCommit, useInterfaces: boolean = false): ExtendedCommitAmino { const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.round = message.round; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.round = message.round === 0 ? undefined : message.round; obj.block_id = message.blockId ? BlockID.toAmino(message.blockId, useInterfaces) : undefined; if (message.extendedSignatures) { obj.extended_signatures = message.extendedSignatures.map(e => e ? ExtendedCommitSig.toAmino(e, useInterfaces) : undefined); } else { - obj.extended_signatures = []; + obj.extended_signatures = message.extendedSignatures; } return obj; }, @@ -1642,7 +1646,7 @@ export const ExtendedCommitSig = { fromAmino(object: ExtendedCommitSigAmino): ExtendedCommitSig { const message = createBaseExtendedCommitSig(); if (object.block_id_flag !== undefined && object.block_id_flag !== null) { - message.blockIdFlag = blockIDFlagFromJSON(object.block_id_flag); + message.blockIdFlag = object.block_id_flag; } if (object.validator_address !== undefined && object.validator_address !== null) { message.validatorAddress = bytesFromBase64(object.validator_address); @@ -1663,7 +1667,7 @@ export const ExtendedCommitSig = { }, toAmino(message: ExtendedCommitSig, useInterfaces: boolean = false): ExtendedCommitSigAmino { const obj: any = {}; - obj.block_id_flag = message.blockIdFlag; + obj.block_id_flag = message.blockIdFlag === 0 ? undefined : message.blockIdFlag; obj.validator_address = message.validatorAddress ? base64FromBytes(message.validatorAddress) : undefined; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; obj.signature = message.signature ? base64FromBytes(message.signature) : undefined; @@ -1773,7 +1777,7 @@ export const Proposal = { fromAmino(object: ProposalAmino): Proposal { const message = createBaseProposal(); if (object.type !== undefined && object.type !== null) { - message.type = signedMsgTypeFromJSON(object.type); + message.type = object.type; } if (object.height !== undefined && object.height !== null) { message.height = BigInt(object.height); @@ -1797,10 +1801,10 @@ export const Proposal = { }, toAmino(message: Proposal, useInterfaces: boolean = false): ProposalAmino { const obj: any = {}; - obj.type = message.type; - obj.height = message.height ? message.height.toString() : undefined; - obj.round = message.round; - obj.pol_round = message.polRound; + obj.type = message.type === 0 ? undefined : message.type; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.round = message.round === 0 ? undefined : message.round; + obj.pol_round = message.polRound === 0 ? undefined : message.polRound; obj.block_id = message.blockId ? BlockID.toAmino(message.blockId, useInterfaces) : undefined; obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; obj.signature = message.signature ? base64FromBytes(message.signature) : undefined; @@ -2050,9 +2054,9 @@ export const BlockMeta = { toAmino(message: BlockMeta, useInterfaces: boolean = false): BlockMetaAmino { const obj: any = {}; obj.block_id = message.blockId ? BlockID.toAmino(message.blockId, useInterfaces) : undefined; - obj.block_size = message.blockSize ? message.blockSize.toString() : undefined; + obj.block_size = message.blockSize !== BigInt(0) ? message.blockSize.toString() : undefined; obj.header = message.header ? Header.toAmino(message.header, useInterfaces) : undefined; - obj.num_txs = message.numTxs ? message.numTxs.toString() : undefined; + obj.num_txs = message.numTxs !== BigInt(0) ? message.numTxs.toString() : undefined; return obj; }, fromAminoMsg(object: BlockMetaAminoMsg): BlockMeta { diff --git a/packages/types/protobuf/codegen/tendermint/types/validator.ts b/packages/types/protobuf/codegen/tendermint/types/validator.ts index c2b084dfa9..3e83ab5d08 100644 --- a/packages/types/protobuf/codegen/tendermint/types/validator.ts +++ b/packages/types/protobuf/codegen/tendermint/types/validator.ts @@ -186,10 +186,10 @@ export const ValidatorSet = { if (message.validators) { obj.validators = message.validators.map(e => e ? Validator.toAmino(e, useInterfaces) : undefined); } else { - obj.validators = []; + obj.validators = message.validators; } obj.proposer = message.proposer ? Validator.toAmino(message.proposer, useInterfaces) : undefined; - obj.total_voting_power = message.totalVotingPower ? message.totalVotingPower.toString() : undefined; + obj.total_voting_power = message.totalVotingPower !== BigInt(0) ? message.totalVotingPower.toString() : undefined; return obj; }, fromAminoMsg(object: ValidatorSetAminoMsg): ValidatorSet { @@ -287,8 +287,8 @@ export const Validator = { const obj: any = {}; obj.address = message.address ? base64FromBytes(message.address) : undefined; obj.pub_key = message.pubKey ? PublicKey.toAmino(message.pubKey, useInterfaces) : undefined; - obj.voting_power = message.votingPower ? message.votingPower.toString() : undefined; - obj.proposer_priority = message.proposerPriority ? message.proposerPriority.toString() : undefined; + obj.voting_power = message.votingPower !== BigInt(0) ? message.votingPower.toString() : undefined; + obj.proposer_priority = message.proposerPriority !== BigInt(0) ? message.proposerPriority.toString() : undefined; return obj; }, fromAminoMsg(object: ValidatorAminoMsg): Validator { @@ -363,7 +363,7 @@ export const SimpleValidator = { toAmino(message: SimpleValidator, useInterfaces: boolean = false): SimpleValidatorAmino { const obj: any = {}; obj.pub_key = message.pubKey ? PublicKey.toAmino(message.pubKey, useInterfaces) : undefined; - obj.voting_power = message.votingPower ? message.votingPower.toString() : undefined; + obj.voting_power = message.votingPower !== BigInt(0) ? message.votingPower.toString() : undefined; return obj; }, fromAminoMsg(object: SimpleValidatorAminoMsg): SimpleValidator { diff --git a/packages/types/protobuf/codegen/tendermint/version/types.ts b/packages/types/protobuf/codegen/tendermint/version/types.ts index abbc21607a..0267299c22 100644 --- a/packages/types/protobuf/codegen/tendermint/version/types.ts +++ b/packages/types/protobuf/codegen/tendermint/version/types.ts @@ -124,8 +124,8 @@ export const App = { }, toAmino(message: App, useInterfaces: boolean = false): AppAmino { const obj: any = {}; - obj.protocol = message.protocol ? message.protocol.toString() : undefined; - obj.software = message.software; + obj.protocol = message.protocol !== BigInt(0) ? message.protocol.toString() : undefined; + obj.software = message.software === "" ? undefined : message.software; return obj; }, fromAminoMsg(object: AppAminoMsg): App { @@ -199,8 +199,8 @@ export const Consensus = { }, toAmino(message: Consensus, useInterfaces: boolean = false): ConsensusAmino { const obj: any = {}; - obj.block = message.block ? message.block.toString() : undefined; - obj.app = message.app ? message.app.toString() : undefined; + obj.block = message.block !== BigInt(0) ? message.block.toString() : undefined; + obj.app = message.app !== BigInt(0) ? message.app.toString() : undefined; return obj; }, fromAminoMsg(object: ConsensusAminoMsg): Consensus { diff --git a/packages/types/protobuf/codegen/utf8.ts b/packages/types/protobuf/codegen/utf8.ts index bae826a078..a6cb1157f9 100644 --- a/packages/types/protobuf/codegen/utf8.ts +++ b/packages/types/protobuf/codegen/utf8.ts @@ -1,8 +1,8 @@ //@ts-nocheck /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.4.12 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.8.3 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. +* and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/packages/types/protobuf/codegen/varint.ts b/packages/types/protobuf/codegen/varint.ts index 199e5186a6..6d53528418 100644 --- a/packages/types/protobuf/codegen/varint.ts +++ b/packages/types/protobuf/codegen/varint.ts @@ -1,7 +1,7 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.4.12 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.8.3 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. +* and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/packages/types/protobuf/patches.diff b/packages/types/protobuf/patches.diff index f167e92053..3c1a5c8745 100644 --- a/packages/types/protobuf/patches.diff +++ b/packages/types/protobuf/patches.diff @@ -1,5 +1,5 @@ diff --git b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/tx.ts a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/tx.ts -index c04740c22..63b9a7cb8 100644 +index 1dc291f1a..a90db9057 100644 --- b/packages/types/protobuf/codegen/cosmos/authz/v1beta1/tx.ts +++ a/packages/types/protobuf/codegen/cosmos/authz/v1beta1/tx.ts @@ -1,4 +1,5 @@ @@ -18,211 +18,85 @@ index c04740c22..63b9a7cb8 100644 }, toAmino(message: MsgExec, useInterfaces: boolean = false): MsgExecAmino { const obj: any = {}; - obj.grantee = message.grantee; + obj.grantee = message.grantee === "" ? undefined : message.grantee; if (message.msgs) { - obj.msgs = message.msgs.map(e => e ? Cosmos_basev1beta1Msg_ToAmino((e as Any), useInterfaces) : undefined); + obj.msgs = message.msgs.map(e => e ? rawProtobufMsgToAmino((e as Any), useInterfaces) : undefined); } else { - obj.msgs = []; + obj.msgs = message.msgs; } -diff --git b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/bank.ts a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/bank.ts -index 9eb780900..70b01f2fc 100644 ---- b/packages/types/protobuf/codegen/cosmos/bank/v1beta1/bank.ts -+++ a/packages/types/protobuf/codegen/cosmos/bank/v1beta1/bank.ts -@@ -930,7 +930,9 @@ export const Metadata = { - }, - toAmino(message: Metadata, useInterfaces: boolean = false): MetadataAmino { - const obj: any = {}; -- obj.description = message.description; -+ if (message.description) { -+ obj.description = message.description; -+ } - if (message.denomUnits) { - obj.denom_units = message.denomUnits.map(e => e ? DenomUnit.toAmino(e, useInterfaces) : undefined); - } else { -@@ -940,8 +942,12 @@ export const Metadata = { - obj.display = message.display; - obj.name = message.name; - obj.symbol = message.symbol; -- obj.uri = message.uri; -- obj.uri_hash = message.uriHash; -+ if (message.uri) { -+ obj.uri = message.uri; -+ } -+ if (message.uriHash) { -+ obj.uri_hash = message.uriHash; -+ } - return obj; - }, - fromAminoMsg(object: MetadataAminoMsg): Metadata { diff --git b/packages/types/protobuf/codegen/cosmos/gov/v1/tx.ts a/packages/types/protobuf/codegen/cosmos/gov/v1/tx.ts -index d46b64a0f..fd09961b2 100644 +index 71df399d6..4ebbe5742 100644 --- b/packages/types/protobuf/codegen/cosmos/gov/v1/tx.ts +++ a/packages/types/protobuf/codegen/cosmos/gov/v1/tx.ts -@@ -1,7 +1,8 @@ --//@ts-nocheck -+// @ts-nocheck +@@ -1,4 +1,5 @@ + //@ts-nocheck +import { aminoToRawProtobufMsg, rawProtobufMsgToAmino } from "../../../../utils"; import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; --import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, WeightedVoteOptionSDKType, Params, ParamsAmino, ParamsSDKType, voteOptionFromJSON } from "./gov"; -+import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, WeightedVoteOptionSDKType, Params, ParamsAmino, ParamsSDKType } from "./gov"; - import { Timestamp } from "../../../google/protobuf/timestamp"; - import { MsgCreateAllianceProposal, MsgCreateAllianceProposalProtoMsg, MsgCreateAllianceProposalSDKType, MsgUpdateAllianceProposal, MsgUpdateAllianceProposalProtoMsg, MsgUpdateAllianceProposalSDKType, MsgDeleteAllianceProposal, MsgDeleteAllianceProposalProtoMsg, MsgDeleteAllianceProposalSDKType } from "../../../alliance/alliance/gov"; - import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalSDKType, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg, CommunityPoolSpendProposalWithDepositSDKType } from "../../distribution/v1beta1/distribution"; -@@ -578,7 +579,7 @@ export const MsgSubmitProposal = { + import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, WeightedVoteOptionSDKType, Params, ParamsAmino, ParamsSDKType } from "./gov"; +@@ -578,7 +579,8 @@ export const MsgSubmitProposal = { }, fromAmino(object: MsgSubmitProposalAmino): MsgSubmitProposal { const message = createBaseMsgSubmitProposal(); - message.messages = object.messages?.map(e => Any.fromAmino(e)) || []; -+ message.messages = object.messages?.map(e => aminoToRawProtobufMsg(e)) || []; ++ message.messages = ++ object.messages?.map(e => aminoToRawProtobufMsg(e)) || []; message.initialDeposit = object.initial_deposit?.map(e => Coin.fromAmino(e)) || []; if (object.proposer !== undefined && object.proposer !== null) { message.proposer = object.proposer; -@@ -599,10 +600,8 @@ export const MsgSubmitProposal = { +@@ -599,10 +601,8 @@ export const MsgSubmitProposal = { }, toAmino(message: MsgSubmitProposal, useInterfaces: boolean = false): MsgSubmitProposalAmino { const obj: any = {}; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toAmino(e, useInterfaces) : undefined); - } else { -- obj.messages = []; +- obj.messages = message.messages; + if (message.messages.length) { + obj.messages = message.messages.map(e => e ? rawProtobufMsgToAmino(e, false) : undefined); } if (message.initialDeposit) { obj.initial_deposit = message.initialDeposit.map(e => e ? Coin.toAmino(e, useInterfaces) : undefined); -@@ -613,7 +612,9 @@ export const MsgSubmitProposal = { - obj.metadata = message.metadata; - obj.title = message.title; - obj.summary = message.summary; -- obj.expedited = message.expedited; -+ if (message.expedited) { -+ obj.expedited = message.expedited; -+ } - return obj; - }, - fromAminoMsg(object: MsgSubmitProposalAminoMsg): MsgSubmitProposal { -@@ -912,7 +913,7 @@ export const MsgVote = { - message.voter = object.voter; - } - if (object.option !== undefined && object.option !== null) { -- message.option = voteOptionFromJSON(object.option); -+ message.option = object.option; - } - if (object.metadata !== undefined && object.metadata !== null) { - message.metadata = object.metadata; -diff --git b/packages/types/protobuf/codegen/cosmos/gov/v1beta1/tx.ts a/packages/types/protobuf/codegen/cosmos/gov/v1beta1/tx.ts -index 3a2a34091..cced669c2 100644 ---- b/packages/types/protobuf/codegen/cosmos/gov/v1beta1/tx.ts -+++ a/packages/types/protobuf/codegen/cosmos/gov/v1beta1/tx.ts -@@ -1,7 +1,7 @@ - //@ts-nocheck - import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; - import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; --import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, WeightedVoteOptionSDKType, TextProposal, TextProposalProtoMsg, TextProposalSDKType, voteOptionFromJSON } from "./gov"; -+import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, WeightedVoteOptionSDKType, TextProposal, TextProposalProtoMsg, TextProposalSDKType } from "./gov"; - import { MsgCreateAllianceProposal, MsgCreateAllianceProposalProtoMsg, MsgCreateAllianceProposalSDKType, MsgUpdateAllianceProposal, MsgUpdateAllianceProposalProtoMsg, MsgUpdateAllianceProposalSDKType, MsgDeleteAllianceProposal, MsgDeleteAllianceProposalProtoMsg, MsgDeleteAllianceProposalSDKType } from "../../../alliance/alliance/gov"; - import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalSDKType, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg, CommunityPoolSpendProposalWithDepositSDKType } from "../../distribution/v1beta1/distribution"; - import { ParameterChangeProposal, ParameterChangeProposalProtoMsg, ParameterChangeProposalSDKType } from "../../params/v1beta1/params"; -@@ -472,7 +472,7 @@ export const MsgVote = { - message.voter = object.voter; - } - if (object.option !== undefined && object.option !== null) { -- message.option = voteOptionFromJSON(object.option); -+ message.option = object.option; - } - return message; - }, -diff --git b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/tx.ts a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/tx.ts -index 11d5dba92..6ee5c2e5a 100644 ---- b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/tx.ts -+++ a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/tx.ts -@@ -1526,7 +1526,10 @@ export const MsgInstantiateContract = { - toAmino(message: MsgInstantiateContract, useInterfaces: boolean = false): MsgInstantiateContractAmino { - const obj: any = {}; - obj.sender = message.sender; -- obj.admin = message.admin; -+ // Replace empty string with undefined. -+ if (message.admin) { -+ obj.admin = message.admin; -+ } - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.label = message.label; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; -@@ -1770,7 +1773,9 @@ export const MsgInstantiateContract2 = { - obj.funds = []; - } - obj.salt = message.salt ? base64FromBytes(message.salt) : undefined; -- obj.fix_msg = message.fixMsg; -+ if (message.fixMsg) { -+ obj.fix_msg = message.fixMsg; -+ } - return obj; - }, - fromAminoMsg(object: MsgInstantiateContract2AminoMsg): MsgInstantiateContract2 { diff --git b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/types.ts a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/types.ts -index d2a323eb5..2038d7725 100644 +index 2a9a61c38..2643bcdc4 100644 --- b/packages/types/protobuf/codegen/cosmwasm/wasm/v1/types.ts +++ a/packages/types/protobuf/codegen/cosmwasm/wasm/v1/types.ts -@@ -19,16 +19,16 @@ export const AccessTypeAmino = AccessType; - export function accessTypeFromJSON(object: any): AccessType { - switch (object) { - case 0: -- case "ACCESS_TYPE_UNSPECIFIED": -+ case "Unspecified": - return AccessType.ACCESS_TYPE_UNSPECIFIED; - case 1: -- case "ACCESS_TYPE_NOBODY": -+ case "Nobody": - return AccessType.ACCESS_TYPE_NOBODY; - case 3: -- case "ACCESS_TYPE_EVERYBODY": -+ case "Everybody": - return AccessType.ACCESS_TYPE_EVERYBODY; - case 4: -- case "ACCESS_TYPE_ANY_OF_ADDRESSES": -+ case "AnyOfAddresses": - return AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES; - case -1: - case "UNRECOGNIZED": -@@ -39,13 +39,13 @@ export function accessTypeFromJSON(object: any): AccessType { - export function accessTypeToJSON(object: AccessType): string { - switch (object) { - case AccessType.ACCESS_TYPE_UNSPECIFIED: -- return "ACCESS_TYPE_UNSPECIFIED"; -+ return "Unspecified"; - case AccessType.ACCESS_TYPE_NOBODY: -- return "ACCESS_TYPE_NOBODY"; -+ return "Nobody"; - case AccessType.ACCESS_TYPE_EVERYBODY: -- return "ACCESS_TYPE_EVERYBODY"; -+ return "Everybody"; - case AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES: -- return "ACCESS_TYPE_ANY_OF_ADDRESSES"; -+ return "AnyOfAddresses"; - case AccessType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; -@@ -485,11 +485,9 @@ export const AccessConfig = { +@@ -474,18 +474,16 @@ export const AccessConfig = { + fromAmino(object: AccessConfigAmino): AccessConfig { + const message = createBaseAccessConfig(); + if (object.permission !== undefined && object.permission !== null) { +- message.permission = object.permission; ++ message.permission = accessTypeFromJSON(object.permission); + } + message.addresses = object.addresses?.map(e => e) || []; + return message; }, toAmino(message: AccessConfig, useInterfaces: boolean = false): AccessConfigAmino { const obj: any = {}; -- obj.permission = message.permission; +- obj.permission = message.permission === 0 ? undefined : message.permission; - if (message.addresses) { + obj.permission = accessTypeToJSON(message.permission); -+ if (message.addresses?.length) { ++ if (message.addresses.length) { obj.addresses = message.addresses.map(e => e); - } else { -- obj.addresses = []; +- obj.addresses = message.addresses; } return obj; }, -@@ -571,7 +569,7 @@ export const Params = { +@@ -560,14 +558,14 @@ export const Params = { + message.codeUploadAccess = AccessConfig.fromAmino(object.code_upload_access); + } + if (object.instantiate_default_permission !== undefined && object.instantiate_default_permission !== null) { +- message.instantiateDefaultPermission = object.instantiate_default_permission; ++ message.instantiateDefaultPermission = accessTypeFromJSON(object.instantiate_default_permission); + } + return message; + }, toAmino(message: Params, useInterfaces: boolean = false): ParamsAmino { const obj: any = {}; - obj.code_upload_access = message.codeUploadAccess ? AccessConfig.toAmino(message.codeUploadAccess, useInterfaces) : AccessConfig.fromPartial({}); -- obj.instantiate_default_permission = message.instantiateDefaultPermission; + obj.code_upload_access = message.codeUploadAccess ? AccessConfig.toAmino(message.codeUploadAccess, useInterfaces) : AccessConfig.toAmino(AccessConfig.fromPartial({})); +- obj.instantiate_default_permission = message.instantiateDefaultPermission === 0 ? undefined : message.instantiateDefaultPermission; + obj.instantiate_default_permission = accessTypeToJSON(message.instantiateDefaultPermission); return obj; }, @@ -258,8 +132,34 @@ index 1caf8781d..9d864d753 100644 export const getSigningNeutronClientOptions = ({ defaultTypes = defaultRegistryTypes }: { +diff --git b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/module_route.ts a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/module_route.ts +index a644c0f74..9bce95dea 100644 +--- b/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/module_route.ts ++++ a/packages/types/protobuf/codegen/osmosis/poolmanager/v1beta1/module_route.ts +@@ -153,7 +153,7 @@ export const ModuleRoute = { + toAmino(message: ModuleRoute, useInterfaces: boolean = false): ModuleRouteAmino { + const obj: any = {}; + obj.pool_type = message.poolType === 0 ? undefined : message.poolType; +- obj.pool_id = message.poolId !== BigInt(0) ? message.poolId.toString() : undefined; ++ obj.pool_id = message.poolId !== BigInt(0) ? message.poolId?.toString() : undefined; + return obj; + }, + fromAminoMsg(object: ModuleRouteAminoMsg): ModuleRoute { +diff --git b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/params.ts a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/params.ts +index 213d94f0e..55b9e2ee2 100644 +--- b/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/params.ts ++++ a/packages/types/protobuf/codegen/osmosis/tokenfactory/v1beta1/params.ts +@@ -103,7 +103,7 @@ export const Params = { + } else { + obj.denom_creation_fee = message.denomCreationFee; + } +- obj.denom_creation_gas_consume = message.denomCreationGasConsume !== BigInt(0) ? message.denomCreationGasConsume.toString() : undefined; ++ obj.denom_creation_gas_consume = message.denomCreationGasConsume !== BigInt(0) ? message.denomCreationGasConsume?.toString() : undefined; + return obj; + }, + fromAminoMsg(object: ParamsAminoMsg): Params { diff --git b/packages/types/protobuf/codegen/regen/data/v1/tx.ts a/packages/types/protobuf/codegen/regen/data/v1/tx.ts -index 640c2bcef..5bd95374c 100644 +index eb4e14ba3..af83becfe 100644 --- b/packages/types/protobuf/codegen/regen/data/v1/tx.ts +++ a/packages/types/protobuf/codegen/regen/data/v1/tx.ts @@ -1,5 +1,5 @@ @@ -270,7 +170,7 @@ index 640c2bcef..5bd95374c 100644 import { BinaryReader, BinaryWriter } from "../../../binary"; import { toTimestamp, fromTimestamp } from "../../../helpers"; diff --git b/packages/types/protobuf/codegen/regen/data/v2/tx.ts a/packages/types/protobuf/codegen/regen/data/v2/tx.ts -index fe58afb74..f0e94453b 100644 +index 4199e50b5..fd7785125 100644 --- b/packages/types/protobuf/codegen/regen/data/v2/tx.ts +++ a/packages/types/protobuf/codegen/regen/data/v2/tx.ts @@ -1,5 +1,5 @@ diff --git a/packages/types/protobuf/proto/neutron/interchainqueries/tx.proto b/packages/types/protobuf/proto/neutron/interchainqueries/tx.proto index 873ef35f70..6a40134b42 100644 --- a/packages/types/protobuf/proto/neutron/interchainqueries/tx.proto +++ b/packages/types/protobuf/proto/neutron/interchainqueries/tx.proto @@ -93,7 +93,7 @@ message Block { } message TxValue { - tendermint.abci.ResponseDeliverTx response = 1; + tendermint.abci.ExecTxResult response = 1; // is the Merkle Proof which proves existence of response in block with height // next_block_header.Height diff --git a/packages/types/protobuf/scripts/codegen.js b/packages/types/protobuf/scripts/codegen.js index 94d2f079cb..611a8c5cfb 100644 --- a/packages/types/protobuf/scripts/codegen.js +++ b/packages/types/protobuf/scripts/codegen.js @@ -189,6 +189,49 @@ telescope({ useCosmosSDKDec: true, }, }, + patch: { + // AccessType in wasm types has custom serialization names in the x/wasm + // module, so replace the default generated names with the correct ones + // to fix Amino encoding. + 'cosmwasm/wasm/v1/types.proto': [ + { + op: 'remove', + path: '@/AccessType/values/ACCESS_TYPE_UNSPECIFIED', + }, + { + op: 'add', + path: '@/AccessType/values/Unspecified', + value: 0, + }, + { + op: 'remove', + path: '@/AccessType/values/ACCESS_TYPE_NOBODY', + }, + { + op: 'add', + path: '@/AccessType/values/Nobody', + value: 1, + }, + { + op: 'remove', + path: '@/AccessType/values/ACCESS_TYPE_EVERYBODY', + }, + { + op: 'add', + path: '@/AccessType/values/Everybody', + value: 3, + }, + { + op: 'remove', + path: '@/AccessType/values/ACCESS_TYPE_ANY_OF_ADDRESSES', + }, + { + op: 'add', + path: '@/AccessType/values/AnyOfAddresses', + value: 4, + }, + ], + }, }, aminoEncoding: { enabled: true, diff --git a/packages/utils/messages/protobuf.ts b/packages/utils/messages/protobuf.ts index ec377dd706..c9267932b1 100644 --- a/packages/utils/messages/protobuf.ts +++ b/packages/utils/messages/protobuf.ts @@ -32,7 +32,12 @@ export const decodeGovProposalV1Messages = ( return protobufToCwMsg(getChainForChainId(chainId), msg).msg } catch (err) { // If protobuf not found, return raw stargate message. - console.error(err) + + // Don't error on server. + if (typeof window !== 'undefined') { + console.error(err) + } + return { stargate: { type_url: msg.typeUrl, diff --git a/yarn.lock b/yarn.lock index f34d12ef88..df9a45eb60 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2292,35 +2292,35 @@ resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.32.3.tgz#5dcaee6dd7cc846cdc073e9a7a7f63242f5f7e31" integrity sha512-WCZK4yksj2hBDz4w7xFZQTRZQ/RJhBX26uFHmmQFIcNUUVAihrLO+RerqJgk0dZqC42wstM9pEUQGtPmLcIYvg== -"@cosmology/ast@^1.4.8": - version "1.4.8" - resolved "https://registry.yarnpkg.com/@cosmology/ast/-/ast-1.4.8.tgz#9c6312de9fc4177d861a8723e4121cfdd4988533" - integrity sha512-o039BHTB7HU/XC3ZzTnIPfrB5a0G/FlQoJPBhtSVslLYXmi6aXxvJKtTLuvZzT1+bmzg/izVfo6ja55rAn7cZg== +"@cosmology/ast@^1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@cosmology/ast/-/ast-1.8.1.tgz#35a32fc117b007d6f7c9f5dcc82613989d206883" + integrity sha512-wjJDf3qk0SLaJsS6KJJqQpz+0iLl4V8V1cE7HwgwZT3F4nhTLfyK/13NbJcf0MhEfQ7+tNKFnVJIJJGfUxTPKQ== dependencies: - "@babel/parser" "^7.23.6" "@babel/types" "7.23.6" - "@cosmology/types" "^1.4.2" - "@cosmology/utils" "^1.4.2" + "@cosmology/types" "^1.8.1" + "@cosmology/utils" "^1.8.1" case "1.6.3" dotty "0.1.2" -"@cosmology/proto-parser@^1.4.4": - version "1.4.4" - resolved "https://registry.yarnpkg.com/@cosmology/proto-parser/-/proto-parser-1.4.4.tgz#bb5c9515513cf9a1e70298c3861e049b70d15ee3" - integrity sha512-VFDHrg6mQj0dKLcQOtU1icYoLN28BAxjwig7fpJ8ud2fZleLeOm09rlrcT9ZwwBBmL6Gsv+bhB1gK8q2EfDcTw== +"@cosmology/proto-parser@^1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@cosmology/proto-parser/-/proto-parser-1.8.1.tgz#2b6d8864b9593e518b20cd5dacbbcc68bd028f16" + integrity sha512-XgvhZH2af/6lJRYO19ozbdKdNziJu4p6HTv4u4CmUAgUpVG/tSA81cXTOMM+nJo1PPrhtqh9Nad9ISwLePvx2A== dependencies: - "@cosmology/protobufjs" "6.11.6" - "@cosmology/types" "^1.4.2" - "@cosmology/utils" "^1.4.2" + "@cosmology/protobufjs" "7.3.2" + "@cosmology/types" "^1.8.1" + "@cosmology/utils" "^1.8.1" dotty "0.1.2" + fast-json-patch "3.1.1" glob "8.0.3" minimatch "5.1.0" mkdirp "3.0.0" -"@cosmology/protobufjs@6.11.6": - version "6.11.6" - resolved "https://registry.yarnpkg.com/@cosmology/protobufjs/-/protobufjs-6.11.6.tgz#6f7bd340ab4a27969b1f75b4bff21a74e03b971a" - integrity sha512-k1opGC9CTX5vD2447pUqLmleVv0Kb8RasBUxkZHudVOvuXs2qAAGONmMIEGRCROKTodhTY9fdTnGU2lCZqAwNw== +"@cosmology/protobufjs@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@cosmology/protobufjs/-/protobufjs-7.3.2.tgz#6c2acdaec9e4b7aab4647bb236da1258e7526a87" + integrity sha512-zHf/yqGQ7QSjIYvv7kvGKY9yXNjqj55kWdRyntrXwnte/tY8uMTuCFD/EWC48LGhGu3P7nbzTlhyCGMc3xm9bw== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -2332,24 +2332,24 @@ "@protobufjs/path" "^1.1.2" "@protobufjs/pool" "^1.1.0" "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" + "@types/long" "^5.0.0" "@types/node" ">=13.7.0" - long "^4.0.0" + long "^5.0.0" -"@cosmology/telescope@^1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@cosmology/telescope/-/telescope-1.4.12.tgz#5696b6670586cf83297d015ab2da2d760ca0e5fa" - integrity sha512-e6HlViIrzae0y5IhxTLFtNgNsACGtOhwE4v1ahmmvZWqmVkfRl0VxddVqrrCFXPNsJQy0mQUlcVggJ6lzKeuDA== +"@cosmology/telescope@^1.8.3": + version "1.8.3" + resolved "https://registry.yarnpkg.com/@cosmology/telescope/-/telescope-1.8.3.tgz#1d8eb68ee6eb6475a1a19a6de82ddc2dddac98f2" + integrity sha512-q14TLkHxaB6CGC38bVGGMhVsnMRtyNqkH5j50GHtoP04kCEcATD/zIUPpJsld2XiJJi2YPUzbxf/oYVchpv29Q== dependencies: "@babel/generator" "^7.23.6" "@babel/parser" "^7.23.6" "@babel/traverse" "7.23.6" "@babel/types" "7.23.6" - "@cosmology/ast" "^1.4.8" - "@cosmology/proto-parser" "^1.4.4" - "@cosmology/types" "^1.4.2" - "@cosmology/utils" "^1.4.2" - "@cosmwasm/ts-codegen" "0.34.0" + "@cosmology/ast" "^1.8.1" + "@cosmology/proto-parser" "^1.8.1" + "@cosmology/types" "^1.8.1" + "@cosmology/utils" "^1.8.1" + "@cosmwasm/ts-codegen" "0.35.7" "@types/parse-package-name" "0.1.0" case "1.6.3" dargs "7.0.0" @@ -2364,21 +2364,22 @@ mkdirp "3.0.0" parse-package-name "1.0.0" rimraf "5.0.0" - shelljs "0.8.5" + yaml "^2.3.4" -"@cosmology/types@^1.4.2": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@cosmology/types/-/types-1.4.2.tgz#e5771f139c8e44735968ed87583e832e410696b9" - integrity sha512-GkzC1eJFJWnQmS4Vkje53qBFledKNB3YYEQnV/sJ28sS9Ud020AvLuXkG8eqRsmdpDNxGI7F+hzWQaaahDk1Ng== +"@cosmology/types@^1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@cosmology/types/-/types-1.8.1.tgz#782868b232a214b55f41908353be87afa79c9302" + integrity sha512-M/4HZZu0mNwwzK7ITa5A4biVKGVk8EtaQJlHuuctygKvjKcvmmAglna754o9CdkfPEyUXBzYnLU6q7UIFgcO+g== dependencies: case "1.6.3" + fast-json-patch "3.1.1" -"@cosmology/utils@^1.4.2": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@cosmology/utils/-/utils-1.4.2.tgz#a66a9a9a0c1bc3ddd8b21be6beae864bd4603610" - integrity sha512-GWACbn2EjHvqmAOxm9MMFdfoweznB6b3kN6Agoj+bu/3EF35roIhEqUF7ku0LhyQuoFU4euxe0YwkkXgWUvCDA== +"@cosmology/utils@^1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@cosmology/utils/-/utils-1.8.1.tgz#9fd7f0815da726f7a2a11d713f7e8886f94f0a6b" + integrity sha512-PrZffk81GQ0pJHH7kRJi9PZVt4qWa/9V3mbUyc3vXIWqeAk1bQ+5O5MLKirtRj4cEM3zt5WnDUISPCrt4VIQkA== dependencies: - "@cosmology/types" "^1.4.2" + "@cosmology/types" "^1.8.1" dotty "0.1.2" "@cosmos-kit/coin98-extension@^2.10.0": @@ -2827,10 +2828,10 @@ resolved "https://registry.yarnpkg.com/@cosmwasm/ts-codegen-types/-/ts-codegen-types-1.3.0.tgz#9839d0521a3e1acc7145a5efe907590c93938b75" integrity sha512-DF6CM+Pq+gqFY0jtLLzvxJaHsUrszn3WdyIrsM1SrEXzTtS9yg/pGMedVJ83SEREoz7MiG/0ori3Ghi3WSgnOg== -"@cosmwasm/ts-codegen@0.34.0": - version "0.34.0" - resolved "https://registry.yarnpkg.com/@cosmwasm/ts-codegen/-/ts-codegen-0.34.0.tgz#659bb69fc5f74cbd623567f3090e69072f08b23c" - integrity sha512-Mt/aYj0be9GnA51Arysqr9L8KQNWUJJHoJvtru7hkHmukPSewZDilwHCOJAaehk5gjsP7LFey2o2KEdfzkANhA== +"@cosmwasm/ts-codegen@0.35.7": + version "0.35.7" + resolved "https://registry.yarnpkg.com/@cosmwasm/ts-codegen/-/ts-codegen-0.35.7.tgz#b88c03b732824113fc765d560504516faca6f23b" + integrity sha512-qbOAYJPe5O5AjoWytZcsVvM0SBA39sMpiqnVIIgjJiqp4G4D5GjR2/UV3ePpygnIxxKZWMnOpPPUvLMjflblCw== dependencies: "@babel/core" "7.18.10" "@babel/generator" "7.18.12" @@ -2858,7 +2859,7 @@ parse-package-name "1.0.0" rimraf "3.0.2" shelljs "0.8.5" - wasm-ast-types "^0.25.0" + wasm-ast-types "^0.26.4" "@cosmwasm/ts-codegen@^1.10.0": version "1.10.0" @@ -8845,6 +8846,13 @@ resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== +"@types/long@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@types/long/-/long-5.0.0.tgz#daaa7b7f74c919c946ff74889d5ca2afe363b2cd" + integrity sha512-eQs9RsucA/LNjnMoJvWG/nXa7Pot/RbBzilF/QRIU/xRl+0ApxrSUFsV5lmf01SvSlqMzJ7Zwxe440wmz2SJGA== + dependencies: + long "*" + "@types/luxon@^3.4.2": version "3.4.2" resolved "https://registry.yarnpkg.com/@types/luxon/-/luxon-3.4.2.tgz#e4fc7214a420173cea47739c33cdf10874694db7" @@ -14615,6 +14623,11 @@ fast-json-parse@^1.0.3: resolved "https://registry.yarnpkg.com/fast-json-parse/-/fast-json-parse-1.0.3.tgz#43e5c61ee4efa9265633046b770fb682a7577c4d" integrity sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw== +fast-json-patch@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" + integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ== + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -18403,7 +18416,7 @@ loglevel@^1.8.1, loglevel@^1.9.1: resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.9.1.tgz#d63976ac9bcd03c7c873116d41c2a85bafff1be7" integrity sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg== -"long@^3 || ^4 || ^5", long@^5.0.0, long@^5.2.0, long@^5.2.1, long@^5.2.3: +long@*, "long@^3 || ^4 || ^5", long@^5.0.0, long@^5.2.0, long@^5.2.1, long@^5.2.3: version "5.2.3" resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== @@ -25557,10 +25570,10 @@ warning@^4.0.0: dependencies: loose-envify "^1.0.0" -wasm-ast-types@^0.25.0: - version "0.25.0" - resolved "https://registry.yarnpkg.com/wasm-ast-types/-/wasm-ast-types-0.25.0.tgz#9f4056803c99fae6899c1f226e46cf730d9fe2db" - integrity sha512-ZTjXuBqRf3ntxXmskO1TyTTr8UbmAZGr72JGGctizzpdokMtuLsk5q8jHaFUv/qgQni1KuBxZnHIyaj1lnZegQ== +wasm-ast-types@^0.26.4: + version "0.26.4" + resolved "https://registry.yarnpkg.com/wasm-ast-types/-/wasm-ast-types-0.26.4.tgz#cade0616c7158a0d05df8d6b8cac5cc098385fd1" + integrity sha512-bMxkQzc/+e7s5W+EBfurl/Y7KnTm0YPeg/cXjyio3PHULKWQULMREgyuJXJWaIa+8sKI1+OI61YeFSJBilm9YQ== dependencies: "@babel/runtime" "^7.18.9" "@babel/types" "7.18.10"