From a6517152b5df5f1b2a660dc7eafe95f54fb72cf5 Mon Sep 17 00:00:00 2001 From: "beomhee.lee" Date: Tue, 16 Dec 2025 17:09:10 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EA=B0=9C=EC=88=98=20?= =?UTF-8?q?=EC=A4=84=EC=9E=84=20=EB=B0=8F=20=ED=8A=B8=EB=9E=9C=EC=9E=AD?= =?UTF-8?q?=EC=85=98=20=EC=8B=9C=EA=B0=84=20=EC=B2=B4=ED=81=AC=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/alchemy.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/alchemy.go b/src/alchemy.go index 835e6a1..18b2e1c 100644 --- a/src/alchemy.go +++ b/src/alchemy.go @@ -187,7 +187,7 @@ func getAlchemyTokenTransfers(address string, contractAddress string, fromBlock } // HTTP POST 요청 - umlog.Debug("Request - Address: %s, From: %s, To: %s", address, fromBlock, toBlock) + // umlog.Debug("Request - Address: %s, From: %s, To: %s", address, fromBlock, toBlock) // umlog.Debug("[getAlchemyTokenTransfers] Padded address (topic[2]): %s\n", paddedAddress) // umlog.Debug("[getAlchemyTokenTransfers] Request body: %s", string(requestBody)) req, err := http.NewRequest("POST", CODE_STRC.ALCHEMY_MAINNET, bytes.NewBuffer(requestBody)) @@ -444,7 +444,7 @@ func checkWalletWithAlchemy(walletDBConn *sql.DB, header model.Header, userId in fromBlockHex := fmt.Sprintf("0x%x", startBlock) toBlockHex := fmt.Sprintf("0x%x", currentBlock) - umlog.Debug("Checking blocks %d to %d (range: %d)\n", startBlock, currentBlock, blocksToCheck) + // umlog.Debug("Checking blocks %d to %d (range: %d)\n", startBlock, currentBlock, blocksToCheck) // Alchemy API로 Transfer 이벤트 조회 transfers, err := getAlchemyTokenTransfers(walletAddress, contractAddress, fromBlockHex, toBlockHex, CODE_STRC) @@ -459,12 +459,12 @@ func checkWalletWithAlchemy(walletDBConn *sql.DB, header model.Header, userId in umlog.Debug("transfer info: %v\n", transfer) // 트랜잭션 시각 체크 (Timestamp 사용) - txTime := time.Unix(transfer.Timestamp, 0) + // txTime := time.Unix(transfer.Timestamp, 0) // 마지막 체크 이후의 트랜잭션만 처리 - if txTime.Before(lastCheckTime) { - continue - } + // if txTime.Before(lastCheckTime) { + // continue + // } // 이미 알림 보낸 트랜잭션인지 확인 if isTransactionNotified(walletDBConn, transfer.TransactionHash) { @@ -482,8 +482,8 @@ func checkWalletWithAlchemy(walletDBConn *sql.DB, header model.Header, userId in newTransactionCount++ - umlog.Info("checkWalletWithAlchemy\nNew incoming tx detected - User: %d, From: %s, Amount: %s CYBX, Hash: %s", - userId, transfer.From, amount, transfer.TransactionHash) + // umlog.Info("checkWalletWithAlchemy\nNew incoming tx detected - User: %d, From: %s, Amount: %s CYBX, Hash: %s", + // userId, transfer.From, amount, transfer.TransactionHash) } return newTransactionCount, nil @@ -682,8 +682,8 @@ func sendIncomingTransactionNotification(walletDBConn *sql.DB, header model.Head // Telegram 알림 (관리자용) messageboxy := fmt.Sprintf( - "💰 Deposit notification(from Alchemy)\nFrom: %s\nTo: %s\nAmount: %s CYBX\nTxHash: %s", - fromAddress, toAddress, amount, txHash) + "💰 Deposit notification(from Alchemy)\nFrom: %s\nAmount: %s CYBX\nTxHash: %s\n", + fromAddress, amount, txHash) message := map[string]string{"message": messageboxy} jsonData, err := json.Marshal(message) if err != nil {