Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async callAsync(
hash: string,
v: number | BigNumber,
r: string,
s: string,
callData: Partial = {},
defaultBlock?: BlockParam,
): Promise {
assert.isString('hash', hash);
assert.isNumberOrBigNumber('v', v);
assert.isString('r', r);
assert.isString('s', s);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema,
schemas.numberSchema,
schemas.jsNumber,
]);
if (defaultBlock !== undefined) {
assert.isBlockParam('defaultBlock', defaultBlock);
}
const self = (this as any) as AbiGenDummyContract;
const encodedData = self._strictEncodeArguments('ecrecoverFn(bytes32,uint8,bytes32,bytes32)', [
hash,
v,
r,
s,
public ecrecoverFn(hash: string, v: number | BigNumber, r: string, s: string): ContractFunctionObj {
const self = (this as any) as AbiGenDummyContract;
assert.isString('hash', hash);
assert.isNumberOrBigNumber('v', v);
assert.isString('r', r);
assert.isString('s', s);
const functionSignature = 'ecrecoverFn(bytes32,uint8,bytes32,bytes32)';
return {
async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise {
BaseContract._assertCallParams(callData, defaultBlock);
const rawCallResult = await self._evmExecAsync(this.getABIEncodedTransactionData());
const abiEncoder = self._lookupAbiEncoder(functionSignature);
return abiEncoder.strictDecodeReturnValue(rawCallResult);
},
getABIEncodedTransactionData(): string {
return self._strictEncodeArguments(functionSignature, [hash, v, r, s]);
},
};
}