diff --git a/apps/dapp/package.json b/apps/dapp/package.json index 43aac7720..29fe197d5 100644 --- a/apps/dapp/package.json +++ b/apps/dapp/package.json @@ -3,6 +3,7 @@ "version": "2.5.0-rc.3", "license": "AGPL-3.0-only", "scripts": { + "postinstall": "cd ../../ && patch-package", "analyze": "ANALYZE=true next build", "prepare": "npm run build:worker", "prebuild": "npm run build:worker && cd ../../packages/state && npm run build:gql", diff --git a/apps/sda/package.json b/apps/sda/package.json index ebbda91fd..e97acc23b 100644 --- a/apps/sda/package.json +++ b/apps/sda/package.json @@ -3,6 +3,7 @@ "version": "2.5.0-rc.3", "license": "AGPL-3.0-only", "scripts": { + "postinstall": "cd ../../ && patch-package", "analyze": "ANALYZE=true next build", "prebuild": "cd ../../packages/state && npm run build:gql", "build": "next build --debug", diff --git a/package.json b/package.json index 6406a0960..6c02263d2 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "start": "yarn dapp start", "format": "prettier --write \"**/*.{css,json,md}\" && turbo run format --continue --parallel", "lint": "prettier --check \"**/*.{css,json,md}\" && turbo run lint --continue --parallel", + "postinstall": "patch-package", "test": "jest", "test:e2e": "yarn dapp test:e2e", "cwgen": "yarn workspace @dao-dao/config cwgen", @@ -33,6 +34,7 @@ "@types/jest": "^29.5.0", "jest": "^29.5.0", "lerna": "^6.4.1", + "patch-package": "^8.0.0", "ts-jest": "^29.0.5", "turbo": "latest", "turbo-ignore": "latest" diff --git a/packages/i18n/locales/en/translation.json b/packages/i18n/locales/en/translation.json index 81cdbd236..6e08e2b06 100644 --- a/packages/i18n/locales/en/translation.json +++ b/packages/i18n/locales/en/translation.json @@ -56,6 +56,7 @@ "addAttribute": "Add attribute", "addChains": "Add chains", "addCollection": "Add collection", + "addEntry": "Add entry", "addFile": "Add file", "addImage": "Add image", "addMember": "Add a member", @@ -402,6 +403,7 @@ "alreadySentTokenSwap_dao": "The DAO has already sent its share of this token swap.", "alreadySentTokenSwap_gov": "The chain has already sent its share of this token swap.", "alreadySentTokenSwap_wallet": "You have already sent your share of this token swap.", + "browserExtensionWalletRequiredForProposalExecution": "Executing this proposal requires a browser extension wallet due to its execution metadata. Please try again with a supported wallet.", "browserNotSupported": "Not supported in this browser.", "cannotStakeMoreThanYouHave": "You can't stake or unstake more tokens than you have.", "cannotTxZeroTokens": "You can't stake, unstake, or claim zero tokens.", @@ -638,6 +640,7 @@ "daoName": "Name", "daoNamePlaceholder": "Give your DAO a name", "daosCurrentlyEnabled": "DAOs currently enabled", + "data": "Data", "dates": "Dates", "defaultTierName": "Core contributors", "delegatorAddress": "Delegator address", @@ -769,6 +772,8 @@ "proposalsDescriptionPlaceholder": "Give your proposal a description (supports Markdown)...", "proposalsTitlePlaceholder": "Give your proposal a title", "proposedSpends": "Proposed spends", + "protocolId": "Protocol ID", + "protocolVersion": "Protocol version", "quorumDescription": "The minimum percentage of voting power that must vote on a proposal for it to be considered. For example, in the US House of Representatives, 218 members must be present for a vote. If you have a DAO with many inactive members, setting this value too high may make it difficult to pass proposals.", "quorumDescription_create": "The minimum percentage of voting power that must vote on a proposal for it to be considered. For example, in the US House of Representatives, 218 members must be present for a vote. If you have a DAO with many inactive members, setting this value too high may make it difficult to pass proposals.\n\n*If not using a quorum for the single choice proposal passing threshold, this quorum will only apply to multiple choice proposals.*", "quorumTitle": "Quorum", @@ -1311,6 +1316,7 @@ "proposalAllAbstainClarification": "When all voters abstain, a proposal will fail.", "proposalDepositTooltip": "The deposit the proposer must pay when creating a proposal.", "proposalDepositWillBeRefunded": "Proposal deposit will be refunded once closed.", + "proposalExecutionMemoTooltip": "The memo that will be attached to the transaction when this proposal is executed.", "proposalExecutionPolicyDescription": "Who is allowed to execute passed proposals?", "proposalFixesChildAdmin": "This proposal fixes that by setting the contract-level admin of {{child}} to {{parent}}.", "proposalModuleInfoCardsTooltip": "Different proposal types are configured separately. This is the configuration for the {{type}} proposal type.", @@ -1804,6 +1810,7 @@ "established": "Established", "executeProposal": "Execute Proposal", "executeSmartContract": "Execute Smart Contract", + "executionMetadata": "Execution Metadata", "existingProposal": "Existing proposal", "existingToken": "Existing token", "expires": "Expires", @@ -1868,8 +1875,10 @@ "memberOfDao": "Member of {{daoName}}", "members": "Members", "membership": "Membership", + "memo": "Memo", "mergeProfiles": "Merge Profiles", "metadata": "Metadata", + "metaprotocolExtensionData": "Metaprotocol Extension Data", "migrateFollowing": "Migrate Followed DAOs", "migrateSmartContract": "Migrate Smart Contract", "migrateTokenFactoryModule": "Migrate Token Factory Module", diff --git a/packages/state/contracts/CwProposalSingle.v1.ts b/packages/state/contracts/CwProposalSingle.v1.ts index 7fda1acab..74428be26 100644 --- a/packages/state/contracts/CwProposalSingle.v1.ts +++ b/packages/state/contracts/CwProposalSingle.v1.ts @@ -10,6 +10,7 @@ import { ExecuteResult, SigningCosmWasmClient, } from '@cosmjs/cosmwasm-stargate' +import { EncodeObject } from '@cosmjs/proto-signing' import { Coin, @@ -394,7 +395,8 @@ export class CwProposalSingleV1Client }, fee: number | StdFee | 'auto' = CHAIN_GAS_MULTIPLIER, memo?: string, - _funds?: Coin[] + _funds?: Coin[], + nonCriticalExtensionOptions?: EncodeObject[] ): Promise => { return await this.client.execute( this.sender, @@ -406,7 +408,8 @@ export class CwProposalSingleV1Client }, fee, memo, - _funds + _funds, + nonCriticalExtensionOptions ) } close = async ( diff --git a/packages/state/contracts/DaoProposalMultiple.ts b/packages/state/contracts/DaoProposalMultiple.ts index 1102c9c99..2621cda5a 100644 --- a/packages/state/contracts/DaoProposalMultiple.ts +++ b/packages/state/contracts/DaoProposalMultiple.ts @@ -10,6 +10,7 @@ import { ExecuteResult, SigningCosmWasmClient, } from '@cosmjs/cosmwasm-stargate' +import { EncodeObject } from '@cosmjs/proto-signing' import { Addr, @@ -465,7 +466,8 @@ export class DaoProposalMultipleClient }, fee: number | StdFee | 'auto' = CHAIN_GAS_MULTIPLIER, memo?: string, - _funds?: Coin[] + _funds?: Coin[], + nonCriticalExtensionOptions?: EncodeObject[] ): Promise => { return await this.client.execute( this.sender, @@ -477,7 +479,8 @@ export class DaoProposalMultipleClient }, fee, memo, - _funds + _funds, + nonCriticalExtensionOptions ) } veto = async ( diff --git a/packages/state/contracts/DaoProposalSingle.v2.ts b/packages/state/contracts/DaoProposalSingle.v2.ts index 6b0f44317..1ba7ea53a 100644 --- a/packages/state/contracts/DaoProposalSingle.v2.ts +++ b/packages/state/contracts/DaoProposalSingle.v2.ts @@ -10,6 +10,7 @@ import { ExecuteResult, SigningCosmWasmClient, } from '@cosmjs/cosmwasm-stargate' +import { EncodeObject } from '@cosmjs/proto-signing' import { Addr, @@ -491,7 +492,8 @@ export class DaoProposalSingleV2Client }, fee: number | StdFee | 'auto' = CHAIN_GAS_MULTIPLIER, memo?: string, - _funds?: Coin[] + _funds?: Coin[], + nonCriticalExtensionOptions?: EncodeObject[] ): Promise => { return await this.client.execute( this.sender, @@ -503,7 +505,8 @@ export class DaoProposalSingleV2Client }, fee, memo, - _funds + _funds, + nonCriticalExtensionOptions ) } veto = async ( diff --git a/packages/stateful/actions/core/actions/CreateCrossChainAccount/Component.tsx b/packages/stateful/actions/core/actions/CreateCrossChainAccount/Component.tsx index a4fefb494..092a9144e 100644 --- a/packages/stateful/actions/core/actions/CreateCrossChainAccount/Component.tsx +++ b/packages/stateful/actions/core/actions/CreateCrossChainAccount/Component.tsx @@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next' import { ChainPickerPopup, CopyToClipboard, + InfoLineCard, useActionOptions, } from '@dao-dao/stateless' import { @@ -11,7 +12,11 @@ import { ActionComponent, ActionContextType, } from '@dao-dao/types/actions' -import { getDisplayNameForChainId, getImageUrlForChainId } from '@dao-dao/utils' +import { + MAINNET, + getDisplayNameForChainId, + getImageUrlForChainId, +} from '@dao-dao/utils' export type CreateCrossChainAccountData = { chainId: string @@ -38,7 +43,11 @@ export const CreateCrossChainAccountComponent: ActionComponent = ({ } if (!chainContext.config.polytone) { - throw new Error(`Cross-chain accounts have not been enabled for ${name}.`) + throw new Error( + `Cross-chain accounts have not been enabled for ${ + name || (MAINNET ? 'this chain' : 'testnets') + }.` + ) } const missingChainIds = Object.keys(chainContext.config.polytone).filter( @@ -77,31 +86,23 @@ export const CreateCrossChainAccountComponent: ActionComponent = ({

) ) : ( -
-
- {imageUrl && ( -
- )} - -

{name}

-
- - {createdAddress ? ( - - ) : ( -

{t('info.pending')}

- )} -
+ + ) : ( + t('info.pending') + ) + } + valueClassName="!secondary-text" + /> )} ) diff --git a/packages/stateful/clients/proposal-module/MultipleChoiceProposalModule.ts b/packages/stateful/clients/proposal-module/MultipleChoiceProposalModule.ts index 6322cebb6..7d9378497 100644 --- a/packages/stateful/clients/proposal-module/MultipleChoiceProposalModule.ts +++ b/packages/stateful/clients/proposal-module/MultipleChoiceProposalModule.ts @@ -1,3 +1,4 @@ +import { EncodeObject } from '@cosmjs/proto-signing' import { FetchQueryOptions, QueryClient } from '@tanstack/react-query' import { @@ -308,11 +309,13 @@ export class MultipleChoiceProposalModule extends ProposalModuleBase< getSigningClient, sender, memo, + nonCriticalExtensionOptions, }: { proposalId: number getSigningClient: () => Promise sender: string memo?: string + nonCriticalExtensionOptions?: EncodeObject[] }): Promise { const client = await getSigningClient() await new DaoProposalMultipleClient(client, sender, this.address).execute( @@ -320,7 +323,9 @@ export class MultipleChoiceProposalModule extends ProposalModuleBase< proposalId, }, undefined, - memo + memo, + undefined, + nonCriticalExtensionOptions ) } diff --git a/packages/stateful/clients/proposal-module/SingleChoiceProposalModule.ts b/packages/stateful/clients/proposal-module/SingleChoiceProposalModule.ts index 326bedc74..6dcf15061 100644 --- a/packages/stateful/clients/proposal-module/SingleChoiceProposalModule.ts +++ b/packages/stateful/clients/proposal-module/SingleChoiceProposalModule.ts @@ -1,3 +1,4 @@ +import { EncodeObject } from '@cosmjs/proto-signing' import { FetchQueryOptions, QueryClient } from '@tanstack/react-query' import { @@ -339,11 +340,13 @@ export class SingleChoiceProposalModule extends ProposalModuleBase< getSigningClient, sender, memo, + nonCriticalExtensionOptions, }: { proposalId: number getSigningClient: () => Promise sender: string memo?: string + nonCriticalExtensionOptions?: EncodeObject[] }): Promise { const client = await getSigningClient() @@ -357,7 +360,9 @@ export class SingleChoiceProposalModule extends ProposalModuleBase< proposalId, }, undefined, - memo + memo, + undefined, + nonCriticalExtensionOptions ) } diff --git a/packages/stateful/clients/proposal-module/base.ts b/packages/stateful/clients/proposal-module/base.ts index 2a49c0a7c..efd896c36 100644 --- a/packages/stateful/clients/proposal-module/base.ts +++ b/packages/stateful/clients/proposal-module/base.ts @@ -1,4 +1,5 @@ import { SigningCosmWasmClient } from '@cosmjs/cosmwasm-stargate' +import { EncodeObject } from '@cosmjs/proto-signing' import { FetchQueryOptions, QueryClient } from '@tanstack/react-query' import { @@ -115,6 +116,7 @@ export abstract class ProposalModuleBase< getSigningClient: () => Promise sender: string memo?: string + nonCriticalExtensionOptions?: EncodeObject[] }): Promise /** diff --git a/packages/stateful/hooks/useProposalActionState.tsx b/packages/stateful/hooks/useProposalActionState.tsx index 505841440..4f89521b9 100644 --- a/packages/stateful/hooks/useProposalActionState.tsx +++ b/packages/stateful/hooks/useProposalActionState.tsx @@ -1,10 +1,17 @@ +import { SigningCosmWasmClient } from '@cosmjs/cosmwasm-stargate' +import { toUtf8 } from '@cosmjs/encoding' +import { OfflineSigner } from '@cosmjs/proto-signing' import { CancelOutlined, Key, Send } from '@mui/icons-material' +import { useQueryClient } from '@tanstack/react-query' import { useCallback, useEffect, useState } from 'react' import toast from 'react-hot-toast' import { useTranslation } from 'react-i18next' import { useRecoilValue } from 'recoil' -import { DaoProposalSingleCommonSelectors } from '@dao-dao/state' +import { + DaoProposalSingleCommonSelectors, + makeGetSignerOptions, +} from '@dao-dao/state' import { ProposalCrossChainRelayStatus, ProposalStatusAndInfoProps, @@ -19,9 +26,12 @@ import { ProposalStatusEnum, ProposalStatusKey, } from '@dao-dao/types' +import { ExtensionData } from '@dao-dao/types/protobuf/codegen/gaia/metaprotocols/extensions' import { DAO_CORE_ALLOW_MEMO_ON_EXECUTE_ITEM_KEY, NEUTRON_GOVERNANCE_DAO, + extractProposalDescriptionAndMetadata, + getRpcForChainId, processError, } from '@dao-dao/utils' @@ -32,6 +42,10 @@ import { UseProposalRelayStateReturn } from './useProposalRelayState' import { useWallet } from './useWallet' export type UseProposalActionStateOptions = { + /** + * Proposal description, for decoding additional execution metadata. + */ + description: string relayState: UseProposalRelayStateReturn statusKey: ProposalStatusKey loadingExecutionTxHash: LoadingData @@ -50,6 +64,7 @@ export type UseProposalActionStateReturn = Pick< * components. */ export const useProposalActionState = ({ + description, relayState, statusKey, loadingExecutionTxHash, @@ -58,8 +73,9 @@ export const useProposalActionState = ({ }: UseProposalActionStateOptions): UseProposalActionStateReturn => { const { t } = useTranslation() const { - chain: { chainId }, + chain: { chainId, chainName }, } = useConfiguredChainContext() + const queryClient = useQueryClient() const { coreAddress, info: { items }, @@ -72,6 +88,8 @@ export const useProposalActionState = ({ isWalletConnected, address: walletAddress = '', getSigningClient, + getOfflineSignerDirect, + getOfflineSigner, } = useWallet() const { isMember = false } = useMembership() @@ -89,9 +107,13 @@ export const useProposalActionState = ({ setActionLoading(false) }, [statusKey]) + const { metadata } = extractProposalDescriptionAndMetadata(description) + // If enabled, the user will be shown an input field to enter a memo for the - // execution transaction. - const allowMemoOnExecute = !!items[DAO_CORE_ALLOW_MEMO_ON_EXECUTE_ITEM_KEY] + // execution transaction, unless a memo is already set in the metadata. + const allowMemoOnExecute = metadata?.memo + ? false + : !!items[DAO_CORE_ALLOW_MEMO_ON_EXECUTE_ITEM_KEY] const [memo, setMemo] = useState('') const onExecute = useCallback(async () => { @@ -101,11 +123,59 @@ export const useProposalActionState = ({ setActionLoading(true) try { + const { metadata } = extractProposalDescriptionAndMetadata(description) + + // if gaia metaprotocols extension data exists, must use direct signer. + // amino signing does not support it i guess... + let signingClientGetter = getSigningClient + if (metadata?.gaiaMetaprotocolsExtensionData?.length) { + try { + let signer: OfflineSigner + try { + signer = getOfflineSignerDirect() + } catch { + // fallback to signer if direct signer function is unavailable. this + // may or may not be a direct signer, so verify + signer = getOfflineSigner() + if (!('signDirect' in signer)) { + throw new Error('Direct signer not available.') + } + } + + signingClientGetter = async () => + await SigningCosmWasmClient.connectWithSigner( + getRpcForChainId(chainId), + signer, + makeGetSignerOptions(queryClient)(chainName) + ) + } catch (err) { + console.error( + 'Failed to retrieve direct signer for Gaia Metaprotocols Extension proposal execution.', + err + ) + + throw new Error( + t('error.browserExtensionWalletRequiredForProposalExecution') + ) + } + } + await proposalModule.execute({ proposalId: proposalNumber, - getSigningClient, + getSigningClient: signingClientGetter, sender: walletAddress, - memo: allowMemoOnExecute && memo ? memo : undefined, + memo: metadata?.memo || (allowMemoOnExecute && memo ? memo : undefined), + nonCriticalExtensionOptions: + metadata?.gaiaMetaprotocolsExtensionData?.map( + ({ protocolId, protocolVersion, data }) => ({ + typeUrl: ExtensionData.typeUrl, + value: ExtensionData.fromPartial({ + protocolId, + protocolVersion, + data: toUtf8(data), + }), + }) + ), }) await onExecuteSuccess() @@ -120,13 +190,20 @@ export const useProposalActionState = ({ // Loading will stop on success when status refreshes. }, [ isWalletConnected, + description, + getSigningClient, proposalModule, proposalNumber, - getSigningClient, walletAddress, allowMemoOnExecute, memo, onExecuteSuccess, + getOfflineSignerDirect, + getOfflineSigner, + chainId, + queryClient, + chainName, + t, ]) const onClose = useCallback(async () => { diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposal.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposal.tsx index 4c51ea1ce..a599189ec 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposal.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposal.tsx @@ -23,6 +23,7 @@ import { MAX_NUM_PROPOSAL_CHOICES, convertExpirationToDate, dateToWdhms, + descriptionWithPotentialProposalMetadata, encodeActions, processError, } from '@dao-dao/utils' @@ -229,7 +230,10 @@ export const NewProposal = ({ options: await Promise.all( choices.map(async (option) => ({ title: option.title, - description: option.description, + description: descriptionWithPotentialProposalMetadata( + option.description, + option.metadata + ), // Type mismatch between Cosmos msgs and Secret Network Cosmos msgs. // The contract execution will fail if the messages are invalid, so // this is safe. The UI should ensure that the correct messages are diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposalMain.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposalMain.tsx index fb124250a..ad1fff5ba 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposalMain.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposalMain.tsx @@ -11,12 +11,7 @@ import { NewProposalForm } from '../../types' export const NewProposalMain = () => { const { t } = useTranslation() - const { - register, - control, - watch, - formState: { errors }, - } = useFormContext() + const { control, watch } = useFormContext() const { fields: multipleChoiceFields, @@ -39,13 +34,8 @@ export const NewProposalMain = () => { key={id} SuspenseLoader={SuspenseLoader} addOption={addOption} - control={control} - descriptionFieldName={`choices.${index}.description`} - errorsOption={errors?.choices?.[index]} optionIndex={index} - registerOption={register} removeOption={() => removeOption(index)} - titleFieldName={`choices.${index}.title`} /> ))} diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposalPreview.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposalPreview.tsx index 3484c471b..a75891bc7 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposalPreview.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/common/components/NewProposalPreview.tsx @@ -3,6 +3,7 @@ import { useFormContext } from 'react-hook-form' import { useTranslation } from 'react-i18next' import { ProposalContentDisplay } from '@dao-dao/stateless' +import { descriptionWithPotentialProposalMetadata } from '@dao-dao/utils' import { useActionEncodeContext } from '../../../../../actions' import { EntityDisplay, SuspenseLoader } from '../../../../../components' @@ -36,36 +37,41 @@ export const NewProposalPreview = () => {

{t('title.voteOptions')}

- {choices.map(({ title, description, actionData }, index) => ( - - ))} + {choices.map( + ({ title, description, metadata, actionData }, index) => ( + + ) + )} {/* None of the above */} -> { - titleFieldName: FieldName - descriptionFieldName: FieldName - errorsOption?: FieldErrors - registerOption: UseFormRegister +export type MultipleChoiceOptionEditorProps = { optionIndex: number - control: Control removeOption: () => void addOption: (value: Partial) => void SuspenseLoader: ComponentType } -export const MultipleChoiceOptionEditor = < - FV extends FieldValues, - FieldName extends Path ->({ - titleFieldName, - descriptionFieldName, - errorsOption, - registerOption, +export const MultipleChoiceOptionEditor = ({ optionIndex, removeOption, addOption, SuspenseLoader, -}: MultipleChoiceOptionEditorProps) => { +}: MultipleChoiceOptionEditorProps) => { const { t } = useTranslation() - const { watch, getValues } = useFormContext() + const { + register, + watch, + getValues, + formState: { errors }, + } = useFormContext() + + const errorsOption = errors?.choices?.[optionIndex] const [expanded, setExpanded] = useState(true) const toggleExpanded = () => { @@ -89,11 +75,11 @@ export const MultipleChoiceOptionEditor = < @@ -128,11 +114,11 @@ export const MultipleChoiceOptionEditor = < @@ -156,6 +142,12 @@ export const MultipleChoiceOptionEditor = < actionDataErrors={errorsOption?.actionData} actionDataFieldName={`choices.${optionIndex}.actionData`} /> + +
) diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/MultipleChoiceOptionViewer.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/MultipleChoiceOptionViewer.tsx index 0260bf272..5b516317b 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/MultipleChoiceOptionViewer.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/MultipleChoiceOptionViewer.tsx @@ -9,6 +9,7 @@ import { Button, DropdownIconButton, MarkdownRenderer, + ProposalExecutionMetadataRenderer, RawActionsRenderer, Tooltip, } from '@dao-dao/stateless' @@ -18,6 +19,7 @@ import { ActionKeyAndDataNoId, SuspenseLoaderProps, } from '@dao-dao/types' +import { extractProposalDescriptionAndMetadata } from '@dao-dao/utils' import { MultipleChoiceOptionData } from '../types' @@ -85,6 +87,10 @@ export const MultipleChoiceOptionViewer = ({ ) const toggleExpanded = () => setExpanded((e) => !e) + const { description, metadata } = extractProposalDescriptionAndMetadata( + choice.description + ) + return (
- {!isNoneOption && !!choice.description && ( - + {!isNoneOption && !!description && ( + )} {noMessages ? ( @@ -178,6 +184,8 @@ export const MultipleChoiceOptionViewer = ({

)} + +
) diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/ProposalInnerContentDisplay.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/ProposalInnerContentDisplay.tsx index 68af021fc..d970803d9 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/ProposalInnerContentDisplay.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/ProposalInnerContentDisplay.tsx @@ -12,7 +12,10 @@ import { MultipleChoiceProposal, MultipleChoiceVote, } from '@dao-dao/types/contracts/DaoProposalMultiple' -import { getProposalStatusKey } from '@dao-dao/utils' +import { + extractProposalDescriptionAndMetadata, + getProposalStatusKey, +} from '@dao-dao/utils' import { SuspenseLoader } from '../../../../components' import { @@ -111,11 +114,20 @@ export const InnerProposalInnerContentDisplay = ({ setDuplicateFormData({ title: proposal.title, description: proposal.description, - choices: choices.map(({ title, description, index }) => ({ - title, - description, - actionData: loadedData[index] || [], - })), + choices: choices.map(({ title, description: _description, index }) => { + const { description, metadata } = + extractProposalDescriptionAndMetadata(_description) + + return { + title, + description, + actionData: loadedData[index] || [], + metadata: metadata && { + enabled: true, + ...metadata, + }, + } + }), }) }, [ setDuplicateFormData, diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/ProposalStatusAndInfo.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/ProposalStatusAndInfo.tsx index c4d8666f1..06479cc29 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/ProposalStatusAndInfo.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/components/ProposalStatusAndInfo.tsx @@ -135,6 +135,7 @@ const InnerProposalStatusAndInfo = ({ loadingTxHash: loadingExecutionTxHash, }) const { action, footer } = useProposalActionState({ + description: winningChoice?.description || '', statusKey, relayState, loadingExecutionTxHash, diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/types.ts b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/types.ts index 00e23ab7f..ba4b9639b 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/types.ts +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalMultiple/types.ts @@ -4,6 +4,7 @@ import { DepositInfoSelector, IProposalModuleBase, ProcessedTQ, + ProposalExecutionMetadata, ProposalTimestampInfo, ProposalVoteOption, UnifiedCosmosMsg, @@ -16,22 +17,23 @@ import { MultipleChoiceVote, } from '@dao-dao/types/contracts/DaoProposalMultiple' -export interface MultipleChoiceOptionFormData { +export type MultipleChoiceOptionFormData = { title: string description: string actionData: ActionKeyAndData[] + metadata?: ProposalExecutionMetadata } -export interface NewProposalForm { +export type NewProposalForm = { title: string description: string choices: MultipleChoiceOptionFormData[] } -export interface NewProposalData { - choices: MultipleChoiceOptions - description: string +export type NewProposalData = { title: string + description: string + choices: MultipleChoiceOptions } export interface PercentOrMajorityValue { diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposal.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposal.tsx index f8d38825d..af9a70112 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposal.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposal.tsx @@ -23,6 +23,7 @@ import { BaseNewProposalProps, IProposalModuleBase } from '@dao-dao/types' import { convertExpirationToDate, dateToWdhms, + descriptionWithPotentialProposalMetadata, encodeActions, processError, } from '@dao-dao/utils' @@ -220,9 +221,13 @@ export const NewProposal = ({ title, description, actionData, + metadata, }) => ({ title, - description, + description: descriptionWithPotentialProposalMetadata( + description, + metadata + ), msgs: await encodeActions({ actionMap, encodeContext, diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposalMain.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposalMain.tsx index 0912b1921..35eafb678 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposalMain.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposalMain.tsx @@ -4,6 +4,8 @@ import { useTranslation } from 'react-i18next' import { ActionsEditor, ActionsRenderer, + ProposalExecutionMetadataEditor, + ProposalExecutionMetadataRenderer, useActionsContext, } from '@dao-dao/stateless' import { convertActionKeysAndDataToActions } from '@dao-dao/utils' @@ -28,25 +30,37 @@ export const NewProposalMain = ({ const actionKeysAndData = watch('actionData') || [] + const metadata = watch('metadata') + return (

{t('title.actions')}

{actionsReadOnlyMode ? ( - + <> + + + + ) : ( - + <> + + + + )}
) diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposalPreview.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposalPreview.tsx index 4829416b2..36eac1b02 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposalPreview.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/common/components/NewProposalPreview.tsx @@ -1,6 +1,12 @@ import { useFormContext } from 'react-hook-form' +import { useTranslation } from 'react-i18next' -import { ProposalContentDisplay, RawActionsRenderer } from '@dao-dao/stateless' +import { + ProposalContentDisplay, + ProposalExecutionMetadataRenderer, + RawActionsRenderer, +} from '@dao-dao/stateless' +import { descriptionWithPotentialProposalMetadata } from '@dao-dao/utils' import { useActionEncodeContext } from '../../../../../actions' import { EntityDisplay } from '../../../../../components' @@ -8,6 +14,7 @@ import { useEntity, useWallet } from '../../../../../hooks' import { NewProposalForm } from '../../types' export const NewProposalPreview = () => { + const { t } = useTranslation() const { watch } = useFormContext() const { address: walletAddress = '' } = useWallet() @@ -19,6 +26,7 @@ export const NewProposalPreview = () => { const proposalTitle = watch('title') const actionData = watch('actionData') || [] + const metadata = watch('metadata') return ( { address: walletAddress, entity, }} - description={proposalDescription} + description={descriptionWithPotentialProposalMetadata( + proposalDescription, + metadata + )} innerContentDisplay={ - actionData.length ? ( - - ) : undefined +
+ {actionData.length ? ( + + ) : ( +

{t('info.noProposalActions')}

+ )} + + {metadata?.enabled && ( + + )} +
} title={proposalTitle} /> diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/components/ProposalInnerContentDisplay.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/components/ProposalInnerContentDisplay.tsx index b23be1498..06d6e72a9 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/components/ProposalInnerContentDisplay.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/components/ProposalInnerContentDisplay.tsx @@ -7,6 +7,7 @@ import { ActionCardLoader, ActionsMatchAndRender, Button, + ProposalExecutionMetadataRenderer, RawActionsRenderer, useDao, } from '@dao-dao/stateless' @@ -18,7 +19,11 @@ import { } from '@dao-dao/types' import { Proposal } from '@dao-dao/types/contracts/CwProposalSingle.v1' import { SingleChoiceProposal } from '@dao-dao/types/contracts/DaoProposalSingle.v2' -import { decodeMessages, objectMatchesStructure } from '@dao-dao/utils' +import { + decodeMessages, + extractProposalDescriptionAndMetadata, + objectMatchesStructure, +} from '@dao-dao/utils' import { SuspenseLoader } from '../../../../components' import { useLoadingProposal } from '../hooks' @@ -112,34 +117,48 @@ const InnerProposalInnerContentDisplay = ({ return messages }, [chainId, coreVersion, proposal.msgs]) + const { description, metadata } = extractProposalDescriptionAndMetadata( + proposal.description + ) + const onLoad = setDuplicateFormData && ((data: ActionKeyAndData[]) => setDuplicateFormData({ title: proposal.title, - description: proposal.description, + description, actionData: data, + metadata: metadata && { + enabled: true, + ...metadata, + }, })) - return actionMessagesToDisplay.length ? ( -
- toast.success(t('info.copiedLinkToClipboard'))} - onLoad={onLoad} - /> + return ( +
+ {actionMessagesToDisplay.length ? ( + <> + toast.success(t('info.copiedLinkToClipboard'))} + onLoad={onLoad} + /> + + - + {showRaw && } + + ) : ( +

{t('info.noProposalActions')}

+ )} - {showRaw && } +
- ) : ( -

{t('info.noProposalActions')}

) } diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/components/ProposalStatusAndInfo.tsx b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/components/ProposalStatusAndInfo.tsx index 9eae4527f..a99310d42 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/components/ProposalStatusAndInfo.tsx +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/components/ProposalStatusAndInfo.tsx @@ -180,6 +180,7 @@ const InnerProposalStatusAndInfo = ({ loadingTxHash: loadingExecutionTxHash, }) const { action, footer } = useProposalActionState({ + description: proposal.description, statusKey, relayState, loadingExecutionTxHash, diff --git a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/types.ts b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/types.ts index efb755665..36142a735 100644 --- a/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/types.ts +++ b/packages/stateful/proposal-module-adapter/adapters/DaoProposalSingle/types.ts @@ -5,20 +5,24 @@ import { NeutronTimelockOverrule, PercentOrMajorityValue, ProcessedTQ, + ProposalExecutionMetadata, ProposalTimestampInfo, UnifiedCosmosMsg, } from '@dao-dao/types' import { Proposal } from '@dao-dao/types/contracts/CwProposalSingle.v1' import { SingleChoiceProposal } from '@dao-dao/types/contracts/DaoProposalSingle.v2' -export interface NewProposalForm { +export type NewProposalForm = { title: string description: string actionData: ActionKeyAndData[] + metadata?: ProposalExecutionMetadata } // Converted data from actions into Cosmos messages. -export interface NewProposalData extends Omit { +export type NewProposalData = { + title: string + description: string msgs: UnifiedCosmosMsg[] } diff --git a/packages/stateless/components/InfoLineCard.tsx b/packages/stateless/components/InfoLineCard.tsx new file mode 100644 index 000000000..4261d190b --- /dev/null +++ b/packages/stateless/components/InfoLineCard.tsx @@ -0,0 +1,72 @@ +import clsx from 'clsx' +import { ReactNode } from 'react' + +import { TooltipInfoIcon } from './tooltip' + +export type InfoLineCardProps = { + /** + * Info label. + */ + label: string + /** + * Optional tooltip to display next to the label. + */ + tooltip?: string + /** + * Optional image URL to the left of the label. + */ + imageUrl?: string + /** + * Info value. If this is a string, it will be wrapped in a

tag. + */ + value: ReactNode + /** + * Additional classes to apply to the

tag wrapping the value if a string. + */ + valueClassName?: string + /** + * Additional classes to apply to the container. + */ + className?: string +} + +export const InfoLineCard = ({ + label, + tooltip, + imageUrl, + value, + valueClassName, + className, +}: InfoLineCardProps) => { + return ( +

+
+ {imageUrl && ( +
+ )} + +

{label}

+ + {!!tooltip && ( + + )} +
+ + {typeof value === 'string' ? ( +

{value}

+ ) : ( + value + )} +
+ ) +} diff --git a/packages/stateless/components/index.ts b/packages/stateless/components/index.ts index e571bfcc5..46a50fe8c 100644 --- a/packages/stateless/components/index.ts +++ b/packages/stateless/components/index.ts @@ -37,6 +37,7 @@ export * from './GridCardContainer' export * from './HorizontalNftCard' export * from './HorizontalScroller' export * from './IbcDestinationChainPicker' +export * from './InfoLineCard' export * from './LineGraph' export * from './LineLoader' export * from './LinkWrapper' diff --git a/packages/stateless/components/inputs/Switch.tsx b/packages/stateless/components/inputs/Switch.tsx index 728da5572..431124467 100644 --- a/packages/stateless/components/inputs/Switch.tsx +++ b/packages/stateless/components/inputs/Switch.tsx @@ -1,5 +1,5 @@ import clsx from 'clsx' -import { FieldValues, UseFormSetValue } from 'react-hook-form' +import { FieldValues, UseFormSetValue, UseFormWatch } from 'react-hook-form' import { useTranslation } from 'react-i18next' import { BooleanFieldNames } from '@dao-dao/types' @@ -132,31 +132,44 @@ export type FormSwitchWrapperProps< BooleanFieldName extends BooleanFieldNames > = Omit & { fieldName: BooleanFieldName - value: boolean | undefined setValue: UseFormSetValue onToggle?: (newValue: boolean) => void -} +} & ( + | { + value: boolean | undefined + watch?: never + } + | { + value?: never + watch: UseFormWatch + } + ) export const FormSwitch = < FV extends FieldValues, BooleanFieldName extends BooleanFieldNames >({ fieldName, - value, + value: _value, + watch, setValue, onToggle, ...props -}: FormSwitchWrapperProps) => ( - { - const newValue = !value - setValue(fieldName, newValue as any) - onToggle?.(newValue) - }} - {...props} - /> -) +}: FormSwitchWrapperProps) => { + const value = _value ?? watch?.(fieldName) + + return ( + { + const newValue = !value + setValue(fieldName, newValue as any) + onToggle?.(newValue) + }} + {...props} + /> + ) +} export const FormSwitchCard = < FV extends FieldValues, diff --git a/packages/stateless/components/proposal/ProposalCard.tsx b/packages/stateless/components/proposal/ProposalCard.tsx index 9d8f686ee..a542f96ae 100644 --- a/packages/stateless/components/proposal/ProposalCard.tsx +++ b/packages/stateless/components/proposal/ProposalCard.tsx @@ -2,6 +2,7 @@ import clsx from 'clsx' import removeMarkdown from 'remove-markdown' import { ProposalCardProps } from '@dao-dao/types/components/ProposalCard' +import { extractProposalDescriptionAndMetadata } from '@dao-dao/utils' import { useDaoNavHelpers } from '../../hooks' import { DaoImage } from '../dao/DaoImage' @@ -51,7 +52,9 @@ export const ProposalCard = ({

{title}

- {removeMarkdown(description)} + {removeMarkdown( + extractProposalDescriptionAndMetadata(description).description + )}

diff --git a/packages/stateless/components/proposal/ProposalContentDisplay.tsx b/packages/stateless/components/proposal/ProposalContentDisplay.tsx index 4d34d988f..15862166b 100644 --- a/packages/stateless/components/proposal/ProposalContentDisplay.tsx +++ b/packages/stateless/components/proposal/ProposalContentDisplay.tsx @@ -11,7 +11,10 @@ import { LoadingData, StatefulEntityDisplayProps, } from '@dao-dao/types' -import { formatDate } from '@dao-dao/utils' +import { + extractProposalDescriptionAndMetadata, + formatDate, +} from '@dao-dao/utils' import { ApprovalBadge } from '../ApprovalBadge' import { CopyToClipboardUnderline } from '../CopyToClipboard' @@ -173,7 +176,9 @@ export const ProposalContentDisplay = ({ EntityDisplay={EntityDisplay} addAnchors className="max-w-full !overflow-hidden" - markdown={description} + markdown={ + extractProposalDescriptionAndMetadata(description).description + } /> {innerContentDisplay && ( diff --git a/packages/stateless/components/proposal/ProposalExecutionMetadataEditor.tsx b/packages/stateless/components/proposal/ProposalExecutionMetadataEditor.tsx new file mode 100644 index 000000000..10be41878 --- /dev/null +++ b/packages/stateless/components/proposal/ProposalExecutionMetadataEditor.tsx @@ -0,0 +1,214 @@ +import { Add, Remove } from '@mui/icons-material' +import clsx from 'clsx' +import { FieldErrors, useFieldArray, useFormContext } from 'react-hook-form' +import { useTranslation } from 'react-i18next' + +import { + Button, + ButtonLink, + CodeMirrorInput, + FormSwitch, + IconButton, + InputErrorMessage, + InputLabel, + TextInput, + Tooltip, + useChain, +} from '@dao-dao/stateless' +import { ChainId, ProposalExecutionMetadataEditorData } from '@dao-dao/types' +import { validateJSON, validateRequired } from '@dao-dao/utils' + +export type ProposalExecutionMetadataEditorProps = { + /** + * Field errors for the form fields. + */ + errors?: FieldErrors + /** + * Field name prefix for the form fields, if the `metadata` field is nested + * within another field. + */ + fieldNamePrefix?: string + /** + * Optional container class name. + */ + className?: string +} + +/** + * A form for editing proposal execution metadata. It expects to be within a + * form context whose data has a `metadata` field with type + * `ProposalExecutionMetadata`. + */ +export const ProposalExecutionMetadataEditor = ({ + errors, + fieldNamePrefix = '', + className, +}: ProposalExecutionMetadataEditorProps) => { + const { t } = useTranslation() + const { chainId } = useChain() + + const { watch, register, control, setValue, clearErrors } = + useFormContext() + + const metadataFieldName = (fieldNamePrefix + 'metadata') as 'metadata' + + const metadataEnabled = watch(`${metadataFieldName}.enabled`) + + const { + fields: gaiaMetaprotocolsExtensionDataFields, + append: appendGaiaMetaprotocolsExtensionData, + remove: removeGaiaMetaprotocolsExtensionData, + } = useFieldArray({ + control, + name: `${metadataFieldName}.gaiaMetaprotocolsExtensionData`, + }) + + return ( +
+
+ + + +
+ + {metadataEnabled && ( +
+
+ + +
+ + {/* Gaia Metaprotocols Extension Data only supported on Cosmos Hub */} + {(chainId === ChainId.CosmosHubMainnet || + chainId === ChainId.CosmosHubProviderTestnet || + chainId === ChainId.CosmosHubThetaTestnet) && ( +
0 + ? 'pb-6' + : 'pb-4' + )} + > +
+ + See the{' '} + + Cosmos Network docs + {' '} + for more information. + + } + /> + + +
+ + {gaiaMetaprotocolsExtensionDataFields.map(({ id }, index) => ( +
+ + { + removeGaiaMetaprotocolsExtensionData(index) + clearErrors( + `${metadataFieldName}.gaiaMetaprotocolsExtensionData.${index}` + ) + }} + size="sm" + variant="secondary" + /> + + +
+
+ + + +
+ +
+ + + +
+ +
+ + + +
+
+
+ ))} +
+ )} +
+ )} +
+ ) +} diff --git a/packages/stateless/components/proposal/ProposalExecutionMetadataRenderer.tsx b/packages/stateless/components/proposal/ProposalExecutionMetadataRenderer.tsx new file mode 100644 index 000000000..2e95addef --- /dev/null +++ b/packages/stateless/components/proposal/ProposalExecutionMetadataRenderer.tsx @@ -0,0 +1,129 @@ +import clsx from 'clsx' +import { Fragment } from 'react' +import { useTranslation } from 'react-i18next' + +import { + ButtonLink, + CosmosMessageDisplay, + InfoLineCard, + InputLabel, +} from '@dao-dao/stateless' +import { ProposalExecutionMetadata } from '@dao-dao/types' + +export type ProposalExecutionMetadataRendererProps = { + /** + * The metadata. If undefined or not enabled, will not render. + */ + metadata?: ProposalExecutionMetadata + /** + * Optional container class name. + */ + className?: string +} + +/** + * Renders proposal execution metadata. + */ +export const ProposalExecutionMetadataRenderer = ({ + metadata, + className, +}: ProposalExecutionMetadataRendererProps) => { + const { t } = useTranslation() + + if (!metadata) { + return null + } + + const hasExtensionData = !!metadata?.gaiaMetaprotocolsExtensionData?.length + + return ( +
+ + +
+ {metadata.memo && ( + + )} + + {hasExtensionData && ( +
+ + See the{' '} + + Cosmos Network docs + {' '} + for more information. + + } + /> + +
+ {metadata.gaiaMetaprotocolsExtensionData!.map( + ({ protocolId, protocolVersion, data }, index) => { + let stringifiedData = data + try { + stringifiedData = JSON.stringify(JSON.parse(data), null, 2) + } catch { + // Leave as string if JSON parsing fails. + } + + return ( +
+ + + + + + } + /> +
+ ) + } + )} +
+
+ )} +
+
+ ) +} diff --git a/packages/stateless/components/proposal/index.ts b/packages/stateless/components/proposal/index.ts index c04efeaed..4c9b78c20 100644 --- a/packages/stateless/components/proposal/index.ts +++ b/packages/stateless/components/proposal/index.ts @@ -10,6 +10,8 @@ export * from './ProposalCard' export * from './ProposalContentDisplay' export * from './ProposalCreatedModal' export * from './ProposalCrossChainRelayStatus' +export * from './ProposalExecutionMetadataEditor' +export * from './ProposalExecutionMetadataRenderer' export * from './ProposalIdDisplay' export * from './ProposalLine' export * from './ProposalList' diff --git a/packages/types/clients/proposal-module.ts b/packages/types/clients/proposal-module.ts index 7ceb55801..af3e8af4b 100644 --- a/packages/types/clients/proposal-module.ts +++ b/packages/types/clients/proposal-module.ts @@ -1,4 +1,5 @@ import { SigningCosmWasmClient } from '@cosmjs/cosmwasm-stargate' +import { EncodeObject } from '@cosmjs/proto-signing' import { FetchQueryOptions } from '@tanstack/react-query' import { CheckedDepositInfo, Coin, Duration } from '../contracts/common' @@ -86,6 +87,7 @@ export interface IProposalModuleBase< getSigningClient: () => Promise sender: string memo?: string + nonCriticalExtensionOptions?: EncodeObject[] }): Promise /** diff --git a/packages/types/package.json b/packages/types/package.json index bee04bee0..1869d0bdb 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.3", + "@cosmjs/proto-signing": "^0.32.3", "@cosmology/telescope": "^1.8.3", "@dao-dao/config": "2.5.0-rc.3", "@tanstack/react-query": "^5.40.0" diff --git a/packages/types/proposal.ts b/packages/types/proposal.ts index 6c75c56eb..bddf933df 100644 --- a/packages/types/proposal.ts +++ b/packages/types/proposal.ts @@ -253,3 +253,32 @@ export type ProposalTimestampInfo = { } expirationDate?: Date } + +export type GaiaMetaprotocolsExtensionData = { + protocolId: string + protocolVersion: string + data: string +} + +/** + * Metadata relevant to how to execute a proposal. + */ +export type ProposalExecutionMetadata = { + /** + * Only used during creation. + */ + enabled?: boolean + /** + * Set automatically when encoding. + */ + version?: number + memo?: string + gaiaMetaprotocolsExtensionData?: GaiaMetaprotocolsExtensionData[] +} + +/** + * Metadata used in proposal forms. + */ +export type ProposalExecutionMetadataEditorData = { + metadata?: ProposalExecutionMetadata +} diff --git a/packages/types/protobuf/codegen/OmniFlix/bundle.ts b/packages/types/protobuf/codegen/OmniFlix/bundle.ts index 14e18e63e..b527fc83e 100644 --- a/packages/types/protobuf/codegen/OmniFlix/bundle.ts +++ b/packages/types/protobuf/codegen/OmniFlix/bundle.ts @@ -1,30 +1,30 @@ -import * as _213 from "./onft/v1beta1/genesis"; -import * as _214 from "./onft/v1beta1/onft"; -import * as _215 from "./onft/v1beta1/params"; -import * as _216 from "./onft/v1beta1/query"; -import * as _217 from "./onft/v1beta1/tx"; -import * as _534 from "./onft/v1beta1/tx.amino"; -import * as _535 from "./onft/v1beta1/tx.registry"; -import * as _536 from "./onft/v1beta1/query.rpc.Query"; -import * as _537 from "./onft/v1beta1/tx.rpc.msg"; -import * as _682 from "./rpc.query"; -import * as _683 from "./rpc.tx"; +import * as _214 from "./onft/v1beta1/genesis"; +import * as _215 from "./onft/v1beta1/onft"; +import * as _216 from "./onft/v1beta1/params"; +import * as _217 from "./onft/v1beta1/query"; +import * as _218 from "./onft/v1beta1/tx"; +import * as _535 from "./onft/v1beta1/tx.amino"; +import * as _536 from "./onft/v1beta1/tx.registry"; +import * as _537 from "./onft/v1beta1/query.rpc.Query"; +import * as _538 from "./onft/v1beta1/tx.rpc.msg"; +import * as _683 from "./rpc.query"; +import * as _684 from "./rpc.tx"; export namespace OmniFlix { export namespace onft { export const v1beta1 = { - ..._213, ..._214, ..._215, ..._216, ..._217, - ..._534, + ..._218, ..._535, ..._536, - ..._537 + ..._537, + ..._538 }; } export const ClientFactory = { - ..._682, - ..._683 + ..._683, + ..._684 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/alliance/bundle.ts b/packages/types/protobuf/codegen/alliance/bundle.ts index ae1d4c10a..e59c91881 100644 --- a/packages/types/protobuf/codegen/alliance/bundle.ts +++ b/packages/types/protobuf/codegen/alliance/bundle.ts @@ -8,12 +8,12 @@ import * as _6 from "./alliance/query"; import * as _7 from "./alliance/redelegations"; import * as _8 from "./alliance/tx"; import * as _9 from "./alliance/unbonding"; -import * as _390 from "./alliance/tx.amino"; -import * as _391 from "./alliance/tx.registry"; -import * as _392 from "./alliance/query.rpc.Query"; -import * as _393 from "./alliance/tx.rpc.msg"; -import * as _658 from "./rpc.query"; -import * as _659 from "./rpc.tx"; +import * as _391 from "./alliance/tx.amino"; +import * as _392 from "./alliance/tx.registry"; +import * as _393 from "./alliance/query.rpc.Query"; +import * as _394 from "./alliance/tx.rpc.msg"; +import * as _659 from "./rpc.query"; +import * as _660 from "./rpc.tx"; export namespace alliance { export const alliance = { ..._0, @@ -26,13 +26,13 @@ export namespace alliance { ..._7, ..._8, ..._9, - ..._390, ..._391, ..._392, - ..._393 + ..._393, + ..._394 }; export const ClientFactory = { - ..._658, - ..._659 + ..._659, + ..._660 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/bitsong/bundle.ts b/packages/types/protobuf/codegen/bitsong/bundle.ts index e9cf98cab..ee9d2f7cb 100644 --- a/packages/types/protobuf/codegen/bitsong/bundle.ts +++ b/packages/types/protobuf/codegen/bitsong/bundle.ts @@ -1,22 +1,22 @@ import * as _11 from "./fantoken/v1beta1/tx"; -import * as _394 from "./fantoken/v1beta1/tx.amino"; -import * as _395 from "./fantoken/v1beta1/tx.registry"; -import * as _396 from "./fantoken/v1beta1/query.rpc.Query"; -import * as _397 from "./fantoken/v1beta1/tx.rpc.msg"; -import * as _660 from "./rpc.query"; -import * as _661 from "./rpc.tx"; +import * as _395 from "./fantoken/v1beta1/tx.amino"; +import * as _396 from "./fantoken/v1beta1/tx.registry"; +import * as _397 from "./fantoken/v1beta1/query.rpc.Query"; +import * as _398 from "./fantoken/v1beta1/tx.rpc.msg"; +import * as _661 from "./rpc.query"; +import * as _662 from "./rpc.tx"; export namespace bitsong { export const fantoken = { ..._11, - ..._394, ..._395, - ..._397, + ..._396, + ..._398, v1beta1: { - ..._396 + ..._397 } }; export const ClientFactory = { - ..._660, - ..._661 + ..._661, + ..._662 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/circle/bundle.ts b/packages/types/protobuf/codegen/circle/bundle.ts index 9c8bf32a4..dc39aad24 100644 --- a/packages/types/protobuf/codegen/circle/bundle.ts +++ b/packages/types/protobuf/codegen/circle/bundle.ts @@ -14,12 +14,12 @@ import * as _24 from "./cctp/v1/sending_and_receiving_messages_paused"; import * as _25 from "./cctp/v1/signature_threshold"; import * as _26 from "./cctp/v1/token_pair"; import * as _27 from "./cctp/v1/tx"; -import * as _398 from "./cctp/v1/tx.amino"; -import * as _399 from "./cctp/v1/tx.registry"; -import * as _400 from "./cctp/v1/query.rpc.Query"; -import * as _401 from "./cctp/v1/tx.rpc.msg"; -import * as _662 from "./rpc.query"; -import * as _663 from "./rpc.tx"; +import * as _399 from "./cctp/v1/tx.amino"; +import * as _400 from "./cctp/v1/tx.registry"; +import * as _401 from "./cctp/v1/query.rpc.Query"; +import * as _402 from "./cctp/v1/tx.rpc.msg"; +import * as _663 from "./rpc.query"; +import * as _664 from "./rpc.tx"; export namespace circle { export namespace cctp { export const v1 = { @@ -39,14 +39,14 @@ export namespace circle { ..._25, ..._26, ..._27, - ..._398, ..._399, ..._400, - ..._401 + ..._401, + ..._402 }; } export const ClientFactory = { - ..._662, - ..._663 + ..._663, + ..._664 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/cosmos/bundle.ts b/packages/types/protobuf/codegen/cosmos/bundle.ts index c2d14ea11..06291669f 100644 --- a/packages/types/protobuf/codegen/cosmos/bundle.ts +++ b/packages/types/protobuf/codegen/cosmos/bundle.ts @@ -61,55 +61,55 @@ import * as _88 from "./tx/v1beta1/tx"; import * as _89 from "./upgrade/v1beta1/query"; import * as _90 from "./upgrade/v1beta1/tx"; import * as _91 from "./upgrade/v1beta1/upgrade"; -import * as _402 from "./auth/v1beta1/tx.amino"; -import * as _403 from "./authz/v1beta1/tx.amino"; -import * as _404 from "./bank/v1beta1/tx.amino"; -import * as _405 from "./distribution/v1beta1/tx.amino"; -import * as _406 from "./feegrant/v1beta1/tx.amino"; -import * as _407 from "./gov/v1/tx.amino"; -import * as _408 from "./gov/v1beta1/tx.amino"; -import * as _409 from "./mint/v1beta1/tx.amino"; -import * as _410 from "./slashing/v1beta1/tx.amino"; -import * as _411 from "./staking/v1beta1/tx.amino"; -import * as _412 from "./upgrade/v1beta1/tx.amino"; -import * as _413 from "./auth/v1beta1/tx.registry"; -import * as _414 from "./authz/v1beta1/tx.registry"; -import * as _415 from "./bank/v1beta1/tx.registry"; -import * as _416 from "./distribution/v1beta1/tx.registry"; -import * as _417 from "./feegrant/v1beta1/tx.registry"; -import * as _418 from "./gov/v1/tx.registry"; -import * as _419 from "./gov/v1beta1/tx.registry"; -import * as _420 from "./mint/v1beta1/tx.registry"; -import * as _421 from "./slashing/v1beta1/tx.registry"; -import * as _422 from "./staking/v1beta1/tx.registry"; -import * as _423 from "./upgrade/v1beta1/tx.registry"; -import * as _424 from "./auth/v1beta1/query.rpc.Query"; -import * as _425 from "./authz/v1beta1/query.rpc.Query"; -import * as _426 from "./bank/v1beta1/query.rpc.Query"; -import * as _427 from "./base/tendermint/v1beta1/query.rpc.Service"; -import * as _428 from "./distribution/v1beta1/query.rpc.Query"; -import * as _429 from "./feegrant/v1beta1/query.rpc.Query"; -import * as _430 from "./gov/v1/query.rpc.Query"; -import * as _431 from "./gov/v1beta1/query.rpc.Query"; -import * as _432 from "./mint/v1beta1/query.rpc.Query"; -import * as _433 from "./params/v1beta1/query.rpc.Query"; -import * as _434 from "./slashing/v1beta1/query.rpc.Query"; -import * as _435 from "./staking/v1beta1/query.rpc.Query"; -import * as _436 from "./tx/v1beta1/service.rpc.Service"; -import * as _437 from "./upgrade/v1beta1/query.rpc.Query"; -import * as _438 from "./auth/v1beta1/tx.rpc.msg"; -import * as _439 from "./authz/v1beta1/tx.rpc.msg"; -import * as _440 from "./bank/v1beta1/tx.rpc.msg"; -import * as _441 from "./distribution/v1beta1/tx.rpc.msg"; -import * as _442 from "./feegrant/v1beta1/tx.rpc.msg"; -import * as _443 from "./gov/v1/tx.rpc.msg"; -import * as _444 from "./gov/v1beta1/tx.rpc.msg"; -import * as _445 from "./mint/v1beta1/tx.rpc.msg"; -import * as _446 from "./slashing/v1beta1/tx.rpc.msg"; -import * as _447 from "./staking/v1beta1/tx.rpc.msg"; -import * as _448 from "./upgrade/v1beta1/tx.rpc.msg"; -import * as _664 from "./rpc.query"; -import * as _665 from "./rpc.tx"; +import * as _403 from "./auth/v1beta1/tx.amino"; +import * as _404 from "./authz/v1beta1/tx.amino"; +import * as _405 from "./bank/v1beta1/tx.amino"; +import * as _406 from "./distribution/v1beta1/tx.amino"; +import * as _407 from "./feegrant/v1beta1/tx.amino"; +import * as _408 from "./gov/v1/tx.amino"; +import * as _409 from "./gov/v1beta1/tx.amino"; +import * as _410 from "./mint/v1beta1/tx.amino"; +import * as _411 from "./slashing/v1beta1/tx.amino"; +import * as _412 from "./staking/v1beta1/tx.amino"; +import * as _413 from "./upgrade/v1beta1/tx.amino"; +import * as _414 from "./auth/v1beta1/tx.registry"; +import * as _415 from "./authz/v1beta1/tx.registry"; +import * as _416 from "./bank/v1beta1/tx.registry"; +import * as _417 from "./distribution/v1beta1/tx.registry"; +import * as _418 from "./feegrant/v1beta1/tx.registry"; +import * as _419 from "./gov/v1/tx.registry"; +import * as _420 from "./gov/v1beta1/tx.registry"; +import * as _421 from "./mint/v1beta1/tx.registry"; +import * as _422 from "./slashing/v1beta1/tx.registry"; +import * as _423 from "./staking/v1beta1/tx.registry"; +import * as _424 from "./upgrade/v1beta1/tx.registry"; +import * as _425 from "./auth/v1beta1/query.rpc.Query"; +import * as _426 from "./authz/v1beta1/query.rpc.Query"; +import * as _427 from "./bank/v1beta1/query.rpc.Query"; +import * as _428 from "./base/tendermint/v1beta1/query.rpc.Service"; +import * as _429 from "./distribution/v1beta1/query.rpc.Query"; +import * as _430 from "./feegrant/v1beta1/query.rpc.Query"; +import * as _431 from "./gov/v1/query.rpc.Query"; +import * as _432 from "./gov/v1beta1/query.rpc.Query"; +import * as _433 from "./mint/v1beta1/query.rpc.Query"; +import * as _434 from "./params/v1beta1/query.rpc.Query"; +import * as _435 from "./slashing/v1beta1/query.rpc.Query"; +import * as _436 from "./staking/v1beta1/query.rpc.Query"; +import * as _437 from "./tx/v1beta1/service.rpc.Service"; +import * as _438 from "./upgrade/v1beta1/query.rpc.Query"; +import * as _439 from "./auth/v1beta1/tx.rpc.msg"; +import * as _440 from "./authz/v1beta1/tx.rpc.msg"; +import * as _441 from "./bank/v1beta1/tx.rpc.msg"; +import * as _442 from "./distribution/v1beta1/tx.rpc.msg"; +import * as _443 from "./feegrant/v1beta1/tx.rpc.msg"; +import * as _444 from "./gov/v1/tx.rpc.msg"; +import * as _445 from "./gov/v1beta1/tx.rpc.msg"; +import * as _446 from "./mint/v1beta1/tx.rpc.msg"; +import * as _447 from "./slashing/v1beta1/tx.rpc.msg"; +import * as _448 from "./staking/v1beta1/tx.rpc.msg"; +import * as _449 from "./upgrade/v1beta1/tx.rpc.msg"; +import * as _665 from "./rpc.query"; +import * as _666 from "./rpc.tx"; export namespace cosmos { export namespace auth { export const v1beta1 = { @@ -117,10 +117,10 @@ export namespace cosmos { ..._30, ..._31, ..._32, - ..._402, - ..._413, - ..._424, - ..._438 + ..._403, + ..._414, + ..._425, + ..._439 }; } export namespace authz { @@ -130,10 +130,10 @@ export namespace cosmos { ..._35, ..._36, ..._37, - ..._403, - ..._414, - ..._425, - ..._439 + ..._404, + ..._415, + ..._426, + ..._440 }; } export namespace bank { @@ -143,10 +143,10 @@ export namespace cosmos { ..._40, ..._41, ..._42, - ..._404, - ..._415, - ..._426, - ..._440 + ..._405, + ..._416, + ..._427, + ..._441 }; } export namespace base { @@ -164,7 +164,7 @@ export namespace cosmos { export const v1beta1 = { ..._45, ..._46, - ..._427 + ..._428 }; } export const v1beta1 = { @@ -188,10 +188,10 @@ export namespace cosmos { ..._52, ..._53, ..._54, - ..._405, - ..._416, - ..._428, - ..._441 + ..._406, + ..._417, + ..._429, + ..._442 }; } export namespace feegrant { @@ -200,10 +200,10 @@ export namespace cosmos { ..._56, ..._57, ..._58, - ..._406, - ..._417, - ..._429, - ..._442 + ..._407, + ..._418, + ..._430, + ..._443 }; } export namespace gov { @@ -212,20 +212,20 @@ export namespace cosmos { ..._60, ..._61, ..._62, - ..._407, - ..._418, - ..._430, - ..._443 + ..._408, + ..._419, + ..._431, + ..._444 }; export const v1beta1 = { ..._63, ..._64, ..._65, ..._66, - ..._408, - ..._419, - ..._431, - ..._444 + ..._409, + ..._420, + ..._432, + ..._445 }; } export namespace ics23 { @@ -239,10 +239,10 @@ export namespace cosmos { ..._69, ..._70, ..._71, - ..._409, - ..._420, - ..._432, - ..._445 + ..._410, + ..._421, + ..._433, + ..._446 }; } export namespace msg { @@ -259,7 +259,7 @@ export namespace cosmos { export const v1beta1 = { ..._74, ..._75, - ..._433 + ..._434 }; } export namespace query { @@ -273,10 +273,10 @@ export namespace cosmos { ..._78, ..._79, ..._80, - ..._410, - ..._421, - ..._434, - ..._446 + ..._411, + ..._422, + ..._435, + ..._447 }; } export namespace staking { @@ -286,10 +286,10 @@ export namespace cosmos { ..._83, ..._84, ..._85, - ..._411, - ..._422, - ..._435, - ..._447 + ..._412, + ..._423, + ..._436, + ..._448 }; } export namespace tx { @@ -301,7 +301,7 @@ export namespace cosmos { export const v1beta1 = { ..._87, ..._88, - ..._436 + ..._437 }; } export namespace upgrade { @@ -309,14 +309,14 @@ export namespace cosmos { ..._89, ..._90, ..._91, - ..._412, - ..._423, - ..._437, - ..._448 + ..._413, + ..._424, + ..._438, + ..._449 }; } export const ClientFactory = { - ..._664, - ..._665 + ..._665, + ..._666 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/cosmwasm/bundle.ts b/packages/types/protobuf/codegen/cosmwasm/bundle.ts index 28653e76b..395d96966 100644 --- a/packages/types/protobuf/codegen/cosmwasm/bundle.ts +++ b/packages/types/protobuf/codegen/cosmwasm/bundle.ts @@ -10,16 +10,16 @@ import * as _100 from "./wasm/v1/proposal"; import * as _101 from "./wasm/v1/query"; import * as _102 from "./wasm/v1/tx"; import * as _103 from "./wasm/v1/types"; -import * as _449 from "./tokenfactory/v1beta1/tx.amino"; -import * as _450 from "./wasm/v1/tx.amino"; -import * as _451 from "./tokenfactory/v1beta1/tx.registry"; -import * as _452 from "./wasm/v1/tx.registry"; -import * as _453 from "./tokenfactory/v1beta1/query.rpc.Query"; -import * as _454 from "./wasm/v1/query.rpc.Query"; -import * as _455 from "./tokenfactory/v1beta1/tx.rpc.msg"; -import * as _456 from "./wasm/v1/tx.rpc.msg"; -import * as _666 from "./rpc.query"; -import * as _667 from "./rpc.tx"; +import * as _450 from "./tokenfactory/v1beta1/tx.amino"; +import * as _451 from "./wasm/v1/tx.amino"; +import * as _452 from "./tokenfactory/v1beta1/tx.registry"; +import * as _453 from "./wasm/v1/tx.registry"; +import * as _454 from "./tokenfactory/v1beta1/query.rpc.Query"; +import * as _455 from "./wasm/v1/query.rpc.Query"; +import * as _456 from "./tokenfactory/v1beta1/tx.rpc.msg"; +import * as _457 from "./wasm/v1/tx.rpc.msg"; +import * as _667 from "./rpc.query"; +import * as _668 from "./rpc.tx"; export namespace cosmwasm { export namespace tokenfactory { export const v1beta1 = { @@ -28,10 +28,10 @@ export namespace cosmwasm { ..._94, ..._95, ..._96, - ..._449, - ..._451, - ..._453, - ..._455 + ..._450, + ..._452, + ..._454, + ..._456 }; } export namespace wasm { @@ -43,14 +43,14 @@ export namespace cosmwasm { ..._101, ..._102, ..._103, - ..._450, - ..._452, - ..._454, - ..._456 + ..._451, + ..._453, + ..._455, + ..._457 }; } export const ClientFactory = { - ..._666, - ..._667 + ..._667, + ..._668 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/feemarket/bundle.ts b/packages/types/protobuf/codegen/feemarket/bundle.ts index 9e4d87272..92600a74a 100644 --- a/packages/types/protobuf/codegen/feemarket/bundle.ts +++ b/packages/types/protobuf/codegen/feemarket/bundle.ts @@ -2,12 +2,12 @@ import * as _104 from "./feemarket/v1/genesis"; import * as _105 from "./feemarket/v1/params"; import * as _106 from "./feemarket/v1/query"; import * as _107 from "./feemarket/v1/tx"; -import * as _457 from "./feemarket/v1/tx.amino"; -import * as _458 from "./feemarket/v1/tx.registry"; -import * as _459 from "./feemarket/v1/query.rpc.Query"; -import * as _460 from "./feemarket/v1/tx.rpc.msg"; -import * as _668 from "./rpc.query"; -import * as _669 from "./rpc.tx"; +import * as _458 from "./feemarket/v1/tx.amino"; +import * as _459 from "./feemarket/v1/tx.registry"; +import * as _460 from "./feemarket/v1/query.rpc.Query"; +import * as _461 from "./feemarket/v1/tx.rpc.msg"; +import * as _669 from "./rpc.query"; +import * as _670 from "./rpc.tx"; export namespace feemarket { export namespace feemarket { export const v1 = { @@ -15,14 +15,14 @@ export namespace feemarket { ..._105, ..._106, ..._107, - ..._457, ..._458, ..._459, - ..._460 + ..._460, + ..._461 }; } export const ClientFactory = { - ..._668, - ..._669 + ..._669, + ..._670 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/gaia/bundle.ts b/packages/types/protobuf/codegen/gaia/bundle.ts index 93f1d8ed5..a86a64ffb 100644 --- a/packages/types/protobuf/codegen/gaia/bundle.ts +++ b/packages/types/protobuf/codegen/gaia/bundle.ts @@ -1,26 +1,30 @@ import * as _108 from "./globalfee/v1beta1/genesis"; import * as _109 from "./globalfee/v1beta1/query"; import * as _110 from "./globalfee/v1beta1/tx"; -import * as _461 from "./globalfee/v1beta1/tx.amino"; -import * as _462 from "./globalfee/v1beta1/tx.registry"; -import * as _463 from "./globalfee/v1beta1/query.rpc.Query"; -import * as _464 from "./globalfee/v1beta1/tx.rpc.msg"; -import * as _670 from "./rpc.query"; -import * as _671 from "./rpc.tx"; +import * as _111 from "./metaprotocols/extensions"; +import * as _462 from "./globalfee/v1beta1/tx.amino"; +import * as _463 from "./globalfee/v1beta1/tx.registry"; +import * as _464 from "./globalfee/v1beta1/query.rpc.Query"; +import * as _465 from "./globalfee/v1beta1/tx.rpc.msg"; +import * as _671 from "./rpc.query"; +import * as _672 from "./rpc.tx"; export namespace gaia { export namespace globalfee { export const v1beta1 = { ..._108, ..._109, ..._110, - ..._461, ..._462, ..._463, - ..._464 + ..._464, + ..._465 }; } + export const metaprotocols = { + ..._111 + }; export const ClientFactory = { - ..._670, - ..._671 + ..._671, + ..._672 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/gaia/metaprotocols/extensions.ts b/packages/types/protobuf/codegen/gaia/metaprotocols/extensions.ts new file mode 100644 index 000000000..e39a87dd2 --- /dev/null +++ b/packages/types/protobuf/codegen/gaia/metaprotocols/extensions.ts @@ -0,0 +1,139 @@ +import { BinaryReader, BinaryWriter } from "../../binary"; +import { bytesFromBase64, base64FromBytes } from "../../helpers"; +/** ExtensionData is a data structure that can be used in transaction extensions. */ +export interface ExtensionData { + /** + * protocol_id is the identifier of the protocol + * the field is not used internally but it is validated for correctness + */ + protocolId: string; + /** + * protocol_version is the identifier of the protocol version + * the field is not used internally but it is validated for correctness + */ + protocolVersion: string; + /** + * arbitrary bytes data that can be used to store any data + * the field is not used internally but it is validated and must be provided + */ + data: Uint8Array; +} +export interface ExtensionDataProtoMsg { + typeUrl: "/gaia.metaprotocols.ExtensionData"; + value: Uint8Array; +} +/** ExtensionData is a data structure that can be used in transaction extensions. */ +export interface ExtensionDataAmino { + /** + * protocol_id is the identifier of the protocol + * the field is not used internally but it is validated for correctness + */ + protocol_id?: string; + /** + * protocol_version is the identifier of the protocol version + * the field is not used internally but it is validated for correctness + */ + protocol_version?: string; + /** + * arbitrary bytes data that can be used to store any data + * the field is not used internally but it is validated and must be provided + */ + data?: string; +} +export interface ExtensionDataAminoMsg { + type: "/gaia.metaprotocols.ExtensionData"; + value: ExtensionDataAmino; +} +/** ExtensionData is a data structure that can be used in transaction extensions. */ +export interface ExtensionDataSDKType { + protocol_id: string; + protocol_version: string; + data: Uint8Array; +} +function createBaseExtensionData(): ExtensionData { + return { + protocolId: "", + protocolVersion: "", + data: new Uint8Array() + }; +} +export const ExtensionData = { + typeUrl: "/gaia.metaprotocols.ExtensionData", + encode(message: ExtensionData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.protocolId !== "") { + writer.uint32(10).string(message.protocolId); + } + if (message.protocolVersion !== "") { + writer.uint32(18).string(message.protocolVersion); + } + if (message.data.length !== 0) { + writer.uint32(26).bytes(message.data); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number, useInterfaces: boolean = false): ExtensionData { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseExtensionData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.protocolId = reader.string(); + break; + case 2: + message.protocolVersion = reader.string(); + break; + case 3: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): ExtensionData { + const message = createBaseExtensionData(); + message.protocolId = object.protocolId ?? ""; + message.protocolVersion = object.protocolVersion ?? ""; + message.data = object.data ?? new Uint8Array(); + return message; + }, + fromAmino(object: ExtensionDataAmino): ExtensionData { + const message = createBaseExtensionData(); + if (object.protocol_id !== undefined && object.protocol_id !== null) { + message.protocolId = object.protocol_id; + } + if (object.protocol_version !== undefined && object.protocol_version !== null) { + message.protocolVersion = object.protocol_version; + } + if (object.data !== undefined && object.data !== null) { + message.data = bytesFromBase64(object.data); + } + return message; + }, + toAmino(message: ExtensionData, useInterfaces: boolean = false): ExtensionDataAmino { + const obj: any = {}; + obj.protocol_id = message.protocolId === "" ? undefined : message.protocolId; + obj.protocol_version = message.protocolVersion === "" ? undefined : message.protocolVersion; + obj.data = message.data ? base64FromBytes(message.data) : undefined; + return obj; + }, + fromAminoMsg(object: ExtensionDataAminoMsg): ExtensionData { + return ExtensionData.fromAmino(object.value); + }, + fromProtoMsg(message: ExtensionDataProtoMsg, useInterfaces: boolean = false): ExtensionData { + return ExtensionData.decode(message.value, undefined, useInterfaces); + }, + toProto(message: ExtensionData): Uint8Array { + return ExtensionData.encode(message).finish(); + }, + toProtoMsg(message: ExtensionData): ExtensionDataProtoMsg { + return { + typeUrl: "/gaia.metaprotocols.ExtensionData", + value: ExtensionData.encode(message).finish() + }; + } +}; \ No newline at end of file diff --git a/packages/types/protobuf/codegen/gogoproto/bundle.ts b/packages/types/protobuf/codegen/gogoproto/bundle.ts index 9b9cbe3c4..01dc8250b 100644 --- a/packages/types/protobuf/codegen/gogoproto/bundle.ts +++ b/packages/types/protobuf/codegen/gogoproto/bundle.ts @@ -1,4 +1,4 @@ -import * as _111 from "./gogo"; +import * as _112 from "./gogo"; export const gogoproto = { - ..._111 + ..._112 }; \ No newline at end of file diff --git a/packages/types/protobuf/codegen/google/bundle.ts b/packages/types/protobuf/codegen/google/bundle.ts index 2f2bd6e9c..fee15fbe6 100644 --- a/packages/types/protobuf/codegen/google/bundle.ts +++ b/packages/types/protobuf/codegen/google/bundle.ts @@ -1,20 +1,20 @@ -import * as _112 from "./api/annotations"; -import * as _113 from "./api/http"; -import * as _114 from "./protobuf/any"; -import * as _115 from "./protobuf/descriptor"; -import * as _116 from "./protobuf/duration"; -import * as _117 from "./protobuf/empty"; -import * as _118 from "./protobuf/timestamp"; +import * as _113 from "./api/annotations"; +import * as _114 from "./api/http"; +import * as _115 from "./protobuf/any"; +import * as _116 from "./protobuf/descriptor"; +import * as _117 from "./protobuf/duration"; +import * as _118 from "./protobuf/empty"; +import * as _119 from "./protobuf/timestamp"; export namespace google { export const api = { - ..._112, - ..._113 + ..._113, + ..._114 }; export const protobuf = { - ..._114, ..._115, ..._116, ..._117, - ..._118 + ..._118, + ..._119 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/ibc/bundle.ts b/packages/types/protobuf/codegen/ibc/bundle.ts index b8d15add3..a6bec3732 100644 --- a/packages/types/protobuf/codegen/ibc/bundle.ts +++ b/packages/types/protobuf/codegen/ibc/bundle.ts @@ -1,154 +1,154 @@ -import * as _119 from "./applications/interchain_accounts/controller/v1/controller"; -import * as _120 from "./applications/interchain_accounts/controller/v1/query"; -import * as _121 from "./applications/interchain_accounts/controller/v1/tx"; -import * as _122 from "./applications/interchain_accounts/host/v1/host"; -import * as _123 from "./applications/interchain_accounts/host/v1/query"; -import * as _124 from "./applications/interchain_accounts/host/v1/tx"; -import * as _125 from "./applications/interchain_accounts/v1/account"; -import * as _126 from "./applications/interchain_accounts/v1/metadata"; -import * as _127 from "./applications/interchain_accounts/v1/packet"; -import * as _128 from "./applications/transfer/v1/authz"; -import * as _129 from "./applications/transfer/v1/genesis"; -import * as _130 from "./applications/transfer/v1/query"; -import * as _131 from "./applications/transfer/v1/transfer"; -import * as _132 from "./applications/transfer/v1/tx"; -import * as _133 from "./core/channel/v1/channel"; -import * as _134 from "./core/channel/v1/genesis"; -import * as _135 from "./core/channel/v1/query"; -import * as _136 from "./core/channel/v1/tx"; -import * as _137 from "./core/client/v1/client"; -import * as _138 from "./core/client/v1/genesis"; -import * as _139 from "./core/client/v1/query"; -import * as _140 from "./core/client/v1/tx"; -import * as _141 from "./core/commitment/v1/commitment"; -import * as _142 from "./core/connection/v1/connection"; -import * as _143 from "./core/connection/v1/genesis"; -import * as _144 from "./core/connection/v1/query"; -import * as _145 from "./core/connection/v1/tx"; -import * as _146 from "./lightclients/tendermint/v1/tendermint"; -import * as _465 from "./applications/interchain_accounts/controller/v1/tx.amino"; -import * as _466 from "./applications/interchain_accounts/host/v1/tx.amino"; -import * as _467 from "./applications/transfer/v1/tx.amino"; -import * as _468 from "./core/channel/v1/tx.amino"; -import * as _469 from "./core/client/v1/tx.amino"; -import * as _470 from "./core/connection/v1/tx.amino"; -import * as _471 from "./applications/interchain_accounts/controller/v1/tx.registry"; -import * as _472 from "./applications/interchain_accounts/host/v1/tx.registry"; -import * as _473 from "./applications/transfer/v1/tx.registry"; -import * as _474 from "./core/channel/v1/tx.registry"; -import * as _475 from "./core/client/v1/tx.registry"; -import * as _476 from "./core/connection/v1/tx.registry"; -import * as _477 from "./applications/interchain_accounts/controller/v1/query.rpc.Query"; -import * as _478 from "./applications/interchain_accounts/host/v1/query.rpc.Query"; -import * as _479 from "./applications/transfer/v1/query.rpc.Query"; -import * as _480 from "./core/channel/v1/query.rpc.Query"; -import * as _481 from "./core/client/v1/query.rpc.Query"; -import * as _482 from "./core/connection/v1/query.rpc.Query"; -import * as _483 from "./applications/interchain_accounts/controller/v1/tx.rpc.msg"; -import * as _484 from "./applications/interchain_accounts/host/v1/tx.rpc.msg"; -import * as _485 from "./applications/transfer/v1/tx.rpc.msg"; -import * as _486 from "./core/channel/v1/tx.rpc.msg"; -import * as _487 from "./core/client/v1/tx.rpc.msg"; -import * as _488 from "./core/connection/v1/tx.rpc.msg"; -import * as _672 from "./rpc.query"; -import * as _673 from "./rpc.tx"; +import * as _120 from "./applications/interchain_accounts/controller/v1/controller"; +import * as _121 from "./applications/interchain_accounts/controller/v1/query"; +import * as _122 from "./applications/interchain_accounts/controller/v1/tx"; +import * as _123 from "./applications/interchain_accounts/host/v1/host"; +import * as _124 from "./applications/interchain_accounts/host/v1/query"; +import * as _125 from "./applications/interchain_accounts/host/v1/tx"; +import * as _126 from "./applications/interchain_accounts/v1/account"; +import * as _127 from "./applications/interchain_accounts/v1/metadata"; +import * as _128 from "./applications/interchain_accounts/v1/packet"; +import * as _129 from "./applications/transfer/v1/authz"; +import * as _130 from "./applications/transfer/v1/genesis"; +import * as _131 from "./applications/transfer/v1/query"; +import * as _132 from "./applications/transfer/v1/transfer"; +import * as _133 from "./applications/transfer/v1/tx"; +import * as _134 from "./core/channel/v1/channel"; +import * as _135 from "./core/channel/v1/genesis"; +import * as _136 from "./core/channel/v1/query"; +import * as _137 from "./core/channel/v1/tx"; +import * as _138 from "./core/client/v1/client"; +import * as _139 from "./core/client/v1/genesis"; +import * as _140 from "./core/client/v1/query"; +import * as _141 from "./core/client/v1/tx"; +import * as _142 from "./core/commitment/v1/commitment"; +import * as _143 from "./core/connection/v1/connection"; +import * as _144 from "./core/connection/v1/genesis"; +import * as _145 from "./core/connection/v1/query"; +import * as _146 from "./core/connection/v1/tx"; +import * as _147 from "./lightclients/tendermint/v1/tendermint"; +import * as _466 from "./applications/interchain_accounts/controller/v1/tx.amino"; +import * as _467 from "./applications/interchain_accounts/host/v1/tx.amino"; +import * as _468 from "./applications/transfer/v1/tx.amino"; +import * as _469 from "./core/channel/v1/tx.amino"; +import * as _470 from "./core/client/v1/tx.amino"; +import * as _471 from "./core/connection/v1/tx.amino"; +import * as _472 from "./applications/interchain_accounts/controller/v1/tx.registry"; +import * as _473 from "./applications/interchain_accounts/host/v1/tx.registry"; +import * as _474 from "./applications/transfer/v1/tx.registry"; +import * as _475 from "./core/channel/v1/tx.registry"; +import * as _476 from "./core/client/v1/tx.registry"; +import * as _477 from "./core/connection/v1/tx.registry"; +import * as _478 from "./applications/interchain_accounts/controller/v1/query.rpc.Query"; +import * as _479 from "./applications/interchain_accounts/host/v1/query.rpc.Query"; +import * as _480 from "./applications/transfer/v1/query.rpc.Query"; +import * as _481 from "./core/channel/v1/query.rpc.Query"; +import * as _482 from "./core/client/v1/query.rpc.Query"; +import * as _483 from "./core/connection/v1/query.rpc.Query"; +import * as _484 from "./applications/interchain_accounts/controller/v1/tx.rpc.msg"; +import * as _485 from "./applications/interchain_accounts/host/v1/tx.rpc.msg"; +import * as _486 from "./applications/transfer/v1/tx.rpc.msg"; +import * as _487 from "./core/channel/v1/tx.rpc.msg"; +import * as _488 from "./core/client/v1/tx.rpc.msg"; +import * as _489 from "./core/connection/v1/tx.rpc.msg"; +import * as _673 from "./rpc.query"; +import * as _674 from "./rpc.tx"; export namespace ibc { export namespace applications { export namespace interchain_accounts { export namespace controller { export const v1 = { - ..._119, ..._120, ..._121, - ..._465, - ..._471, - ..._477, - ..._483 + ..._122, + ..._466, + ..._472, + ..._478, + ..._484 }; } export namespace host { export const v1 = { - ..._122, ..._123, ..._124, - ..._466, - ..._472, - ..._478, - ..._484 + ..._125, + ..._467, + ..._473, + ..._479, + ..._485 }; } export const v1 = { - ..._125, ..._126, - ..._127 + ..._127, + ..._128 }; } export namespace transfer { export const v1 = { - ..._128, ..._129, ..._130, ..._131, ..._132, - ..._467, - ..._473, - ..._479, - ..._485 + ..._133, + ..._468, + ..._474, + ..._480, + ..._486 }; } } export namespace core { export namespace channel { export const v1 = { - ..._133, ..._134, ..._135, ..._136, - ..._468, - ..._474, - ..._480, - ..._486 + ..._137, + ..._469, + ..._475, + ..._481, + ..._487 }; } export namespace client { export const v1 = { - ..._137, ..._138, ..._139, ..._140, - ..._469, - ..._475, - ..._481, - ..._487 + ..._141, + ..._470, + ..._476, + ..._482, + ..._488 }; } export namespace commitment { export const v1 = { - ..._141 + ..._142 }; } export namespace connection { export const v1 = { - ..._142, ..._143, ..._144, ..._145, - ..._470, - ..._476, - ..._482, - ..._488 + ..._146, + ..._471, + ..._477, + ..._483, + ..._489 }; } } export namespace lightclients { export namespace tendermint { export const v1 = { - ..._146 + ..._147 }; } } export const ClientFactory = { - ..._672, - ..._673 + ..._673, + ..._674 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/interchain_security/bundle.ts b/packages/types/protobuf/codegen/interchain_security/bundle.ts index 6e9085ee0..03a248605 100644 --- a/packages/types/protobuf/codegen/interchain_security/bundle.ts +++ b/packages/types/protobuf/codegen/interchain_security/bundle.ts @@ -1,36 +1,36 @@ -import * as _147 from "./ccv/consumer/v1/consumer"; -import * as _148 from "./ccv/consumer/v1/genesis"; -import * as _149 from "./ccv/consumer/v1/query"; -import * as _150 from "./ccv/consumer/v1/tx"; -import * as _151 from "./ccv/v1/shared_consumer"; -import * as _152 from "./ccv/v1/wire"; -import * as _489 from "./ccv/consumer/v1/tx.amino"; -import * as _490 from "./ccv/consumer/v1/tx.registry"; -import * as _491 from "./ccv/consumer/v1/query.rpc.Query"; -import * as _492 from "./ccv/consumer/v1/tx.rpc.msg"; -import * as _674 from "./rpc.query"; -import * as _675 from "./rpc.tx"; +import * as _148 from "./ccv/consumer/v1/consumer"; +import * as _149 from "./ccv/consumer/v1/genesis"; +import * as _150 from "./ccv/consumer/v1/query"; +import * as _151 from "./ccv/consumer/v1/tx"; +import * as _152 from "./ccv/v1/shared_consumer"; +import * as _153 from "./ccv/v1/wire"; +import * as _490 from "./ccv/consumer/v1/tx.amino"; +import * as _491 from "./ccv/consumer/v1/tx.registry"; +import * as _492 from "./ccv/consumer/v1/query.rpc.Query"; +import * as _493 from "./ccv/consumer/v1/tx.rpc.msg"; +import * as _675 from "./rpc.query"; +import * as _676 from "./rpc.tx"; export namespace interchain_security { export namespace ccv { export namespace consumer { export const v1 = { - ..._147, ..._148, ..._149, ..._150, - ..._489, + ..._151, ..._490, ..._491, - ..._492 + ..._492, + ..._493 }; } export const v1 = { - ..._151, - ..._152 + ..._152, + ..._153 }; } export const ClientFactory = { - ..._674, - ..._675 + ..._675, + ..._676 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/juno/bundle.ts b/packages/types/protobuf/codegen/juno/bundle.ts index f9211da00..e1e37b25c 100644 --- a/packages/types/protobuf/codegen/juno/bundle.ts +++ b/packages/types/protobuf/codegen/juno/bundle.ts @@ -1,46 +1,46 @@ -import * as _153 from "./feeshare/v1/feeshare"; -import * as _154 from "./feeshare/v1/genesis"; -import * as _155 from "./feeshare/v1/query"; -import * as _156 from "./feeshare/v1/tx"; -import * as _157 from "./mint/genesis"; -import * as _158 from "./mint/mint"; -import * as _159 from "./mint/query"; -import * as _160 from "./mint/tx"; -import * as _493 from "./feeshare/v1/tx.amino"; -import * as _494 from "./mint/tx.amino"; -import * as _495 from "./feeshare/v1/tx.registry"; -import * as _496 from "./mint/tx.registry"; -import * as _497 from "./feeshare/v1/query.rpc.Query"; -import * as _498 from "./mint/query.rpc.Query"; -import * as _499 from "./feeshare/v1/tx.rpc.msg"; -import * as _500 from "./mint/tx.rpc.msg"; -import * as _676 from "./rpc.query"; -import * as _677 from "./rpc.tx"; +import * as _154 from "./feeshare/v1/feeshare"; +import * as _155 from "./feeshare/v1/genesis"; +import * as _156 from "./feeshare/v1/query"; +import * as _157 from "./feeshare/v1/tx"; +import * as _158 from "./mint/genesis"; +import * as _159 from "./mint/mint"; +import * as _160 from "./mint/query"; +import * as _161 from "./mint/tx"; +import * as _494 from "./feeshare/v1/tx.amino"; +import * as _495 from "./mint/tx.amino"; +import * as _496 from "./feeshare/v1/tx.registry"; +import * as _497 from "./mint/tx.registry"; +import * as _498 from "./feeshare/v1/query.rpc.Query"; +import * as _499 from "./mint/query.rpc.Query"; +import * as _500 from "./feeshare/v1/tx.rpc.msg"; +import * as _501 from "./mint/tx.rpc.msg"; +import * as _677 from "./rpc.query"; +import * as _678 from "./rpc.tx"; export namespace juno { export namespace feeshare { export const v1 = { - ..._153, ..._154, ..._155, ..._156, - ..._493, - ..._495, - ..._497, - ..._499 + ..._157, + ..._494, + ..._496, + ..._498, + ..._500 }; } export const mint = { - ..._157, ..._158, ..._159, ..._160, - ..._494, - ..._496, - ..._498, - ..._500 + ..._161, + ..._495, + ..._497, + ..._499, + ..._501 }; export const ClientFactory = { - ..._676, - ..._677 + ..._677, + ..._678 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/kujira/bundle.ts b/packages/types/protobuf/codegen/kujira/bundle.ts index 9c637bc78..5aec61686 100644 --- a/packages/types/protobuf/codegen/kujira/bundle.ts +++ b/packages/types/protobuf/codegen/kujira/bundle.ts @@ -1,60 +1,60 @@ -import * as _161 from "./denom/authorityMetadata"; -import * as _162 from "./denom/genesis"; -import * as _163 from "./denom/params"; -import * as _164 from "./denom/query"; -import * as _165 from "./denom/tx"; -import * as _166 from "./oracle/genesis"; -import * as _167 from "./oracle/oracle"; -import * as _168 from "./oracle/query"; -import * as _169 from "./oracle/tx"; -import * as _170 from "./scheduler/genesis"; -import * as _171 from "./scheduler/hook"; -import * as _172 from "./scheduler/params"; -import * as _173 from "./scheduler/proposal"; -import * as _174 from "./scheduler/query"; -import * as _501 from "./denom/tx.amino"; -import * as _502 from "./oracle/tx.amino"; -import * as _503 from "./denom/tx.registry"; -import * as _504 from "./oracle/tx.registry"; -import * as _505 from "./denom/query.rpc.Query"; -import * as _506 from "./oracle/query.rpc.Query"; -import * as _507 from "./scheduler/query.rpc.Query"; -import * as _508 from "./denom/tx.rpc.msg"; -import * as _509 from "./oracle/tx.rpc.msg"; -import * as _678 from "./rpc.query"; -import * as _679 from "./rpc.tx"; +import * as _162 from "./denom/authorityMetadata"; +import * as _163 from "./denom/genesis"; +import * as _164 from "./denom/params"; +import * as _165 from "./denom/query"; +import * as _166 from "./denom/tx"; +import * as _167 from "./oracle/genesis"; +import * as _168 from "./oracle/oracle"; +import * as _169 from "./oracle/query"; +import * as _170 from "./oracle/tx"; +import * as _171 from "./scheduler/genesis"; +import * as _172 from "./scheduler/hook"; +import * as _173 from "./scheduler/params"; +import * as _174 from "./scheduler/proposal"; +import * as _175 from "./scheduler/query"; +import * as _502 from "./denom/tx.amino"; +import * as _503 from "./oracle/tx.amino"; +import * as _504 from "./denom/tx.registry"; +import * as _505 from "./oracle/tx.registry"; +import * as _506 from "./denom/query.rpc.Query"; +import * as _507 from "./oracle/query.rpc.Query"; +import * as _508 from "./scheduler/query.rpc.Query"; +import * as _509 from "./denom/tx.rpc.msg"; +import * as _510 from "./oracle/tx.rpc.msg"; +import * as _679 from "./rpc.query"; +import * as _680 from "./rpc.tx"; export namespace kujira { export const denom = { - ..._161, ..._162, ..._163, ..._164, ..._165, - ..._501, - ..._503, - ..._505, - ..._508 - }; - export const oracle = { ..._166, - ..._167, - ..._168, - ..._169, ..._502, ..._504, ..._506, ..._509 }; - export const scheduler = { + export const oracle = { + ..._167, + ..._168, + ..._169, ..._170, + ..._503, + ..._505, + ..._507, + ..._510 + }; + export const scheduler = { ..._171, ..._172, ..._173, ..._174, - ..._507 + ..._175, + ..._508 }; export const ClientFactory = { - ..._678, - ..._679 + ..._679, + ..._680 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/neutron/bundle.ts b/packages/types/protobuf/codegen/neutron/bundle.ts index 50b80b8d1..dc8c5d7fc 100644 --- a/packages/types/protobuf/codegen/neutron/bundle.ts +++ b/packages/types/protobuf/codegen/neutron/bundle.ts @@ -1,86 +1,85 @@ -import * as _175 from "./contractmanager/v1/failure"; -import * as _176 from "./cron/genesis"; -import * as _177 from "./cron/params"; -import * as _178 from "./cron/query"; -import * as _179 from "./cron/schedule"; -import * as _180 from "./cron/tx"; -import * as _181 from "./dex/deposit_record"; -import * as _182 from "./dex/genesis"; -import * as _183 from "./dex/limit_order_expiration"; -import * as _184 from "./dex/limit_order_tranche_user"; -import * as _185 from "./dex/limit_order_tranche"; -import * as _186 from "./dex/pair_id"; -import * as _187 from "./dex/params"; -import * as _188 from "./dex/pool_metadata"; -import * as _189 from "./dex/pool_reserves"; -import * as _190 from "./dex/pool"; -import * as _191 from "./dex/query"; -import * as _192 from "./dex/tick_liquidity"; -import * as _193 from "./dex/trade_pair_id"; -import * as _194 from "./dex/tx"; -import * as _195 from "./feeburner/genesis"; -import * as _196 from "./feeburner/params"; -import * as _197 from "./feeburner/query"; -import * as _198 from "./feeburner/total_burned_neutrons_amount"; -import * as _199 from "./feeburner/tx"; -import * as _200 from "./feerefunder/fee"; -import * as _201 from "./feerefunder/genesis"; -import * as _202 from "./feerefunder/params"; -import * as _203 from "./feerefunder/query"; -import * as _204 from "./feerefunder/tx"; -import * as _205 from "./interchainqueries/genesis"; -import * as _206 from "./interchainqueries/params"; -import * as _207 from "./interchainqueries/query"; -import * as _208 from "./interchainqueries/tx"; -import * as _209 from "./interchaintxs/v1/genesis"; -import * as _210 from "./interchaintxs/v1/params"; -import * as _211 from "./interchaintxs/v1/query"; -import * as _212 from "./interchaintxs/v1/tx"; -import * as _510 from "./cron/tx.amino"; -import * as _511 from "./dex/tx.amino"; -import * as _512 from "./feeburner/tx.amino"; -import * as _513 from "./feerefunder/tx.amino"; -import * as _514 from "./interchainqueries/tx.amino"; -import * as _515 from "./interchaintxs/v1/tx.amino"; -import * as _516 from "./cron/tx.registry"; -import * as _517 from "./dex/tx.registry"; -import * as _518 from "./feeburner/tx.registry"; -import * as _519 from "./feerefunder/tx.registry"; -import * as _520 from "./interchainqueries/tx.registry"; -import * as _521 from "./interchaintxs/v1/tx.registry"; -import * as _522 from "./cron/query.rpc.Query"; -import * as _523 from "./dex/query.rpc.Query"; -import * as _524 from "./feeburner/query.rpc.Query"; -import * as _525 from "./feerefunder/query.rpc.Query"; -import * as _526 from "./interchainqueries/query.rpc.Query"; -import * as _527 from "./interchaintxs/v1/query.rpc.Query"; -import * as _528 from "./cron/tx.rpc.msg"; -import * as _529 from "./dex/tx.rpc.msg"; -import * as _530 from "./feeburner/tx.rpc.msg"; -import * as _531 from "./feerefunder/tx.rpc.msg"; -import * as _532 from "./interchainqueries/tx.rpc.msg"; -import * as _533 from "./interchaintxs/v1/tx.rpc.msg"; -import * as _680 from "./rpc.query"; -import * as _681 from "./rpc.tx"; +import * as _176 from "./contractmanager/v1/failure"; +import * as _177 from "./cron/genesis"; +import * as _178 from "./cron/params"; +import * as _179 from "./cron/query"; +import * as _180 from "./cron/schedule"; +import * as _181 from "./cron/tx"; +import * as _182 from "./dex/deposit_record"; +import * as _183 from "./dex/genesis"; +import * as _184 from "./dex/limit_order_expiration"; +import * as _185 from "./dex/limit_order_tranche_user"; +import * as _186 from "./dex/limit_order_tranche"; +import * as _187 from "./dex/pair_id"; +import * as _188 from "./dex/params"; +import * as _189 from "./dex/pool_metadata"; +import * as _190 from "./dex/pool_reserves"; +import * as _191 from "./dex/pool"; +import * as _192 from "./dex/query"; +import * as _193 from "./dex/tick_liquidity"; +import * as _194 from "./dex/trade_pair_id"; +import * as _195 from "./dex/tx"; +import * as _196 from "./feeburner/genesis"; +import * as _197 from "./feeburner/params"; +import * as _198 from "./feeburner/query"; +import * as _199 from "./feeburner/total_burned_neutrons_amount"; +import * as _200 from "./feeburner/tx"; +import * as _201 from "./feerefunder/fee"; +import * as _202 from "./feerefunder/genesis"; +import * as _203 from "./feerefunder/params"; +import * as _204 from "./feerefunder/query"; +import * as _205 from "./feerefunder/tx"; +import * as _206 from "./interchainqueries/genesis"; +import * as _207 from "./interchainqueries/params"; +import * as _208 from "./interchainqueries/query"; +import * as _209 from "./interchainqueries/tx"; +import * as _210 from "./interchaintxs/v1/genesis"; +import * as _211 from "./interchaintxs/v1/params"; +import * as _212 from "./interchaintxs/v1/query"; +import * as _213 from "./interchaintxs/v1/tx"; +import * as _511 from "./cron/tx.amino"; +import * as _512 from "./dex/tx.amino"; +import * as _513 from "./feeburner/tx.amino"; +import * as _514 from "./feerefunder/tx.amino"; +import * as _515 from "./interchainqueries/tx.amino"; +import * as _516 from "./interchaintxs/v1/tx.amino"; +import * as _517 from "./cron/tx.registry"; +import * as _518 from "./dex/tx.registry"; +import * as _519 from "./feeburner/tx.registry"; +import * as _520 from "./feerefunder/tx.registry"; +import * as _521 from "./interchainqueries/tx.registry"; +import * as _522 from "./interchaintxs/v1/tx.registry"; +import * as _523 from "./cron/query.rpc.Query"; +import * as _524 from "./dex/query.rpc.Query"; +import * as _525 from "./feeburner/query.rpc.Query"; +import * as _526 from "./feerefunder/query.rpc.Query"; +import * as _527 from "./interchainqueries/query.rpc.Query"; +import * as _528 from "./interchaintxs/v1/query.rpc.Query"; +import * as _529 from "./cron/tx.rpc.msg"; +import * as _530 from "./dex/tx.rpc.msg"; +import * as _531 from "./feeburner/tx.rpc.msg"; +import * as _532 from "./feerefunder/tx.rpc.msg"; +import * as _533 from "./interchainqueries/tx.rpc.msg"; +import * as _534 from "./interchaintxs/v1/tx.rpc.msg"; +import * as _681 from "./rpc.query"; +import * as _682 from "./rpc.tx"; export namespace neutron { export namespace contractmanager { export const v1 = { - ..._175 + ..._176 }; } export const cron = { - ..._176, ..._177, ..._178, ..._179, ..._180, - ..._510, - ..._516, - ..._522, - ..._528 + ..._181, + ..._511, + ..._517, + ..._523, + ..._529 }; export const dex = { - ..._181, ..._182, ..._183, ..._184, @@ -94,57 +93,58 @@ export namespace neutron { ..._192, ..._193, ..._194, - ..._511, - ..._517, - ..._523, - ..._529 - }; - export const feeburner = { ..._195, - ..._196, - ..._197, - ..._198, - ..._199, ..._512, ..._518, ..._524, ..._530 }; - export const feerefunder = { + export const feeburner = { + ..._196, + ..._197, + ..._198, + ..._199, ..._200, - ..._201, - ..._202, - ..._203, - ..._204, ..._513, ..._519, ..._525, ..._531 }; - export const interchainqueries = { + export const feerefunder = { + ..._201, + ..._202, + ..._203, + ..._204, ..._205, - ..._206, - ..._207, - ..._208, ..._514, ..._520, ..._526, ..._532 }; + export const interchainqueries = { + ..._206, + ..._207, + ..._208, + ..._209, + ..._515, + ..._521, + ..._527, + ..._533 + }; export namespace interchaintxs { export const v1 = { - ..._209, ..._210, ..._211, ..._212, - ..._515, - ..._521, - ..._527, - ..._533 + ..._213, + ..._516, + ..._522, + ..._528, + ..._534 }; } export const ClientFactory = { - ..._680, - ..._681 + ..._681, + ..._682 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/noble/bundle.ts b/packages/types/protobuf/codegen/noble/bundle.ts index e21e78f34..9d7732972 100644 --- a/packages/types/protobuf/codegen/noble/bundle.ts +++ b/packages/types/protobuf/codegen/noble/bundle.ts @@ -1,16 +1,16 @@ -import * as _377 from "../tariff/genesis"; -import * as _378 from "../tariff/params"; -import * as _379 from "../tariff/query"; -import * as _657 from "../tariff/query.rpc.Query"; -import * as _694 from "./rpc.query"; +import * as _378 from "../tariff/genesis"; +import * as _379 from "../tariff/params"; +import * as _380 from "../tariff/query"; +import * as _658 from "../tariff/query.rpc.Query"; +import * as _695 from "./rpc.query"; export namespace noble { export const tariff = { - ..._377, ..._378, ..._379, - ..._657 + ..._380, + ..._658 }; export const ClientFactory = { - ..._694 + ..._695 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/osmosis/bundle.ts b/packages/types/protobuf/codegen/osmosis/bundle.ts index 63db06ff2..49c33233e 100644 --- a/packages/types/protobuf/codegen/osmosis/bundle.ts +++ b/packages/types/protobuf/codegen/osmosis/bundle.ts @@ -1,166 +1,165 @@ -import * as _218 from "./accum/v1beta1/accum"; -import * as _219 from "./concentratedliquidity/params"; -import * as _220 from "./cosmwasmpool/v1beta1/genesis"; -import * as _221 from "./cosmwasmpool/v1beta1/gov"; -import * as _222 from "./cosmwasmpool/v1beta1/model/instantiate_msg"; -import * as _223 from "./cosmwasmpool/v1beta1/model/module_query_msg"; -import * as _224 from "./cosmwasmpool/v1beta1/model/module_sudo_msg"; -import * as _225 from "./cosmwasmpool/v1beta1/model/pool_query_msg"; -import * as _226 from "./cosmwasmpool/v1beta1/model/pool"; -import * as _227 from "./cosmwasmpool/v1beta1/model/transmuter_msgs"; -import * as _228 from "./cosmwasmpool/v1beta1/model/tx"; -import * as _229 from "./cosmwasmpool/v1beta1/params"; -import * as _230 from "./cosmwasmpool/v1beta1/query"; -import * as _231 from "./cosmwasmpool/v1beta1/tx"; -import * as _232 from "./gamm/poolmodels/balancer/v1beta1/tx"; -import * as _233 from "./gamm/poolmodels/stableswap/v1beta1/stableswap_pool"; -import * as _234 from "./gamm/poolmodels/stableswap/v1beta1/tx"; -import * as _235 from "./gamm/v1beta1/balancerPool"; -import * as _236 from "./gamm/v1beta1/genesis"; -import * as _237 from "./gamm/v1beta1/gov"; -import * as _238 from "./gamm/v1beta1/params"; -import * as _239 from "./gamm/v1beta1/query"; -import * as _240 from "./gamm/v1beta1/shared"; -import * as _241 from "./gamm/v1beta1/tx"; -import * as _242 from "./incentives/gauge"; -import * as _243 from "./incentives/genesis"; -import * as _244 from "./incentives/gov"; -import * as _245 from "./incentives/group"; -import * as _246 from "./incentives/params"; -import * as _247 from "./incentives/query"; -import * as _248 from "./incentives/tx"; -import * as _249 from "./lockup/genesis"; -import * as _250 from "./lockup/lock"; -import * as _251 from "./lockup/params"; -import * as _252 from "./lockup/query"; -import * as _253 from "./lockup/tx"; -import * as _254 from "./poolincentives/v1beta1/genesis"; -import * as _255 from "./poolincentives/v1beta1/gov"; -import * as _256 from "./poolincentives/v1beta1/incentives"; -import * as _257 from "./poolincentives/v1beta1/query"; -import * as _258 from "./poolincentives/v1beta1/shared"; -import * as _259 from "./poolmanager/v1beta1/genesis"; -import * as _260 from "./poolmanager/v1beta1/gov"; -import * as _261 from "./poolmanager/v1beta1/module_route"; -import * as _262 from "./poolmanager/v1beta1/query"; -import * as _263 from "./poolmanager/v1beta1/swap_route"; -import * as _264 from "./poolmanager/v1beta1/taker_fee_share"; -import * as _265 from "./poolmanager/v1beta1/tracked_volume"; -import * as _266 from "./poolmanager/v1beta1/tx"; -import * as _267 from "./protorev/v1beta1/genesis"; -import * as _268 from "./protorev/v1beta1/gov"; -import * as _269 from "./protorev/v1beta1/params"; -import * as _270 from "./protorev/v1beta1/protorev"; -import * as _271 from "./protorev/v1beta1/query"; -import * as _272 from "./protorev/v1beta1/tx"; -import * as _273 from "./smartaccount/v1beta1/genesis"; -import * as _274 from "./smartaccount/v1beta1/models"; -import * as _275 from "./smartaccount/v1beta1/params"; -import * as _276 from "./smartaccount/v1beta1/query"; -import * as _277 from "./smartaccount/v1beta1/tx"; -import * as _278 from "./superfluid/genesis"; -import * as _279 from "./superfluid/params"; -import * as _280 from "./superfluid/query"; -import * as _281 from "./superfluid/superfluid"; -import * as _282 from "./superfluid/tx"; -import * as _283 from "./tokenfactory/v1beta1/authorityMetadata"; -import * as _284 from "./tokenfactory/v1beta1/genesis"; -import * as _285 from "./tokenfactory/v1beta1/params"; -import * as _286 from "./tokenfactory/v1beta1/query"; -import * as _287 from "./tokenfactory/v1beta1/tx"; -import * as _288 from "./txfees/v1beta1/feetoken"; -import * as _289 from "./txfees/v1beta1/genesis"; -import * as _290 from "./txfees/v1beta1/gov"; -import * as _291 from "./txfees/v1beta1/params"; -import * as _292 from "./txfees/v1beta1/query"; -import * as _293 from "./txfees/v1beta1/tx"; -import * as _294 from "./valsetpref/v1beta1/query"; -import * as _295 from "./valsetpref/v1beta1/state"; -import * as _296 from "./valsetpref/v1beta1/tx"; -import * as _538 from "./concentratedliquidity/poolmodel/concentrated/v1beta1/tx.amino"; -import * as _539 from "./concentratedliquidity/v1beta1/tx.amino"; -import * as _540 from "./gamm/poolmodels/balancer/v1beta1/tx.amino"; -import * as _541 from "./gamm/poolmodels/stableswap/v1beta1/tx.amino"; -import * as _542 from "./gamm/v1beta1/tx.amino"; -import * as _543 from "./incentives/tx.amino"; -import * as _544 from "./lockup/tx.amino"; -import * as _545 from "./poolmanager/v1beta1/tx.amino"; -import * as _546 from "./protorev/v1beta1/tx.amino"; -import * as _547 from "./smartaccount/v1beta1/tx.amino"; -import * as _548 from "./superfluid/tx.amino"; -import * as _549 from "./tokenfactory/v1beta1/tx.amino"; -import * as _550 from "./txfees/v1beta1/tx.amino"; -import * as _551 from "./valsetpref/v1beta1/tx.amino"; -import * as _552 from "./concentratedliquidity/poolmodel/concentrated/v1beta1/tx.registry"; -import * as _553 from "./concentratedliquidity/v1beta1/tx.registry"; -import * as _554 from "./gamm/poolmodels/balancer/v1beta1/tx.registry"; -import * as _555 from "./gamm/poolmodels/stableswap/v1beta1/tx.registry"; -import * as _556 from "./gamm/v1beta1/tx.registry"; -import * as _557 from "./incentives/tx.registry"; -import * as _558 from "./lockup/tx.registry"; -import * as _559 from "./poolmanager/v1beta1/tx.registry"; -import * as _560 from "./protorev/v1beta1/tx.registry"; -import * as _561 from "./smartaccount/v1beta1/tx.registry"; -import * as _562 from "./superfluid/tx.registry"; -import * as _563 from "./tokenfactory/v1beta1/tx.registry"; -import * as _564 from "./txfees/v1beta1/tx.registry"; -import * as _565 from "./valsetpref/v1beta1/tx.registry"; -import * as _566 from "./concentratedliquidity/v1beta1/query.rpc.Query"; -import * as _567 from "./cosmwasmpool/v1beta1/query.rpc.Query"; -import * as _568 from "./gamm/v1beta1/query.rpc.Query"; -import * as _569 from "./incentives/query.rpc.Query"; -import * as _570 from "./lockup/query.rpc.Query"; -import * as _571 from "./poolincentives/v1beta1/query.rpc.Query"; -import * as _572 from "./poolmanager/v1beta1/query.rpc.Query"; -import * as _573 from "./protorev/v1beta1/query.rpc.Query"; -import * as _574 from "./smartaccount/v1beta1/query.rpc.Query"; -import * as _575 from "./superfluid/query.rpc.Query"; -import * as _576 from "./tokenfactory/v1beta1/query.rpc.Query"; -import * as _577 from "./txfees/v1beta1/query.rpc.Query"; -import * as _578 from "./valsetpref/v1beta1/query.rpc.Query"; -import * as _579 from "./concentratedliquidity/poolmodel/concentrated/v1beta1/tx.rpc.msg"; -import * as _580 from "./concentratedliquidity/v1beta1/tx.rpc.msg"; -import * as _581 from "./gamm/poolmodels/balancer/v1beta1/tx.rpc.msg"; -import * as _582 from "./gamm/poolmodels/stableswap/v1beta1/tx.rpc.msg"; -import * as _583 from "./gamm/v1beta1/tx.rpc.msg"; -import * as _584 from "./incentives/tx.rpc.msg"; -import * as _585 from "./lockup/tx.rpc.msg"; -import * as _586 from "./poolmanager/v1beta1/tx.rpc.msg"; -import * as _587 from "./protorev/v1beta1/tx.rpc.msg"; -import * as _588 from "./smartaccount/v1beta1/tx.rpc.msg"; -import * as _589 from "./superfluid/tx.rpc.msg"; -import * as _590 from "./tokenfactory/v1beta1/tx.rpc.msg"; -import * as _591 from "./txfees/v1beta1/tx.rpc.msg"; -import * as _592 from "./valsetpref/v1beta1/tx.rpc.msg"; -import * as _684 from "./rpc.query"; -import * as _685 from "./rpc.tx"; +import * as _219 from "./accum/v1beta1/accum"; +import * as _220 from "./concentratedliquidity/params"; +import * as _221 from "./cosmwasmpool/v1beta1/genesis"; +import * as _222 from "./cosmwasmpool/v1beta1/gov"; +import * as _223 from "./cosmwasmpool/v1beta1/model/instantiate_msg"; +import * as _224 from "./cosmwasmpool/v1beta1/model/module_query_msg"; +import * as _225 from "./cosmwasmpool/v1beta1/model/module_sudo_msg"; +import * as _226 from "./cosmwasmpool/v1beta1/model/pool_query_msg"; +import * as _227 from "./cosmwasmpool/v1beta1/model/pool"; +import * as _228 from "./cosmwasmpool/v1beta1/model/transmuter_msgs"; +import * as _229 from "./cosmwasmpool/v1beta1/model/tx"; +import * as _230 from "./cosmwasmpool/v1beta1/params"; +import * as _231 from "./cosmwasmpool/v1beta1/query"; +import * as _232 from "./cosmwasmpool/v1beta1/tx"; +import * as _233 from "./gamm/poolmodels/balancer/v1beta1/tx"; +import * as _234 from "./gamm/poolmodels/stableswap/v1beta1/stableswap_pool"; +import * as _235 from "./gamm/poolmodels/stableswap/v1beta1/tx"; +import * as _236 from "./gamm/v1beta1/balancerPool"; +import * as _237 from "./gamm/v1beta1/genesis"; +import * as _238 from "./gamm/v1beta1/gov"; +import * as _239 from "./gamm/v1beta1/params"; +import * as _240 from "./gamm/v1beta1/query"; +import * as _241 from "./gamm/v1beta1/shared"; +import * as _242 from "./gamm/v1beta1/tx"; +import * as _243 from "./incentives/gauge"; +import * as _244 from "./incentives/genesis"; +import * as _245 from "./incentives/gov"; +import * as _246 from "./incentives/group"; +import * as _247 from "./incentives/params"; +import * as _248 from "./incentives/query"; +import * as _249 from "./incentives/tx"; +import * as _250 from "./lockup/genesis"; +import * as _251 from "./lockup/lock"; +import * as _252 from "./lockup/params"; +import * as _253 from "./lockup/query"; +import * as _254 from "./lockup/tx"; +import * as _255 from "./poolincentives/v1beta1/genesis"; +import * as _256 from "./poolincentives/v1beta1/gov"; +import * as _257 from "./poolincentives/v1beta1/incentives"; +import * as _258 from "./poolincentives/v1beta1/query"; +import * as _259 from "./poolincentives/v1beta1/shared"; +import * as _260 from "./poolmanager/v1beta1/genesis"; +import * as _261 from "./poolmanager/v1beta1/gov"; +import * as _262 from "./poolmanager/v1beta1/module_route"; +import * as _263 from "./poolmanager/v1beta1/query"; +import * as _264 from "./poolmanager/v1beta1/swap_route"; +import * as _265 from "./poolmanager/v1beta1/taker_fee_share"; +import * as _266 from "./poolmanager/v1beta1/tracked_volume"; +import * as _267 from "./poolmanager/v1beta1/tx"; +import * as _268 from "./protorev/v1beta1/genesis"; +import * as _269 from "./protorev/v1beta1/gov"; +import * as _270 from "./protorev/v1beta1/params"; +import * as _271 from "./protorev/v1beta1/protorev"; +import * as _272 from "./protorev/v1beta1/query"; +import * as _273 from "./protorev/v1beta1/tx"; +import * as _274 from "./smartaccount/v1beta1/genesis"; +import * as _275 from "./smartaccount/v1beta1/models"; +import * as _276 from "./smartaccount/v1beta1/params"; +import * as _277 from "./smartaccount/v1beta1/query"; +import * as _278 from "./smartaccount/v1beta1/tx"; +import * as _279 from "./superfluid/genesis"; +import * as _280 from "./superfluid/params"; +import * as _281 from "./superfluid/query"; +import * as _282 from "./superfluid/superfluid"; +import * as _283 from "./superfluid/tx"; +import * as _284 from "./tokenfactory/v1beta1/authorityMetadata"; +import * as _285 from "./tokenfactory/v1beta1/genesis"; +import * as _286 from "./tokenfactory/v1beta1/params"; +import * as _287 from "./tokenfactory/v1beta1/query"; +import * as _288 from "./tokenfactory/v1beta1/tx"; +import * as _289 from "./txfees/v1beta1/feetoken"; +import * as _290 from "./txfees/v1beta1/genesis"; +import * as _291 from "./txfees/v1beta1/gov"; +import * as _292 from "./txfees/v1beta1/params"; +import * as _293 from "./txfees/v1beta1/query"; +import * as _294 from "./txfees/v1beta1/tx"; +import * as _295 from "./valsetpref/v1beta1/query"; +import * as _296 from "./valsetpref/v1beta1/state"; +import * as _297 from "./valsetpref/v1beta1/tx"; +import * as _539 from "./concentratedliquidity/poolmodel/concentrated/v1beta1/tx.amino"; +import * as _540 from "./concentratedliquidity/v1beta1/tx.amino"; +import * as _541 from "./gamm/poolmodels/balancer/v1beta1/tx.amino"; +import * as _542 from "./gamm/poolmodels/stableswap/v1beta1/tx.amino"; +import * as _543 from "./gamm/v1beta1/tx.amino"; +import * as _544 from "./incentives/tx.amino"; +import * as _545 from "./lockup/tx.amino"; +import * as _546 from "./poolmanager/v1beta1/tx.amino"; +import * as _547 from "./protorev/v1beta1/tx.amino"; +import * as _548 from "./smartaccount/v1beta1/tx.amino"; +import * as _549 from "./superfluid/tx.amino"; +import * as _550 from "./tokenfactory/v1beta1/tx.amino"; +import * as _551 from "./txfees/v1beta1/tx.amino"; +import * as _552 from "./valsetpref/v1beta1/tx.amino"; +import * as _553 from "./concentratedliquidity/poolmodel/concentrated/v1beta1/tx.registry"; +import * as _554 from "./concentratedliquidity/v1beta1/tx.registry"; +import * as _555 from "./gamm/poolmodels/balancer/v1beta1/tx.registry"; +import * as _556 from "./gamm/poolmodels/stableswap/v1beta1/tx.registry"; +import * as _557 from "./gamm/v1beta1/tx.registry"; +import * as _558 from "./incentives/tx.registry"; +import * as _559 from "./lockup/tx.registry"; +import * as _560 from "./poolmanager/v1beta1/tx.registry"; +import * as _561 from "./protorev/v1beta1/tx.registry"; +import * as _562 from "./smartaccount/v1beta1/tx.registry"; +import * as _563 from "./superfluid/tx.registry"; +import * as _564 from "./tokenfactory/v1beta1/tx.registry"; +import * as _565 from "./txfees/v1beta1/tx.registry"; +import * as _566 from "./valsetpref/v1beta1/tx.registry"; +import * as _567 from "./concentratedliquidity/v1beta1/query.rpc.Query"; +import * as _568 from "./cosmwasmpool/v1beta1/query.rpc.Query"; +import * as _569 from "./gamm/v1beta1/query.rpc.Query"; +import * as _570 from "./incentives/query.rpc.Query"; +import * as _571 from "./lockup/query.rpc.Query"; +import * as _572 from "./poolincentives/v1beta1/query.rpc.Query"; +import * as _573 from "./poolmanager/v1beta1/query.rpc.Query"; +import * as _574 from "./protorev/v1beta1/query.rpc.Query"; +import * as _575 from "./smartaccount/v1beta1/query.rpc.Query"; +import * as _576 from "./superfluid/query.rpc.Query"; +import * as _577 from "./tokenfactory/v1beta1/query.rpc.Query"; +import * as _578 from "./txfees/v1beta1/query.rpc.Query"; +import * as _579 from "./valsetpref/v1beta1/query.rpc.Query"; +import * as _580 from "./concentratedliquidity/poolmodel/concentrated/v1beta1/tx.rpc.msg"; +import * as _581 from "./concentratedliquidity/v1beta1/tx.rpc.msg"; +import * as _582 from "./gamm/poolmodels/balancer/v1beta1/tx.rpc.msg"; +import * as _583 from "./gamm/poolmodels/stableswap/v1beta1/tx.rpc.msg"; +import * as _584 from "./gamm/v1beta1/tx.rpc.msg"; +import * as _585 from "./incentives/tx.rpc.msg"; +import * as _586 from "./lockup/tx.rpc.msg"; +import * as _587 from "./poolmanager/v1beta1/tx.rpc.msg"; +import * as _588 from "./protorev/v1beta1/tx.rpc.msg"; +import * as _589 from "./smartaccount/v1beta1/tx.rpc.msg"; +import * as _590 from "./superfluid/tx.rpc.msg"; +import * as _591 from "./tokenfactory/v1beta1/tx.rpc.msg"; +import * as _592 from "./txfees/v1beta1/tx.rpc.msg"; +import * as _593 from "./valsetpref/v1beta1/tx.rpc.msg"; +import * as _685 from "./rpc.query"; +import * as _686 from "./rpc.tx"; export namespace osmosis { export namespace accum { export const v1beta1 = { - ..._218 + ..._219 }; } export const concentratedliquidity = { - ..._219, + ..._220, poolmodel: { concentrated: { v1beta1: { - ..._538, - ..._552, - ..._579 + ..._539, + ..._553, + ..._580 } } }, v1beta1: { - ..._539, - ..._553, - ..._566, - ..._580 + ..._540, + ..._554, + ..._567, + ..._581 } }; export namespace cosmwasmpool { export const v1beta1 = { - ..._220, ..._221, ..._222, ..._223, @@ -172,80 +171,80 @@ export namespace osmosis { ..._229, ..._230, ..._231, - ..._567 + ..._232, + ..._568 }; } export namespace gamm { export namespace poolmodels { export namespace balancer { export const v1beta1 = { - ..._232, - ..._540, - ..._554, - ..._581 + ..._233, + ..._541, + ..._555, + ..._582 }; } export namespace stableswap { export const v1beta1 = { - ..._233, ..._234, - ..._541, - ..._555, - ..._582 + ..._235, + ..._542, + ..._556, + ..._583 }; } } export const v1beta1 = { - ..._235, ..._236, ..._237, ..._238, ..._239, ..._240, ..._241, - ..._542, - ..._556, - ..._568, - ..._583 + ..._242, + ..._543, + ..._557, + ..._569, + ..._584 }; } export const incentives = { - ..._242, ..._243, ..._244, ..._245, ..._246, ..._247, ..._248, - ..._543, - ..._557, - ..._569, - ..._584 + ..._249, + ..._544, + ..._558, + ..._570, + ..._585 }; export const lockup = { - ..._249, ..._250, ..._251, ..._252, ..._253, - ..._544, - ..._558, - ..._570, - ..._585 + ..._254, + ..._545, + ..._559, + ..._571, + ..._586 }; export namespace poolincentives { export const v1beta1 = { - ..._254, ..._255, ..._256, ..._257, ..._258, - ..._571 + ..._259, + ..._572 }; } export namespace poolmanager { export const v1beta1 = { - ..._259, ..._260, ..._261, ..._262, @@ -253,90 +252,91 @@ export namespace osmosis { ..._264, ..._265, ..._266, - ..._545, - ..._559, - ..._572, - ..._586 + ..._267, + ..._546, + ..._560, + ..._573, + ..._587 }; } export namespace protorev { export const v1beta1 = { - ..._267, ..._268, ..._269, ..._270, ..._271, ..._272, - ..._546, - ..._560, - ..._573, - ..._587 + ..._273, + ..._547, + ..._561, + ..._574, + ..._588 }; } export namespace smartaccount { export const v1beta1 = { - ..._273, ..._274, ..._275, ..._276, ..._277, - ..._547, - ..._561, - ..._574, - ..._588 + ..._278, + ..._548, + ..._562, + ..._575, + ..._589 }; } export const superfluid = { - ..._278, ..._279, ..._280, ..._281, ..._282, - ..._548, - ..._562, - ..._575, - ..._589 + ..._283, + ..._549, + ..._563, + ..._576, + ..._590 }; export namespace tokenfactory { export const v1beta1 = { - ..._283, ..._284, ..._285, ..._286, ..._287, - ..._549, - ..._563, - ..._576, - ..._590 + ..._288, + ..._550, + ..._564, + ..._577, + ..._591 }; } export namespace txfees { export const v1beta1 = { - ..._288, ..._289, ..._290, ..._291, ..._292, ..._293, - ..._550, - ..._564, - ..._577, - ..._591 + ..._294, + ..._551, + ..._565, + ..._578, + ..._592 }; } export namespace valsetpref { export const v1beta1 = { - ..._294, ..._295, ..._296, - ..._551, - ..._565, - ..._578, - ..._592 + ..._297, + ..._552, + ..._566, + ..._579, + ..._593 }; } export const ClientFactory = { - ..._684, - ..._685 + ..._685, + ..._686 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/pstake/bundle.ts b/packages/types/protobuf/codegen/pstake/bundle.ts index d0ffdd651..d1ee70076 100644 --- a/packages/types/protobuf/codegen/pstake/bundle.ts +++ b/packages/types/protobuf/codegen/pstake/bundle.ts @@ -1,98 +1,98 @@ -import * as _297 from "./liquidstake/v1beta1/genesis"; -import * as _298 from "./liquidstake/v1beta1/liquidstake"; -import * as _299 from "./liquidstake/v1beta1/query"; -import * as _300 from "./liquidstake/v1beta1/tx"; -import * as _301 from "./liquidstakeibc/v1beta1/genesis"; -import * as _302 from "./liquidstakeibc/v1beta1/liquidstakeibc"; -import * as _303 from "./liquidstakeibc/v1beta1/msgs"; -import * as _304 from "./liquidstakeibc/v1beta1/params"; -import * as _305 from "./liquidstakeibc/v1beta1/query"; -import * as _306 from "./lscosmos/v1beta1/genesis"; -import * as _307 from "./lscosmos/v1beta1/governance_proposal"; -import * as _308 from "./lscosmos/v1beta1/lscosmos"; -import * as _309 from "./lscosmos/v1beta1/msgs"; -import * as _310 from "./lscosmos/v1beta1/params"; -import * as _311 from "./lscosmos/v1beta1/query"; -import * as _312 from "./ratesync/v1beta1/contract"; -import * as _313 from "./ratesync/v1beta1/genesis"; -import * as _314 from "./ratesync/v1beta1/params"; -import * as _315 from "./ratesync/v1beta1/query"; -import * as _316 from "./ratesync/v1beta1/ratesync"; -import * as _317 from "./ratesync/v1beta1/tx"; -import * as _593 from "./liquidstake/v1beta1/tx.amino"; -import * as _594 from "./liquidstakeibc/v1beta1/msgs.amino"; -import * as _595 from "./lscosmos/v1beta1/msgs.amino"; -import * as _596 from "./ratesync/v1beta1/tx.amino"; -import * as _597 from "./liquidstake/v1beta1/tx.registry"; -import * as _598 from "./liquidstakeibc/v1beta1/msgs.registry"; -import * as _599 from "./lscosmos/v1beta1/msgs.registry"; -import * as _600 from "./ratesync/v1beta1/tx.registry"; -import * as _601 from "./liquidstake/v1beta1/query.rpc.Query"; -import * as _602 from "./liquidstakeibc/v1beta1/query.rpc.Query"; -import * as _603 from "./lscosmos/v1beta1/query.rpc.Query"; -import * as _604 from "./ratesync/v1beta1/query.rpc.Query"; -import * as _605 from "./liquidstake/v1beta1/tx.rpc.msg"; -import * as _606 from "./liquidstakeibc/v1beta1/msgs.rpc.msg"; -import * as _607 from "./lscosmos/v1beta1/msgs.rpc.msg"; -import * as _608 from "./ratesync/v1beta1/tx.rpc.msg"; -import * as _686 from "./rpc.query"; -import * as _687 from "./rpc.tx"; +import * as _298 from "./liquidstake/v1beta1/genesis"; +import * as _299 from "./liquidstake/v1beta1/liquidstake"; +import * as _300 from "./liquidstake/v1beta1/query"; +import * as _301 from "./liquidstake/v1beta1/tx"; +import * as _302 from "./liquidstakeibc/v1beta1/genesis"; +import * as _303 from "./liquidstakeibc/v1beta1/liquidstakeibc"; +import * as _304 from "./liquidstakeibc/v1beta1/msgs"; +import * as _305 from "./liquidstakeibc/v1beta1/params"; +import * as _306 from "./liquidstakeibc/v1beta1/query"; +import * as _307 from "./lscosmos/v1beta1/genesis"; +import * as _308 from "./lscosmos/v1beta1/governance_proposal"; +import * as _309 from "./lscosmos/v1beta1/lscosmos"; +import * as _310 from "./lscosmos/v1beta1/msgs"; +import * as _311 from "./lscosmos/v1beta1/params"; +import * as _312 from "./lscosmos/v1beta1/query"; +import * as _313 from "./ratesync/v1beta1/contract"; +import * as _314 from "./ratesync/v1beta1/genesis"; +import * as _315 from "./ratesync/v1beta1/params"; +import * as _316 from "./ratesync/v1beta1/query"; +import * as _317 from "./ratesync/v1beta1/ratesync"; +import * as _318 from "./ratesync/v1beta1/tx"; +import * as _594 from "./liquidstake/v1beta1/tx.amino"; +import * as _595 from "./liquidstakeibc/v1beta1/msgs.amino"; +import * as _596 from "./lscosmos/v1beta1/msgs.amino"; +import * as _597 from "./ratesync/v1beta1/tx.amino"; +import * as _598 from "./liquidstake/v1beta1/tx.registry"; +import * as _599 from "./liquidstakeibc/v1beta1/msgs.registry"; +import * as _600 from "./lscosmos/v1beta1/msgs.registry"; +import * as _601 from "./ratesync/v1beta1/tx.registry"; +import * as _602 from "./liquidstake/v1beta1/query.rpc.Query"; +import * as _603 from "./liquidstakeibc/v1beta1/query.rpc.Query"; +import * as _604 from "./lscosmos/v1beta1/query.rpc.Query"; +import * as _605 from "./ratesync/v1beta1/query.rpc.Query"; +import * as _606 from "./liquidstake/v1beta1/tx.rpc.msg"; +import * as _607 from "./liquidstakeibc/v1beta1/msgs.rpc.msg"; +import * as _608 from "./lscosmos/v1beta1/msgs.rpc.msg"; +import * as _609 from "./ratesync/v1beta1/tx.rpc.msg"; +import * as _687 from "./rpc.query"; +import * as _688 from "./rpc.tx"; export namespace pstake { export namespace liquidstake { export const v1beta1 = { - ..._297, ..._298, ..._299, ..._300, - ..._593, - ..._597, - ..._601, - ..._605 + ..._301, + ..._594, + ..._598, + ..._602, + ..._606 }; } export namespace liquidstakeibc { export const v1beta1 = { - ..._301, ..._302, ..._303, ..._304, ..._305, - ..._594, - ..._598, - ..._602, - ..._606 + ..._306, + ..._595, + ..._599, + ..._603, + ..._607 }; } export namespace lscosmos { export const v1beta1 = { - ..._306, ..._307, ..._308, ..._309, ..._310, ..._311, - ..._595, - ..._599, - ..._603, - ..._607 + ..._312, + ..._596, + ..._600, + ..._604, + ..._608 }; } export namespace ratesync { export const v1beta1 = { - ..._312, ..._313, ..._314, ..._315, ..._316, ..._317, - ..._596, - ..._600, - ..._604, - ..._608 + ..._318, + ..._597, + ..._601, + ..._605, + ..._609 }; } export const ClientFactory = { - ..._686, - ..._687 + ..._687, + ..._688 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/publicawesome/bundle.ts b/packages/types/protobuf/codegen/publicawesome/bundle.ts index 3b8eff686..c7f23d6da 100644 --- a/packages/types/protobuf/codegen/publicawesome/bundle.ts +++ b/packages/types/protobuf/codegen/publicawesome/bundle.ts @@ -1,88 +1,88 @@ -import * as _318 from "./stargaze/alloc/v1beta1/genesis"; -import * as _319 from "./stargaze/alloc/v1beta1/params"; -import * as _320 from "./stargaze/alloc/v1beta1/query"; -import * as _321 from "./stargaze/alloc/v1beta1/tx"; -import * as _322 from "./stargaze/cron/v1/cron"; -import * as _323 from "./stargaze/cron/v1/genesis"; -import * as _324 from "./stargaze/cron/v1/proposal"; -import * as _325 from "./stargaze/cron/v1/query"; -import * as _326 from "./stargaze/cron/v1/tx"; -import * as _327 from "./stargaze/globalfee/v1/genesis"; -import * as _328 from "./stargaze/globalfee/v1/globalfee"; -import * as _329 from "./stargaze/globalfee/v1/proposal"; -import * as _330 from "./stargaze/globalfee/v1/query"; -import * as _331 from "./stargaze/globalfee/v1/tx"; -import * as _332 from "./stargaze/mint/v1beta1/genesis"; -import * as _333 from "./stargaze/mint/v1beta1/mint"; -import * as _334 from "./stargaze/mint/v1beta1/query"; -import * as _335 from "./stargaze/mint/v1beta1/tx"; -import * as _609 from "./stargaze/alloc/v1beta1/tx.amino"; -import * as _610 from "./stargaze/cron/v1/tx.amino"; -import * as _611 from "./stargaze/globalfee/v1/tx.amino"; -import * as _612 from "./stargaze/alloc/v1beta1/tx.registry"; -import * as _613 from "./stargaze/cron/v1/tx.registry"; -import * as _614 from "./stargaze/globalfee/v1/tx.registry"; -import * as _615 from "./stargaze/alloc/v1beta1/query.rpc.Query"; -import * as _616 from "./stargaze/cron/v1/query.rpc.Query"; -import * as _617 from "./stargaze/globalfee/v1/query.rpc.Query"; -import * as _618 from "./stargaze/mint/v1beta1/query.rpc.Query"; -import * as _619 from "./stargaze/alloc/v1beta1/tx.rpc.msg"; -import * as _620 from "./stargaze/cron/v1/tx.rpc.msg"; -import * as _621 from "./stargaze/globalfee/v1/tx.rpc.msg"; -import * as _688 from "./rpc.query"; -import * as _689 from "./rpc.tx"; +import * as _319 from "./stargaze/alloc/v1beta1/genesis"; +import * as _320 from "./stargaze/alloc/v1beta1/params"; +import * as _321 from "./stargaze/alloc/v1beta1/query"; +import * as _322 from "./stargaze/alloc/v1beta1/tx"; +import * as _323 from "./stargaze/cron/v1/cron"; +import * as _324 from "./stargaze/cron/v1/genesis"; +import * as _325 from "./stargaze/cron/v1/proposal"; +import * as _326 from "./stargaze/cron/v1/query"; +import * as _327 from "./stargaze/cron/v1/tx"; +import * as _328 from "./stargaze/globalfee/v1/genesis"; +import * as _329 from "./stargaze/globalfee/v1/globalfee"; +import * as _330 from "./stargaze/globalfee/v1/proposal"; +import * as _331 from "./stargaze/globalfee/v1/query"; +import * as _332 from "./stargaze/globalfee/v1/tx"; +import * as _333 from "./stargaze/mint/v1beta1/genesis"; +import * as _334 from "./stargaze/mint/v1beta1/mint"; +import * as _335 from "./stargaze/mint/v1beta1/query"; +import * as _336 from "./stargaze/mint/v1beta1/tx"; +import * as _610 from "./stargaze/alloc/v1beta1/tx.amino"; +import * as _611 from "./stargaze/cron/v1/tx.amino"; +import * as _612 from "./stargaze/globalfee/v1/tx.amino"; +import * as _613 from "./stargaze/alloc/v1beta1/tx.registry"; +import * as _614 from "./stargaze/cron/v1/tx.registry"; +import * as _615 from "./stargaze/globalfee/v1/tx.registry"; +import * as _616 from "./stargaze/alloc/v1beta1/query.rpc.Query"; +import * as _617 from "./stargaze/cron/v1/query.rpc.Query"; +import * as _618 from "./stargaze/globalfee/v1/query.rpc.Query"; +import * as _619 from "./stargaze/mint/v1beta1/query.rpc.Query"; +import * as _620 from "./stargaze/alloc/v1beta1/tx.rpc.msg"; +import * as _621 from "./stargaze/cron/v1/tx.rpc.msg"; +import * as _622 from "./stargaze/globalfee/v1/tx.rpc.msg"; +import * as _689 from "./rpc.query"; +import * as _690 from "./rpc.tx"; export namespace publicawesome { export namespace stargaze { export namespace alloc { export const v1beta1 = { - ..._318, ..._319, ..._320, ..._321, - ..._609, - ..._612, - ..._615, - ..._619 + ..._322, + ..._610, + ..._613, + ..._616, + ..._620 }; } export namespace cron { export const v1 = { - ..._322, ..._323, ..._324, ..._325, ..._326, - ..._610, - ..._613, - ..._616, - ..._620 + ..._327, + ..._611, + ..._614, + ..._617, + ..._621 }; } export namespace globalfee { export const v1 = { - ..._327, ..._328, ..._329, ..._330, ..._331, - ..._611, - ..._614, - ..._617, - ..._621 + ..._332, + ..._612, + ..._615, + ..._618, + ..._622 }; } export namespace mint { export const v1beta1 = { - ..._332, ..._333, ..._334, ..._335, - ..._618 + ..._336, + ..._619 }; } } export const ClientFactory = { - ..._688, - ..._689 + ..._689, + ..._690 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/regen/bundle.ts b/packages/types/protobuf/codegen/regen/bundle.ts index 0a27acc8e..1cbfef968 100644 --- a/packages/types/protobuf/codegen/regen/bundle.ts +++ b/packages/types/protobuf/codegen/regen/bundle.ts @@ -1,134 +1,134 @@ -import * as _336 from "./data/v1/events"; -import * as _337 from "./data/v1/state"; -import * as _338 from "./data/v1/tx"; -import * as _339 from "./data/v1/types"; -import * as _340 from "./data/v2/events"; -import * as _341 from "./data/v2/state"; -import * as _342 from "./data/v2/tx"; -import * as _343 from "./data/v2/types"; -import * as _344 from "./ecocredit/basket/v1/events"; -import * as _345 from "./ecocredit/basket/v1/state"; -import * as _346 from "./ecocredit/basket/v1/tx"; -import * as _347 from "./ecocredit/basket/v1/types"; -import * as _348 from "./ecocredit/marketplace/v1/events"; -import * as _349 from "./ecocredit/marketplace/v1/state"; -import * as _350 from "./ecocredit/marketplace/v1/tx"; -import * as _351 from "./ecocredit/marketplace/v1/types"; -import * as _352 from "./ecocredit/orderbook/v1alpha1/memory"; -import * as _353 from "./ecocredit/v1/events"; -import * as _354 from "./ecocredit/v1/state"; -import * as _355 from "./ecocredit/v1/tx"; -import * as _356 from "./ecocredit/v1/types"; -import * as _357 from "./ecocredit/v1alpha1/events"; -import * as _358 from "./ecocredit/v1alpha1/genesis"; -import * as _359 from "./ecocredit/v1alpha1/tx"; -import * as _360 from "./ecocredit/v1alpha1/types"; -import * as _361 from "./intertx/v1/query"; -import * as _362 from "./intertx/v1/tx"; -import * as _622 from "./data/v1/tx.amino"; -import * as _623 from "./data/v2/tx.amino"; -import * as _624 from "./ecocredit/basket/v1/tx.amino"; -import * as _625 from "./ecocredit/marketplace/v1/tx.amino"; -import * as _626 from "./ecocredit/v1/tx.amino"; -import * as _627 from "./ecocredit/v1alpha1/tx.amino"; -import * as _628 from "./intertx/v1/tx.amino"; -import * as _629 from "./data/v1/tx.registry"; -import * as _630 from "./data/v2/tx.registry"; -import * as _631 from "./ecocredit/basket/v1/tx.registry"; -import * as _632 from "./ecocredit/marketplace/v1/tx.registry"; -import * as _633 from "./ecocredit/v1/tx.registry"; -import * as _634 from "./ecocredit/v1alpha1/tx.registry"; -import * as _635 from "./intertx/v1/tx.registry"; -import * as _636 from "./intertx/v1/query.rpc.Query"; -import * as _637 from "./data/v1/tx.rpc.msg"; -import * as _638 from "./data/v2/tx.rpc.msg"; -import * as _639 from "./ecocredit/basket/v1/tx.rpc.msg"; -import * as _640 from "./ecocredit/marketplace/v1/tx.rpc.msg"; -import * as _641 from "./ecocredit/v1/tx.rpc.msg"; -import * as _642 from "./ecocredit/v1alpha1/tx.rpc.msg"; -import * as _643 from "./intertx/v1/tx.rpc.msg"; -import * as _690 from "./rpc.query"; -import * as _691 from "./rpc.tx"; +import * as _337 from "./data/v1/events"; +import * as _338 from "./data/v1/state"; +import * as _339 from "./data/v1/tx"; +import * as _340 from "./data/v1/types"; +import * as _341 from "./data/v2/events"; +import * as _342 from "./data/v2/state"; +import * as _343 from "./data/v2/tx"; +import * as _344 from "./data/v2/types"; +import * as _345 from "./ecocredit/basket/v1/events"; +import * as _346 from "./ecocredit/basket/v1/state"; +import * as _347 from "./ecocredit/basket/v1/tx"; +import * as _348 from "./ecocredit/basket/v1/types"; +import * as _349 from "./ecocredit/marketplace/v1/events"; +import * as _350 from "./ecocredit/marketplace/v1/state"; +import * as _351 from "./ecocredit/marketplace/v1/tx"; +import * as _352 from "./ecocredit/marketplace/v1/types"; +import * as _353 from "./ecocredit/orderbook/v1alpha1/memory"; +import * as _354 from "./ecocredit/v1/events"; +import * as _355 from "./ecocredit/v1/state"; +import * as _356 from "./ecocredit/v1/tx"; +import * as _357 from "./ecocredit/v1/types"; +import * as _358 from "./ecocredit/v1alpha1/events"; +import * as _359 from "./ecocredit/v1alpha1/genesis"; +import * as _360 from "./ecocredit/v1alpha1/tx"; +import * as _361 from "./ecocredit/v1alpha1/types"; +import * as _362 from "./intertx/v1/query"; +import * as _363 from "./intertx/v1/tx"; +import * as _623 from "./data/v1/tx.amino"; +import * as _624 from "./data/v2/tx.amino"; +import * as _625 from "./ecocredit/basket/v1/tx.amino"; +import * as _626 from "./ecocredit/marketplace/v1/tx.amino"; +import * as _627 from "./ecocredit/v1/tx.amino"; +import * as _628 from "./ecocredit/v1alpha1/tx.amino"; +import * as _629 from "./intertx/v1/tx.amino"; +import * as _630 from "./data/v1/tx.registry"; +import * as _631 from "./data/v2/tx.registry"; +import * as _632 from "./ecocredit/basket/v1/tx.registry"; +import * as _633 from "./ecocredit/marketplace/v1/tx.registry"; +import * as _634 from "./ecocredit/v1/tx.registry"; +import * as _635 from "./ecocredit/v1alpha1/tx.registry"; +import * as _636 from "./intertx/v1/tx.registry"; +import * as _637 from "./intertx/v1/query.rpc.Query"; +import * as _638 from "./data/v1/tx.rpc.msg"; +import * as _639 from "./data/v2/tx.rpc.msg"; +import * as _640 from "./ecocredit/basket/v1/tx.rpc.msg"; +import * as _641 from "./ecocredit/marketplace/v1/tx.rpc.msg"; +import * as _642 from "./ecocredit/v1/tx.rpc.msg"; +import * as _643 from "./ecocredit/v1alpha1/tx.rpc.msg"; +import * as _644 from "./intertx/v1/tx.rpc.msg"; +import * as _691 from "./rpc.query"; +import * as _692 from "./rpc.tx"; export namespace regen { export namespace data { export const v1 = { - ..._336, ..._337, ..._338, ..._339, - ..._622, - ..._629, - ..._637 + ..._340, + ..._623, + ..._630, + ..._638 }; export const v2 = { - ..._340, ..._341, ..._342, ..._343, - ..._623, - ..._630, - ..._638 + ..._344, + ..._624, + ..._631, + ..._639 }; } export namespace ecocredit { export namespace basket { export const v1 = { - ..._344, ..._345, ..._346, ..._347, - ..._624, - ..._631, - ..._639 + ..._348, + ..._625, + ..._632, + ..._640 }; } export namespace marketplace { export const v1 = { - ..._348, ..._349, ..._350, ..._351, - ..._625, - ..._632, - ..._640 + ..._352, + ..._626, + ..._633, + ..._641 }; } export namespace orderbook { export const v1alpha1 = { - ..._352 + ..._353 }; } export const v1 = { - ..._353, ..._354, ..._355, ..._356, - ..._626, - ..._633, - ..._641 + ..._357, + ..._627, + ..._634, + ..._642 }; export const v1alpha1 = { - ..._357, ..._358, ..._359, ..._360, - ..._627, - ..._634, - ..._642 + ..._361, + ..._628, + ..._635, + ..._643 }; } export namespace intertx { export const v1 = { - ..._361, ..._362, - ..._628, - ..._635, + ..._363, + ..._629, ..._636, - ..._643 + ..._637, + ..._644 }; } export const ClientFactory = { - ..._690, - ..._691 + ..._691, + ..._692 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/secret/bundle.ts b/packages/types/protobuf/codegen/secret/bundle.ts index cf0287edc..c96d26982 100644 --- a/packages/types/protobuf/codegen/secret/bundle.ts +++ b/packages/types/protobuf/codegen/secret/bundle.ts @@ -1,78 +1,78 @@ -import * as _363 from "./compute/v1beta1/genesis"; -import * as _364 from "./compute/v1beta1/msg"; -import * as _365 from "./compute/v1beta1/query"; -import * as _366 from "./compute/v1beta1/types"; -import * as _367 from "./emergencybutton/v1beta1/genesis"; -import * as _368 from "./emergencybutton/v1beta1/params"; -import * as _369 from "./emergencybutton/v1beta1/query"; -import * as _370 from "./emergencybutton/v1beta1/tx"; -import * as _371 from "./intertx/v1beta1/query"; -import * as _372 from "./intertx/v1beta1/tx"; -import * as _373 from "./registration/v1beta1/genesis"; -import * as _374 from "./registration/v1beta1/msg"; -import * as _375 from "./registration/v1beta1/query"; -import * as _376 from "./registration/v1beta1/types"; -import * as _644 from "./compute/v1beta1/msg.amino"; -import * as _645 from "./emergencybutton/v1beta1/tx.amino"; -import * as _646 from "./intertx/v1beta1/tx.amino"; -import * as _647 from "./compute/v1beta1/msg.registry"; -import * as _648 from "./emergencybutton/v1beta1/tx.registry"; -import * as _649 from "./intertx/v1beta1/tx.registry"; -import * as _650 from "./compute/v1beta1/query.rpc.Query"; -import * as _651 from "./emergencybutton/v1beta1/query.rpc.Query"; -import * as _652 from "./intertx/v1beta1/query.rpc.Query"; -import * as _653 from "./registration/v1beta1/query.rpc.Query"; -import * as _654 from "./compute/v1beta1/msg.rpc.msg"; -import * as _655 from "./emergencybutton/v1beta1/tx.rpc.msg"; -import * as _656 from "./intertx/v1beta1/tx.rpc.msg"; -import * as _692 from "./rpc.query"; -import * as _693 from "./rpc.tx"; +import * as _364 from "./compute/v1beta1/genesis"; +import * as _365 from "./compute/v1beta1/msg"; +import * as _366 from "./compute/v1beta1/query"; +import * as _367 from "./compute/v1beta1/types"; +import * as _368 from "./emergencybutton/v1beta1/genesis"; +import * as _369 from "./emergencybutton/v1beta1/params"; +import * as _370 from "./emergencybutton/v1beta1/query"; +import * as _371 from "./emergencybutton/v1beta1/tx"; +import * as _372 from "./intertx/v1beta1/query"; +import * as _373 from "./intertx/v1beta1/tx"; +import * as _374 from "./registration/v1beta1/genesis"; +import * as _375 from "./registration/v1beta1/msg"; +import * as _376 from "./registration/v1beta1/query"; +import * as _377 from "./registration/v1beta1/types"; +import * as _645 from "./compute/v1beta1/msg.amino"; +import * as _646 from "./emergencybutton/v1beta1/tx.amino"; +import * as _647 from "./intertx/v1beta1/tx.amino"; +import * as _648 from "./compute/v1beta1/msg.registry"; +import * as _649 from "./emergencybutton/v1beta1/tx.registry"; +import * as _650 from "./intertx/v1beta1/tx.registry"; +import * as _651 from "./compute/v1beta1/query.rpc.Query"; +import * as _652 from "./emergencybutton/v1beta1/query.rpc.Query"; +import * as _653 from "./intertx/v1beta1/query.rpc.Query"; +import * as _654 from "./registration/v1beta1/query.rpc.Query"; +import * as _655 from "./compute/v1beta1/msg.rpc.msg"; +import * as _656 from "./emergencybutton/v1beta1/tx.rpc.msg"; +import * as _657 from "./intertx/v1beta1/tx.rpc.msg"; +import * as _693 from "./rpc.query"; +import * as _694 from "./rpc.tx"; export namespace secret { export namespace compute { export const v1beta1 = { - ..._363, ..._364, ..._365, ..._366, - ..._644, - ..._647, - ..._650, - ..._654 - }; - } - export namespace emergencybutton { - export const v1beta1 = { ..._367, - ..._368, - ..._369, - ..._370, ..._645, ..._648, ..._651, ..._655 }; } - export namespace intertx { + export namespace emergencybutton { export const v1beta1 = { + ..._368, + ..._369, + ..._370, ..._371, - ..._372, ..._646, ..._649, ..._652, ..._656 }; } - export namespace registration { + export namespace intertx { export const v1beta1 = { + ..._372, ..._373, + ..._647, + ..._650, + ..._653, + ..._657 + }; + } + export namespace registration { + export const v1beta1 = { ..._374, ..._375, ..._376, - ..._653 + ..._377, + ..._654 }; } export const ClientFactory = { - ..._692, - ..._693 + ..._693, + ..._694 }; } \ No newline at end of file diff --git a/packages/types/protobuf/codegen/tendermint/bundle.ts b/packages/types/protobuf/codegen/tendermint/bundle.ts index 9a20b420c..1978a9457 100644 --- a/packages/types/protobuf/codegen/tendermint/bundle.ts +++ b/packages/types/protobuf/codegen/tendermint/bundle.ts @@ -1,32 +1,32 @@ -import * as _380 from "./abci/types"; -import * as _381 from "./crypto/keys"; -import * as _382 from "./crypto/proof"; -import * as _383 from "./p2p/types"; -import * as _384 from "./types/block"; -import * as _385 from "./types/evidence"; -import * as _386 from "./types/params"; -import * as _387 from "./types/types"; -import * as _388 from "./types/validator"; -import * as _389 from "./version/types"; +import * as _381 from "./abci/types"; +import * as _382 from "./crypto/keys"; +import * as _383 from "./crypto/proof"; +import * as _384 from "./p2p/types"; +import * as _385 from "./types/block"; +import * as _386 from "./types/evidence"; +import * as _387 from "./types/params"; +import * as _388 from "./types/types"; +import * as _389 from "./types/validator"; +import * as _390 from "./version/types"; export namespace tendermint { export const abci = { - ..._380 + ..._381 }; export const crypto = { - ..._381, - ..._382 + ..._382, + ..._383 }; export const p2p = { - ..._383 + ..._384 }; export const types = { - ..._384, ..._385, ..._386, ..._387, - ..._388 + ..._388, + ..._389 }; export const version = { - ..._389 + ..._390 }; } \ No newline at end of file diff --git a/packages/types/protobuf/proto/gaia/metaprotocols/extensions.proto b/packages/types/protobuf/proto/gaia/metaprotocols/extensions.proto new file mode 100644 index 000000000..868ee0b7a --- /dev/null +++ b/packages/types/protobuf/proto/gaia/metaprotocols/extensions.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +package gaia.metaprotocols; + +option go_package = "github.com/cosmos/gaia/x/metaprotocols/types"; + +// ExtensionData is a data structure that can be used in transaction extensions. +message ExtensionData { + // protocol_id is the identifier of the protocol + // the field is not used internally but it is validated for correctness + string protocol_id = 1; + + // protocol_version is the identifier of the protocol version + // the field is not used internally but it is validated for correctness + string protocol_version = 2; + + // arbitrary bytes data that can be used to store any data + // the field is not used internally but it is validated and must be provided + bytes data = 3; +} diff --git a/packages/types/protobuf/scripts/codegen.js b/packages/types/protobuf/scripts/codegen.js index 2fc78d2f2..e94a829cf 100644 --- a/packages/types/protobuf/scripts/codegen.js +++ b/packages/types/protobuf/scripts/codegen.js @@ -60,6 +60,7 @@ telescope({ 'cosmwasm.tokenfactory.v1beta1', 'cosmwasm.wasm.v1', 'gaia.globalfee.v1beta1', + 'gaia.metaprotocols', 'google.protobuf', 'ibc.applications.transfer.v1', 'ibc.applications.interchain_accounts.v1', diff --git a/packages/types/protobuf/utils.ts b/packages/types/protobuf/utils.ts index 77bede15d..e2cac2679 100644 --- a/packages/types/protobuf/utils.ts +++ b/packages/types/protobuf/utils.ts @@ -78,6 +78,7 @@ import { MsgMigrateContract, MsgUpdateAdmin, } from './codegen/cosmwasm/wasm/v1/tx' +import { ExtensionData } from './codegen/gaia/metaprotocols/extensions' import { Any } from './codegen/google/protobuf/any' import { UploadCosmWasmPoolCodeAndWhiteListProposal } from './codegen/osmosis/cosmwasmpool/v1beta1/gov' import { @@ -714,6 +715,8 @@ export const getProtobufTypes = (): ReadonlyArray<[string, GeneratedType]> => [ MsgDeleteAllianceProposal.typeUrl, MsgDeleteAllianceProposal as GeneratedType, ], + // gaia.metaprotocols + [ExtensionData.typeUrl, ExtensionData as GeneratedType], ] export const getTypesRegistry = () => new Registry(getProtobufTypes()) @@ -735,6 +738,15 @@ export const getAminoTypes = () => ...bitsongAminoConverters, ...secretAminoConverters, ...omniFlixAminoConverters, + + // gaia.metaprotocols + [ExtensionData.typeUrl]: { + // the Amino type is the same as the protobuf type URL, deviating from + // convention for some reason... + aminoType: ExtensionData.typeUrl, + toAmino: ExtensionData.toAmino, + fromAmino: ExtensionData.fromAmino, + }, }) // Encodes a protobuf message value from its JSON representation into a byte diff --git a/packages/utils/constants/other.ts b/packages/utils/constants/other.ts index 2d7055a09..a8cad77df 100644 --- a/packages/utils/constants/other.ts +++ b/packages/utils/constants/other.ts @@ -232,3 +232,9 @@ export const DAOS_HIDDEN_FROM_SEARCH = [ // Lion DAO 'terra1a9ur9jyvg9kqfsl6euqdkv02v2klqnppzv4jpw93xzp5tr0xhkvschdnm5', ] + +/** + * Separator used between proposal description and additional metadata JSON + * stored at the end of the description field. + */ +export const PROPOSAL_DESCRIPTION_METADATA_SEPARATOR = '\n~@~@~@~\n' diff --git a/packages/utils/proposal.ts b/packages/utils/proposal.ts index d719c4c69..0c002d127 100644 --- a/packages/utils/proposal.ts +++ b/packages/utils/proposal.ts @@ -1,7 +1,10 @@ +import JSON5 from 'json5' import { TFunction } from 'react-i18next' import { DurationUnits, + GaiaMetaprotocolsExtensionData, + ProposalExecutionMetadata, ProposalModuleInfo, ProposalVetoConfig, } from '@dao-dao/types' @@ -15,6 +18,7 @@ import { } from '@dao-dao/types/contracts/DaoPreProposeApprovalSingle' import { VetoConfig } from '@dao-dao/types/contracts/DaoProposalSingle.v2' +import { PROPOSAL_DESCRIPTION_METADATA_SEPARATOR } from './constants' import { convertDurationToDurationWithUnits, convertDurationWithUnitsToDuration, @@ -200,3 +204,96 @@ export const checkProposalSubmissionPolicy = ({ isMember ? undefined : t('error.mustBeMemberToCreateProposal') + +/** + * Add additional metadata to the end of a proposal description as necessary. + */ +export const descriptionWithPotentialProposalMetadata = ( + description: string, + { + enabled, + memo, + gaiaMetaprotocolsExtensionData, + }: ProposalExecutionMetadata = {} +): string => { + if (!enabled) { + return description + } + + const metadata: ProposalExecutionMetadata = { + version: 1, + } + + if (memo?.trim()) { + metadata.memo = memo + } + + const validExtensionData = gaiaMetaprotocolsExtensionData?.flatMap( + (data): GaiaMetaprotocolsExtensionData | [] => + data.protocolId && data.protocolVersion && data.data + ? { + ...data, + // Ensure valid JSON. + data: JSON.stringify(JSON5.parse(data.data)), + } + : [] + ) + if (validExtensionData?.length !== gaiaMetaprotocolsExtensionData?.length) { + throw new Error('Invalid Gaia Metaprotocols extension data.') + } + if (validExtensionData?.length) { + metadata.gaiaMetaprotocolsExtensionData = validExtensionData + } + + // If metadata is not empty (beyond version), add it to the end of the + // description. + return Object.keys(metadata).length > 1 + ? `${description}${PROPOSAL_DESCRIPTION_METADATA_SEPARATOR}${JSON.stringify( + metadata + )}` + : description +} + +/** + * Extract additional metadata from the end of a proposal description, and + * return the description and metadata separately if it exists. + */ +export const extractProposalDescriptionAndMetadata = ( + description: string +): { + description: string + metadata?: ProposalExecutionMetadata +} => { + if (!description.includes(PROPOSAL_DESCRIPTION_METADATA_SEPARATOR)) { + return { description } + } + + const metadataSeparatorStart = description.lastIndexOf( + PROPOSAL_DESCRIPTION_METADATA_SEPARATOR + ) + + const metadataString = description.slice( + metadataSeparatorStart + PROPOSAL_DESCRIPTION_METADATA_SEPARATOR.length + ) + + let metadata: ProposalExecutionMetadata + try { + metadata = JSON.parse(metadataString) + if (typeof metadata !== 'object' || metadata === null) { + throw new Error('Metadata is not an object.') + } + } catch { + // Ignore metadata if failed to parse as JSON. + return { description } + } + + // Metadata version is not recognized. + if (metadata.version !== 1) { + return { description } + } + + return { + description: description.slice(0, metadataSeparatorStart), + metadata, + } +} diff --git a/patches/@cosmjs+cosmwasm-stargate+0.32.3.patch b/patches/@cosmjs+cosmwasm-stargate+0.32.3.patch new file mode 100644 index 000000000..d3eb9a00f --- /dev/null +++ b/patches/@cosmjs+cosmwasm-stargate+0.32.3.patch @@ -0,0 +1,215 @@ +diff --git a/node_modules/@cosmjs/cosmwasm-stargate/build/signingcosmwasmclient.d.ts b/node_modules/@cosmjs/cosmwasm-stargate/build/signingcosmwasmclient.d.ts +index 28a0e20..4e2f33c 100644 +--- a/node_modules/@cosmjs/cosmwasm-stargate/build/signingcosmwasmclient.d.ts ++++ b/node_modules/@cosmjs/cosmwasm-stargate/build/signingcosmwasmclient.d.ts +@@ -142,7 +142,7 @@ export declare class SigningCosmWasmClient extends CosmWasmClient { + */ + static offline(signer: OfflineSigner, options?: SigningCosmWasmClientOptions): Promise; + protected constructor(cometClient: CometClient | undefined, signer: OfflineSigner, options: SigningCosmWasmClientOptions); +- simulate(signerAddress: string, messages: readonly EncodeObject[], memo: string | undefined): Promise; ++ simulate(signerAddress: string, messages: readonly EncodeObject[], memo: string | undefined, nonCriticalExtensionOptions?: EncodeObject[]): Promise; + /** Uploads code and returns a receipt, including the code ID */ + upload(senderAddress: string, wasmCode: Uint8Array, fee: StdFee | "auto" | number, memo?: string, instantiatePermission?: AccessConfig): Promise; + instantiate(senderAddress: string, codeId: number, msg: JsonObject, label: string, fee: StdFee | "auto" | number, options?: InstantiateOptions): Promise; +@@ -150,11 +150,11 @@ export declare class SigningCosmWasmClient extends CosmWasmClient { + updateAdmin(senderAddress: string, contractAddress: string, newAdmin: string, fee: StdFee | "auto" | number, memo?: string): Promise; + clearAdmin(senderAddress: string, contractAddress: string, fee: StdFee | "auto" | number, memo?: string): Promise; + migrate(senderAddress: string, contractAddress: string, codeId: number, migrateMsg: JsonObject, fee: StdFee | "auto" | number, memo?: string): Promise; +- execute(senderAddress: string, contractAddress: string, msg: JsonObject, fee: StdFee | "auto" | number, memo?: string, funds?: readonly Coin[]): Promise; ++ execute(senderAddress: string, contractAddress: string, msg: JsonObject, fee: StdFee | "auto" | number, memo?: string, funds?: readonly Coin[], nonCriticalExtensionOptions?: EncodeObject[]): Promise; + /** + * Like `execute` but allows executing multiple messages in one transaction. + */ +- executeMultiple(senderAddress: string, instructions: readonly ExecuteInstruction[], fee: StdFee | "auto" | number, memo?: string): Promise; ++ executeMultiple(senderAddress: string, instructions: readonly ExecuteInstruction[], fee: StdFee | "auto" | number, memo?: string, nonCriticalExtensionOptions?: EncodeObject[]): Promise; + sendTokens(senderAddress: string, recipientAddress: string, amount: readonly Coin[], fee: StdFee | "auto" | number, memo?: string): Promise; + delegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: StdFee | "auto" | number, memo?: string): Promise; + undelegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: StdFee | "auto" | number, memo?: string): Promise; +@@ -167,8 +167,9 @@ export declare class SigningCosmWasmClient extends CosmWasmClient { + * @param fee + * @param memo + * @param timeoutHeight (optional) timeout height to prevent the tx from being committed past a certain height ++ * @param nonCriticalExtensionOptions (optional) non critical extension options to be included in the transaction + */ +- signAndBroadcast(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee | "auto" | number, memo?: string, timeoutHeight?: bigint): Promise; ++ signAndBroadcast(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee | "auto" | number, memo?: string, timeoutHeight?: bigint, nonCriticalExtensionOptions?: EncodeObject[]): Promise; + /** + * Creates a transaction with the given messages, fee, memo and timeout height. Then signs and broadcasts the transaction. + * +@@ -181,11 +182,12 @@ export declare class SigningCosmWasmClient extends CosmWasmClient { + * @param fee + * @param memo + * @param timeoutHeight (optional) timeout height to prevent the tx from being committed past a certain height ++ * @param nonCriticalExtensionOptions (optional) non critical extension options to be included in the transaction + * + * @returns Returns the hash of the transaction + */ +- signAndBroadcastSync(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee | "auto" | number, memo?: string, timeoutHeight?: bigint): Promise; +- sign(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee, memo: string, explicitSignerData?: SignerData, timeoutHeight?: bigint): Promise; ++ signAndBroadcastSync(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee | "auto" | number, memo?: string, timeoutHeight?: bigint, nonCriticalExtensionOptions?: EncodeObject[]): Promise; ++ sign(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee, memo: string, explicitSignerData?: SignerData, timeoutHeight?: bigint, nonCriticalExtensionOptions?: EncodeObject[]): Promise; + private signAmino; + private signDirect; + } +diff --git a/node_modules/@cosmjs/cosmwasm-stargate/build/signingcosmwasmclient.js b/node_modules/@cosmjs/cosmwasm-stargate/build/signingcosmwasmclient.js +index aa9967d..ad51191 100644 +--- a/node_modules/@cosmjs/cosmwasm-stargate/build/signingcosmwasmclient.js ++++ b/node_modules/@cosmjs/cosmwasm-stargate/build/signingcosmwasmclient.js +@@ -83,15 +83,16 @@ class SigningCosmWasmClient extends cosmwasmclient_1.CosmWasmClient { + this.broadcastPollIntervalMs = options.broadcastPollIntervalMs; + this.gasPrice = options.gasPrice; + } +- async simulate(signerAddress, messages, memo) { ++ async simulate(signerAddress, messages, memo, nonCriticalExtensionOptions) { + const anyMsgs = messages.map((m) => this.registry.encodeAsAny(m)); ++ const anyNonCriticalExtensionOptions = nonCriticalExtensionOptions?.map((m) => this.registry.encodeAsAny(m)); + const accountFromSigner = (await this.signer.getAccounts()).find((account) => account.address === signerAddress); + if (!accountFromSigner) { + throw new Error("Failed to retrieve account from signer"); + } + const pubkey = (0, amino_1.encodeSecp256k1Pubkey)(accountFromSigner.pubkey); + const { sequence } = await this.getSequence(signerAddress); +- const { gasInfo } = await this.forceGetQueryClient().tx.simulate(anyMsgs, memo, pubkey, sequence); ++ const { gasInfo } = await this.forceGetQueryClient().tx.simulate(anyMsgs, memo, pubkey, sequence, anyNonCriticalExtensionOptions); + (0, utils_1.assertDefined)(gasInfo); + return math_1.Uint53.fromString(gasInfo.gasUsed.toString()).toNumber(); + } +@@ -249,18 +250,18 @@ class SigningCosmWasmClient extends cosmwasmclient_1.CosmWasmClient { + gasUsed: result.gasUsed, + }; + } +- async execute(senderAddress, contractAddress, msg, fee, memo = "", funds) { ++ async execute(senderAddress, contractAddress, msg, fee, memo = "", funds, nonCriticalExtensionOptions) { + const instruction = { + contractAddress: contractAddress, + msg: msg, + funds: funds, + }; +- return this.executeMultiple(senderAddress, [instruction], fee, memo); ++ return this.executeMultiple(senderAddress, [instruction], fee, memo, nonCriticalExtensionOptions); + } + /** + * Like `execute` but allows executing multiple messages in one transaction. + */ +- async executeMultiple(senderAddress, instructions, fee, memo = "") { ++ async executeMultiple(senderAddress, instructions, fee, memo = "", nonCriticalExtensionOptions) { + const msgs = instructions.map((i) => ({ + typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", + value: tx_4.MsgExecuteContract.fromPartial({ +@@ -270,7 +271,7 @@ class SigningCosmWasmClient extends cosmwasmclient_1.CosmWasmClient { + funds: [...(i.funds || [])], + }), + })); +- const result = await this.signAndBroadcast(senderAddress, msgs, fee, memo); ++ const result = await this.signAndBroadcast(senderAddress, msgs, fee, memo, undefined, nonCriticalExtensionOptions); + if ((0, stargate_1.isDeliverTxFailure)(result)) { + throw new Error(createDeliverTxResponseErrorMessage(result)); + } +@@ -323,12 +324,13 @@ class SigningCosmWasmClient extends cosmwasmclient_1.CosmWasmClient { + * @param fee + * @param memo + * @param timeoutHeight (optional) timeout height to prevent the tx from being committed past a certain height ++ * @param nonCriticalExtensionOptions (optional) non critical extension options to be included in the transaction + */ +- async signAndBroadcast(signerAddress, messages, fee, memo = "", timeoutHeight) { ++ async signAndBroadcast(signerAddress, messages, fee, memo = "", timeoutHeight, nonCriticalExtensionOptions) { + let usedFee; + if (fee == "auto" || typeof fee === "number") { + (0, utils_1.assertDefined)(this.gasPrice, "Gas price must be set in the client options when auto gas is used."); +- const gasEstimation = await this.simulate(signerAddress, messages, memo); ++ const gasEstimation = await this.simulate(signerAddress, messages, memo, nonCriticalExtensionOptions); + // Starting with Cosmos SDK 0.47, we see many cases in which 1.3 is not enough anymore + // E.g. https://github.com/cosmos/cosmos-sdk/issues/16020 + const multiplier = typeof fee === "number" ? fee : 1.4; +@@ -337,7 +339,7 @@ class SigningCosmWasmClient extends cosmwasmclient_1.CosmWasmClient { + else { + usedFee = fee; + } +- const txRaw = await this.sign(signerAddress, messages, usedFee, memo, undefined, timeoutHeight); ++ const txRaw = await this.sign(signerAddress, messages, usedFee, memo, undefined, timeoutHeight, nonCriticalExtensionOptions); + const txBytes = tx_3.TxRaw.encode(txRaw).finish(); + return this.broadcastTx(txBytes, this.broadcastTimeoutMs, this.broadcastPollIntervalMs); + } +@@ -353,25 +355,26 @@ class SigningCosmWasmClient extends cosmwasmclient_1.CosmWasmClient { + * @param fee + * @param memo + * @param timeoutHeight (optional) timeout height to prevent the tx from being committed past a certain height ++ * @param nonCriticalExtensionOptions (optional) non critical extension options to be included in the transaction + * + * @returns Returns the hash of the transaction + */ +- async signAndBroadcastSync(signerAddress, messages, fee, memo = "", timeoutHeight) { ++ async signAndBroadcastSync(signerAddress, messages, fee, memo = "", timeoutHeight, nonCriticalExtensionOptions) { + let usedFee; + if (fee == "auto" || typeof fee === "number") { + (0, utils_1.assertDefined)(this.gasPrice, "Gas price must be set in the client options when auto gas is used."); +- const gasEstimation = await this.simulate(signerAddress, messages, memo); ++ const gasEstimation = await this.simulate(signerAddress, messages, memo, nonCriticalExtensionOptions); + const multiplier = typeof fee === "number" ? fee : 1.3; + usedFee = (0, stargate_1.calculateFee)(Math.round(gasEstimation * multiplier), this.gasPrice); + } + else { + usedFee = fee; + } +- const txRaw = await this.sign(signerAddress, messages, usedFee, memo, undefined, timeoutHeight); ++ const txRaw = await this.sign(signerAddress, messages, usedFee, memo, undefined, timeoutHeight, nonCriticalExtensionOptions); + const txBytes = tx_3.TxRaw.encode(txRaw).finish(); + return this.broadcastTxSync(txBytes); + } +- async sign(signerAddress, messages, fee, memo, explicitSignerData, timeoutHeight) { ++ async sign(signerAddress, messages, fee, memo, explicitSignerData, timeoutHeight, nonCriticalExtensionOptions) { + let signerData; + if (explicitSignerData) { + signerData = explicitSignerData; +@@ -386,10 +389,10 @@ class SigningCosmWasmClient extends cosmwasmclient_1.CosmWasmClient { + }; + } + return (0, proto_signing_1.isOfflineDirectSigner)(this.signer) +- ? this.signDirect(signerAddress, messages, fee, memo, signerData, timeoutHeight) +- : this.signAmino(signerAddress, messages, fee, memo, signerData, timeoutHeight); ++ ? this.signDirect(signerAddress, messages, fee, memo, signerData, timeoutHeight, nonCriticalExtensionOptions) ++ : this.signAmino(signerAddress, messages, fee, memo, signerData, timeoutHeight, nonCriticalExtensionOptions); + } +- async signAmino(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId }, timeoutHeight) { ++ async signAmino(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId }, timeoutHeight, nonCriticalExtensionOptions) { + (0, utils_1.assert)(!(0, proto_signing_1.isOfflineDirectSigner)(this.signer)); + const accountFromSigner = (await this.signer.getAccounts()).find((account) => account.address === signerAddress); + if (!accountFromSigner) { +@@ -400,12 +403,14 @@ class SigningCosmWasmClient extends cosmwasmclient_1.CosmWasmClient { + const msgs = messages.map((msg) => this.aminoTypes.toAmino(msg)); + const signDoc = (0, amino_1.makeSignDoc)(msgs, fee, chainId, memo, accountNumber, sequence, timeoutHeight); + const { signature, signed } = await this.signer.signAmino(signerAddress, signDoc); ++ const anyNonCriticalExtensionOptions = nonCriticalExtensionOptions?.map((m) => this.registry.encodeAsAny(m)); + const signedTxBody = { + typeUrl: "/cosmos.tx.v1beta1.TxBody", + value: { + messages: signed.msgs.map((msg) => this.aminoTypes.fromAmino(msg)), + memo: signed.memo, + timeoutHeight: timeoutHeight, ++ nonCriticalExtensionOptions: anyNonCriticalExtensionOptions, + }, + }; + const signedTxBodyBytes = this.registry.encode(signedTxBody); +@@ -418,19 +423,21 @@ class SigningCosmWasmClient extends cosmwasmclient_1.CosmWasmClient { + signatures: [(0, encoding_1.fromBase64)(signature.signature)], + }); + } +- async signDirect(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId }, timeoutHeight) { ++ async signDirect(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId }, timeoutHeight, nonCriticalExtensionOptions) { + (0, utils_1.assert)((0, proto_signing_1.isOfflineDirectSigner)(this.signer)); + const accountFromSigner = (await this.signer.getAccounts()).find((account) => account.address === signerAddress); + if (!accountFromSigner) { + throw new Error("Failed to retrieve account from signer"); + } + const pubkey = (0, proto_signing_1.encodePubkey)((0, amino_1.encodeSecp256k1Pubkey)(accountFromSigner.pubkey)); ++ const anyNonCriticalExtensionOptions = nonCriticalExtensionOptions?.map((m) => this.registry.encodeAsAny(m)); + const txBody = { + typeUrl: "/cosmos.tx.v1beta1.TxBody", + value: { + messages: messages, + memo: memo, + timeoutHeight: timeoutHeight, ++ nonCriticalExtensionOptions: anyNonCriticalExtensionOptions, + }, + }; + const txBodyBytes = this.registry.encode(txBody); diff --git a/patches/@cosmjs+stargate+0.32.3.patch b/patches/@cosmjs+stargate+0.32.3.patch new file mode 100644 index 000000000..d09755ec8 --- /dev/null +++ b/patches/@cosmjs+stargate+0.32.3.patch @@ -0,0 +1,39 @@ +diff --git a/node_modules/@cosmjs/stargate/build/modules/tx/queries.d.ts b/node_modules/@cosmjs/stargate/build/modules/tx/queries.d.ts +index 804d654..9423be6 100644 +--- a/node_modules/@cosmjs/stargate/build/modules/tx/queries.d.ts ++++ b/node_modules/@cosmjs/stargate/build/modules/tx/queries.d.ts +@@ -5,7 +5,7 @@ import { QueryClient } from "../../queryclient"; + export interface TxExtension { + readonly tx: { + getTx: (txId: string) => Promise; +- simulate: (messages: readonly Any[], memo: string | undefined, signer: Pubkey, sequence: number) => Promise; ++ simulate: (messages: readonly Any[], memo: string | undefined, signer: Pubkey, sequence: number, nonCriticalExtensionOptions?: readonly Any[]) => Promise; + }; + } + export declare function setupTxExtension(base: QueryClient): TxExtension; +diff --git a/node_modules/@cosmjs/stargate/build/modules/tx/queries.js b/node_modules/@cosmjs/stargate/build/modules/tx/queries.js +index 6a78179..831afd7 100644 +--- a/node_modules/@cosmjs/stargate/build/modules/tx/queries.js ++++ b/node_modules/@cosmjs/stargate/build/modules/tx/queries.js +@@ -20,7 +20,7 @@ function setupTxExtension(base) { + const response = await queryService.GetTx(request); + return response; + }, +- simulate: async (messages, memo, signer, sequence) => { ++ simulate: async (messages, memo, signer, sequence, nonCriticalExtensionOptions) => { + const tx = tx_1.Tx.fromPartial({ + authInfo: tx_1.AuthInfo.fromPartial({ + fee: tx_1.Fee.fromPartial({}), +@@ -35,10 +35,11 @@ function setupTxExtension(base) { + body: tx_1.TxBody.fromPartial({ + messages: Array.from(messages), + memo: memo, ++ nonCriticalExtensionOptions, + }), + signatures: [new Uint8Array()], + }); +- const request = service_1.SimulateRequest.fromPartial({ ++ const request = service_1.SimulateRequest.fromPartial({ + txBytes: tx_1.Tx.encode(tx).finish(), + }); + const response = await queryService.Simulate(request); diff --git a/yarn.lock b/yarn.lock index 6f34026d7..a51bfe01f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12031,7 +12031,7 @@ chalk@^2.0.1, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1: +chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -12203,7 +12203,7 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-info@^3.2.0: +ci-info@^3.2.0, ci-info@^3.7.0: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== @@ -15101,6 +15101,13 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -17999,7 +18006,7 @@ json-stable-stringify@^1.0.1: jsonify "^0.0.1" object-keys "^1.1.1" -json-stable-stringify@^1.1.1: +json-stable-stringify@^1.0.2, json-stable-stringify@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" integrity sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg== @@ -18156,6 +18163,13 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -20594,7 +20608,7 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" -open@^7.0.3: +open@^7.0.3, open@^7.4.2: version "7.4.2" resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== @@ -21014,6 +21028,27 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== +patch-package@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.0.tgz#d191e2f1b6e06a4624a0116bcb88edd6714ede61" + integrity sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^4.1.2" + ci-info "^3.7.0" + cross-spawn "^7.0.3" + find-yarn-workspace-root "^2.0.0" + fs-extra "^9.0.0" + json-stable-stringify "^1.0.2" + klaw-sync "^6.0.0" + minimist "^1.2.6" + open "^7.4.2" + rimraf "^2.6.3" + semver "^7.5.3" + slash "^2.0.0" + tmp "^0.0.33" + yaml "^2.2.2" + path-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" @@ -23219,6 +23254,11 @@ semver@^7.3.5, semver@^7.5.0, semver@^7.5.4: dependencies: lru-cache "^6.0.0" +semver@^7.5.3: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -26406,6 +26446,11 @@ yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yaml@^2.2.2: + version "2.5.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.1.tgz#c9772aacf62cb7494a95b0c4f1fb065b563db130" + integrity sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q== + yaml@^2.3.1, yaml@^2.3.4: version "2.3.4" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.4.tgz#53fc1d514be80aabf386dc6001eb29bf3b7523b2"