Documentation
¶
Index ¶
- Constants
- Variables
- func ErrGasPriceTooLow(required, actual sdk.Dec) sdk.Error
- func ErrInvalidMinGasPriceLimit(limit sdk.Dec) sdk.Error
- func ParamKeyTable() params.KeyTable
- func RegisterCodec(cdc *codec.Codec)
- type AccountAll
- type AccountMix
- type AccountX
- func (acc *AccountX) AddLockedCoins(coins LockedCoins)
- func (acc *AccountX) GetAddress() sdk.AccAddress
- func (acc *AccountX) GetAllCoins() sdk.Coins
- func (acc *AccountX) GetAllLockedCoins() LockedCoins
- func (acc *AccountX) GetAllUnlockedCoinsAtTheTime(time int64) LockedCoins
- func (acc *AccountX) GetLockedCoinsByDemon(demon string) LockedCoins
- func (acc *AccountX) GetUnlockedCoinsAtTheTime(demon string, time int64) LockedCoins
- func (acc *AccountX) IsMemoRequired() bool
- func (acc *AccountX) SetAddress(address sdk.AccAddress)
- func (acc *AccountX) SetMemoRequired(b bool)
- func (acc AccountX) String() string
- type AccountXs
- type LockedCoin
- type LockedCoins
- type Params
Constants ¶
View Source
const ( CodeSpaceAuthX sdk.CodespaceType = "authx" // 201 ~ 299 CodeInvalidMinGasPriceLimit sdk.CodeType = 201 CodeGasPriceTooLow sdk.CodeType = 202 )
View Source
const ( // StoreKey is string representation of the store key for authx StoreKey = "accx" // QuerierRoute is the querier route for accx QuerierRoute = StoreKey )
View Source
const ( // DefaultMinGasPrice of the network // Make token transfer/send tx to costs around 0.01CET // activated account send to self, costs 38883 gas // activated account send to non-activated account, costs 48951 gas // activated account send to other activated addr, costs 33903 gas // consider it takes 50000 to do transfer/send tx // so, min_gas_price = 100000000sato.CET * 0.01 / 50000 = 20 sato.CET DefaultMinGasPriceLimit = "20.0" )
Default parameter values
View Source
const DefaultParamspace = ModuleName
DefaultParamspace defines the default authx module parameter subspace
View Source
const ModuleName = "authx"
View Source
const (
QueryAccountX = "accountx"
)
query endpoints supported by the auth Querier
Variables ¶
View Source
var (
KeyMinGasPriceLimit = []byte("MinGasPriceLimit")
)
Parameter keys
View Source
var ModuleCdc = codec.New()
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on the codec
Types ¶
type AccountAll ¶
type AccountAll struct { Account auth.Account `json:"account"` AccountX AccountX `json:"account_x"` }
func (AccountAll) String ¶
func (accAll AccountAll) String() string
type AccountMix ¶
type AccountMix struct { Address sdk.AccAddress `json:"address"` Coins sdk.Coins `json:"coins"` LockedCoins LockedCoins `json:"locked_coins"` FrozenCoins sdk.Coins `json:"frozen_coins"` PubKey crypto.PubKey `json:"public_key"` AccountNumber uint64 `json:"account_number"` Sequence uint64 `json:"sequence"` MemoRequired bool `json:"memo_required"` // if memo is required for receiving coins }
func NewAccountMix ¶
func NewAccountMix(acc auth.Account, x AccountX) AccountMix
type AccountX ¶
type AccountX struct { Address sdk.AccAddress `json:"address"` MemoRequired bool `json:"memo_required"` // if memo is required for receiving coins LockedCoins LockedCoins `json:"locked_coins"` FrozenCoins sdk.Coins `json:"frozen_coins"` }
func NewAccountX ¶
func NewAccountX(address sdk.AccAddress, memoRequired bool, lockedCoins LockedCoins, frozenCoins sdk.Coins) AccountX
func NewAccountXWithAddress ¶
func NewAccountXWithAddress(addr sdk.AccAddress) AccountX
func (*AccountX) AddLockedCoins ¶
func (acc *AccountX) AddLockedCoins(coins LockedCoins)
func (*AccountX) GetAddress ¶
func (acc *AccountX) GetAddress() sdk.AccAddress
func (*AccountX) GetAllCoins ¶
func (*AccountX) GetAllLockedCoins ¶
func (acc *AccountX) GetAllLockedCoins() LockedCoins
func (*AccountX) GetAllUnlockedCoinsAtTheTime ¶
func (acc *AccountX) GetAllUnlockedCoinsAtTheTime(time int64) LockedCoins
func (*AccountX) GetLockedCoinsByDemon ¶
func (acc *AccountX) GetLockedCoinsByDemon(demon string) LockedCoins
func (*AccountX) GetUnlockedCoinsAtTheTime ¶
func (acc *AccountX) GetUnlockedCoinsAtTheTime(demon string, time int64) LockedCoins
func (*AccountX) IsMemoRequired ¶
func (*AccountX) SetAddress ¶
func (acc *AccountX) SetAddress(address sdk.AccAddress)
func (*AccountX) SetMemoRequired ¶
type LockedCoin ¶
func NewLockedCoin ¶
func NewLockedCoin(denom string, amount sdk.Int, unlockTime int64) LockedCoin
func (LockedCoin) String ¶
func (coin LockedCoin) String() string
type LockedCoins ¶
type LockedCoins []LockedCoin
func (LockedCoins) String ¶
func (coins LockedCoins) String() string
type Params ¶
Params defines the parameters for the authx module.
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of authx module's parameters.
Click to show internal directories.
Click to hide internal directories.