dflow parser

This commit is contained in:
thloyi
2026-01-07 18:02:45 +08:00
parent d9bc106eb1
commit b82b7d9b0e
4 changed files with 334 additions and 6 deletions

View File

@@ -55,6 +55,11 @@ func main() {
"proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u",
},
},
"dflow": {
AccountRequired: []string{
"DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH",
},
},
// TODO: axiom, gmgn, etc.
})
if err != nil {
@@ -89,12 +94,8 @@ func main() {
case txBatch := <-txCh:
//jsonData, _ := json.MarshalIndent(txBatch, "", " ")
for _, tx := range txBatch {
if tx.Label == "okxdexroutev2" {
if tx.Event == "buy" {
fmt.Println("===============", tx.TxHash, tx.Event, tx.Token0Address, "token:", tx.Token0Amount, "sol:", tx.Token1Amount)
} else if tx.Event == "sell" {
fmt.Println("===============", tx.TxHash, tx.Event, tx.Token0Address, "token:", tx.Token0Amount)
}
if tx.Label == "dflow" {
fmt.Println("===============", tx.TxHash, tx.Event, tx.Token0Address, "token:", tx.Token0Amount)
}
}
//fmt.Println(txBatch[0].TxHash)