Versions in this module Expand all Collapse all v0 v0.0.2 Mar 21, 2024 v0.0.1 Mar 13, 2024 Changes in this version + const PoolEco + const PoolInc + const PoolInv + const PoolTeam + const TxActionCall + const TxActionJoin + const TxActionLeave + const TxActionPropose + const TxActionStake + const TxActionSwap + const TxActionTransfer + const TxActionUnstake + const TxVersionV1 + var ErrInsufficientStake = errors.New("err_insufficient_stake") + var ErrInvalidAccountType = errors.New("err_invalid_account_type") + var ErrInvalidAmount = errors.New("err_invalid_amount") + var ErrInvalidFee = errors.New("err_invalid_fee") + var ErrInvalidFeeRecipient = errors.New("err_invalid_fee_recipient") + var ErrInvalidFromRouter = errors.New("err_invalid_from_router") + var ErrInvalidNonce = errors.New("err_invalid_nonce") + var ErrInvalidProposal = errors.New("err_invalid_proposal") + var ErrInvalidProposer = errors.New("err_invalid_proposer") + var ErrInvalidRouterAddress = errors.New("err_invalid_router_address") + var ErrInvalidRouterName = errors.New("err_invalid_router_name") + var ErrInvalidStakePool = errors.New("err_invalid_stake_pool") + var ErrInvalidTx = errors.New("err_invalid_tx") + var ErrInvalidTxAction = errors.New("err_invalid_tx_action") + var ErrInvalidTxField = errors.New("err_invalid_tx_field") + var ErrInvalidTxParams = errors.New("err_invalid_tx_params") + var ErrNoProposalFound = errors.New("err_no_proposal_found") + var ErrNotARouter = errors.New("err_not_a_router") + var ErrRouterAlreadyJoined = errors.New("err_router_already_joined") + var ErrTxExecuted = errors.New("err_tx_executed") + var Fee0005 = "0.0005" + var Fee001 = "0.001" + var Fee003 = "0.003" + var Fee01 = "0.01" + var TxActionsSupported = []string + func CopyRouterState(dst, src *RouterState) + func CopyToken(dst, src *token.Token) + type Executor struct + Execute func(*Transaction, *StateForProposal, *Oracle, string, string) (*StateForProposal, string, string, error) + LocalState string + LocalStateHash string + RunnedTimes int64 + type Oracle struct + EverTokens map[string]everSchema.TokenInfo + type Pool struct + FeeRatio string + TokenXTag string + TokenYTag string + func (pool *Pool) ID() string + func (pool *Pool) String() string + type Proposal struct + End int64 + Executor *Executor + ID string + InitData string + Name string + OnlyAcceptedTxActions []string + RunTimes int64 + Source string + Start int64 + func (p *Proposal) Hash() []byte + func (p *Proposal) HexHash() string + func (p *Proposal) String() string + type RouterState struct + Desc string + Domain string + Ip string + Logo string + LpMinStake string + LpPenalty string + Name string + Pools map[string]*Pool + Router string + SwapFeeRatio string + SwapFeeRecipient string + type State struct + Accounts map[string]*account.Account + ChainID string + Dapp string + Executed []string + FeeRecipient string + Govern string + LatestTxEverHash string + LatestTxHash string + OnlyUnStakePools []string + Proposals []*Proposal + RouterMinStake string + RouterStates map[string]*RouterState + Routers []string + StakePools []string + StateHash string + Token *token.Token + Validity map[string]bool + func (s *State) GetStateForProposal() *StateForProposal + func (s *State) Hash() string + func (s *State) UpdateState(ns *StateForProposal) + type StateForProposal struct + ChainID string + Dapp string + FeeRecipient string + Govern string + OnlyUnStakePools []string + RouterMinStake string + RouterStates map[string]*RouterState + Routers []string + StakePools []string + Token *token.Token + type Transaction struct + Action string + ChainID string + Dapp string + EverHash string + Fee string + FeeRecipient string + From string + Nonce string + Params string + Router string + Sig string + Version string + func (t *Transaction) ArHash() []byte + func (t *Transaction) Hash() []byte + func (t *Transaction) HexHash() string + func (t *Transaction) String() string + type TxApply struct + DryRun bool + Tx Transaction + type TxCallParams struct + Function string + Params string + ProposalID string + type TxProposeParams struct + End int64 + InitData string + Name string + OnlyAcceptedTxActions []string + RunTimes int64 + Source string + Start int64 + type TxStakeParams struct + Amount string + StakePool string + type TxSwapParams struct + type TxTransferParams struct + Amount string + To string + type TxUnstakeParams struct + Amount string + StakePool string