forked from InjectiveLabs/sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
params_legacy.go
105 lines (80 loc) · 5.94 KB
/
params_legacy.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package types
import paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
var (
// ParamsStoreKeyPeggyID stores the peggy id
ParamsStoreKeyPeggyID = []byte("PeggyID")
// ParamsStoreKeyContractHash stores the contract hash
ParamsStoreKeyContractHash = []byte("ContractHash")
// ParamsStoreKeyBridgeContractAddress stores the contract address
ParamsStoreKeyBridgeContractAddress = []byte("BridgeContractAddress")
// ParamsStoreKeyBridgeContractStartHeight stores the bridge contract deployed height
ParamsStoreKeyBridgeContractStartHeight = []byte("BridgeContractChainHeight")
// ParamsStoreKeyBridgeContractChainID stores the bridge chain id
ParamsStoreKeyBridgeContractChainID = []byte("BridgeChainID")
// ParamsStoreKeyCosmosCoinDenom stores native cosmos coin denom
ParamsStoreKeyCosmosCoinDenom = []byte("CosmosCoinDenom")
// ParamsStoreKeyCosmosCoinErc20Contract store L1 erc20 contract address of cosmos native coin
ParamsStoreKeyCosmosCoinErc20Contract = []byte("CosmosCoinErc20Contract")
// ParamsStoreKeySignedValsetsWindow stores the signed blocks window
ParamsStoreKeySignedValsetsWindow = []byte("SignedValsetsWindow")
// ParamsStoreKeySignedBatchesWindow stores the signed blocks window
ParamsStoreKeySignedBatchesWindow = []byte("SignedBatchesWindow")
// ParamsStoreKeySignedClaimsWindow stores the signed blocks window
ParamsStoreKeySignedClaimsWindow = []byte("SignedClaimsWindow")
// ParamsStoreKeyTargetBatchTimeout stores
ParamsStoreKeyTargetBatchTimeout = []byte("TargetBatchTimeout")
// ParamsStoreKeyAverageBlockTime stores the average block time of the Injective Chain in milliseconds
ParamsStoreKeyAverageBlockTime = []byte("AverageBlockTime")
// ParamsStoreKeyAverageEthereumBlockTime stores the average block time of Ethereum in milliseconds
ParamsStoreKeyAverageEthereumBlockTime = []byte("AverageEthereumBlockTime")
// ParamsStoreSlashFractionValset stores the slash fraction valset
ParamsStoreSlashFractionValset = []byte("SlashFractionValset")
// ParamsStoreSlashFractionBatch stores the slash fraction Batch
ParamsStoreSlashFractionBatch = []byte("SlashFractionBatch")
// ParamsStoreSlashFractionClaim stores the slash fraction Claim
ParamsStoreSlashFractionClaim = []byte("SlashFractionClaim")
// ParamsStoreSlashFractionConflictingClaim stores the slash fraction ConflictingClaim
ParamsStoreSlashFractionConflictingClaim = []byte("SlashFractionConflictingClaim")
// ParamStoreUnbondSlashingValsetsWindow stores unbond slashing valset window
ParamStoreUnbondSlashingValsetsWindow = []byte("UnbondSlashingValsetsWindow")
// ParamStoreClaimSlashingEnabled stores ClaimSlashing is enabled or not
ParamStoreClaimSlashingEnabled = []byte("ClaimSlashingEnabled")
// ParamStoreSlashFractionBadEthSignature stores the amount by which a validator making a fraudulent eth signature will be slashed
ParamStoreSlashFractionBadEthSignature = []byte("SlashFractionBadEthSignature")
// ParamStoreValsetRewardAmount is the amount of the coin, both denom and amount to issue
// to a relayer when they relay a valset
ParamStoreValsetRewardAmount = []byte("ValsetReward")
// Ensure that params implements the proper interface
_ paramtypes.ParamSet = &Params{}
)
// ParamKeyTable for auth module
func ParamKeyTable() paramtypes.KeyTable {
return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
}
// ParamSetPairs implements the ParamSet interface and returns all the key/value pairs
// pairs of auth module's parameters.
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
return paramtypes.ParamSetPairs{
paramtypes.NewParamSetPair(ParamsStoreKeyPeggyID, &p.PeggyId, validatePeggyID),
paramtypes.NewParamSetPair(ParamsStoreKeyContractHash, &p.ContractSourceHash, validateContractHash),
paramtypes.NewParamSetPair(ParamsStoreKeyBridgeContractAddress, &p.BridgeEthereumAddress, validateBridgeContractAddress),
paramtypes.NewParamSetPair(ParamsStoreKeyBridgeContractChainID, &p.BridgeChainId, validateBridgeChainID),
paramtypes.NewParamSetPair(ParamsStoreKeyCosmosCoinDenom, &p.CosmosCoinDenom, validateCosmosCoinDenom),
paramtypes.NewParamSetPair(ParamsStoreKeyCosmosCoinErc20Contract, &p.CosmosCoinErc20Contract, validateCosmosCoinErc20Contract),
paramtypes.NewParamSetPair(ParamsStoreKeySignedValsetsWindow, &p.SignedValsetsWindow, validateSignedValsetsWindow),
paramtypes.NewParamSetPair(ParamsStoreKeySignedBatchesWindow, &p.SignedBatchesWindow, validateSignedBatchesWindow),
paramtypes.NewParamSetPair(ParamsStoreKeySignedClaimsWindow, &p.SignedClaimsWindow, validateSignedClaimsWindow),
paramtypes.NewParamSetPair(ParamsStoreKeyAverageBlockTime, &p.AverageBlockTime, validateAverageBlockTime),
paramtypes.NewParamSetPair(ParamsStoreKeyTargetBatchTimeout, &p.TargetBatchTimeout, validateTargetBatchTimeout),
paramtypes.NewParamSetPair(ParamsStoreKeyAverageEthereumBlockTime, &p.AverageEthereumBlockTime, validateAverageEthereumBlockTime),
paramtypes.NewParamSetPair(ParamsStoreSlashFractionValset, &p.SlashFractionValset, validateSlashFractionValset),
paramtypes.NewParamSetPair(ParamsStoreSlashFractionBatch, &p.SlashFractionBatch, validateSlashFractionBatch),
paramtypes.NewParamSetPair(ParamsStoreSlashFractionClaim, &p.SlashFractionClaim, validateSlashFractionClaim),
paramtypes.NewParamSetPair(ParamsStoreSlashFractionConflictingClaim, &p.SlashFractionConflictingClaim, validateSlashFractionConflictingClaim),
paramtypes.NewParamSetPair(ParamStoreSlashFractionBadEthSignature, &p.SlashFractionBadEthSignature, validateSlashFractionBadEthSignature),
paramtypes.NewParamSetPair(ParamStoreUnbondSlashingValsetsWindow, &p.UnbondSlashingValsetsWindow, validateUnbondSlashingValsetsWindow),
paramtypes.NewParamSetPair(ParamStoreClaimSlashingEnabled, &p.ClaimSlashingEnabled, validateClaimSlashingEnabled),
paramtypes.NewParamSetPair(ParamsStoreKeyBridgeContractStartHeight, &p.BridgeContractStartHeight, validateBridgeContractStartHeight),
paramtypes.NewParamSetPair(ParamStoreValsetRewardAmount, &p.ValsetReward, validateValsetReward),
}
}