Documentation
¶
Index ¶
- type BlockchainBase
- func (b *BlockchainBase) Confirm(result *common.Result, ops ...common.Option) *common.Result
- func (b *BlockchainBase) DeployContract() error
- func (b *BlockchainBase) GetContext() (string, error)
- func (b *BlockchainBase) Invoke(common.Invoke, ...common.Option) *common.Result
- func (b *BlockchainBase) LogStatus() (int64, error)
- func (b *BlockchainBase) Option(common.Option) error
- func (b *BlockchainBase) Query(common.Query, ...common.Option) interface{}
- func (b *BlockchainBase) ResetContext() error
- func (b *BlockchainBase) SetContext(ctx string) error
- func (b *BlockchainBase) Statistic(statistic common.Statistic) (*common.RemoteStatistic, error)
- func (b *BlockchainBase) Transfer(common.Transfer, ...common.Option) *common.Result
- type ClientConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockchainBase ¶
type BlockchainBase struct {
ClientConfig
Logger *logging.Logger
}
BlockchainBase the base implementation of blockChain.
func NewBlockchainBase ¶
func NewBlockchainBase(clientConfig ClientConfig) *BlockchainBase
NewBlockchainBase new blockchain base.
func (*BlockchainBase) DeployContract ¶
func (b *BlockchainBase) DeployContract() error
DeployContract send tx for deploy contract.
func (*BlockchainBase) GetContext ¶
func (b *BlockchainBase) GetContext() (string, error)
GetContext get context for execute tx in vm.
func (*BlockchainBase) LogStatus ¶
func (b *BlockchainBase) LogStatus() (int64, error)
LogStatus records blockheight and time
func (*BlockchainBase) Option ¶
func (b *BlockchainBase) Option(common.Option) error
Option receive some options.
func (*BlockchainBase) Query ¶
func (b *BlockchainBase) Query(common.Query, ...common.Option) interface{}
Query query info.
func (*BlockchainBase) ResetContext ¶
func (b *BlockchainBase) ResetContext() error
ResetContext reset context.
func (*BlockchainBase) SetContext ¶
func (b *BlockchainBase) SetContext(ctx string) error
SetContext set context for execute tx in vm.
func (*BlockchainBase) Statistic ¶
func (b *BlockchainBase) Statistic(statistic common.Statistic) (*common.RemoteStatistic, error)
Statistic statistic remote execute result.
type ClientConfig ¶
type ClientConfig struct {
// client
ClientType string `mapstructure:"type"`
ConfigPath string `mapstructure:"config"`
// contract
ContractPath string `mapstructure:"contract"`
Args []interface{} `mapstructure:"args"`
// options
Options map[string]interface{} `mapstructure:"options"`
}
ClientConfig define the filed for client config.
Click to show internal directories.
Click to hide internal directories.