Comparing version 8.2.1 to 8.3.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
118436
1591