Documentation ¶
Index ¶
- Constants
- Variables
- func NewCreateContractAccountProcessor() types.GetNewProcessor
- func NewUpdateOperatorProcessor() types.GetNewProcessor
- func NewWithdrawProcessor() types.GetNewProcessor
- type BaseCreateContractAccountItem
- func (it BaseCreateContractAccountItem) Address() (base.Address, error)
- func (it BaseCreateContractAccountItem) AddressType() hint.Type
- func (it BaseCreateContractAccountItem) Amounts() []types.Amount
- func (it BaseCreateContractAccountItem) Bytes() []byte
- func (it *BaseCreateContractAccountItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (it *BaseCreateContractAccountItem) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (it BaseCreateContractAccountItem) IsValid([]byte) error
- func (it BaseCreateContractAccountItem) Keys() types.AccountKeys
- func (it BaseCreateContractAccountItem) MarshalBSON() ([]byte, error)
- func (it BaseCreateContractAccountItem) MarshalJSON() ([]byte, error)
- func (it BaseCreateContractAccountItem) Rebuild() CreateContractAccountItem
- type BaseWithdrawItem
- func (it BaseWithdrawItem) Amounts() []types.Amount
- func (it BaseWithdrawItem) Bytes() []byte
- func (it *BaseWithdrawItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (it *BaseWithdrawItem) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (it BaseWithdrawItem) IsValid([]byte) error
- func (it BaseWithdrawItem) MarshalBSON() ([]byte, error)
- func (it BaseWithdrawItem) MarshalJSON() ([]byte, error)
- func (it BaseWithdrawItem) Rebuild() WithdrawItem
- func (it BaseWithdrawItem) Target() base.Address
- type BaseWithdrawItemBSONUnmarshaler
- type BaseWithdrawItemJSONMarshaler
- type BaseWithdrawItemJSONUnmarshaler
- type CreateContractAccount
- func (op *CreateContractAccount) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *CreateContractAccount) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (op *CreateContractAccount) HashSign(priv base.Privatekey, networkID base.NetworkID) error
- func (op CreateContractAccount) MarshalBSON() ([]byte, error)
- func (op CreateContractAccount) MarshalJSON() ([]byte, error)
- func (CreateContractAccount) Process(_ context.Context, _ base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type CreateContractAccountFact
- func (fact CreateContractAccountFact) Addresses() ([]base.Address, error)
- func (fact CreateContractAccountFact) Bytes() []byte
- func (fact *CreateContractAccountFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *CreateContractAccountFact) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (fact CreateContractAccountFact) GenerateHash() util.Hash
- func (fact CreateContractAccountFact) Hash() util.Hash
- func (fact CreateContractAccountFact) IsValid(b []byte) error
- func (fact CreateContractAccountFact) Items() []CreateContractAccountItem
- func (fact CreateContractAccountFact) MarshalBSON() ([]byte, error)
- func (fact CreateContractAccountFact) MarshalJSON() ([]byte, error)
- func (fact CreateContractAccountFact) Rebuild() CreateContractAccountFact
- func (fact CreateContractAccountFact) Sender() base.Address
- func (fact CreateContractAccountFact) Targets() ([]base.Address, error)
- func (fact CreateContractAccountFact) Token() base.Token
- type CreateContractAccountFactBSONUnmarshaler
- type CreateContractAccountFactJSONMarshaler
- type CreateContractAccountFactJSONUnMarshaler
- type CreateContractAccountItem
- type CreateContractAccountItemBSONUnmarshaler
- type CreateContractAccountItemJSONMarshaler
- type CreateContractAccountItemJSONUnMarshaler
- type CreateContractAccountItemMultiAmounts
- type CreateContractAccountItemProcessor
- func (opp *CreateContractAccountItemProcessor) Close()
- func (opp *CreateContractAccountItemProcessor) PreProcess(_ context.Context, _ base.Operation, getStateFunc base.GetStateFunc) error
- func (opp *CreateContractAccountItemProcessor) Process(_ context.Context, _ base.Operation, _ base.GetStateFunc) ([]base.StateMergeValue, error)
- type CreateContractAccountItemSingleAmount
- type CreateContractAccountProcessor
- func (opp *CreateContractAccountProcessor) Close() error
- func (opp *CreateContractAccountProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *CreateContractAccountProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type UpdatOperatorFactJSONUnMarshaler
- type UpdateOperator
- func (op *UpdateOperator) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *UpdateOperator) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (op *UpdateOperator) HashSign(priv base.Privatekey, networkID base.NetworkID) error
- func (op UpdateOperator) MarshalBSON() ([]byte, error)
- func (op UpdateOperator) MarshalJSON() ([]byte, error)
- func (UpdateOperator) Process(_ context.Context, _ base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type UpdateOperatorFact
- func (fact UpdateOperatorFact) Addresses() ([]base.Address, error)
- func (fact UpdateOperatorFact) Bytes() []byte
- func (fact UpdateOperatorFact) Contract() base.Address
- func (fact UpdateOperatorFact) Currency() types.CurrencyID
- func (fact *UpdateOperatorFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *UpdateOperatorFact) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (fact UpdateOperatorFact) GenerateHash() util.Hash
- func (fact UpdateOperatorFact) Hash() util.Hash
- func (fact UpdateOperatorFact) IsValid(b []byte) error
- func (fact UpdateOperatorFact) MarshalBSON() ([]byte, error)
- func (fact UpdateOperatorFact) MarshalJSON() ([]byte, error)
- func (fact UpdateOperatorFact) Operators() []base.Address
- func (fact UpdateOperatorFact) Sender() base.Address
- func (fact UpdateOperatorFact) Token() base.Token
- type UpdateOperatorFactBSONUnmarshaler
- type UpdateOperatorFactJSONMarshaler
- type UpdateOperatorProcessor
- func (opp *UpdateOperatorProcessor) Close() error
- func (opp *UpdateOperatorProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *UpdateOperatorProcessor) Process(_ context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type Withdraw
- func (op *Withdraw) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *Withdraw) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (op *Withdraw) HashSign(priv base.Privatekey, networkID base.NetworkID) error
- func (op Withdraw) MarshalBSON() ([]byte, error)
- func (op Withdraw) MarshalJSON() ([]byte, error)
- func (Withdraw) Process(_ context.Context, _ base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type WithdrawFact
- func (fact WithdrawFact) Addresses() ([]base.Address, error)
- func (fact WithdrawFact) Bytes() []byte
- func (fact *WithdrawFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *WithdrawFact) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (fact WithdrawFact) GenerateHash() util.Hash
- func (fact WithdrawFact) Hash() util.Hash
- func (fact WithdrawFact) IsValid(b []byte) error
- func (fact WithdrawFact) Items() []WithdrawItem
- func (fact WithdrawFact) MarshalBSON() ([]byte, error)
- func (fact WithdrawFact) MarshalJSON() ([]byte, error)
- func (fact WithdrawFact) Rebuild() WithdrawFact
- func (fact WithdrawFact) Sender() base.Address
- func (fact WithdrawFact) Token() base.Token
- type WithdrawFactBSONUnmarshaler
- type WithdrawFactJSONMarshaler
- type WithdrawFactJSONUnmarshaler
- type WithdrawItem
- type WithdrawItemMultiAmounts
- type WithdrawItemProcessor
- type WithdrawItemSingleAmount
- type WithdrawProcessor
- func (opp *WithdrawProcessor) Close() error
- func (opp *WithdrawProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *WithdrawProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
Constants ¶
View Source
const MaxOperators = 10
Variables ¶
View Source
var ( CreateContractAccountFactHint = hint.MustNewHint("mitum-currency-create-contract-account-operation-fact-v0.0.1") CreateContractAccountHint = hint.MustNewHint("mitum-currency-create-contract-account-operation-v0.0.1") )
View Source
var ( UpdateOperatorFactHint = hint.MustNewHint("mitum-currency-contract-account-update-operator-operation-fact-v0.0.1") UpdateOperatorHint = hint.MustNewHint("mitum-currency-contract-account-update-operator-operation-v0.0.1") )
View Source
var ( WithdrawFactHint = hint.MustNewHint("mitum-currency-contract-account-withdraw-operation-fact-v0.0.1") WithdrawHint = hint.MustNewHint("mitum-currency-contract-account-withdraw-operation-v0.0.1") )
View Source
var (
CreateContractAccountItemMultiAmountsHint = hint.MustNewHint("mitum-currency-create-contract-account-multiple-amounts-v0.0.1")
)
View Source
var (
CreateContractAccountItemSingleAmountHint = hint.MustNewHint("mitum-currency-create-contract-account-single-amount-v0.0.1")
)
View Source
var MaxCreateContractAccountItems uint = 5000
View Source
var MaxWithdrawItems uint = 10
View Source
var UpdateOperatorProcessorPool = sync.Pool{ New: func() interface{} { return new(UpdateOperatorProcessor) }, }
View Source
var (
WithdrawItemMultiAmountsHint = hint.MustNewHint("mitum-currency-contract-account-withdraw-multi-amounts-v0.0.1")
)
View Source
var (
WithdrawItemSingleAmountHint = hint.MustNewHint("mitum-currency-contract-account-withdraw-single-amount-v0.0.1")
)
Functions ¶
func NewCreateContractAccountProcessor ¶
func NewCreateContractAccountProcessor() types.GetNewProcessor
func NewUpdateOperatorProcessor ¶
func NewUpdateOperatorProcessor() types.GetNewProcessor
func NewWithdrawProcessor ¶
func NewWithdrawProcessor() types.GetNewProcessor
Types ¶
type BaseCreateContractAccountItem ¶
type BaseCreateContractAccountItem struct { hint.BaseHinter // contains filtered or unexported fields }
func NewBaseCreateContractAccountItem ¶
func NewBaseCreateContractAccountItem(ht hint.Hint, keys types.AccountKeys, amounts []types.Amount, addrType hint.Type) BaseCreateContractAccountItem
func (BaseCreateContractAccountItem) Address ¶
func (it BaseCreateContractAccountItem) Address() (base.Address, error)
func (BaseCreateContractAccountItem) AddressType ¶
func (it BaseCreateContractAccountItem) AddressType() hint.Type
func (BaseCreateContractAccountItem) Amounts ¶
func (it BaseCreateContractAccountItem) Amounts() []types.Amount
func (BaseCreateContractAccountItem) Bytes ¶
func (it BaseCreateContractAccountItem) Bytes() []byte
func (*BaseCreateContractAccountItem) DecodeBSON ¶
func (it *BaseCreateContractAccountItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseCreateContractAccountItem) DecodeJSON ¶
func (it *BaseCreateContractAccountItem) DecodeJSON(b []byte, enc encoder.Encoder) error
func (BaseCreateContractAccountItem) IsValid ¶
func (it BaseCreateContractAccountItem) IsValid([]byte) error
func (BaseCreateContractAccountItem) Keys ¶
func (it BaseCreateContractAccountItem) Keys() types.AccountKeys
func (BaseCreateContractAccountItem) MarshalBSON ¶
func (it BaseCreateContractAccountItem) MarshalBSON() ([]byte, error)
func (BaseCreateContractAccountItem) MarshalJSON ¶
func (it BaseCreateContractAccountItem) MarshalJSON() ([]byte, error)
func (BaseCreateContractAccountItem) Rebuild ¶
func (it BaseCreateContractAccountItem) Rebuild() CreateContractAccountItem
type BaseWithdrawItem ¶
type BaseWithdrawItem struct { hint.BaseHinter // contains filtered or unexported fields }
func NewBaseWithdrawItem ¶
func (BaseWithdrawItem) Amounts ¶
func (it BaseWithdrawItem) Amounts() []types.Amount
func (BaseWithdrawItem) Bytes ¶
func (it BaseWithdrawItem) Bytes() []byte
func (*BaseWithdrawItem) DecodeBSON ¶
func (it *BaseWithdrawItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseWithdrawItem) DecodeJSON ¶
func (it *BaseWithdrawItem) DecodeJSON(b []byte, enc encoder.Encoder) error
func (BaseWithdrawItem) IsValid ¶
func (it BaseWithdrawItem) IsValid([]byte) error
func (BaseWithdrawItem) MarshalBSON ¶
func (it BaseWithdrawItem) MarshalBSON() ([]byte, error)
func (BaseWithdrawItem) MarshalJSON ¶
func (it BaseWithdrawItem) MarshalJSON() ([]byte, error)
func (BaseWithdrawItem) Rebuild ¶
func (it BaseWithdrawItem) Rebuild() WithdrawItem
func (BaseWithdrawItem) Target ¶
func (it BaseWithdrawItem) Target() base.Address
type BaseWithdrawItemJSONUnmarshaler ¶
type BaseWithdrawItemJSONUnmarshaler struct { Hint hint.Hint `json:"_hint"` Target string `json:"target"` Amounts json.RawMessage `json:"amounts"` }
type CreateContractAccount ¶
type CreateContractAccount struct {
common.BaseOperation
}
func NewCreateContractAccount ¶
func NewCreateContractAccount(fact CreateContractAccountFact) (CreateContractAccount, error)
func (*CreateContractAccount) DecodeBSON ¶
func (op *CreateContractAccount) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CreateContractAccount) DecodeJSON ¶
func (op *CreateContractAccount) DecodeJSON(b []byte, enc encoder.Encoder) error
func (*CreateContractAccount) HashSign ¶
func (op *CreateContractAccount) HashSign(priv base.Privatekey, networkID base.NetworkID) error
func (CreateContractAccount) MarshalBSON ¶
func (op CreateContractAccount) MarshalBSON() ([]byte, error)
func (CreateContractAccount) MarshalJSON ¶
func (op CreateContractAccount) MarshalJSON() ([]byte, error)
func (CreateContractAccount) Process ¶
func (CreateContractAccount) Process( _ context.Context, _ base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type CreateContractAccountFact ¶
func NewCreateContractAccountFact ¶
func NewCreateContractAccountFact(token []byte, sender base.Address, items []CreateContractAccountItem) CreateContractAccountFact
func (CreateContractAccountFact) Addresses ¶
func (fact CreateContractAccountFact) Addresses() ([]base.Address, error)
func (CreateContractAccountFact) Bytes ¶
func (fact CreateContractAccountFact) Bytes() []byte
func (*CreateContractAccountFact) DecodeBSON ¶
func (fact *CreateContractAccountFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CreateContractAccountFact) DecodeJSON ¶
func (fact *CreateContractAccountFact) DecodeJSON(b []byte, enc encoder.Encoder) error
func (CreateContractAccountFact) GenerateHash ¶
func (fact CreateContractAccountFact) GenerateHash() util.Hash
func (CreateContractAccountFact) Hash ¶
func (fact CreateContractAccountFact) Hash() util.Hash
func (CreateContractAccountFact) IsValid ¶
func (fact CreateContractAccountFact) IsValid(b []byte) error
func (CreateContractAccountFact) Items ¶
func (fact CreateContractAccountFact) Items() []CreateContractAccountItem
func (CreateContractAccountFact) MarshalBSON ¶
func (fact CreateContractAccountFact) MarshalBSON() ([]byte, error)
func (CreateContractAccountFact) MarshalJSON ¶
func (fact CreateContractAccountFact) MarshalJSON() ([]byte, error)
func (CreateContractAccountFact) Rebuild ¶
func (fact CreateContractAccountFact) Rebuild() CreateContractAccountFact
func (CreateContractAccountFact) Sender ¶
func (fact CreateContractAccountFact) Sender() base.Address
func (CreateContractAccountFact) Targets ¶
func (fact CreateContractAccountFact) Targets() ([]base.Address, error)
func (CreateContractAccountFact) Token ¶
func (fact CreateContractAccountFact) Token() base.Token
type CreateContractAccountFactJSONMarshaler ¶
type CreateContractAccountFactJSONMarshaler struct { base.BaseFactJSONMarshaler Owner base.Address `json:"sender"` Items []CreateContractAccountItem `json:"items"` }
type CreateContractAccountFactJSONUnMarshaler ¶
type CreateContractAccountFactJSONUnMarshaler struct { base.BaseFactJSONUnmarshaler Owner string `json:"sender"` Items json.RawMessage `json:"items"` }
type CreateContractAccountItem ¶
type CreateContractAccountItem interface { hint.Hinter util.IsValider currency.AmountsItem Bytes() []byte Keys() types.AccountKeys Address() (base.Address, error) Rebuild() CreateContractAccountItem AddressType() hint.Type }
type CreateContractAccountItemJSONMarshaler ¶
type CreateContractAccountItemJSONMarshaler struct { hint.BaseHinter Keys types.AccountKeys `json:"keys"` Amounts []types.Amount `json:"amounts"` AddrType hint.Type `json:"addrtype"` }
type CreateContractAccountItemJSONUnMarshaler ¶
type CreateContractAccountItemJSONUnMarshaler struct { Hint hint.Hint `json:"_hint"` Keys json.RawMessage `json:"keys"` Amounts json.RawMessage `json:"amounts"` AddrType string `json:"addrtype"` }
type CreateContractAccountItemMultiAmounts ¶
type CreateContractAccountItemMultiAmounts struct {
BaseCreateContractAccountItem
}
func NewCreateContractAccountItemMultiAmounts ¶
func NewCreateContractAccountItemMultiAmounts(keys types.AccountKeys, amounts []types.Amount, addrType hint.Type) CreateContractAccountItemMultiAmounts
func (CreateContractAccountItemMultiAmounts) IsValid ¶
func (it CreateContractAccountItemMultiAmounts) IsValid([]byte) error
func (CreateContractAccountItemMultiAmounts) Rebuild ¶
func (it CreateContractAccountItemMultiAmounts) Rebuild() CreateContractAccountItem
type CreateContractAccountItemProcessor ¶
type CreateContractAccountItemProcessor struct {
// contains filtered or unexported fields
}
func (*CreateContractAccountItemProcessor) Close ¶
func (opp *CreateContractAccountItemProcessor) Close()
func (*CreateContractAccountItemProcessor) PreProcess ¶
func (opp *CreateContractAccountItemProcessor) PreProcess( _ context.Context, _ base.Operation, getStateFunc base.GetStateFunc, ) error
func (*CreateContractAccountItemProcessor) Process ¶
func (opp *CreateContractAccountItemProcessor) Process( _ context.Context, _ base.Operation, _ base.GetStateFunc, ) ([]base.StateMergeValue, error)
type CreateContractAccountItemSingleAmount ¶
type CreateContractAccountItemSingleAmount struct {
BaseCreateContractAccountItem
}
func NewCreateContractAccountItemSingleAmount ¶
func NewCreateContractAccountItemSingleAmount(keys types.AccountKeys, amount types.Amount, addrType hint.Type) CreateContractAccountItemSingleAmount
func (CreateContractAccountItemSingleAmount) IsValid ¶
func (it CreateContractAccountItemSingleAmount) IsValid([]byte) error
func (CreateContractAccountItemSingleAmount) Rebuild ¶
func (it CreateContractAccountItemSingleAmount) Rebuild() CreateContractAccountItem
type CreateContractAccountProcessor ¶
type CreateContractAccountProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func (*CreateContractAccountProcessor) Close ¶
func (opp *CreateContractAccountProcessor) Close() error
func (*CreateContractAccountProcessor) PreProcess ¶
func (opp *CreateContractAccountProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*CreateContractAccountProcessor) Process ¶
func (opp *CreateContractAccountProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type UpdateOperator ¶
type UpdateOperator struct {
common.BaseOperation
}
func NewUpdateOperator ¶
func NewUpdateOperator(fact UpdateOperatorFact) (UpdateOperator, error)
func (*UpdateOperator) DecodeBSON ¶
func (op *UpdateOperator) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*UpdateOperator) DecodeJSON ¶
func (op *UpdateOperator) DecodeJSON(b []byte, enc encoder.Encoder) error
func (*UpdateOperator) HashSign ¶
func (op *UpdateOperator) HashSign(priv base.Privatekey, networkID base.NetworkID) error
func (UpdateOperator) MarshalBSON ¶
func (op UpdateOperator) MarshalBSON() ([]byte, error)
func (UpdateOperator) MarshalJSON ¶
func (op UpdateOperator) MarshalJSON() ([]byte, error)
func (UpdateOperator) Process ¶
func (UpdateOperator) Process( _ context.Context, _ base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type UpdateOperatorFact ¶
func NewUpdateOperatorFact ¶
func NewUpdateOperatorFact( token []byte, sender, contract base.Address, operators []base.Address, currency types.CurrencyID, ) UpdateOperatorFact
func (UpdateOperatorFact) Addresses ¶
func (fact UpdateOperatorFact) Addresses() ([]base.Address, error)
func (UpdateOperatorFact) Bytes ¶
func (fact UpdateOperatorFact) Bytes() []byte
func (UpdateOperatorFact) Contract ¶
func (fact UpdateOperatorFact) Contract() base.Address
func (UpdateOperatorFact) Currency ¶
func (fact UpdateOperatorFact) Currency() types.CurrencyID
func (*UpdateOperatorFact) DecodeBSON ¶
func (fact *UpdateOperatorFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*UpdateOperatorFact) DecodeJSON ¶
func (fact *UpdateOperatorFact) DecodeJSON(b []byte, enc encoder.Encoder) error
func (UpdateOperatorFact) GenerateHash ¶
func (fact UpdateOperatorFact) GenerateHash() util.Hash
func (UpdateOperatorFact) Hash ¶
func (fact UpdateOperatorFact) Hash() util.Hash
func (UpdateOperatorFact) IsValid ¶
func (fact UpdateOperatorFact) IsValid(b []byte) error
func (UpdateOperatorFact) MarshalBSON ¶
func (fact UpdateOperatorFact) MarshalBSON() ([]byte, error)
func (UpdateOperatorFact) MarshalJSON ¶
func (fact UpdateOperatorFact) MarshalJSON() ([]byte, error)
func (UpdateOperatorFact) Operators ¶
func (fact UpdateOperatorFact) Operators() []base.Address
func (UpdateOperatorFact) Sender ¶
func (fact UpdateOperatorFact) Sender() base.Address
func (UpdateOperatorFact) Token ¶
func (fact UpdateOperatorFact) Token() base.Token
type UpdateOperatorFactJSONMarshaler ¶
type UpdateOperatorFactJSONMarshaler struct { base.BaseFactJSONMarshaler Sender base.Address `json:"sender"` Contract base.Address `json:"contract"` Operators []base.Address `json:"operators"` Currency types.CurrencyID `json:"currency"` }
type UpdateOperatorProcessor ¶
type UpdateOperatorProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func (*UpdateOperatorProcessor) Close ¶
func (opp *UpdateOperatorProcessor) Close() error
func (*UpdateOperatorProcessor) PreProcess ¶
func (opp *UpdateOperatorProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*UpdateOperatorProcessor) Process ¶
func (opp *UpdateOperatorProcessor) Process( _ context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type Withdraw ¶
type Withdraw struct {
common.BaseOperation
}
func NewWithdraw ¶
func NewWithdraw(fact WithdrawFact) (Withdraw, error)
func (Withdraw) MarshalBSON ¶
func (Withdraw) MarshalJSON ¶
func (Withdraw) Process ¶
func (Withdraw) Process( _ context.Context, _ base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type WithdrawFact ¶
func NewWithdrawFact ¶
func NewWithdrawFact(token []byte, sender base.Address, items []WithdrawItem) WithdrawFact
func (WithdrawFact) Bytes ¶
func (fact WithdrawFact) Bytes() []byte
func (*WithdrawFact) DecodeBSON ¶
func (fact *WithdrawFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*WithdrawFact) DecodeJSON ¶
func (fact *WithdrawFact) DecodeJSON(b []byte, enc encoder.Encoder) error
func (WithdrawFact) GenerateHash ¶
func (fact WithdrawFact) GenerateHash() util.Hash
func (WithdrawFact) Hash ¶
func (fact WithdrawFact) Hash() util.Hash
func (WithdrawFact) IsValid ¶
func (fact WithdrawFact) IsValid(b []byte) error
func (WithdrawFact) Items ¶
func (fact WithdrawFact) Items() []WithdrawItem
func (WithdrawFact) MarshalBSON ¶
func (fact WithdrawFact) MarshalBSON() ([]byte, error)
func (WithdrawFact) MarshalJSON ¶
func (fact WithdrawFact) MarshalJSON() ([]byte, error)
func (WithdrawFact) Rebuild ¶
func (fact WithdrawFact) Rebuild() WithdrawFact
func (WithdrawFact) Sender ¶
func (fact WithdrawFact) Sender() base.Address
func (WithdrawFact) Token ¶
func (fact WithdrawFact) Token() base.Token
type WithdrawFactJSONMarshaler ¶
type WithdrawFactJSONMarshaler struct { base.BaseFactJSONMarshaler Sender base.Address `json:"sender"` Items []WithdrawItem `json:"items"` }
type WithdrawFactJSONUnmarshaler ¶
type WithdrawFactJSONUnmarshaler struct { base.BaseFactJSONUnmarshaler Sender string `json:"sender"` Items json.RawMessage `json:"items"` }
type WithdrawItem ¶
type WithdrawItem interface { hint.Hinter util.IsValider currency.AmountsItem Bytes() []byte Target() base.Address Rebuild() WithdrawItem }
type WithdrawItemMultiAmounts ¶
type WithdrawItemMultiAmounts struct {
BaseWithdrawItem
}
func NewWithdrawItemMultiAmounts ¶
func NewWithdrawItemMultiAmounts(target base.Address, amounts []types.Amount) WithdrawItemMultiAmounts
func (WithdrawItemMultiAmounts) IsValid ¶
func (it WithdrawItemMultiAmounts) IsValid([]byte) error
func (WithdrawItemMultiAmounts) Rebuild ¶
func (it WithdrawItemMultiAmounts) Rebuild() WithdrawItem
type WithdrawItemProcessor ¶
type WithdrawItemProcessor struct {
// contains filtered or unexported fields
}
func (*WithdrawItemProcessor) Close ¶
func (opp *WithdrawItemProcessor) Close()
func (*WithdrawItemProcessor) PreProcess ¶
func (opp *WithdrawItemProcessor) PreProcess( _ context.Context, _ base.Operation, getStateFunc base.GetStateFunc, ) error
func (*WithdrawItemProcessor) Process ¶
func (opp *WithdrawItemProcessor) Process( _ context.Context, _ base.Operation, _ base.GetStateFunc, ) ([]base.StateMergeValue, error)
type WithdrawItemSingleAmount ¶
type WithdrawItemSingleAmount struct {
BaseWithdrawItem
}
func NewWithdrawItemSingleAmount ¶
func NewWithdrawItemSingleAmount(target base.Address, amount types.Amount) WithdrawItemSingleAmount
func (WithdrawItemSingleAmount) IsValid ¶
func (it WithdrawItemSingleAmount) IsValid([]byte) error
func (WithdrawItemSingleAmount) Rebuild ¶
func (it WithdrawItemSingleAmount) Rebuild() WithdrawItem
type WithdrawProcessor ¶
type WithdrawProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func (*WithdrawProcessor) Close ¶
func (opp *WithdrawProcessor) Close() error
func (*WithdrawProcessor) PreProcess ¶
func (opp *WithdrawProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*WithdrawProcessor) Process ¶
func (opp *WithdrawProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
Source Files ¶
- create_contract_account.go
- create_contract_account_bson.go
- create_contract_account_encode.go
- create_contract_account_item.go
- create_contract_account_item_bson.go
- create_contract_account_item_encode.go
- create_contract_account_item_json.go
- create_contract_account_json.go
- create_contract_account_multi_amounts.go
- create_contract_account_process.go
- create_contract_account_single_amount.go
- update_operator.go
- update_operator_bson.go
- update_operator_encode.go
- update_operator_json.go
- update_operator_process.go
- withdraw.go
- withdraw_bson.go
- withdraw_encode.go
- withdraw_item.go
- withdraw_item_bson.go
- withdraw_item_encode.go
- withdraw_item_json.go
- withdraw_json.go
- withdraw_multi_amounts.go
- withdraw_process.go
- withdraw_single_amount.go
Click to show internal directories.
Click to hide internal directories.