point

package
v0.0.0-...-a885b07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ApproveFactHint = hint.MustNewHint("mitum-point-approve-operation-fact-v0.0.1")
	ApproveHint     = hint.MustNewHint("mitum-point-approve-operation-v0.0.1")
)
View Source
var (
	BurnFactHint = hint.MustNewHint("mitum-point-burn-operation-fact-v0.0.1")
	BurnHint     = hint.MustNewHint("mitum-point-burn-operation-v0.0.1")
)
View Source
var (
	MintFactHint = hint.MustNewHint("mitum-point-mint-operation-fact-v0.0.1")
	MintHint     = hint.MustNewHint("mitum-point-mint-operation-v0.0.1")
)
View Source
var (
	RegisterModelFactHint = hint.MustNewHint("mitum-point-register-model-operation-fact-v0.0.1")
	RegisterModelHint     = hint.MustNewHint("mitum-point-register-model-operation-v0.0.1")
)
View Source
var (
	TransferFactHint = hint.MustNewHint("mitum-point-transfer-operation-fact-v0.0.1")
	TransferHint     = hint.MustNewHint("mitum-point-transfer-operation-v0.0.1")
)
View Source
var (
	TransferFromFactHint = hint.MustNewHint("mitum-point-transfer-from-operation-fact-v0.0.1")
	TransferFromHint     = hint.MustNewHint("mitum-point-transfer-from-operation-v0.0.1")
)

Functions

func ErrBaseOperationProcess

func ErrBaseOperationProcess(e error, formatter string, args ...interface{}) base.BaseOperationProcessReasonError

func ErrStateAlreadyExists

func ErrStateAlreadyExists(name, k string, e error) base.BaseOperationProcessReasonError

func ErrStateNotFound

func ErrStateNotFound(name string, k string, e error) base.BaseOperationProcessReasonError

func ErrStringPreProcess

func ErrStringPreProcess(t any) string

func ErrStringProcess

func ErrStringProcess(t any) string

func NewApproveProcessor

func NewApproveProcessor() currencytypes.GetNewProcessor

func NewBurnProcessor

func NewBurnProcessor() currencytypes.GetNewProcessor

func NewMintProcessor

func NewMintProcessor() currencytypes.GetNewProcessor

func NewRegisterModelProcessor

func NewRegisterModelProcessor() currencytypes.GetNewProcessor

func NewTransferFromProcessor

func NewTransferFromProcessor() currencytypes.GetNewProcessor

func NewTransferProcessor

func NewTransferProcessor() currencytypes.GetNewProcessor

Types

type Approve

type Approve struct {
	common.BaseOperation
}

func NewApprove

func NewApprove(fact ApproveFact) Approve

type ApproveFact

type ApproveFact struct {
	PointFact
	// contains filtered or unexported fields
}

func NewApproveFact

func NewApproveFact(
	token []byte,
	sender, contract base.Address,
	currency currencytypes.CurrencyID,
	approved base.Address,
	amount common.Big,
) ApproveFact

func (ApproveFact) Addresses

func (fact ApproveFact) Addresses() ([]base.Address, error)

func (ApproveFact) Amount

func (fact ApproveFact) Amount() common.Big

func (ApproveFact) Approved

func (fact ApproveFact) Approved() base.Address

func (ApproveFact) Bytes

func (fact ApproveFact) Bytes() []byte

func (*ApproveFact) DecodeBSON

func (fact *ApproveFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*ApproveFact) DecodeJSON

