Documentation
¶
Index ¶
- Constants
- Variables
- func CreateContextAndRegisterRoutes(router *mux.Router)
- func GetDefaultAuthGenesisState() auth.GenesisState
- func MakeCodec() *codec.Codec
- type Account2UnconfirmedTx
- func (acc2unc *Account2UnconfirmedTx) Add(addr sdk.AccAddress, hashid []byte, timestamp int64)
- func (acc2unc *Account2UnconfirmedTx) AddToRemoveList(addrs []sdk.AccAddress)
- func (acc2unc *Account2UnconfirmedTx) ClearRemoveList()
- func (acc2unc *Account2UnconfirmedTx) CommitRemove(timestamp int64)
- func (acc2unc *Account2UnconfirmedTx) Lookup(addr sdk.AccAddress, hashid []byte, timestamp int64) int
- type AuthModuleBasic
- type CetChainApp
- func (app *CetChainApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx
- func (app *CetChainApp) Commit() abci.ResponseCommit
- func (app *CetChainApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx
- func (app *CetChainApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
- func (app *CetChainApp) ExportGenesisState(ctx sdk.Context) GenesisState
- func (app *CetChainApp) LoadHeight(height int64) error
- func (app *CetChainApp) ModuleAccountAddrs() map[string]bool
- type CrisisModuleBasic
- type GenesisState
- type GovModuleBasic
- type NewHeightInfo
- type NotificationBeginRedelegation
- type NotificationBeginUnbonding
- type NotificationCompleteRedelegation
- type NotificationCompleteUnbonding
- type NotificationDelegatorRewards
- type NotificationSlash
- type NotificationTx
- type NotificationValidatorCommission
- type PubMsg
- type SlashingModuleBasic
- type StakingModuleBasic
- type TransferRecord
- type TxExtraInfo
- type UnconfirmedTx
Constants ¶
View Source
const ( CodeSpaceUnconfirmedLimit sdk.CodespaceType = "unconfirmed_limit" CodeTooManyUnconfirmedTx sdk.CodeType = 2100 )
View Source
const ( SameTxExist = 1 OtherTxExist = 2 NoTxExist = 3 SweepPeriod = 15 * 60 // 15 minutes DefaultLimitTime = 60 // a minute )
View Source
const ( DefaultMaxMemoCharacters uint64 = 512 DefaultTxSizeCostPerByte uint64 = 20 DefaultSigVerifyCostED25519 uint64 = 11800 DefaultSigVerifyCostSecp256k1 uint64 = 20000 )
auth
View Source
const ( // DefaultUnbondingTime reflects three weeks in seconds as the default // unbonding time. DefaultUnbondingTime = 21 * Day // Default maximum number of bonded validators DefaultMaxValidators uint16 = 42 )
staking
View Source
const ( DefaultMaxEvidenceAge = 21 * Day DefaultSignedBlocksWindow int64 = 10000 )
slashing
View Source
const ( // Default period for deposits & voting DefaultPeriod = 14 * Day // TODO VotingPeriod = 7 * Day )
gov
View Source
const ( //alias OpWeightMsgAliasUpdate = "op_weight_msg_alias_update" // asset OpWeightMsgIssueToken = "op_weight_msg_issue_token" OpWeightMsgTransferOwnership = "op_weight_msg_transfer_ownership" OpWeightMsgMintToken = "op_weight_msg_mint_token" OpWeightMsgBurnToken = "op_weight_msg_burn_token" OpWeightMsgForbidToken = "op_weight_msg_forbid_token" OpWeightMsgUnForbidToken = "op_weight_msg_unforbid_token" OpWeightMsgAddTokenWhitelist = "op_weight_msg_add_token_whitelist" OpWeightMsgRemoveTokenWhitelist = "op_weight_msg_remove_token_whitelist" OpWeightMsgForbidAddr = "op_weight_msg_forbid_addr" OpWeightMsgUnForbidAddr = "op_weight_msg_unforbid_addr" OpWeightMsgModifyTokenInfo = "op_weight_msg_modify_token_info" // bancorlite OpWeightMsgBancorInit = "op_weight_msg_bancor_init" OpWeightMsgBancorTrade = "op_weight_msg_bancor_trade" OpWeightMsgBancorCancel = "op_weight_msg_bancor_cancel" // bankx OpWeightMsgSetMemoRequired = "op_weight_msg_set_memo_required" //comment OpWeightCreateNewThread = "op_weight_create_new_thread" OpWeightCreateCommentRefs = "op_weight_create_comment_refs" // distrx OpWeightMsgDonateToCommunityPool = "op_weight_msg_donate_to_community_pool" //market OpWeightMsgCreateTradingPair = "op_weight_msg_create_trading_pair" OpWeightMsgCancelTradingPair = "op_weight_msg_cancel_trading_pair" OpWeightMsgModifyPricePrecision = "op_weight_msg_modify_price_precision" OpWeightMsgCreateOrder = "op_weight_msg_create_order" OpWeightMsgCancelOrder = "op_weight_msg_cancel_order" )
View Source
const Day = 24 * time.Hour
View Source
const (
DefaultEvidenceMaxAge int64 = 1000000
)
consensus
View Source
const (
// DefaultKeyPass contains the default key password for genesis transactions
DefaultKeyPass = "12345678"
)
View Source
const (
MinSelfDelegation = 1000000e8
)
staking
View Source
const (
TSDirCfg = "dir"
)
Variables ¶
View Source
var ( // default home directories for cetcli DefaultCLIHome = os.ExpandEnv("$HOME/.cetcli") // default home directories for cetd DefaultNodeHome = os.ExpandEnv("$HOME/.cetd") // The ModuleBasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics dex.OrderedBasicManager // account permissions MaccPerms = map[string][]string{ auth.FeeCollectorName: nil, distr.ModuleName: nil, staking.BondedPoolName: {supply.Burner, supply.Staking}, staking.NotBondedPoolName: {supply.Burner, supply.Staking}, gov.ModuleName: {supply.Burner}, authx.ModuleName: nil, asset.ModuleName: {supply.Burner, supply.Minter}, } )
default home directories for expected binaries
View Source
var ( DefaultMinSignedPerWindow = sdk.NewDecWithPrec(5, 2) // 0.05 DefaultSlashFractionDoubleSign = sdk.NewDec(1).Quo(sdk.NewDec(20)) // 0.05 DefaultSlashFractionDowntime = sdk.NewDec(1).Quo(sdk.NewDec(10000)) // 0.0001 DefaultGovMinDeposit = sdk.NewInt(10000e8) DefaultCrisisConstantFee = sdk.NewInt(100000e8) )
Functions ¶
func GetDefaultAuthGenesisState ¶
func GetDefaultAuthGenesisState() auth.GenesisState
Types ¶
type Account2UnconfirmedTx ¶
type Account2UnconfirmedTx struct {
// contains filtered or unexported fields
}
func NewAccount2UnconfirmedTx ¶
func NewAccount2UnconfirmedTx(limitTime int64) *Account2UnconfirmedTx
func (*Account2UnconfirmedTx) Add ¶
func (acc2unc *Account2UnconfirmedTx) Add(addr sdk.AccAddress, hashid []byte, timestamp int64)
func (*Account2UnconfirmedTx) AddToRemoveList ¶
func (acc2unc *Account2UnconfirmedTx) AddToRemoveList(addrs []sdk.AccAddress)
func (*Account2UnconfirmedTx) ClearRemoveList ¶
func (acc2unc *Account2UnconfirmedTx) ClearRemoveList()
func (*Account2UnconfirmedTx) CommitRemove ¶
func (acc2unc *Account2UnconfirmedTx) CommitRemove(timestamp int64)
func (*Account2UnconfirmedTx) Lookup ¶
func (acc2unc *Account2UnconfirmedTx) Lookup(addr sdk.AccAddress, hashid []byte, timestamp int64) int
type AuthModuleBasic ¶
type AuthModuleBasic struct {
auth.AppModuleBasic
}
func (AuthModuleBasic) DefaultGenesis ¶
func (amb AuthModuleBasic) DefaultGenesis() json.RawMessage
type CetChainApp ¶
Extended ABCI application
func NewCetChainApp ¶
func NewCetChainApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, invCheckPeriod uint, baseAppOptions ...func(*bam.BaseApp)) *CetChainApp
NewCetChainApp returns a reference to an initialized CetChainApp.
func (*CetChainApp) CheckTx ¶
func (app *CetChainApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx
func (*CetChainApp) Commit ¶
func (app *CetChainApp) Commit() abci.ResponseCommit
func (*CetChainApp) DeliverTx ¶
func (app *CetChainApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx
func (*CetChainApp) ExportAppStateAndValidators ¶
func (app *CetChainApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) ( appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
export the state of CoinEx chain for a genesis file
func (*CetChainApp) ExportGenesisState ¶
func (app *CetChainApp) ExportGenesisState(ctx sdk.Context) GenesisState
func (*CetChainApp) LoadHeight ¶
func (app *CetChainApp) LoadHeight(height int64) error
load a particular height
func (*CetChainApp) ModuleAccountAddrs ¶
func (app *CetChainApp) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the app's module account addresses.
type CrisisModuleBasic ¶
type CrisisModuleBasic struct {
crisis.AppModuleBasic
}
func (CrisisModuleBasic) DefaultGenesis ¶
func (CrisisModuleBasic) DefaultGenesis() json.RawMessage
type GenesisState ¶
type GenesisState struct { Accounts genaccounts.GenesisState `json:"accounts"` AuthData auth.GenesisState `json:"auth"` AuthXData authx.GenesisState `json:"authx"` BankData bank.GenesisState `json:"bank"` BankXData bankx.GenesisState `json:"bankx"` StakingData staking.GenesisState `json:"staking"` StakingXData stakingx.GenesisState `json:"stakingx"` DistrData distribution.GenesisState `json:"distribution"` GovData gov.GenesisState `json:"gov"` CrisisData crisis.GenesisState `json:"crisis"` SlashingData slashing.GenesisState `json:"slashing"` AssetData asset.GenesisState `json:"asset"` MarketData market.GenesisState `json:"market"` BancorData bancorlite.GenesisState `json:"bancorlite"` CommentData comment.GenesisState `json:"comment"` AliasData alias.GenesisState `json:"alias"` Incentive incentive.GenesisState `json:"incentive"` Supply supply.GenesisState `json:"supply"` GenUtil genutil.GenesisState `json:"genutil"` }
State to Unmarshal
func FromMap ¶
func FromMap(cdc *codec.Codec, g map[string]json.RawMessage) GenesisState
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() GenesisState
type GovModuleBasic ¶
type GovModuleBasic struct {
gov.AppModuleBasic
}
func (GovModuleBasic) DefaultGenesis ¶
func (GovModuleBasic) DefaultGenesis() json.RawMessage
type NewHeightInfo ¶
type NotificationSlash ¶
type NotificationTx ¶
type NotificationTx struct { Signers []sdk.AccAddress `json:"signers"` Transfers []TransferRecord `json:"transfers"` SerialNumber int64 `json:"serial_number"` MsgTypes []string `json:"msg_types"` TxJSON string `json:"tx_json"` Height int64 `json:"height"` Hash []byte `json:"hash"` ExtraInfo string `json:"extra_info,omitempty"` }
type SlashingModuleBasic ¶
type SlashingModuleBasic struct {
slashing.AppModuleBasic
}
func (SlashingModuleBasic) DefaultGenesis ¶
func (SlashingModuleBasic) DefaultGenesis() json.RawMessage
type StakingModuleBasic ¶
type StakingModuleBasic struct {
staking.AppModuleBasic
}
func (StakingModuleBasic) DefaultGenesis ¶
func (StakingModuleBasic) DefaultGenesis() json.RawMessage
type TransferRecord ¶
type TxExtraInfo ¶
type TxExtraInfo struct { Code uint32 `json:"code,omitempty"` Data []byte `json:"data,omitempty"` Log string `json:"log,omitempty"` Info string `json:"info,omitempty"` GasWanted int64 `json:"gas_wanted,omitempty"` GasUsed int64 `json:"gas_used,omitempty"` Events []abci.Event `json:"events,omitempty"` Codespace string `json:"codespace,omitempty"` }
type UnconfirmedTx ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.