// @generated by protoc-gen-es v1.2.0 with parameter "target=ts" // @generated from file osmosis/cosmwasmpool/v1beta1/model/pool.proto (package osmosis.cosmwasmpool.v1beta1, syntax proto3) /* eslint-disable */ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; /** * CosmWasmPool represents the data serialized into state for each CW pool. * * Note: CW Pool has 2 pool models: * - CosmWasmPool which is a proto-generated store model used for serialization * into state. * - Pool struct that encapsulates the CosmWasmPool and wasmKeeper for calling * the contract. * * CosmWasmPool implements the poolmanager.PoolI interface but it panics on all * methods. The reason is that access to wasmKeeper is required to call the * contract. * * Instead, all interactions and poolmanager.PoolI methods are to be performed * on the Pool struct. The reason why we cannot have a Pool struct only is * because it cannot be serialized into state due to having a non-serializable * wasmKeeper field. * * @generated from message osmosis.cosmwasmpool.v1beta1.CosmWasmPool */ export class CosmWasmPool extends Message { /** * @generated from field: string contract_address = 1; */ contractAddress = ""; /** * @generated from field: uint64 pool_id = 2; */ poolId = protoInt64.zero; /** * @generated from field: uint64 code_id = 3; */ codeId = protoInt64.zero; /** * @generated from field: bytes instantiate_msg = 4; */ instantiateMsg = new Uint8Array(0); constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "osmosis.cosmwasmpool.v1beta1.CosmWasmPool"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "contract_address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "pool_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 3, name: "code_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 4, name: "instantiate_msg", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): CosmWasmPool { return new CosmWasmPool().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): CosmWasmPool { return new CosmWasmPool().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): CosmWasmPool { return new CosmWasmPool().fromJsonString(jsonString, options); } static equals(a: CosmWasmPool | PlainMessage | undefined, b: CosmWasmPool | PlainMessage | undefined): boolean { return proto3.util.equals(CosmWasmPool, a, b); } }