Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixFan1992 committed Feb 19, 2024
1 parent da8cd67 commit fcb5b30
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 184 deletions.
28 changes: 16 additions & 12 deletions integration-tests/contracts/ethereum_keeper_contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,23 +445,27 @@ func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings, ocrCon
}
return v.client.ProcessTransaction(tx)
case ethereum.RegistryVersion_2_2:
tx, err := v.registry2_2.SetConfig(txOpts,
ocrConfig.Signers,
ocrConfig.Transmitters,
ocrConfig.F,
ocrConfig.OnchainConfig,
ocrConfig.OffchainConfigVersion,
ocrConfig.OffchainConfig,
)
if err != nil {
return err
}
return v.client.ProcessTransaction(tx)
return v.setConfig22(txOpts, ocrConfig)
}

return fmt.Errorf("keeper registry version %d is not supported", v.version)
}

func (v *EthereumKeeperRegistry) setConfig22(txOpts *bind.TransactOpts, ocrConfig OCRv2Config) error {
tx, err := v.registry2_2.SetConfig(txOpts,
ocrConfig.Signers,
ocrConfig.Transmitters,
ocrConfig.F,
ocrConfig.OnchainConfig,
ocrConfig.OffchainConfigVersion,
ocrConfig.OffchainConfig,
)
if err != nil {
return err
}
return v.client.ProcessTransaction(tx)
}

// Pause pauses the registry.
func (v *EthereumKeeperRegistry) Pause() error {
txOpts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/reorg/automation_reorg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ func TestAutomationReorg(t *testing.T) {

registryVersions := map[string]ethereum.KeeperRegistryVersion{
"registry_2_0": ethereum.RegistryVersion_2_0,
// "registry_2_1_conditional": ethereum.RegistryVersion_2_1,
// "registry_2_1_logtrigger": ethereum.RegistryVersion_2_1,
"registry_2_1_conditional": ethereum.RegistryVersion_2_1,
"registry_2_1_logtrigger": ethereum.RegistryVersion_2_1,
"registry_2_2_conditional": ethereum.RegistryVersion_2_2,
"registry_2_2_logtrigger": ethereum.RegistryVersion_2_2,
}

for name, registryVersion := range registryVersions {
name := name
registryVersion := registryVersion
t.Run(name, func(t *testing.T) {
t.Parallel()
config, err := tc.GetConfig("Reorg", tc.Automation)
Expand Down
Loading

0 comments on commit fcb5b30

Please sign in to comment.