|
@@ -66,7 +66,10 @@ async function startMonitor() {
|
|
|
const transactions: TransactionResponse[] = blockInfo.prefetchedTransactions
|
|
|
|
|
|
const transferTransaction = transactions.filter(
|
|
|
- (tx) => addressList.includes(tx.to!) || addressList.includes(tx.from)
|
|
|
+ (tx) =>
|
|
|
+ (addressList.includes(tx.to!) && tx.data === '0x') ||
|
|
|
+ (addressList.includes(tx.from) &&
|
|
|
+ tx.to === '0x1A0A18AC4BECDDbd6389559687d1A73d8927E416')
|
|
|
)
|
|
|
const transferInfo = transferTransaction
|
|
|
.map((tx) => {
|
|
@@ -91,8 +94,7 @@ async function startMonitor() {
|
|
|
type: 1,
|
|
|
}
|
|
|
}
|
|
|
- return null
|
|
|
- })
|
|
|
+ return null })
|
|
|
.filter((tx) => tx !== null)
|
|
|
if (transferInfo.length > 0) {
|
|
|
await sequelize.transaction(async (tx) => {
|
|
@@ -122,7 +124,7 @@ async function startMonitor() {
|
|
|
console.log('No new block found')
|
|
|
}
|
|
|
}
|
|
|
-// 45322143
|
|
|
+// 45322142
|
|
|
async function initMonitor(): Promise<void> {
|
|
|
const blockNumber = await provider.getBlockNumber()
|
|
|
networkInfo = await provider.getNetwork()
|