Documentation ¶
Index ¶
- Constants
- func KycUser(addr common.Address) bool
- func SaveExchangeOrder(stub shim.ChaincodeStubInterface, order *ExchangeOrder) error
- func UpdateExchangeOrder(stub shim.ChaincodeStubInterface, order *ExchangeOrder) error
- type ExchangeMgr
- func (p *ExchangeMgr) AddExchangeOrder(stub shim.ChaincodeStubInterface, sheet *ExchangeOrder) error
- func (p *ExchangeMgr) Cancel(stub shim.ChaincodeStubInterface, orderSn string) error
- func (p *ExchangeMgr) GetActiveOrderList(stub shim.ChaincodeStubInterface) ([]*ExchangeOrderJson, error)
- func (p *ExchangeMgr) GetActiveOrdersByMaker(stub shim.ChaincodeStubInterface, addr common.Address) ([]*ExchangeOrderJson, error)
- func (p *ExchangeMgr) GetAllMatchList(stub shim.ChaincodeStubInterface) ([]*MatchRecordJson, error)
- func (p *ExchangeMgr) GetHistoryOrderList(stub shim.ChaincodeStubInterface) ([]*ExchangeOrderJson, error)
- func (p *ExchangeMgr) GetOrderMatchList(stub shim.ChaincodeStubInterface, orderSn string) ([]*MatchRecordJson, error)
- func (p *ExchangeMgr) Init(stub shim.ChaincodeStubInterface) pb.Response
- func (p *ExchangeMgr) Invoke(stub shim.ChaincodeStubInterface) pb.Response
- func (p *ExchangeMgr) Maker(stub shim.ChaincodeStubInterface, wantAsset *modules.Asset, ...) error
- func (p *ExchangeMgr) Payout(stub shim.ChaincodeStubInterface, addr common.Address, amount decimal.Decimal, ...) error
- func (p *ExchangeMgr) Taker(stub shim.ChaincodeStubInterface, orderSn string) error
- type ExchangeOrder
- type ExchangeOrderJson
- type MatchRecord
- type MatchRecordJson
Constants ¶
View Source
const EXCHANGELIST_HISTORY = "ExchangeOrderHistory-"
View Source
const EXCHANGELIST_RECORD = "ExchangeOrder-"
View Source
const MatchRecordPrefix = "MatchRecord-"
Variables ¶
This section is empty.
Functions ¶
func SaveExchangeOrder ¶
func SaveExchangeOrder(stub shim.ChaincodeStubInterface, order *ExchangeOrder) error
增加一个新订单
func UpdateExchangeOrder ¶
func UpdateExchangeOrder(stub shim.ChaincodeStubInterface, order *ExchangeOrder) error
更新一个已有的订单
Types ¶
type ExchangeMgr ¶
type ExchangeMgr struct { }
PCGTta3M4t3yXu8uRgkKvaWd2d8DS36t3ba
func (*ExchangeMgr) AddExchangeOrder ¶
func (p *ExchangeMgr) AddExchangeOrder(stub shim.ChaincodeStubInterface, sheet *ExchangeOrder) error
func (*ExchangeMgr) Cancel ¶
func (p *ExchangeMgr) Cancel(stub shim.ChaincodeStubInterface, orderSn string) error
func (*ExchangeMgr) GetActiveOrderList ¶
func (p *ExchangeMgr) GetActiveOrderList(stub shim.ChaincodeStubInterface) ([]*ExchangeOrderJson, error)
func (*ExchangeMgr) GetActiveOrdersByMaker ¶
func (p *ExchangeMgr) GetActiveOrdersByMaker(stub shim.ChaincodeStubInterface, addr common.Address) ([]*ExchangeOrderJson, error)
func (*ExchangeMgr) GetAllMatchList ¶
func (p *ExchangeMgr) GetAllMatchList(stub shim.ChaincodeStubInterface) ([]*MatchRecordJson, error)
func (*ExchangeMgr) GetHistoryOrderList ¶
func (p *ExchangeMgr) GetHistoryOrderList(stub shim.ChaincodeStubInterface) ([]*ExchangeOrderJson, error)
func (*ExchangeMgr) GetOrderMatchList ¶
func (p *ExchangeMgr) GetOrderMatchList(stub shim.ChaincodeStubInterface, orderSn string) ([]*MatchRecordJson, error)
func (*ExchangeMgr) Init ¶
func (p *ExchangeMgr) Init(stub shim.ChaincodeStubInterface) pb.Response
func (*ExchangeMgr) Invoke ¶
func (p *ExchangeMgr) Invoke(stub shim.ChaincodeStubInterface) pb.Response
func (*ExchangeMgr) Maker ¶
func (p *ExchangeMgr) Maker(stub shim.ChaincodeStubInterface, wantAsset *modules.Asset, wantAmount decimal.Decimal) error
func (*ExchangeMgr) Payout ¶
func (p *ExchangeMgr) Payout(stub shim.ChaincodeStubInterface, addr common.Address, amount decimal.Decimal, asset *modules.Asset) error
func (*ExchangeMgr) Taker ¶
func (p *ExchangeMgr) Taker(stub shim.ChaincodeStubInterface, orderSn string) error
type ExchangeOrder ¶
type ExchangeOrderJson ¶
type ExchangeOrderJson struct { Address common.Address SaleAsset string SaleAmount decimal.Decimal CurrentSaleAmount decimal.Decimal DealSaleAmount decimal.Decimal WantAsset string WantAmount decimal.Decimal DealWantAmount decimal.Decimal CurrentWantAmount decimal.Decimal ExchangeSn string Status string }
Click to show internal directories.
Click to hide internal directories.