Documentation ¶
Index ¶
- type AppDeliver
- func (app *AppDeliver) AddDeliverHash(deliverHash []byte)
- func (app *AppDeliver) AddFee(fee int64)
- func (app *AppDeliver) AddRewardValues(rewardValues map[string]uint64)
- func (app *AppDeliver) BCBeginBlock(req abci.RequestBeginBlock) (abci.ResponseBeginBlock, map[string][]byte)
- func (app *AppDeliver) BeginBlock(req abci.RequestBeginBlock) (abci.ResponseBeginBlock, map[string][]byte)
- func (app *AppDeliver) CleanData() error
- func (app *AppDeliver) Commit() abci.ResponseCommit
- func (app *AppDeliver) DeliverTx(tx []byte) (abci.ResponseDeliverTx, map[string][]byte)
- func (app *AppDeliver) EndBlock(req abci.RequestEndBlock) (abci.ResponseEndBlock, map[string][]byte)
- func (app *AppDeliver) Flush(req abci.RequestFlush) abci.ResponseFlush
- func (app *AppDeliver) InitChain(req abci.RequestInitChain) abci.ResponseInitChain
- func (app *AppDeliver) Rollback() error
- func (app *AppDeliver) RunDeliverTx(tx []byte, transaction types.Transaction, pubKey crypto.PubKeyEd25519) (abci.ResponseDeliverTx, map[string][]byte)
- func (app *AppDeliver) SetChainID(chainID string)
- func (app *AppDeliver) SetLogger(logger log.Logger)
- func (app *AppDeliver) TransID() int64
- type Contract
- type InitAppState
- type InitChainInfo
- type MainChainInfo
- type OrgBind
- type Rewarder
- type Signature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppDeliver ¶
type AppDeliver struct {
// contains filtered or unexported fields
}
AppDeliver object of delivertx
func (*AppDeliver) AddDeliverHash ¶
func (app *AppDeliver) AddDeliverHash(deliverHash []byte)
AddDeliverHash - invoked by v1 deliverTx, add v1 deliverHash to v2 tx hash list;
- it was used to calculate appHash.
func (*AppDeliver) AddFee ¶
func (app *AppDeliver) AddFee(fee int64)
AddFee - invoked by v1 deliverTx, add v1 deliverTx fee to v2,
- for calculate total fee of block
func (*AppDeliver) AddRewardValues ¶
func (app *AppDeliver) AddRewardValues(rewardValues map[string]uint64)
AddRewardValues - invoked by v1 deliverTx, add rewardValues to v2,
- it was used to calculate total fee of reward account
func (*AppDeliver) BCBeginBlock ¶
func (app *AppDeliver) BCBeginBlock(req abci.RequestBeginBlock) (abci.ResponseBeginBlock, map[string][]byte)
BCBeginBlock beginblock implementation of app
func (*AppDeliver) BeginBlock ¶
func (app *AppDeliver) BeginBlock(req abci.RequestBeginBlock) (abci.ResponseBeginBlock, map[string][]byte)
BeginBlock beginblock interface of app
func (*AppDeliver) CleanData ¶
func (app *AppDeliver) CleanData() error
func (*AppDeliver) Commit ¶
func (app *AppDeliver) Commit() abci.ResponseCommit
Commit commit interface of app
func (*AppDeliver) DeliverTx ¶
func (app *AppDeliver) DeliverTx(tx []byte) (abci.ResponseDeliverTx, map[string][]byte)
DeliverTx DeliverTx interface of app
func (*AppDeliver) EndBlock ¶
func (app *AppDeliver) EndBlock(req abci.RequestEndBlock) (abci.ResponseEndBlock, map[string][]byte)
func (*AppDeliver) Flush ¶
func (app *AppDeliver) Flush(req abci.RequestFlush) abci.ResponseFlush
Flush flush interface of app
func (*AppDeliver) InitChain ¶
func (app *AppDeliver) InitChain(req abci.RequestInitChain) abci.ResponseInitChain
InitChain init chain
func (*AppDeliver) Rollback ¶
func (app *AppDeliver) Rollback() error
func (*AppDeliver) RunDeliverTx ¶
func (app *AppDeliver) RunDeliverTx(tx []byte, transaction types.Transaction, pubKey crypto.PubKeyEd25519) (abci.ResponseDeliverTx, map[string][]byte)
RunDeliverTx - invoked by v1 deliverTx, if it's standard transfer method.
func (*AppDeliver) SetChainID ¶
func (app *AppDeliver) SetChainID(chainID string)
SetChainID set chainID
func (*AppDeliver) SetLogger ¶
func (app *AppDeliver) SetLogger(logger log.Logger)
SetLogger set logger
func (*AppDeliver) TransID ¶
func (app *AppDeliver) TransID() int64
TransID - invoked by v1 deliverTx, return current transID
- for commit txBuffer to v2
type Contract ¶
type Contract struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` CodeByte sdktypes.HexBytes `json:"codeByte,omitempty"` CodeHash string `json:"codeHash,omitempty"` Owner string `json:"owner,omitempty"` CodeDevSig Signature `json:"codeDevSig,omitempty"` CodeOrgSig Signature `json:"codeOrgSig,omitempty"` }
Contract contract info
type InitAppState ¶
type InitAppState struct { Organization string `json:"organization,omitempty"` GasPriceRatio string `json:"gas_price_ratio"` ChainVersion int64 `json:"chainVersion,omitempty"` Token std.Token `json:"token,omitempty"` RewardStrategy []Rewarder `json:"rewardStrategy,omitempty"` Contracts []Contract `json:"contracts,omitempty"` OrgBind OrgBind `json:"orgBind"` MainChain MainChainInfo `json:"mainChain"` }
InitAppState init chain app state
type InitChainInfo ¶
type InitChainInfo struct { Validators []abci.Validator `json:"validators,omitempty"` ChainID string `json:"chain_id,omitempty"` AppState InitAppState `json:"app_state,omitempty"` }
InitChainInfo init chain parameters info
type MainChainInfo ¶
type MainChainInfo struct { OpenUrls []string `json:"openUrls"` Validators map[string]statedbhelper.Validator `json:"validators"` }