Check gas price (#494)

* add gas validation option

* gas price config for chains

* check gas price

* add tests

* fix txt

* make gas price dls

* fix config
This commit is contained in:
Anton
2024-05-31 15:46:55 +03:00
committed by GitHub
parent 4aff35994f
commit 772142e156
9 changed files with 133 additions and 19 deletions

View File

@@ -86,6 +86,7 @@ class ChainsConfigReader(
?: throw IllegalArgumentException("undefined shortnames for $blockchain")
val type = getValueAsString(node, "type")
?: throw IllegalArgumentException("undefined type for $blockchain")
val gasPriceCondition = getValueAsString(node, "gas-price-condition")
return ChainsConfig.ChainConfig(
expectedBlockTime = expectedBlockTime,
syncingLagSize = lags.first,
@@ -99,7 +100,8 @@ class ChainsConfigReader(
shortNames = shortNames,
id = id,
blockchain = blockchain,
type = type
type = type,
gasPriceCondition = gasPriceCondition?.let { ChainsConfig.GasPriceCondition(gasPriceCondition) },
)
}