Documentation ¶
Index ¶
- func Register(contracts []*BoltContract) map[string]Contract
- type BoltContract
- type BoltStubImpl
- func (b *BoltStubImpl) Callee() string
- func (b *BoltStubImpl) Caller() string
- func (b *BoltStubImpl) CrossInvoke(address, method string, args ...*pb.Arg) *Response
- func (b *BoltStubImpl) Delete(key string)
- func (b *BoltStubImpl) Get(key string) (bool, []byte)
- func (b *BoltStubImpl) GetObject(key string, ret interface{}) bool
- func (b *BoltStubImpl) GetTxHash() types.Hash
- func (b *BoltStubImpl) GetTxIndex() uint64
- func (b *BoltStubImpl) Has(key string) bool
- func (b *BoltStubImpl) Logger() logrus.FieldLogger
- func (b *BoltStubImpl) PostEvent(event interface{})
- func (b *BoltStubImpl) PostInterchainEvent(event interface{})
- func (b *BoltStubImpl) Query(prefix string) (bool, [][]byte)
- func (b *BoltStubImpl) Set(key string, value []byte)
- func (b *BoltStubImpl) SetObject(key string, value interface{})
- func (b *BoltStubImpl) ValidationEngine() validator.Engine
- type BoltVM
- type Context
- type Contract
- type Response
- type Stub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoltContract ¶
type BoltStubImpl ¶
type BoltStubImpl struct {
// contains filtered or unexported fields
}
func (*BoltStubImpl) Callee ¶
func (b *BoltStubImpl) Callee() string
func (*BoltStubImpl) Caller ¶
func (b *BoltStubImpl) Caller() string
func (*BoltStubImpl) CrossInvoke ¶
func (b *BoltStubImpl) CrossInvoke(address, method string, args ...*pb.Arg) *Response
func (*BoltStubImpl) Delete ¶
func (b *BoltStubImpl) Delete(key string)
func (*BoltStubImpl) GetObject ¶
func (b *BoltStubImpl) GetObject(key string, ret interface{}) bool
func (*BoltStubImpl) GetTxHash ¶
func (b *BoltStubImpl) GetTxHash() types.Hash
GetTxHash returns the transaction hash
func (*BoltStubImpl) GetTxIndex ¶
func (b *BoltStubImpl) GetTxIndex() uint64
func (*BoltStubImpl) Has ¶
func (b *BoltStubImpl) Has(key string) bool
func (*BoltStubImpl) Logger ¶
func (b *BoltStubImpl) Logger() logrus.FieldLogger
func (*BoltStubImpl) PostEvent ¶
func (b *BoltStubImpl) PostEvent(event interface{})
func (*BoltStubImpl) PostInterchainEvent ¶
func (b *BoltStubImpl) PostInterchainEvent(event interface{})
func (*BoltStubImpl) Set ¶
func (b *BoltStubImpl) Set(key string, value []byte)
func (*BoltStubImpl) SetObject ¶
func (b *BoltStubImpl) SetObject(key string, value interface{})
func (*BoltStubImpl) ValidationEngine ¶
func (b *BoltStubImpl) ValidationEngine() validator.Engine
type BoltVM ¶
type BoltVM struct {
// contains filtered or unexported fields
}
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext(tx *pb.Transaction, txIndex uint64, data *pb.TransactionData, ledger ledger.Ledger, logger logrus.FieldLogger) *Context
func (*Context) Logger ¶
func (ctx *Context) Logger() logrus.FieldLogger
func (*Context) TransactionHash ¶
func (*Context) TransactionIndex ¶
type Response ¶
type Stub ¶
type Stub interface { // Caller Caller() string // Callee Callee() string // Logger Logger() logrus.FieldLogger // GetTxHash returns the transaction hash GetTxHash() types.Hash // GetTxIndex returns the transaction index in the block GetTxIndex() uint64 // Has judges key Has(key string) bool // Get gets value from datastore by key Get(key string) (bool, []byte) // GetObject GetObject(key string, ret interface{}) bool // Set sets k-v Set(key string, value []byte) // SetObject sets k with object v, v will be marshaled using json SetObject(key string, value interface{}) // Delete deletes k-v Delete(key string) // QueryByPrefix queries object by prefix Query(prefix string) (bool, [][]byte) // PostEvent posts event to external PostEvent(interface{}) // PostInterchainEvent posts interchain event to external PostInterchainEvent(interface{}) // Validator returns the instance of validator ValidationEngine() validator.Engine // CrossInvoke cross contract invoke CrossInvoke(address, method string, args ...*pb.Arg) *Response }
Click to show internal directories.
Click to hide internal directories.