Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typechain

Package Overview
Dependencies
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typechain - npm Package Compare versions

Comparing version 8.2.1 to 8.3.0

4

dist/utils/signatures.d.ts

@@ -1,6 +0,6 @@

import { AbiParameter, EventDeclaration, FunctionDeclaration } from '../parser/abiParser';
import { AbiParameter, EventArgDeclaration, EventDeclaration, FunctionDeclaration } from '../parser/abiParser';
export declare function getFullSignatureAsSymbolForEvent(event: EventDeclaration): string;
export declare function getFullSignatureForEvent(event: EventDeclaration): string;
export declare function getIndexedSignatureForEvent(event: EventDeclaration): string;
export declare function getArgumentForSignature(argument: AbiParameter): string;
export declare function getArgumentForSignature(argument: EventArgDeclaration | AbiParameter): string;
export declare function getSignatureForFn(fn: FunctionDeclaration): string;

@@ -18,3 +18,3 @@ "use strict";

function getFullSignatureForEvent(event) {
return `${event.name}(${event.inputs.map((e) => e.type.originalType).join(',')})`;
return `${event.name}(${event.inputs.map((e) => getArgumentForSignature(e)).join(',')})`;
}

@@ -24,11 +24,13 @@ exports.getFullSignatureForEvent = getFullSignatureForEvent;

const indexedType = event.inputs.filter((e) => e.isIndexed);
return `${event.name}(${indexedType.map((e) => e.type.originalType).join(',')})`;
return `${event.name}(${indexedType.map((e) => getArgumentForSignature(e)).join(',')})`;
}
exports.getIndexedSignatureForEvent = getIndexedSignatureForEvent;
function getArgumentForSignature(argument) {
var _a;
if (argument.type.originalType === 'tuple') {
return `(${argument.type.components.map((i) => getArgumentForSignature(i)).join(',')})`;
}
else if (argument.type.originalType === 'tuple[]') {
return getArgumentForSignature({ name: '', type: argument.type.itemType }) + '[]';
else if (argument.type.originalType.startsWith('tuple')) {
const arr = argument.type;
return `${getArgumentForSignature({ name: '', type: arr.itemType })}[${((_a = arr.size) === null || _a === void 0 ? void 0 : _a.toString()) || ''}]`;
}

@@ -35,0 +37,0 @@ else {

@@ -11,3 +11,3 @@ {

],
"version": "8.2.1",
"version": "8.3.0",
"license": "MIT",

@@ -14,0 +14,0 @@ "repository": "https://github.com/ethereum-ts/Typechain",

Sorry, the diff of this file is not supported yet

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