Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_.map(abiArray, (abi: AbiDefinition) => {
switch (abi.type) {
case AbiType.Event:
// tslint:disable-next-line:no-unnecessary-type-assertion
this._addEventABI(abi as EventAbi, ethersInterface);
break;
case AbiType.Function:
// tslint:disable-next-line:no-unnecessary-type-assertion
this._addMethodABI(abi as MethodAbi, contractName);
break;
default:
// ignore other types
break;
}
});
}
_.map(abiArray, (abi: AbiDefinition) => {
if (abi.type === AbiType.Event) {
const topic = ethersInterface.events[abi.name].topics[0];
this._methodIds[topic] = abi;
}
});
}