func (fact *ApproveFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (ApproveFact) GenerateHash

func (fact ApproveFact) GenerateHash() util.Hash

func (ApproveFact) IsValid

func (fact ApproveFact) IsValid(b []byte) error

func (ApproveFact) MarshalBSON

func (fact ApproveFact) MarshalBSON() ([]byte, error)

func (ApproveFact) MarshalJSON

func (fact ApproveFact) MarshalJSON() ([]byte, error)

type ApproveFactBSONUnmarshaler

type ApproveFactBSONUnmarshaler struct {
	Approved string `bson:"approved"`
	Amount   string `bson:"amount"`
}

type ApproveFactJSONMarshaler

type ApproveFactJSONMarshaler struct {
	PointFactJSONMarshaler
	Approved base.Address `json:"approved"`
	Amount   common.Big   `json:"amount"`
}

type ApproveFactJSONUnMarshaler

type ApproveFactJSONUnMarshaler struct {
	Approved string `json:"approved"`
	Amount   string `json:"amount"`
}

type ApproveProcessor

type ApproveProcessor struct {
	*base.BaseOperationProcessor
}

func (*ApproveProcessor) Close

func (opp *ApproveProcessor) Close() error

func (*ApproveProcessor) PreProcess

func (*ApproveProcessor) Process

type Burn

type Burn struct {
	common.BaseOperation
}

func NewBurn

func NewBurn(fact BurnFact) Burn

type BurnFact

type BurnFact struct {
	PointFact
	// contains filtered or unexported fields
}

func NewBurnFact

func NewBurnFact(
	token []byte,
	sender, contract base.Address,
	currency currencytypes.CurrencyID,
	target base.Address,
	amount common.Big,
) BurnFact

func (BurnFact) Addresses

func (fact BurnFact) Addresses() ([]base.Address, error)

func (BurnFact) Amount

func (fact BurnFact) Amount() common.Big

func (BurnFact) Bytes

func (fact BurnFact) Bytes() []byte

func (*BurnFact) DecodeBSON

func (fact *BurnFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*BurnFact) DecodeJSON

func (fact *BurnFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (BurnFact) GenerateHash

func (fact BurnFact) GenerateHash() util.Hash

func (BurnFact) IsValid

func (fact BurnFact) IsValid(b []byte) error

func (BurnFact) MarshalBSON

func (fact BurnFact) MarshalBSON() ([]byte, error)

func (BurnFact) MarshalJSON

func (fact BurnFact) MarshalJSON() ([]byte, error)

func (BurnFact) Target

func (fact BurnFact) Target() base.Address

type BurnFactBSONUnmarshaler

type BurnFactBSONUnmarshaler struct {
	Target string `bson:"target"`
	Amount string `bson:"amount"`
}

type BurnFactJSONMarshaler

type BurnFactJSONMarshaler struct {
	PointFactJSONMarshaler
	Target base.Address `json:"target"`
	Amount common.Big   `json:"amount"`
}

type BurnFactJSONUnMarshaler

type BurnFactJSONUnMarshaler struct {
	Target string `json:"target"`
	Amount string `json:"amount"`
}

type BurnProcessor

type BurnProcessor struct {
	*base.BaseOperationProcessor
}

func (*BurnProcessor) Close

func (opp *BurnProcessor) Close() error

func (*BurnProcessor) PreProcess

func (*BurnProcessor) Process

type Mint

type Mint struct {
	common.BaseOperation
}

func NewMint

func NewMint(fact MintFact) Mint

type MintFact

type MintFact struct {
	PointFact
	// contains filtered or unexported fields
}

func NewMintFact

func NewMintFact(
	token []byte,
	sender, contract base.Address,
	currency currencytypes.CurrencyID,
	receiver base.Address,
	amount common.Big,
) MintFact

func (MintFact) Addresses

func (fact MintFact) Addresses() ([]base.Address, error)

func (MintFact) Amount

func (fact MintFact) Amount() common.Big

func (MintFact) Bytes

func (fact MintFact) Bytes() []byte

func (*MintFact) DecodeBSON

func (fact *MintFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*MintFact) DecodeJSON

func (fact *MintFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (MintFact) GenerateHash

func (fact MintFact) GenerateHash() util.Hash

func (MintFact) IsValid

func (fact MintFact) IsValid(b []byte) error

func (MintFact) MarshalBSON

func (fact MintFact) MarshalBSON() ([]byte, error)

func (MintFact) MarshalJSON

func (fact MintFact) MarshalJSON() ([]byte, error)

func (MintFact) Receiver

func (fact MintFact) Receiver() base.Address

type MintFactBSONUnmarshaler

type MintFactBSONUnmarshaler struct {
	Receiver string `bson:"receiver"`
	Amount   string `bson:"amount"`
}

type MintFactJSONMarshaler

type MintFactJSONMarshaler struct {
	PointFactJSONMarshaler
	Receiver base.Address `json:"receiver"`
	Amount   common.Big   `json:"amount"`
}

type MintFactJSONUnMarshaler

type MintFactJSONUnMarshaler struct {
	Receiver string `json:"receiver"`
	Amount   string `json:"amount"`
}

type MintProcessor

type MintProcessor struct {
	*base.BaseOperationProcessor
}

func (*MintProcessor) Close

func (opp *MintProcessor) Close() error

func (*MintProcessor) PreProcess

func (*MintProcessor) Process

type PointFact

type PointFact struct {
	base.BaseFact
	// contains filtered or unexported fields
}

func NewPointFact

func NewPointFact(
	baseFact base.BaseFact,
	sender, contract base.Address,
	currency types.CurrencyID,
) PointFact

func (PointFact) Addresses

func (fact PointFact) Addresses() []base.Address

func (PointFact) Bytes

func (fact PointFact) Bytes() []byte

func (PointFact) Contract

func (fact PointFact) Contract() base.Address

func (PointFact) Currency

func (fact PointFact) Currency() types.CurrencyID

func (*PointFact) DecodeBSON

func (fact *PointFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*PointFact) DecodeJSON

func (fact *PointFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (PointFact) IsValid

func (fact PointFact) IsValid([]byte) error

func (PointFact) JSONMarshaler

func (fact PointFact) JSONMarshaler() PointFactJSONMarshaler

func (PointFact) MarshalBSON

func (fact PointFact) MarshalBSON() ([]byte, error)

func (PointFact) MarshalJSON

func (fact PointFact) MarshalJSON() ([]byte, error)

func (PointFact) Sender

func (fact PointFact) Sender() base.Address

type PointFactBSONUnmarshaler

type PointFactBSONUnmarshaler struct {
	Hint     string `bson:"_hint"`
	Sender   string `bson:"sender"`
	Contract string `bson:"contract"`
	Currency string `bson:"currency"`
}

type PointFactJSONMarshaler

type PointFactJSONMarshaler struct {
	base.BaseFactJSONMarshaler
	Sender   base.Address             `json:"sender"`
	Contract base.Address             `json:"contract"`
	Currency currencytypes.CurrencyID `json:"currency"`
}

type PointFactJSONUnmarshaler

type PointFactJSONUnmarshaler struct {
	base.BaseFactJSONUnmarshaler
	Sender   string `json:"sender"`
	Contract string `json:"contract"`
	Currency string `json:"currency"`
}

type RegisterModel

type RegisterModel struct {
	common.BaseOperation
}

func NewRegisterModel

func NewRegisterModel(fact RegisterModelFact) RegisterModel

type RegisterModelFact

type RegisterModelFact struct {
	PointFact
	// contains filtered or unexported fields
}

func NewRegisterModelFact

func NewRegisterModelFact(
	token []byte,
	sender, contract base.Address,
	currency currencytypes.CurrencyID,
	symbol types.PointSymbol,
	name string,
	decimal common.Big,
	initialSupply common.Big,
) RegisterModelFact

func (RegisterModelFact) Bytes

func (fact RegisterModelFact) Bytes() []byte

func (RegisterModelFact) Decimal

func (fact RegisterModelFact) Decimal() common.Big

func (*RegisterModelFact) DecodeBSON

func (fact *RegisterModelFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*RegisterModelFact) DecodeJSON

func (fact *RegisterModelFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (RegisterModelFact) GenerateHash

func (fact RegisterModelFact) GenerateHash() util.Hash

func (RegisterModelFact) InitialSupply

func (fact RegisterModelFact) InitialSupply() common.Big

func (RegisterModelFact) IsValid

func (fact RegisterModelFact) IsValid(b []byte) error

func (RegisterModelFact) MarshalBSON

func (fact RegisterModelFact) MarshalBSON() ([]byte, error)

func (RegisterModelFact) MarshalJSON

func (fact RegisterModelFact) MarshalJSON() ([]byte, error)

func (RegisterModelFact) Name

func (fact RegisterModelFact) Name() string

func (RegisterModelFact) Symbol

func (fact RegisterModelFact) Symbol() types.PointSymbol

type RegisterModelFactBSONUnmarshaler

type RegisterModelFactBSONUnmarshaler struct {
	Symbol        string `bson:"symbol"`
	Name          string `bson:"name"`
	Decimal       string `bson:"decimal"`
	InitialSupply string `bson:"initial_supply"`
}

type RegisterModelFactJSONMarshaler

type RegisterModelFactJSONMarshaler struct {
	PointFactJSONMarshaler
	Symbol        types.PointSymbol `json:"symbol"`
	Name          string            `json:"name"`
	Decimal       common.Big        `json:"decimal"`
	InitialSupply common.Big        `json:"initial_supply"`
}

type RegisterModelFactJSONUnMarshaler

type RegisterModelFactJSONUnMarshaler struct {
	Symbol        string `json:"symbol"`
	Name          string `json:"name"`
	Decimal       string `json:"decimal"`
	InitialSupply string `json:"initial_supply"`
}

type RegisterModelProcessor

type RegisterModelProcessor struct {
	*base.BaseOperationProcessor
}

func (*RegisterModelProcessor) Close

func (opp *RegisterModelProcessor) Close() error

func (*RegisterModelProcessor) PreProcess

func (*RegisterModelProcessor) Process

type TestApproveProcessor

type TestApproveProcessor struct {
	*test.BaseTestOperationProcessorNoItem[Approve]
}

func NewTestApproveProcessor

func NewTestApproveProcessor(tp *test.TestProcessor) TestApproveProcessor

func (*TestApproveProcessor) Create

func (*TestApproveProcessor) Decode

func (t *TestApproveProcessor) Decode(fileName string) *TestApproveProcessor

func (*TestApproveProcessor) IsValid

func (*TestApproveProcessor) LoadOperation

func (t *TestApproveProcessor) LoadOperation(fileName string,
) *TestApproveProcessor

func (*TestApproveProcessor) MakeOperation

func (t *TestApproveProcessor) MakeOperation(
	sender base.Address, privatekey base.Privatekey, contract, approved base.Address, amount int64, currency types.CurrencyID,
) *TestApproveProcessor

func (*TestApproveProcessor) Print

func (t *TestApproveProcessor) Print(fileName string,
) *TestApproveProcessor

func (*TestApproveProcessor) RunPreProcess

func (t *TestApproveProcessor) RunPreProcess() *TestApproveProcessor

func (*TestApproveProcessor) RunProcess

func (t *TestApproveProcessor) RunProcess() *TestApproveProcessor

func (*TestApproveProcessor) SetAccount

func (t *TestApproveProcessor) SetAccount(
	priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestApproveProcessor

func (*TestApproveProcessor) SetAmount

func (t *TestApproveProcessor) SetAmount(
	am int64, cid types.CurrencyID, target []types.Amount,
) *TestApproveProcessor

func (*TestApproveProcessor) SetContractAccount

func (t *TestApproveProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestApproveProcessor

func (*TestApproveProcessor) SetCurrency

func (t *TestApproveProcessor) SetCurrency(
	cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool,
) *TestApproveProcessor

type TestBurnProcessor

type TestBurnProcessor struct {
	*test.BaseTestOperationProcessorNoItem[Burn]
}

func NewTestBurnProcessor

func NewTestBurnProcessor(tp *test.TestProcessor) TestBurnProcessor

func (*TestBurnProcessor) Create

func (t *TestBurnProcessor) Create() *TestBurnProcessor

func (*TestBurnProcessor) Decode

func (t *TestBurnProcessor) Decode(fileName string) *TestBurnProcessor

func (*TestBurnProcessor) IsValid

func (t *TestBurnProcessor) IsValid() *TestBurnProcessor

func (*TestBurnProcessor) LoadOperation

func (t *TestBurnProcessor) LoadOperation(fileName string,
) *TestBurnProcessor

func (*TestBurnProcessor) MakeOperation

func (t *TestBurnProcessor) MakeOperation(
	sender base.Address, privatekey base.Privatekey, contract, target base.Address, amount int64, currency types.CurrencyID,
) *TestBurnProcessor

func (*TestBurnProcessor) Print

func (t *TestBurnProcessor) Print(fileName string,
) *TestBurnProcessor

func (*TestBurnProcessor) RunPreProcess

func (t *TestBurnProcessor) RunPreProcess() *TestBurnProcessor

func (*TestBurnProcessor) RunProcess

func (t *TestBurnProcessor) RunProcess() *TestBurnProcessor

func (*TestBurnProcessor) SetAccount

func (t *TestBurnProcessor) SetAccount(
	priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestBurnProcessor

func (*TestBurnProcessor) SetAmount

func (t *TestBurnProcessor) SetAmount(
	am int64, cid types.CurrencyID, target []types.Amount,
) *TestBurnProcessor

func (*TestBurnProcessor) SetContractAccount

func (t *TestBurnProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestBurnProcessor

func (*TestBurnProcessor) SetCurrency

func (t *TestBurnProcessor) SetCurrency(
	cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool,
) *TestBurnProcessor

type TestMintProcessor

type TestMintProcessor struct {
	*test.BaseTestOperationProcessorNoItem[Mint]
}

func NewTestMintProcessor

func NewTestMintProcessor(tp *test.TestProcessor) TestMintProcessor

func (*TestMintProcessor) Create

func (t *TestMintProcessor) Create() *TestMintProcessor

func (*TestMintProcessor) Decode

func (t *TestMintProcessor) Decode(fileName string) *TestMintProcessor

func (*TestMintProcessor) IsValid

func (t *TestMintProcessor) IsValid() *TestMintProcessor

func (*TestMintProcessor) LoadOperation

func (t *TestMintProcessor) LoadOperation(fileName string,
) *TestMintProcessor

func (*TestMintProcessor) MakeOperation

func (t *TestMintProcessor) MakeOperation(
	sender base.Address, privatekey base.Privatekey, contract, receiver base.Address, amount int64, currency types.CurrencyID,
) *TestMintProcessor

func (*TestMintProcessor) Print

func (t *TestMintProcessor) Print(fileName string,
) *TestMintProcessor

func (*TestMintProcessor) RunPreProcess

func (t *TestMintProcessor) RunPreProcess() *TestMintProcessor

func (*TestMintProcessor) RunProcess

func (t *TestMintProcessor) RunProcess() *TestMintProcessor

func (*TestMintProcessor) SetAccount

func (t *TestMintProcessor) SetAccount(
	priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestMintProcessor

func (*TestMintProcessor) SetAmount

func (t *TestMintProcessor) SetAmount(
	am int64, cid types.CurrencyID, target []types.Amount,
) *TestMintProcessor

func (*TestMintProcessor) SetContractAccount

func (t *TestMintProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestMintProcessor

func (*TestMintProcessor) SetCurrency

func (t *TestMintProcessor) SetCurrency(
	cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool,
) *TestMintProcessor

type TestRegisterPointProcessor

type TestRegisterPointProcessor struct {
	*test.BaseTestOperationProcessorNoItem[RegisterModel]
}

func NewTestRegisterPointProcessor

func NewTestRegisterPointProcessor(tp *test.TestProcessor) TestRegisterPointProcessor

func (*TestRegisterPointProcessor) Create

func (*TestRegisterPointProcessor) Decode

func (*TestRegisterPointProcessor) IsValid

func (*TestRegisterPointProcessor) LoadOperation

func (t *TestRegisterPointProcessor) LoadOperation(fileName string,
) *TestRegisterPointProcessor

func (*TestRegisterPointProcessor) MakeOperation

func (t *TestRegisterPointProcessor) MakeOperation(
	sender base.Address, privatekey base.Privatekey, contract base.Address,
	symbol, name string, decimal, initialSupply int64, currency types.CurrencyID,
) *TestRegisterPointProcessor

func (*TestRegisterPointProcessor) Print

func (*TestRegisterPointProcessor) RunPreProcess

func (*TestRegisterPointProcessor) RunProcess

func (*TestRegisterPointProcessor) SetAccount

func (t *TestRegisterPointProcessor) SetAccount(
	priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestRegisterPointProcessor

func (*TestRegisterPointProcessor) SetAmount

func (*TestRegisterPointProcessor) SetContractAccount

func (t *TestRegisterPointProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestRegisterPointProcessor

func (*TestRegisterPointProcessor) SetCurrency

func (t *TestRegisterPointProcessor) SetCurrency(
	cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool,
) *TestRegisterPointProcessor

type TestTransferFromProcessor

type TestTransferFromProcessor struct {
	*test.BaseTestOperationProcessorNoItem[TransferFrom]
}

func NewTestTransferFromProcessor

func NewTestTransferFromProcessor(tp *test.TestProcessor) TestTransferFromProcessor

func (*TestTransferFromProcessor) Create

func (*TestTransferFromProcessor) Decode

func (*TestTransferFromProcessor) IsValid

func (*TestTransferFromProcessor) LoadOperation

func (t *TestTransferFromProcessor) LoadOperation(fileName string,
) *TestTransferFromProcessor

func (*TestTransferFromProcessor) MakeOperation

func (t *TestTransferFromProcessor) MakeOperation(
	sender base.Address, privatekey base.Privatekey, contract, receiver, target base.Address, amount int64, currency types.CurrencyID,
) *TestTransferFromProcessor

func (*TestTransferFromProcessor) Print

func (*TestTransferFromProcessor) RunPreProcess

func (*TestTransferFromProcessor) RunProcess

func (*TestTransferFromProcessor) SetAccount

func (t *TestTransferFromProcessor) SetAccount(
	priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestTransferFromProcessor

func (*TestTransferFromProcessor) SetAmount

func (*TestTransferFromProcessor) SetContractAccount

func (t *TestTransferFromProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestTransferFromProcessor

func (*TestTransferFromProcessor) SetCurrency

func (t *TestTransferFromProcessor) SetCurrency(
	cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool,
) *TestTransferFromProcessor

type TestTransferProcessor

type TestTransferProcessor struct {
	*test.BaseTestOperationProcessorNoItem[Transfer]
}

func NewTestTransferProcessor

func NewTestTransferProcessor(tp *test.TestProcessor) TestTransferProcessor

func (*TestTransferProcessor) Create

func (*TestTransferProcessor) Decode

func (t *TestTransferProcessor) Decode(fileName string) *TestTransferProcessor

func (*TestTransferProcessor) IsValid

func (*TestTransferProcessor) LoadOperation

func (t *TestTransferProcessor) LoadOperation(fileName string,
) *TestTransferProcessor

func (*TestTransferProcessor) MakeOperation

func (t *TestTransferProcessor) MakeOperation(
	sender base.Address, privatekey base.Privatekey, contract, receiver base.Address, amount int64, currency types.CurrencyID,
) *TestTransferProcessor

func (*TestTransferProcessor) Print

func (t *TestTransferProcessor) Print(fileName string,
) *TestTransferProcessor

func (*TestTransferProcessor) RunPreProcess

func (t *TestTransferProcessor) RunPreProcess() *TestTransferProcessor

func (*TestTransferProcessor) RunProcess

func (*TestTransferProcessor) SetAccount

func (t *TestTransferProcessor) SetAccount(
	priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestTransferProcessor

func (*TestTransferProcessor) SetAmount

func (t *TestTransferProcessor) SetAmount(
	am int64, cid types.CurrencyID, target []types.Amount,
) *TestTransferProcessor

func (*TestTransferProcessor) SetContractAccount

func (t *TestTransferProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestTransferProcessor

func (*TestTransferProcessor) SetCurrency

func (t *TestTransferProcessor) SetCurrency(
	cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool,
) *TestTransferProcessor

type Transfer

type Transfer struct {
	common.BaseOperation
}

func NewTransfer

func NewTransfer(fact TransferFact) Transfer

type TransferFact

type TransferFact struct {
	PointFact
	// contains filtered or unexported fields
}

func NewTransferFact

func NewTransferFact(
	token []byte,
	sender, contract base.Address,
	currency currencytypes.CurrencyID,
	receiver base.Address,
	amount common.Big,
) TransferFact

func (TransferFact) Addresses

func (fact TransferFact) Addresses() ([]base.Address, error)

func (TransferFact) Amount

func (fact TransferFact) Amount() common.Big

func (TransferFact) Bytes

func (fact TransferFact) Bytes() []byte

func (*TransferFact) DecodeBSON

func (fact *TransferFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*TransferFact) DecodeJSON

func (fact *TransferFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (TransferFact) GenerateHash

func (fact TransferFact) GenerateHash() util.Hash

func (TransferFact) IsValid

func (fact TransferFact) IsValid(b []byte) error

func (TransferFact) MarshalBSON

func (fact TransferFact) MarshalBSON() ([]byte, error)

func (TransferFact) MarshalJSON

func (fact TransferFact) MarshalJSON() ([]byte, error)

func (TransferFact) Receiver

func (fact TransferFact) Receiver() base.Address

type TransferFactBSONUnmarshaler

type TransferFactBSONUnmarshaler struct {
	Receiver string `bson:"receiver"`
	Amount   string `bson:"amount"`
}

type TransferFactJSONMarshaler

type TransferFactJSONMarshaler struct {
	PointFactJSONMarshaler
	Receiver base.Address `json:"receiver"`
	Amount   common.Big   `json:"amount"`
}

type TransferFactJSONUnMarshaler

type TransferFactJSONUnMarshaler struct {
	Receiver string `json:"receiver"`
	Amount   string `json:"amount"`
}

type TransferFrom

type TransferFrom struct {
	common.BaseOperation
}

func NewTransferFrom

func NewTransferFrom(fact TransferFromFact) TransferFrom

type TransferFromFact

type TransferFromFact struct {
	PointFact
	// contains filtered or unexported fields
}

func NewTransferFromFact

func NewTransferFromFact(
	token []byte,
	sender, contract base.Address,
	currency currencytypes.CurrencyID,
	receiver, target base.Address,
	amount common.Big,
) TransferFromFact

func (TransferFromFact) Addresses

func (fact TransferFromFact) Addresses() ([]base.Address, error)

func (TransferFromFact) Amount

func (fact TransferFromFact) Amount() common.Big

func (TransferFromFact) Bytes

func (fact TransferFromFact) Bytes() []byte

func (*TransferFromFact) DecodeBSON

func (fact *TransferFromFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*TransferFromFact) DecodeJSON

func (fact *TransferFromFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (TransferFromFact) GenerateHash

func (fact TransferFromFact) GenerateHash() util.Hash

func (TransferFromFact) IsValid

func (fact TransferFromFact) IsValid(b []byte) error

func (TransferFromFact) MarshalBSON

func (fact TransferFromFact) MarshalBSON() ([]byte, error)

func (TransferFromFact) MarshalJSON

func (fact TransferFromFact) MarshalJSON() ([]byte, error)

func (TransferFromFact) Receiver

func (fact TransferFromFact) Receiver() base.Address

func (TransferFromFact) Target

func (fact TransferFromFact) Target() base.Address

type TransferFromFactBSONUnmarshaler

type TransferFromFactBSONUnmarshaler struct {
	Receiver string `bson:"receiver"`
	Target   string `bson:"target"`
	Amount   string `bson:"amount"`
}

type TransferFromFactJSONMarshaler

type TransferFromFactJSONMarshaler struct {
	PointFactJSONMarshaler
	Receiver base.Address `json:"receiver"`
	Target   base.Address `json:"target"`
	Amount   common.Big   `json:"amount"`
}

type TransferFromFactJSONUnMarshaler

type TransferFromFactJSONUnMarshaler struct {
	Receiver string `json:"receiver"`
	Target   string `json:"target"`
	Amount   string `json:"amount"`
}

type TransferFromProcessor

type TransferFromProcessor struct {
	*base.BaseOperationProcessor
}

func (*TransferFromProcessor) Close

func (opp *TransferFromProcessor) Close() error

func (*TransferFromProcessor) PreProcess

func (*TransferFromProcessor) Process

type TransferProcessor

type TransferProcessor struct {
	*base.BaseOperationProcessor
}

func (*TransferProcessor) Close

func (opp *TransferProcessor) Close() error

func (*TransferProcessor) PreProcess

func (*TransferProcessor) Process

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL