@@ -19,17 +19,18 @@ import (
1919)
2020
2121const (
22- breakingEpochCoston = 4506
23- breakingEpochSecondCoston = 4506
22+ breakingEpochCoston = 5450 // 5451 uses new address
2423
2524 breakingEpochCoston2 = 5338
2625)
2726const (
28- newnewRegistryCoston = "0xb4b93a3a3ada93a574e6efeb5f295bf882934cb6"
29- newRegistryCoston = "0xb4b93a3a3ada93a574e6efeb5f295bf882934cb6 "
30- newRegistryCoston2 = "0x6a0AF07b7972177B176d3D422555cbc98DfDe914"
27+ // new ABI
28+ newRegistryCoston = "0x4C797636FC2410e1BbA7CF4bf2e397d94e65DfB8 "
29+ newRegistryCoston2 = "0x6a0AF07b7972177B176d3D422555cbc98DfDe914"
3130
32- oldRegistryCoston = "0xE2c06DF29d175Aa0EcfcD10134eB96f8C94448A3"
31+ oldRegistryCoston = "0xE2c06DF29d175Aa0EcfcD10134eB96f8C94448A3" // old message
32+
33+ // old ABI
3334 oldRegistrySongbird = "0x31B9EC65C731c7D973a33Ef3FC83B653f540dC8D"
3435 oldRegistryCoston2 = "0xc6E40401395DCc648bC4bBb38fE4552423cD9BAC"
3536 oldRegistryFlare = "0x2580101692366e2f331e891180d9ffdF861Fce83"
@@ -53,7 +54,6 @@ func fetchVoterRegisteredEventsForRewardEpoch(ctx context.Context, db *gorm.DB,
5354 eventSelector := voterRegisteredEventSel
5455 switch params .Address {
5556 case
56- common .HexToAddress (oldRegistryCoston ),
5757 common .HexToAddress (oldRegistrySongbird ),
5858 common .HexToAddress (oldRegistryCoston2 ),
5959 common .HexToAddress (oldRegistryFlare ):
@@ -117,7 +117,6 @@ func SubmitToSigningPolicyAddress(ctx context.Context, db *gorm.DB, registryCont
117117
118118 switch registryContractAddress {
119119 case
120- common .HexToAddress (oldRegistryCoston ),
121120 common .HexToAddress (oldRegistrySongbird ),
122121 common .HexToAddress (oldRegistryCoston2 ),
123122 common .HexToAddress (oldRegistryFlare ):
@@ -149,12 +148,10 @@ func AddSubmitAddressesToSigningPolicy(ctx context.Context, db *gorm.DB, registr
149148
150149 rewardEpochID := data .RewardEpochId .Uint64 ()
151150
152- if rewardEpochID <= breakingEpochCoston && registryContractAddress == common .HexToAddress (newRegistryCoston ) {
153- registryContractAddress = common .HexToAddress (oldRegistryCoston )
154- } else if rewardEpochID <= breakingEpochCoston2 && registryContractAddress == common .HexToAddress (newRegistryCoston2 ) {
151+ if rewardEpochID <= breakingEpochCoston2 && registryContractAddress == common .HexToAddress (newRegistryCoston2 ) {
155152 registryContractAddress = common .HexToAddress (oldRegistryCoston2 )
156- } else if rewardEpochID <= breakingEpochSecondCoston && registryContractAddress == common .HexToAddress (newnewRegistryCoston ) {
157- registryContractAddress = common .HexToAddress (newRegistryCoston )
153+ } else if rewardEpochID <= breakingEpochCoston && registryContractAddress == common .HexToAddress (newRegistryCoston ) {
154+ registryContractAddress = common .HexToAddress (oldRegistryCoston )
158155 }
159156
160157 submitToSigning , err := SubmitToSigningPolicyAddress (ctx , db , registryContractAddress , rewardEpochID )
0 commit comments