59 lines
1.3 KiB
Go
59 lines
1.3 KiB
Go
package types
|
|
|
|
import (
|
|
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
|
"gopkg.in/yaml.v2"
|
|
)
|
|
|
|
var _ paramtypes.ParamSet = (*Params)(nil)
|
|
|
|
// ParamKeyTable the param key table for launch module
|
|
func ParamKeyTable() paramtypes.KeyTable {
|
|
return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
|
|
}
|
|
|
|
// NewParams creates a new Params instance
|
|
func NewParams() Params {
|
|
// return Params{}
|
|
|
|
// temp fix
|
|
|
|
return Params{
|
|
GpuModels: map[string]uint32{
|
|
"gtx-1050-ti": 0,
|
|
"gtx-1650-ti": 0,
|
|
},
|
|
AuctionTime: 10,
|
|
ProviderMinLockedUClr: 500_000_000,
|
|
ProviderLockedSlashUClr: 100_000_000,
|
|
AuctionGas: 10,
|
|
MinLeasePeriod: 3_600, // 1 hour
|
|
MaxLeasePeriod: 8_035_200, // 3 months
|
|
MaxVerifiedProviders: 1000,
|
|
ProviderAuditFrequency: 400,
|
|
ProviderAuditLength: 4,
|
|
AllowedAuctionDenoms: []string{"uclr", "uusdc"},
|
|
}
|
|
}
|
|
|
|
// DefaultParams returns a default set of parameters
|
|
func DefaultParams() Params {
|
|
return NewParams()
|
|
}
|
|
|
|
// ParamSetPairs get the params.ParamSet
|
|
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
|
|
return paramtypes.ParamSetPairs{}
|
|
}
|
|
|
|
// Validate validates the set of params
|
|
func (p Params) Validate() error {
|
|
return nil
|
|
}
|
|
|
|
// String implements the Stringer interface.
|
|
func (p Params) String() string {
|
|
out, _ := yaml.Marshal(p)
|
|
return string(out)
|
|
}
|