Commit 2e4b635d authored by pengjun's avatar pengjun

#627 remove collateralize close; add collateralize retrieve

parent 5523229c
......@@ -24,7 +24,7 @@ func CollateralizeCmd() *cobra.Command {
CollateralizeAppendRawTxCmd(),
CollateralizeRepayRawTxCmd(),
CollateralizePriceFeedRawTxCmd(),
CollateralizeCloseRawTxCmd(),
CollateralizeRetrieveRawTxCmd(),
CollateralizeManageRawTxCmd(),
CollateralizeQueryCmd(),
)
......@@ -233,22 +233,24 @@ func CollateralizePriceFeed(cmd *cobra.Command, args []string) {
}
// CollateralizeCloseRawTxCmd 生成开始交易命令行
func CollateralizeCloseRawTxCmd() *cobra.Command {
func CollateralizeRetrieveRawTxCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "close",
Short: "close a collateralize",
Run: CollateralizeClose,
Use: "retrieve",
Short: "retrieve balance",
Run: CollateralizeRetrieve,
}
addCollateralizeCloseFlags(cmd)
addCollateralizeRetrieveFlags(cmd)
return cmd
}
func addCollateralizeCloseFlags(cmd *cobra.Command) {
func addCollateralizeRetrieveFlags(cmd *cobra.Command) {
cmd.Flags().StringP("collateralizeID", "g", "", "collateralize ID")
cmd.MarkFlagRequired("collateralizeID")
cmd.Flags().StringP("balance", "b", "", "retrieve balance")
cmd.MarkFlagRequired("balance")
}
func CollateralizeClose(cmd *cobra.Command, args []string) {
func CollateralizeRetrieve(cmd *cobra.Command, args []string) {
title, _ := cmd.Flags().GetString("title")
cfg := types.GetCliSysParam(title)
if cfg == nil {
......@@ -257,11 +259,12 @@ func CollateralizeClose(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
collateralizeID, _ := cmd.Flags().GetString("collateralizeID")
balance, _ := cmd.Flags().GetInt64("balance")
params := &rpctypes.CreateTxIn{
Execer: cfg.ExecName(pkt.CollateralizeX),
ActionName: "CollateralizeClose",
Payload: []byte(fmt.Sprintf("{\"collateralizeID\":\"%s\"}", collateralizeID)),
ActionName: "CollateralizeRetrieve",
Payload: []byte(fmt.Sprintf("{\"collateralizeID\":\"%s\", \"balance\": %d}", collateralizeID, balance)),
}
var res string
......
......@@ -528,11 +528,12 @@ func TestCollateralize(t *testing.T) {
assert.NotNil(t, res)
// collateralize close
p11 := &pkt.CollateralizeCloseTx{
// collateralize retrieve
p11 := &pkt.CollateralizeRetrieveTx{
CollateralizeID: common.ToHex(collateralizeID),
Balance:100,
}
createTx, err = pkt.CreateRawCollateralizeCloseTx(env.cfg, p11)
createTx, err = pkt.CreateRawCollateralizeRetrieveTx(env.cfg, p11)
if err != nil {
t.Error("RPC_Default_Process", "err", err)
}
......@@ -558,7 +559,7 @@ func TestCollateralize(t *testing.T) {
env.kvdb.Set(kv.Key, kv.Value)
}
// query collateralize by status
res, err = exec.Query("CollateralizeByStatus", types.Encode(&pkt.ReqCollateralizeByStatus{Status:2}))
res, err = exec.Query("CollateralizeByStatus", types.Encode(&pkt.ReqCollateralizeByStatus{Status:1}))
assert.Nil(t, err)
assert.NotNil(t, res)
}
......
......@@ -206,7 +206,7 @@ func (action *Action) GetFeedReceiptLog(collateralize *pty.Collateralize, record
// GetCloseReceiptLog generate logs for Collateralize close action
func (action *Action) GetCloseReceiptLog(collateralize *pty.Collateralize) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogCollateralizeClose
log.Ty = pty.TyLogCollateralizeRetrieve
c := &pty.ReceiptCollateralize{}
c.CollateralizeId = collateralize.CollateralizeId
......@@ -368,18 +368,16 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
return nil, pty.ErrPermissionDeny
}
collateralizeID := common.ToHex(action.txhash)
// 检查ccny余额
if !action.CheckExecTokenAccount(action.fromaddr, create.TotalBalance, false) {
clog.Error("CollateralizeCreate", "fromaddr", action.fromaddr, "balance", create.TotalBalance, "error", types.ErrInsufficientBalance)
return nil, types.ErrInsufficientBalance
}
// 查找ID是否重复
_, err := queryCollateralizeByID(action.db, collateralizeID)
// 根据地址查找ID
collateralizeIDs, err := queryCollateralizeByAddr(action.localDB, action.fromaddr, pty.CollateralizeStatusCreated, 0)
if err != types.ErrNotFound {
clog.Error("CollateralizeCreate", "CollateralizeCreate repeated", collateralizeID)
clog.Error("CollateralizeCreate.queryCollateralizeByAddr", "addr", action.fromaddr)
return nil, pty.ErrCollateralizeRepeatHash
}
......@@ -392,35 +390,46 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...)
// 获取借贷配置
var collcfg *pty.CollateralizeManage
cfg, err := getCollateralizeConfig(action.db)
if cfg == nil {
collcfg = &pty.CollateralizeManage{
DebtCeiling:DefaultDebtCeiling,
LiquidationRatio:DefaultLiquidationRatio,
StabilityFeeRatio:DefaultStabilityFeeRation,
Period:DefaultPeriod,
CollTotalBalance:DefaultCollTotalBalance,
var collateralizeID string
coll := &CollateralizeDB{}
if collateralizeIDs == nil {
collateralizeID = common.ToHex(action.txhash)
// 获取借贷配置
var collcfg *pty.CollateralizeManage
cfg, _ := getCollateralizeConfig(action.db)
if cfg == nil {
collcfg = &pty.CollateralizeManage{
DebtCeiling:DefaultDebtCeiling,
LiquidationRatio:DefaultLiquidationRatio,
StabilityFeeRatio:DefaultStabilityFeeRation,
Period:DefaultPeriod,
CollTotalBalance:DefaultCollTotalBalance,
}
} else {
collcfg = cfg
}
// 构造coll结构
coll.CollateralizeId = collateralizeID
coll.LiquidationRatio = collcfg.LiquidationRatio
coll.TotalBalance = create.TotalBalance
coll.DebtCeiling = collcfg.DebtCeiling
coll.StabilityFeeRatio = collcfg.StabilityFeeRatio
coll.Period = collcfg.Period
coll.Balance = create.TotalBalance
coll.CreateAddr = action.fromaddr
coll.Status = pty.CollateralizeActionCreate
coll.Index = action.GetIndex()
coll.CollBalance = 0
} else {
collcfg = cfg
collateralize, err := queryCollateralizeByID(action.db, collateralizeIDs[0])
if err != nil {
clog.Error("CollateralizeCreate.queryCollateralizeByID", "addr", action.fromaddr, "execaddr", action.execaddr, "collId", collateralizeIDs[0])
return nil, err
}
coll.Collateralize = *collateralize
coll.TotalBalance += create.TotalBalance
}
// 构造coll结构
coll := &CollateralizeDB{}
coll.CollateralizeId = collateralizeID
coll.LiquidationRatio = collcfg.LiquidationRatio
coll.TotalBalance = create.TotalBalance
coll.DebtCeiling = collcfg.DebtCeiling
coll.StabilityFeeRatio = collcfg.StabilityFeeRatio
coll.Period = collcfg.Period
coll.Balance = create.TotalBalance
coll.CreateAddr = action.fromaddr
coll.Status = pty.CollateralizeActionCreate
coll.Index = action.GetIndex()
coll.CollBalance = 0
clog.Debug("CollateralizeCreate created", "CollateralizeID", collateralizeID, "TotalBalance", coll.TotalBalance)
// 保存
......@@ -1077,45 +1086,55 @@ func (action *Action) CollateralizeFeed(feed *pty.CollateralizeFeed) (*types.Rec
return receipt, nil
}
// CollateralizeClose 终止借
func (action *Action) CollateralizeClose(close *pty.CollateralizeClose) (*types.Receipt, error) {
// CollateralizeRetrieve 收回未放
func (action *Action) CollateralizeRetrieve(retrieve *pty.CollateralizeRetrieve) (*types.Receipt, error) {
var logs []*types.ReceiptLog
var kv []*types.KeyValue
var receipt *types.Receipt
collateralize, err := queryCollateralizeByID(action.db, close.CollateralizeId)
collateralize, err := queryCollateralizeByID(action.db, retrieve.CollateralizeId)
if err != nil {
clog.Error("CollateralizeClose", "CollateralizeId", close.CollateralizeId, "err", err)
clog.Error("CollateralizeRetrieve", "CollateralizeId", retrieve.CollateralizeId, "err", err)
return nil, err
}
if action.fromaddr != collateralize.CreateAddr {
clog.Error("CollateralizeClose", "CollateralizeId", close.CollateralizeId, "err", "account error", "create", collateralize.CreateAddr, "from", action.fromaddr)
clog.Error("CollateralizeRetrieve", "CollateralizeId", retrieve.CollateralizeId, "err", "account error", "create", collateralize.CreateAddr, "from", action.fromaddr)
return nil, pty.ErrPermissionDeny
}
for _, borrowRecord := range collateralize.BorrowRecords {
if borrowRecord.Status != pty.CollateralizeUserStatusClose {
clog.Error("CollateralizeClose", "CollateralizeId", close.CollateralizeId, "addr", action.fromaddr, "execaddr", action.execaddr, "err", pty.ErrCollateralizeRecordNotEmpty)
return nil, pty.ErrCollateralizeRecordNotEmpty
}
}
//for _, borrowRecord := range collateralize.BorrowRecords {
// if borrowRecord.Status != pty.CollateralizeUserStatusClose {
// clog.Error("CollateralizeRetrieve", "CollateralizeId", retrieve.CollateralizeId, "addr", action.fromaddr, "execaddr", action.execaddr, "err", pty.ErrCollateralizeRecordNotEmpty)
// return nil, pty.ErrCollateralizeRecordNotEmpty
// }
//}
// 收回金额不能大于待放出金额
if retrieve.Balance > collateralize.Balance {
clog.Error("CollateralizeRetrieve", "CollateralizeId", retrieve.CollateralizeId, "err", "balance error", "retrieve balance", retrieve.Balance, "available balance", collateralize.Balance)
return nil, pty.ErrPermissionDeny
}
// 解冻ccny
receipt, err = action.tokenAccount.ExecActive(action.fromaddr, action.execaddr, collateralize.Balance*Coin)
receipt, err = action.tokenAccount.ExecActive(action.fromaddr, action.execaddr, retrieve.Balance*Coin)
if err != nil {
clog.Error("IssuanceClose.ExecActive", "addr", action.fromaddr, "execaddr", action.execaddr, "amount", collateralize.TotalBalance)
clog.Error("IssuanceClose.ExecActive", "addr", action.fromaddr, "execaddr", action.execaddr, "balance", retrieve.Balance)
return nil, err
}
logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...)
clog.Debug("CollateralizeClose", "ID", close.CollateralizeId)
clog.Debug("CollateralizeRetrieve", "ID", retrieve.CollateralizeId, "balance", retrieve.Balance)
coll := &CollateralizeDB{*collateralize}
coll.Status = pty.CollateralizeStatusClose
coll.PreIndex = coll.Index
coll.Index = action.GetIndex()
coll.TotalBalance -= retrieve.Balance
coll.Balance -= retrieve.Balance
if coll.TotalBalance == 0 {
coll.PreIndex = coll.Index
coll.Index = action.GetIndex()
coll.Status = pty.CollateralizeStatusClose
}
coll.Save(action.db)
kv = append(kv, coll.GetKVSet()...)
......
......@@ -39,10 +39,10 @@ func (c *Collateralize) Exec_Feed(payload *pty.CollateralizeFeed, tx *types.Tran
return actiondb.CollateralizeFeed(payload)
}
// Exec_Close Action
func (c *Collateralize) Exec_Close(payload *pty.CollateralizeClose, tx *types.Transaction, index int) (*types.Receipt, error) {
// Exec_Retrieve Action
func (c *Collateralize) Exec_Retrieve(payload *pty.CollateralizeRetrieve, tx *types.Transaction, index int) (*types.Receipt, error) {
actiondb := NewCollateralizeAction(c, tx, index)
return actiondb.CollateralizeClose(payload)
return actiondb.CollateralizeRetrieve(payload)
}
// Exec_Close Action
......
......@@ -13,7 +13,7 @@ func (c *Collateralize) execDelLocal(tx *types.Transaction, receiptData *types.R
set := &types.LocalDBSet{}
for _, item := range receiptData.Logs {
if item.Ty == pty.TyLogCollateralizeCreate || item.Ty == pty.TyLogCollateralizeBorrow || item.Ty == pty.TyLogCollateralizeAppend ||
item.Ty == pty.TyLogCollateralizeRepay || item.Ty == pty.TyLogCollateralizeFeed || item.Ty == pty.TyLogCollateralizeClose {
item.Ty == pty.TyLogCollateralizeRepay || item.Ty == pty.TyLogCollateralizeFeed || item.Ty == pty.TyLogCollateralizeRetrieve {
var collateralizeLog pty.ReceiptCollateralize
err := types.Decode(item.Log, &collateralizeLog)
if err != nil {
......@@ -57,12 +57,14 @@ func (c *Collateralize) execDelLocal(tx *types.Transaction, receiptData *types.R
// set.KV = append(set.KV, c.deleteCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.Index)...)
//}
break
case pty.TyLogCollateralizeClose:
set.KV = append(set.KV, c.deleteCollateralizeStatus(collateralizeLog.Status, collateralizeLog.Index)...)
set.KV = append(set.KV, c.addCollateralizeStatus(pty.CollateralizeStatusCreated, collateralizeLog.CollateralizeId,
collateralizeLog.PreIndex)...)
//set.KV = append(set.KV, c.addCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.CollateralizeId,
// collateralizeLog.PreStatus, collateralizeLog.PreIndex)...)
case pty.TyLogCollateralizeRetrieve:
if collateralizeLog.Status == pty.CollateralizeStatusClose {
set.KV = append(set.KV, c.deleteCollateralizeStatus(collateralizeLog.Status, collateralizeLog.Index)...)
set.KV = append(set.KV, c.addCollateralizeStatus(pty.CollateralizeStatusCreated, collateralizeLog.CollateralizeId,
collateralizeLog.PreIndex)...)
//set.KV = append(set.KV, c.addCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.CollateralizeId,
// collateralizeLog.PreStatus, collateralizeLog.PreIndex)...)
}
break
}
}
......@@ -96,8 +98,8 @@ func (c *Collateralize) ExecDelLocal_Feed(payload *pty.CollateralizeFeed, tx *ty
return c.execDelLocal(tx, receiptData)
}
// ExecDelLocal_Close Action
func (c *Collateralize) ExecDelLocal_Close(payload *pty.CollateralizeClose, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
// ExecDelLocal_Retrieve Action
func (c *Collateralize) ExecDelLocal_Retrieve(payload *pty.CollateralizeRetrieve, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
return c.execDelLocal(tx, receiptData)
}
......
......@@ -14,7 +14,7 @@ func (c *Collateralize) execLocal(tx *types.Transaction, receipt *types.ReceiptD
set := &types.LocalDBSet{}
for _, item := range receipt.Logs {
if item.Ty == pty.TyLogCollateralizeCreate || item.Ty == pty.TyLogCollateralizeBorrow || item.Ty == pty.TyLogCollateralizeAppend ||
item.Ty == pty.TyLogCollateralizeRepay || item.Ty == pty.TyLogCollateralizeFeed || item.Ty == pty.TyLogCollateralizeClose {
item.Ty == pty.TyLogCollateralizeRepay || item.Ty == pty.TyLogCollateralizeFeed || item.Ty == pty.TyLogCollateralizeRetrieve {
var collateralizeLog pty.ReceiptCollateralize
err := types.Decode(item.Log, &collateralizeLog)
if err != nil {
......@@ -59,10 +59,12 @@ func (c *Collateralize) execLocal(tx *types.Transaction, receipt *types.ReceiptD
// collateralizeLog.RecordId, collateralizeLog.Index)...)
//}
break
case pty.TyLogCollateralizeClose:
set.KV = append(set.KV, c.addCollateralizeStatus(collateralizeLog.Status, collateralizeLog.CollateralizeId, collateralizeLog.Index)...)
set.KV = append(set.KV, c.deleteCollateralizeStatus(collateralizeLog.PreStatus, collateralizeLog.PreIndex)...)
//set.KV = append(set.KV, c.deleteCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.PreIndex)...)
case pty.TyLogCollateralizeRetrieve:
if collateralizeLog.Status == pty.CollateralizeStatusClose {
set.KV = append(set.KV, c.addCollateralizeStatus(collateralizeLog.Status, collateralizeLog.CollateralizeId, collateralizeLog.Index)...)
set.KV = append(set.KV, c.deleteCollateralizeStatus(collateralizeLog.PreStatus, collateralizeLog.PreIndex)...)
//set.KV = append(set.KV, c.deleteCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.PreIndex)...)
}
break
}
}
......@@ -95,8 +97,8 @@ func (c *Collateralize) ExecLocal_Feed(payload *pty.CollateralizeFeed, tx *types
return c.execLocal(tx, receiptData)
}
// ExecLocal_Close Action
func (c *Collateralize) ExecLocal_Close(payload *pty.CollateralizeClose, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
// ExecLocal_Retrieve Action
func (c *Collateralize) ExecLocal_Retrieve(payload *pty.CollateralizeRetrieve, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
return c.execLocal(tx, receiptData)
}
......
......@@ -51,13 +51,13 @@ message AssetPriceRecord {
// action
message CollateralizeAction {
oneof value {
CollateralizeCreate create = 1; //创建一期借贷
CollateralizeBorrow borrow = 2; //借贷
CollateralizeRepay repay = 3; //清算
CollateralizeAppend append = 4; //追加
CollateralizeFeed feed = 5; //喂价
CollateralizeClose close = 6; //关闭
CollateralizeManage manage = 7; //全局配置
CollateralizeCreate create = 1; //创建一期借贷
CollateralizeBorrow borrow = 2; //借贷
CollateralizeRepay repay = 3; //清算
CollateralizeAppend append = 4; //追加
CollateralizeFeed feed = 5; //喂价
CollateralizeRetrieve retrieve = 6; //收回
CollateralizeManage manage = 7; //全局配置
}
int32 ty = 10;
}
......@@ -105,9 +105,10 @@ message CollateralizeFeed {
repeated int64 volume = 3; //成交量
}
// 放贷关闭
message CollateralizeClose {
// 收回
message CollateralizeRetrieve {
string collateralizeId = 1; //借贷期数ID
int64 balance = 2; //收回金额
}
// exec_local 放贷信息
......
......@@ -57,7 +57,7 @@ func (collateralize *CollateralizeType) GetLogMap() map[int64]*types.LogInfo {
TyLogCollateralizeRepay: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeRepay"},
TyLogCollateralizeAppend: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeAppend"},
TyLogCollateralizeFeed: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeFeed"},
TyLogCollateralizeClose: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeClose"},
TyLogCollateralizeRetrieve: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeRetrieve"},
}
}
......@@ -111,14 +111,14 @@ func (collateralize CollateralizeType) CreateTx(action string, message json.RawM
return nil, types.ErrInvalidParam
}
return CreateRawCollateralizeFeedTx(cfg, &param)
} else if action == "CollateralizeClose" {
var param CollateralizeCloseTx
} else if action == "CollateralizeRetrive" {
var param CollateralizeRetrieveTx
err := json.Unmarshal(message, &param)
if err != nil {
llog.Error("CreateTx", "Error", err)
return nil, types.ErrInvalidParam
}
return CreateRawCollateralizeCloseTx(cfg, &param)
return CreateRawCollateralizeRetrieveTx(cfg, &param)
} else if action == "CollateralizeManage" {
var param CollateralizeManageTx
err := json.Unmarshal(message, &param)
......@@ -135,13 +135,13 @@ func (collateralize CollateralizeType) CreateTx(action string, message json.RawM
// GetTypeMap method
func (collateralize CollateralizeType) GetTypeMap() map[string]int32 {
return map[string]int32{
"Create": CollateralizeActionCreate,
"Borrow": CollateralizeActionBorrow,
"Repay": CollateralizeActionRepay,
"Append": CollateralizeActionAppend,
"Feed": CollateralizeActionFeed,
"Close": CollateralizeActionClose,
"Manage": CollateralizeActionManage,
"Create": CollateralizeActionCreate,
"Borrow": CollateralizeActionBorrow,
"Repay": CollateralizeActionRepay,
"Append": CollateralizeActionAppend,
"Feed": CollateralizeActionFeed,
"Retrieve": CollateralizeActionRetrieve,
"Manage": CollateralizeActionManage,
}
}
......@@ -290,19 +290,20 @@ func CreateRawCollateralizeFeedTx(cfg *types.Chain33Config, parm *CollateralizeF
return tx, nil
}
// CreateRawCollateralizeCloseTx method
func CreateRawCollateralizeCloseTx(cfg *types.Chain33Config, parm *CollateralizeCloseTx) (*types.Transaction, error) {
// CreateRawCollateralizeRetrieveTx method
func CreateRawCollateralizeRetrieveTx(cfg *types.Chain33Config, parm *CollateralizeRetrieveTx) (*types.Transaction, error) {
if parm == nil {
llog.Error("CreateRawCollateralizeCloseTx", "parm", parm)
return nil, types.ErrInvalidParam
}
v := &CollateralizeClose{
v := &CollateralizeRetrieve{
CollateralizeId: parm.CollateralizeID,
Balance: parm.Balance,
}
close := &CollateralizeAction{
Ty: CollateralizeActionClose,
Value: &CollateralizeAction_Close{v},
Ty: CollateralizeActionRetrieve,
Value: &CollateralizeAction_Retrieve{v},
}
tx := &types.Transaction{
Execer: []byte(cfg.ExecName(CollateralizeX)),
......
......@@ -396,7 +396,7 @@ type CollateralizeAction struct {
// *CollateralizeAction_Repay
// *CollateralizeAction_Append
// *CollateralizeAction_Feed
// *CollateralizeAction_Close
// *CollateralizeAction_Retrieve
// *CollateralizeAction_Manage
Value isCollateralizeAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,10,opt,name=ty,proto3" json:"ty,omitempty"`
......@@ -454,8 +454,8 @@ type CollateralizeAction_Feed struct {
Feed *CollateralizeFeed `protobuf:"bytes,5,opt,name=feed,proto3,oneof"`
}
type CollateralizeAction_Close struct {
Close *CollateralizeClose `protobuf:"bytes,6,opt,name=close,proto3,oneof"`
type CollateralizeAction_Retrieve struct {
Retrieve *CollateralizeRetrieve `protobuf:"bytes,6,opt,name=retrieve,proto3,oneof"`
}
type CollateralizeAction_Manage struct {
......@@ -472,7 +472,7 @@ func (*CollateralizeAction_Append) isCollateralizeAction_Value() {}
func (*CollateralizeAction_Feed) isCollateralizeAction_Value() {}
func (*CollateralizeAction_Close) isCollateralizeAction_Value() {}
func (*CollateralizeAction_Retrieve) isCollateralizeAction_Value() {}
func (*CollateralizeAction_Manage) isCollateralizeAction_Value() {}
......@@ -518,9 +518,9 @@ func (m *CollateralizeAction) GetFeed() *CollateralizeFeed {
return nil
}
func (m *CollateralizeAction) GetClose() *CollateralizeClose {
if x, ok := m.GetValue().(*CollateralizeAction_Close); ok {
return x.Close
func (m *CollateralizeAction) GetRetrieve() *CollateralizeRetrieve {
if x, ok := m.GetValue().(*CollateralizeAction_Retrieve); ok {
return x.Retrieve
}
return nil
}
......@@ -547,7 +547,7 @@ func (*CollateralizeAction) XXX_OneofWrappers() []interface{} {
(*CollateralizeAction_Repay)(nil),
(*CollateralizeAction_Append)(nil),
(*CollateralizeAction_Feed)(nil),
(*CollateralizeAction_Close)(nil),
(*CollateralizeAction_Retrieve)(nil),
(*CollateralizeAction_Manage)(nil),
}
}
......@@ -918,46 +918,54 @@ func (m *CollateralizeFeed) GetVolume() []int64 {
return nil
}
// 放贷关闭
type CollateralizeClose struct {
// 收回
type CollateralizeRetrieve struct {
CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
Balance int64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CollateralizeClose) Reset() { *m = CollateralizeClose{} }
func (m *CollateralizeClose) String() string { return proto.CompactTextString(m) }
func (*CollateralizeClose) ProtoMessage() {}
func (*CollateralizeClose) Descriptor() ([]byte, []int) {
func (m *CollateralizeRetrieve) Reset() { *m = CollateralizeRetrieve{} }
func (m *CollateralizeRetrieve) String() string { return proto.CompactTextString(m) }
func (*CollateralizeRetrieve) ProtoMessage() {}
func (*CollateralizeRetrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{11}
}
func (m *CollateralizeClose) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollateralizeClose.Unmarshal(m, b)
func (m *CollateralizeRetrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollateralizeRetrieve.Unmarshal(m, b)
}
func (m *CollateralizeClose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CollateralizeClose.Marshal(b, m, deterministic)
func (m *CollateralizeRetrieve) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CollateralizeRetrieve.Marshal(b, m, deterministic)
}
func (m *CollateralizeClose) XXX_Merge(src proto.Message) {
xxx_messageInfo_CollateralizeClose.Merge(m, src)
func (m *CollateralizeRetrieve) XXX_Merge(src proto.Message) {
xxx_messageInfo_CollateralizeRetrieve.Merge(m, src)
}
func (m *CollateralizeClose) XXX_Size() int {
return xxx_messageInfo_CollateralizeClose.Size(m)
func (m *CollateralizeRetrieve) XXX_Size() int {
return xxx_messageInfo_CollateralizeRetrieve.Size(m)
}
func (m *CollateralizeClose) XXX_DiscardUnknown() {
xxx_messageInfo_CollateralizeClose.DiscardUnknown(m)
func (m *CollateralizeRetrieve) XXX_DiscardUnknown() {
xxx_messageInfo_CollateralizeRetrieve.DiscardUnknown(m)
}
var xxx_messageInfo_CollateralizeClose proto.InternalMessageInfo
var xxx_messageInfo_CollateralizeRetrieve proto.InternalMessageInfo
func (m *CollateralizeClose) GetCollateralizeId() string {
func (m *CollateralizeRetrieve) GetCollateralizeId() string {
if m != nil {
return m.CollateralizeId
}
return ""
}
func (m *CollateralizeRetrieve) GetBalance() int64 {
if m != nil {
return m.Balance
}
return 0
}
// exec_local 放贷信息
type ReceiptCollateralize struct {
CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
......@@ -1938,7 +1946,7 @@ func init() {
proto.RegisterType((*CollateralizeRepay)(nil), "types.CollateralizeRepay")
proto.RegisterType((*CollateralizeAppend)(nil), "types.CollateralizeAppend")
proto.RegisterType((*CollateralizeFeed)(nil), "types.CollateralizeFeed")
proto.RegisterType((*CollateralizeClose)(nil), "types.CollateralizeClose")
proto.RegisterType((*CollateralizeRetrieve)(nil), "types.CollateralizeRetrieve")
proto.RegisterType((*ReceiptCollateralize)(nil), "types.ReceiptCollateralize")
proto.RegisterType((*CollateralizeRecord)(nil), "types.CollateralizeRecord")
proto.RegisterType((*CollateralizeRecords)(nil), "types.CollateralizeRecords")
......@@ -1961,84 +1969,85 @@ func init() {
func init() { proto.RegisterFile("collateralize.proto", fileDescriptor_a988fb4a61381972) }
var fileDescriptor_a988fb4a61381972 = []byte{
// 1257 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xdd, 0x6e, 0xdc, 0x44,
0x14, 0xae, 0xed, 0xfd, 0xc9, 0x9e, 0x4d, 0xd2, 0x74, 0x12, 0x8a, 0x09, 0x51, 0xb4, 0xb2, 0x90,
0x58, 0x01, 0x8d, 0x44, 0x5a, 0x21, 0x2a, 0x24, 0x44, 0xb2, 0x6d, 0x95, 0x95, 0x8a, 0x54, 0x99,
0x82, 0x50, 0x25, 0x90, 0xbc, 0xf6, 0x24, 0x58, 0x72, 0xd6, 0x8e, 0x3d, 0x1b, 0xb2, 0xdc, 0xd3,
0x0b, 0x9e, 0xa1, 0xbc, 0x02, 0xcf, 0xc4, 0x3b, 0x70, 0xc1, 0x2d, 0x9a, 0x33, 0xe3, 0x9f, 0x19,
0xdb, 0xd1, 0x2e, 0x70, 0xd5, 0x9b, 0x68, 0xe7, 0xcc, 0x37, 0x33, 0xe7, 0xe7, 0x3b, 0x3f, 0x0e,
0xec, 0xfa, 0x71, 0x14, 0x79, 0x8c, 0xa6, 0x5e, 0x14, 0xfe, 0x42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, 0xee, 0x4b, 0x49,
0x16, 0x26, 0x81, 0xbb, 0xce, 0x0d, 0x94, 0x2b, 0xee, 0x73, 0x7e, 0xe2, 0xe9, 0x4d, 0x1a, 0x66,
0xe4, 0x65, 0x78, 0x49, 0xdc, 0x0d, 0x8e, 0xa8, 0xc9, 0xd1, 0x0e, 0x74, 0xc3, 0x38, 0x20, 0x37,
0xee, 0x26, 0x07, 0x88, 0x05, 0xda, 0x83, 0xb5, 0x34, 0x23, 0x13, 0xbe, 0x71, 0x97, 0x6f, 0x94,
0x6b, 0x16, 0x73, 0x46, 0x95, 0x82, 0x16, 0x5b, 0x22, 0xe6, 0x8a, 0x08, 0xff, 0xe9, 0xc0, 0xba,
0xea, 0x08, 0x76, 0xc4, 0x9f, 0xcd, 0x92, 0x79, 0x4c, 0x79, 0xac, 0x04, 0xe1, 0x54, 0x11, 0xda,
0x87, 0x41, 0x4e, 0xfd, 0x8c, 0x72, 0x5d, 0x05, 0xd3, 0x2a, 0x81, 0x4e, 0xda, 0xaf, 0xfd, 0x68,
0x4e, 0x24, 0xd5, 0x4c, 0xb1, 0x8e, 0x14, 0x3e, 0x14, 0x6c, 0x33, 0xc5, 0xec, 0x45, 0xc6, 0x53,
0x71, 0x5b, 0x57, 0xbc, 0x58, 0x0a, 0x0c, 0xda, 0x8a, 0x8b, 0x7a, 0x35, 0xda, 0x96, 0x61, 0x90,
0x61, 0xed, 0x6b, 0x61, 0x7d, 0x17, 0x36, 0x0a, 0xac, 0x88, 0xc1, 0x1a, 0x7f, 0x45, 0x17, 0x32,
0x1a, 0x93, 0x2a, 0x4c, 0x03, 0x0e, 0x51, 0x24, 0x4c, 0xcf, 0x34, 0x23, 0x5f, 0xaa, 0xbc, 0xa9,
0x04, 0x2c, 0x50, 0x19, 0xf7, 0xf1, 0x24, 0xe0, 0x64, 0x19, 0x78, 0xe5, 0xba, 0x29, 0xd5, 0xd7,
0x9b, 0x53, 0xbd, 0x24, 0xc1, 0x46, 0x1b, 0x09, 0x36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0x1f, 0x6b, 0xe5, 0x48, 0x64, 0x71, 0x13,
0xc4, 0x62, 0xda, 0xe3, 0xff, 0x96, 0x7a, 0xf8, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x82, 0xe9,
0x7d, 0xb9, 0xad, 0x12, 0x00, 0x00,
}
......@@ -39,9 +39,10 @@ type CollateralizeFeedTx struct {
Fee int64 `json:"fee"`
}
// CollateralizeCloseTx for construction
type CollateralizeCloseTx struct {
// CollateralizeRetrieveTx for construction
type CollateralizeRetrieveTx struct {
CollateralizeID string `json:"collateralizeId"`
Balance int64 `json:"Balance"`
Fee int64 `json:"fee"`
}
......
......@@ -11,7 +11,7 @@ const (
CollateralizeActionRepay
CollateralizeActionAppend
CollateralizeActionFeed
CollateralizeActionClose
CollateralizeActionRetrieve
CollateralizeActionManage
//log for Collateralize
......@@ -20,7 +20,7 @@ const (
TyLogCollateralizeRepay = 733
TyLogCollateralizeAppend = 734
TyLogCollateralizeFeed = 735
TyLogCollateralizeClose = 736
TyLogCollateralizeRetrieve = 736
)
// Collateralize name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment