Run prettier
This commit is contained in:
parent
4b2d27b5e5
commit
e59c57106c
@ -32,6 +32,6 @@ declare module 'ethers' {
|
|||||||
constructor(address: string, abi: any, provider: any);
|
constructor(address: string, abi: any, provider: any);
|
||||||
}
|
}
|
||||||
const enum errors {
|
const enum errors {
|
||||||
INVALID_ARGUMENT = 'INVALID_ARGUMENT',
|
INVALID_ARGUMENT = 'INVALID_ARGUMENT',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,17 +34,17 @@ export class AbiDecoder {
|
|||||||
|
|
||||||
let decodedData: any[];
|
let decodedData: any[];
|
||||||
try {
|
try {
|
||||||
decodedData = ethersInterface.events[event.name].parse(log.data);
|
decodedData = ethersInterface.events[event.name].parse(log.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code === ethers.errors.INVALID_ARGUMENT) {
|
if (error.code === ethers.errors.INVALID_ARGUMENT) {
|
||||||
// Because we index events by Method ID, and Method IDs are derived from the method
|
// Because we index events by Method ID, and Method IDs are derived from the method
|
||||||
// name and the input parameters, it's possible that the return value of the event
|
// name and the input parameters, it's possible that the return value of the event
|
||||||
// does not match our ABI. If that's the case, then ethers will throw an error
|
// does not match our ABI. If that's the case, then ethers will throw an error
|
||||||
// when we try to parse the event. We handle that case here by returning the log rather
|
// when we try to parse the event. We handle that case here by returning the log rather
|
||||||
// than throwing an error.
|
// than throwing an error.
|
||||||
return log;
|
return log;
|
||||||
}
|
}
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
let didFailToDecode = false;
|
let didFailToDecode = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user