diff --git a/packages/graz/src/actions/methods.ts b/packages/graz/src/actions/methods.ts index da3b7f70..778d33d9 100644 --- a/packages/graz/src/actions/methods.ts +++ b/packages/graz/src/actions/methods.ts @@ -138,6 +138,7 @@ export interface ExecuteContractArgs> { fee: StdFee | "auto" | number; senderAddress: string; contractAddress: string; + funds: Coin[]; } export type ExecuteContractMutationArgs> = Omit< @@ -152,6 +153,7 @@ export const executeContract = async >({ msg, fee, contractAddress, + funds, }: ExecuteContractArgs) => { const { signingClients } = useGrazStore.getState(); @@ -159,7 +161,7 @@ export const executeContract = async >({ throw new Error("CosmWasm signing client is not ready"); } - return signingClients.cosmWasm.execute(senderAddress, contractAddress, msg, fee); + return signingClients.cosmWasm.execute(senderAddress, contractAddress, msg, fee, funds); }; export const getQuerySmart = async (address: string, queryMsg: Record): Promise => { diff --git a/packages/graz/src/hooks/methods.ts b/packages/graz/src/hooks/methods.ts index 85cad5dd..dcbeee41 100644 --- a/packages/graz/src/hooks/methods.ts +++ b/packages/graz/src/hooks/methods.ts @@ -222,6 +222,7 @@ export const useExecuteContract = >({ fee: args.fee ?? "auto", senderAddress: accountAddress, contractAddress, + funds: args.funds ?? [], }; return executeContract(executeArgs);