|
|
@@ -9,12 +9,18 @@ function sleep(ms: number) {
|
|
|
const FEATURE_STRING = "0x38ed1739"
|
|
|
let lastBlockNumber = 0
|
|
|
|
|
|
+const v2_router_map: any = {}
|
|
|
+
|
|
|
function txHandler(tx: any) {
|
|
|
const input = tx.input
|
|
|
|
|
|
if (input.indexOf(FEATURE_STRING) === -1) return
|
|
|
|
|
|
- logger.info(tx)
|
|
|
+ if (!v2_router_map[tx.to]) {
|
|
|
+ v2_router_map[tx.to] = true
|
|
|
+
|
|
|
+ logger.info(tx.to)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
async function onTick() {
|
|
|
@@ -38,8 +44,10 @@ async function main() {
|
|
|
while (true) {
|
|
|
try {
|
|
|
await onTick()
|
|
|
- } catch (error) {
|
|
|
- console.error(error)
|
|
|
+ } catch (error: any) {
|
|
|
+ if (error.toString().indexOf('Number can only safely store up to 53 bits') !== -1) {
|
|
|
+ console.error(error)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
await sleep(1000)
|