From f5aad60dac9c4b5ab277b6690faeba2437e36732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D0=B2=D0=BE=D1=80=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 30 Sep 2021 04:57:17 +0300 Subject: [PATCH] contracts: fix bad prototype logic --- packages/contracts/src.ts/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/contracts/src.ts/index.ts b/packages/contracts/src.ts/index.ts index ecbaac2927..579761684a 100644 --- a/packages/contracts/src.ts/index.ts +++ b/packages/contracts/src.ts/index.ts @@ -652,7 +652,7 @@ export class BaseContract { defineReadOnly(this, "filters", { }); { - const uniqueFilters: { [ name: string ]: Array } = { }; + const uniqueFilters: { [ name: string ]: Array } = Object.create(null); Object.keys(this.interface.events).forEach((eventSignature) => { const event = this.interface.events[eventSignature]; defineReadOnly(this.filters, eventSignature, (...args: Array) => { @@ -696,8 +696,8 @@ export class BaseContract { } } - const uniqueNames: { [ name: string ]: Array } = { }; - const uniqueSignatures: { [ signature: string ]: boolean } = { }; + const uniqueNames: { [ name: string ]: Array } = Object.create(null); + const uniqueSignatures: { [ signature: string ]: boolean } = Object.create(null); Object.keys(this.interface.functions).forEach((signature) => { const fragment = this.interface.functions[signature];