Documentation ¶
Index ¶
- Constants
- Variables
- type AMOAppConfig
- type Currency
- func (c *Currency) Add(a *Currency) *Currency
- func (c *Currency) Clone() (*Currency, error)
- func (c Currency) Equals(a *Currency) bool
- func (c Currency) GreaterThan(a *Currency) bool
- func (c Currency) LessThan(a *Currency) bool
- func (c Currency) MarshalJSON() ([]byte, error)
- func (c *Currency) Set(x uint64) *Currency
- func (c *Currency) SetAMO(x float64) *Currency
- func (c *Currency) SetBytes(x []byte) (*Currency, error)
- func (c *Currency) SetString(x string, base int) (*Currency, error)
- func (c Currency) String() string
- func (c *Currency) Sub(a *Currency) *Currency
- func (c *Currency) UnmarshalJSON(data []byte) error
- type Delegate
- type DelegateEx
- type Draft
- type DraftEx
- type Extra
- type Parcel
- type ParcelEx
- type Request
- type RequestEx
- type Stake
- type StakeEx
- type Storage
- type UDC
- type Usage
- type UsageEx
- type Vote
- type VoteInfo
Constants ¶
View Source
const (
OneAMOUint64 = uint64(1000000000000000000) // in decimal
)
View Source
const StorageIDLen = 4
Variables ¶
View Source
var Zero = new(Currency).Set(0)
Functions ¶
This section is empty.
Types ¶
type AMOAppConfig ¶ added in v1.4.1
type AMOAppConfig struct { MaxValidators uint64 `json:"max_validators"` WeightValidator float64 `json:"weight_validator"` WeightDelegator float64 `json:"weight_delegator"` MinStakingUnit Currency `json:"min_staking_unit"` BlkReward Currency `json:"blk_reward"` TxReward Currency `json:"tx_reward"` PenaltyRatioM float64 `json:"penalty_ratio_m"` // malicious validator PenaltyRatioL float64 `json:"penalty_ratio_l"` // lazy validators LazinessCounterWindow int64 `json:"laziness_counter_window"` LazinessThreshold float64 `json:"laziness_threshold"` BlockBindingWindow int64 `json:"block_binding_window"` LockupPeriod int64 `json:"lockup_period"` DraftOpenCount int64 `json:"draft_open_count"` DraftCloseCount int64 `json:"draft_close_count"` DraftApplyCount int64 `json:"draft_apply_count"` DraftDeposit Currency `json:"draft_deposit"` DraftQuorumRate float64 `json:"draft_quorum_rate"` DraftPassRate float64 `json:"draft_pass_rate"` DraftRefundRate float64 `json:"draft_refund_rate"` UpgradeProtocolHeight int64 `json:"upgrade_protocol_height"` UpgradeProtocolVersion uint64 `json:"upgrade_protocol_version"` }
func (*AMOAppConfig) Check ¶ added in v1.4.1
func (cfg *AMOAppConfig) Check( blockHeight int64, protocolVersion uint64, txCfgRaw json.RawMessage, ) (AMOAppConfig, error)
type Currency ¶
Currency uses big endian for compatibility to big.Int
func (Currency) GreaterThan ¶
func (Currency) MarshalJSON ¶
func (*Currency) UnmarshalJSON ¶
type DelegateEx ¶ added in v1.1.0
type Draft ¶ added in v1.4.1
type Draft struct { Proposer crypto.Address `json:"proposer"` Config AMOAppConfig `json:"config"` Desc string `json:"desc"` OpenCount int64 `json:"open_count"` CloseCount int64 `json:"close_count"` ApplyCount int64 `json:"apply_count"` Deposit Currency `json:"deposit"` TallyQuorum Currency `json:"tally_quorum"` TallyApprove Currency `json:"tally_approve"` TallyReject Currency `json:"tally_reject"` }
type Extra ¶ added in v1.4.1
type Extra struct { Register json.RawMessage `json:"register,omitempty"` Request json.RawMessage `json:"request,omitempty"` Grant json.RawMessage `json:"grant,omitempty"` }
type Stake ¶
type Stake struct { Validator ed25519.PubKeyEd25519 `json:"validator"` Amount Currency `json:"amount"` }
type StakeEx ¶ added in v1.1.0
type StakeEx struct { *Stake Delegates []*DelegateEx `json:"delegates,omitempty"` }
func (StakeEx) MarshalJSON ¶ added in v1.5.0
Click to show internal directories.
Click to hide internal directories.