File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package contract_register
22
33import (
44 "github.com/Gearbox-protocol/sdk-go/core"
5+ "github.com/Gearbox-protocol/sdk-go/log"
56 "github.com/ethereum/go-ethereum/common"
67 "github.com/ethereum/go-ethereum/core/types"
78
@@ -11,6 +12,16 @@ import (
1112
1213func (mdl * ContractRegister ) OnLog (txLog types.Log ) {
1314 blockNum := int64 (txLog .BlockNumber )
15+ if core .GetChainId (mdl .Client ) != 1337 && (core .Topic ("NewPoolAdded(address)" ) == txLog .Topics [0 ] ||
16+ core .Topic ("NewCreditManagerAdded(address)" ) == txLog .Topics [0 ]) {
17+
18+ address := common .HexToAddress (txLog .Topics [1 ].Hex ())
19+ version := core .FetchVersionOptimized (address , 0 , mdl .Client )
20+ log .Info (version )
21+ if version .MoreThanEq (core .NewVersion (300 )) {
22+ return
23+ }
24+ }
1425 switch txLog .Topics [0 ] {
1526 case core .Topic ("NewPoolAdded(address)" ):
1627 address := common .HexToAddress (txLog .Topics [1 ].Hex ()).Hex ()
You can’t perform that action at this time.
0 commit comments