Skip to content

Commit 1a11246

Browse files
committed
fix: handle null oracle for token
1 parent 77bda68 commit 1a11246

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

models/price_oracle/po_v3/on_log.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ func (mdl *PriceOracle) OnLog(txLog types.Log) {
8989
}
9090
}
9191
}
92+
if oracle == core.NULL_ADDR.Hex() { // https://etherscan.io/tx/0x5d5589c1de19c3d20fe4c07f9700e405c55cad4a03d2f03405004bd373e308ee#eventlog
93+
return
94+
}
9295
mdl.Repo.AddDAOOperation(&schemas.DAOOperation{
9396
BlockNumber: blockNum,
9497
LogID: txLog.Index,
@@ -104,7 +107,7 @@ func (mdl *PriceOracle) OnLog(txLog types.Log) {
104107

105108
priceFeedType, underlyingFeeds, err := mdl.checkPriceFeedContract(blockNum, oracle, token)
106109
if err != nil {
107-
log.Fatalf("Oracle %s, err: %s, blockNum %d", oracle, err, blockNum)
110+
log.Fatalf("Oracle %s, token:%s err: %s, blockNum %d. txHash: %s", oracle, token, err, blockNum, txLog.TxHash)
108111
}
109112
if priceFeedType == ds.RedStonePF {
110113
// pfs := core.GetRedStonePFByChainId(core.GetChainId(mdl.Client))

0 commit comments

Comments
 (0)