Documentation
¶
Index ¶
- Constants
- Variables
- func NewCallContractProcessor(encs encoder.Encoders) ctypes.GetNewProcessorWithProposal
- func NewRegisterContractProcessor(encs encoder.Encoders) ctypes.GetNewProcessorWithProposal
- type CallContract
- type CallContractFact
- func (fact CallContractFact) Addresses() ([]base.Address, error)
- func (fact CallContractFact) Bytes() []byte
- func (fact CallContractFact) CallData() map[string]string
- func (fact CallContractFact) Contract() base.Address
- func (fact *CallContractFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *CallContractFact) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (fact CallContractFact) GenerateHash() util.Hash
- func (fact CallContractFact) Hash() util.Hash
- func (fact CallContractFact) IsValid(b []byte) error
- func (fact CallContractFact) Items() []CallContractItem
- func (fact CallContractFact) MarshalBSON() ([]byte, error)
- func (fact CallContractFact) MarshalJSON() ([]byte, error)
- func (fact CallContractFact) Sender() base.Address
- func (fact CallContractFact) Token() base.Token
- type CallContractFactBSONUnmarshaler
- type CallContractFactJSONMarshaler
- type CallContractFactJSONUnmarshaler
- type CallContractItem
- func (it CallContractItem) Bytes() []byte
- func (it CallContractItem) CallData() map[string]string
- func (it *CallContractItem) DecodeBSON(b []byte, _ *bsonenc.Encoder) error
- func (it *CallContractItem) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (it CallContractItem) Function() string
- func (it CallContractItem) IsValid([]byte) error
- func (it CallContractItem) MarshalBSON() ([]byte, error)
- func (it CallContractItem) MarshalJSON() ([]byte, error)
- func (it CallContractItem) Rebuild() CallContractItem
- func (it *CallContractItem) UnmarshalBSON(b []byte) error
- func (it *CallContractItem) UnmarshalJSON(b []byte) error
- type CallContractItemBSONUnmarshaler
- type CallContractItemJSONMarshaler
- type CallContractItemJSONUnmarshaler
- type CallContractProcessor
- func (opp *CallContractProcessor) Close() error
- func (opp *CallContractProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *CallContractProcessor) Process(_ context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type RegisterContract
- type RegisterContractFact
- func (fact RegisterContractFact) Addresses() ([]base.Address, error)
- func (fact RegisterContractFact) Bytes() []byte
- func (fact RegisterContractFact) Contract() base.Address
- func (fact RegisterContractFact) ContractCode() string
- func (fact *RegisterContractFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *RegisterContractFact) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (fact RegisterContractFact) GenerateHash() util.Hash
- func (fact RegisterContractFact) Hash() util.Hash
- func (fact RegisterContractFact) IsValid(b []byte) error
- func (fact RegisterContractFact) MarshalBSON() ([]byte, error)
- func (fact RegisterContractFact) MarshalJSON() ([]byte, error)
- func (fact RegisterContractFact) Sender() base.Address
- func (fact RegisterContractFact) Token() base.Token
- type RegisterContractFactJSONMarshaler
- type RegisterContractFactJSONUnmarshaler
- type RegisterContractProcessor
- func (opp *RegisterContractProcessor) Close() error
- func (opp *RegisterContractProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *RegisterContractProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type RegisterModelFactBSONUnmarshaler
Constants ¶
View Source
const ( MaxCallContractItems = runtime.MaxContractCallItems MaxCallContractItemsTotalBytes = runtime.MaxContractCallItemsTotalBytes )
View Source
const MaxContractSourceBytes = runtime.MaxTypedContractSourceBytes
Variables ¶
View Source
var ( CallContractFactHint = hint.MustNewHint("mitum-contract-call-operation-fact-v0.0.1") CallContractHint = hint.MustNewHint("mitum-contract-call-operation-v0.0.1") CallContractItemHint = hint.MustNewHint("mitum-contract-call-item-v0.0.1") )
View Source
var ( RegisterContractFactHint = hint.MustNewHint("mitum-contract-register-operation-fact-v0.0.1") RegisterContractHint = hint.MustNewHint("mitum-contract-register-operation-v0.0.1") )
Functions ¶
func NewCallContractProcessor ¶
func NewCallContractProcessor(encs encoder.Encoders) ctypes.GetNewProcessorWithProposal
func NewRegisterContractProcessor ¶
func NewRegisterContractProcessor(encs encoder.Encoders) ctypes.GetNewProcessorWithProposal
Types ¶
type CallContract ¶
type CallContract struct {
common.BaseOperation
}
func NewCallContract ¶
func NewCallContract(fact CallContractFact) (CallContract, error)
func (*CallContract) DecodeBSON ¶
func (op *CallContract) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CallContract) DecodeJSON ¶
func (op *CallContract) DecodeJSON(b []byte, enc encoder.Encoder) error
func (CallContract) MarshalBSON ¶
func (op CallContract) MarshalBSON() ([]byte, error)
func (CallContract) MarshalJSON ¶
func (op CallContract) MarshalJSON() ([]byte, error)
type CallContractFact ¶
func NewCallContractFact ¶
func NewCallContractFact( token []byte, sender, contract base.Address, callData map[string]string, currency types.CurrencyID, ) CallContractFact
func NewCallContractFactWithItems ¶
func NewCallContractFactWithItems( token []byte, sender, contract base.Address, items []CallContractItem, currency types.CurrencyID, ) CallContractFact
func (CallContractFact) Addresses ¶
func (fact CallContractFact) Addresses() ([]base.Address, error)
func (CallContractFact) Bytes ¶
func (fact CallContractFact) Bytes() []byte
func (CallContractFact) CallData ¶
func (fact CallContractFact) CallData() map[string]string
func (CallContractFact) Contract ¶
func (fact CallContractFact) Contract() base.Address
func (*CallContractFact) DecodeBSON ¶
func (fact *CallContractFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CallContractFact) DecodeJSON ¶
func (fact *CallContractFact) DecodeJSON(b []byte, enc encoder.Encoder) error
func (CallContractFact) GenerateHash ¶
func (fact CallContractFact) GenerateHash() util.Hash
func (CallContractFact) Hash ¶
func (fact CallContractFact) Hash() util.Hash
func (CallContractFact) IsValid ¶
func (fact CallContractFact) IsValid(b []byte) error
func (CallContractFact) Items ¶
func (fact CallContractFact) Items() []CallContractItem
func (CallContractFact) MarshalBSON ¶
func (fact CallContractFact) MarshalBSON() ([]byte, error)
func (CallContractFact) MarshalJSON ¶
func (fact CallContractFact) MarshalJSON() ([]byte, error)
func (CallContractFact) Sender ¶
func (fact CallContractFact) Sender() base.Address
func (CallContractFact) Token ¶
func (fact CallContractFact) Token() base.Token
type CallContractFactJSONMarshaler ¶
type CallContractFactJSONMarshaler struct {
base.BaseFactJSONMarshaler
Sender base.Address `json:"sender"`
Contract base.Address `json:"contract"`
CallData map[string]string `json:"call_data,omitempty"`
Items []CallContractItem `json:"items,omitempty"`
Currency types.CurrencyID `json:"currency"`
}
type CallContractFactJSONUnmarshaler ¶
type CallContractFactJSONUnmarshaler struct {
base.BaseFactJSONUnmarshaler
Sender string `json:"sender"`
Contract string `json:"contract"`
CallData *json.RawMessage `json:"call_data"`
Items *json.RawMessage `json:"items"`
Currency string `json:"currency"`
}
type CallContractItem ¶
type CallContractItem struct {
hint.BaseHinter
// contains filtered or unexported fields
}
func NewCallContractItem ¶
func NewCallContractItem(function string, callData map[string]string) CallContractItem
func (CallContractItem) Bytes ¶
func (it CallContractItem) Bytes() []byte
func (CallContractItem) CallData ¶
func (it CallContractItem) CallData() map[string]string
func (*CallContractItem) DecodeBSON ¶
func (it *CallContractItem) DecodeBSON(b []byte, _ *bsonenc.Encoder) error
func (*CallContractItem) DecodeJSON ¶
func (it *CallContractItem) DecodeJSON(b []byte, enc encoder.Encoder) error
func (CallContractItem) Function ¶
func (it CallContractItem) Function() string
func (CallContractItem) IsValid ¶
func (it CallContractItem) IsValid([]byte) error
func (CallContractItem) MarshalBSON ¶
func (it CallContractItem) MarshalBSON() ([]byte, error)
func (CallContractItem) MarshalJSON ¶
func (it CallContractItem) MarshalJSON() ([]byte, error)
func (CallContractItem) Rebuild ¶
func (it CallContractItem) Rebuild() CallContractItem
func (*CallContractItem) UnmarshalBSON ¶
func (it *CallContractItem) UnmarshalBSON(b []byte) error
func (*CallContractItem) UnmarshalJSON ¶
func (it *CallContractItem) UnmarshalJSON(b []byte) error
type CallContractItemJSONMarshaler ¶
type CallContractItemJSONMarshaler struct {
hint.BaseHinter
Function string `json:"function"`
CallData map[string]string `json:"call_data"`
}
type CallContractProcessor ¶
type CallContractProcessor struct {
*base.BaseOperationProcessor
// contains filtered or unexported fields
}
func (*CallContractProcessor) Close ¶
func (opp *CallContractProcessor) Close() error
func (*CallContractProcessor) PreProcess ¶
func (opp *CallContractProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*CallContractProcessor) Process ¶
func (opp *CallContractProcessor) Process( _ context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type RegisterContract ¶
type RegisterContract struct {
common.BaseOperation
}
func NewRegisterContract ¶
func NewRegisterContract(fact RegisterContractFact) (RegisterContract, error)
func (*RegisterContract) DecodeBSON ¶
func (op *RegisterContract) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*RegisterContract) DecodeJSON ¶
func (op *RegisterContract) DecodeJSON(b []byte, enc encoder.Encoder) error
func (RegisterContract) MarshalBSON ¶
func (op RegisterContract) MarshalBSON() ([]byte, error)
func (RegisterContract) MarshalJSON ¶
func (op RegisterContract) MarshalJSON() ([]byte, error)
type RegisterContractFact ¶
func NewRegisterContractFact ¶
func NewRegisterContractFact(token []byte, sender, contract base.Address, code string, callData map[string]string, currency ctypes.CurrencyID) RegisterContractFact
func (RegisterContractFact) Addresses ¶
func (fact RegisterContractFact) Addresses() ([]base.Address, error)
func (RegisterContractFact) Bytes ¶
func (fact RegisterContractFact) Bytes() []byte
func (RegisterContractFact) Contract ¶
func (fact RegisterContractFact) Contract() base.Address
func (RegisterContractFact) ContractCode ¶
func (fact RegisterContractFact) ContractCode() string
func (*RegisterContractFact) DecodeBSON ¶
func (fact *RegisterContractFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*RegisterContractFact) DecodeJSON ¶
func (fact *RegisterContractFact) DecodeJSON(b []byte, enc encoder.Encoder) error
func (RegisterContractFact) GenerateHash ¶
func (fact RegisterContractFact) GenerateHash() util.Hash
func (RegisterContractFact) Hash ¶
func (fact RegisterContractFact) Hash() util.Hash
func (RegisterContractFact) IsValid ¶
func (fact RegisterContractFact) IsValid(b []byte) error
func (RegisterContractFact) MarshalBSON ¶
func (fact RegisterContractFact) MarshalBSON() ([]byte, error)
func (RegisterContractFact) MarshalJSON ¶
func (fact RegisterContractFact) MarshalJSON() ([]byte, error)
func (RegisterContractFact) Sender ¶
func (fact RegisterContractFact) Sender() base.Address
func (RegisterContractFact) Token ¶
func (fact RegisterContractFact) Token() base.Token
type RegisterContractProcessor ¶
type RegisterContractProcessor struct {
*base.BaseOperationProcessor
// contains filtered or unexported fields
}
func (*RegisterContractProcessor) Close ¶
func (opp *RegisterContractProcessor) Close() error
func (*RegisterContractProcessor) PreProcess ¶
func (opp *RegisterContractProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*RegisterContractProcessor) Process ¶
func (opp *RegisterContractProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.