diff --git a/packages/protobuf/codegen/cosmos/authz/v1beta1/authz.ts b/packages/protobuf/codegen/cosmos/authz/v1beta1/authz.ts index c66dfd3ed..330fee772 100644 --- a/packages/protobuf/codegen/cosmos/authz/v1beta1/authz.ts +++ b/packages/protobuf/codegen/cosmos/authz/v1beta1/authz.ts @@ -3,6 +3,7 @@ import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf import { Timestamp } from "../../../google/protobuf/timestamp"; import { SendAuthorization, SendAuthorizationProtoMsg, SendAuthorizationSDKType } from "../../bank/v1beta1/authz"; import { StakeAuthorization, StakeAuthorizationProtoMsg, StakeAuthorizationSDKType } from "../../staking/v1beta1/authz"; +import { StoreCodeAuthorization, StoreCodeAuthorizationProtoMsg, StoreCodeAuthorizationSDKType, ContractExecutionAuthorization, ContractExecutionAuthorizationProtoMsg, ContractExecutionAuthorizationSDKType, ContractMigrationAuthorization, ContractMigrationAuthorizationProtoMsg, ContractMigrationAuthorizationSDKType } from "../../../cosmwasm/wasm/v1/authz"; import { TransferAuthorization, TransferAuthorizationProtoMsg, TransferAuthorizationSDKType } from "../../../ibc/applications/transfer/v1/authz"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { toTimestamp, fromTimestamp } from "../../../helpers"; @@ -44,7 +45,7 @@ export interface GenericAuthorizationSDKType { * the provide method with expiration time. */ export interface Grant { - authorization: (GenericAuthorization & SendAuthorization & StakeAuthorization & TransferAuthorization & Any) | undefined; + authorization: (GenericAuthorization & SendAuthorization & StakeAuthorization & StoreCodeAuthorization & ContractExecutionAuthorization & ContractMigrationAuthorization & TransferAuthorization & Any) | undefined; /** * time when the grant will expire and will be pruned. If null, then the grant * doesn't have a time expiration (other conditions in `authorization` @@ -57,7 +58,7 @@ export interface GrantProtoMsg { value: Uint8Array; } export type GrantEncoded = Omit & { - authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | TransferAuthorizationProtoMsg | AnyProtoMsg | undefined; + authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | StoreCodeAuthorizationProtoMsg | ContractExecutionAuthorizationProtoMsg | ContractMigrationAuthorizationProtoMsg | TransferAuthorizationProtoMsg | AnyProtoMsg | undefined; }; /** * Grant gives permissions to execute @@ -81,7 +82,7 @@ export interface GrantAminoMsg { * the provide method with expiration time. */ export interface GrantSDKType { - authorization: GenericAuthorizationSDKType | SendAuthorizationSDKType | StakeAuthorizationSDKType | TransferAuthorizationSDKType | AnySDKType | undefined; + authorization: GenericAuthorizationSDKType | SendAuthorizationSDKType | StakeAuthorizationSDKType | StoreCodeAuthorizationSDKType | ContractExecutionAuthorizationSDKType | ContractMigrationAuthorizationSDKType | TransferAuthorizationSDKType | AnySDKType | undefined; expiration?: Date | undefined; } /** @@ -91,7 +92,7 @@ export interface GrantSDKType { export interface GrantAuthorization { granter: string; grantee: string; - authorization: (GenericAuthorization & SendAuthorization & StakeAuthorization & TransferAuthorization & Any) | undefined; + authorization: (GenericAuthorization & SendAuthorization & StakeAuthorization & StoreCodeAuthorization & ContractExecutionAuthorization & ContractMigrationAuthorization & TransferAuthorization & Any) | undefined; expiration: Date | undefined; } export interface GrantAuthorizationProtoMsg { @@ -99,7 +100,7 @@ export interface GrantAuthorizationProtoMsg { value: Uint8Array; } export type GrantAuthorizationEncoded = Omit & { - authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | TransferAuthorizationProtoMsg | AnyProtoMsg | undefined; + authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | StoreCodeAuthorizationProtoMsg | ContractExecutionAuthorizationProtoMsg | ContractMigrationAuthorizationProtoMsg | TransferAuthorizationProtoMsg | AnyProtoMsg | undefined; }; /** * GrantAuthorization extends a grant with both the addresses of the grantee and granter. @@ -122,7 +123,7 @@ export interface GrantAuthorizationAminoMsg { export interface GrantAuthorizationSDKType { granter: string; grantee: string; - authorization: GenericAuthorizationSDKType | SendAuthorizationSDKType | StakeAuthorizationSDKType | TransferAuthorizationSDKType | AnySDKType | undefined; + authorization: GenericAuthorizationSDKType | SendAuthorizationSDKType | StakeAuthorizationSDKType | StoreCodeAuthorizationSDKType | ContractExecutionAuthorizationSDKType | ContractMigrationAuthorizationSDKType | TransferAuthorizationSDKType | AnySDKType | undefined; expiration: Date | undefined; } /** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */ @@ -460,7 +461,7 @@ export const GrantQueueItem = { }; } }; -export const Cosmos_authzv1beta1Authorization_InterfaceDecoder = (input: BinaryReader | Uint8Array): GenericAuthorization | SendAuthorization | StakeAuthorization | TransferAuthorization | Any => { +export const Cosmos_authzv1beta1Authorization_InterfaceDecoder = (input: BinaryReader | Uint8Array): GenericAuthorization | SendAuthorization | StakeAuthorization | StoreCodeAuthorization | ContractExecutionAuthorization | ContractMigrationAuthorization | TransferAuthorization | Any => { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const data = Any.decode(reader, reader.uint32()); switch (data.typeUrl) { @@ -470,6 +471,12 @@ export const Cosmos_authzv1beta1Authorization_InterfaceDecoder = (input: BinaryR return SendAuthorization.decode(data.value); case "/cosmos.staking.v1beta1.StakeAuthorization": return StakeAuthorization.decode(data.value); + case "/cosmwasm.wasm.v1.StoreCodeAuthorization": + return StoreCodeAuthorization.decode(data.value); + case "/cosmwasm.wasm.v1.ContractExecutionAuthorization": + return ContractExecutionAuthorization.decode(data.value); + case "/cosmwasm.wasm.v1.ContractMigrationAuthorization": + return ContractMigrationAuthorization.decode(data.value); case "/ibc.applications.transfer.v1.TransferAuthorization": return TransferAuthorization.decode(data.value); default: @@ -493,6 +500,21 @@ export const Cosmos_authzv1beta1Authorization_FromAmino = (content: AnyAmino) => typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization", value: StakeAuthorization.encode(StakeAuthorization.fromPartial(StakeAuthorization.fromAmino(content.value))).finish() }); + case "wasm/StoreCodeAuthorization": + return Any.fromPartial({ + typeUrl: "/cosmwasm.wasm.v1.StoreCodeAuthorization", + value: StoreCodeAuthorization.encode(StoreCodeAuthorization.fromPartial(StoreCodeAuthorization.fromAmino(content.value))).finish() + }); + case "wasm/ContractExecutionAuthorization": + return Any.fromPartial({ + typeUrl: "/cosmwasm.wasm.v1.ContractExecutionAuthorization", + value: ContractExecutionAuthorization.encode(ContractExecutionAuthorization.fromPartial(ContractExecutionAuthorization.fromAmino(content.value))).finish() + }); + case "wasm/ContractMigrationAuthorization": + return Any.fromPartial({ + typeUrl: "/cosmwasm.wasm.v1.ContractMigrationAuthorization", + value: ContractMigrationAuthorization.encode(ContractMigrationAuthorization.fromPartial(ContractMigrationAuthorization.fromAmino(content.value))).finish() + }); case "cosmos-sdk/TransferAuthorization": return Any.fromPartial({ typeUrl: "/ibc.applications.transfer.v1.TransferAuthorization", @@ -519,6 +541,21 @@ export const Cosmos_authzv1beta1Authorization_ToAmino = (content: Any) => { type: "cosmos-sdk/StakeAuthorization", value: StakeAuthorization.toAmino(StakeAuthorization.decode(content.value)) }; + case "/cosmwasm.wasm.v1.StoreCodeAuthorization": + return { + type: "wasm/StoreCodeAuthorization", + value: StoreCodeAuthorization.toAmino(StoreCodeAuthorization.decode(content.value)) + }; + case "/cosmwasm.wasm.v1.ContractExecutionAuthorization": + return { + type: "wasm/ContractExecutionAuthorization", + value: ContractExecutionAuthorization.toAmino(ContractExecutionAuthorization.decode(content.value)) + }; + case "/cosmwasm.wasm.v1.ContractMigrationAuthorization": + return { + type: "wasm/ContractMigrationAuthorization", + value: ContractMigrationAuthorization.toAmino(ContractMigrationAuthorization.decode(content.value)) + }; case "/ibc.applications.transfer.v1.TransferAuthorization": return { type: "cosmos-sdk/TransferAuthorization", diff --git a/packages/protobuf/codegen/cosmwasm/wasm/v1/authz.ts b/packages/protobuf/codegen/cosmwasm/wasm/v1/authz.ts index 0e8f444d1..36a8c0e7a 100644 --- a/packages/protobuf/codegen/cosmwasm/wasm/v1/authz.ts +++ b/packages/protobuf/codegen/cosmwasm/wasm/v1/authz.ts @@ -1,7 +1,41 @@ //@ts-nocheck +import { AccessConfig, AccessConfigAmino, AccessConfigSDKType } from "./types"; import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; +/** + * StoreCodeAuthorization defines authorization for wasm code upload. + * Since: wasmd 0.42 + */ +export interface StoreCodeAuthorization { + $typeUrl?: string; + /** Grants for code upload */ + grants: CodeGrant[]; +} +export interface StoreCodeAuthorizationProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.StoreCodeAuthorization"; + value: Uint8Array; +} +/** + * StoreCodeAuthorization defines authorization for wasm code upload. + * Since: wasmd 0.42 + */ +export interface StoreCodeAuthorizationAmino { + /** Grants for code upload */ + grants: CodeGrantAmino[]; +} +export interface StoreCodeAuthorizationAminoMsg { + type: "wasm/StoreCodeAuthorization"; + value: StoreCodeAuthorizationAmino; +} +/** + * StoreCodeAuthorization defines authorization for wasm code upload. + * Since: wasmd 0.42 + */ +export interface StoreCodeAuthorizationSDKType { + $typeUrl?: string; + grants: CodeGrantSDKType[]; +} /** * ContractExecutionAuthorization defines authorization for wasm execute. * Since: wasmd 0.30 @@ -68,6 +102,47 @@ export interface ContractMigrationAuthorizationSDKType { $typeUrl?: string; grants: ContractGrantSDKType[]; } +/** CodeGrant a granted permission for a single code */ +export interface CodeGrant { + /** + * CodeHash is the unique identifier created by wasmvm + * Wildcard "*" is used to specify any kind of grant. + */ + codeHash: Uint8Array; + /** + * InstantiatePermission is the superset access control to apply + * on contract creation. + * Optional + */ + instantiatePermission: AccessConfig | undefined; +} +export interface CodeGrantProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.CodeGrant"; + value: Uint8Array; +} +/** CodeGrant a granted permission for a single code */ +export interface CodeGrantAmino { + /** + * CodeHash is the unique identifier created by wasmvm + * Wildcard "*" is used to specify any kind of grant. + */ + code_hash: Uint8Array; + /** + * InstantiatePermission is the superset access control to apply + * on contract creation. + * Optional + */ + instantiate_permission?: AccessConfigAmino | undefined; +} +export interface CodeGrantAminoMsg { + type: "wasm/CodeGrant"; + value: CodeGrantAmino; +} +/** CodeGrant a granted permission for a single code */ +export interface CodeGrantSDKType { + code_hash: Uint8Array; + instantiate_permission: AccessConfigSDKType | undefined; +} /** * ContractGrant a granted permission for a single contract * Since: wasmd 0.30 @@ -345,6 +420,78 @@ export interface AcceptedMessagesFilterSDKType { $typeUrl?: string; messages: Uint8Array[]; } +function createBaseStoreCodeAuthorization(): StoreCodeAuthorization { + return { + $typeUrl: "/cosmwasm.wasm.v1.StoreCodeAuthorization", + grants: [] + }; +} +export const StoreCodeAuthorization = { + typeUrl: "/cosmwasm.wasm.v1.StoreCodeAuthorization", + encode(message: StoreCodeAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.grants) { + CodeGrant.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): StoreCodeAuthorization { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStoreCodeAuthorization(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.grants.push(CodeGrant.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): StoreCodeAuthorization { + const message = createBaseStoreCodeAuthorization(); + message.grants = object.grants?.map(e => CodeGrant.fromPartial(e)) || []; + return message; + }, + fromAmino(object: StoreCodeAuthorizationAmino): StoreCodeAuthorization { + return { + grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => CodeGrant.fromAmino(e)) : [] + }; + }, + toAmino(message: StoreCodeAuthorization): StoreCodeAuthorizationAmino { + const obj: any = {}; + if (message.grants) { + obj.grants = message.grants.map(e => e ? CodeGrant.toAmino(e) : undefined); + } else { + obj.grants = []; + } + return obj; + }, + fromAminoMsg(object: StoreCodeAuthorizationAminoMsg): StoreCodeAuthorization { + return StoreCodeAuthorization.fromAmino(object.value); + }, + toAminoMsg(message: StoreCodeAuthorization): StoreCodeAuthorizationAminoMsg { + return { + type: "wasm/StoreCodeAuthorization", + value: StoreCodeAuthorization.toAmino(message) + }; + }, + fromProtoMsg(message: StoreCodeAuthorizationProtoMsg): StoreCodeAuthorization { + return StoreCodeAuthorization.decode(message.value); + }, + toProto(message: StoreCodeAuthorization): Uint8Array { + return StoreCodeAuthorization.encode(message).finish(); + }, + toProtoMsg(message: StoreCodeAuthorization): StoreCodeAuthorizationProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.StoreCodeAuthorization", + value: StoreCodeAuthorization.encode(message).finish() + }; + } +}; function createBaseContractExecutionAuthorization(): ContractExecutionAuthorization { return { $typeUrl: "/cosmwasm.wasm.v1.ContractExecutionAuthorization", @@ -489,6 +636,83 @@ export const ContractMigrationAuthorization = { }; } }; +function createBaseCodeGrant(): CodeGrant { + return { + codeHash: new Uint8Array(), + instantiatePermission: AccessConfig.fromPartial({}) + }; +} +export const CodeGrant = { + typeUrl: "/cosmwasm.wasm.v1.CodeGrant", + encode(message: CodeGrant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.codeHash.length !== 0) { + writer.uint32(10).bytes(message.codeHash); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): CodeGrant { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCodeGrant(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.codeHash = reader.bytes(); + break; + case 2: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): CodeGrant { + const message = createBaseCodeGrant(); + message.codeHash = object.codeHash ?? new Uint8Array(); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; + return message; + }, + fromAmino(object: CodeGrantAmino): CodeGrant { + return { + codeHash: object.code_hash, + instantiatePermission: object?.instantiate_permission ? AccessConfig.fromAmino(object.instantiate_permission) : undefined + }; + }, + toAmino(message: CodeGrant): CodeGrantAmino { + const obj: any = {}; + obj.code_hash = message.codeHash; + obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; + return obj; + }, + fromAminoMsg(object: CodeGrantAminoMsg): CodeGrant { + return CodeGrant.fromAmino(object.value); + }, + toAminoMsg(message: CodeGrant): CodeGrantAminoMsg { + return { + type: "wasm/CodeGrant", + value: CodeGrant.toAmino(message) + }; + }, + fromProtoMsg(message: CodeGrantProtoMsg): CodeGrant { + return CodeGrant.decode(message.value); + }, + toProto(message: CodeGrant): Uint8Array { + return CodeGrant.encode(message).finish(); + }, + toProtoMsg(message: CodeGrant): CodeGrantProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.CodeGrant", + value: CodeGrant.encode(message).finish() + }; + } +}; function createBaseContractGrant(): ContractGrant { return { contract: "", @@ -521,10 +745,10 @@ export const ContractGrant = { message.contract = reader.string(); break; case 2: - message.limit = (ContractAuthzLimitX_InterfaceDecoder(reader) as Any); + message.limit = (Cosmwasm_wasmv1ContractAuthzLimitX_InterfaceDecoder(reader) as Any); break; case 3: - message.filter = (ContractAuthzFilterX_InterfaceDecoder(reader) as Any); + message.filter = (Cosmwasm_wasmv1ContractAuthzFilterX_InterfaceDecoder(reader) as Any); break; default: reader.skipType(tag & 7); @@ -543,15 +767,15 @@ export const ContractGrant = { fromAmino(object: ContractGrantAmino): ContractGrant { return { contract: object.contract, - limit: object?.limit ? ContractAuthzLimitX_FromAmino(object.limit) : undefined, - filter: object?.filter ? ContractAuthzFilterX_FromAmino(object.filter) : undefined + limit: object?.limit ? Cosmwasm_wasmv1ContractAuthzLimitX_FromAmino(object.limit) : undefined, + filter: object?.filter ? Cosmwasm_wasmv1ContractAuthzFilterX_FromAmino(object.filter) : undefined }; }, toAmino(message: ContractGrant): ContractGrantAmino { const obj: any = {}; obj.contract = message.contract; - obj.limit = message.limit ? ContractAuthzLimitX_ToAmino((message.limit as Any)) : undefined; - obj.filter = message.filter ? ContractAuthzFilterX_ToAmino((message.filter as Any)) : undefined; + obj.limit = message.limit ? Cosmwasm_wasmv1ContractAuthzLimitX_ToAmino((message.limit as Any)) : undefined; + obj.filter = message.filter ? Cosmwasm_wasmv1ContractAuthzFilterX_ToAmino((message.filter as Any)) : undefined; return obj; }, fromAminoMsg(object: ContractGrantAminoMsg): ContractGrant { @@ -999,7 +1223,7 @@ export const AcceptedMessagesFilter = { }; } }; -export const ContractAuthzLimitX_InterfaceDecoder = (input: BinaryReader | Uint8Array): MaxCallsLimit | MaxFundsLimit | CombinedLimit | Any => { +export const Cosmwasm_wasmv1ContractAuthzLimitX_InterfaceDecoder = (input: BinaryReader | Uint8Array): MaxCallsLimit | MaxFundsLimit | CombinedLimit | Any => { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const data = Any.decode(reader, reader.uint32()); switch (data.typeUrl) { @@ -1013,7 +1237,7 @@ export const ContractAuthzLimitX_InterfaceDecoder = (input: BinaryReader | Uint8 return data; } }; -export const ContractAuthzLimitX_FromAmino = (content: AnyAmino) => { +export const Cosmwasm_wasmv1ContractAuthzLimitX_FromAmino = (content: AnyAmino) => { switch (content.type) { case "wasm/MaxCallsLimit": return Any.fromPartial({ @@ -1034,7 +1258,7 @@ export const ContractAuthzLimitX_FromAmino = (content: AnyAmino) => { return Any.fromAmino(content); } }; -export const ContractAuthzLimitX_ToAmino = (content: Any) => { +export const Cosmwasm_wasmv1ContractAuthzLimitX_ToAmino = (content: Any) => { switch (content.typeUrl) { case "/cosmwasm.wasm.v1.MaxCallsLimit": return { @@ -1055,7 +1279,7 @@ export const ContractAuthzLimitX_ToAmino = (content: Any) => { return Any.toAmino(content); } }; -export const ContractAuthzFilterX_InterfaceDecoder = (input: BinaryReader | Uint8Array): AllowAllMessagesFilter | AcceptedMessageKeysFilter | AcceptedMessagesFilter | Any => { +export const Cosmwasm_wasmv1ContractAuthzFilterX_InterfaceDecoder = (input: BinaryReader | Uint8Array): AllowAllMessagesFilter | AcceptedMessageKeysFilter | AcceptedMessagesFilter | Any => { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const data = Any.decode(reader, reader.uint32()); switch (data.typeUrl) { @@ -1069,7 +1293,7 @@ export const ContractAuthzFilterX_InterfaceDecoder = (input: BinaryReader | Uint return data; } }; -export const ContractAuthzFilterX_FromAmino = (content: AnyAmino) => { +export const Cosmwasm_wasmv1ContractAuthzFilterX_FromAmino = (content: AnyAmino) => { switch (content.type) { case "wasm/AllowAllMessagesFilter": return Any.fromPartial({ @@ -1090,7 +1314,7 @@ export const ContractAuthzFilterX_FromAmino = (content: AnyAmino) => { return Any.fromAmino(content); } }; -export const ContractAuthzFilterX_ToAmino = (content: Any) => { +export const Cosmwasm_wasmv1ContractAuthzFilterX_ToAmino = (content: Any) => { switch (content.typeUrl) { case "/cosmwasm.wasm.v1.AllowAllMessagesFilter": return { diff --git a/packages/protobuf/codegen/cosmwasm/wasm/v1/ibc.ts b/packages/protobuf/codegen/cosmwasm/wasm/v1/ibc.ts index f82283b61..628b26b46 100644 --- a/packages/protobuf/codegen/cosmwasm/wasm/v1/ibc.ts +++ b/packages/protobuf/codegen/cosmwasm/wasm/v1/ibc.ts @@ -54,6 +54,28 @@ export interface MsgIBCSendSDKType { timeout_timestamp: bigint; data: Uint8Array; } +/** MsgIBCSendResponse */ +export interface MsgIBCSendResponse { + /** Sequence number of the IBC packet sent */ + sequence: bigint; +} +export interface MsgIBCSendResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgIBCSendResponse"; + value: Uint8Array; +} +/** MsgIBCSendResponse */ +export interface MsgIBCSendResponseAmino { + /** Sequence number of the IBC packet sent */ + sequence: string; +} +export interface MsgIBCSendResponseAminoMsg { + type: "wasm/MsgIBCSendResponse"; + value: MsgIBCSendResponseAmino; +} +/** MsgIBCSendResponse */ +export interface MsgIBCSendResponseSDKType { + sequence: bigint; +} /** MsgIBCCloseChannel port and channel need to be owned by the contract */ export interface MsgIBCCloseChannel { channel: string; @@ -171,6 +193,73 @@ export const MsgIBCSend = { }; } }; +function createBaseMsgIBCSendResponse(): MsgIBCSendResponse { + return { + sequence: BigInt(0) + }; +} +export const MsgIBCSendResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgIBCSendResponse", + encode(message: MsgIBCSendResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(message.sequence); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgIBCSendResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgIBCSendResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgIBCSendResponse { + const message = createBaseMsgIBCSendResponse(); + message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); + return message; + }, + fromAmino(object: MsgIBCSendResponseAmino): MsgIBCSendResponse { + return { + sequence: BigInt(object.sequence) + }; + }, + toAmino(message: MsgIBCSendResponse): MsgIBCSendResponseAmino { + const obj: any = {}; + obj.sequence = message.sequence ? message.sequence.toString() : undefined; + return obj; + }, + fromAminoMsg(object: MsgIBCSendResponseAminoMsg): MsgIBCSendResponse { + return MsgIBCSendResponse.fromAmino(object.value); + }, + toAminoMsg(message: MsgIBCSendResponse): MsgIBCSendResponseAminoMsg { + return { + type: "wasm/MsgIBCSendResponse", + value: MsgIBCSendResponse.toAmino(message) + }; + }, + fromProtoMsg(message: MsgIBCSendResponseProtoMsg): MsgIBCSendResponse { + return MsgIBCSendResponse.decode(message.value); + }, + toProto(message: MsgIBCSendResponse): Uint8Array { + return MsgIBCSendResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgIBCSendResponse): MsgIBCSendResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgIBCSendResponse", + value: MsgIBCSendResponse.encode(message).finish() + }; + } +}; function createBaseMsgIBCCloseChannel(): MsgIBCCloseChannel { return { channel: "" diff --git a/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.amino.ts b/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.amino.ts index 5933c156c..bdd72ab71 100644 --- a/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.amino.ts +++ b/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.amino.ts @@ -1,4 +1,4 @@ -import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin } from "./tx"; +import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin, MsgUpdateInstantiateConfig, MsgUpdateParams, MsgSudoContract, MsgPinCodes, MsgUnpinCodes, MsgStoreAndInstantiateContract, MsgRemoveCodeUploadParamsAddresses, MsgAddCodeUploadParamsAddresses, MsgStoreAndMigrateContract, MsgUpdateContractLabel } from "./tx"; export const AminoConverter = { "/cosmwasm.wasm.v1.MsgStoreCode": { aminoType: "wasm/MsgStoreCode", @@ -34,5 +34,55 @@ export const AminoConverter = { aminoType: "wasm/MsgClearAdmin", toAmino: MsgClearAdmin.toAmino, fromAmino: MsgClearAdmin.fromAmino + }, + "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig": { + aminoType: "wasm/MsgUpdateInstantiateConfig", + toAmino: MsgUpdateInstantiateConfig.toAmino, + fromAmino: MsgUpdateInstantiateConfig.fromAmino + }, + "/cosmwasm.wasm.v1.MsgUpdateParams": { + aminoType: "wasm/MsgUpdateParams", + toAmino: MsgUpdateParams.toAmino, + fromAmino: MsgUpdateParams.fromAmino + }, + "/cosmwasm.wasm.v1.MsgSudoContract": { + aminoType: "wasm/MsgSudoContract", + toAmino: MsgSudoContract.toAmino, + fromAmino: MsgSudoContract.fromAmino + }, + "/cosmwasm.wasm.v1.MsgPinCodes": { + aminoType: "wasm/MsgPinCodes", + toAmino: MsgPinCodes.toAmino, + fromAmino: MsgPinCodes.fromAmino + }, + "/cosmwasm.wasm.v1.MsgUnpinCodes": { + aminoType: "wasm/MsgUnpinCodes", + toAmino: MsgUnpinCodes.toAmino, + fromAmino: MsgUnpinCodes.fromAmino + }, + "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract": { + aminoType: "wasm/MsgStoreAndInstantiateContract", + toAmino: MsgStoreAndInstantiateContract.toAmino, + fromAmino: MsgStoreAndInstantiateContract.fromAmino + }, + "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses": { + aminoType: "wasm/MsgRemoveCodeUploadParamsAddresses", + toAmino: MsgRemoveCodeUploadParamsAddresses.toAmino, + fromAmino: MsgRemoveCodeUploadParamsAddresses.fromAmino + }, + "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses": { + aminoType: "wasm/MsgAddCodeUploadParamsAddresses", + toAmino: MsgAddCodeUploadParamsAddresses.toAmino, + fromAmino: MsgAddCodeUploadParamsAddresses.fromAmino + }, + "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract": { + aminoType: "wasm/MsgStoreAndMigrateContract", + toAmino: MsgStoreAndMigrateContract.toAmino, + fromAmino: MsgStoreAndMigrateContract.fromAmino + }, + "/cosmwasm.wasm.v1.MsgUpdateContractLabel": { + aminoType: "wasm/MsgUpdateContractLabel", + toAmino: MsgUpdateContractLabel.toAmino, + fromAmino: MsgUpdateContractLabel.fromAmino } }; \ No newline at end of file diff --git a/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.registry.ts b/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.registry.ts index 747909bf3..dc20b1aaf 100644 --- a/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.registry.ts +++ b/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.registry.ts @@ -1,7 +1,7 @@ //@ts-nocheck import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmwasm.wasm.v1.MsgStoreCode", MsgStoreCode], ["/cosmwasm.wasm.v1.MsgInstantiateContract", MsgInstantiateContract], ["/cosmwasm.wasm.v1.MsgInstantiateContract2", MsgInstantiateContract2], ["/cosmwasm.wasm.v1.MsgExecuteContract", MsgExecuteContract], ["/cosmwasm.wasm.v1.MsgMigrateContract", MsgMigrateContract], ["/cosmwasm.wasm.v1.MsgUpdateAdmin", MsgUpdateAdmin], ["/cosmwasm.wasm.v1.MsgClearAdmin", MsgClearAdmin]]; +import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin, MsgUpdateInstantiateConfig, MsgUpdateParams, MsgSudoContract, MsgPinCodes, MsgUnpinCodes, MsgStoreAndInstantiateContract, MsgRemoveCodeUploadParamsAddresses, MsgAddCodeUploadParamsAddresses, MsgStoreAndMigrateContract, MsgUpdateContractLabel } from "./tx"; +export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmwasm.wasm.v1.MsgStoreCode", MsgStoreCode], ["/cosmwasm.wasm.v1.MsgInstantiateContract", MsgInstantiateContract], ["/cosmwasm.wasm.v1.MsgInstantiateContract2", MsgInstantiateContract2], ["/cosmwasm.wasm.v1.MsgExecuteContract", MsgExecuteContract], ["/cosmwasm.wasm.v1.MsgMigrateContract", MsgMigrateContract], ["/cosmwasm.wasm.v1.MsgUpdateAdmin", MsgUpdateAdmin], ["/cosmwasm.wasm.v1.MsgClearAdmin", MsgClearAdmin], ["/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", MsgUpdateInstantiateConfig], ["/cosmwasm.wasm.v1.MsgUpdateParams", MsgUpdateParams], ["/cosmwasm.wasm.v1.MsgSudoContract", MsgSudoContract], ["/cosmwasm.wasm.v1.MsgPinCodes", MsgPinCodes], ["/cosmwasm.wasm.v1.MsgUnpinCodes", MsgUnpinCodes], ["/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", MsgStoreAndInstantiateContract], ["/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", MsgRemoveCodeUploadParamsAddresses], ["/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", MsgAddCodeUploadParamsAddresses], ["/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", MsgStoreAndMigrateContract], ["/cosmwasm.wasm.v1.MsgUpdateContractLabel", MsgUpdateContractLabel]]; export const load = (protoRegistry: Registry) => { registry.forEach(([typeUrl, mod]) => { protoRegistry.register(typeUrl, mod); @@ -50,6 +50,66 @@ export const MessageComposer = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", value: MsgClearAdmin.encode(value).finish() }; + }, + updateInstantiateConfig(value: MsgUpdateInstantiateConfig) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + value: MsgUpdateInstantiateConfig.encode(value).finish() + }; + }, + updateParams(value: MsgUpdateParams) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + value: MsgUpdateParams.encode(value).finish() + }; + }, + sudoContract(value: MsgSudoContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + value: MsgSudoContract.encode(value).finish() + }; + }, + pinCodes(value: MsgPinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + value: MsgPinCodes.encode(value).finish() + }; + }, + unpinCodes(value: MsgUnpinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + value: MsgUnpinCodes.encode(value).finish() + }; + }, + storeAndInstantiateContract(value: MsgStoreAndInstantiateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + value: MsgStoreAndInstantiateContract.encode(value).finish() + }; + }, + removeCodeUploadParamsAddresses(value: MsgRemoveCodeUploadParamsAddresses) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", + value: MsgRemoveCodeUploadParamsAddresses.encode(value).finish() + }; + }, + addCodeUploadParamsAddresses(value: MsgAddCodeUploadParamsAddresses) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", + value: MsgAddCodeUploadParamsAddresses.encode(value).finish() + }; + }, + storeAndMigrateContract(value: MsgStoreAndMigrateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", + value: MsgStoreAndMigrateContract.encode(value).finish() + }; + }, + updateContractLabel(value: MsgUpdateContractLabel) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", + value: MsgUpdateContractLabel.encode(value).finish() + }; } }, withTypeUrl: { @@ -94,6 +154,66 @@ export const MessageComposer = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", value }; + }, + updateInstantiateConfig(value: MsgUpdateInstantiateConfig) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + value + }; + }, + updateParams(value: MsgUpdateParams) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + value + }; + }, + sudoContract(value: MsgSudoContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + value + }; + }, + pinCodes(value: MsgPinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + value + }; + }, + unpinCodes(value: MsgUnpinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + value + }; + }, + storeAndInstantiateContract(value: MsgStoreAndInstantiateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + value + }; + }, + removeCodeUploadParamsAddresses(value: MsgRemoveCodeUploadParamsAddresses) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", + value + }; + }, + addCodeUploadParamsAddresses(value: MsgAddCodeUploadParamsAddresses) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", + value + }; + }, + storeAndMigrateContract(value: MsgStoreAndMigrateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", + value + }; + }, + updateContractLabel(value: MsgUpdateContractLabel) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", + value + }; } }, fromPartial: { @@ -138,6 +258,66 @@ export const MessageComposer = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", value: MsgClearAdmin.fromPartial(value) }; + }, + updateInstantiateConfig(value: MsgUpdateInstantiateConfig) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + value: MsgUpdateInstantiateConfig.fromPartial(value) + }; + }, + updateParams(value: MsgUpdateParams) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + value: MsgUpdateParams.fromPartial(value) + }; + }, + sudoContract(value: MsgSudoContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + value: MsgSudoContract.fromPartial(value) + }; + }, + pinCodes(value: MsgPinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + value: MsgPinCodes.fromPartial(value) + }; + }, + unpinCodes(value: MsgUnpinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + value: MsgUnpinCodes.fromPartial(value) + }; + }, + storeAndInstantiateContract(value: MsgStoreAndInstantiateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + value: MsgStoreAndInstantiateContract.fromPartial(value) + }; + }, + removeCodeUploadParamsAddresses(value: MsgRemoveCodeUploadParamsAddresses) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", + value: MsgRemoveCodeUploadParamsAddresses.fromPartial(value) + }; + }, + addCodeUploadParamsAddresses(value: MsgAddCodeUploadParamsAddresses) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", + value: MsgAddCodeUploadParamsAddresses.fromPartial(value) + }; + }, + storeAndMigrateContract(value: MsgStoreAndMigrateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", + value: MsgStoreAndMigrateContract.fromPartial(value) + }; + }, + updateContractLabel(value: MsgUpdateContractLabel) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", + value: MsgUpdateContractLabel.fromPartial(value) + }; } } }; \ No newline at end of file diff --git a/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts b/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts index 5df78401d..b01cae2f4 100644 --- a/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts +++ b/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts @@ -1,6 +1,6 @@ import { Rpc } from "../../../helpers"; import { BinaryReader } from "../../../binary"; -import { MsgStoreCode, MsgStoreCodeResponse, MsgInstantiateContract, MsgInstantiateContractResponse, MsgInstantiateContract2, MsgInstantiateContract2Response, MsgExecuteContract, MsgExecuteContractResponse, MsgMigrateContract, MsgMigrateContractResponse, MsgUpdateAdmin, MsgUpdateAdminResponse, MsgClearAdmin, MsgClearAdminResponse } from "./tx"; +import { MsgStoreCode, MsgStoreCodeResponse, MsgInstantiateContract, MsgInstantiateContractResponse, MsgInstantiateContract2, MsgInstantiateContract2Response, MsgExecuteContract, MsgExecuteContractResponse, MsgMigrateContract, MsgMigrateContractResponse, MsgUpdateAdmin, MsgUpdateAdminResponse, MsgClearAdmin, MsgClearAdminResponse, MsgUpdateInstantiateConfig, MsgUpdateInstantiateConfigResponse, MsgUpdateParams, MsgUpdateParamsResponse, MsgSudoContract, MsgSudoContractResponse, MsgPinCodes, MsgPinCodesResponse, MsgUnpinCodes, MsgUnpinCodesResponse, MsgStoreAndInstantiateContract, MsgStoreAndInstantiateContractResponse, MsgRemoveCodeUploadParamsAddresses, MsgRemoveCodeUploadParamsAddressesResponse, MsgAddCodeUploadParamsAddresses, MsgAddCodeUploadParamsAddressesResponse, MsgStoreAndMigrateContract, MsgStoreAndMigrateContractResponse, MsgUpdateContractLabel, MsgUpdateContractLabelResponse } from "./tx"; /** Msg defines the wasm Msg service. */ export interface Msg { /** StoreCode to submit Wasm code to the system */ @@ -19,10 +19,72 @@ export interface Msg { executeContract(request: MsgExecuteContract): Promise; /** Migrate runs a code upgrade/ downgrade for a smart contract */ migrateContract(request: MsgMigrateContract): Promise; - /** UpdateAdmin sets a new admin for a smart contract */ + /** UpdateAdmin sets a new admin for a smart contract */ updateAdmin(request: MsgUpdateAdmin): Promise; /** ClearAdmin removes any admin stored for a smart contract */ clearAdmin(request: MsgClearAdmin): Promise; + /** UpdateInstantiateConfig updates instantiate config for a smart contract */ + updateInstantiateConfig(request: MsgUpdateInstantiateConfig): Promise; + /** + * UpdateParams defines a governance operation for updating the x/wasm + * module parameters. The authority is defined in the keeper. + * + * Since: 0.40 + */ + updateParams(request: MsgUpdateParams): Promise; + /** + * SudoContract defines a governance operation for calling sudo + * on a contract. The authority is defined in the keeper. + * + * Since: 0.40 + */ + sudoContract(request: MsgSudoContract): Promise; + /** + * PinCodes defines a governance operation for pinning a set of + * code ids in the wasmvm cache. The authority is defined in the keeper. + * + * Since: 0.40 + */ + pinCodes(request: MsgPinCodes): Promise; + /** + * UnpinCodes defines a governance operation for unpinning a set of + * code ids in the wasmvm cache. The authority is defined in the keeper. + * + * Since: 0.40 + */ + unpinCodes(request: MsgUnpinCodes): Promise; + /** + * StoreAndInstantiateContract defines a governance operation for storing + * and instantiating the contract. The authority is defined in the keeper. + * + * Since: 0.40 + */ + storeAndInstantiateContract(request: MsgStoreAndInstantiateContract): Promise; + /** + * RemoveCodeUploadParamsAddresses defines a governance operation for + * removing addresses from code upload params. + * The authority is defined in the keeper. + */ + removeCodeUploadParamsAddresses(request: MsgRemoveCodeUploadParamsAddresses): Promise; + /** + * AddCodeUploadParamsAddresses defines a governance operation for + * adding addresses to code upload params. + * The authority is defined in the keeper. + */ + addCodeUploadParamsAddresses(request: MsgAddCodeUploadParamsAddresses): Promise; + /** + * StoreAndMigrateContract defines a governance operation for storing + * and migrating the contract. The authority is defined in the keeper. + * + * Since: 0.42 + */ + storeAndMigrateContract(request: MsgStoreAndMigrateContract): Promise; + /** + * UpdateContractLabel sets a new label for a smart contract + * + * Since: 0.43 + */ + updateContractLabel(request: MsgUpdateContractLabel): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; @@ -35,6 +97,16 @@ export class MsgClientImpl implements Msg { this.migrateContract = this.migrateContract.bind(this); this.updateAdmin = this.updateAdmin.bind(this); this.clearAdmin = this.clearAdmin.bind(this); + this.updateInstantiateConfig = this.updateInstantiateConfig.bind(this); + this.updateParams = this.updateParams.bind(this); + this.sudoContract = this.sudoContract.bind(this); + this.pinCodes = this.pinCodes.bind(this); + this.unpinCodes = this.unpinCodes.bind(this); + this.storeAndInstantiateContract = this.storeAndInstantiateContract.bind(this); + this.removeCodeUploadParamsAddresses = this.removeCodeUploadParamsAddresses.bind(this); + this.addCodeUploadParamsAddresses = this.addCodeUploadParamsAddresses.bind(this); + this.storeAndMigrateContract = this.storeAndMigrateContract.bind(this); + this.updateContractLabel = this.updateContractLabel.bind(this); } storeCode(request: MsgStoreCode): Promise { const data = MsgStoreCode.encode(request).finish(); @@ -71,4 +143,54 @@ export class MsgClientImpl implements Msg { const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "ClearAdmin", data); return promise.then(data => MsgClearAdminResponse.decode(new BinaryReader(data))); } + updateInstantiateConfig(request: MsgUpdateInstantiateConfig): Promise { + const data = MsgUpdateInstantiateConfig.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "UpdateInstantiateConfig", data); + return promise.then(data => MsgUpdateInstantiateConfigResponse.decode(new BinaryReader(data))); + } + updateParams(request: MsgUpdateParams): Promise { + const data = MsgUpdateParams.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "UpdateParams", data); + return promise.then(data => MsgUpdateParamsResponse.decode(new BinaryReader(data))); + } + sudoContract(request: MsgSudoContract): Promise { + const data = MsgSudoContract.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "SudoContract", data); + return promise.then(data => MsgSudoContractResponse.decode(new BinaryReader(data))); + } + pinCodes(request: MsgPinCodes): Promise { + const data = MsgPinCodes.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "PinCodes", data); + return promise.then(data => MsgPinCodesResponse.decode(new BinaryReader(data))); + } + unpinCodes(request: MsgUnpinCodes): Promise { + const data = MsgUnpinCodes.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "UnpinCodes", data); + return promise.then(data => MsgUnpinCodesResponse.decode(new BinaryReader(data))); + } + storeAndInstantiateContract(request: MsgStoreAndInstantiateContract): Promise { + const data = MsgStoreAndInstantiateContract.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "StoreAndInstantiateContract", data); + return promise.then(data => MsgStoreAndInstantiateContractResponse.decode(new BinaryReader(data))); + } + removeCodeUploadParamsAddresses(request: MsgRemoveCodeUploadParamsAddresses): Promise { + const data = MsgRemoveCodeUploadParamsAddresses.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "RemoveCodeUploadParamsAddresses", data); + return promise.then(data => MsgRemoveCodeUploadParamsAddressesResponse.decode(new BinaryReader(data))); + } + addCodeUploadParamsAddresses(request: MsgAddCodeUploadParamsAddresses): Promise { + const data = MsgAddCodeUploadParamsAddresses.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "AddCodeUploadParamsAddresses", data); + return promise.then(data => MsgAddCodeUploadParamsAddressesResponse.decode(new BinaryReader(data))); + } + storeAndMigrateContract(request: MsgStoreAndMigrateContract): Promise { + const data = MsgStoreAndMigrateContract.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "StoreAndMigrateContract", data); + return promise.then(data => MsgStoreAndMigrateContractResponse.decode(new BinaryReader(data))); + } + updateContractLabel(request: MsgUpdateContractLabel): Promise { + const data = MsgUpdateContractLabel.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "UpdateContractLabel", data); + return promise.then(data => MsgUpdateContractLabelResponse.decode(new BinaryReader(data))); + } } \ No newline at end of file diff --git a/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.ts b/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.ts index a65a15beb..c2437cdf9 100644 --- a/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.ts +++ b/packages/protobuf/codegen/cosmwasm/wasm/v1/tx.ts @@ -1,11 +1,11 @@ //@ts-nocheck -import { AccessConfig, AccessConfigAmino, AccessConfigSDKType } from "./types"; +import { AccessConfig, AccessConfigAmino, AccessConfigSDKType, Params, ParamsAmino, ParamsSDKType } from "./types"; import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; /** MsgStoreCode submit Wasm code to the system */ export interface MsgStoreCode { - /** Sender is the that actor that signed the messages */ + /** Sender is the actor that signed the messages */ sender: string; /** WASMByteCode can be raw or gzip compressed */ wasmByteCode: Uint8Array; @@ -21,7 +21,7 @@ export interface MsgStoreCodeProtoMsg { } /** MsgStoreCode submit Wasm code to the system */ export interface MsgStoreCodeAmino { - /** Sender is the that actor that signed the messages */ + /** Sender is the actor that signed the messages */ sender: string; /** WASMByteCode can be raw or gzip compressed */ wasm_byte_code: string; @@ -124,6 +124,33 @@ export interface MsgInstantiateContractSDKType { msg: Uint8Array; funds: CoinSDKType[]; } +/** MsgInstantiateContractResponse return instantiation result data */ +export interface MsgInstantiateContractResponse { + /** Address is the bech32 address of the new contract instance. */ + address: string; + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +export interface MsgInstantiateContractResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse"; + value: Uint8Array; +} +/** MsgInstantiateContractResponse return instantiation result data */ +export interface MsgInstantiateContractResponseAmino { + /** Address is the bech32 address of the new contract instance. */ + address: string; + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +export interface MsgInstantiateContractResponseAminoMsg { + type: "wasm/MsgInstantiateContractResponse"; + value: MsgInstantiateContractResponseAmino; +} +/** MsgInstantiateContractResponse return instantiation result data */ +export interface MsgInstantiateContractResponseSDKType { + address: string; + data: Uint8Array; +} /** * MsgInstantiateContract2 create a new smart contract instance for the given * code id with a predicable address. @@ -196,33 +223,6 @@ export interface MsgInstantiateContract2SDKType { salt: Uint8Array; fix_msg: boolean; } -/** MsgInstantiateContractResponse return instantiation result data */ -export interface MsgInstantiateContractResponse { - /** Address is the bech32 address of the new contract instance. */ - address: string; - /** Data contains bytes to returned from the contract */ - data: Uint8Array; -} -export interface MsgInstantiateContractResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse"; - value: Uint8Array; -} -/** MsgInstantiateContractResponse return instantiation result data */ -export interface MsgInstantiateContractResponseAmino { - /** Address is the bech32 address of the new contract instance. */ - address: string; - /** Data contains bytes to returned from the contract */ - data: Uint8Array; -} -export interface MsgInstantiateContractResponseAminoMsg { - type: "wasm/MsgInstantiateContractResponse"; - value: MsgInstantiateContractResponseAmino; -} -/** MsgInstantiateContractResponse return instantiation result data */ -export interface MsgInstantiateContractResponseSDKType { - address: string; - data: Uint8Array; -} /** MsgInstantiateContract2Response return instantiation result data */ export interface MsgInstantiateContract2Response { /** Address is the bech32 address of the new contract instance. */ @@ -422,7 +422,7 @@ export interface MsgUpdateAdminResponseAminoMsg { export interface MsgUpdateAdminResponseSDKType {} /** MsgClearAdmin removes any admin stored for a smart contract */ export interface MsgClearAdmin { - /** Sender is the that actor that signed the messages */ + /** Sender is the actor that signed the messages */ sender: string; /** Contract is the address of the smart contract */ contract: string; @@ -433,7 +433,7 @@ export interface MsgClearAdminProtoMsg { } /** MsgClearAdmin removes any admin stored for a smart contract */ export interface MsgClearAdminAmino { - /** Sender is the that actor that signed the messages */ + /** Sender is the actor that signed the messages */ sender: string; /** Contract is the address of the smart contract */ contract: string; @@ -461,227 +461,2444 @@ export interface MsgClearAdminResponseAminoMsg { } /** MsgClearAdminResponse returns empty data */ export interface MsgClearAdminResponseSDKType {} -function createBaseMsgStoreCode(): MsgStoreCode { - return { - sender: "", - wasmByteCode: new Uint8Array(), - instantiatePermission: AccessConfig.fromPartial({}) - }; +/** + * AccessConfigUpdate contains the code id and the access config to be + * applied. + */ +export interface AccessConfigUpdate { + /** CodeID is the reference to the stored WASM code to be updated */ + codeId: bigint; + /** InstantiatePermission to apply to the set of code ids */ + instantiatePermission: AccessConfig | undefined; } -export const MsgStoreCode = { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", - encode(message: MsgStoreCode, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.wasmByteCode.length !== 0) { - writer.uint32(18).bytes(message.wasmByteCode); - } - if (message.instantiatePermission !== undefined) { - AccessConfig.encode(message.instantiatePermission, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgStoreCode { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgStoreCode(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.wasmByteCode = reader.bytes(); - break; - case 5: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: Partial): MsgStoreCode { - const message = createBaseMsgStoreCode(); - message.sender = object.sender ?? ""; - message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); - message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; - return message; - }, - fromAmino(object: MsgStoreCodeAmino): MsgStoreCode { - return { - sender: object.sender, - wasmByteCode: fromBase64(object.wasm_byte_code), - instantiatePermission: object?.instantiate_permission ? AccessConfig.fromAmino(object.instantiate_permission) : undefined - }; - }, - toAmino(message: MsgStoreCode): MsgStoreCodeAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; - obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; - return obj; - }, - fromAminoMsg(object: MsgStoreCodeAminoMsg): MsgStoreCode { - return MsgStoreCode.fromAmino(object.value); - }, - toAminoMsg(message: MsgStoreCode): MsgStoreCodeAminoMsg { - return { - type: "wasm/MsgStoreCode", - value: MsgStoreCode.toAmino(message) - }; - }, - fromProtoMsg(message: MsgStoreCodeProtoMsg): MsgStoreCode { - return MsgStoreCode.decode(message.value); - }, - toProto(message: MsgStoreCode): Uint8Array { - return MsgStoreCode.encode(message).finish(); - }, - toProtoMsg(message: MsgStoreCode): MsgStoreCodeProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", - value: MsgStoreCode.encode(message).finish() - }; - } -}; -function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { - return { - codeId: BigInt(0), - checksum: new Uint8Array() - }; +export interface AccessConfigUpdateProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.AccessConfigUpdate"; + value: Uint8Array; } -export const MsgStoreCodeResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", - encode(message: MsgStoreCodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeId !== BigInt(0)) { - writer.uint32(8).uint64(message.codeId); - } - if (message.checksum.length !== 0) { - writer.uint32(18).bytes(message.checksum); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgStoreCodeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgStoreCodeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.checksum = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: Partial): MsgStoreCodeResponse { - const message = createBaseMsgStoreCodeResponse(); - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.checksum = object.checksum ?? new Uint8Array(); - return message; - }, - fromAmino(object: MsgStoreCodeResponseAmino): MsgStoreCodeResponse { - return { - codeId: BigInt(object.code_id), - checksum: object.checksum - }; - }, - toAmino(message: MsgStoreCodeResponse): MsgStoreCodeResponseAmino { - const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.checksum = message.checksum; - return obj; - }, - fromAminoMsg(object: MsgStoreCodeResponseAminoMsg): MsgStoreCodeResponse { - return MsgStoreCodeResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgStoreCodeResponse): MsgStoreCodeResponseAminoMsg { - return { - type: "wasm/MsgStoreCodeResponse", - value: MsgStoreCodeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgStoreCodeResponseProtoMsg): MsgStoreCodeResponse { - return MsgStoreCodeResponse.decode(message.value); - }, - toProto(message: MsgStoreCodeResponse): Uint8Array { - return MsgStoreCodeResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgStoreCodeResponse): MsgStoreCodeResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", - value: MsgStoreCodeResponse.encode(message).finish() - }; - } -}; -function createBaseMsgInstantiateContract(): MsgInstantiateContract { - return { - sender: "", - admin: "", - codeId: BigInt(0), - label: "", - msg: new Uint8Array(), - funds: [] - }; +/** + * AccessConfigUpdate contains the code id and the access config to be + * applied. + */ +export interface AccessConfigUpdateAmino { + /** CodeID is the reference to the stored WASM code to be updated */ + code_id: string; + /** InstantiatePermission to apply to the set of code ids */ + instantiate_permission?: AccessConfigAmino | undefined; } -export const MsgInstantiateContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", - encode(message: MsgInstantiateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.admin !== "") { - writer.uint32(18).string(message.admin); - } - if (message.codeId !== BigInt(0)) { - writer.uint32(24).uint64(message.codeId); - } - if (message.label !== "") { - writer.uint32(34).string(message.label); - } - if (message.msg.length !== 0) { - writer.uint32(42).bytes(message.msg); - } +export interface AccessConfigUpdateAminoMsg { + type: "wasm/AccessConfigUpdate"; + value: AccessConfigUpdateAmino; +} +/** + * AccessConfigUpdate contains the code id and the access config to be + * applied. + */ +export interface AccessConfigUpdateSDKType { + code_id: bigint; + instantiate_permission: AccessConfigSDKType | undefined; +} +/** MsgUpdateInstantiateConfig updates instantiate config for a smart contract */ +export interface MsgUpdateInstantiateConfig { + /** Sender is the that actor that signed the messages */ + sender: string; + /** CodeID references the stored WASM code */ + codeId: bigint; + /** NewInstantiatePermission is the new access control */ + newInstantiatePermission: AccessConfig | undefined; +} +export interface MsgUpdateInstantiateConfigProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig"; + value: Uint8Array; +} +/** MsgUpdateInstantiateConfig updates instantiate config for a smart contract */ +export interface MsgUpdateInstantiateConfigAmino { + /** Sender is the that actor that signed the messages */ + sender: string; + /** CodeID references the stored WASM code */ + code_id: string; + /** NewInstantiatePermission is the new access control */ + new_instantiate_permission?: AccessConfigAmino | undefined; +} +export interface MsgUpdateInstantiateConfigAminoMsg { + type: "wasm/MsgUpdateInstantiateConfig"; + value: MsgUpdateInstantiateConfigAmino; +} +/** MsgUpdateInstantiateConfig updates instantiate config for a smart contract */ +export interface MsgUpdateInstantiateConfigSDKType { + sender: string; + code_id: bigint; + new_instantiate_permission: AccessConfigSDKType | undefined; +} +/** MsgUpdateInstantiateConfigResponse returns empty data */ +export interface MsgUpdateInstantiateConfigResponse {} +export interface MsgUpdateInstantiateConfigResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse"; + value: Uint8Array; +} +/** MsgUpdateInstantiateConfigResponse returns empty data */ +export interface MsgUpdateInstantiateConfigResponseAmino {} +export interface MsgUpdateInstantiateConfigResponseAminoMsg { + type: "wasm/MsgUpdateInstantiateConfigResponse"; + value: MsgUpdateInstantiateConfigResponseAmino; +} +/** MsgUpdateInstantiateConfigResponse returns empty data */ +export interface MsgUpdateInstantiateConfigResponseSDKType {} +/** + * MsgUpdateParams is the MsgUpdateParams request type. + * + * Since: 0.40 + */ +export interface MsgUpdateParams { + /** Authority is the address of the governance account. */ + authority: string; + /** + * params defines the x/wasm parameters to update. + * + * NOTE: All parameters must be supplied. + */ + params: Params | undefined; +} +export interface MsgUpdateParamsProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams"; + value: Uint8Array; +} +/** + * MsgUpdateParams is the MsgUpdateParams request type. + * + * Since: 0.40 + */ +export interface MsgUpdateParamsAmino { + /** Authority is the address of the governance account. */ + authority: string; + /** + * params defines the x/wasm parameters to update. + * + * NOTE: All parameters must be supplied. + */ + params?: ParamsAmino | undefined; +} +export interface MsgUpdateParamsAminoMsg { + type: "wasm/MsgUpdateParams"; + value: MsgUpdateParamsAmino; +} +/** + * MsgUpdateParams is the MsgUpdateParams request type. + * + * Since: 0.40 + */ +export interface MsgUpdateParamsSDKType { + authority: string; + params: ParamsSDKType | undefined; +} +/** + * MsgUpdateParamsResponse defines the response structure for executing a + * MsgUpdateParams message. + * + * Since: 0.40 + */ +export interface MsgUpdateParamsResponse {} +export interface MsgUpdateParamsResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParamsResponse"; + value: Uint8Array; +} +/** + * MsgUpdateParamsResponse defines the response structure for executing a + * MsgUpdateParams message. + * + * Since: 0.40 + */ +export interface MsgUpdateParamsResponseAmino {} +export interface MsgUpdateParamsResponseAminoMsg { + type: "wasm/MsgUpdateParamsResponse"; + value: MsgUpdateParamsResponseAmino; +} +/** + * MsgUpdateParamsResponse defines the response structure for executing a + * MsgUpdateParams message. + * + * Since: 0.40 + */ +export interface MsgUpdateParamsResponseSDKType {} +/** + * MsgSudoContract is the MsgSudoContract request type. + * + * Since: 0.40 + */ +export interface MsgSudoContract { + /** Authority is the address of the governance account. */ + authority: string; + /** Contract is the address of the smart contract */ + contract: string; + /** Msg json encoded message to be passed to the contract as sudo */ + msg: Uint8Array; +} +export interface MsgSudoContractProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract"; + value: Uint8Array; +} +/** + * MsgSudoContract is the MsgSudoContract request type. + * + * Since: 0.40 + */ +export interface MsgSudoContractAmino { + /** Authority is the address of the governance account. */ + authority: string; + /** Contract is the address of the smart contract */ + contract: string; + /** Msg json encoded message to be passed to the contract as sudo */ + msg: Uint8Array; +} +export interface MsgSudoContractAminoMsg { + type: "wasm/MsgSudoContract"; + value: MsgSudoContractAmino; +} +/** + * MsgSudoContract is the MsgSudoContract request type. + * + * Since: 0.40 + */ +export interface MsgSudoContractSDKType { + authority: string; + contract: string; + msg: Uint8Array; +} +/** + * MsgSudoContractResponse defines the response structure for executing a + * MsgSudoContract message. + * + * Since: 0.40 + */ +export interface MsgSudoContractResponse { + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +export interface MsgSudoContractResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContractResponse"; + value: Uint8Array; +} +/** + * MsgSudoContractResponse defines the response structure for executing a + * MsgSudoContract message. + * + * Since: 0.40 + */ +export interface MsgSudoContractResponseAmino { + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +export interface MsgSudoContractResponseAminoMsg { + type: "wasm/MsgSudoContractResponse"; + value: MsgSudoContractResponseAmino; +} +/** + * MsgSudoContractResponse defines the response structure for executing a + * MsgSudoContract message. + * + * Since: 0.40 + */ +export interface MsgSudoContractResponseSDKType { + data: Uint8Array; +} +/** + * MsgPinCodes is the MsgPinCodes request type. + * + * Since: 0.40 + */ +export interface MsgPinCodes { + /** Authority is the address of the governance account. */ + authority: string; + /** CodeIDs references the new WASM codes */ + codeIds: bigint[]; +} +export interface MsgPinCodesProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes"; + value: Uint8Array; +} +/** + * MsgPinCodes is the MsgPinCodes request type. + * + * Since: 0.40 + */ +export interface MsgPinCodesAmino { + /** Authority is the address of the governance account. */ + authority: string; + /** CodeIDs references the new WASM codes */ + code_ids: string[]; +} +export interface MsgPinCodesAminoMsg { + type: "wasm/MsgPinCodes"; + value: MsgPinCodesAmino; +} +/** + * MsgPinCodes is the MsgPinCodes request type. + * + * Since: 0.40 + */ +export interface MsgPinCodesSDKType { + authority: string; + code_ids: bigint[]; +} +/** + * MsgPinCodesResponse defines the response structure for executing a + * MsgPinCodes message. + * + * Since: 0.40 + */ +export interface MsgPinCodesResponse {} +export interface MsgPinCodesResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodesResponse"; + value: Uint8Array; +} +/** + * MsgPinCodesResponse defines the response structure for executing a + * MsgPinCodes message. + * + * Since: 0.40 + */ +export interface MsgPinCodesResponseAmino {} +export interface MsgPinCodesResponseAminoMsg { + type: "wasm/MsgPinCodesResponse"; + value: MsgPinCodesResponseAmino; +} +/** + * MsgPinCodesResponse defines the response structure for executing a + * MsgPinCodes message. + * + * Since: 0.40 + */ +export interface MsgPinCodesResponseSDKType {} +/** + * MsgUnpinCodes is the MsgUnpinCodes request type. + * + * Since: 0.40 + */ +export interface MsgUnpinCodes { + /** Authority is the address of the governance account. */ + authority: string; + /** CodeIDs references the WASM codes */ + codeIds: bigint[]; +} +export interface MsgUnpinCodesProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes"; + value: Uint8Array; +} +/** + * MsgUnpinCodes is the MsgUnpinCodes request type. + * + * Since: 0.40 + */ +export interface MsgUnpinCodesAmino { + /** Authority is the address of the governance account. */ + authority: string; + /** CodeIDs references the WASM codes */ + code_ids: string[]; +} +export interface MsgUnpinCodesAminoMsg { + type: "wasm/MsgUnpinCodes"; + value: MsgUnpinCodesAmino; +} +/** + * MsgUnpinCodes is the MsgUnpinCodes request type. + * + * Since: 0.40 + */ +export interface MsgUnpinCodesSDKType { + authority: string; + code_ids: bigint[]; +} +/** + * MsgUnpinCodesResponse defines the response structure for executing a + * MsgUnpinCodes message. + * + * Since: 0.40 + */ +export interface MsgUnpinCodesResponse {} +export interface MsgUnpinCodesResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodesResponse"; + value: Uint8Array; +} +/** + * MsgUnpinCodesResponse defines the response structure for executing a + * MsgUnpinCodes message. + * + * Since: 0.40 + */ +export interface MsgUnpinCodesResponseAmino {} +export interface MsgUnpinCodesResponseAminoMsg { + type: "wasm/MsgUnpinCodesResponse"; + value: MsgUnpinCodesResponseAmino; +} +/** + * MsgUnpinCodesResponse defines the response structure for executing a + * MsgUnpinCodes message. + * + * Since: 0.40 + */ +export interface MsgUnpinCodesResponseSDKType {} +/** + * MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract + * request type. + * + * Since: 0.40 + */ +export interface MsgStoreAndInstantiateContract { + /** Authority is the address of the governance account. */ + authority: string; + /** WASMByteCode can be raw or gzip compressed */ + wasmByteCode: Uint8Array; + /** InstantiatePermission to apply on contract creation, optional */ + instantiatePermission: AccessConfig | undefined; + /** + * UnpinCode code on upload, optional. As default the uploaded contract is + * pinned to cache. + */ + unpinCode: boolean; + /** Admin is an optional address that can execute migrations */ + admin: string; + /** Label is optional metadata to be stored with a constract instance. */ + label: string; + /** Msg json encoded message to be passed to the contract on instantiation */ + msg: Uint8Array; + /** + * Funds coins that are transferred from the authority account to the contract + * on instantiation + */ + funds: Coin[]; + /** Source is the URL where the code is hosted */ + source: string; + /** + * Builder is the docker image used to build the code deterministically, used + * for smart contract verification + */ + builder: string; + /** + * CodeHash is the SHA256 sum of the code outputted by builder, used for smart + * contract verification + */ + codeHash: Uint8Array; +} +export interface MsgStoreAndInstantiateContractProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract"; + value: Uint8Array; +} +/** + * MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract + * request type. + * + * Since: 0.40 + */ +export interface MsgStoreAndInstantiateContractAmino { + /** Authority is the address of the governance account. */ + authority: string; + /** WASMByteCode can be raw or gzip compressed */ + wasm_byte_code: string; + /** InstantiatePermission to apply on contract creation, optional */ + instantiate_permission?: AccessConfigAmino | undefined; + /** + * UnpinCode code on upload, optional. As default the uploaded contract is + * pinned to cache. + */ + unpin_code: boolean; + /** Admin is an optional address that can execute migrations */ + admin: string; + /** Label is optional metadata to be stored with a constract instance. */ + label: string; + /** Msg json encoded message to be passed to the contract on instantiation */ + msg: Uint8Array; + /** + * Funds coins that are transferred from the authority account to the contract + * on instantiation + */ + funds: CoinAmino[]; + /** Source is the URL where the code is hosted */ + source: string; + /** + * Builder is the docker image used to build the code deterministically, used + * for smart contract verification + */ + builder: string; + /** + * CodeHash is the SHA256 sum of the code outputted by builder, used for smart + * contract verification + */ + code_hash: Uint8Array; +} +export interface MsgStoreAndInstantiateContractAminoMsg { + type: "wasm/MsgStoreAndInstantiateContract"; + value: MsgStoreAndInstantiateContractAmino; +} +/** + * MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract + * request type. + * + * Since: 0.40 + */ +export interface MsgStoreAndInstantiateContractSDKType { + authority: string; + wasm_byte_code: Uint8Array; + instantiate_permission: AccessConfigSDKType | undefined; + unpin_code: boolean; + admin: string; + label: string; + msg: Uint8Array; + funds: CoinSDKType[]; + source: string; + builder: string; + code_hash: Uint8Array; +} +/** + * MsgStoreAndInstantiateContractResponse defines the response structure + * for executing a MsgStoreAndInstantiateContract message. + * + * Since: 0.40 + */ +export interface MsgStoreAndInstantiateContractResponse { + /** Address is the bech32 address of the new contract instance. */ + address: string; + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +export interface MsgStoreAndInstantiateContractResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse"; + value: Uint8Array; +} +/** + * MsgStoreAndInstantiateContractResponse defines the response structure + * for executing a MsgStoreAndInstantiateContract message. + * + * Since: 0.40 + */ +export interface MsgStoreAndInstantiateContractResponseAmino { + /** Address is the bech32 address of the new contract instance. */ + address: string; + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +export interface MsgStoreAndInstantiateContractResponseAminoMsg { + type: "wasm/MsgStoreAndInstantiateContractResponse"; + value: MsgStoreAndInstantiateContractResponseAmino; +} +/** + * MsgStoreAndInstantiateContractResponse defines the response structure + * for executing a MsgStoreAndInstantiateContract message. + * + * Since: 0.40 + */ +export interface MsgStoreAndInstantiateContractResponseSDKType { + address: string; + data: Uint8Array; +} +/** + * MsgAddCodeUploadParamsAddresses is the + * MsgAddCodeUploadParamsAddresses request type. + */ +export interface MsgAddCodeUploadParamsAddresses { + /** Authority is the address of the governance account. */ + authority: string; + addresses: string[]; +} +export interface MsgAddCodeUploadParamsAddressesProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses"; + value: Uint8Array; +} +/** + * MsgAddCodeUploadParamsAddresses is the + * MsgAddCodeUploadParamsAddresses request type. + */ +export interface MsgAddCodeUploadParamsAddressesAmino { + /** Authority is the address of the governance account. */ + authority: string; + addresses: string[]; +} +export interface MsgAddCodeUploadParamsAddressesAminoMsg { + type: "wasm/MsgAddCodeUploadParamsAddresses"; + value: MsgAddCodeUploadParamsAddressesAmino; +} +/** + * MsgAddCodeUploadParamsAddresses is the + * MsgAddCodeUploadParamsAddresses request type. + */ +export interface MsgAddCodeUploadParamsAddressesSDKType { + authority: string; + addresses: string[]; +} +/** + * MsgAddCodeUploadParamsAddressesResponse defines the response + * structure for executing a MsgAddCodeUploadParamsAddresses message. + */ +export interface MsgAddCodeUploadParamsAddressesResponse {} +export interface MsgAddCodeUploadParamsAddressesResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse"; + value: Uint8Array; +} +/** + * MsgAddCodeUploadParamsAddressesResponse defines the response + * structure for executing a MsgAddCodeUploadParamsAddresses message. + */ +export interface MsgAddCodeUploadParamsAddressesResponseAmino {} +export interface MsgAddCodeUploadParamsAddressesResponseAminoMsg { + type: "wasm/MsgAddCodeUploadParamsAddressesResponse"; + value: MsgAddCodeUploadParamsAddressesResponseAmino; +} +/** + * MsgAddCodeUploadParamsAddressesResponse defines the response + * structure for executing a MsgAddCodeUploadParamsAddresses message. + */ +export interface MsgAddCodeUploadParamsAddressesResponseSDKType {} +/** + * MsgRemoveCodeUploadParamsAddresses is the + * MsgRemoveCodeUploadParamsAddresses request type. + */ +export interface MsgRemoveCodeUploadParamsAddresses { + /** Authority is the address of the governance account. */ + authority: string; + addresses: string[]; +} +export interface MsgRemoveCodeUploadParamsAddressesProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses"; + value: Uint8Array; +} +/** + * MsgRemoveCodeUploadParamsAddresses is the + * MsgRemoveCodeUploadParamsAddresses request type. + */ +export interface MsgRemoveCodeUploadParamsAddressesAmino { + /** Authority is the address of the governance account. */ + authority: string; + addresses: string[]; +} +export interface MsgRemoveCodeUploadParamsAddressesAminoMsg { + type: "wasm/MsgRemoveCodeUploadParamsAddresses"; + value: MsgRemoveCodeUploadParamsAddressesAmino; +} +/** + * MsgRemoveCodeUploadParamsAddresses is the + * MsgRemoveCodeUploadParamsAddresses request type. + */ +export interface MsgRemoveCodeUploadParamsAddressesSDKType { + authority: string; + addresses: string[]; +} +/** + * MsgRemoveCodeUploadParamsAddressesResponse defines the response + * structure for executing a MsgRemoveCodeUploadParamsAddresses message. + */ +export interface MsgRemoveCodeUploadParamsAddressesResponse {} +export interface MsgRemoveCodeUploadParamsAddressesResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse"; + value: Uint8Array; +} +/** + * MsgRemoveCodeUploadParamsAddressesResponse defines the response + * structure for executing a MsgRemoveCodeUploadParamsAddresses message. + */ +export interface MsgRemoveCodeUploadParamsAddressesResponseAmino {} +export interface MsgRemoveCodeUploadParamsAddressesResponseAminoMsg { + type: "wasm/MsgRemoveCodeUploadParamsAddressesResponse"; + value: MsgRemoveCodeUploadParamsAddressesResponseAmino; +} +/** + * MsgRemoveCodeUploadParamsAddressesResponse defines the response + * structure for executing a MsgRemoveCodeUploadParamsAddresses message. + */ +export interface MsgRemoveCodeUploadParamsAddressesResponseSDKType {} +/** + * MsgStoreAndMigrateContract is the MsgStoreAndMigrateContract + * request type. + * + * Since: 0.42 + */ +export interface MsgStoreAndMigrateContract { + /** Authority is the address of the governance account. */ + authority: string; + /** WASMByteCode can be raw or gzip compressed */ + wasmByteCode: Uint8Array; + /** InstantiatePermission to apply on contract creation, optional */ + instantiatePermission: AccessConfig | undefined; + /** Contract is the address of the smart contract */ + contract: string; + /** Msg json encoded message to be passed to the contract on migration */ + msg: Uint8Array; +} +export interface MsgStoreAndMigrateContractProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract"; + value: Uint8Array; +} +/** + * MsgStoreAndMigrateContract is the MsgStoreAndMigrateContract + * request type. + * + * Since: 0.42 + */ +export interface MsgStoreAndMigrateContractAmino { + /** Authority is the address of the governance account. */ + authority: string; + /** WASMByteCode can be raw or gzip compressed */ + wasm_byte_code: string; + /** InstantiatePermission to apply on contract creation, optional */ + instantiate_permission?: AccessConfigAmino | undefined; + /** Contract is the address of the smart contract */ + contract: string; + /** Msg json encoded message to be passed to the contract on migration */ + msg: Uint8Array; +} +export interface MsgStoreAndMigrateContractAminoMsg { + type: "wasm/MsgStoreAndMigrateContract"; + value: MsgStoreAndMigrateContractAmino; +} +/** + * MsgStoreAndMigrateContract is the MsgStoreAndMigrateContract + * request type. + * + * Since: 0.42 + */ +export interface MsgStoreAndMigrateContractSDKType { + authority: string; + wasm_byte_code: Uint8Array; + instantiate_permission: AccessConfigSDKType | undefined; + contract: string; + msg: Uint8Array; +} +/** + * MsgStoreAndMigrateContractResponse defines the response structure + * for executing a MsgStoreAndMigrateContract message. + * + * Since: 0.42 + */ +export interface MsgStoreAndMigrateContractResponse { + /** CodeID is the reference to the stored WASM code */ + codeId: bigint; + /** Checksum is the sha256 hash of the stored code */ + checksum: Uint8Array; + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +export interface MsgStoreAndMigrateContractResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse"; + value: Uint8Array; +} +/** + * MsgStoreAndMigrateContractResponse defines the response structure + * for executing a MsgStoreAndMigrateContract message. + * + * Since: 0.42 + */ +export interface MsgStoreAndMigrateContractResponseAmino { + /** CodeID is the reference to the stored WASM code */ + code_id: string; + /** Checksum is the sha256 hash of the stored code */ + checksum: Uint8Array; + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +export interface MsgStoreAndMigrateContractResponseAminoMsg { + type: "wasm/MsgStoreAndMigrateContractResponse"; + value: MsgStoreAndMigrateContractResponseAmino; +} +/** + * MsgStoreAndMigrateContractResponse defines the response structure + * for executing a MsgStoreAndMigrateContract message. + * + * Since: 0.42 + */ +export interface MsgStoreAndMigrateContractResponseSDKType { + code_id: bigint; + checksum: Uint8Array; + data: Uint8Array; +} +/** MsgUpdateContractLabel sets a new label for a smart contract */ +export interface MsgUpdateContractLabel { + /** Sender is the that actor that signed the messages */ + sender: string; + /** NewLabel string to be set */ + newLabel: string; + /** Contract is the address of the smart contract */ + contract: string; +} +export interface MsgUpdateContractLabelProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel"; + value: Uint8Array; +} +/** MsgUpdateContractLabel sets a new label for a smart contract */ +export interface MsgUpdateContractLabelAmino { + /** Sender is the that actor that signed the messages */ + sender: string; + /** NewLabel string to be set */ + new_label: string; + /** Contract is the address of the smart contract */ + contract: string; +} +export interface MsgUpdateContractLabelAminoMsg { + type: "wasm/MsgUpdateContractLabel"; + value: MsgUpdateContractLabelAmino; +} +/** MsgUpdateContractLabel sets a new label for a smart contract */ +export interface MsgUpdateContractLabelSDKType { + sender: string; + new_label: string; + contract: string; +} +/** MsgUpdateContractLabelResponse returns empty data */ +export interface MsgUpdateContractLabelResponse {} +export interface MsgUpdateContractLabelResponseProtoMsg { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse"; + value: Uint8Array; +} +/** MsgUpdateContractLabelResponse returns empty data */ +export interface MsgUpdateContractLabelResponseAmino {} +export interface MsgUpdateContractLabelResponseAminoMsg { + type: "wasm/MsgUpdateContractLabelResponse"; + value: MsgUpdateContractLabelResponseAmino; +} +/** MsgUpdateContractLabelResponse returns empty data */ +export interface MsgUpdateContractLabelResponseSDKType {} +function createBaseMsgStoreCode(): MsgStoreCode { + return { + sender: "", + wasmByteCode: new Uint8Array(), + instantiatePermission: AccessConfig.fromPartial({}) + }; +} +export const MsgStoreCode = { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", + encode(message: MsgStoreCode, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.wasmByteCode.length !== 0) { + writer.uint32(18).bytes(message.wasmByteCode); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgStoreCode { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgStoreCode(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.wasmByteCode = reader.bytes(); + break; + case 5: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgStoreCode { + const message = createBaseMsgStoreCode(); + message.sender = object.sender ?? ""; + message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; + return message; + }, + fromAmino(object: MsgStoreCodeAmino): MsgStoreCode { + return { + sender: object.sender, + wasmByteCode: fromBase64(object.wasm_byte_code), + instantiatePermission: object?.instantiate_permission ? AccessConfig.fromAmino(object.instantiate_permission) : undefined + }; + }, + toAmino(message: MsgStoreCode): MsgStoreCodeAmino { + const obj: any = {}; + obj.sender = message.sender; + obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; + obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; + return obj; + }, + fromAminoMsg(object: MsgStoreCodeAminoMsg): MsgStoreCode { + return MsgStoreCode.fromAmino(object.value); + }, + toAminoMsg(message: MsgStoreCode): MsgStoreCodeAminoMsg { + return { + type: "wasm/MsgStoreCode", + value: MsgStoreCode.toAmino(message) + }; + }, + fromProtoMsg(message: MsgStoreCodeProtoMsg): MsgStoreCode { + return MsgStoreCode.decode(message.value); + }, + toProto(message: MsgStoreCode): Uint8Array { + return MsgStoreCode.encode(message).finish(); + }, + toProtoMsg(message: MsgStoreCode): MsgStoreCodeProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", + value: MsgStoreCode.encode(message).finish() + }; + } +}; +function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { + return { + codeId: BigInt(0), + checksum: new Uint8Array() + }; +} +export const MsgStoreCodeResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", + encode(message: MsgStoreCodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(message.codeId); + } + if (message.checksum.length !== 0) { + writer.uint32(18).bytes(message.checksum); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgStoreCodeResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgStoreCodeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.codeId = reader.uint64(); + break; + case 2: + message.checksum = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgStoreCodeResponse { + const message = createBaseMsgStoreCodeResponse(); + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.checksum = object.checksum ?? new Uint8Array(); + return message; + }, + fromAmino(object: MsgStoreCodeResponseAmino): MsgStoreCodeResponse { + return { + codeId: BigInt(object.code_id), + checksum: object.checksum + }; + }, + toAmino(message: MsgStoreCodeResponse): MsgStoreCodeResponseAmino { + const obj: any = {}; + obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.checksum = message.checksum; + return obj; + }, + fromAminoMsg(object: MsgStoreCodeResponseAminoMsg): MsgStoreCodeResponse { + return MsgStoreCodeResponse.fromAmino(object.value); + }, + toAminoMsg(message: MsgStoreCodeResponse): MsgStoreCodeResponseAminoMsg { + return { + type: "wasm/MsgStoreCodeResponse", + value: MsgStoreCodeResponse.toAmino(message) + }; + }, + fromProtoMsg(message: MsgStoreCodeResponseProtoMsg): MsgStoreCodeResponse { + return MsgStoreCodeResponse.decode(message.value); + }, + toProto(message: MsgStoreCodeResponse): Uint8Array { + return MsgStoreCodeResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgStoreCodeResponse): MsgStoreCodeResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", + value: MsgStoreCodeResponse.encode(message).finish() + }; + } +}; +function createBaseMsgInstantiateContract(): MsgInstantiateContract { + return { + sender: "", + admin: "", + codeId: BigInt(0), + label: "", + msg: new Uint8Array(), + funds: [] + }; +} +export const MsgInstantiateContract = { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", + encode(message: MsgInstantiateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.admin !== "") { + writer.uint32(18).string(message.admin); + } + if (message.codeId !== BigInt(0)) { + writer.uint32(24).uint64(message.codeId); + } + if (message.label !== "") { + writer.uint32(34).string(message.label); + } + if (message.msg.length !== 0) { + writer.uint32(42).bytes(message.msg); + } + for (const v of message.funds) { + Coin.encode(v!, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgInstantiateContract { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgInstantiateContract(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.admin = reader.string(); + break; + case 3: + message.codeId = reader.uint64(); + break; + case 4: + message.label = reader.string(); + break; + case 5: + message.msg = reader.bytes(); + break; + case 6: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgInstantiateContract { + const message = createBaseMsgInstantiateContract(); + message.sender = object.sender ?? ""; + message.admin = object.admin ?? ""; + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.label = object.label ?? ""; + message.msg = object.msg ?? new Uint8Array(); + message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + return message; + }, + fromAmino(object: MsgInstantiateContractAmino): MsgInstantiateContract { + return { + sender: object.sender, + admin: object.admin, + codeId: BigInt(object.code_id), + label: object.label, + msg: toUtf8(JSON.stringify(object.msg)), + funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [] + }; + }, + toAmino(message: MsgInstantiateContract): MsgInstantiateContractAmino { + const obj: any = {}; + obj.sender = message.sender; + obj.admin = message.admin; + obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.label = message.label; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + if (message.funds) { + obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.funds = []; + } + return obj; + }, + fromAminoMsg(object: MsgInstantiateContractAminoMsg): MsgInstantiateContract { + return MsgInstantiateContract.fromAmino(object.value); + }, + toAminoMsg(message: MsgInstantiateContract): MsgInstantiateContractAminoMsg { + return { + type: "wasm/MsgInstantiateContract", + value: MsgInstantiateContract.toAmino(message) + }; + }, + fromProtoMsg(message: MsgInstantiateContractProtoMsg): MsgInstantiateContract { + return MsgInstantiateContract.decode(message.value); + }, + toProto(message: MsgInstantiateContract): Uint8Array { + return MsgInstantiateContract.encode(message).finish(); + }, + toProtoMsg(message: MsgInstantiateContract): MsgInstantiateContractProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", + value: MsgInstantiateContract.encode(message).finish() + }; + } +}; +function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse { + return { + address: "", + data: new Uint8Array() + }; +} +export const MsgInstantiateContractResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", + encode(message: MsgInstantiateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + if (message.data.length !== 0) { + writer.uint32(18).bytes(message.data); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgInstantiateContractResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgInstantiateContractResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgInstantiateContractResponse { + const message = createBaseMsgInstantiateContractResponse(); + message.address = object.address ?? ""; + message.data = object.data ?? new Uint8Array(); + return message; + }, + fromAmino(object: MsgInstantiateContractResponseAmino): MsgInstantiateContractResponse { + return { + address: object.address, + data: object.data + }; + }, + toAmino(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseAmino { + const obj: any = {}; + obj.address = message.address; + obj.data = message.data; + return obj; + }, + fromAminoMsg(object: MsgInstantiateContractResponseAminoMsg): MsgInstantiateContractResponse { + return MsgInstantiateContractResponse.fromAmino(object.value); + }, + toAminoMsg(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseAminoMsg { + return { + type: "wasm/MsgInstantiateContractResponse", + value: MsgInstantiateContractResponse.toAmino(message) + }; + }, + fromProtoMsg(message: MsgInstantiateContractResponseProtoMsg): MsgInstantiateContractResponse { + return MsgInstantiateContractResponse.decode(message.value); + }, + toProto(message: MsgInstantiateContractResponse): Uint8Array { + return MsgInstantiateContractResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", + value: MsgInstantiateContractResponse.encode(message).finish() + }; + } +}; +function createBaseMsgInstantiateContract2(): MsgInstantiateContract2 { + return { + sender: "", + admin: "", + codeId: BigInt(0), + label: "", + msg: new Uint8Array(), + funds: [], + salt: new Uint8Array(), + fixMsg: false + }; +} +export const MsgInstantiateContract2 = { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", + encode(message: MsgInstantiateContract2, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.admin !== "") { + writer.uint32(18).string(message.admin); + } + if (message.codeId !== BigInt(0)) { + writer.uint32(24).uint64(message.codeId); + } + if (message.label !== "") { + writer.uint32(34).string(message.label); + } + if (message.msg.length !== 0) { + writer.uint32(42).bytes(message.msg); + } + for (const v of message.funds) { + Coin.encode(v!, writer.uint32(50).fork()).ldelim(); + } + if (message.salt.length !== 0) { + writer.uint32(58).bytes(message.salt); + } + if (message.fixMsg === true) { + writer.uint32(64).bool(message.fixMsg); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgInstantiateContract2 { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgInstantiateContract2(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.admin = reader.string(); + break; + case 3: + message.codeId = reader.uint64(); + break; + case 4: + message.label = reader.string(); + break; + case 5: + message.msg = reader.bytes(); + break; + case 6: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + case 7: + message.salt = reader.bytes(); + break; + case 8: + message.fixMsg = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgInstantiateContract2 { + const message = createBaseMsgInstantiateContract2(); + message.sender = object.sender ?? ""; + message.admin = object.admin ?? ""; + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.label = object.label ?? ""; + message.msg = object.msg ?? new Uint8Array(); + message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + message.salt = object.salt ?? new Uint8Array(); + message.fixMsg = object.fixMsg ?? false; + return message; + }, + fromAmino(object: MsgInstantiateContract2Amino): MsgInstantiateContract2 { + return { + sender: object.sender, + admin: object.admin, + codeId: BigInt(object.code_id), + label: object.label, + msg: toUtf8(JSON.stringify(object.msg)), + funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [], + salt: object.salt, + fixMsg: object.fix_msg + }; + }, + toAmino(message: MsgInstantiateContract2): MsgInstantiateContract2Amino { + const obj: any = {}; + obj.sender = message.sender; + obj.admin = message.admin; + obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.label = message.label; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + if (message.funds) { + obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.funds = []; + } + obj.salt = message.salt; + obj.fix_msg = message.fixMsg; + return obj; + }, + fromAminoMsg(object: MsgInstantiateContract2AminoMsg): MsgInstantiateContract2 { + return MsgInstantiateContract2.fromAmino(object.value); + }, + toAminoMsg(message: MsgInstantiateContract2): MsgInstantiateContract2AminoMsg { + return { + type: "wasm/MsgInstantiateContract2", + value: MsgInstantiateContract2.toAmino(message) + }; + }, + fromProtoMsg(message: MsgInstantiateContract2ProtoMsg): MsgInstantiateContract2 { + return MsgInstantiateContract2.decode(message.value); + }, + toProto(message: MsgInstantiateContract2): Uint8Array { + return MsgInstantiateContract2.encode(message).finish(); + }, + toProtoMsg(message: MsgInstantiateContract2): MsgInstantiateContract2ProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", + value: MsgInstantiateContract2.encode(message).finish() + }; + } +}; +function createBaseMsgInstantiateContract2Response(): MsgInstantiateContract2Response { + return { + address: "", + data: new Uint8Array() + }; +} +export const MsgInstantiateContract2Response = { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response", + encode(message: MsgInstantiateContract2Response, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + if (message.data.length !== 0) { + writer.uint32(18).bytes(message.data); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgInstantiateContract2Response { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgInstantiateContract2Response(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgInstantiateContract2Response { + const message = createBaseMsgInstantiateContract2Response(); + message.address = object.address ?? ""; + message.data = object.data ?? new Uint8Array(); + return message; + }, + fromAmino(object: MsgInstantiateContract2ResponseAmino): MsgInstantiateContract2Response { + return { + address: object.address, + data: object.data + }; + }, + toAmino(message: MsgInstantiateContract2Response): MsgInstantiateContract2ResponseAmino { + const obj: any = {}; + obj.address = message.address; + obj.data = message.data; + return obj; + }, + fromAminoMsg(object: MsgInstantiateContract2ResponseAminoMsg): MsgInstantiateContract2Response { + return MsgInstantiateContract2Response.fromAmino(object.value); + }, + toAminoMsg(message: MsgInstantiateContract2Response): MsgInstantiateContract2ResponseAminoMsg { + return { + type: "wasm/MsgInstantiateContract2Response", + value: MsgInstantiateContract2Response.toAmino(message) + }; + }, + fromProtoMsg(message: MsgInstantiateContract2ResponseProtoMsg): MsgInstantiateContract2Response { + return MsgInstantiateContract2Response.decode(message.value); + }, + toProto(message: MsgInstantiateContract2Response): Uint8Array { + return MsgInstantiateContract2Response.encode(message).finish(); + }, + toProtoMsg(message: MsgInstantiateContract2Response): MsgInstantiateContract2ResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response", + value: MsgInstantiateContract2Response.encode(message).finish() + }; + } +}; +function createBaseMsgExecuteContract(): MsgExecuteContract { + return { + sender: "", + contract: "", + msg: new Uint8Array(), + funds: [] + }; +} +export const MsgExecuteContract = { + typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", + encode(message: MsgExecuteContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.contract !== "") { + writer.uint32(18).string(message.contract); + } + if (message.msg.length !== 0) { + writer.uint32(26).bytes(message.msg); + } for (const v of message.funds) { - Coin.encode(v!, writer.uint32(50).fork()).ldelim(); + Coin.encode(v!, writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgExecuteContract { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgExecuteContract(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.contract = reader.string(); + break; + case 3: + message.msg = reader.bytes(); + break; + case 5: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgExecuteContract { + const message = createBaseMsgExecuteContract(); + message.sender = object.sender ?? ""; + message.contract = object.contract ?? ""; + message.msg = object.msg ?? new Uint8Array(); + message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + return message; + }, + fromAmino(object: MsgExecuteContractAmino): MsgExecuteContract { + return { + sender: object.sender, + contract: object.contract, + msg: toUtf8(JSON.stringify(object.msg)), + funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [] + }; + }, + toAmino(message: MsgExecuteContract): MsgExecuteContractAmino { + const obj: any = {}; + obj.sender = message.sender; + obj.contract = message.contract; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + if (message.funds) { + obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.funds = []; + } + return obj; + }, + fromAminoMsg(object: MsgExecuteContractAminoMsg): MsgExecuteContract { + return MsgExecuteContract.fromAmino(object.value); + }, + toAminoMsg(message: MsgExecuteContract): MsgExecuteContractAminoMsg { + return { + type: "wasm/MsgExecuteContract", + value: MsgExecuteContract.toAmino(message) + }; + }, + fromProtoMsg(message: MsgExecuteContractProtoMsg): MsgExecuteContract { + return MsgExecuteContract.decode(message.value); + }, + toProto(message: MsgExecuteContract): Uint8Array { + return MsgExecuteContract.encode(message).finish(); + }, + toProtoMsg(message: MsgExecuteContract): MsgExecuteContractProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", + value: MsgExecuteContract.encode(message).finish() + }; + } +}; +function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse { + return { + data: new Uint8Array() + }; +} +export const MsgExecuteContractResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", + encode(message: MsgExecuteContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgExecuteContractResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgExecuteContractResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgExecuteContractResponse { + const message = createBaseMsgExecuteContractResponse(); + message.data = object.data ?? new Uint8Array(); + return message; + }, + fromAmino(object: MsgExecuteContractResponseAmino): MsgExecuteContractResponse { + return { + data: object.data + }; + }, + toAmino(message: MsgExecuteContractResponse): MsgExecuteContractResponseAmino { + const obj: any = {}; + obj.data = message.data; + return obj; + }, + fromAminoMsg(object: MsgExecuteContractResponseAminoMsg): MsgExecuteContractResponse { + return MsgExecuteContractResponse.fromAmino(object.value); + }, + toAminoMsg(message: MsgExecuteContractResponse): MsgExecuteContractResponseAminoMsg { + return { + type: "wasm/MsgExecuteContractResponse", + value: MsgExecuteContractResponse.toAmino(message) + }; + }, + fromProtoMsg(message: MsgExecuteContractResponseProtoMsg): MsgExecuteContractResponse { + return MsgExecuteContractResponse.decode(message.value); + }, + toProto(message: MsgExecuteContractResponse): Uint8Array { + return MsgExecuteContractResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgExecuteContractResponse): MsgExecuteContractResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", + value: MsgExecuteContractResponse.encode(message).finish() + }; + } +}; +function createBaseMsgMigrateContract(): MsgMigrateContract { + return { + sender: "", + contract: "", + codeId: BigInt(0), + msg: new Uint8Array() + }; +} +export const MsgMigrateContract = { + typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", + encode(message: MsgMigrateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.contract !== "") { + writer.uint32(18).string(message.contract); + } + if (message.codeId !== BigInt(0)) { + writer.uint32(24).uint64(message.codeId); + } + if (message.msg.length !== 0) { + writer.uint32(34).bytes(message.msg); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgMigrateContract { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgMigrateContract(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.contract = reader.string(); + break; + case 3: + message.codeId = reader.uint64(); + break; + case 4: + message.msg = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgMigrateContract { + const message = createBaseMsgMigrateContract(); + message.sender = object.sender ?? ""; + message.contract = object.contract ?? ""; + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.msg = object.msg ?? new Uint8Array(); + return message; + }, + fromAmino(object: MsgMigrateContractAmino): MsgMigrateContract { + return { + sender: object.sender, + contract: object.contract, + codeId: BigInt(object.code_id), + msg: toUtf8(JSON.stringify(object.msg)) + }; + }, + toAmino(message: MsgMigrateContract): MsgMigrateContractAmino { + const obj: any = {}; + obj.sender = message.sender; + obj.contract = message.contract; + obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + return obj; + }, + fromAminoMsg(object: MsgMigrateContractAminoMsg): MsgMigrateContract { + return MsgMigrateContract.fromAmino(object.value); + }, + toAminoMsg(message: MsgMigrateContract): MsgMigrateContractAminoMsg { + return { + type: "wasm/MsgMigrateContract", + value: MsgMigrateContract.toAmino(message) + }; + }, + fromProtoMsg(message: MsgMigrateContractProtoMsg): MsgMigrateContract { + return MsgMigrateContract.decode(message.value); + }, + toProto(message: MsgMigrateContract): Uint8Array { + return MsgMigrateContract.encode(message).finish(); + }, + toProtoMsg(message: MsgMigrateContract): MsgMigrateContractProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", + value: MsgMigrateContract.encode(message).finish() + }; + } +}; +function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { + return { + data: new Uint8Array() + }; +} +export const MsgMigrateContractResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", + encode(message: MsgMigrateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgMigrateContractResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgMigrateContractResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgMigrateContractResponse { + const message = createBaseMsgMigrateContractResponse(); + message.data = object.data ?? new Uint8Array(); + return message; + }, + fromAmino(object: MsgMigrateContractResponseAmino): MsgMigrateContractResponse { + return { + data: object.data + }; + }, + toAmino(message: MsgMigrateContractResponse): MsgMigrateContractResponseAmino { + const obj: any = {}; + obj.data = message.data; + return obj; + }, + fromAminoMsg(object: MsgMigrateContractResponseAminoMsg): MsgMigrateContractResponse { + return MsgMigrateContractResponse.fromAmino(object.value); + }, + toAminoMsg(message: MsgMigrateContractResponse): MsgMigrateContractResponseAminoMsg { + return { + type: "wasm/MsgMigrateContractResponse", + value: MsgMigrateContractResponse.toAmino(message) + }; + }, + fromProtoMsg(message: MsgMigrateContractResponseProtoMsg): MsgMigrateContractResponse { + return MsgMigrateContractResponse.decode(message.value); + }, + toProto(message: MsgMigrateContractResponse): Uint8Array { + return MsgMigrateContractResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgMigrateContractResponse): MsgMigrateContractResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", + value: MsgMigrateContractResponse.encode(message).finish() + }; + } +}; +function createBaseMsgUpdateAdmin(): MsgUpdateAdmin { + return { + sender: "", + newAdmin: "", + contract: "" + }; +} +export const MsgUpdateAdmin = { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", + encode(message: MsgUpdateAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.newAdmin !== "") { + writer.uint32(18).string(message.newAdmin); + } + if (message.contract !== "") { + writer.uint32(26).string(message.contract); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateAdmin { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateAdmin(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.newAdmin = reader.string(); + break; + case 3: + message.contract = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgUpdateAdmin { + const message = createBaseMsgUpdateAdmin(); + message.sender = object.sender ?? ""; + message.newAdmin = object.newAdmin ?? ""; + message.contract = object.contract ?? ""; + return message; + }, + fromAmino(object: MsgUpdateAdminAmino): MsgUpdateAdmin { + return { + sender: object.sender, + newAdmin: object.new_admin, + contract: object.contract + }; + }, + toAmino(message: MsgUpdateAdmin): MsgUpdateAdminAmino { + const obj: any = {}; + obj.sender = message.sender; + obj.new_admin = message.newAdmin; + obj.contract = message.contract; + return obj; + }, + fromAminoMsg(object: MsgUpdateAdminAminoMsg): MsgUpdateAdmin { + return MsgUpdateAdmin.fromAmino(object.value); + }, + toAminoMsg(message: MsgUpdateAdmin): MsgUpdateAdminAminoMsg { + return { + type: "wasm/MsgUpdateAdmin", + value: MsgUpdateAdmin.toAmino(message) + }; + }, + fromProtoMsg(message: MsgUpdateAdminProtoMsg): MsgUpdateAdmin { + return MsgUpdateAdmin.decode(message.value); + }, + toProto(message: MsgUpdateAdmin): Uint8Array { + return MsgUpdateAdmin.encode(message).finish(); + }, + toProtoMsg(message: MsgUpdateAdmin): MsgUpdateAdminProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", + value: MsgUpdateAdmin.encode(message).finish() + }; + } +}; +function createBaseMsgUpdateAdminResponse(): MsgUpdateAdminResponse { + return {}; +} +export const MsgUpdateAdminResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", + encode(_: MsgUpdateAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateAdminResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateAdminResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(_: Partial): MsgUpdateAdminResponse { + const message = createBaseMsgUpdateAdminResponse(); + return message; + }, + fromAmino(_: MsgUpdateAdminResponseAmino): MsgUpdateAdminResponse { + return {}; + }, + toAmino(_: MsgUpdateAdminResponse): MsgUpdateAdminResponseAmino { + const obj: any = {}; + return obj; + }, + fromAminoMsg(object: MsgUpdateAdminResponseAminoMsg): MsgUpdateAdminResponse { + return MsgUpdateAdminResponse.fromAmino(object.value); + }, + toAminoMsg(message: MsgUpdateAdminResponse): MsgUpdateAdminResponseAminoMsg { + return { + type: "wasm/MsgUpdateAdminResponse", + value: MsgUpdateAdminResponse.toAmino(message) + }; + }, + fromProtoMsg(message: MsgUpdateAdminResponseProtoMsg): MsgUpdateAdminResponse { + return MsgUpdateAdminResponse.decode(message.value); + }, + toProto(message: MsgUpdateAdminResponse): Uint8Array { + return MsgUpdateAdminResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgUpdateAdminResponse): MsgUpdateAdminResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", + value: MsgUpdateAdminResponse.encode(message).finish() + }; + } +}; +function createBaseMsgClearAdmin(): MsgClearAdmin { + return { + sender: "", + contract: "" + }; +} +export const MsgClearAdmin = { + typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", + encode(message: MsgClearAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.contract !== "") { + writer.uint32(26).string(message.contract); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgClearAdmin { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgClearAdmin(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 3: + message.contract = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgClearAdmin { + const message = createBaseMsgClearAdmin(); + message.sender = object.sender ?? ""; + message.contract = object.contract ?? ""; + return message; + }, + fromAmino(object: MsgClearAdminAmino): MsgClearAdmin { + return { + sender: object.sender, + contract: object.contract + }; + }, + toAmino(message: MsgClearAdmin): MsgClearAdminAmino { + const obj: any = {}; + obj.sender = message.sender; + obj.contract = message.contract; + return obj; + }, + fromAminoMsg(object: MsgClearAdminAminoMsg): MsgClearAdmin { + return MsgClearAdmin.fromAmino(object.value); + }, + toAminoMsg(message: MsgClearAdmin): MsgClearAdminAminoMsg { + return { + type: "wasm/MsgClearAdmin", + value: MsgClearAdmin.toAmino(message) + }; + }, + fromProtoMsg(message: MsgClearAdminProtoMsg): MsgClearAdmin { + return MsgClearAdmin.decode(message.value); + }, + toProto(message: MsgClearAdmin): Uint8Array { + return MsgClearAdmin.encode(message).finish(); + }, + toProtoMsg(message: MsgClearAdmin): MsgClearAdminProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", + value: MsgClearAdmin.encode(message).finish() + }; + } +}; +function createBaseMsgClearAdminResponse(): MsgClearAdminResponse { + return {}; +} +export const MsgClearAdminResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", + encode(_: MsgClearAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgClearAdminResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgClearAdminResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(_: Partial): MsgClearAdminResponse { + const message = createBaseMsgClearAdminResponse(); + return message; + }, + fromAmino(_: MsgClearAdminResponseAmino): MsgClearAdminResponse { + return {}; + }, + toAmino(_: MsgClearAdminResponse): MsgClearAdminResponseAmino { + const obj: any = {}; + return obj; + }, + fromAminoMsg(object: MsgClearAdminResponseAminoMsg): MsgClearAdminResponse { + return MsgClearAdminResponse.fromAmino(object.value); + }, + toAminoMsg(message: MsgClearAdminResponse): MsgClearAdminResponseAminoMsg { + return { + type: "wasm/MsgClearAdminResponse", + value: MsgClearAdminResponse.toAmino(message) + }; + }, + fromProtoMsg(message: MsgClearAdminResponseProtoMsg): MsgClearAdminResponse { + return MsgClearAdminResponse.decode(message.value); + }, + toProto(message: MsgClearAdminResponse): Uint8Array { + return MsgClearAdminResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgClearAdminResponse): MsgClearAdminResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", + value: MsgClearAdminResponse.encode(message).finish() + }; + } +}; +function createBaseAccessConfigUpdate(): AccessConfigUpdate { + return { + codeId: BigInt(0), + instantiatePermission: AccessConfig.fromPartial({}) + }; +} +export const AccessConfigUpdate = { + typeUrl: "/cosmwasm.wasm.v1.AccessConfigUpdate", + encode(message: AccessConfigUpdate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(message.codeId); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): AccessConfigUpdate { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAccessConfigUpdate(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.codeId = reader.uint64(); + break; + case 2: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): AccessConfigUpdate { + const message = createBaseAccessConfigUpdate(); + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; + return message; + }, + fromAmino(object: AccessConfigUpdateAmino): AccessConfigUpdate { + return { + codeId: BigInt(object.code_id), + instantiatePermission: object?.instantiate_permission ? AccessConfig.fromAmino(object.instantiate_permission) : undefined + }; + }, + toAmino(message: AccessConfigUpdate): AccessConfigUpdateAmino { + const obj: any = {}; + obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; + return obj; + }, + fromAminoMsg(object: AccessConfigUpdateAminoMsg): AccessConfigUpdate { + return AccessConfigUpdate.fromAmino(object.value); + }, + toAminoMsg(message: AccessConfigUpdate): AccessConfigUpdateAminoMsg { + return { + type: "wasm/AccessConfigUpdate", + value: AccessConfigUpdate.toAmino(message) + }; + }, + fromProtoMsg(message: AccessConfigUpdateProtoMsg): AccessConfigUpdate { + return AccessConfigUpdate.decode(message.value); + }, + toProto(message: AccessConfigUpdate): Uint8Array { + return AccessConfigUpdate.encode(message).finish(); + }, + toProtoMsg(message: AccessConfigUpdate): AccessConfigUpdateProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.AccessConfigUpdate", + value: AccessConfigUpdate.encode(message).finish() + }; + } +}; +function createBaseMsgUpdateInstantiateConfig(): MsgUpdateInstantiateConfig { + return { + sender: "", + codeId: BigInt(0), + newInstantiatePermission: AccessConfig.fromPartial({}) + }; +} +export const MsgUpdateInstantiateConfig = { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + encode(message: MsgUpdateInstantiateConfig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.codeId !== BigInt(0)) { + writer.uint32(16).uint64(message.codeId); + } + if (message.newInstantiatePermission !== undefined) { + AccessConfig.encode(message.newInstantiatePermission, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateInstantiateConfig { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateInstantiateConfig(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.codeId = reader.uint64(); + break; + case 3: + message.newInstantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgUpdateInstantiateConfig { + const message = createBaseMsgUpdateInstantiateConfig(); + message.sender = object.sender ?? ""; + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.newInstantiatePermission = object.newInstantiatePermission !== undefined && object.newInstantiatePermission !== null ? AccessConfig.fromPartial(object.newInstantiatePermission) : undefined; + return message; + }, + fromAmino(object: MsgUpdateInstantiateConfigAmino): MsgUpdateInstantiateConfig { + return { + sender: object.sender, + codeId: BigInt(object.code_id), + newInstantiatePermission: object?.new_instantiate_permission ? AccessConfig.fromAmino(object.new_instantiate_permission) : undefined + }; + }, + toAmino(message: MsgUpdateInstantiateConfig): MsgUpdateInstantiateConfigAmino { + const obj: any = {}; + obj.sender = message.sender; + obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.new_instantiate_permission = message.newInstantiatePermission ? AccessConfig.toAmino(message.newInstantiatePermission) : undefined; + return obj; + }, + fromAminoMsg(object: MsgUpdateInstantiateConfigAminoMsg): MsgUpdateInstantiateConfig { + return MsgUpdateInstantiateConfig.fromAmino(object.value); + }, + toAminoMsg(message: MsgUpdateInstantiateConfig): MsgUpdateInstantiateConfigAminoMsg { + return { + type: "wasm/MsgUpdateInstantiateConfig", + value: MsgUpdateInstantiateConfig.toAmino(message) + }; + }, + fromProtoMsg(message: MsgUpdateInstantiateConfigProtoMsg): MsgUpdateInstantiateConfig { + return MsgUpdateInstantiateConfig.decode(message.value); + }, + toProto(message: MsgUpdateInstantiateConfig): Uint8Array { + return MsgUpdateInstantiateConfig.encode(message).finish(); + }, + toProtoMsg(message: MsgUpdateInstantiateConfig): MsgUpdateInstantiateConfigProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + value: MsgUpdateInstantiateConfig.encode(message).finish() + }; + } +}; +function createBaseMsgUpdateInstantiateConfigResponse(): MsgUpdateInstantiateConfigResponse { + return {}; +} +export const MsgUpdateInstantiateConfigResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", + encode(_: MsgUpdateInstantiateConfigResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateInstantiateConfigResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateInstantiateConfigResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(_: Partial): MsgUpdateInstantiateConfigResponse { + const message = createBaseMsgUpdateInstantiateConfigResponse(); + return message; + }, + fromAmino(_: MsgUpdateInstantiateConfigResponseAmino): MsgUpdateInstantiateConfigResponse { + return {}; + }, + toAmino(_: MsgUpdateInstantiateConfigResponse): MsgUpdateInstantiateConfigResponseAmino { + const obj: any = {}; + return obj; + }, + fromAminoMsg(object: MsgUpdateInstantiateConfigResponseAminoMsg): MsgUpdateInstantiateConfigResponse { + return MsgUpdateInstantiateConfigResponse.fromAmino(object.value); + }, + toAminoMsg(message: MsgUpdateInstantiateConfigResponse): MsgUpdateInstantiateConfigResponseAminoMsg { + return { + type: "wasm/MsgUpdateInstantiateConfigResponse", + value: MsgUpdateInstantiateConfigResponse.toAmino(message) + }; + }, + fromProtoMsg(message: MsgUpdateInstantiateConfigResponseProtoMsg): MsgUpdateInstantiateConfigResponse { + return MsgUpdateInstantiateConfigResponse.decode(message.value); + }, + toProto(message: MsgUpdateInstantiateConfigResponse): Uint8Array { + return MsgUpdateInstantiateConfigResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgUpdateInstantiateConfigResponse): MsgUpdateInstantiateConfigResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", + value: MsgUpdateInstantiateConfigResponse.encode(message).finish() + }; + } +}; +function createBaseMsgUpdateParams(): MsgUpdateParams { + return { + authority: "", + params: Params.fromPartial({}) + }; +} +export const MsgUpdateParams = { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateParams { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateParams(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.authority = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgUpdateParams { + const message = createBaseMsgUpdateParams(); + message.authority = object.authority ?? ""; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + return message; + }, + fromAmino(object: MsgUpdateParamsAmino): MsgUpdateParams { + return { + authority: object.authority, + params: object?.params ? Params.fromAmino(object.params) : undefined + }; + }, + toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { + const obj: any = {}; + obj.authority = message.authority; + obj.params = message.params ? Params.toAmino(message.params) : undefined; + return obj; + }, + fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { + return MsgUpdateParams.fromAmino(object.value); + }, + toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { + return { + type: "wasm/MsgUpdateParams", + value: MsgUpdateParams.toAmino(message) + }; + }, + fromProtoMsg(message: MsgUpdateParamsProtoMsg): MsgUpdateParams { + return MsgUpdateParams.decode(message.value); + }, + toProto(message: MsgUpdateParams): Uint8Array { + return MsgUpdateParams.encode(message).finish(); + }, + toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + value: MsgUpdateParams.encode(message).finish() + }; + } +}; +function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { + return {}; +} +export const MsgUpdateParamsResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParamsResponse", + encode(_: MsgUpdateParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateParamsResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateParamsResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(_: Partial): MsgUpdateParamsResponse { + const message = createBaseMsgUpdateParamsResponse(); + return message; + }, + fromAmino(_: MsgUpdateParamsResponseAmino): MsgUpdateParamsResponse { + return {}; + }, + toAmino(_: MsgUpdateParamsResponse): MsgUpdateParamsResponseAmino { + const obj: any = {}; + return obj; + }, + fromAminoMsg(object: MsgUpdateParamsResponseAminoMsg): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.fromAmino(object.value); + }, + toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { + return { + type: "wasm/MsgUpdateParamsResponse", + value: MsgUpdateParamsResponse.toAmino(message) + }; + }, + fromProtoMsg(message: MsgUpdateParamsResponseProtoMsg): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.decode(message.value); + }, + toProto(message: MsgUpdateParamsResponse): Uint8Array { + return MsgUpdateParamsResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParamsResponse", + value: MsgUpdateParamsResponse.encode(message).finish() + }; + } +}; +function createBaseMsgSudoContract(): MsgSudoContract { + return { + authority: "", + contract: "", + msg: new Uint8Array() + }; +} +export const MsgSudoContract = { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + encode(message: MsgSudoContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + if (message.contract !== "") { + writer.uint32(18).string(message.contract); + } + if (message.msg.length !== 0) { + writer.uint32(26).bytes(message.msg); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgSudoContract { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgSudoContract(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.authority = reader.string(); + break; + case 2: + message.contract = reader.string(); + break; + case 3: + message.msg = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: Partial): MsgSudoContract { + const message = createBaseMsgSudoContract(); + message.authority = object.authority ?? ""; + message.contract = object.contract ?? ""; + message.msg = object.msg ?? new Uint8Array(); + return message; + }, + fromAmino(object: MsgSudoContractAmino): MsgSudoContract { + return { + authority: object.authority, + contract: object.contract, + msg: toUtf8(JSON.stringify(object.msg)) + }; + }, + toAmino(message: MsgSudoContract): MsgSudoContractAmino { + const obj: any = {}; + obj.authority = message.authority; + obj.contract = message.contract; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + return obj; + }, + fromAminoMsg(object: MsgSudoContractAminoMsg): MsgSudoContract { + return MsgSudoContract.fromAmino(object.value); + }, + toAminoMsg(message: MsgSudoContract): MsgSudoContractAminoMsg { + return { + type: "wasm/MsgSudoContract", + value: MsgSudoContract.toAmino(message) + }; + }, + fromProtoMsg(message: MsgSudoContractProtoMsg): MsgSudoContract { + return MsgSudoContract.decode(message.value); + }, + toProto(message: MsgSudoContract): Uint8Array { + return MsgSudoContract.encode(message).finish(); + }, + toProtoMsg(message: MsgSudoContract): MsgSudoContractProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + value: MsgSudoContract.encode(message).finish() + }; + } +}; +function createBaseMsgSudoContractResponse(): MsgSudoContractResponse { + return { + data: new Uint8Array() + }; +} +export const MsgSudoContractResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContractResponse", + encode(message: MsgSudoContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); } return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgInstantiateContract { + decode(input: BinaryReader | Uint8Array, length?: number): MsgSudoContractResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgInstantiateContract(); + const message = createBaseMsgSudoContractResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sender = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - case 3: - message.codeId = reader.uint64(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(Coin.decode(reader, reader.uint32())); + message.data = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -690,133 +2907,226 @@ export const MsgInstantiateContract = { } return message; }, - fromPartial(object: Partial): MsgInstantiateContract { - const message = createBaseMsgInstantiateContract(); - message.sender = object.sender ?? ""; - message.admin = object.admin ?? ""; - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.label = object.label ?? ""; - message.msg = object.msg ?? new Uint8Array(); - message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + fromPartial(object: Partial): MsgSudoContractResponse { + const message = createBaseMsgSudoContractResponse(); + message.data = object.data ?? new Uint8Array(); return message; }, - fromAmino(object: MsgInstantiateContractAmino): MsgInstantiateContract { + fromAmino(object: MsgSudoContractResponseAmino): MsgSudoContractResponse { return { - sender: object.sender, - admin: object.admin, - codeId: BigInt(object.code_id), - label: object.label, - msg: toUtf8(JSON.stringify(object.msg)), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [] + data: object.data }; }, - toAmino(message: MsgInstantiateContract): MsgInstantiateContractAmino { + toAmino(message: MsgSudoContractResponse): MsgSudoContractResponseAmino { const obj: any = {}; - obj.sender = message.sender; - obj.admin = message.admin; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.label = message.label; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.funds = []; - } + obj.data = message.data; return obj; }, - fromAminoMsg(object: MsgInstantiateContractAminoMsg): MsgInstantiateContract { - return MsgInstantiateContract.fromAmino(object.value); + fromAminoMsg(object: MsgSudoContractResponseAminoMsg): MsgSudoContractResponse { + return MsgSudoContractResponse.fromAmino(object.value); }, - toAminoMsg(message: MsgInstantiateContract): MsgInstantiateContractAminoMsg { + toAminoMsg(message: MsgSudoContractResponse): MsgSudoContractResponseAminoMsg { return { - type: "wasm/MsgInstantiateContract", - value: MsgInstantiateContract.toAmino(message) + type: "wasm/MsgSudoContractResponse", + value: MsgSudoContractResponse.toAmino(message) }; }, - fromProtoMsg(message: MsgInstantiateContractProtoMsg): MsgInstantiateContract { - return MsgInstantiateContract.decode(message.value); + fromProtoMsg(message: MsgSudoContractResponseProtoMsg): MsgSudoContractResponse { + return MsgSudoContractResponse.decode(message.value); }, - toProto(message: MsgInstantiateContract): Uint8Array { - return MsgInstantiateContract.encode(message).finish(); + toProto(message: MsgSudoContractResponse): Uint8Array { + return MsgSudoContractResponse.encode(message).finish(); }, - toProtoMsg(message: MsgInstantiateContract): MsgInstantiateContractProtoMsg { + toProtoMsg(message: MsgSudoContractResponse): MsgSudoContractResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", - value: MsgInstantiateContract.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContractResponse", + value: MsgSudoContractResponse.encode(message).finish() }; } }; -function createBaseMsgInstantiateContract2(): MsgInstantiateContract2 { +function createBaseMsgPinCodes(): MsgPinCodes { return { - sender: "", - admin: "", - codeId: BigInt(0), - label: "", - msg: new Uint8Array(), - funds: [], - salt: new Uint8Array(), - fixMsg: false + authority: "", + codeIds: [] }; } -export const MsgInstantiateContract2 = { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", - encode(message: MsgInstantiateContract2, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.admin !== "") { - writer.uint32(18).string(message.admin); +export const MsgPinCodes = { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + encode(message: MsgPinCodes, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); } - if (message.codeId !== BigInt(0)) { - writer.uint32(24).uint64(message.codeId); + writer.uint32(18).fork(); + for (const v of message.codeIds) { + writer.uint64(v); } - if (message.label !== "") { - writer.uint32(34).string(message.label); + writer.ldelim(); + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgPinCodes { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgPinCodes(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.authority = reader.string(); + break; + case 2: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.codeIds.push(reader.uint64()); + } + } else { + message.codeIds.push(reader.uint64()); + } + break; + default: + reader.skipType(tag & 7); + break; + } } - if (message.msg.length !== 0) { - writer.uint32(42).bytes(message.msg); + return message; + }, + fromPartial(object: Partial): MsgPinCodes { + const message = createBaseMsgPinCodes(); + message.authority = object.authority ?? ""; + message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; + return message; + }, + fromAmino(object: MsgPinCodesAmino): MsgPinCodes { + return { + authority: object.authority, + codeIds: Array.isArray(object?.code_ids) ? object.code_ids.map((e: any) => BigInt(e)) : [] + }; + }, + toAmino(message: MsgPinCodes): MsgPinCodesAmino { + const obj: any = {}; + obj.authority = message.authority; + if (message.codeIds) { + obj.code_ids = message.codeIds.map(e => e.toString()); + } else { + obj.code_ids = []; } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(50).fork()).ldelim(); + return obj; + }, + fromAminoMsg(object: MsgPinCodesAminoMsg): MsgPinCodes { + return MsgPinCodes.fromAmino(object.value); + }, + toAminoMsg(message: MsgPinCodes): MsgPinCodesAminoMsg { + return { + type: "wasm/MsgPinCodes", + value: MsgPinCodes.toAmino(message) + }; + }, + fromProtoMsg(message: MsgPinCodesProtoMsg): MsgPinCodes { + return MsgPinCodes.decode(message.value); + }, + toProto(message: MsgPinCodes): Uint8Array { + return MsgPinCodes.encode(message).finish(); + }, + toProtoMsg(message: MsgPinCodes): MsgPinCodesProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + value: MsgPinCodes.encode(message).finish() + }; + } +}; +function createBaseMsgPinCodesResponse(): MsgPinCodesResponse { + return {}; +} +export const MsgPinCodesResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodesResponse", + encode(_: MsgPinCodesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgPinCodesResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgPinCodesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } } - if (message.salt.length !== 0) { - writer.uint32(58).bytes(message.salt); + return message; + }, + fromPartial(_: Partial): MsgPinCodesResponse { + const message = createBaseMsgPinCodesResponse(); + return message; + }, + fromAmino(_: MsgPinCodesResponseAmino): MsgPinCodesResponse { + return {}; + }, + toAmino(_: MsgPinCodesResponse): MsgPinCodesResponseAmino { + const obj: any = {}; + return obj; + }, + fromAminoMsg(object: MsgPinCodesResponseAminoMsg): MsgPinCodesResponse { + return MsgPinCodesResponse.fromAmino(object.value); + }, + toAminoMsg(message: MsgPinCodesResponse): MsgPinCodesResponseAminoMsg { + return { + type: "wasm/MsgPinCodesResponse", + value: MsgPinCodesResponse.toAmino(message) + }; + }, + fromProtoMsg(message: MsgPinCodesResponseProtoMsg): MsgPinCodesResponse { + return MsgPinCodesResponse.decode(message.value); + }, + toProto(message: MsgPinCodesResponse): Uint8Array { + return MsgPinCodesResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgPinCodesResponse): MsgPinCodesResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodesResponse", + value: MsgPinCodesResponse.encode(message).finish() + }; + } +}; +function createBaseMsgUnpinCodes(): MsgUnpinCodes { + return { + authority: "", + codeIds: [] + }; +} +export const MsgUnpinCodes = { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + encode(message: MsgUnpinCodes, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); } - if (message.fixMsg === true) { - writer.uint32(64).bool(message.fixMsg); + writer.uint32(18).fork(); + for (const v of message.codeIds) { + writer.uint64(v); } + writer.ldelim(); return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgInstantiateContract2 { + decode(input: BinaryReader | Uint8Array, length?: number): MsgUnpinCodes { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgInstantiateContract2(); + const message = createBaseMsgUnpinCodes(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sender = reader.string(); + message.authority = reader.string(); break; case 2: - message.admin = reader.string(); - break; - case 3: - message.codeId = reader.uint64(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - case 7: - message.salt = reader.bytes(); - break; - case 8: - message.fixMsg = reader.bool(); + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.codeIds.push(reader.uint64()); + } + } else { + message.codeIds.push(reader.uint64()); + } break; default: reader.skipType(tag & 7); @@ -825,97 +3135,197 @@ export const MsgInstantiateContract2 = { } return message; }, - fromPartial(object: Partial): MsgInstantiateContract2 { - const message = createBaseMsgInstantiateContract2(); - message.sender = object.sender ?? ""; - message.admin = object.admin ?? ""; - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.label = object.label ?? ""; - message.msg = object.msg ?? new Uint8Array(); - message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; - message.salt = object.salt ?? new Uint8Array(); - message.fixMsg = object.fixMsg ?? false; + fromPartial(object: Partial): MsgUnpinCodes { + const message = createBaseMsgUnpinCodes(); + message.authority = object.authority ?? ""; + message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; return message; }, - fromAmino(object: MsgInstantiateContract2Amino): MsgInstantiateContract2 { + fromAmino(object: MsgUnpinCodesAmino): MsgUnpinCodes { return { - sender: object.sender, - admin: object.admin, - codeId: BigInt(object.code_id), - label: object.label, - msg: toUtf8(JSON.stringify(object.msg)), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [], - salt: object.salt, - fixMsg: object.fix_msg + authority: object.authority, + codeIds: Array.isArray(object?.code_ids) ? object.code_ids.map((e: any) => BigInt(e)) : [] }; }, - toAmino(message: MsgInstantiateContract2): MsgInstantiateContract2Amino { + toAmino(message: MsgUnpinCodes): MsgUnpinCodesAmino { const obj: any = {}; - obj.sender = message.sender; - obj.admin = message.admin; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.label = message.label; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); + obj.authority = message.authority; + if (message.codeIds) { + obj.code_ids = message.codeIds.map(e => e.toString()); } else { - obj.funds = []; + obj.code_ids = []; } - obj.salt = message.salt; - obj.fix_msg = message.fixMsg; return obj; }, - fromAminoMsg(object: MsgInstantiateContract2AminoMsg): MsgInstantiateContract2 { - return MsgInstantiateContract2.fromAmino(object.value); + fromAminoMsg(object: MsgUnpinCodesAminoMsg): MsgUnpinCodes { + return MsgUnpinCodes.fromAmino(object.value); + }, + toAminoMsg(message: MsgUnpinCodes): MsgUnpinCodesAminoMsg { + return { + type: "wasm/MsgUnpinCodes", + value: MsgUnpinCodes.toAmino(message) + }; + }, + fromProtoMsg(message: MsgUnpinCodesProtoMsg): MsgUnpinCodes { + return MsgUnpinCodes.decode(message.value); + }, + toProto(message: MsgUnpinCodes): Uint8Array { + return MsgUnpinCodes.encode(message).finish(); + }, + toProtoMsg(message: MsgUnpinCodes): MsgUnpinCodesProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + value: MsgUnpinCodes.encode(message).finish() + }; + } +}; +function createBaseMsgUnpinCodesResponse(): MsgUnpinCodesResponse { + return {}; +} +export const MsgUnpinCodesResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodesResponse", + encode(_: MsgUnpinCodesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgUnpinCodesResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUnpinCodesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(_: Partial): MsgUnpinCodesResponse { + const message = createBaseMsgUnpinCodesResponse(); + return message; + }, + fromAmino(_: MsgUnpinCodesResponseAmino): MsgUnpinCodesResponse { + return {}; + }, + toAmino(_: MsgUnpinCodesResponse): MsgUnpinCodesResponseAmino { + const obj: any = {}; + return obj; + }, + fromAminoMsg(object: MsgUnpinCodesResponseAminoMsg): MsgUnpinCodesResponse { + return MsgUnpinCodesResponse.fromAmino(object.value); }, - toAminoMsg(message: MsgInstantiateContract2): MsgInstantiateContract2AminoMsg { + toAminoMsg(message: MsgUnpinCodesResponse): MsgUnpinCodesResponseAminoMsg { return { - type: "wasm/MsgInstantiateContract2", - value: MsgInstantiateContract2.toAmino(message) + type: "wasm/MsgUnpinCodesResponse", + value: MsgUnpinCodesResponse.toAmino(message) }; }, - fromProtoMsg(message: MsgInstantiateContract2ProtoMsg): MsgInstantiateContract2 { - return MsgInstantiateContract2.decode(message.value); + fromProtoMsg(message: MsgUnpinCodesResponseProtoMsg): MsgUnpinCodesResponse { + return MsgUnpinCodesResponse.decode(message.value); }, - toProto(message: MsgInstantiateContract2): Uint8Array { - return MsgInstantiateContract2.encode(message).finish(); + toProto(message: MsgUnpinCodesResponse): Uint8Array { + return MsgUnpinCodesResponse.encode(message).finish(); }, - toProtoMsg(message: MsgInstantiateContract2): MsgInstantiateContract2ProtoMsg { + toProtoMsg(message: MsgUnpinCodesResponse): MsgUnpinCodesResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", - value: MsgInstantiateContract2.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodesResponse", + value: MsgUnpinCodesResponse.encode(message).finish() }; } }; -function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse { +function createBaseMsgStoreAndInstantiateContract(): MsgStoreAndInstantiateContract { return { - address: "", - data: new Uint8Array() + authority: "", + wasmByteCode: new Uint8Array(), + instantiatePermission: AccessConfig.fromPartial({}), + unpinCode: false, + admin: "", + label: "", + msg: new Uint8Array(), + funds: [], + source: "", + builder: "", + codeHash: new Uint8Array() }; } -export const MsgInstantiateContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", - encode(message: MsgInstantiateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); +export const MsgStoreAndInstantiateContract = { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + encode(message: MsgStoreAndInstantiateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); + if (message.wasmByteCode.length !== 0) { + writer.uint32(26).bytes(message.wasmByteCode); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(34).fork()).ldelim(); + } + if (message.unpinCode === true) { + writer.uint32(40).bool(message.unpinCode); + } + if (message.admin !== "") { + writer.uint32(50).string(message.admin); + } + if (message.label !== "") { + writer.uint32(58).string(message.label); + } + if (message.msg.length !== 0) { + writer.uint32(66).bytes(message.msg); + } + for (const v of message.funds) { + Coin.encode(v!, writer.uint32(74).fork()).ldelim(); + } + if (message.source !== "") { + writer.uint32(82).string(message.source); + } + if (message.builder !== "") { + writer.uint32(90).string(message.builder); + } + if (message.codeHash.length !== 0) { + writer.uint32(98).bytes(message.codeHash); } return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgInstantiateContractResponse { + decode(input: BinaryReader | Uint8Array, length?: number): MsgStoreAndInstantiateContract { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgInstantiateContractResponse(); + const message = createBaseMsgStoreAndInstantiateContract(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.address = reader.string(); + message.authority = reader.string(); break; - case 2: - message.data = reader.bytes(); + case 3: + message.wasmByteCode = reader.bytes(); + break; + case 4: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + case 5: + message.unpinCode = reader.bool(); + break; + case 6: + message.admin = reader.string(); + break; + case 7: + message.label = reader.string(); + break; + case 8: + message.msg = reader.bytes(); + break; + case 9: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + case 10: + message.source = reader.string(); + break; + case 11: + message.builder = reader.string(); + break; + case 12: + message.codeHash = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -924,55 +3334,86 @@ export const MsgInstantiateContractResponse = { } return message; }, - fromPartial(object: Partial): MsgInstantiateContractResponse { - const message = createBaseMsgInstantiateContractResponse(); - message.address = object.address ?? ""; - message.data = object.data ?? new Uint8Array(); + fromPartial(object: Partial): MsgStoreAndInstantiateContract { + const message = createBaseMsgStoreAndInstantiateContract(); + message.authority = object.authority ?? ""; + message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; + message.unpinCode = object.unpinCode ?? false; + message.admin = object.admin ?? ""; + message.label = object.label ?? ""; + message.msg = object.msg ?? new Uint8Array(); + message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + message.source = object.source ?? ""; + message.builder = object.builder ?? ""; + message.codeHash = object.codeHash ?? new Uint8Array(); return message; }, - fromAmino(object: MsgInstantiateContractResponseAmino): MsgInstantiateContractResponse { + fromAmino(object: MsgStoreAndInstantiateContractAmino): MsgStoreAndInstantiateContract { return { - address: object.address, - data: object.data + authority: object.authority, + wasmByteCode: fromBase64(object.wasm_byte_code), + instantiatePermission: object?.instantiate_permission ? AccessConfig.fromAmino(object.instantiate_permission) : undefined, + unpinCode: object.unpin_code, + admin: object.admin, + label: object.label, + msg: toUtf8(JSON.stringify(object.msg)), + funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [], + source: object.source, + builder: object.builder, + codeHash: object.code_hash }; }, - toAmino(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseAmino { + toAmino(message: MsgStoreAndInstantiateContract): MsgStoreAndInstantiateContractAmino { const obj: any = {}; - obj.address = message.address; - obj.data = message.data; + obj.authority = message.authority; + obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; + obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; + obj.unpin_code = message.unpinCode; + obj.admin = message.admin; + obj.label = message.label; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + if (message.funds) { + obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.funds = []; + } + obj.source = message.source; + obj.builder = message.builder; + obj.code_hash = message.codeHash; return obj; }, - fromAminoMsg(object: MsgInstantiateContractResponseAminoMsg): MsgInstantiateContractResponse { - return MsgInstantiateContractResponse.fromAmino(object.value); + fromAminoMsg(object: MsgStoreAndInstantiateContractAminoMsg): MsgStoreAndInstantiateContract { + return MsgStoreAndInstantiateContract.fromAmino(object.value); }, - toAminoMsg(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseAminoMsg { + toAminoMsg(message: MsgStoreAndInstantiateContract): MsgStoreAndInstantiateContractAminoMsg { return { - type: "wasm/MsgInstantiateContractResponse", - value: MsgInstantiateContractResponse.toAmino(message) + type: "wasm/MsgStoreAndInstantiateContract", + value: MsgStoreAndInstantiateContract.toAmino(message) }; }, - fromProtoMsg(message: MsgInstantiateContractResponseProtoMsg): MsgInstantiateContractResponse { - return MsgInstantiateContractResponse.decode(message.value); + fromProtoMsg(message: MsgStoreAndInstantiateContractProtoMsg): MsgStoreAndInstantiateContract { + return MsgStoreAndInstantiateContract.decode(message.value); }, - toProto(message: MsgInstantiateContractResponse): Uint8Array { - return MsgInstantiateContractResponse.encode(message).finish(); + toProto(message: MsgStoreAndInstantiateContract): Uint8Array { + return MsgStoreAndInstantiateContract.encode(message).finish(); }, - toProtoMsg(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseProtoMsg { + toProtoMsg(message: MsgStoreAndInstantiateContract): MsgStoreAndInstantiateContractProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", - value: MsgInstantiateContractResponse.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + value: MsgStoreAndInstantiateContract.encode(message).finish() }; } }; -function createBaseMsgInstantiateContract2Response(): MsgInstantiateContract2Response { +function createBaseMsgStoreAndInstantiateContractResponse(): MsgStoreAndInstantiateContractResponse { return { address: "", data: new Uint8Array() }; } -export const MsgInstantiateContract2Response = { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response", - encode(message: MsgInstantiateContract2Response, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { +export const MsgStoreAndInstantiateContractResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", + encode(message: MsgStoreAndInstantiateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.address !== "") { writer.uint32(10).string(message.address); } @@ -981,10 +3422,10 @@ export const MsgInstantiateContract2Response = { } return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgInstantiateContract2Response { + decode(input: BinaryReader | Uint8Array, length?: number): MsgStoreAndInstantiateContractResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgInstantiateContract2Response(); + const message = createBaseMsgStoreAndInstantiateContractResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1001,89 +3442,75 @@ export const MsgInstantiateContract2Response = { } return message; }, - fromPartial(object: Partial): MsgInstantiateContract2Response { - const message = createBaseMsgInstantiateContract2Response(); + fromPartial(object: Partial): MsgStoreAndInstantiateContractResponse { + const message = createBaseMsgStoreAndInstantiateContractResponse(); message.address = object.address ?? ""; message.data = object.data ?? new Uint8Array(); return message; }, - fromAmino(object: MsgInstantiateContract2ResponseAmino): MsgInstantiateContract2Response { + fromAmino(object: MsgStoreAndInstantiateContractResponseAmino): MsgStoreAndInstantiateContractResponse { return { address: object.address, data: object.data }; }, - toAmino(message: MsgInstantiateContract2Response): MsgInstantiateContract2ResponseAmino { + toAmino(message: MsgStoreAndInstantiateContractResponse): MsgStoreAndInstantiateContractResponseAmino { const obj: any = {}; obj.address = message.address; obj.data = message.data; return obj; }, - fromAminoMsg(object: MsgInstantiateContract2ResponseAminoMsg): MsgInstantiateContract2Response { - return MsgInstantiateContract2Response.fromAmino(object.value); + fromAminoMsg(object: MsgStoreAndInstantiateContractResponseAminoMsg): MsgStoreAndInstantiateContractResponse { + return MsgStoreAndInstantiateContractResponse.fromAmino(object.value); }, - toAminoMsg(message: MsgInstantiateContract2Response): MsgInstantiateContract2ResponseAminoMsg { + toAminoMsg(message: MsgStoreAndInstantiateContractResponse): MsgStoreAndInstantiateContractResponseAminoMsg { return { - type: "wasm/MsgInstantiateContract2Response", - value: MsgInstantiateContract2Response.toAmino(message) + type: "wasm/MsgStoreAndInstantiateContractResponse", + value: MsgStoreAndInstantiateContractResponse.toAmino(message) }; }, - fromProtoMsg(message: MsgInstantiateContract2ResponseProtoMsg): MsgInstantiateContract2Response { - return MsgInstantiateContract2Response.decode(message.value); + fromProtoMsg(message: MsgStoreAndInstantiateContractResponseProtoMsg): MsgStoreAndInstantiateContractResponse { + return MsgStoreAndInstantiateContractResponse.decode(message.value); }, - toProto(message: MsgInstantiateContract2Response): Uint8Array { - return MsgInstantiateContract2Response.encode(message).finish(); + toProto(message: MsgStoreAndInstantiateContractResponse): Uint8Array { + return MsgStoreAndInstantiateContractResponse.encode(message).finish(); }, - toProtoMsg(message: MsgInstantiateContract2Response): MsgInstantiateContract2ResponseProtoMsg { + toProtoMsg(message: MsgStoreAndInstantiateContractResponse): MsgStoreAndInstantiateContractResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response", - value: MsgInstantiateContract2Response.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", + value: MsgStoreAndInstantiateContractResponse.encode(message).finish() }; } }; -function createBaseMsgExecuteContract(): MsgExecuteContract { +function createBaseMsgAddCodeUploadParamsAddresses(): MsgAddCodeUploadParamsAddresses { return { - sender: "", - contract: "", - msg: new Uint8Array(), - funds: [] + authority: "", + addresses: [] }; } -export const MsgExecuteContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", - encode(message: MsgExecuteContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(18).string(message.contract); +export const MsgAddCodeUploadParamsAddresses = { + typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", + encode(message: MsgAddCodeUploadParamsAddresses, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); } - if (message.msg.length !== 0) { - writer.uint32(26).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(42).fork()).ldelim(); + for (const v of message.addresses) { + writer.uint32(18).string(v!); } return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExecuteContract { + decode(input: BinaryReader | Uint8Array, length?: number): MsgAddCodeUploadParamsAddresses { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExecuteContract(); + const message = createBaseMsgAddCodeUploadParamsAddresses(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sender = reader.string(); + message.authority = reader.string(); break; case 2: - message.contract = reader.string(); - break; - case 3: - message.msg = reader.bytes(); - break; - case 5: - message.funds.push(Coin.decode(reader, reader.uint32())); + message.addresses.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -1092,79 +3519,65 @@ export const MsgExecuteContract = { } return message; }, - fromPartial(object: Partial): MsgExecuteContract { - const message = createBaseMsgExecuteContract(); - message.sender = object.sender ?? ""; - message.contract = object.contract ?? ""; - message.msg = object.msg ?? new Uint8Array(); - message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + fromPartial(object: Partial): MsgAddCodeUploadParamsAddresses { + const message = createBaseMsgAddCodeUploadParamsAddresses(); + message.authority = object.authority ?? ""; + message.addresses = object.addresses?.map(e => e) || []; return message; }, - fromAmino(object: MsgExecuteContractAmino): MsgExecuteContract { + fromAmino(object: MsgAddCodeUploadParamsAddressesAmino): MsgAddCodeUploadParamsAddresses { return { - sender: object.sender, - contract: object.contract, - msg: toUtf8(JSON.stringify(object.msg)), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [] + authority: object.authority, + addresses: Array.isArray(object?.addresses) ? object.addresses.map((e: any) => e) : [] }; }, - toAmino(message: MsgExecuteContract): MsgExecuteContractAmino { + toAmino(message: MsgAddCodeUploadParamsAddresses): MsgAddCodeUploadParamsAddressesAmino { const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); + obj.authority = message.authority; + if (message.addresses) { + obj.addresses = message.addresses.map(e => e); } else { - obj.funds = []; + obj.addresses = []; } return obj; }, - fromAminoMsg(object: MsgExecuteContractAminoMsg): MsgExecuteContract { - return MsgExecuteContract.fromAmino(object.value); + fromAminoMsg(object: MsgAddCodeUploadParamsAddressesAminoMsg): MsgAddCodeUploadParamsAddresses { + return MsgAddCodeUploadParamsAddresses.fromAmino(object.value); }, - toAminoMsg(message: MsgExecuteContract): MsgExecuteContractAminoMsg { + toAminoMsg(message: MsgAddCodeUploadParamsAddresses): MsgAddCodeUploadParamsAddressesAminoMsg { return { - type: "wasm/MsgExecuteContract", - value: MsgExecuteContract.toAmino(message) + type: "wasm/MsgAddCodeUploadParamsAddresses", + value: MsgAddCodeUploadParamsAddresses.toAmino(message) }; }, - fromProtoMsg(message: MsgExecuteContractProtoMsg): MsgExecuteContract { - return MsgExecuteContract.decode(message.value); + fromProtoMsg(message: MsgAddCodeUploadParamsAddressesProtoMsg): MsgAddCodeUploadParamsAddresses { + return MsgAddCodeUploadParamsAddresses.decode(message.value); }, - toProto(message: MsgExecuteContract): Uint8Array { - return MsgExecuteContract.encode(message).finish(); + toProto(message: MsgAddCodeUploadParamsAddresses): Uint8Array { + return MsgAddCodeUploadParamsAddresses.encode(message).finish(); }, - toProtoMsg(message: MsgExecuteContract): MsgExecuteContractProtoMsg { + toProtoMsg(message: MsgAddCodeUploadParamsAddresses): MsgAddCodeUploadParamsAddressesProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", - value: MsgExecuteContract.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", + value: MsgAddCodeUploadParamsAddresses.encode(message).finish() }; } }; -function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse { - return { - data: new Uint8Array() - }; +function createBaseMsgAddCodeUploadParamsAddressesResponse(): MsgAddCodeUploadParamsAddressesResponse { + return {}; } -export const MsgExecuteContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", - encode(message: MsgExecuteContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } +export const MsgAddCodeUploadParamsAddressesResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", + encode(_: MsgAddCodeUploadParamsAddressesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExecuteContractResponse { + decode(input: BinaryReader | Uint8Array, length?: number): MsgAddCodeUploadParamsAddressesResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExecuteContractResponse(); + const message = createBaseMsgAddCodeUploadParamsAddressesResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; default: reader.skipType(tag & 7); break; @@ -1172,86 +3585,68 @@ export const MsgExecuteContractResponse = { } return message; }, - fromPartial(object: Partial): MsgExecuteContractResponse { - const message = createBaseMsgExecuteContractResponse(); - message.data = object.data ?? new Uint8Array(); + fromPartial(_: Partial): MsgAddCodeUploadParamsAddressesResponse { + const message = createBaseMsgAddCodeUploadParamsAddressesResponse(); return message; }, - fromAmino(object: MsgExecuteContractResponseAmino): MsgExecuteContractResponse { - return { - data: object.data - }; + fromAmino(_: MsgAddCodeUploadParamsAddressesResponseAmino): MsgAddCodeUploadParamsAddressesResponse { + return {}; }, - toAmino(message: MsgExecuteContractResponse): MsgExecuteContractResponseAmino { + toAmino(_: MsgAddCodeUploadParamsAddressesResponse): MsgAddCodeUploadParamsAddressesResponseAmino { const obj: any = {}; - obj.data = message.data; return obj; }, - fromAminoMsg(object: MsgExecuteContractResponseAminoMsg): MsgExecuteContractResponse { - return MsgExecuteContractResponse.fromAmino(object.value); + fromAminoMsg(object: MsgAddCodeUploadParamsAddressesResponseAminoMsg): MsgAddCodeUploadParamsAddressesResponse { + return MsgAddCodeUploadParamsAddressesResponse.fromAmino(object.value); }, - toAminoMsg(message: MsgExecuteContractResponse): MsgExecuteContractResponseAminoMsg { + toAminoMsg(message: MsgAddCodeUploadParamsAddressesResponse): MsgAddCodeUploadParamsAddressesResponseAminoMsg { return { - type: "wasm/MsgExecuteContractResponse", - value: MsgExecuteContractResponse.toAmino(message) + type: "wasm/MsgAddCodeUploadParamsAddressesResponse", + value: MsgAddCodeUploadParamsAddressesResponse.toAmino(message) }; }, - fromProtoMsg(message: MsgExecuteContractResponseProtoMsg): MsgExecuteContractResponse { - return MsgExecuteContractResponse.decode(message.value); - }, - toProto(message: MsgExecuteContractResponse): Uint8Array { - return MsgExecuteContractResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgExecuteContractResponse): MsgExecuteContractResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", - value: MsgExecuteContractResponse.encode(message).finish() - }; - } -}; -function createBaseMsgMigrateContract(): MsgMigrateContract { - return { - sender: "", - contract: "", - codeId: BigInt(0), - msg: new Uint8Array() - }; -} -export const MsgMigrateContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", - encode(message: MsgMigrateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(18).string(message.contract); - } - if (message.codeId !== BigInt(0)) { - writer.uint32(24).uint64(message.codeId); + fromProtoMsg(message: MsgAddCodeUploadParamsAddressesResponseProtoMsg): MsgAddCodeUploadParamsAddressesResponse { + return MsgAddCodeUploadParamsAddressesResponse.decode(message.value); + }, + toProto(message: MsgAddCodeUploadParamsAddressesResponse): Uint8Array { + return MsgAddCodeUploadParamsAddressesResponse.encode(message).finish(); + }, + toProtoMsg(message: MsgAddCodeUploadParamsAddressesResponse): MsgAddCodeUploadParamsAddressesResponseProtoMsg { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", + value: MsgAddCodeUploadParamsAddressesResponse.encode(message).finish() + }; + } +}; +function createBaseMsgRemoveCodeUploadParamsAddresses(): MsgRemoveCodeUploadParamsAddresses { + return { + authority: "", + addresses: [] + }; +} +export const MsgRemoveCodeUploadParamsAddresses = { + typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", + encode(message: MsgRemoveCodeUploadParamsAddresses, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); + for (const v of message.addresses) { + writer.uint32(18).string(v!); } return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgMigrateContract { + decode(input: BinaryReader | Uint8Array, length?: number): MsgRemoveCodeUploadParamsAddresses { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMigrateContract(); + const message = createBaseMsgRemoveCodeUploadParamsAddresses(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sender = reader.string(); + message.authority = reader.string(); break; case 2: - message.contract = reader.string(); - break; - case 3: - message.codeId = reader.uint64(); - break; - case 4: - message.msg = reader.bytes(); + message.addresses.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -1260,75 +3655,65 @@ export const MsgMigrateContract = { } return message; }, - fromPartial(object: Partial): MsgMigrateContract { - const message = createBaseMsgMigrateContract(); - message.sender = object.sender ?? ""; - message.contract = object.contract ?? ""; - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.msg = object.msg ?? new Uint8Array(); + fromPartial(object: Partial): MsgRemoveCodeUploadParamsAddresses { + const message = createBaseMsgRemoveCodeUploadParamsAddresses(); + message.authority = object.authority ?? ""; + message.addresses = object.addresses?.map(e => e) || []; return message; }, - fromAmino(object: MsgMigrateContractAmino): MsgMigrateContract { + fromAmino(object: MsgRemoveCodeUploadParamsAddressesAmino): MsgRemoveCodeUploadParamsAddresses { return { - sender: object.sender, - contract: object.contract, - codeId: BigInt(object.code_id), - msg: toUtf8(JSON.stringify(object.msg)) + authority: object.authority, + addresses: Array.isArray(object?.addresses) ? object.addresses.map((e: any) => e) : [] }; }, - toAmino(message: MsgMigrateContract): MsgMigrateContractAmino { + toAmino(message: MsgRemoveCodeUploadParamsAddresses): MsgRemoveCodeUploadParamsAddressesAmino { const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + obj.authority = message.authority; + if (message.addresses) { + obj.addresses = message.addresses.map(e => e); + } else { + obj.addresses = []; + } return obj; }, - fromAminoMsg(object: MsgMigrateContractAminoMsg): MsgMigrateContract { - return MsgMigrateContract.fromAmino(object.value); + fromAminoMsg(object: MsgRemoveCodeUploadParamsAddressesAminoMsg): MsgRemoveCodeUploadParamsAddresses { + return MsgRemoveCodeUploadParamsAddresses.fromAmino(object.value); }, - toAminoMsg(message: MsgMigrateContract): MsgMigrateContractAminoMsg { + toAminoMsg(message: MsgRemoveCodeUploadParamsAddresses): MsgRemoveCodeUploadParamsAddressesAminoMsg { return { - type: "wasm/MsgMigrateContract", - value: MsgMigrateContract.toAmino(message) + type: "wasm/MsgRemoveCodeUploadParamsAddresses", + value: MsgRemoveCodeUploadParamsAddresses.toAmino(message) }; }, - fromProtoMsg(message: MsgMigrateContractProtoMsg): MsgMigrateContract { - return MsgMigrateContract.decode(message.value); + fromProtoMsg(message: MsgRemoveCodeUploadParamsAddressesProtoMsg): MsgRemoveCodeUploadParamsAddresses { + return MsgRemoveCodeUploadParamsAddresses.decode(message.value); }, - toProto(message: MsgMigrateContract): Uint8Array { - return MsgMigrateContract.encode(message).finish(); + toProto(message: MsgRemoveCodeUploadParamsAddresses): Uint8Array { + return MsgRemoveCodeUploadParamsAddresses.encode(message).finish(); }, - toProtoMsg(message: MsgMigrateContract): MsgMigrateContractProtoMsg { + toProtoMsg(message: MsgRemoveCodeUploadParamsAddresses): MsgRemoveCodeUploadParamsAddressesProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", - value: MsgMigrateContract.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", + value: MsgRemoveCodeUploadParamsAddresses.encode(message).finish() }; } }; -function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { - return { - data: new Uint8Array() - }; +function createBaseMsgRemoveCodeUploadParamsAddressesResponse(): MsgRemoveCodeUploadParamsAddressesResponse { + return {}; } -export const MsgMigrateContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", - encode(message: MsgMigrateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } +export const MsgRemoveCodeUploadParamsAddressesResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", + encode(_: MsgRemoveCodeUploadParamsAddressesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgMigrateContractResponse { + decode(input: BinaryReader | Uint8Array, length?: number): MsgRemoveCodeUploadParamsAddressesResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMigrateContractResponse(); + const message = createBaseMsgRemoveCodeUploadParamsAddressesResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; default: reader.skipType(tag & 7); break; @@ -1336,80 +3721,90 @@ export const MsgMigrateContractResponse = { } return message; }, - fromPartial(object: Partial): MsgMigrateContractResponse { - const message = createBaseMsgMigrateContractResponse(); - message.data = object.data ?? new Uint8Array(); + fromPartial(_: Partial): MsgRemoveCodeUploadParamsAddressesResponse { + const message = createBaseMsgRemoveCodeUploadParamsAddressesResponse(); return message; }, - fromAmino(object: MsgMigrateContractResponseAmino): MsgMigrateContractResponse { - return { - data: object.data - }; + fromAmino(_: MsgRemoveCodeUploadParamsAddressesResponseAmino): MsgRemoveCodeUploadParamsAddressesResponse { + return {}; }, - toAmino(message: MsgMigrateContractResponse): MsgMigrateContractResponseAmino { + toAmino(_: MsgRemoveCodeUploadParamsAddressesResponse): MsgRemoveCodeUploadParamsAddressesResponseAmino { const obj: any = {}; - obj.data = message.data; return obj; }, - fromAminoMsg(object: MsgMigrateContractResponseAminoMsg): MsgMigrateContractResponse { - return MsgMigrateContractResponse.fromAmino(object.value); + fromAminoMsg(object: MsgRemoveCodeUploadParamsAddressesResponseAminoMsg): MsgRemoveCodeUploadParamsAddressesResponse { + return MsgRemoveCodeUploadParamsAddressesResponse.fromAmino(object.value); }, - toAminoMsg(message: MsgMigrateContractResponse): MsgMigrateContractResponseAminoMsg { + toAminoMsg(message: MsgRemoveCodeUploadParamsAddressesResponse): MsgRemoveCodeUploadParamsAddressesResponseAminoMsg { return { - type: "wasm/MsgMigrateContractResponse", - value: MsgMigrateContractResponse.toAmino(message) + type: "wasm/MsgRemoveCodeUploadParamsAddressesResponse", + value: MsgRemoveCodeUploadParamsAddressesResponse.toAmino(message) }; }, - fromProtoMsg(message: MsgMigrateContractResponseProtoMsg): MsgMigrateContractResponse { - return MsgMigrateContractResponse.decode(message.value); + fromProtoMsg(message: MsgRemoveCodeUploadParamsAddressesResponseProtoMsg): MsgRemoveCodeUploadParamsAddressesResponse { + return MsgRemoveCodeUploadParamsAddressesResponse.decode(message.value); }, - toProto(message: MsgMigrateContractResponse): Uint8Array { - return MsgMigrateContractResponse.encode(message).finish(); + toProto(message: MsgRemoveCodeUploadParamsAddressesResponse): Uint8Array { + return MsgRemoveCodeUploadParamsAddressesResponse.encode(message).finish(); }, - toProtoMsg(message: MsgMigrateContractResponse): MsgMigrateContractResponseProtoMsg { + toProtoMsg(message: MsgRemoveCodeUploadParamsAddressesResponse): MsgRemoveCodeUploadParamsAddressesResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", - value: MsgMigrateContractResponse.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", + value: MsgRemoveCodeUploadParamsAddressesResponse.encode(message).finish() }; } }; -function createBaseMsgUpdateAdmin(): MsgUpdateAdmin { +function createBaseMsgStoreAndMigrateContract(): MsgStoreAndMigrateContract { return { - sender: "", - newAdmin: "", - contract: "" + authority: "", + wasmByteCode: new Uint8Array(), + instantiatePermission: AccessConfig.fromPartial({}), + contract: "", + msg: new Uint8Array() }; } -export const MsgUpdateAdmin = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", - encode(message: MsgUpdateAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); +export const MsgStoreAndMigrateContract = { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", + encode(message: MsgStoreAndMigrateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); } - if (message.newAdmin !== "") { - writer.uint32(18).string(message.newAdmin); + if (message.wasmByteCode.length !== 0) { + writer.uint32(18).bytes(message.wasmByteCode); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(26).fork()).ldelim(); } if (message.contract !== "") { - writer.uint32(26).string(message.contract); + writer.uint32(34).string(message.contract); + } + if (message.msg.length !== 0) { + writer.uint32(42).bytes(message.msg); } return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateAdmin { + decode(input: BinaryReader | Uint8Array, length?: number): MsgStoreAndMigrateContract { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateAdmin(); + const message = createBaseMsgStoreAndMigrateContract(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sender = reader.string(); + message.authority = reader.string(); break; case 2: - message.newAdmin = reader.string(); + message.wasmByteCode = reader.bytes(); break; case 3: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + case 4: message.contract = reader.string(); break; + case 5: + message.msg = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -1417,64 +3812,92 @@ export const MsgUpdateAdmin = { } return message; }, - fromPartial(object: Partial): MsgUpdateAdmin { - const message = createBaseMsgUpdateAdmin(); - message.sender = object.sender ?? ""; - message.newAdmin = object.newAdmin ?? ""; + fromPartial(object: Partial): MsgStoreAndMigrateContract { + const message = createBaseMsgStoreAndMigrateContract(); + message.authority = object.authority ?? ""; + message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; message.contract = object.contract ?? ""; + message.msg = object.msg ?? new Uint8Array(); return message; }, - fromAmino(object: MsgUpdateAdminAmino): MsgUpdateAdmin { + fromAmino(object: MsgStoreAndMigrateContractAmino): MsgStoreAndMigrateContract { return { - sender: object.sender, - newAdmin: object.new_admin, - contract: object.contract + authority: object.authority, + wasmByteCode: fromBase64(object.wasm_byte_code), + instantiatePermission: object?.instantiate_permission ? AccessConfig.fromAmino(object.instantiate_permission) : undefined, + contract: object.contract, + msg: toUtf8(JSON.stringify(object.msg)) }; }, - toAmino(message: MsgUpdateAdmin): MsgUpdateAdminAmino { + toAmino(message: MsgStoreAndMigrateContract): MsgStoreAndMigrateContractAmino { const obj: any = {}; - obj.sender = message.sender; - obj.new_admin = message.newAdmin; + obj.authority = message.authority; + obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; + obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; obj.contract = message.contract; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; return obj; }, - fromAminoMsg(object: MsgUpdateAdminAminoMsg): MsgUpdateAdmin { - return MsgUpdateAdmin.fromAmino(object.value); + fromAminoMsg(object: MsgStoreAndMigrateContractAminoMsg): MsgStoreAndMigrateContract { + return MsgStoreAndMigrateContract.fromAmino(object.value); }, - toAminoMsg(message: MsgUpdateAdmin): MsgUpdateAdminAminoMsg { + toAminoMsg(message: MsgStoreAndMigrateContract): MsgStoreAndMigrateContractAminoMsg { return { - type: "wasm/MsgUpdateAdmin", - value: MsgUpdateAdmin.toAmino(message) + type: "wasm/MsgStoreAndMigrateContract", + value: MsgStoreAndMigrateContract.toAmino(message) }; }, - fromProtoMsg(message: MsgUpdateAdminProtoMsg): MsgUpdateAdmin { - return MsgUpdateAdmin.decode(message.value); + fromProtoMsg(message: MsgStoreAndMigrateContractProtoMsg): MsgStoreAndMigrateContract { + return MsgStoreAndMigrateContract.decode(message.value); }, - toProto(message: MsgUpdateAdmin): Uint8Array { - return MsgUpdateAdmin.encode(message).finish(); + toProto(message: MsgStoreAndMigrateContract): Uint8Array { + return MsgStoreAndMigrateContract.encode(message).finish(); }, - toProtoMsg(message: MsgUpdateAdmin): MsgUpdateAdminProtoMsg { + toProtoMsg(message: MsgStoreAndMigrateContract): MsgStoreAndMigrateContractProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", - value: MsgUpdateAdmin.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", + value: MsgStoreAndMigrateContract.encode(message).finish() }; } }; -function createBaseMsgUpdateAdminResponse(): MsgUpdateAdminResponse { - return {}; +function createBaseMsgStoreAndMigrateContractResponse(): MsgStoreAndMigrateContractResponse { + return { + codeId: BigInt(0), + checksum: new Uint8Array(), + data: new Uint8Array() + }; } -export const MsgUpdateAdminResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", - encode(_: MsgUpdateAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { +export const MsgStoreAndMigrateContractResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", + encode(message: MsgStoreAndMigrateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(message.codeId); + } + if (message.checksum.length !== 0) { + writer.uint32(18).bytes(message.checksum); + } + if (message.data.length !== 0) { + writer.uint32(26).bytes(message.data); + } return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateAdminResponse { + decode(input: BinaryReader | Uint8Array, length?: number): MsgStoreAndMigrateContractResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateAdminResponse(); + const message = createBaseMsgStoreAndMigrateContractResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.codeId = reader.uint64(); + break; + case 2: + message.checksum = reader.bytes(); + break; + case 3: + message.data = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -1482,66 +3905,83 @@ export const MsgUpdateAdminResponse = { } return message; }, - fromPartial(_: Partial): MsgUpdateAdminResponse { - const message = createBaseMsgUpdateAdminResponse(); + fromPartial(object: Partial): MsgStoreAndMigrateContractResponse { + const message = createBaseMsgStoreAndMigrateContractResponse(); + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.checksum = object.checksum ?? new Uint8Array(); + message.data = object.data ?? new Uint8Array(); return message; }, - fromAmino(_: MsgUpdateAdminResponseAmino): MsgUpdateAdminResponse { - return {}; + fromAmino(object: MsgStoreAndMigrateContractResponseAmino): MsgStoreAndMigrateContractResponse { + return { + codeId: BigInt(object.code_id), + checksum: object.checksum, + data: object.data + }; }, - toAmino(_: MsgUpdateAdminResponse): MsgUpdateAdminResponseAmino { + toAmino(message: MsgStoreAndMigrateContractResponse): MsgStoreAndMigrateContractResponseAmino { const obj: any = {}; + obj.code_id = message.codeId ? message.codeId.toString() : undefined; + obj.checksum = message.checksum; + obj.data = message.data; return obj; }, - fromAminoMsg(object: MsgUpdateAdminResponseAminoMsg): MsgUpdateAdminResponse { - return MsgUpdateAdminResponse.fromAmino(object.value); + fromAminoMsg(object: MsgStoreAndMigrateContractResponseAminoMsg): MsgStoreAndMigrateContractResponse { + return MsgStoreAndMigrateContractResponse.fromAmino(object.value); }, - toAminoMsg(message: MsgUpdateAdminResponse): MsgUpdateAdminResponseAminoMsg { + toAminoMsg(message: MsgStoreAndMigrateContractResponse): MsgStoreAndMigrateContractResponseAminoMsg { return { - type: "wasm/MsgUpdateAdminResponse", - value: MsgUpdateAdminResponse.toAmino(message) + type: "wasm/MsgStoreAndMigrateContractResponse", + value: MsgStoreAndMigrateContractResponse.toAmino(message) }; }, - fromProtoMsg(message: MsgUpdateAdminResponseProtoMsg): MsgUpdateAdminResponse { - return MsgUpdateAdminResponse.decode(message.value); + fromProtoMsg(message: MsgStoreAndMigrateContractResponseProtoMsg): MsgStoreAndMigrateContractResponse { + return MsgStoreAndMigrateContractResponse.decode(message.value); }, - toProto(message: MsgUpdateAdminResponse): Uint8Array { - return MsgUpdateAdminResponse.encode(message).finish(); + toProto(message: MsgStoreAndMigrateContractResponse): Uint8Array { + return MsgStoreAndMigrateContractResponse.encode(message).finish(); }, - toProtoMsg(message: MsgUpdateAdminResponse): MsgUpdateAdminResponseProtoMsg { + toProtoMsg(message: MsgStoreAndMigrateContractResponse): MsgStoreAndMigrateContractResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", - value: MsgUpdateAdminResponse.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", + value: MsgStoreAndMigrateContractResponse.encode(message).finish() }; } }; -function createBaseMsgClearAdmin(): MsgClearAdmin { +function createBaseMsgUpdateContractLabel(): MsgUpdateContractLabel { return { sender: "", + newLabel: "", contract: "" }; } -export const MsgClearAdmin = { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", - encode(message: MsgClearAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { +export const MsgUpdateContractLabel = { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", + encode(message: MsgUpdateContractLabel, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.sender !== "") { writer.uint32(10).string(message.sender); } + if (message.newLabel !== "") { + writer.uint32(18).string(message.newLabel); + } if (message.contract !== "") { writer.uint32(26).string(message.contract); } return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgClearAdmin { + decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateContractLabel { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgClearAdmin(); + const message = createBaseMsgUpdateContractLabel(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sender = reader.string(); break; + case 2: + message.newLabel = reader.string(); + break; case 3: message.contract = reader.string(); break; @@ -1552,58 +3992,61 @@ export const MsgClearAdmin = { } return message; }, - fromPartial(object: Partial): MsgClearAdmin { - const message = createBaseMsgClearAdmin(); + fromPartial(object: Partial): MsgUpdateContractLabel { + const message = createBaseMsgUpdateContractLabel(); message.sender = object.sender ?? ""; + message.newLabel = object.newLabel ?? ""; message.contract = object.contract ?? ""; return message; }, - fromAmino(object: MsgClearAdminAmino): MsgClearAdmin { + fromAmino(object: MsgUpdateContractLabelAmino): MsgUpdateContractLabel { return { sender: object.sender, + newLabel: object.new_label, contract: object.contract }; }, - toAmino(message: MsgClearAdmin): MsgClearAdminAmino { + toAmino(message: MsgUpdateContractLabel): MsgUpdateContractLabelAmino { const obj: any = {}; obj.sender = message.sender; + obj.new_label = message.newLabel; obj.contract = message.contract; return obj; }, - fromAminoMsg(object: MsgClearAdminAminoMsg): MsgClearAdmin { - return MsgClearAdmin.fromAmino(object.value); + fromAminoMsg(object: MsgUpdateContractLabelAminoMsg): MsgUpdateContractLabel { + return MsgUpdateContractLabel.fromAmino(object.value); }, - toAminoMsg(message: MsgClearAdmin): MsgClearAdminAminoMsg { + toAminoMsg(message: MsgUpdateContractLabel): MsgUpdateContractLabelAminoMsg { return { - type: "wasm/MsgClearAdmin", - value: MsgClearAdmin.toAmino(message) + type: "wasm/MsgUpdateContractLabel", + value: MsgUpdateContractLabel.toAmino(message) }; }, - fromProtoMsg(message: MsgClearAdminProtoMsg): MsgClearAdmin { - return MsgClearAdmin.decode(message.value); + fromProtoMsg(message: MsgUpdateContractLabelProtoMsg): MsgUpdateContractLabel { + return MsgUpdateContractLabel.decode(message.value); }, - toProto(message: MsgClearAdmin): Uint8Array { - return MsgClearAdmin.encode(message).finish(); + toProto(message: MsgUpdateContractLabel): Uint8Array { + return MsgUpdateContractLabel.encode(message).finish(); }, - toProtoMsg(message: MsgClearAdmin): MsgClearAdminProtoMsg { + toProtoMsg(message: MsgUpdateContractLabel): MsgUpdateContractLabelProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", - value: MsgClearAdmin.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", + value: MsgUpdateContractLabel.encode(message).finish() }; } }; -function createBaseMsgClearAdminResponse(): MsgClearAdminResponse { +function createBaseMsgUpdateContractLabelResponse(): MsgUpdateContractLabelResponse { return {}; } -export const MsgClearAdminResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", - encode(_: MsgClearAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { +export const MsgUpdateContractLabelResponse = { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", + encode(_: MsgUpdateContractLabelResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgClearAdminResponse { + decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateContractLabelResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgClearAdminResponse(); + const message = createBaseMsgUpdateContractLabelResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1614,36 +4057,36 @@ export const MsgClearAdminResponse = { } return message; }, - fromPartial(_: Partial): MsgClearAdminResponse { - const message = createBaseMsgClearAdminResponse(); + fromPartial(_: Partial): MsgUpdateContractLabelResponse { + const message = createBaseMsgUpdateContractLabelResponse(); return message; }, - fromAmino(_: MsgClearAdminResponseAmino): MsgClearAdminResponse { + fromAmino(_: MsgUpdateContractLabelResponseAmino): MsgUpdateContractLabelResponse { return {}; }, - toAmino(_: MsgClearAdminResponse): MsgClearAdminResponseAmino { + toAmino(_: MsgUpdateContractLabelResponse): MsgUpdateContractLabelResponseAmino { const obj: any = {}; return obj; }, - fromAminoMsg(object: MsgClearAdminResponseAminoMsg): MsgClearAdminResponse { - return MsgClearAdminResponse.fromAmino(object.value); + fromAminoMsg(object: MsgUpdateContractLabelResponseAminoMsg): MsgUpdateContractLabelResponse { + return MsgUpdateContractLabelResponse.fromAmino(object.value); }, - toAminoMsg(message: MsgClearAdminResponse): MsgClearAdminResponseAminoMsg { + toAminoMsg(message: MsgUpdateContractLabelResponse): MsgUpdateContractLabelResponseAminoMsg { return { - type: "wasm/MsgClearAdminResponse", - value: MsgClearAdminResponse.toAmino(message) + type: "wasm/MsgUpdateContractLabelResponse", + value: MsgUpdateContractLabelResponse.toAmino(message) }; }, - fromProtoMsg(message: MsgClearAdminResponseProtoMsg): MsgClearAdminResponse { - return MsgClearAdminResponse.decode(message.value); + fromProtoMsg(message: MsgUpdateContractLabelResponseProtoMsg): MsgUpdateContractLabelResponse { + return MsgUpdateContractLabelResponse.decode(message.value); }, - toProto(message: MsgClearAdminResponse): Uint8Array { - return MsgClearAdminResponse.encode(message).finish(); + toProto(message: MsgUpdateContractLabelResponse): Uint8Array { + return MsgUpdateContractLabelResponse.encode(message).finish(); }, - toProtoMsg(message: MsgClearAdminResponse): MsgClearAdminResponseProtoMsg { + toProtoMsg(message: MsgUpdateContractLabelResponse): MsgUpdateContractLabelResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", - value: MsgClearAdminResponse.encode(message).finish() + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", + value: MsgUpdateContractLabelResponse.encode(message).finish() }; } }; \ No newline at end of file diff --git a/packages/protobuf/codegen/cosmwasm/wasm/v1/types.ts b/packages/protobuf/codegen/cosmwasm/wasm/v1/types.ts index 32cc0b279..ebf0a9bff 100644 --- a/packages/protobuf/codegen/cosmwasm/wasm/v1/types.ts +++ b/packages/protobuf/codegen/cosmwasm/wasm/v1/types.ts @@ -8,11 +8,6 @@ export enum AccessType { ACCESS_TYPE_UNSPECIFIED = 0, /** ACCESS_TYPE_NOBODY - AccessTypeNobody forbidden */ ACCESS_TYPE_NOBODY = 1, - /** - * ACCESS_TYPE_ONLY_ADDRESS - AccessTypeOnlyAddress restricted to a single address - * Deprecated: use AccessTypeAnyOfAddresses instead - */ - ACCESS_TYPE_ONLY_ADDRESS = 2, /** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */ ACCESS_TYPE_EVERYBODY = 3, /** ACCESS_TYPE_ANY_OF_ADDRESSES - AccessTypeAnyOfAddresses allow any of the addresses */ @@ -29,9 +24,6 @@ export function accessTypeFromJSON(object: any): AccessType { case 1: case "ACCESS_TYPE_NOBODY": return AccessType.ACCESS_TYPE_NOBODY; - case 2: - case "ACCESS_TYPE_ONLY_ADDRESS": - return AccessType.ACCESS_TYPE_ONLY_ADDRESS; case 3: case "ACCESS_TYPE_EVERYBODY": return AccessType.ACCESS_TYPE_EVERYBODY; @@ -50,8 +42,6 @@ export function accessTypeToJSON(object: AccessType): string { return "ACCESS_TYPE_UNSPECIFIED"; case AccessType.ACCESS_TYPE_NOBODY: return "ACCESS_TYPE_NOBODY"; - case AccessType.ACCESS_TYPE_ONLY_ADDRESS: - return "ACCESS_TYPE_ONLY_ADDRESS"; case AccessType.ACCESS_TYPE_EVERYBODY: return "ACCESS_TYPE_EVERYBODY"; case AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES: @@ -133,11 +123,6 @@ export interface AccessTypeParamSDKType { /** AccessConfig access control type. */ export interface AccessConfig { permission: AccessType; - /** - * Address - * Deprecated: replaced by addresses - */ - address: string; addresses: string[]; } export interface AccessConfigProtoMsg { @@ -147,11 +132,6 @@ export interface AccessConfigProtoMsg { /** AccessConfig access control type. */ export interface AccessConfigAmino { permission: AccessType; - /** - * Address - * Deprecated: replaced by addresses - */ - address: string; addresses: string[]; } export interface AccessConfigAminoMsg { @@ -161,7 +141,6 @@ export interface AccessConfigAminoMsg { /** AccessConfig access control type. */ export interface AccessConfigSDKType { permission: AccessType; - address: string; addresses: string[]; } /** Params defines the set of wasm parameters. */ @@ -454,7 +433,6 @@ export const AccessTypeParam = { function createBaseAccessConfig(): AccessConfig { return { permission: 0, - address: "", addresses: [] }; } @@ -464,9 +442,6 @@ export const AccessConfig = { if (message.permission !== 0) { writer.uint32(8).int32(message.permission); } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } for (const v of message.addresses) { writer.uint32(26).string(v!); } @@ -482,9 +457,6 @@ export const AccessConfig = { case 1: message.permission = (reader.int32() as any); break; - case 2: - message.address = reader.string(); - break; case 3: message.addresses.push(reader.string()); break; @@ -498,21 +470,18 @@ export const AccessConfig = { fromPartial(object: Partial): AccessConfig { const message = createBaseAccessConfig(); message.permission = object.permission ?? 0; - message.address = object.address ?? ""; message.addresses = object.addresses?.map(e => e) || []; return message; }, fromAmino(object: AccessConfigAmino): AccessConfig { return { permission: isSet(object.permission) ? accessTypeFromJSON(object.permission) : -1, - address: object.address, addresses: Array.isArray(object?.addresses) ? object.addresses.map((e: any) => e) : [] }; }, toAmino(message: AccessConfig): AccessConfigAmino { const obj: any = {}; obj.permission = message.permission; - obj.address = message.address; if (message.addresses) { obj.addresses = message.addresses.map(e => e); } else { @@ -769,7 +738,7 @@ export const ContractInfo = { message.ibcPortId = reader.string(); break; case 7: - message.extension = (ContractInfoExtension_InterfaceDecoder(reader) as Any); + message.extension = (Cosmwasm_wasmv1ContractInfoExtension_InterfaceDecoder(reader) as Any); break; default: reader.skipType(tag & 7); @@ -797,7 +766,7 @@ export const ContractInfo = { label: object.label, created: object?.created ? AbsoluteTxPosition.fromAmino(object.created) : undefined, ibcPortId: object.ibc_port_id, - extension: object?.extension ? ContractInfoExtension_FromAmino(object.extension) : undefined + extension: object?.extension ? Cosmwasm_wasmv1ContractInfoExtension_FromAmino(object.extension) : undefined }; }, toAmino(message: ContractInfo): ContractInfoAmino { @@ -808,7 +777,7 @@ export const ContractInfo = { obj.label = message.label; obj.created = message.created ? AbsoluteTxPosition.toAmino(message.created) : undefined; obj.ibc_port_id = message.ibcPortId; - obj.extension = message.extension ? ContractInfoExtension_ToAmino((message.extension as Any)) : undefined; + obj.extension = message.extension ? Cosmwasm_wasmv1ContractInfoExtension_ToAmino((message.extension as Any)) : undefined; return obj; }, fromAminoMsg(object: ContractInfoAminoMsg): ContractInfo { @@ -1084,7 +1053,7 @@ export const Model = { }; } }; -export const ContractInfoExtension_InterfaceDecoder = (input: BinaryReader | Uint8Array): Any => { +export const Cosmwasm_wasmv1ContractInfoExtension_InterfaceDecoder = (input: BinaryReader | Uint8Array): Any => { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const data = Any.decode(reader, reader.uint32()); switch (data.typeUrl) { @@ -1092,9 +1061,9 @@ export const ContractInfoExtension_InterfaceDecoder = (input: BinaryReader | Uin return data; } }; -export const ContractInfoExtension_FromAmino = (content: AnyAmino) => { +export const Cosmwasm_wasmv1ContractInfoExtension_FromAmino = (content: AnyAmino) => { return Any.fromAmino(content); }; -export const ContractInfoExtension_ToAmino = (content: Any) => { +export const Cosmwasm_wasmv1ContractInfoExtension_ToAmino = (content: Any) => { return Any.toAmino(content); }; \ No newline at end of file diff --git a/packages/protobuf/proto/cosmwasm/wasm/v1/authz.proto b/packages/protobuf/proto/cosmwasm/wasm/v1/authz.proto index 6d6260c22..151ccc04c 100644 --- a/packages/protobuf/proto/cosmwasm/wasm/v1/authz.proto +++ b/packages/protobuf/proto/cosmwasm/wasm/v1/authz.proto @@ -4,51 +4,86 @@ package cosmwasm.wasm.v1; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmwasm/wasm/v1/types.proto"; import "google/protobuf/any.proto"; +import "amino/amino.proto"; option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; option (gogoproto.goproto_getters_all) = false; +// StoreCodeAuthorization defines authorization for wasm code upload. +// Since: wasmd 0.42 +message StoreCodeAuthorization { + option (amino.name) = "wasm/StoreCodeAuthorization"; + option (cosmos_proto.implements_interface) = + "cosmos.authz.v1beta1.Authorization"; + + // Grants for code upload + repeated CodeGrant grants = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + // ContractExecutionAuthorization defines authorization for wasm execute. // Since: wasmd 0.30 message ContractExecutionAuthorization { - option (cosmos_proto.implements_interface) = "cosmos.authz.Authorization"; + option (amino.name) = "wasm/ContractExecutionAuthorization"; + option (cosmos_proto.implements_interface) = + "cosmos.authz.v1beta1.Authorization"; // Grants for contract executions - repeated ContractGrant grants = 1 [ (gogoproto.nullable) = false ]; + repeated ContractGrant grants = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // ContractMigrationAuthorization defines authorization for wasm contract // migration. Since: wasmd 0.30 message ContractMigrationAuthorization { - option (cosmos_proto.implements_interface) = "cosmos.authz.Authorization"; + option (amino.name) = "wasm/ContractMigrationAuthorization"; + option (cosmos_proto.implements_interface) = + "cosmos.authz.v1beta1.Authorization"; // Grants for contract migrations - repeated ContractGrant grants = 1 [ (gogoproto.nullable) = false ]; + repeated ContractGrant grants = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// CodeGrant a granted permission for a single code +message CodeGrant { + // CodeHash is the unique identifier created by wasmvm + // Wildcard "*" is used to specify any kind of grant. + bytes code_hash = 1; + + // InstantiatePermission is the superset access control to apply + // on contract creation. + // Optional + AccessConfig instantiate_permission = 2; } // ContractGrant a granted permission for a single contract // Since: wasmd 0.30 message ContractGrant { // Contract is the bech32 address of the smart contract - string contract = 1; + string contract = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Limit defines execution limits that are enforced and updated when the grant // is applied. When the limit lapsed the grant is removed. - google.protobuf.Any limit = 2 - [ (cosmos_proto.accepts_interface) = "ContractAuthzLimitX" ]; + google.protobuf.Any limit = 2 [ (cosmos_proto.accepts_interface) = + "cosmwasm.wasm.v1.ContractAuthzLimitX" ]; // Filter define more fine-grained control on the message payload passed // to the contract in the operation. When no filter applies on execution, the // operation is prohibited. google.protobuf.Any filter = 3 - [ (cosmos_proto.accepts_interface) = "ContractAuthzFilterX" ]; + [ (cosmos_proto.accepts_interface) = + "cosmwasm.wasm.v1.ContractAuthzFilterX" ]; } // MaxCallsLimit limited number of calls to the contract. No funds transferable. // Since: wasmd 0.30 message MaxCallsLimit { - option (cosmos_proto.implements_interface) = "ContractAuthzLimitX"; + option (amino.name) = "wasm/MaxCallsLimit"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzLimitX"; // Remaining number that is decremented on each execution uint64 remaining = 1; @@ -57,11 +92,14 @@ message MaxCallsLimit { // MaxFundsLimit defines the maximal amounts that can be sent to the contract. // Since: wasmd 0.30 message MaxFundsLimit { - option (cosmos_proto.implements_interface) = "ContractAuthzLimitX"; + option (amino.name) = "wasm/MaxFundsLimit"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzLimitX"; // Amounts is the maximal amount of tokens transferable to the contract. repeated cosmos.base.v1beta1.Coin amounts = 1 [ (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } @@ -70,13 +108,16 @@ message MaxFundsLimit { // the maximal number of calls executable. Both need to remain >0 to be valid. // Since: wasmd 0.30 message CombinedLimit { - option (cosmos_proto.implements_interface) = "ContractAuthzLimitX"; + option (amino.name) = "wasm/CombinedLimit"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzLimitX"; // Remaining number that is decremented on each execution uint64 calls_remaining = 1; // Amounts is the maximal amount of tokens transferable to the contract. repeated cosmos.base.v1beta1.Coin amounts = 2 [ (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } @@ -85,14 +126,18 @@ message CombinedLimit { // message. // Since: wasmd 0.30 message AllowAllMessagesFilter { - option (cosmos_proto.implements_interface) = "ContractAuthzFilterX"; + option (amino.name) = "wasm/AllowAllMessagesFilter"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzFilterX"; } // AcceptedMessageKeysFilter accept only the specific contract message keys in // the json object to be executed. // Since: wasmd 0.30 message AcceptedMessageKeysFilter { - option (cosmos_proto.implements_interface) = "ContractAuthzFilterX"; + option (amino.name) = "wasm/AcceptedMessageKeysFilter"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzFilterX"; // Messages is the list of unique keys repeated string keys = 1; @@ -102,7 +147,9 @@ message AcceptedMessageKeysFilter { // executed. // Since: wasmd 0.30 message AcceptedMessagesFilter { - option (cosmos_proto.implements_interface) = "ContractAuthzFilterX"; + option (amino.name) = "wasm/AcceptedMessagesFilter"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzFilterX"; // Messages is the list of raw contract messages repeated bytes messages = 1 [ (gogoproto.casttype) = "RawContractMessage" ]; diff --git a/packages/protobuf/proto/cosmwasm/wasm/v1/genesis.proto b/packages/protobuf/proto/cosmwasm/wasm/v1/genesis.proto index 4e728ff4b..9082c8b8b 100644 --- a/packages/protobuf/proto/cosmwasm/wasm/v1/genesis.proto +++ b/packages/protobuf/proto/cosmwasm/wasm/v1/genesis.proto @@ -3,20 +3,28 @@ package cosmwasm.wasm.v1; import "gogoproto/gogo.proto"; import "cosmwasm/wasm/v1/types.proto"; +import "amino/amino.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; // GenesisState - genesis state of x/wasm message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - repeated Code codes = 2 - [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "codes,omitempty" ]; + Params params = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + repeated Code codes = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.jsontag) = "codes,omitempty" + ]; repeated Contract contracts = 3 [ (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.jsontag) = "contracts,omitempty" ]; repeated Sequence sequences = 4 [ (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.jsontag) = "sequences,omitempty" ]; } @@ -24,7 +32,8 @@ message GenesisState { // Code struct encompasses CodeInfo and CodeBytes message Code { uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; - CodeInfo code_info = 2 [ (gogoproto.nullable) = false ]; + CodeInfo code_info = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; bytes code_bytes = 3; // Pinned to wasmvm cache bool pinned = 4; @@ -32,11 +41,14 @@ message Code { // Contract struct encompasses ContractAddress, ContractInfo, and ContractState message Contract { - string contract_address = 1; - ContractInfo contract_info = 2 [ (gogoproto.nullable) = false ]; - repeated Model contract_state = 3 [ (gogoproto.nullable) = false ]; + string contract_address = 1 + [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + ContractInfo contract_info = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + repeated Model contract_state = 3 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; repeated ContractCodeHistoryEntry contract_code_history = 4 - [ (gogoproto.nullable) = false ]; + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // Sequence key and value of an id generation counter diff --git a/packages/protobuf/proto/cosmwasm/wasm/v1/ibc.proto b/packages/protobuf/proto/cosmwasm/wasm/v1/ibc.proto index d880a7078..feaad2936 100644 --- a/packages/protobuf/proto/cosmwasm/wasm/v1/ibc.proto +++ b/packages/protobuf/proto/cosmwasm/wasm/v1/ibc.proto @@ -25,6 +25,12 @@ message MsgIBCSend { bytes data = 6; } +// MsgIBCSendResponse +message MsgIBCSendResponse { + // Sequence number of the IBC packet sent + uint64 sequence = 1; +} + // MsgIBCCloseChannel port and channel need to be owned by the contract message MsgIBCCloseChannel { string channel = 2 [ (gogoproto.moretags) = "yaml:\"source_channel\"" ]; diff --git a/packages/protobuf/proto/cosmwasm/wasm/v1/query.proto b/packages/protobuf/proto/cosmwasm/wasm/v1/query.proto index ffe48d242..16840585a 100644 --- a/packages/protobuf/proto/cosmwasm/wasm/v1/query.proto +++ b/packages/protobuf/proto/cosmwasm/wasm/v1/query.proto @@ -5,6 +5,8 @@ import "gogoproto/gogo.proto"; import "cosmwasm/wasm/v1/types.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; +import "amino/amino.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; option (gogoproto.goproto_getters_all) = false; @@ -76,7 +78,7 @@ service Query { // method message QueryContractInfoRequest { // address is the address of the contract to query - string address = 1; + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } // QueryContractInfoResponse is the response type for the Query/ContractInfo RPC // method @@ -84,10 +86,11 @@ message QueryContractInfoResponse { option (gogoproto.equal) = true; // address is the address of the contract - string address = 1; + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; ContractInfo contract_info = 2 [ (gogoproto.embed) = true, (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.jsontag) = "" ]; } @@ -96,7 +99,7 @@ message QueryContractInfoResponse { // RPC method message QueryContractHistoryRequest { // address is the address of the contract to query - string address = 1; + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } @@ -105,7 +108,7 @@ message QueryContractHistoryRequest { // Query/ContractHistory RPC method message QueryContractHistoryResponse { repeated ContractCodeHistoryEntry entries = 1 - [ (gogoproto.nullable) = false ]; + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -122,7 +125,8 @@ message QueryContractsByCodeRequest { // Query/ContractsByCode RPC method message QueryContractsByCodeResponse { // contracts are a set of contract addresses - repeated string contracts = 1; + repeated string contracts = 1 + [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; @@ -132,7 +136,7 @@ message QueryContractsByCodeResponse { // Query/AllContractState RPC method message QueryAllContractStateRequest { // address is the address of the contract - string address = 1; + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } @@ -140,7 +144,8 @@ message QueryAllContractStateRequest { // QueryAllContractStateResponse is the response type for the // Query/AllContractState RPC method message QueryAllContractStateResponse { - repeated Model models = 1 [ (gogoproto.nullable) = false ]; + repeated Model models = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -149,7 +154,7 @@ message QueryAllContractStateResponse { // Query/RawContractState RPC method message QueryRawContractStateRequest { // address is the address of the contract - string address = 1; + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; bytes query_data = 2; } @@ -164,7 +169,7 @@ message QueryRawContractStateResponse { // Query/SmartContractState RPC method message QuerySmartContractStateRequest { // address is the address of the contract - string address = 1; + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // QueryData contains the query data passed to the contract bytes query_data = 2 [ (gogoproto.casttype) = "RawContractMessage" ]; } @@ -189,13 +194,14 @@ message CodeInfoResponse { (gogoproto.customname) = "CodeID", (gogoproto.jsontag) = "id" ]; // id for legacy support - string creator = 2; + string creator = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; bytes data_hash = 3 [ (gogoproto.casttype) = - "github.com/tendermint/tendermint/libs/bytes.HexBytes" ]; + "github.com/cometbft/cometbft/libs/bytes.HexBytes" ]; // Used in v1beta1 reserved 4, 5; - AccessConfig instantiate_permission = 6 [ (gogoproto.nullable) = false ]; + AccessConfig instantiate_permission = 6 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // QueryCodeResponse is the response type for the Query/Code RPC method @@ -214,7 +220,8 @@ message QueryCodesRequest { // QueryCodesResponse is the response type for the Query/Codes RPC method message QueryCodesResponse { - repeated CodeInfoResponse code_infos = 1 [ (gogoproto.nullable) = false ]; + repeated CodeInfoResponse code_infos = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -229,8 +236,7 @@ message QueryPinnedCodesRequest { // QueryPinnedCodesResponse is the response type for the // Query/PinnedCodes RPC method message QueryPinnedCodesResponse { - repeated uint64 code_ids = 1 - [ (gogoproto.nullable) = false, (gogoproto.customname) = "CodeIDs" ]; + repeated uint64 code_ids = 1 [ (gogoproto.customname) = "CodeIDs" ]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -241,14 +247,15 @@ message QueryParamsRequest {} // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; + Params params = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // QueryContractsByCreatorRequest is the request type for the // Query/ContractsByCreator RPC method. message QueryContractsByCreatorRequest { // CreatorAddress is the address of contract creator - string creator_address = 1; + string creator_address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } @@ -257,7 +264,8 @@ message QueryContractsByCreatorRequest { // Query/ContractsByCreator RPC method. message QueryContractsByCreatorResponse { // ContractAddresses result set - repeated string contract_addresses = 1; + repeated string contract_addresses = 1 + [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } \ No newline at end of file diff --git a/packages/protobuf/proto/cosmwasm/wasm/v1/tx.proto b/packages/protobuf/proto/cosmwasm/wasm/v1/tx.proto index 04acc8ef7..887f3ccfb 100644 --- a/packages/protobuf/proto/cosmwasm/wasm/v1/tx.proto +++ b/packages/protobuf/proto/cosmwasm/wasm/v1/tx.proto @@ -2,14 +2,19 @@ syntax = "proto3"; package cosmwasm.wasm.v1; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; import "gogoproto/gogo.proto"; import "cosmwasm/wasm/v1/types.proto"; +import "cosmos_proto/cosmos.proto"; +import "amino/amino.proto"; option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; option (gogoproto.goproto_getters_all) = false; // Msg defines the wasm Msg service. service Msg { + option (cosmos.msg.v1.service) = true; + // StoreCode to submit Wasm code to the system rpc StoreCode(MsgStoreCode) returns (MsgStoreCodeResponse); // InstantiateContract creates a new smart contract instance for the given @@ -24,16 +29,69 @@ service Msg { rpc ExecuteContract(MsgExecuteContract) returns (MsgExecuteContractResponse); // Migrate runs a code upgrade/ downgrade for a smart contract rpc MigrateContract(MsgMigrateContract) returns (MsgMigrateContractResponse); - // UpdateAdmin sets a new admin for a smart contract + // UpdateAdmin sets a new admin for a smart contract rpc UpdateAdmin(MsgUpdateAdmin) returns (MsgUpdateAdminResponse); // ClearAdmin removes any admin stored for a smart contract rpc ClearAdmin(MsgClearAdmin) returns (MsgClearAdminResponse); + // UpdateInstantiateConfig updates instantiate config for a smart contract + rpc UpdateInstantiateConfig(MsgUpdateInstantiateConfig) + returns (MsgUpdateInstantiateConfigResponse); + // UpdateParams defines a governance operation for updating the x/wasm + // module parameters. The authority is defined in the keeper. + // + // Since: 0.40 + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + // SudoContract defines a governance operation for calling sudo + // on a contract. The authority is defined in the keeper. + // + // Since: 0.40 + rpc SudoContract(MsgSudoContract) returns (MsgSudoContractResponse); + // PinCodes defines a governance operation for pinning a set of + // code ids in the wasmvm cache. The authority is defined in the keeper. + // + // Since: 0.40 + rpc PinCodes(MsgPinCodes) returns (MsgPinCodesResponse); + // UnpinCodes defines a governance operation for unpinning a set of + // code ids in the wasmvm cache. The authority is defined in the keeper. + // + // Since: 0.40 + rpc UnpinCodes(MsgUnpinCodes) returns (MsgUnpinCodesResponse); + // StoreAndInstantiateContract defines a governance operation for storing + // and instantiating the contract. The authority is defined in the keeper. + // + // Since: 0.40 + rpc StoreAndInstantiateContract(MsgStoreAndInstantiateContract) + returns (MsgStoreAndInstantiateContractResponse); + // RemoveCodeUploadParamsAddresses defines a governance operation for + // removing addresses from code upload params. + // The authority is defined in the keeper. + rpc RemoveCodeUploadParamsAddresses(MsgRemoveCodeUploadParamsAddresses) + returns (MsgRemoveCodeUploadParamsAddressesResponse); + // AddCodeUploadParamsAddresses defines a governance operation for + // adding addresses to code upload params. + // The authority is defined in the keeper. + rpc AddCodeUploadParamsAddresses(MsgAddCodeUploadParamsAddresses) + returns (MsgAddCodeUploadParamsAddressesResponse); + // StoreAndMigrateContract defines a governance operation for storing + // and migrating the contract. The authority is defined in the keeper. + // + // Since: 0.42 + rpc StoreAndMigrateContract(MsgStoreAndMigrateContract) + returns (MsgStoreAndMigrateContractResponse); + // UpdateContractLabel sets a new label for a smart contract + // + // Since: 0.43 + rpc UpdateContractLabel(MsgUpdateContractLabel) + returns (MsgUpdateContractLabelResponse); } // MsgStoreCode submit Wasm code to the system message MsgStoreCode { - // Sender is the that actor that signed the messages - string sender = 1; + option (amino.name) = "wasm/MsgStoreCode"; + option (cosmos.msg.v1.signer) = "sender"; + + // Sender is the actor that signed the messages + string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // WASMByteCode can be raw or gzip compressed bytes wasm_byte_code = 2 [ (gogoproto.customname) = "WASMByteCode" ]; // Used in v1beta1 @@ -53,10 +111,13 @@ message MsgStoreCodeResponse { // MsgInstantiateContract create a new smart contract instance for the given // code id. message MsgInstantiateContract { + option (amino.name) = "wasm/MsgInstantiateContract"; + option (cosmos.msg.v1.signer) = "sender"; + // Sender is the that actor that signed the messages - string sender = 1; + string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Admin is an optional address that can execute migrations - string admin = 2; + string admin = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // CodeID is the reference to the stored WASM code uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ]; // Label is optional metadata to be stored with a contract instance. @@ -66,17 +127,29 @@ message MsgInstantiateContract { // Funds coins that are transferred to the contract on instantiation repeated cosmos.base.v1beta1.Coin funds = 6 [ (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } +// MsgInstantiateContractResponse return instantiation result data +message MsgInstantiateContractResponse { + // Address is the bech32 address of the new contract instance. + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Data contains bytes to returned from the contract + bytes data = 2; +} + // MsgInstantiateContract2 create a new smart contract instance for the given // code id with a predicable address. message MsgInstantiateContract2 { + option (amino.name) = "wasm/MsgInstantiateContract2"; + option (cosmos.msg.v1.signer) = "sender"; + // Sender is the that actor that signed the messages - string sender = 1; + string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Admin is an optional address that can execute migrations - string admin = 2; + string admin = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // CodeID is the reference to the stored WASM code uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ]; // Label is optional metadata to be stored with a contract instance. @@ -86,6 +159,7 @@ message MsgInstantiateContract2 { // Funds coins that are transferred to the contract on instantiation repeated cosmos.base.v1beta1.Coin funds = 6 [ (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // Salt is an arbitrary value provided by the sender. Size can be 1 to 64. @@ -95,33 +169,29 @@ message MsgInstantiateContract2 { bool fix_msg = 8; } -// MsgInstantiateContractResponse return instantiation result data -message MsgInstantiateContractResponse { - // Address is the bech32 address of the new contract instance. - string address = 1; - // Data contains bytes to returned from the contract - bytes data = 2; -} - // MsgInstantiateContract2Response return instantiation result data message MsgInstantiateContract2Response { // Address is the bech32 address of the new contract instance. - string address = 1; + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Data contains bytes to returned from the contract bytes data = 2; } // MsgExecuteContract submits the given message data to a smart contract message MsgExecuteContract { + option (amino.name) = "wasm/MsgExecuteContract"; + option (cosmos.msg.v1.signer) = "sender"; + // Sender is the that actor that signed the messages - string sender = 1; + string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Contract is the address of the smart contract - string contract = 2; + string contract = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Msg json encoded message to be passed to the contract bytes msg = 3 [ (gogoproto.casttype) = "RawContractMessage" ]; // Funds coins that are transferred to the contract on execution repeated cosmos.base.v1beta1.Coin funds = 5 [ (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } @@ -134,10 +204,13 @@ message MsgExecuteContractResponse { // MsgMigrateContract runs a code upgrade/ downgrade for a smart contract message MsgMigrateContract { + option (amino.name) = "wasm/MsgMigrateContract"; + option (cosmos.msg.v1.signer) = "sender"; + // Sender is the that actor that signed the messages - string sender = 1; + string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Contract is the address of the smart contract - string contract = 2; + string contract = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // CodeID references the new WASM code uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ]; // Msg json encoded message to be passed to the contract on migration @@ -153,12 +226,15 @@ message MsgMigrateContractResponse { // MsgUpdateAdmin sets a new admin for a smart contract message MsgUpdateAdmin { + option (amino.name) = "wasm/MsgUpdateAdmin"; + option (cosmos.msg.v1.signer) = "sender"; + // Sender is the that actor that signed the messages - string sender = 1; + string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // NewAdmin address to be set - string new_admin = 2; + string new_admin = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Contract is the address of the smart contract - string contract = 3; + string contract = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } // MsgUpdateAdminResponse returns empty data @@ -166,11 +242,265 @@ message MsgUpdateAdminResponse {} // MsgClearAdmin removes any admin stored for a smart contract message MsgClearAdmin { - // Sender is the that actor that signed the messages - string sender = 1; + option (amino.name) = "wasm/MsgClearAdmin"; + option (cosmos.msg.v1.signer) = "sender"; + + // Sender is the actor that signed the messages + string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Contract is the address of the smart contract - string contract = 3; + string contract = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } // MsgClearAdminResponse returns empty data message MsgClearAdminResponse {} + +// AccessConfigUpdate contains the code id and the access config to be +// applied. +message AccessConfigUpdate { + // CodeID is the reference to the stored WASM code to be updated + uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; + // InstantiatePermission to apply to the set of code ids + AccessConfig instantiate_permission = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// MsgUpdateInstantiateConfig updates instantiate config for a smart contract +message MsgUpdateInstantiateConfig { + option (amino.name) = "wasm/MsgUpdateInstantiateConfig"; + option (cosmos.msg.v1.signer) = "sender"; + + // Sender is the that actor that signed the messages + string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // CodeID references the stored WASM code + uint64 code_id = 2 [ (gogoproto.customname) = "CodeID" ]; + // NewInstantiatePermission is the new access control + AccessConfig new_instantiate_permission = 3; +} + +// MsgUpdateInstantiateConfigResponse returns empty data +message MsgUpdateInstantiateConfigResponse {} + +// MsgUpdateParams is the MsgUpdateParams request type. +// +// Since: 0.40 +message MsgUpdateParams { + option (amino.name) = "wasm/MsgUpdateParams"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // params defines the x/wasm parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: 0.40 +message MsgUpdateParamsResponse {} + +// MsgSudoContract is the MsgSudoContract request type. +// +// Since: 0.40 +message MsgSudoContract { + option (amino.name) = "wasm/MsgSudoContract"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // Contract is the address of the smart contract + string contract = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Msg json encoded message to be passed to the contract as sudo + bytes msg = 3 [ (gogoproto.casttype) = "RawContractMessage" ]; +} + +// MsgSudoContractResponse defines the response structure for executing a +// MsgSudoContract message. +// +// Since: 0.40 +message MsgSudoContractResponse { + // Data contains bytes to returned from the contract + bytes data = 1; +} + +// MsgPinCodes is the MsgPinCodes request type. +// +// Since: 0.40 +message MsgPinCodes { + option (amino.name) = "wasm/MsgPinCodes"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // CodeIDs references the new WASM codes + repeated uint64 code_ids = 2 [ + (gogoproto.customname) = "CodeIDs", + (gogoproto.moretags) = "yaml:\"code_ids\"" + ]; +} + +// MsgPinCodesResponse defines the response structure for executing a +// MsgPinCodes message. +// +// Since: 0.40 +message MsgPinCodesResponse {} + +// MsgUnpinCodes is the MsgUnpinCodes request type. +// +// Since: 0.40 +message MsgUnpinCodes { + option (amino.name) = "wasm/MsgUnpinCodes"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // CodeIDs references the WASM codes + repeated uint64 code_ids = 2 [ + (gogoproto.customname) = "CodeIDs", + (gogoproto.moretags) = "yaml:\"code_ids\"" + ]; +} + +// MsgUnpinCodesResponse defines the response structure for executing a +// MsgUnpinCodes message. +// +// Since: 0.40 +message MsgUnpinCodesResponse {} + +// MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract +// request type. +// +// Since: 0.40 +message MsgStoreAndInstantiateContract { + option (amino.name) = "wasm/MsgStoreAndInstantiateContract"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // WASMByteCode can be raw or gzip compressed + bytes wasm_byte_code = 3 [ (gogoproto.customname) = "WASMByteCode" ]; + // InstantiatePermission to apply on contract creation, optional + AccessConfig instantiate_permission = 4; + // UnpinCode code on upload, optional. As default the uploaded contract is + // pinned to cache. + bool unpin_code = 5; + // Admin is an optional address that can execute migrations + string admin = 6 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Label is optional metadata to be stored with a constract instance. + string label = 7; + // Msg json encoded message to be passed to the contract on instantiation + bytes msg = 8 [ (gogoproto.casttype) = "RawContractMessage" ]; + // Funds coins that are transferred from the authority account to the contract + // on instantiation + repeated cosmos.base.v1beta1.Coin funds = 9 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // Source is the URL where the code is hosted + string source = 10; + // Builder is the docker image used to build the code deterministically, used + // for smart contract verification + string builder = 11; + // CodeHash is the SHA256 sum of the code outputted by builder, used for smart + // contract verification + bytes code_hash = 12; +} + +// MsgStoreAndInstantiateContractResponse defines the response structure +// for executing a MsgStoreAndInstantiateContract message. +// +// Since: 0.40 +message MsgStoreAndInstantiateContractResponse { + // Address is the bech32 address of the new contract instance. + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // Data contains bytes to returned from the contract + bytes data = 2; +} + +// MsgAddCodeUploadParamsAddresses is the +// MsgAddCodeUploadParamsAddresses request type. +message MsgAddCodeUploadParamsAddresses { + option (amino.name) = "wasm/MsgAddCodeUploadParamsAddresses"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + repeated string addresses = 2 [ (gogoproto.moretags) = "yaml:\"addresses\"" ]; +} + +// MsgAddCodeUploadParamsAddressesResponse defines the response +// structure for executing a MsgAddCodeUploadParamsAddresses message. +message MsgAddCodeUploadParamsAddressesResponse {} + +// MsgRemoveCodeUploadParamsAddresses is the +// MsgRemoveCodeUploadParamsAddresses request type. +message MsgRemoveCodeUploadParamsAddresses { + option (amino.name) = "wasm/MsgRemoveCodeUploadParamsAddresses"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + repeated string addresses = 2 [ (gogoproto.moretags) = "yaml:\"addresses\"" ]; +} + +// MsgRemoveCodeUploadParamsAddressesResponse defines the response +// structure for executing a MsgRemoveCodeUploadParamsAddresses message. +message MsgRemoveCodeUploadParamsAddressesResponse {} + +// MsgStoreAndMigrateContract is the MsgStoreAndMigrateContract +// request type. +// +// Since: 0.42 +message MsgStoreAndMigrateContract { + option (amino.name) = "wasm/MsgStoreAndMigrateContract"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // WASMByteCode can be raw or gzip compressed + bytes wasm_byte_code = 2 [ (gogoproto.customname) = "WASMByteCode" ]; + // InstantiatePermission to apply on contract creation, optional + AccessConfig instantiate_permission = 3; + // Contract is the address of the smart contract + string contract = 4; + // Msg json encoded message to be passed to the contract on migration + bytes msg = 5 [ (gogoproto.casttype) = "RawContractMessage" ]; +} + +// MsgStoreAndMigrateContractResponse defines the response structure +// for executing a MsgStoreAndMigrateContract message. +// +// Since: 0.42 +message MsgStoreAndMigrateContractResponse { + // CodeID is the reference to the stored WASM code + uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; + // Checksum is the sha256 hash of the stored code + bytes checksum = 2; + // Data contains bytes to returned from the contract + bytes data = 3; +} + +// MsgUpdateContractLabel sets a new label for a smart contract +message MsgUpdateContractLabel { + option (amino.name) = "wasm/MsgUpdateContractLabel"; + option (cosmos.msg.v1.signer) = "sender"; + + // Sender is the that actor that signed the messages + string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // NewLabel string to be set + string new_label = 2; + // Contract is the address of the smart contract + string contract = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// MsgUpdateContractLabelResponse returns empty data +message MsgUpdateContractLabelResponse {} \ No newline at end of file diff --git a/packages/protobuf/proto/cosmwasm/wasm/v1/types.proto b/packages/protobuf/proto/cosmwasm/wasm/v1/types.proto index 216b24e3b..5790585c8 100644 --- a/packages/protobuf/proto/cosmwasm/wasm/v1/types.proto +++ b/packages/protobuf/proto/cosmwasm/wasm/v1/types.proto @@ -4,6 +4,7 @@ package cosmwasm.wasm.v1; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; +import "amino/amino.proto"; option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; option (gogoproto.goproto_getters_all) = false; @@ -19,10 +20,9 @@ enum AccessType { // AccessTypeNobody forbidden ACCESS_TYPE_NOBODY = 1 [ (gogoproto.enumvalue_customname) = "AccessTypeNobody" ]; - // AccessTypeOnlyAddress restricted to a single address - // Deprecated: use AccessTypeAnyOfAddresses instead - ACCESS_TYPE_ONLY_ADDRESS = 2 - [ (gogoproto.enumvalue_customname) = "AccessTypeOnlyAddress" ]; + + reserved 2; // was AccessTypeOnlyAddress + // AccessTypeEverybody unrestricted ACCESS_TYPE_EVERYBODY = 3 [ (gogoproto.enumvalue_customname) = "AccessTypeEverybody" ]; @@ -42,10 +42,10 @@ message AccessConfig { option (gogoproto.goproto_stringer) = true; AccessType permission = 1 [ (gogoproto.moretags) = "yaml:\"permission\"" ]; - // Address - // Deprecated: replaced by addresses - string address = 2 [ (gogoproto.moretags) = "yaml:\"address\"" ]; - repeated string addresses = 3 [ (gogoproto.moretags) = "yaml:\"addresses\"" ]; + reserved 2; // was address + + repeated string addresses = 3 + [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } // Params defines the set of wasm parameters. @@ -53,6 +53,7 @@ message Params { option (gogoproto.goproto_stringer) = false; AccessConfig code_upload_access = 1 [ (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.moretags) = "yaml:\"code_upload_access\"" ]; AccessType instantiate_default_permission = 2 @@ -64,11 +65,12 @@ message CodeInfo { // CodeHash is the unique identifier created by wasmvm bytes code_hash = 1; // Creator address who initially stored the code - string creator = 2; + string creator = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Used in v1beta1 reserved 3, 4; // InstantiateConfig access control to apply on contract creation, optional - AccessConfig instantiate_config = 5 [ (gogoproto.nullable) = false ]; + AccessConfig instantiate_config = 5 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // ContractInfo stores a WASM contract instance @@ -78,9 +80,9 @@ message ContractInfo { // CodeID is the reference to the stored Wasm code uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; // Creator address who initially instantiated the contract - string creator = 2; + string creator = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Admin is an optional address that can execute migrations - string admin = 3; + string admin = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Label is optional metadata to be stored with a contract instance. string label = 4; // Created Tx position when the contract was instantiated. @@ -90,7 +92,8 @@ message ContractInfo { // Extension is an extension point to store custom metadata within the // persistence model. google.protobuf.Any extension = 7 - [ (cosmos_proto.accepts_interface) = "ContractInfoExtension" ]; + [ (cosmos_proto.accepts_interface) = + "cosmwasm.wasm.v1.ContractInfoExtension" ]; } // ContractCodeHistoryOperationType actions that caused a code change @@ -138,7 +141,7 @@ message AbsoluteTxPosition { message Model { // hex-encode key to read it better (this is often ascii) bytes key = 1 [ (gogoproto.casttype) = - "github.com/tendermint/tendermint/libs/bytes.HexBytes" ]; + "github.com/cometbft/cometbft/libs/bytes.HexBytes" ]; // base64-encode raw value bytes value = 2; } diff --git a/packages/stateful/actions/core/authorizations/AuthzGrantRevoke/index.tsx b/packages/stateful/actions/core/authorizations/AuthzGrantRevoke/index.tsx index 318cf27cc..1bb53f887 100644 --- a/packages/stateful/actions/core/authorizations/AuthzGrantRevoke/index.tsx +++ b/packages/stateful/actions/core/authorizations/AuthzGrantRevoke/index.tsx @@ -204,21 +204,11 @@ export const makeAuthzGrantRevokeAction: ActionMaker = ({ case ContractExecutionAuthorization.typeUrl: case ContractMigrationAuthorization.typeUrl: { - // Make sure value is not decoded before trying to decode it. - if (!(grantMsg.grant!.authorization!.value instanceof Uint8Array)) { - return { match: false } - } - - let grants: ContractGrant[] = [] - if (authorizationTypeUrl === ContractExecutionAuthorization.typeUrl) { - grants = ContractExecutionAuthorization.decode( - grantMsg.grant!.authorization!.value - ).grants - } else { - grants = ContractMigrationAuthorization.decode( - grantMsg.grant!.authorization!.value - ).grants - } + const grants: ContractGrant[] = ( + grantMsg.grant!.authorization as + | ContractExecutionAuthorization + | ContractMigrationAuthorization + ).grants if (grants.length !== 1) { return { match: false } @@ -234,7 +224,7 @@ export const makeAuthzGrantRevokeAction: ActionMaker = ({ ({ type: { typeUrl } }) => typeUrl === limit.$typeUrl ) || !FILTER_TYPES.some( - ({ type: { typeUrl } }) => typeUrl === limit.$typeUrl + ({ type: { typeUrl } }) => typeUrl === filter.$typeUrl ) ) { return { match: false }