Skip to content

Commit f875971

Browse files
authored
Merge branch 'master' into v3
2 parents f1af9c9 + 65e7a0e commit f875971

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

models/contract_register/on_log.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ import (
1616

1717
func (mdl *ContractRegister) OnLog(txLog types.Log) {
1818
blockNum := int64(txLog.BlockNumber)
19+
if core.GetChainId(mdl.Client) != 1337 && (core.Topic("NewPoolAdded(address)") == txLog.Topics[0] ||
20+
core.Topic("NewCreditManagerAdded(address)") == txLog.Topics[0]) {
21+
22+
address := common.HexToAddress(txLog.Topics[1].Hex())
23+
version := core.FetchVersionOptimized(address, 0, mdl.Client)
24+
log.Info(version)
25+
if version.MoreThanEq(core.NewVersion(300)) {
26+
return
27+
}
28+
}
1929
switch txLog.Topics[0] {
2030
case core.Topic("NewPoolAdded(address)"):
2131
address := common.HexToAddress(txLog.Topics[1].Hex()).Hex()

0 commit comments

Comments
 (0)