2024-04-29 17:13:28 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2024-05-07 20:15:38 +00:00
|
|
|
"github.com/strangelove-ventures/interchaintest/v7/chain/cosmos"
|
|
|
|
"github.com/strangelove-ventures/interchaintest/v7/ibc"
|
|
|
|
"github.com/strangelove-ventures/interchaintest/v7/testutil"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
KavaTestChainId = "kava_8888-1"
|
|
|
|
KavaEvmTestChainId = int64(8888)
|
2024-04-29 17:13:28 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func DefaultKavaChainConfig(chainId string) ibc.ChainConfig {
|
|
|
|
kavaImageTag := os.Getenv("KAVA_TAG")
|
|
|
|
if kavaImageTag == "" {
|
|
|
|
kavaImageTag = "v0.26.0-rocksdb"
|
|
|
|
}
|
|
|
|
|
|
|
|
// app.toml overrides
|
|
|
|
jsonRpcOverrides := make(testutil.Toml)
|
|
|
|
jsonRpcOverrides["address"] = "0.0.0.0:8545"
|
|
|
|
appTomlOverrides := make(testutil.Toml)
|
|
|
|
appTomlOverrides["json-rpc"] = jsonRpcOverrides
|
|
|
|
|
|
|
|
// genesis param overrides
|
|
|
|
genesis := []cosmos.GenesisKV{
|
|
|
|
cosmos.NewGenesisKV("app_state.evm.params.evm_denom", "akava"),
|
|
|
|
}
|
|
|
|
|
|
|
|
return ibc.ChainConfig{
|
2024-05-07 20:15:38 +00:00
|
|
|
Type: "cosmos",
|
|
|
|
ChainID: chainId,
|
|
|
|
Images: []ibc.DockerImage{{Repository: "kava/kava", Version: kavaImageTag, UidGid: "0:0"}},
|
|
|
|
// Images: []ibc.DockerImage{{Repository: "ghcr.io/strangelove-ventures/heighliner/kava", Version: "v0.26.0", UidGid: "1025:1025"}},
|
2024-04-29 17:13:28 +00:00
|
|
|
Bin: "kava",
|
|
|
|
Bech32Prefix: "kava",
|
|
|
|
Denom: "ukava",
|
|
|
|
GasPrices: "0ukava", // 0 gas price makes calculating expected balances simpler
|
|
|
|
GasAdjustment: 1.5,
|
|
|
|
TrustingPeriod: "168h0m0s",
|
|
|
|
ModifyGenesis: cosmos.ModifyGenesis(genesis),
|
|
|
|
ExposeAdditionalPorts: []string{"8545/tcp"},
|
|
|
|
ConfigFileOverrides: map[string]any{"config/app.toml": appTomlOverrides},
|
|
|
|
}
|
|
|
|
}
|