New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dappql

Package Overview
Dependencies
Maintainers
0
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dappql - npm Package Compare versions

Comparing version 2.0.13 to 2.0.14

18

lib/templates/createContractsCollection.js

@@ -18,3 +18,10 @@ import { writeFileSync } from 'fs';

const hasRead = !!readMethods.length;
const hasWrite = !!contract.abi.find((a) => a.type === 'function' && (a.stateMutability === 'nonpayable' || a.stateMutability === 'payable'));
const writeMethods = contract.abi
.filter((a) => a.type === 'function' && (a.stateMutability === 'nonpayable' || a.stateMutability === 'payable'))
.reduce((acc, a) => {
if (acc.includes(a.name))
return acc;
return [...acc, a.name];
}, []);
const hasWrite = !!writeMethods.length;
const content = `/* Autogenerated file. Do not edit manually. */

@@ -110,3 +117,3 @@ /* tslint:disable */

export type Mutations = keyof Contract['mutations']
export function mutation<M extends Mutations>(functionName: M) {
function getMutation<M extends Mutations>(functionName: M) {
return {

@@ -119,3 +126,8 @@ contractName: '{{CONTRACT_NAME}}' as const,

}
}`
}
export const mutation = {
${writeMethods.map((m) => `\t\t${m}: getMutation('${m}'),`).join('\n')}
}
`
: ''}

@@ -122,0 +134,0 @@ `.replaceAll('{{CONTRACT_NAME}}', contract.contractName);

3

package.json
{
"name": "dappql",
"version": "2.0.13",
"version": "2.0.14",
"description": "wagmi extension to easily query smart-contracts",

@@ -48,3 +48,2 @@ "main": "./lib/index.js",

"clean": "rm -rf ./node_modules && rm -rf ./lib && rm -rf ./.turbo",
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "pnpm exec tsc -b -w",

@@ -51,0 +50,0 @@ "build": "pnpm exec tsc -b",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc