Comparing version 2.0.14 to 2.0.15
@@ -116,14 +116,10 @@ import { writeFileSync } from 'fs'; | ||
export type Mutations = keyof Contract['mutations'] | ||
function getMutation<M extends Mutations>(functionName: M) { | ||
return { | ||
contractName: '{{CONTRACT_NAME}}' as const, | ||
functionName, | ||
deployAddress, | ||
argsType: undefined as ExtractArgs<Contract['mutations'][M]> | undefined, | ||
getAbi: () => abi, | ||
} | ||
const BaseMutation = { | ||
contractName: '{{CONTRACT_NAME}}' as const, | ||
deployAddress, | ||
getAbi: () => abi, | ||
} | ||
export const mutation = { | ||
${writeMethods.map((m) => `\t\t${m}: getMutation('${m}'),`).join('\n')} | ||
${writeMethods.map((m) => `\t\t${m}: {...BaseMutation, functionName: '${m}', argsType: undefined as ExtractArgs<Contract['mutations']['${m}']> | undefined},`).join('\n')} | ||
} | ||
@@ -130,0 +126,0 @@ ` |
{ | ||
"name": "dappql", | ||
"version": "2.0.14", | ||
"version": "2.0.15", | ||
"description": "wagmi extension to easily query smart-contracts", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
14031
337