forked from EscanBE/evermint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chain_config.go
49 lines (41 loc) · 1.06 KB
/
chain_config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package types
//goland:noinspection SpellCheckingInspection
import (
sdkmath "cosmossdk.io/math"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"math/big"
)
type ChainConfig struct {
CosmosChainId string
BaseDenom string
Bech32Prefix string
EvmChainId int64
EvmChainIdBigInt *big.Int // dynamic: calculated from EvmChainId
}
type TestConfig struct {
SecondaryDenomUnits []banktypes.DenomUnit
InitBalanceAmount sdkmath.Int
DefaultFeeAmount sdkmath.Int
DisableTendermint bool
}
type ChainConstantConfig struct {
cosmosChainId string
minDenom string
baseExponent int
}
func NewChainConstantConfig(cosmosChainId, minDenom string, baseExponent int) ChainConstantConfig {
return ChainConstantConfig{
cosmosChainId: cosmosChainId,
minDenom: minDenom,
baseExponent: baseExponent,
}
}
func (c ChainConstantConfig) GetCosmosChainID() string {
return c.cosmosChainId
}
func (c ChainConstantConfig) GetMinDenom() string {
return c.minDenom
}
func (c ChainConstantConfig) GetBaseExponent() int {
return c.baseExponent
}