diff --git a/integration-tests/testconfig/default.toml b/integration-tests/testconfig/default.toml index 25d76429d75..6ba70d31216 100644 --- a/integration-tests/testconfig/default.toml +++ b/integration-tests/testconfig/default.toml @@ -76,9 +76,9 @@ transaction_timeout = "3m" transfer_gas_fee = 40_000 gas_limit = 30_000_000 # legacy transactions -gas_price = 20_000_000_000 +gas_price = 50_000_000_000 # EIP-1559 transactions -# eip_1559_dynamic_fees = true2 +# eip_1559_dynamic_fees = true gas_fee_cap = 45_000_000_000 gas_tip_cap = 10_000_000_000 diff --git a/integration-tests/testconfig/testconfig.go b/integration-tests/testconfig/testconfig.go index 7f27ba76700..cd44eb5aa33 100644 --- a/integration-tests/testconfig/testconfig.go +++ b/integration-tests/testconfig/testconfig.go @@ -304,12 +304,7 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { case Automation: return handleAutomationConfigOverride(logger, filename, configurationName, target, content) default: - err := ctf_config.BytesToAnyTomlStruct(logger, filename, configurationName, &testConfig, content) - if err != nil { - return errors.Wrapf(err, "error reading file %s", filename) - } - - return nil + return handleDefaultConfigOverride(logger, filename, configurationName, target, content) } } @@ -570,3 +565,33 @@ func handleAutomationConfigOverride(logger zerolog.Logger, filename, configurati return nil } + +func handleDefaultConfigOverride(logger zerolog.Logger, filename, configurationName string, target *TestConfig, content []byte) error { + logger.Debug().Msgf("Handling default config override for %s", filename) + oldConfig := MustCopy(target) + newConfig := TestConfig{} + + err := ctf_config.BytesToAnyTomlStruct(logger, filename, configurationName, &target, content) + if err != nil { + return errors.Wrapf(err, "error reading file %s", filename) + } + + err = ctf_config.BytesToAnyTomlStruct(logger, filename, configurationName, &newConfig, content) + if err != nil { + return errors.Wrapf(err, "error reading file %s", filename) + } + + // override instead of merging + if (newConfig.Seth != nil && len(newConfig.Seth.Networks) > 0) && (oldConfig != nil && oldConfig.Seth != nil && len(oldConfig.Seth.Networks) > 0) { + for i, old_network := range oldConfig.Seth.Networks { + for _, new_network := range newConfig.Seth.Networks { + if old_network.ChainID == new_network.ChainID { + oldConfig.Seth.Networks[i] = new_network + } + } + } + target.Seth.Networks = oldConfig.Seth.Networks + } + + return nil +}