Skip to content

Commit

Permalink
more setup
Browse files Browse the repository at this point in the history
  • Loading branch information
stackman27 committed Nov 24, 2023
1 parent 7bbaeaa commit 63f8b8f
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/config/chaintype.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ const (
ChainWeMix ChainType = "wemix"
ChainKroma ChainType = "kroma"
ChainZkSync ChainType = "zksync"
ChainKava ChainType = "kava"
)

var ErrInvalidChainType = fmt.Errorf("must be one of %s or omitted", strings.Join([]string{
string(ChainArbitrum), string(ChainMetis), string(ChainXDai), string(ChainOptimismBedrock), string(ChainCelo),
string(ChainKroma), string(ChainWeMix), string(ChainZkSync)}, ", "))
string(ChainKroma), string(ChainWeMix), string(ChainZkSync), string(ChainKava)}, ", "))

// IsValid returns true if the ChainType value is known or empty.
func (c ChainType) IsValid() bool {
switch c {
case "", ChainArbitrum, ChainMetis, ChainOptimismBedrock, ChainXDai, ChainCelo, ChainKroma, ChainWeMix, ChainZkSync:
case "", ChainArbitrum, ChainMetis, ChainOptimismBedrock, ChainXDai, ChainCelo, ChainKroma, ChainWeMix, ChainZkSync, ChainKava:
return true
}
return false
Expand Down
45 changes: 45 additions & 0 deletions core/chains/evm/config/toml/defaults/Kava_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
ChainID = '2222'
ChainType = 'kava-mainnet'
FinalityDepth = 1
LogPollInterval = '6s'
NoNewHeadsThreshold = '40s'
MinIncomingConfirmations = 1




[GasEstimator]

EIP1559DynamicFees = false
PriceMin = '1 wei'
BumpMin = '100 wei'




[GasEstimator.BlockHistory]
BlockHistorySize = 24




[Transactions]
ResendAfterThreshold = '30s'




[HeadTracker]
HistoryDepth = 400




[NodePool]
SyncThreshold = 10




[OCR]
ContractConfirmations = 1
26 changes: 26 additions & 0 deletions core/chains/evm/config/toml/defaults/Kava_Testnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ChainID = '2221'
ChainType = 'kava-testnet'
FinalityDepth = 1
LogPollInterval = '6s'
NoNewHeadsThreshold = '40s'
MinIncomingConfirmations = 1

[GasEstimator]
EIP1559DynamicFees = false
PriceMin = '1 wei'
BumpMin = '100 wei'

[GasEstimator.BlockHistory]
BlockHistorySize = 24

[Transactions]
ResendAfterThreshold = '30s'

[HeadTracker]
HistoryDepth = 400

[NodePool]
SyncThreshold = 10

[OCR]
ContractConfirmations = 1
6 changes: 6 additions & 0 deletions integration-tests/contracts/contract_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ func NewContractDeployer(bcClient blockchain.EVMClient, logger zerolog.Logger) (
return &KromaContractDeployer{NewEthereumContractDeployer(clientImpl, logger)}, nil
case *blockchain.WeMixClient:
return &WeMixContractDeployer{NewEthereumContractDeployer(clientImpl, logger)}, nil
case *blockchain.KavaClient:
return &WeMixContractDeployer{NewEthereumContractDeployer(clientImpl, logger)}, nil
}
return nil, errors.New("unknown blockchain client implementation for contract deployer, register blockchain client in NewContractDeployer")
}
Expand Down Expand Up @@ -256,6 +258,10 @@ type WeMixContractDeployer struct {
*EthereumContractDeployer
}

type KavaContractDeployer struct {
*EthereumContractDeployer
}

// NewEthereumContractDeployer returns an instantiated instance of the ETH contract deployer
func NewEthereumContractDeployer(ethClient blockchain.EVMClient, logger zerolog.Logger) *EthereumContractDeployer {
return &EthereumContractDeployer{
Expand Down

0 comments on commit 63f8b8f

Please sign in to comment.