Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions __output__/builder/bundler_test/contracts/CwAdminFactory.client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/**
* This file was automatically generated by @cosmwasm/ts-codegen@latest.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/

import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from "@cosmjs/cosmwasm-stargate";
import { Coin, StdFee } from "@cosmjs/amino";
import { ExecuteMsg, Binary, InstantiateMsg, QueryMsg } from "./CwAdminFactory.types";
export interface CwAdminFactoryReadOnlyInterface {
contractAddress: string;
}
export class CwAdminFactoryQueryClient implements CwAdminFactoryReadOnlyInterface {
client: CosmWasmClient;
contractAddress: string;

constructor(client: CosmWasmClient, contractAddress: string) {
this.client = client;
this.contractAddress = contractAddress;
}

}
export interface CwAdminFactoryInterface {
contractAddress: string;
sender: string;
instantiateContractWithSelfAdmin: ({
codeId,
instantiateMsg,
label
}: {
codeId: number;
instantiateMsg: Binary;
label: string;
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
}
export class CwAdminFactoryClient implements CwAdminFactoryInterface {
client: SigningCosmWasmClient;
sender: string;
contractAddress: string;

constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
this.client = client;
this.sender = sender;
this.contractAddress = contractAddress;
this.instantiateContractWithSelfAdmin = this.instantiateContractWithSelfAdmin.bind(this);
}

instantiateContractWithSelfAdmin = async ({
codeId,
instantiateMsg,
label
}: {
codeId: number;
instantiateMsg: Binary;
label: string;
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
return await this.client.execute(this.sender, this.contractAddress, {
instantiate_contract_with_self_admin: {
code_id: codeId,
instantiate_msg: instantiateMsg,
label
}
}, fee, memo, funds);
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
* This file was automatically generated by @cosmwasm/ts-codegen@latest.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/

import { Coin } from "@cosmjs/amino";
import { MsgExecuteContractEncodeObject } from "cosmwasm";
import { MsgExecuteContract } from "cosmjs-types/cosmwasm/wasm/v1/tx";
import { toUtf8 } from "@cosmjs/encoding";
import { ExecuteMsg, Binary, InstantiateMsg, QueryMsg } from "./CwAdminFactory.types";
export interface CwAdminFactoryMessage {
contractAddress: string;
sender: string;
instantiateContractWithSelfAdmin: ({
codeId,
instantiateMsg,
label
}: {
codeId: number;
instantiateMsg: Binary;
label: string;
}, funds?: Coin[]) => MsgExecuteContractEncodeObject;
}
export class CwAdminFactoryMessageComposer implements CwAdminFactoryMessage {
sender: string;
contractAddress: string;

constructor(sender: string, contractAddress: string) {
this.sender = sender;
this.contractAddress = contractAddress;
this.instantiateContractWithSelfAdmin = this.instantiateContractWithSelfAdmin.bind(this);
}

instantiateContractWithSelfAdmin = ({
codeId,
instantiateMsg,
label
}: {
codeId: number;
instantiateMsg: Binary;
label: string;
}, funds?: Coin[]): MsgExecuteContractEncodeObject => {
return {
typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract",
value: MsgExecuteContract.fromPartial({
sender: this.sender,
contract: this.contractAddress,
msg: toUtf8(JSON.stringify({
instantiate_contract_with_self_admin: {
code_id: codeId,
instantiate_msg: instantiateMsg,
label
}
})),
funds
})
};
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* This file was automatically generated by @cosmwasm/ts-codegen@latest.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/

import { ExecuteMsg, Binary, InstantiateMsg, QueryMsg } from "./CwAdminFactory.types";
import { CamelCasedProperties } from "type-fest";
export abstract class CwAdminFactoryExecuteMsgBuilder {
static instantiateContractWithSelfAdmin = ({
codeId,
instantiateMsg,
label
}: CamelCasedProperties<Extract<ExecuteMsg, {
instantiate_contract_with_self_admin: unknown;
}>["instantiate_contract_with_self_admin"]>): ExecuteMsg => {
return {
instantiate_contract_with_self_admin: ({
code_id: codeId,
instantiate_msg: instantiateMsg,
label
} as const)
};
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This file was automatically generated by @cosmwasm/ts-codegen@latest.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/

import { UseQueryOptions } from "react-query";
import { ExecuteMsg, Binary, InstantiateMsg, QueryMsg } from "./CwAdminFactory.types";
import { CwAdminFactoryQueryClient } from "./CwAdminFactory.client";
export interface CwAdminFactoryReactQuery<TResponse, TData = TResponse> {
client: CwAdminFactoryQueryClient;
options?: UseQueryOptions<TResponse, Error, TData>;
}
24 changes: 24 additions & 0 deletions __output__/builder/bundler_test/contracts/CwAdminFactory.recoil.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* This file was automatically generated by @cosmwasm/ts-codegen@latest.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/

import { selectorFamily } from "recoil";
import { cosmWasmClient } from "./chain";
import { ExecuteMsg, Binary, InstantiateMsg, QueryMsg } from "./CwAdminFactory.types";
import { CwAdminFactoryQueryClient } from "./CwAdminFactory.client";
type QueryClientParams = {
contractAddress: string;
};
export const queryClient = selectorFamily<CwAdminFactoryQueryClient, QueryClientParams>({
key: "cwAdminFactoryQueryClient",
get: ({
contractAddress
}) => ({
get
}) => {
const client = get(cosmWasmClient);
return new CwAdminFactoryQueryClient(client, contractAddress);
}
});
19 changes: 19 additions & 0 deletions __output__/builder/bundler_test/contracts/CwAdminFactory.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* This file was automatically generated by @cosmwasm/ts-codegen@latest.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/

export type ExecuteMsg = {
instantiate_contract_with_self_admin: {
code_id: number;
instantiate_msg: Binary;
label: string;
[k: string]: unknown;
};
};
export type Binary = string;
export interface InstantiateMsg {
[k: string]: unknown;
}
export type QueryMsg = string;
Loading