Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
adb27358
Commit
adb27358
authored
Oct 24, 2019
by
pengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#627 update issuance & collateralize
parent
550958aa
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1164 additions
and
695 deletions
+1164
-695
cmd.go
plugin/dapp/collateralize/commands/cmd.go
+19
-6
collateralize.go
plugin/dapp/collateralize/executor/collateralize.go
+47
-25
collateralizedb.go
plugin/dapp/collateralize/executor/collateralizedb.go
+108
-44
exec_del_local.go
plugin/dapp/collateralize/executor/exec_del_local.go
+21
-11
exec_local.go
plugin/dapp/collateralize/executor/exec_local.go
+20
-9
keys.go
plugin/dapp/collateralize/executor/keys.go
+10
-0
query.go
plugin/dapp/collateralize/executor/query.go
+20
-45
collateralize.proto
plugin/dapp/collateralize/proto/collateralize.proto
+30
-10
collateralize.pb.go
plugin/dapp/collateralize/types/collateralize.pb.go
+305
-137
init.go
plugin/dapp/init/init.go
+1
-0
cmd.go
plugin/dapp/issuance/commands/cmd.go
+20
-15
exec_del_local.go
plugin/dapp/issuance/executor/exec_del_local.go
+19
-13
exec_local.go
plugin/dapp/issuance/executor/exec_local.go
+20
-11
issuance.go
plugin/dapp/issuance/executor/issuance.go
+27
-25
issuancedb.go
plugin/dapp/issuance/executor/issuancedb.go
+112
-48
keys.go
plugin/dapp/issuance/executor/keys.go
+6
-6
query.go
plugin/dapp/issuance/executor/query.go
+16
-58
issuance.proto
plugin/dapp/issuance/proto/issuance.proto
+41
-27
issuance.pb.go
plugin/dapp/issuance/types/issuance.pb.go
+322
-205
No files found.
plugin/dapp/collateralize/commands/cmd.go
View file @
adb27358
...
...
@@ -284,6 +284,7 @@ func addCollateralizeQueryFlags(cmd *cobra.Command) {
cmd
.
Flags
()
.
StringP
(
"index"
,
"i"
,
""
,
"index"
)
cmd
.
Flags
()
.
StringP
(
"status"
,
"s"
,
""
,
"status"
)
cmd
.
Flags
()
.
StringP
(
"collateralizeIDs"
,
"d"
,
""
,
"collateralize IDs"
)
cmd
.
Flags
()
.
StringP
(
"borrowID"
,
"b"
,
""
,
"borrow ID"
)
}
func
CollateralizeQuery
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
...
...
@@ -293,6 +294,7 @@ func CollateralizeQuery(cmd *cobra.Command, args []string) {
statusStr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"status"
)
// indexstr, _ := cmd.Flags().GetString("index")
collateralizeIDs
,
_
:=
cmd
.
Flags
()
.
GetString
(
"collateralizeIDs"
)
borrowID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"borrowID"
)
var
params
rpctypes
.
Query4Jrpc
params
.
Execer
=
pkt
.
CollateralizeX
...
...
@@ -315,25 +317,36 @@ func CollateralizeQuery(cmd *cobra.Command, args []string) {
if
collateralizeID
!=
""
{
if
statusStr
!=
""
{
params
.
FuncName
=
"Collateralize
BorrowInfo
ByStatus"
params
.
FuncName
=
"Collateralize
Record
ByStatus"
req
:=
&
pkt
.
ReqCollateralize
BorrowInfo
ByStatus
{
req
:=
&
pkt
.
ReqCollateralize
Record
ByStatus
{
CollateralizeId
:
collateralizeID
,
Status
:
int32
(
status
),
}
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
var
res
pkt
.
RepCollateralize
BorrowInfo
s
var
res
pkt
.
RepCollateralize
Record
s
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"Chain33.Query"
,
params
,
&
res
)
ctx
.
Run
()
}
else
if
address
!=
""
{
params
.
FuncName
=
"Collateralize
BorrowInfo
ByAddr"
params
.
FuncName
=
"Collateralize
Record
ByAddr"
req
:=
&
pkt
.
ReqCollateralize
BorrowInfo
ByAddr
{
req
:=
&
pkt
.
ReqCollateralize
Record
ByAddr
{
CollateralizeId
:
collateralizeID
,
Addr
:
address
,
}
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
var
res
pkt
.
RepCollateralizeBorrowInfos
var
res
pkt
.
RepCollateralizeRecords
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"Chain33.Query"
,
params
,
&
res
)
ctx
.
Run
()
}
else
if
borrowID
!=
""
{
params
.
FuncName
=
"CollateralizeRecordByID"
req
:=
&
pkt
.
ReqCollateralizeRecord
{
CollateralizeId
:
collateralizeID
,
RecordId
:
borrowID
,
}
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
var
res
pkt
.
RepCollateralizeRecord
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"Chain33.Query"
,
params
,
&
res
)
ctx
.
Run
()
}
else
{
...
...
plugin/dapp/collateralize/executor/collateralize.go
View file @
adb27358
...
...
@@ -59,11 +59,11 @@ func (c *Collateralize) GetDriverName() string {
return
pty
.
CollateralizeX
}
func
(
c
*
Collateralize
)
addCollateralizeID
(
collateralize
log
*
pty
.
ReceiptCollateralize
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeKey
(
collateralize
log
.
CollateralizeId
,
collateralizelog
.
I
ndex
)
func
(
c
*
Collateralize
)
addCollateralizeID
(
collateralize
Id
string
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeKey
(
collateralize
Id
,
i
ndex
)
record
:=
&
pty
.
CollateralizeRecord
{
CollateralizeId
:
collateralize
log
.
Collateralize
Id
,
Index
:
collateralizelog
.
I
ndex
,
CollateralizeId
:
collateralizeId
,
Index
:
i
ndex
,
}
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
record
)}
...
...
@@ -71,19 +71,19 @@ func (c *Collateralize) addCollateralizeID(collateralizelog *pty.ReceiptCollater
return
kvs
}
func
(
c
*
Collateralize
)
deleteCollateralizeID
(
collateralize
log
*
pty
.
ReceiptCollateralize
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeKey
(
collateralize
log
.
CollateralizeId
,
collateralizelog
.
I
ndex
)
func
(
c
*
Collateralize
)
deleteCollateralizeID
(
collateralize
Id
string
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeKey
(
collateralize
Id
,
i
ndex
)
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
}
kvs
=
append
(
kvs
,
kv
)
return
kvs
}
func
(
c
*
Collateralize
)
addCollateralizeStatus
(
collateralizelog
*
pty
.
ReceiptCollateralize
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeStatusKey
(
collateralizelog
.
Status
,
collateralizelog
.
I
ndex
)
func
(
c
*
Collateralize
)
addCollateralizeStatus
(
status
int32
,
collateralizeId
string
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeStatusKey
(
status
,
i
ndex
)
record
:=
&
pty
.
CollateralizeRecord
{
CollateralizeId
:
collateralize
log
.
Collateralize
Id
,
Index
:
collateralizelog
.
I
ndex
,
CollateralizeId
:
collateralizeId
,
Index
:
i
ndex
,
}
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
record
)}
...
...
@@ -91,19 +91,19 @@ func (c *Collateralize) addCollateralizeStatus(collateralizelog *pty.ReceiptColl
return
kvs
}
func
(
c
*
Collateralize
)
deleteCollateralizeStatus
(
collateralizelog
*
pty
.
ReceiptCollateralize
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeStatusKey
(
collateralizelog
.
Status
,
collateralizelog
.
I
ndex
)
func
(
c
*
Collateralize
)
deleteCollateralizeStatus
(
status
int32
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeStatusKey
(
status
,
i
ndex
)
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
}
kvs
=
append
(
kvs
,
kv
)
return
kvs
}
func
(
c
*
Collateralize
)
addCollateralizeAddr
(
collateralizelog
*
pty
.
ReceiptCollateralize
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeAddrKey
(
collateralizelog
.
AccountAddr
,
collateralizelog
.
I
ndex
)
func
(
c
*
Collateralize
)
addCollateralizeAddr
(
addr
string
,
collateralizeId
string
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeAddrKey
(
addr
,
i
ndex
)
record
:=
&
pty
.
CollateralizeRecord
{
CollateralizeId
:
collateralize
log
.
Collateralize
Id
,
Index
:
collateralizelog
.
I
ndex
,
CollateralizeId
:
collateralizeId
,
Index
:
i
ndex
,
}
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
record
)}
...
...
@@ -111,21 +111,21 @@ func (c *Collateralize) addCollateralizeAddr(collateralizelog *pty.ReceiptCollat
return
kvs
}
func
(
c
*
Collateralize
)
deleteCollateralizeAddr
(
collateralizelog
*
pty
.
ReceiptCollateralize
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeAddrKey
(
collateralizelog
.
AccountAddr
,
collateralizelog
.
I
ndex
)
func
(
c
*
Collateralize
)
deleteCollateralizeAddr
(
addr
string
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeAddrKey
(
addr
,
i
ndex
)
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
}
kvs
=
append
(
kvs
,
kv
)
return
kvs
}
func
(
c
*
Collateralize
)
addCollateralizeRecordStatus
(
collateralizelog
*
pty
.
ReceiptCollateralize
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeRecordStatusKey
(
collateralizelog
.
RecordStatus
,
collateralizelog
.
I
ndex
)
func
(
c
*
Collateralize
)
addCollateralizeRecordStatus
(
recordStatus
int32
,
collateralizeId
string
,
recordId
string
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeRecordStatusKey
(
recordStatus
,
i
ndex
)
record
:=
&
pty
.
CollateralizeRecord
{
CollateralizeId
:
collateralize
log
.
Collateralize
Id
,
Addr
:
collateralizelog
.
AccountAddr
,
Index
:
collateralizelog
.
I
ndex
,
CollateralizeId
:
collateralizeId
,
RecordId
:
recordId
,
Index
:
i
ndex
,
}
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
record
)}
...
...
@@ -133,8 +133,30 @@ func (c *Collateralize) addCollateralizeRecordStatus(collateralizelog *pty.Recei
return
kvs
}
func
(
c
*
Collateralize
)
deleteCollateralizeRecordStatus
(
collateralizelog
*
pty
.
ReceiptCollateralize
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeRecordStatusKey
(
collateralizelog
.
RecordStatus
,
collateralizelog
.
Index
)
func
(
c
*
Collateralize
)
deleteCollateralizeRecordStatus
(
recordStatus
int32
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeRecordStatusKey
(
recordStatus
,
index
)
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
}
kvs
=
append
(
kvs
,
kv
)
return
kvs
}
func
(
c
*
Collateralize
)
addCollateralizeRecordAddr
(
recordAddr
string
,
collateralizeId
string
,
recordId
string
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeRecordAddrKey
(
recordAddr
,
index
)
record
:=
&
pty
.
CollateralizeRecord
{
CollateralizeId
:
collateralizeId
,
RecordId
:
recordId
,
Index
:
index
,
}
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
record
)}
kvs
=
append
(
kvs
,
kv
)
return
kvs
}
func
(
c
*
Collateralize
)
deleteCollateralizeRecordAddr
(
recordAddr
string
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcCollateralizeRecordAddrKey
(
recordAddr
,
index
)
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
}
kvs
=
append
(
kvs
,
kv
)
...
...
plugin/dapp/collateralize/executor/collateralizedb.go
View file @
adb27358
...
...
@@ -105,21 +105,21 @@ func NewCollateralizeAction(c *Collateralize, tx *types.Transaction, index int)
}
// GetCollCommonRecipt generate logs for Collateralize common action
func
(
action
*
Action
)
GetCollCommonRecipt
(
collateralize
*
pty
.
Collateralize
,
preStatus
int32
)
*
pty
.
ReceiptCollateralize
{
func
(
action
*
Action
)
GetCollCommonRecipt
(
collateralize
*
pty
.
Collateralize
)
*
pty
.
ReceiptCollateralize
{
c
:=
&
pty
.
ReceiptCollateralize
{}
c
.
CollateralizeId
=
collateralize
.
CollateralizeId
c
.
PreStatus
=
preStatus
c
.
Status
=
collateralize
.
Status
c
.
Index
=
action
.
GetIndex
()
c
.
PreIndex
=
collateralize
.
PreIndex
c
.
Index
=
collateralize
.
Index
return
c
}
// GetCreateReceiptLog generate logs for Collateralize create action
func
(
action
*
Action
)
GetCreateReceiptLog
(
collateralize
*
pty
.
Collateralize
,
preStatus
int32
)
*
types
.
ReceiptLog
{
func
(
action
*
Action
)
GetCreateReceiptLog
(
collateralize
*
pty
.
Collateralize
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogCollateralizeCreate
c
:=
action
.
GetCollCommonRecipt
(
collateralize
,
preStatus
)
c
:=
action
.
GetCollCommonRecipt
(
collateralize
)
c
.
CreateAddr
=
action
.
fromaddr
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -128,12 +128,14 @@ func (action *Action) GetCreateReceiptLog(collateralize *pty.Collateralize, preS
}
// GetBorrowReceiptLog generate logs for Collateralize borrow action
func
(
action
*
Action
)
GetBorrowReceiptLog
(
collateralize
*
pty
.
Collateralize
,
preStatus
int32
)
*
types
.
ReceiptLog
{
func
(
action
*
Action
)
GetBorrowReceiptLog
(
collateralize
*
pty
.
Collateralize
,
record
*
pty
.
BorrowRecord
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogCollateralizeBorrow
c
:=
action
.
GetCollCommonRecipt
(
collateralize
,
preStatus
)
c
:=
action
.
GetCollCommonRecipt
(
collateralize
)
c
.
AccountAddr
=
action
.
fromaddr
c
.
RecordId
=
record
.
RecordId
c
.
RecordStatus
=
record
.
Status
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -141,11 +143,15 @@ func (action *Action) GetBorrowReceiptLog(collateralize *pty.Collateralize, preS
}
// GetRepayReceiptLog generate logs for Collateralize Repay action
func
(
action
*
Action
)
GetRepayReceiptLog
(
collateralize
*
pty
.
Collateralize
,
preStatus
int32
)
*
types
.
ReceiptLog
{
func
(
action
*
Action
)
GetRepayReceiptLog
(
collateralize
*
pty
.
Collateralize
,
record
*
pty
.
BorrowRecord
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogCollateralizeRepay
c
:=
action
.
GetCollCommonRecipt
(
collateralize
,
preStatus
)
c
:=
action
.
GetCollCommonRecipt
(
collateralize
)
c
.
AccountAddr
=
action
.
fromaddr
c
.
RecordId
=
record
.
RecordId
c
.
RecordStatus
=
record
.
Status
c
.
RecordPreStatus
=
record
.
PreStatus
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -153,11 +159,11 @@ func (action *Action) GetRepayReceiptLog(collateralize *pty.Collateralize, preSt
}
// GetAppendReceiptLog generate logs for Collateralize append action
func
(
action
*
Action
)
GetAppendReceiptLog
(
collateralize
*
pty
.
Collateralize
,
preStatus
int32
)
*
types
.
ReceiptLog
{
func
(
action
*
Action
)
GetAppendReceiptLog
(
collateralize
*
pty
.
Collateralize
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogCollateralizeAppend
c
:=
action
.
GetCollCommonRecipt
(
collateralize
,
preStatus
)
c
:=
action
.
GetCollCommonRecipt
(
collateralize
)
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -165,13 +171,15 @@ func (action *Action) GetAppendReceiptLog(collateralize *pty.Collateralize, preS
}
// GetFeedReceiptLog generate logs for Collateralize price feed action
func
(
action
*
Action
)
GetFeedReceiptLog
(
collateralize
*
pty
.
Collateralize
,
borrowR
ecord
*
pty
.
BorrowRecord
)
*
types
.
ReceiptLog
{
func
(
action
*
Action
)
GetFeedReceiptLog
(
collateralize
*
pty
.
Collateralize
,
r
ecord
*
pty
.
BorrowRecord
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogCollateralizeFeed
c
:=
action
.
GetCollCommonRecipt
(
collateralize
,
borrowRecord
.
PreStatus
)
c
.
AccountAddr
=
borrowRecord
.
AccountAddr
c
.
RecordStatus
=
borrowRecord
.
Status
c
:=
action
.
GetCollCommonRecipt
(
collateralize
)
c
.
AccountAddr
=
record
.
AccountAddr
c
.
RecordId
=
record
.
RecordId
c
.
RecordStatus
=
record
.
Status
c
.
RecordPreStatus
=
record
.
PreStatus
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -179,11 +187,11 @@ func (action *Action) GetFeedReceiptLog(collateralize *pty.Collateralize, borrow
}
// GetCloseReceiptLog generate logs for Collateralize close action
func
(
action
*
Action
)
GetCloseReceiptLog
(
Collateralize
*
pty
.
Collateralize
,
preStatus
int32
)
*
types
.
ReceiptLog
{
func
(
action
*
Action
)
GetCloseReceiptLog
(
Collateralize
*
pty
.
Collateralize
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogCollateralizeClose
c
:=
action
.
GetCollCommonRecipt
(
Collateralize
,
preStatus
)
c
:=
action
.
GetCollCommonRecipt
(
Collateralize
)
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -352,6 +360,8 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
coll
.
Balance
=
create
.
TotalBalance
coll
.
CreateAddr
=
action
.
fromaddr
coll
.
Status
=
pty
.
CollateralizeActionCreate
coll
.
Index
=
action
.
GetIndex
()
coll
.
CreateIndex
=
coll
.
Index
clog
.
Debug
(
"CollateralizeCreate created"
,
"CollateralizeID"
,
collateralizeID
,
"TotalBalance"
,
coll
.
TotalBalance
)
...
...
@@ -359,7 +369,7 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
coll
.
Save
(
action
.
db
)
kv
=
append
(
kv
,
coll
.
GetKVSet
()
...
)
receiptLog
:=
action
.
GetCreateReceiptLog
(
&
coll
.
Collateralize
,
0
)
receiptLog
:=
action
.
GetCreateReceiptLog
(
&
coll
.
Collateralize
)
logs
=
append
(
logs
,
receiptLog
)
receipt
=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
,
KV
:
kv
,
Logs
:
logs
}
...
...
@@ -440,7 +450,6 @@ func (action *Action) CheckExecTokenAccount(addr string, amount int64, isFrozen
}
// CollateralizeBorrow 用户质押bty借出ccny
// TODO 考虑同一用户多次借贷的场景
func
(
action
*
Action
)
CollateralizeBorrow
(
borrow
*
pty
.
CollateralizeBorrow
)
(
*
types
.
Receipt
,
error
)
{
var
logs
[]
*
types
.
ReceiptLog
var
kv
[]
*
types
.
KeyValue
...
...
@@ -458,16 +467,7 @@ func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*typ
return
nil
,
pty
.
ErrCollateralizeStatus
}
// 一个地址在一期借贷中只允许借出一次
for
_
,
record
:=
range
collateralize
.
BorrowRecords
{
if
record
.
AccountAddr
==
action
.
fromaddr
{
clog
.
Error
(
"CollateralizeBorrow"
,
"CollateralizeId"
,
borrow
.
CollateralizeId
,
action
.
fromaddr
,
"execaddr"
,
action
.
execaddr
,
"err"
,
pty
.
ErrCollateralizeAccountExist
)
return
nil
,
err
}
}
coll
:=
&
CollateralizeDB
{
*
collateralize
}
preStatus
:=
coll
.
Status
// 借贷金额检查
if
borrow
.
GetValue
()
<=
0
{
clog
.
Error
(
"CollateralizeBorrow"
,
"CollID"
,
coll
.
CollateralizeId
,
"addr"
,
action
.
fromaddr
,
"execaddr"
,
action
.
execaddr
,
"borrow value"
,
borrow
.
GetValue
(),
"err"
,
types
.
ErrInvalidParam
)
...
...
@@ -536,6 +536,7 @@ func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*typ
// 构造借出记录
borrowRecord
:=
&
pty
.
BorrowRecord
{}
borrowRecord
.
RecordId
=
common
.
ToHex
(
action
.
txhash
)
borrowRecord
.
AccountAddr
=
action
.
fromaddr
borrowRecord
.
CollateralValue
=
btyFrozen
borrowRecord
.
StartTime
=
action
.
blocktime
...
...
@@ -554,10 +555,12 @@ func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*typ
coll
.
BorrowRecords
=
append
(
coll
.
BorrowRecords
,
borrowRecord
)
coll
.
Status
=
pty
.
CollateralizeStatusCreated
coll
.
Balance
-=
borrow
.
Value
coll
.
PreIndex
=
coll
.
Index
coll
.
Index
=
action
.
GetIndex
()
coll
.
Save
(
action
.
db
)
kv
=
append
(
kv
,
coll
.
GetKVSet
()
...
)
receiptLog
:=
action
.
GetBorrowReceiptLog
(
&
coll
.
Collateralize
,
preStatus
)
receiptLog
:=
action
.
GetBorrowReceiptLog
(
&
coll
.
Collateralize
,
borrowRecord
)
logs
=
append
(
logs
,
receiptLog
)
receipt
=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
,
KV
:
kv
,
Logs
:
logs
}
...
...
@@ -579,8 +582,6 @@ func (action *Action) CollateralizeRepay(repay *pty.CollateralizeRepay) (*types.
coll
:=
&
CollateralizeDB
{
*
collateralize
}
preStatus
:=
coll
.
Status
// 状态检查
if
coll
.
Status
!=
pty
.
CollateralizeStatusCreated
{
clog
.
Error
(
"CollateralizeRepay"
,
"CollID"
,
repay
.
CollateralizeId
,
"addr"
,
action
.
fromaddr
,
"execaddr"
,
action
.
execaddr
,
"err"
,
"status error"
,
"Status"
,
coll
.
Status
)
...
...
@@ -591,7 +592,7 @@ func (action *Action) CollateralizeRepay(repay *pty.CollateralizeRepay) (*types.
var
borrowRecord
*
pty
.
BorrowRecord
var
index
int
for
i
,
record
:=
range
coll
.
BorrowRecords
{
if
record
.
AccountAddr
==
action
.
fromaddr
{
if
record
.
RecordId
==
repay
.
RecordId
{
borrowRecord
=
record
index
=
i
break
...
...
@@ -646,10 +647,12 @@ func (action *Action) CollateralizeRepay(repay *pty.CollateralizeRepay) (*types.
coll
.
InvalidRecords
=
append
(
coll
.
InvalidRecords
,
borrowRecord
)
coll
.
LatestLiquidationPrice
=
getLatestLiquidationPrice
(
&
coll
.
Collateralize
)
coll
.
LatestExpireTime
=
getLatestExpireTime
(
&
coll
.
Collateralize
)
coll
.
PreIndex
=
coll
.
Index
coll
.
Index
=
action
.
GetIndex
()
coll
.
Save
(
action
.
db
)
kv
=
append
(
kv
,
coll
.
GetKVSet
()
...
)
receiptLog
:=
action
.
GetRepayReceiptLog
(
&
coll
.
Collateralize
,
preStatus
)
receiptLog
:=
action
.
GetRepayReceiptLog
(
&
coll
.
Collateralize
,
borrowRecord
)
logs
=
append
(
logs
,
receiptLog
)
receipt
=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
,
KV
:
kv
,
Logs
:
logs
}
...
...
@@ -669,7 +672,6 @@ func (action *Action) CollateralizeAppend(cAppend *pty.CollateralizeAppend) (*ty
}
coll
:=
&
CollateralizeDB
{
*
collateralize
}
preStatus
:=
coll
.
Status
// 状态检查
if
coll
.
Status
!=
pty
.
CollateralizeStatusCreated
{
...
...
@@ -680,7 +682,7 @@ func (action *Action) CollateralizeAppend(cAppend *pty.CollateralizeAppend) (*ty
// 查找借出记录
var
borrowRecord
*
pty
.
BorrowRecord
for
_
,
record
:=
range
coll
.
BorrowRecords
{
if
record
.
AccountAddr
==
action
.
fromaddr
{
if
record
.
RecordId
==
cAppend
.
RecordId
{
borrowRecord
=
record
}
}
...
...
@@ -738,11 +740,12 @@ func (action *Action) CollateralizeAppend(cAppend *pty.CollateralizeAppend) (*ty
// 记录当前借贷的最高自动清算价格
coll
.
LatestLiquidationPrice
=
getLatestLiquidationPrice
(
&
coll
.
Collateralize
)
coll
.
LatestExpireTime
=
getLatestExpireTime
(
&
coll
.
Collateralize
)
// append操作不更新Index
coll
.
Save
(
action
.
db
)
kv
=
append
(
kv
,
coll
.
GetKVSet
()
...
)
receiptLog
:=
action
.
GetAppendReceiptLog
(
&
coll
.
Collateralize
,
preStatus
)
receiptLog
:=
action
.
GetAppendReceiptLog
(
&
coll
.
Collateralize
)
logs
=
append
(
logs
,
receiptLog
)
receipt
=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
,
KV
:
kv
,
Logs
:
logs
}
...
...
@@ -856,6 +859,8 @@ func (action *Action) systemLiquidation(coll *pty.Collateralize, price float32)
borrowRecord
.
Status
=
pty
.
CollateralizeUserStatusWarning
}
coll
.
PreIndex
=
coll
.
Index
coll
.
Index
=
action
.
GetIndex
()
log
:=
action
.
GetFeedReceiptLog
(
coll
,
borrowRecord
)
logs
=
append
(
logs
,
log
)
}
...
...
@@ -910,6 +915,8 @@ func (action *Action) expireLiquidation(coll *pty.Collateralize) (*types.Receipt
borrowRecord
.
Status
=
pty
.
CollateralizeUserStatusExpire
}
coll
.
PreIndex
=
coll
.
Index
coll
.
Index
=
action
.
GetIndex
()
log
:=
action
.
GetFeedReceiptLog
(
coll
,
borrowRecord
)
logs
=
append
(
logs
,
log
)
}
...
...
@@ -1042,20 +1049,21 @@ func (action *Action) CollateralizeClose(close *pty.CollateralizeClose) (*types.
clog
.
Debug
(
"CollateralizeClose"
,
"ID"
,
close
.
CollateralizeId
)
coll
:=
&
CollateralizeDB
{
*
collateralize
}
preStatus
:=
coll
.
Status
coll
.
Status
=
pty
.
CollateralizeStatusClose
coll
.
PreIndex
=
coll
.
CreateIndex
coll
.
Index
=
action
.
GetIndex
()
coll
.
Save
(
action
.
db
)
kv
=
append
(
kv
,
coll
.
GetKVSet
()
...
)
receiptLog
:=
action
.
GetCloseReceiptLog
(
&
coll
.
Collateralize
,
preStatus
)
receiptLog
:=
action
.
GetCloseReceiptLog
(
&
coll
.
Collateralize
)
logs
=
append
(
logs
,
receiptLog
)
return
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
,
KV
:
kv
,
Logs
:
logs
},
nil
}
// 查找借贷
func
queryCollateralizeByID
(
db
dbm
.
KV
,
C
ollateralizeID
string
)
(
*
pty
.
Collateralize
,
error
)
{
data
,
err
:=
db
.
Get
(
Key
(
C
ollateralizeID
))
func
queryCollateralizeByID
(
db
dbm
.
KV
,
c
ollateralizeID
string
)
(
*
pty
.
Collateralize
,
error
)
{
data
,
err
:=
db
.
Get
(
Key
(
c
ollateralizeID
))
if
err
!=
nil
{
clog
.
Debug
(
"queryCollateralizeByID"
,
"error"
,
err
)
return
nil
,
err
...
...
@@ -1112,14 +1120,64 @@ func queryCollateralizeByAddr(localdb dbm.Lister, addr string) ([]*pty.Collatera
return
colls
,
nil
}
func
queryCollateralizeRecordByStatus
(
localdb
dbm
.
Lister
,
status
int32
)
([]
*
pty
.
CollateralizeRecord
,
error
)
{
// 精确查找发行记录
func
queryCollateralizeRecordByID
(
db
dbm
.
KV
,
collateralizeID
string
,
recordID
string
)
(
*
pty
.
BorrowRecord
,
error
)
{
coll
,
err
:=
queryCollateralizeByID
(
db
,
collateralizeID
)
if
err
!=
nil
{
clog
.
Error
(
"queryIssuanceRecordByID"
,
"error"
,
err
)
return
nil
,
err
}
for
_
,
record
:=
range
coll
.
BorrowRecords
{
if
record
.
RecordId
==
recordID
{
return
record
,
nil
}
}
for
_
,
record
:=
range
coll
.
InvalidRecords
{
if
record
.
RecordId
==
recordID
{
return
record
,
nil
}
}
return
nil
,
types
.
ErrNotFound
}
func
queryCollateralizeRecordByAddr
(
db
dbm
.
KV
,
localdb
dbm
.
Lister
,
addr
string
)
([]
*
pty
.
BorrowRecord
,
error
)
{
data
,
err
:=
localdb
.
List
(
calcCollateralizeRecordAddrPrefix
(
addr
),
nil
,
DefultCount
,
ListDESC
)
if
err
!=
nil
{
clog
.
Debug
(
"queryCollateralizeRecordByAddr"
,
"error"
,
err
)
return
nil
,
err
}
var
records
[]
*
pty
.
BorrowRecord
var
coll
pty
.
CollateralizeRecord
for
_
,
collBytes
:=
range
data
{
err
=
types
.
Decode
(
collBytes
,
&
coll
)
if
err
!=
nil
{
clog
.
Debug
(
"queryCollateralizeRecordByAddr"
,
"decode"
,
err
)
return
nil
,
err
}
record
,
err
:=
queryCollateralizeRecordByID
(
db
,
coll
.
CollateralizeId
,
coll
.
RecordId
)
if
err
!=
nil
{
clog
.
Error
(
"queryIssuanceRecordsByStatus"
,
"decode"
,
err
)
return
nil
,
err
}
records
=
append
(
records
,
record
)
}
return
records
,
nil
}
func
queryCollateralizeRecordByStatus
(
db
dbm
.
KV
,
localdb
dbm
.
Lister
,
status
int32
)
([]
*
pty
.
BorrowRecord
,
error
)
{
data
,
err
:=
localdb
.
List
(
calcCollateralizeRecordStatusPrefix
(
status
),
nil
,
DefultCount
,
ListDESC
)
if
err
!=
nil
{
clog
.
Debug
(
"queryCollateralizeRecordByStatus"
,
"error"
,
err
)
return
nil
,
err
}
var
colls
[]
*
pty
.
Collateralize
Record
var
records
[]
*
pty
.
Borrow
Record
var
coll
pty
.
CollateralizeRecord
for
_
,
collBytes
:=
range
data
{
err
=
types
.
Decode
(
collBytes
,
&
coll
)
...
...
@@ -1127,8 +1185,14 @@ func queryCollateralizeRecordByStatus(localdb dbm.Lister, status int32) ([]*pty.
clog
.
Debug
(
"queryCollateralizesByStatus"
,
"decode"
,
err
)
return
nil
,
err
}
colls
=
append
(
colls
,
&
coll
)
record
,
err
:=
queryCollateralizeRecordByID
(
db
,
coll
.
CollateralizeId
,
coll
.
RecordId
)
if
err
!=
nil
{
clog
.
Error
(
"queryIssuanceRecordsByStatus"
,
"decode"
,
err
)
return
nil
,
err
}
records
=
append
(
records
,
record
)
}
return
coll
s
,
nil
return
record
s
,
nil
}
plugin/dapp/collateralize/executor/exec_del_local.go
View file @
adb27358
...
...
@@ -20,28 +20,38 @@ func (c *Collateralize) execDelLocal(tx *types.Transaction, receiptData *types.R
switch
item
.
Ty
{
case
pty
.
TyLogCollateralizeCreate
:
kv
:=
c
.
deleteCollateralizeStatus
(
&
collateralizeLog
)
set
.
KV
=
append
(
set
.
KV
,
kv
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeStatus
(
collateralizeLog
.
Status
,
collateralizeLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeAddr
(
collateralizeLog
.
CreateAddr
,
collateralizeLog
.
Index
)
...
)
break
case
pty
.
TyLogCollateralizeBorrow
:
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordStatus
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralize
Addr
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordStatus
(
collateralizeLog
.
RecordStatus
,
collateralizeLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralize
RecordAddr
(
collateralizeLog
.
AccountAddr
,
collateralizeLog
.
Index
)
...
)
break
case
pty
.
TyLogCollateralizeAppend
:
// append没有状态变化
break
case
pty
.
TyLogCollateralizeRepay
:
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordStatus
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeAddr
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordStatus
(
collateralizeLog
.
RecordPreStatus
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
RecordId
,
collateralizeLog
.
PreIndex
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordStatus
(
collateralizeLog
.
RecordStatus
,
collateralizeLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordAddr
(
collateralizeLog
.
AccountAddr
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
RecordId
,
collateralizeLog
.
PreIndex
)
...
)
break
case
pty
.
TyLogCollateralizeFeed
:
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordStatus
(
&
collateralizeLog
)
...
)
if
collateralizeLog
.
RecordStatus
==
pty
.
CollateralizeUserStatusSystemLiquidate
{
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeAddr
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordStatus
(
collateralizeLog
.
RecordStatus
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
RecordId
,
collateralizeLog
.
PreIndex
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordStatus
(
collateralizeLog
.
RecordStatus
,
collateralizeLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordAddr
(
collateralizeLog
.
AccountAddr
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
RecordId
,
collateralizeLog
.
PreIndex
)
...
)
// 如果没有被清算,需要把地址索引更新
if
collateralizeLog
.
RecordStatus
==
pty
.
CollateralizeUserStatusWarning
||
collateralizeLog
.
RecordStatus
==
pty
.
CollateralizeUserStatusExpire
{
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordAddr
(
collateralizeLog
.
AccountAddr
,
collateralizeLog
.
Index
)
...
)
}
break
case
pty
.
TyLogCollateralizeClose
:
kv
:=
c
.
addCollateralizeStatus
(
&
collateralizeLog
)
set
.
KV
=
append
(
set
.
KV
,
kv
...
)
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
.
PreIndex
)
...
)
break
}
}
...
...
plugin/dapp/collateralize/executor/exec_local.go
View file @
adb27358
...
...
@@ -21,26 +21,37 @@ func (c *Collateralize) execLocal(tx *types.Transaction, receipt *types.ReceiptD
switch
item
.
Ty
{
case
pty
.
TyLogCollateralizeCreate
:
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeStatus
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeStatus
(
collateralizeLog
.
Status
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeAddr
(
collateralizeLog
.
CreateAddr
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
Index
)
...
)
break
case
pty
.
TyLogCollateralizeBorrow
:
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordStatus
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeAddr
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordStatus
(
collateralizeLog
.
RecordStatus
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
RecordId
,
collateralizeLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordAddr
(
collateralizeLog
.
AccountAddr
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
RecordId
,
collateralizeLog
.
Index
)
...
)
break
case
pty
.
TyLogCollateralizeAppend
:
//append没有状态变化
break
case
pty
.
TyLogCollateralizeRepay
:
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordStatus
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeAddr
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordStatus
(
collateralizeLog
.
RecordPreStatus
,
collateralizeLog
.
PreIndex
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordStatus
(
collateralizeLog
.
RecordStatus
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
RecordId
,
collateralizeLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordAddr
(
collateralizeLog
.
AccountAddr
,
collateralizeLog
.
PreIndex
)
...
)
break
case
pty
.
TyLogCollateralizeFeed
:
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordStatus
(
&
collateralizeLog
)
...
)
if
collateralizeLog
.
RecordStatus
==
pty
.
CollateralizeUserStatusSystemLiquidate
{
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeAddr
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordStatus
(
collateralizeLog
.
RecordPreStatus
,
collateralizeLog
.
PreIndex
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordStatus
(
collateralizeLog
.
RecordStatus
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
RecordId
,
collateralizeLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeRecordAddr
(
collateralizeLog
.
AccountAddr
,
collateralizeLog
.
PreIndex
)
...
)
// 如果没有被清算,需要把地址索引更新
if
collateralizeLog
.
RecordStatus
==
pty
.
CollateralizeUserStatusWarning
||
collateralizeLog
.
RecordStatus
==
pty
.
CollateralizeUserStatusExpire
{
set
.
KV
=
append
(
set
.
KV
,
c
.
addCollateralizeRecordAddr
(
collateralizeLog
.
AccountAddr
,
collateralizeLog
.
CollateralizeId
,
collateralizeLog
.
RecordId
,
collateralizeLog
.
Index
)
...
)
}
break
case
pty
.
TyLogCollateralizeClose
:
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeStatus
(
&
collateralizeLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeStatus
(
pty
.
CollateralizeStatusCreated
,
collateralizeLog
.
PreIndex
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteCollateralizeAddr
(
collateralizeLog
.
CreateAddr
,
collateralizeLog
.
PreIndex
)
...
)
break
}
}
...
...
plugin/dapp/collateralize/executor/keys.go
View file @
adb27358
...
...
@@ -41,6 +41,16 @@ func calcCollateralizeLatestPriceKey() []byte {
return
[]
byte
(
key
)
}
func
calcCollateralizeRecordAddrPrefix
(
addr
string
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-Collateralize-record-addr:%d"
,
addr
)
return
[]
byte
(
key
)
}
func
calcCollateralizeRecordAddrKey
(
addr
string
,
index
int64
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-Collateralize-record-addr:%d:%018d"
,
addr
,
index
)
return
[]
byte
(
key
)
}
func
calcCollateralizeRecordStatusPrefix
(
status
int32
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-Collateralize-record-status:%d"
,
status
)
return
[]
byte
(
key
)
...
...
plugin/dapp/collateralize/executor/query.go
View file @
adb27358
...
...
@@ -80,66 +80,40 @@ func (c *Collateralize) Query_CollateralizeByAddr(req *pty.ReqCollateralizeByAdd
return
ids
,
nil
}
func
(
c
*
Collateralize
)
Query_Collateralize
BorrowInfoByAddr
(
req
*
pty
.
ReqCollateralizeBorrowInfoByAddr
)
(
types
.
Message
,
error
)
{
records
,
err
:=
queryCollateralizeByAddr
(
c
.
GetLocalDB
(),
req
.
Addr
)
func
(
c
*
Collateralize
)
Query_Collateralize
RecordByID
(
req
*
pty
.
ReqCollateralizeRecord
)
(
types
.
Message
,
error
)
{
issuRecord
,
err
:=
queryCollateralizeRecordByID
(
c
.
GetStateDB
(),
req
.
CollateralizeId
,
req
.
RecordId
)
if
err
!=
nil
{
clog
.
Error
(
"Query_
CollateralizeBorrowInfoByAddr"
,
"get collateraliz
e record error"
,
err
)
clog
.
Error
(
"Query_
IssuanceRecordByID"
,
"get issuanc
e record error"
,
err
)
return
nil
,
err
}
ret
:=
&
pty
.
RepCollateralizeBorrowInfos
{}
for
_
,
record
:=
range
records
{
if
record
.
CollateralizeId
==
req
.
CollateralizeId
{
coll
,
err
:=
queryCollateralizeByID
(
c
.
GetStateDB
(),
record
.
CollateralizeId
)
ret
:=
&
pty
.
RepCollateralizeRecord
{}
ret
.
Record
=
issuRecord
return
issuRecord
,
nil
}
func
(
c
*
Collateralize
)
Query_CollateralizeRecordByAddr
(
req
*
pty
.
ReqCollateralizeRecordByAddr
)
(
types
.
Message
,
error
)
{
records
,
err
:=
queryCollateralizeRecordByAddr
(
c
.
GetStateDB
(),
c
.
GetLocalDB
(),
req
.
Addr
)
if
err
!=
nil
{
clog
.
Error
(
"Query_CollateralizeBorrowInfo
ByAddr"
,
"get collateralize record error"
,
err
)
clog
.
Error
(
"Query_CollateralizeRecord
ByAddr"
,
"get collateralize record error"
,
err
)
return
nil
,
err
}
for
_
,
borrowRecord
:=
range
coll
.
BorrowRecords
{
if
borrowRecord
.
AccountAddr
==
req
.
Addr
{
ret
.
Record
=
append
(
ret
.
Record
,
borrowRecord
)
}
}
for
_
,
borrowRecord
:=
range
coll
.
InvalidRecords
{
if
borrowRecord
.
AccountAddr
==
req
.
Addr
{
ret
.
Record
=
append
(
ret
.
Record
,
borrowRecord
)
}
}
}
}
ret
:=
&
pty
.
RepCollateralizeRecords
{}
ret
.
Records
=
records
return
nil
,
pty
.
ErrRecordNotExist
return
ret
,
nil
}
func
(
c
*
Collateralize
)
Query_Collateralize
BorrowInfoByStatus
(
req
*
pty
.
ReqCollateralizeBorrowInfo
ByStatus
)
(
types
.
Message
,
error
)
{
records
,
err
:=
queryCollateralizeRecordByStatus
(
c
.
GetLocalDB
(),
req
.
Status
)
func
(
c
*
Collateralize
)
Query_Collateralize
RecordByStatus
(
req
*
pty
.
ReqCollateralizeRecord
ByStatus
)
(
types
.
Message
,
error
)
{
records
,
err
:=
queryCollateralizeRecordByStatus
(
c
.
Get
StateDB
(),
c
.
Get
LocalDB
(),
req
.
Status
)
if
err
!=
nil
{
clog
.
Error
(
"Query_Collateralize
BorrowInfo
ByAddr"
,
"get collateralize record error"
,
err
)
clog
.
Error
(
"Query_Collateralize
Record
ByAddr"
,
"get collateralize record error"
,
err
)
return
nil
,
err
}
ret
:=
&
pty
.
RepCollateralizeBorrowInfos
{}
for
_
,
record
:=
range
records
{
coll
,
err
:=
queryCollateralizeByID
(
c
.
GetStateDB
(),
record
.
CollateralizeId
)
if
err
!=
nil
{
clog
.
Error
(
"Query_CollateralizeBorrowInfoByAddr"
,
"get collateralize record error"
,
err
)
return
nil
,
err
}
for
_
,
borrowRecord
:=
range
coll
.
BorrowRecords
{
if
borrowRecord
.
Status
==
req
.
Status
{
ret
.
Record
=
append
(
ret
.
Record
,
borrowRecord
)
}
}
for
_
,
borrowRecord
:=
range
coll
.
InvalidRecords
{
if
borrowRecord
.
Status
==
req
.
Status
{
ret
.
Record
=
append
(
ret
.
Record
,
borrowRecord
)
}
}
}
ret
:=
&
pty
.
RepCollateralizeRecords
{}
ret
.
Records
=
records
return
ret
,
nil
}
\ No newline at end of file
plugin/dapp/collateralize/proto/collateralize.proto
View file @
adb27358
...
...
@@ -18,6 +18,9 @@ message Collateralize {
float
latestLiquidationPrice
=
12
;
//最高清算价格
int64
period
=
13
;
//借贷最大期限
int64
latestExpireTime
=
14
;
//最近超期时间
int64
index
=
15
;
//当前索引
int64
preIndex
=
16
;
//上一个索引
int64
createIndex
=
17
;
//创建时的索引,用于close删除记录
}
// 借出记录
...
...
@@ -32,6 +35,7 @@ message BorrowRecord {
int64
liquidateTime
=
8
;
//清算时间
int64
expireTime
=
9
;
//超时清算时间
int32
preStatus
=
10
;
//上一次抵押状态,用于告警恢复
string
recordId
=
11
;
//借出id,标识一次借出记录
}
// 资产价格记录
...
...
@@ -80,13 +84,15 @@ message CollateralizeBorrow {
// 质押清算
message
CollateralizeRepay
{
string
collateralizeId
=
1
;
//借贷期数ID
int64
value
=
2
;
//借贷价值(ccny)
string
recordId
=
2
;
//借贷ID
int64
value
=
3
;
//借贷价值(ccny)
}
// 追加抵押物
message
CollateralizeAppend
{
string
collateralizeId
=
1
;
//借贷期数ID
int64
collateralValue
=
2
;
//追加价值(bty)
string
recordId
=
2
;
//借贷ID
int64
collateralValue
=
3
;
//追加价值(bty)
}
// 喂价
...
...
@@ -107,16 +113,19 @@ message ReceiptCollateralize {
string
createAddr
=
2
;
string
accountAddr
=
3
;
int32
status
=
4
;
int32
preStatus
=
5
;
int64
index
=
6
;
int32
recordStatus
=
7
;
int64
index
=
5
;
int32
recordStatus
=
6
;
int32
recordPreStatus
=
7
;
string
recordId
=
8
;
int64
preIndex
=
9
;
}
// exec_local 借贷记录信息
message
CollateralizeRecord
{
string
collateralizeId
=
1
;
string
addr
=
2
;
int64
index
=
3
;
string
recordId
=
3
;
int64
index
=
4
;
}
// exec_local 借贷记录信息列表
...
...
@@ -166,18 +175,29 @@ message RepCollateralizeIDs {
}
// 根据地址和借贷ID混合查询具体借贷记录
message
ReqCollateralize
BorrowInfo
ByAddr
{
message
ReqCollateralize
Record
ByAddr
{
string
collateralizeId
=
1
;
string
addr
=
2
;
}
// 根据状态和借贷ID混合查询具体借贷记录
message
ReqCollateralize
BorrowInfo
ByStatus
{
message
ReqCollateralize
Record
ByStatus
{
string
collateralizeId
=
1
;
int32
status
=
2
;
}
// 返回借贷记录
message
RepCollateralizeBorrowInfos
{
repeated
BorrowRecord
record
=
1
;
message
RepCollateralizeRecords
{
repeated
BorrowRecord
records
=
1
;
}
// 精确查找借贷记录
message
ReqCollateralizeRecord
{
string
collateralizeId
=
1
;
string
recordId
=
2
;
}
// 返回记录
message
RepCollateralizeRecord
{
BorrowRecord
record
=
1
;
}
plugin/dapp/collateralize/types/collateralize.pb.go
View file @
adb27358
...
...
@@ -36,6 +36,9 @@ type Collateralize struct {
LatestLiquidationPrice
float32
`protobuf:"fixed32,12,opt,name=latestLiquidationPrice,proto3" json:"latestLiquidationPrice,omitempty"`
Period
int64
`protobuf:"varint,13,opt,name=period,proto3" json:"period,omitempty"`
LatestExpireTime
int64
`protobuf:"varint,14,opt,name=latestExpireTime,proto3" json:"latestExpireTime,omitempty"`
Index
int64
`protobuf:"varint,15,opt,name=index,proto3" json:"index,omitempty"`
PreIndex
int64
`protobuf:"varint,16,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
CreateIndex
int64
`protobuf:"varint,17,opt,name=createIndex,proto3" json:"createIndex,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -164,6 +167,27 @@ func (m *Collateralize) GetLatestExpireTime() int64 {
return
0
}
func
(
m
*
Collateralize
)
GetIndex
()
int64
{
if
m
!=
nil
{
return
m
.
Index
}
return
0
}
func
(
m
*
Collateralize
)
GetPreIndex
()
int64
{
if
m
!=
nil
{
return
m
.
PreIndex
}
return
0
}
func
(
m
*
Collateralize
)
GetCreateIndex
()
int64
{
if
m
!=
nil
{
return
m
.
CreateIndex
}
return
0
}
// 借出记录
type
BorrowRecord
struct
{
AccountAddr
string
`protobuf:"bytes,1,opt,name=accountAddr,proto3" json:"accountAddr,omitempty"`
...
...
@@ -176,6 +200,7 @@ type BorrowRecord struct {
LiquidateTime
int64
`protobuf:"varint,8,opt,name=liquidateTime,proto3" json:"liquidateTime,omitempty"`
ExpireTime
int64
`protobuf:"varint,9,opt,name=expireTime,proto3" json:"expireTime,omitempty"`
PreStatus
int32
`protobuf:"varint,10,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
RecordId
string
`protobuf:"bytes,11,opt,name=recordId,proto3" json:"recordId,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -276,6 +301,13 @@ func (m *BorrowRecord) GetPreStatus() int32 {
return
0
}
func
(
m
*
BorrowRecord
)
GetRecordId
()
string
{
if
m
!=
nil
{
return
m
.
RecordId
}
return
""
}
// 资产价格记录
type
AssetPriceRecord
struct
{
RecordTime
int64
`protobuf:"varint,1,opt,name=recordTime,proto3" json:"recordTime,omitempty"`
...
...
@@ -697,7 +729,8 @@ func (m *CollateralizeBorrow) GetValue() int64 {
// 质押清算
type
CollateralizeRepay
struct
{
CollateralizeId
string
`protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
Value
int64
`protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
RecordId
string
`protobuf:"bytes,2,opt,name=recordId,proto3" json:"recordId,omitempty"`
Value
int64
`protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -735,6 +768,13 @@ func (m *CollateralizeRepay) GetCollateralizeId() string {
return
""
}
func
(
m
*
CollateralizeRepay
)
GetRecordId
()
string
{
if
m
!=
nil
{
return
m
.
RecordId
}
return
""
}
func
(
m
*
CollateralizeRepay
)
GetValue
()
int64
{
if
m
!=
nil
{
return
m
.
Value
...
...
@@ -745,7 +785,8 @@ func (m *CollateralizeRepay) GetValue() int64 {
// 追加抵押物
type
CollateralizeAppend
struct
{
CollateralizeId
string
`protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
CollateralValue
int64
`protobuf:"varint,2,opt,name=collateralValue,proto3" json:"collateralValue,omitempty"`
RecordId
string
`protobuf:"bytes,2,opt,name=recordId,proto3" json:"recordId,omitempty"`
CollateralValue
int64
`protobuf:"varint,3,opt,name=collateralValue,proto3" json:"collateralValue,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -783,6 +824,13 @@ func (m *CollateralizeAppend) GetCollateralizeId() string {
return
""
}
func
(
m
*
CollateralizeAppend
)
GetRecordId
()
string
{
if
m
!=
nil
{
return
m
.
RecordId
}
return
""
}
func
(
m
*
CollateralizeAppend
)
GetCollateralValue
()
int64
{
if
m
!=
nil
{
return
m
.
CollateralValue
...
...
@@ -892,9 +940,11 @@ type ReceiptCollateralize struct {
CreateAddr
string
`protobuf:"bytes,2,opt,name=createAddr,proto3" json:"createAddr,omitempty"`
AccountAddr
string
`protobuf:"bytes,3,opt,name=accountAddr,proto3" json:"accountAddr,omitempty"`
Status
int32
`protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
PreStatus
int32
`protobuf:"varint,5,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
Index
int64
`protobuf:"varint,6,opt,name=index,proto3" json:"index,omitempty"`
RecordStatus
int32
`protobuf:"varint,7,opt,name=recordStatus,proto3" json:"recordStatus,omitempty"`
Index
int64
`protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
RecordStatus
int32
`protobuf:"varint,6,opt,name=recordStatus,proto3" json:"recordStatus,omitempty"`
RecordPreStatus
int32
`protobuf:"varint,7,opt,name=recordPreStatus,proto3" json:"recordPreStatus,omitempty"`
RecordId
string
`protobuf:"bytes,8,opt,name=recordId,proto3" json:"recordId,omitempty"`
PreIndex
int64
`protobuf:"varint,9,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -953,23 +1003,37 @@ func (m *ReceiptCollateralize) GetStatus() int32 {
return
0
}
func
(
m
*
ReceiptCollateralize
)
Get
PreStatus
()
int32
{
func
(
m
*
ReceiptCollateralize
)
Get
Index
()
int64
{
if
m
!=
nil
{
return
m
.
PreStatus
return
m
.
Index
}
return
0
}
func
(
m
*
ReceiptCollateralize
)
Get
Index
()
int64
{
func
(
m
*
ReceiptCollateralize
)
Get
RecordStatus
()
int32
{
if
m
!=
nil
{
return
m
.
Index
return
m
.
RecordStatus
}
return
0
}
func
(
m
*
ReceiptCollateralize
)
GetRecordStatus
()
int32
{
func
(
m
*
ReceiptCollateralize
)
GetRecord
Pre
Status
()
int32
{
if
m
!=
nil
{
return
m
.
RecordStatus
return
m
.
RecordPreStatus
}
return
0
}
func
(
m
*
ReceiptCollateralize
)
GetRecordId
()
string
{
if
m
!=
nil
{
return
m
.
RecordId
}
return
""
}
func
(
m
*
ReceiptCollateralize
)
GetPreIndex
()
int64
{
if
m
!=
nil
{
return
m
.
PreIndex
}
return
0
}
...
...
@@ -978,7 +1042,8 @@ func (m *ReceiptCollateralize) GetRecordStatus() int32 {
type
CollateralizeRecord
struct
{
CollateralizeId
string
`protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
Addr
string
`protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Index
int64
`protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
RecordId
string
`protobuf:"bytes,3,opt,name=recordId,proto3" json:"recordId,omitempty"`
Index
int64
`protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -1023,6 +1088,13 @@ func (m *CollateralizeRecord) GetAddr() string {
return
""
}
func
(
m
*
CollateralizeRecord
)
GetRecordId
()
string
{
if
m
!=
nil
{
return
m
.
RecordId
}
return
""
}
func
(
m
*
CollateralizeRecord
)
GetIndex
()
int64
{
if
m
!=
nil
{
return
m
.
Index
...
...
@@ -1399,7 +1471,7 @@ func (m *RepCollateralizeIDs) GetIDs() []string {
}
// 根据地址和借贷ID混合查询具体借贷记录
type
ReqCollateralize
BorrowInfo
ByAddr
struct
{
type
ReqCollateralize
Record
ByAddr
struct
{
CollateralizeId
string
`protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
Addr
string
`protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
...
...
@@ -1407,39 +1479,39 @@ type ReqCollateralizeBorrowInfoByAddr struct {
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReqCollateralize
BorrowInfoByAddr
)
Reset
()
{
*
m
=
ReqCollateralizeBorrowInfo
ByAddr
{}
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByAddr
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqCollateralize
BorrowInfo
ByAddr
)
ProtoMessage
()
{}
func
(
*
ReqCollateralize
BorrowInfo
ByAddr
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
m
*
ReqCollateralize
RecordByAddr
)
Reset
()
{
*
m
=
ReqCollateralizeRecord
ByAddr
{}
}
func
(
m
*
ReqCollateralize
Record
ByAddr
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqCollateralize
Record
ByAddr
)
ProtoMessage
()
{}
func
(
*
ReqCollateralize
Record
ByAddr
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_a988fb4a61381972
,
[]
int
{
22
}
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByAddr
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByAddr
.
Unmarshal
(
m
,
b
)
func
(
m
*
ReqCollateralize
Record
ByAddr
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqCollateralize
Record
ByAddr
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByAddr
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByAddr
.
Marshal
(
b
,
m
,
deterministic
)
func
(
m
*
ReqCollateralize
Record
ByAddr
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqCollateralize
Record
ByAddr
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByAddr
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByAddr
.
Merge
(
m
,
src
)
func
(
m
*
ReqCollateralize
Record
ByAddr
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqCollateralize
Record
ByAddr
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByAddr
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByAddr
.
Size
(
m
)
func
(
m
*
ReqCollateralize
Record
ByAddr
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqCollateralize
Record
ByAddr
.
Size
(
m
)
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByAddr
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByAddr
.
DiscardUnknown
(
m
)
func
(
m
*
ReqCollateralize
Record
ByAddr
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqCollateralize
Record
ByAddr
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByAddr
proto
.
InternalMessageInfo
var
xxx_messageInfo_ReqCollateralize
Record
ByAddr
proto
.
InternalMessageInfo
func
(
m
*
ReqCollateralize
BorrowInfo
ByAddr
)
GetCollateralizeId
()
string
{
func
(
m
*
ReqCollateralize
Record
ByAddr
)
GetCollateralizeId
()
string
{
if
m
!=
nil
{
return
m
.
CollateralizeId
}
return
""
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByAddr
)
GetAddr
()
string
{
func
(
m
*
ReqCollateralize
Record
ByAddr
)
GetAddr
()
string
{
if
m
!=
nil
{
return
m
.
Addr
}
...
...
@@ -1447,7 +1519,7 @@ func (m *ReqCollateralizeBorrowInfoByAddr) GetAddr() string {
}
// 根据状态和借贷ID混合查询具体借贷记录
type
ReqCollateralize
BorrowInfo
ByStatus
struct
{
type
ReqCollateralize
Record
ByStatus
struct
{
CollateralizeId
string
`protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
Status
int32
`protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
...
...
@@ -1455,39 +1527,39 @@ type ReqCollateralizeBorrowInfoByStatus struct {
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReqCollateralize
BorrowInfoByStatus
)
Reset
()
{
*
m
=
ReqCollateralizeBorrowInfo
ByStatus
{}
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByStatus
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqCollateralize
BorrowInfo
ByStatus
)
ProtoMessage
()
{}
func
(
*
ReqCollateralize
BorrowInfo
ByStatus
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
m
*
ReqCollateralize
RecordByStatus
)
Reset
()
{
*
m
=
ReqCollateralizeRecord
ByStatus
{}
}
func
(
m
*
ReqCollateralize
Record
ByStatus
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqCollateralize
Record
ByStatus
)
ProtoMessage
()
{}
func
(
*
ReqCollateralize
Record
ByStatus
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_a988fb4a61381972
,
[]
int
{
23
}
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByStatus
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByStatus
.
Unmarshal
(
m
,
b
)
func
(
m
*
ReqCollateralize
Record
ByStatus
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqCollateralize
Record
ByStatus
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByStatus
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByStatus
.
Marshal
(
b
,
m
,
deterministic
)
func
(
m
*
ReqCollateralize
Record
ByStatus
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqCollateralize
Record
ByStatus
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByStatus
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByStatus
.
Merge
(
m
,
src
)
func
(
m
*
ReqCollateralize
Record
ByStatus
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqCollateralize
Record
ByStatus
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByStatus
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByStatus
.
Size
(
m
)
func
(
m
*
ReqCollateralize
Record
ByStatus
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqCollateralize
Record
ByStatus
.
Size
(
m
)
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByStatus
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByStatus
.
DiscardUnknown
(
m
)
func
(
m
*
ReqCollateralize
Record
ByStatus
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqCollateralize
Record
ByStatus
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqCollateralize
BorrowInfo
ByStatus
proto
.
InternalMessageInfo
var
xxx_messageInfo_ReqCollateralize
Record
ByStatus
proto
.
InternalMessageInfo
func
(
m
*
ReqCollateralize
BorrowInfo
ByStatus
)
GetCollateralizeId
()
string
{
func
(
m
*
ReqCollateralize
Record
ByStatus
)
GetCollateralizeId
()
string
{
if
m
!=
nil
{
return
m
.
CollateralizeId
}
return
""
}
func
(
m
*
ReqCollateralize
BorrowInfo
ByStatus
)
GetStatus
()
int32
{
func
(
m
*
ReqCollateralize
Record
ByStatus
)
GetStatus
()
int32
{
if
m
!=
nil
{
return
m
.
Status
}
...
...
@@ -1495,39 +1567,127 @@ func (m *ReqCollateralizeBorrowInfoByStatus) GetStatus() int32 {
}
// 返回借贷记录
type
RepCollateralize
BorrowInfo
s
struct
{
Record
[]
*
BorrowRecord
`protobuf:"bytes,1,rep,name=record,proto3" json:"record
,omitempty"`
type
RepCollateralize
Record
s
struct
{
Record
s
[]
*
BorrowRecord
`protobuf:"bytes,1,rep,name=records,proto3" json:"records
,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
RepCollateralize
BorrowInfos
)
Reset
()
{
*
m
=
RepCollateralizeBorrowInfo
s
{}
}
func
(
m
*
RepCollateralize
BorrowInfo
s
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RepCollateralize
BorrowInfo
s
)
ProtoMessage
()
{}
func
(
*
RepCollateralize
BorrowInfo
s
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
m
*
RepCollateralize
Records
)
Reset
()
{
*
m
=
RepCollateralizeRecord
s
{}
}
func
(
m
*
RepCollateralize
Record
s
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RepCollateralize
Record
s
)
ProtoMessage
()
{}
func
(
*
RepCollateralize
Record
s
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_a988fb4a61381972
,
[]
int
{
24
}
}
func
(
m
*
RepCollateralizeBorrowInfos
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_RepCollateralizeBorrowInfos
.
Unmarshal
(
m
,
b
)
func
(
m
*
RepCollateralizeRecords
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_RepCollateralizeRecords
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
RepCollateralizeRecords
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_RepCollateralizeRecords
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
RepCollateralizeRecords
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_RepCollateralizeRecords
.
Merge
(
m
,
src
)
}
func
(
m
*
RepCollateralizeRecords
)
XXX_Size
()
int
{
return
xxx_messageInfo_RepCollateralizeRecords
.
Size
(
m
)
}
func
(
m
*
RepCollateralizeRecords
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_RepCollateralizeRecords
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_RepCollateralizeRecords
proto
.
InternalMessageInfo
func
(
m
*
RepCollateralizeRecords
)
GetRecords
()
[]
*
BorrowRecord
{
if
m
!=
nil
{
return
m
.
Records
}
return
nil
}
// 精确查找借贷记录
type
ReqCollateralizeRecord
struct
{
CollateralizeId
string
`protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
RecordId
string
`protobuf:"bytes,2,opt,name=recordId,proto3" json:"recordId,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReqCollateralizeRecord
)
Reset
()
{
*
m
=
ReqCollateralizeRecord
{}
}
func
(
m
*
ReqCollateralizeRecord
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqCollateralizeRecord
)
ProtoMessage
()
{}
func
(
*
ReqCollateralizeRecord
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_a988fb4a61381972
,
[]
int
{
25
}
}
func
(
m
*
ReqCollateralizeRecord
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqCollateralizeRecord
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqCollateralizeRecord
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqCollateralizeRecord
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqCollateralizeRecord
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqCollateralizeRecord
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqCollateralizeRecord
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqCollateralizeRecord
.
Size
(
m
)
}
func
(
m
*
ReqCollateralizeRecord
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqCollateralizeRecord
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqCollateralizeRecord
proto
.
InternalMessageInfo
func
(
m
*
ReqCollateralizeRecord
)
GetCollateralizeId
()
string
{
if
m
!=
nil
{
return
m
.
CollateralizeId
}
return
""
}
func
(
m
*
ReqCollateralizeRecord
)
GetRecordId
()
string
{
if
m
!=
nil
{
return
m
.
RecordId
}
return
""
}
// 返回记录
type
RepCollateralizeRecord
struct
{
Record
*
BorrowRecord
`protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
RepCollateralizeRecord
)
Reset
()
{
*
m
=
RepCollateralizeRecord
{}
}
func
(
m
*
RepCollateralizeRecord
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RepCollateralizeRecord
)
ProtoMessage
()
{}
func
(
*
RepCollateralizeRecord
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_a988fb4a61381972
,
[]
int
{
26
}
}
func
(
m
*
RepCollateralizeRecord
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_RepCollateralizeRecord
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
RepCollateralize
BorrowInfos
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_RepCollateralize
BorrowInfos
.
Marshal
(
b
,
m
,
deterministic
)
func
(
m
*
RepCollateralize
Record
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_RepCollateralize
Record
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
RepCollateralize
BorrowInfos
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_RepCollateralize
BorrowInfos
.
Merge
(
m
,
src
)
func
(
m
*
RepCollateralize
Record
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_RepCollateralize
Record
.
Merge
(
m
,
src
)
}
func
(
m
*
RepCollateralize
BorrowInfos
)
XXX_Size
()
int
{
return
xxx_messageInfo_RepCollateralize
BorrowInfos
.
Size
(
m
)
func
(
m
*
RepCollateralize
Record
)
XXX_Size
()
int
{
return
xxx_messageInfo_RepCollateralize
Record
.
Size
(
m
)
}
func
(
m
*
RepCollateralize
BorrowInfos
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_RepCollateralize
BorrowInfos
.
DiscardUnknown
(
m
)
func
(
m
*
RepCollateralize
Record
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_RepCollateralize
Record
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_RepCollateralize
BorrowInfos
proto
.
InternalMessageInfo
var
xxx_messageInfo_RepCollateralize
Record
proto
.
InternalMessageInfo
func
(
m
*
RepCollateralize
BorrowInfos
)
GetRecord
()
[]
*
BorrowRecord
{
func
(
m
*
RepCollateralize
Record
)
GetRecord
()
*
BorrowRecord
{
if
m
!=
nil
{
return
m
.
Record
}
...
...
@@ -1557,80 +1717,88 @@ func init() {
proto
.
RegisterType
((
*
ReqCollateralizeByStatus
)(
nil
),
"types.ReqCollateralizeByStatus"
)
proto
.
RegisterType
((
*
ReqCollateralizeByAddr
)(
nil
),
"types.ReqCollateralizeByAddr"
)
proto
.
RegisterType
((
*
RepCollateralizeIDs
)(
nil
),
"types.RepCollateralizeIDs"
)
proto
.
RegisterType
((
*
ReqCollateralizeBorrowInfoByAddr
)(
nil
),
"types.ReqCollateralizeBorrowInfoByAddr"
)
proto
.
RegisterType
((
*
ReqCollateralizeBorrowInfoByStatus
)(
nil
),
"types.ReqCollateralizeBorrowInfoByStatus"
)
proto
.
RegisterType
((
*
RepCollateralizeBorrowInfos
)(
nil
),
"types.RepCollateralizeBorrowInfos"
)
proto
.
RegisterType
((
*
ReqCollateralizeRecordByAddr
)(
nil
),
"types.ReqCollateralizeRecordByAddr"
)
proto
.
RegisterType
((
*
ReqCollateralizeRecordByStatus
)(
nil
),
"types.ReqCollateralizeRecordByStatus"
)
proto
.
RegisterType
((
*
RepCollateralizeRecords
)(
nil
),
"types.RepCollateralizeRecords"
)
proto
.
RegisterType
((
*
ReqCollateralizeRecord
)(
nil
),
"types.ReqCollateralizeRecord"
)
proto
.
RegisterType
((
*
RepCollateralizeRecord
)(
nil
),
"types.RepCollateralizeRecord"
)
}
func
init
()
{
proto
.
RegisterFile
(
"collateralize.proto"
,
fileDescriptor_a988fb4a61381972
)
}
var
fileDescriptor_a988fb4a61381972
=
[]
byte
{
// 1064 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xdc
,
0x57
,
0xdd
,
0x6e
,
0xe3
,
0x44
,
0x14
,
0x5e
,
0xdb
,
0x49
,
0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1f
,
0xfd
,
0x15
,
0x00
,
0x00
,
0xff
,
0xff
,
0xc2
,
0xc2
,
0xca
,
0x4a
,
0xb1
,
0x0f
,
0x00
,
0x00
,
}
plugin/dapp/init/init.go
View file @
adb27358
...
...
@@ -11,6 +11,7 @@ import (
_
"github.com/33cn/plugin/plugin/dapp/game"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/guess"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/hashlock"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/issuance"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/js"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/lottery"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/multisig"
//auto gen
...
...
plugin/dapp/issuance/commands/cmd.go
View file @
adb27358
...
...
@@ -245,7 +245,8 @@ func addIssuanceQueryFlags(cmd *cobra.Command) {
cmd
.
Flags
()
.
StringP
(
"address"
,
"a"
,
""
,
"address"
)
cmd
.
Flags
()
.
StringP
(
"index"
,
"i"
,
""
,
"index"
)
cmd
.
Flags
()
.
StringP
(
"status"
,
"s"
,
""
,
"status"
)
cmd
.
Flags
()
.
StringP
(
"issuanceIDs"
,
"d"
,
""
,
"issuance IDs"
)
cmd
.
Flags
()
.
StringP
(
"issuanceIDs"
,
"e"
,
""
,
"issuance IDs"
)
cmd
.
Flags
()
.
StringP
(
"debtID"
,
"d"
,
""
,
"debt ID"
)
}
func
IssuanceQuery
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
...
...
@@ -255,6 +256,7 @@ func IssuanceQuery(cmd *cobra.Command, args []string) {
statusStr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"status"
)
// indexstr, _ := cmd.Flags().GetString("index")
issuanceIDs
,
_
:=
cmd
.
Flags
()
.
GetString
(
"issuanceIDs"
)
debtID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"debtID"
)
var
params
rpctypes
.
Query4Jrpc
params
.
Execer
=
pkt
.
IssuanceX
...
...
@@ -277,46 +279,49 @@ func IssuanceQuery(cmd *cobra.Command, args []string) {
if
issuanceID
!=
""
{
if
statusStr
!=
""
{
params
.
FuncName
=
"Issuance
DebtInfo
ByStatus"
params
.
FuncName
=
"Issuance
Records
ByStatus"
req
:=
&
pkt
.
ReqIssuance
DebtInfo
ByStatus
{
req
:=
&
pkt
.
ReqIssuance
Records
ByStatus
{
IssuanceId
:
issuanceID
,
Status
:
int32
(
status
),
}
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
var
res
pkt
.
RepIssuance
DebtInfo
s
var
res
pkt
.
RepIssuance
Record
s
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"Chain33.Query"
,
params
,
&
res
)
ctx
.
Run
()
}
else
if
address
!=
""
{
params
.
FuncName
=
"Issuance
DebtInfo
ByAddr"
params
.
FuncName
=
"Issuance
Records
ByAddr"
req
:=
&
pkt
.
ReqIssuance
DebtInfo
ByAddr
{
req
:=
&
pkt
.
ReqIssuance
Records
ByAddr
{
IssuanceId
:
issuanceID
,
Addr
:
address
,
}
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
var
res
pkt
.
RepIssuanceDebtInfo
s
var
res
pkt
.
RepIssuanceDebtInfo
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"Chain33.Query"
,
params
,
&
res
)
ctx
.
Run
()
}
else
{
params
.
FuncName
=
"Issuance
Info
ByID"
}
else
if
debtID
!=
""
{
params
.
FuncName
=
"Issuance
Record
ByID"
req
:=
&
pkt
.
ReqIssuanceInfo
{
req
:=
&
pkt
.
ReqIssuance
Debt
Info
{
IssuanceId
:
issuanceID
,
DebtId
:
debtID
,
}
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
var
res
pkt
.
RepIssuanceCurrentInfo
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"Chain33.Query"
,
params
,
&
res
)
ctx
.
Run
()
}
}
else
if
address
!=
""
{
params
.
FuncName
=
"IssuanceByAddr"
}
else
{
params
.
FuncName
=
"IssuanceInfoByID"
req
:=
&
pkt
.
ReqIssuanceByAddr
{
Addr
:
address
}
req
:=
&
pkt
.
ReqIssuanceInfo
{
IssuanceId
:
issuanceID
,
}
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
var
res
pkt
.
RepIssuanceIDs
var
res
pkt
.
RepIssuanceCurrentInfo
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"Chain33.Query"
,
params
,
&
res
)
ctx
.
Run
()
}
}
else
if
statusStr
!=
""
{
params
.
FuncName
=
"IssuanceByStatus"
...
...
plugin/dapp/issuance/executor/exec_del_local.go
View file @
adb27358
...
...
@@ -12,34 +12,40 @@ import (
func
(
c
*
Issuance
)
execDelLocal
(
tx
*
types
.
Transaction
,
receiptData
*
types
.
ReceiptData
)
(
*
types
.
LocalDBSet
,
error
)
{
set
:=
&
types
.
LocalDBSet
{}
for
_
,
item
:=
range
receiptData
.
Logs
{
var
I
ssuanceLog
pty
.
ReceiptIssuance
err
:=
types
.
Decode
(
item
.
Log
,
&
I
ssuanceLog
)
var
i
ssuanceLog
pty
.
ReceiptIssuance
err
:=
types
.
Decode
(
item
.
Log
,
&
i
ssuanceLog
)
if
err
!=
nil
{
return
nil
,
err
}
switch
item
.
Ty
{
case
pty
.
TyLogIssuanceCreate
:
kv
:=
c
.
deleteIssuanceStatus
(
&
IssuanceLog
)
set
.
KV
=
append
(
set
.
KV
,
kv
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceStatus
(
issuanceLog
.
Status
,
issuanceLog
.
Index
)
...
)
break
case
pty
.
TyLogIssuanceDebt
:
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordStatus
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuance
Addr
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordStatus
(
issuanceLog
.
RecordStatus
,
issuanceLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuance
RecordAddr
(
issuanceLog
.
AccountAddr
,
issuanceLog
.
Index
)
...
)
break
case
pty
.
TyLogIssuanceRepay
:
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordStatus
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceAddr
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordStatus
(
issuanceLog
.
RecordPreStatus
,
issuanceLog
.
AccountAddr
,
issuanceLog
.
PreIndex
,
issuanceLog
.
DebtId
,
issuanceLog
.
IssuanceId
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordStatus
(
issuanceLog
.
RecordStatus
,
issuanceLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordAddr
(
issuanceLog
.
AccountAddr
,
issuanceLog
.
PreIndex
,
issuanceLog
.
DebtId
,
issuanceLog
.
IssuanceId
)
...
)
break
case
pty
.
TyLogIssuanceFeed
:
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordStatus
(
&
IssuanceLog
)
...
)
if
IssuanceLog
.
RecordStatus
==
pty
.
IssuanceUserStatusSystemLiquidate
{
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceAddr
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordStatus
(
issuanceLog
.
RecordStatus
,
issuanceLog
.
AccountAddr
,
issuanceLog
.
PreIndex
,
issuanceLog
.
DebtId
,
issuanceLog
.
IssuanceId
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordStatus
(
issuanceLog
.
RecordStatus
,
issuanceLog
.
Index
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordAddr
(
issuanceLog
.
AccountAddr
,
issuanceLog
.
PreIndex
,
issuanceLog
.
DebtId
,
issuanceLog
.
IssuanceId
)
...
)
// 如果没有被清算,需要把地址索引更新
if
issuanceLog
.
RecordStatus
==
pty
.
IssuanceUserStatusWarning
||
issuanceLog
.
RecordStatus
==
pty
.
IssuanceUserStatusExpire
{
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordAddr
(
issuanceLog
.
AccountAddr
,
issuanceLog
.
Index
)
...
)
}
break
case
pty
.
TyLogIssuanceClose
:
kv
:=
c
.
addIssuanceStatus
(
&
IssuanceLog
)
set
.
KV
=
append
(
set
.
KV
,
kv
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceStatus
(
pty
.
IssuanceStatusCreated
,
issuanceLog
.
PreIndex
,
issuanceLog
.
IssuanceId
)
...
)
break
}
}
...
...
plugin/dapp/issuance/executor/exec_local.go
View file @
adb27358
...
...
@@ -13,32 +13,41 @@ import (
func
(
c
*
Issuance
)
execLocal
(
tx
*
types
.
Transaction
,
receipt
*
types
.
ReceiptData
)
(
*
types
.
LocalDBSet
,
error
)
{
set
:=
&
types
.
LocalDBSet
{}
for
_
,
item
:=
range
receipt
.
Logs
{
var
I
ssuanceLog
pty
.
ReceiptIssuance
err
:=
types
.
Decode
(
item
.
Log
,
&
I
ssuanceLog
)
var
i
ssuanceLog
pty
.
ReceiptIssuance
err
:=
types
.
Decode
(
item
.
Log
,
&
i
ssuanceLog
)
if
err
!=
nil
{
return
nil
,
err
}
switch
item
.
Ty
{
case
pty
.
TyLogIssuanceCreate
:
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceStatus
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceStatus
(
issuanceLog
.
Status
,
issuanceLog
.
Index
,
issuanceLog
.
IssuanceId
)
...
)
break
case
pty
.
TyLogIssuanceDebt
:
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordStatus
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceAddr
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordStatus
(
issuanceLog
.
RecordStatus
,
issuanceLog
.
AccountAddr
,
issuanceLog
.
Index
,
issuanceLog
.
DebtId
,
issuanceLog
.
IssuanceId
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordAddr
(
issuanceLog
.
AccountAddr
,
issuanceLog
.
Index
,
issuanceLog
.
DebtId
,
issuanceLog
.
IssuanceId
)
...
)
break
case
pty
.
TyLogIssuanceRepay
:
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordStatus
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceAddr
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordStatus
(
issuanceLog
.
RecordPreStatus
,
issuanceLog
.
PreIndex
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordStatus
(
issuanceLog
.
RecordStatus
,
issuanceLog
.
AccountAddr
,
issuanceLog
.
Index
,
issuanceLog
.
DebtId
,
issuanceLog
.
IssuanceId
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordAddr
(
issuanceLog
.
AccountAddr
,
issuanceLog
.
PreIndex
)
...
)
break
case
pty
.
TyLogIssuanceFeed
:
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordStatus
(
&
IssuanceLog
)
...
)
if
IssuanceLog
.
RecordStatus
==
pty
.
IssuanceUserStatusSystemLiquidate
{
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceAddr
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordStatus
(
issuanceLog
.
RecordPreStatus
,
issuanceLog
.
PreIndex
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordStatus
(
issuanceLog
.
RecordStatus
,
issuanceLog
.
AccountAddr
,
issuanceLog
.
Index
,
issuanceLog
.
DebtId
,
issuanceLog
.
IssuanceId
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceRecordAddr
(
issuanceLog
.
AccountAddr
,
issuanceLog
.
PreIndex
)
...
)
// 如果没有被清算,需要把地址索引更新
if
issuanceLog
.
RecordStatus
==
pty
.
IssuanceUserStatusWarning
||
issuanceLog
.
RecordStatus
==
pty
.
IssuanceUserStatusExpire
{
set
.
KV
=
append
(
set
.
KV
,
c
.
addIssuanceRecordAddr
(
issuanceLog
.
AccountAddr
,
issuanceLog
.
Index
,
issuanceLog
.
DebtId
,
issuanceLog
.
IssuanceId
)
...
)
}
break
case
pty
.
TyLogIssuanceClose
:
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceStatus
(
&
IssuanceLog
)
...
)
set
.
KV
=
append
(
set
.
KV
,
c
.
deleteIssuanceStatus
(
issuanceLog
.
Status
,
issuanceLog
.
PreIndex
)
...
)
break
}
}
...
...
plugin/dapp/issuance/executor/issuance.go
View file @
adb27358
...
...
@@ -59,11 +59,11 @@ func (c *Issuance) GetDriverName() string {
return
pty
.
IssuanceX
}
func
(
c
*
Issuance
)
addIssuanceID
(
i
ssuancelog
*
pty
.
ReceiptIssuance
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceKey
(
issuance
log
.
IssuanceId
,
issuancelog
.
I
ndex
)
func
(
c
*
Issuance
)
addIssuanceID
(
i
ndex
int64
,
issuanceId
string
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceKey
(
issuance
Id
,
i
ndex
)
record
:=
&
pty
.
IssuanceRecord
{
IssuanceId
:
issuance
log
.
Issuance
Id
,
Index
:
i
ssuancelog
.
I
ndex
,
IssuanceId
:
issuanceId
,
Index
:
index
,
}
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
record
)}
...
...
@@ -71,19 +71,19 @@ func (c *Issuance) addIssuanceID(issuancelog *pty.ReceiptIssuance) (kvs []*types
return
kvs
}
func
(
c
*
Issuance
)
deleteIssuanceID
(
i
ssuancelog
*
pty
.
ReceiptIssuance
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceKey
(
issuance
log
.
IssuanceId
,
issuancelog
.
I
ndex
)
func
(
c
*
Issuance
)
deleteIssuanceID
(
i
ndex
int64
,
issuanceId
string
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceKey
(
issuance
Id
,
i
ndex
)
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
}
kvs
=
append
(
kvs
,
kv
)
return
kvs
}
func
(
c
*
Issuance
)
addIssuanceStatus
(
issuancelog
*
pty
.
ReceiptIssuance
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceStatusKey
(
issuancelog
.
Status
,
issuancelog
.
I
ndex
)
func
(
c
*
Issuance
)
addIssuanceStatus
(
status
int32
,
index
int64
,
issuanceId
string
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceStatusKey
(
status
,
i
ndex
)
record
:=
&
pty
.
IssuanceRecord
{
IssuanceId
:
issuance
log
.
Issuance
Id
,
Index
:
i
ssuancelog
.
I
ndex
,
IssuanceId
:
issuanceId
,
Index
:
index
,
}
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
record
)}
...
...
@@ -91,19 +91,20 @@ func (c *Issuance) addIssuanceStatus(issuancelog *pty.ReceiptIssuance) (kvs []*t
return
kvs
}
func
(
c
*
Issuance
)
deleteIssuanceStatus
(
issuancelog
*
pty
.
ReceiptIssuance
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceStatusKey
(
issuancelog
.
Status
,
issuancelog
.
I
ndex
)
func
(
c
*
Issuance
)
deleteIssuanceStatus
(
status
int32
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceStatusKey
(
status
,
i
ndex
)
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
}
kvs
=
append
(
kvs
,
kv
)
return
kvs
}
func
(
c
*
Issuance
)
addIssuance
Addr
(
issuancelog
*
pty
.
ReceiptIssuance
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuance
AddrKey
(
issuancelog
.
AccountAddr
,
issuancelog
.
I
ndex
)
func
(
c
*
Issuance
)
addIssuance
RecordAddr
(
accountAddr
string
,
index
int64
,
debtId
string
,
issuanceId
string
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuance
RecordAddrKey
(
accountAddr
,
i
ndex
)
record
:=
&
pty
.
IssuanceRecord
{
IssuanceId
:
issuancelog
.
IssuanceId
,
Index
:
issuancelog
.
Index
,
IssuanceId
:
issuanceId
,
DebtId
:
debtId
,
Index
:
index
,
}
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
record
)}
...
...
@@ -111,21 +112,22 @@ func (c *Issuance) addIssuanceAddr(issuancelog *pty.ReceiptIssuance) (kvs []*typ
return
kvs
}
func
(
c
*
Issuance
)
deleteIssuance
Addr
(
issuancelog
*
pty
.
ReceiptIssuance
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuance
AddrKey
(
issuancelog
.
AccountAddr
,
issuancelog
.
I
ndex
)
func
(
c
*
Issuance
)
deleteIssuance
RecordAddr
(
accountAddr
string
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuance
RecordAddrKey
(
accountAddr
,
i
ndex
)
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
}
kvs
=
append
(
kvs
,
kv
)
return
kvs
}
func
(
c
*
Issuance
)
addIssuanceRecordStatus
(
issuancelog
*
pty
.
ReceiptIssuance
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceRecordStatusKey
(
issuancelog
.
RecordStatus
,
issuancelog
.
I
ndex
)
func
(
c
*
Issuance
)
addIssuanceRecordStatus
(
recordStatus
int32
,
accountAddr
string
,
index
int64
,
debtId
string
,
issuanceId
string
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceRecordStatusKey
(
recordStatus
,
i
ndex
)
record
:=
&
pty
.
IssuanceRecord
{
IssuanceId
:
issuancelog
.
IssuanceId
,
Addr
:
issuancelog
.
AccountAddr
,
Index
:
issuancelog
.
Index
,
IssuanceId
:
issuanceId
,
DebtId
:
debtId
,
Addr
:
accountAddr
,
Index
:
index
,
}
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
record
)}
...
...
@@ -133,8 +135,8 @@ func (c *Issuance) addIssuanceRecordStatus(issuancelog *pty.ReceiptIssuance) (kv
return
kvs
}
func
(
c
*
Issuance
)
deleteIssuanceRecordStatus
(
issuancelog
*
pty
.
ReceiptIssuance
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceRecordStatusKey
(
issuancelog
.
RecordStatus
,
issuancelog
.
I
ndex
)
func
(
c
*
Issuance
)
deleteIssuanceRecordStatus
(
status
int32
,
index
int64
)
(
kvs
[]
*
types
.
KeyValue
)
{
key
:=
calcIssuanceRecordStatusKey
(
status
,
i
ndex
)
kv
:=
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
}
kvs
=
append
(
kvs
,
kv
)
...
...
plugin/dapp/issuance/executor/issuancedb.go
View file @
adb27358
...
...
@@ -157,21 +157,21 @@ func NewIssuanceAction(c *Issuance, tx *types.Transaction, index int) *Action {
}
// GetCollCommonRecipt generate logs for Issuance common action
func
(
action
*
Action
)
GetCollCommonRecipt
(
issuance
*
pty
.
Issuance
,
preStatus
int32
)
*
pty
.
ReceiptIssuance
{
func
(
action
*
Action
)
GetCollCommonRecipt
(
issuance
*
pty
.
Issuance
)
*
pty
.
ReceiptIssuance
{
c
:=
&
pty
.
ReceiptIssuance
{}
c
.
IssuanceId
=
issuance
.
IssuanceId
c
.
PreStatus
=
preStatus
c
.
Status
=
issuance
.
Status
c
.
Index
=
action
.
GetIndex
()
c
.
Index
=
issuance
.
Index
c
.
PreIndex
=
issuance
.
PreIndex
return
c
}
// GetCreateReceiptLog generate logs for Issuance create action
func
(
action
*
Action
)
GetCreateReceiptLog
(
issuance
*
pty
.
Issuance
,
preStatus
int32
)
*
types
.
ReceiptLog
{
func
(
action
*
Action
)
GetCreateReceiptLog
(
issuance
*
pty
.
Issuance
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogIssuanceCreate
c
:=
action
.
GetCollCommonRecipt
(
issuance
,
preStatus
)
c
:=
action
.
GetCollCommonRecipt
(
issuance
)
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -179,12 +179,14 @@ func (action *Action) GetCreateReceiptLog(issuance *pty.Issuance, preStatus int3
}
// GetDebtReceiptLog generate logs for Issuance debt action
func
(
action
*
Action
)
GetDebtReceiptLog
(
issuance
*
pty
.
Issuance
,
preStatus
int32
)
*
types
.
ReceiptLog
{
func
(
action
*
Action
)
GetDebtReceiptLog
(
issuance
*
pty
.
Issuance
,
debtRecord
*
pty
.
DebtRecord
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogIssuanceDebt
c
:=
action
.
GetCollCommonRecipt
(
issuance
,
preStatus
)
c
:=
action
.
GetCollCommonRecipt
(
issuance
)
c
.
AccountAddr
=
action
.
fromaddr
c
.
DebtId
=
debtRecord
.
DebtId
c
.
RecordStatus
=
debtRecord
.
Status
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -192,11 +194,15 @@ func (action *Action) GetDebtReceiptLog(issuance *pty.Issuance, preStatus int32)
}
// GetRepayReceiptLog generate logs for Issuance Repay action
func
(
action
*
Action
)
GetRepayReceiptLog
(
issuance
*
pty
.
Issuance
,
preStatus
int32
)
*
types
.
ReceiptLog
{
func
(
action
*
Action
)
GetRepayReceiptLog
(
issuance
*
pty
.
Issuance
,
debtRecord
*
pty
.
DebtRecord
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogIssuanceRepay
c
:=
action
.
GetCollCommonRecipt
(
issuance
,
preStatus
)
c
:=
action
.
GetCollCommonRecipt
(
issuance
)
c
.
AccountAddr
=
action
.
fromaddr
c
.
DebtId
=
debtRecord
.
DebtId
c
.
RecordStatus
=
debtRecord
.
Status
c
.
RecordPreStatus
=
debtRecord
.
PreStatus
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -208,9 +214,11 @@ func (action *Action) GetFeedReceiptLog(issuance *pty.Issuance, debtRecord *pty.
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogIssuanceFeed
c
:=
action
.
GetCollCommonRecipt
(
issuance
,
debtRecord
.
PreStatus
)
c
:=
action
.
GetCollCommonRecipt
(
issuance
)
c
.
AccountAddr
=
debtRecord
.
AccountAddr
c
.
DebtId
=
debtRecord
.
DebtId
c
.
RecordStatus
=
debtRecord
.
Status
c
.
RecordPreStatus
=
debtRecord
.
PreStatus
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -218,11 +226,11 @@ func (action *Action) GetFeedReceiptLog(issuance *pty.Issuance, debtRecord *pty.
}
// GetCloseReceiptLog generate logs for Issuance close action
func
(
action
*
Action
)
GetCloseReceiptLog
(
Issuance
*
pty
.
Issuance
,
preStatus
int32
)
*
types
.
ReceiptLog
{
func
(
action
*
Action
)
GetCloseReceiptLog
(
Issuance
*
pty
.
Issuance
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
pty
.
TyLogIssuanceClose
c
:=
action
.
GetCollCommonRecipt
(
Issuance
,
preStatus
)
c
:=
action
.
GetCollCommonRecipt
(
Issuance
)
log
.
Log
=
types
.
Encode
(
c
)
...
...
@@ -371,6 +379,8 @@ func (action *Action) IssuanceCreate(create *pty.IssuanceCreate) (*types.Receipt
issu
.
CreateTime
=
action
.
blocktime
issu
.
IssuerAddr
=
action
.
fromaddr
issu
.
Status
=
pty
.
IssuanceActionCreate
issu
.
Index
=
action
.
GetIndex
()
issu
.
CreateIndex
=
issu
.
Index
clog
.
Debug
(
"IssuanceCreate created"
,
"IssuanceID"
,
issuanceID
,
"TotalBalance"
,
issu
.
TotalBalance
)
...
...
@@ -378,7 +388,7 @@ func (action *Action) IssuanceCreate(create *pty.IssuanceCreate) (*types.Receipt
issu
.
Save
(
action
.
db
)
kv
=
append
(
kv
,
issu
.
GetKVSet
()
...
)
receiptLog
:=
action
.
GetCreateReceiptLog
(
&
issu
.
Issuance
,
0
)
receiptLog
:=
action
.
GetCreateReceiptLog
(
&
issu
.
Issuance
)
logs
=
append
(
logs
,
receiptLog
)
receipt
=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
,
KV
:
kv
,
Logs
:
logs
}
...
...
@@ -405,7 +415,7 @@ func (action *Action)getLatestPrice(db dbm.KV) (float32, error) {
clog
.
Debug
(
"getLatestPrice"
,
"get"
,
err
)
return
-
1
,
err
}
var
price
pty
.
AssetPriceRecord
var
price
pty
.
Issuance
AssetPriceRecord
//decode
err
=
types
.
Decode
(
data
,
&
price
)
if
err
!=
nil
{
...
...
@@ -458,15 +468,14 @@ func (action *Action) IssuanceDebt(debt *pty.IssuanceDebt) (*types.Receipt, erro
return
nil
,
pty
.
ErrIssuanceStatus
}
// 一个地址在一期借贷中只允许借出一次
for
_
,
record
:=
range
issuance
.
DebtRecords
{
if
record
.
AccountAddr
==
action
.
fromaddr
{
clog
.
Error
(
"IssuanceDebt"
,
"IssuanceId"
,
debt
.
IssuanceId
,
action
.
fromaddr
,
"execaddr"
,
action
.
execaddr
,
"err"
,
pty
.
ErrIssuanceAccountExist
)
return
nil
,
err
}
}
//
//
一个地址在一期借贷中只允许借出一次
//
for _, record := range issuance.DebtRecords {
//
if record.AccountAddr == action.fromaddr {
//
clog.Error("IssuanceDebt","IssuanceId", debt.IssuanceId, action.fromaddr, "execaddr", action.execaddr, "err", pty.ErrIssuanceAccountExist)
//
return nil, err
//
}
//
}
issu
:=
&
IssuanceDB
{
*
issuance
}
preStatus
:=
issu
.
Status
// 借贷金额检查
if
debt
.
GetValue
()
<=
0
{
...
...
@@ -537,6 +546,7 @@ func (action *Action) IssuanceDebt(debt *pty.IssuanceDebt) (*types.Receipt, erro
// 构造借出记录
debtRecord
:=
&
pty
.
DebtRecord
{}
debtRecord
.
AccountAddr
=
action
.
fromaddr
debtRecord
.
DebtId
=
common
.
ToHex
(
action
.
txhash
)
debtRecord
.
CollateralValue
=
btyFrozen
debtRecord
.
StartTime
=
action
.
blocktime
debtRecord
.
CollateralPrice
=
lastPrice
...
...
@@ -555,10 +565,12 @@ func (action *Action) IssuanceDebt(debt *pty.IssuanceDebt) (*types.Receipt, erro
issu
.
CollateralValue
+=
btyFrozen
issu
.
DebtValue
+=
debt
.
Value
issu
.
Balance
-=
debt
.
Value
issu
.
PreIndex
=
issu
.
Index
issu
.
Index
=
action
.
GetIndex
()
issu
.
Save
(
action
.
db
)
kv
=
append
(
kv
,
issu
.
GetKVSet
()
...
)
receiptLog
:=
action
.
GetDebtReceiptLog
(
&
issu
.
Issuance
,
preStatus
)
receiptLog
:=
action
.
GetDebtReceiptLog
(
&
issu
.
Issuance
,
debtRecord
)
logs
=
append
(
logs
,
receiptLog
)
receipt
=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
,
KV
:
kv
,
Logs
:
logs
}
...
...
@@ -579,7 +591,6 @@ func (action *Action) IssuanceRepay(repay *pty.IssuanceRepay) (*types.Receipt, e
}
issu
:=
&
IssuanceDB
{
*
issuance
}
preStatus
:=
issu
.
Status
// 状态检查
if
issu
.
Status
!=
pty
.
IssuanceStatusCreated
{
...
...
@@ -591,7 +602,7 @@ func (action *Action) IssuanceRepay(repay *pty.IssuanceRepay) (*types.Receipt, e
var
debtRecord
*
pty
.
DebtRecord
var
index
int
for
i
,
record
:=
range
issu
.
DebtRecords
{
if
record
.
AccountAddr
==
action
.
fromaddr
{
if
record
.
DebtId
==
repay
.
DebtId
{
debtRecord
=
record
index
=
i
break
...
...
@@ -639,10 +650,12 @@ func (action *Action) IssuanceRepay(repay *pty.IssuanceRepay) (*types.Receipt, e
issu
.
InvalidRecords
=
append
(
issu
.
InvalidRecords
,
debtRecord
)
issu
.
LatestLiquidationPrice
=
getLatestLiquidationPrice
(
&
issu
.
Issuance
)
issu
.
LatestExpireTime
=
getLatestExpireTime
(
&
issu
.
Issuance
)
issu
.
PreIndex
=
issu
.
Index
issu
.
Index
=
action
.
GetIndex
()
issu
.
Save
(
action
.
db
)
kv
=
append
(
kv
,
issu
.
GetKVSet
()
...
)
receiptLog
:=
action
.
GetRepayReceiptLog
(
&
issu
.
Issuance
,
preStatus
)
receiptLog
:=
action
.
GetRepayReceiptLog
(
&
issu
.
Issuance
,
debtRecord
)
logs
=
append
(
logs
,
receiptLog
)
receipt
=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
,
KV
:
kv
,
Logs
:
logs
}
...
...
@@ -692,6 +705,8 @@ func (action *Action) systemLiquidation(issu *pty.Issuance, price float32) (*typ
debtRecord
.
PreStatus
=
debtRecord
.
Status
debtRecord
.
Status
=
pty
.
IssuanceUserStatusWarning
}
issu
.
PreIndex
=
issu
.
Index
issu
.
Index
=
action
.
GetIndex
()
log
:=
action
.
GetFeedReceiptLog
(
issu
,
debtRecord
)
logs
=
append
(
logs
,
log
)
...
...
@@ -746,6 +761,8 @@ func (action *Action) expireLiquidation(issu *pty.Issuance) (*types.Receipt, err
debtRecord
.
PreStatus
=
debtRecord
.
Status
debtRecord
.
Status
=
pty
.
IssuanceUserStatusExpire
}
issu
.
PreIndex
=
issu
.
Index
issu
.
Index
=
action
.
GetIndex
()
log
:=
action
.
GetFeedReceiptLog
(
issu
,
debtRecord
)
logs
=
append
(
logs
,
log
)
...
...
@@ -832,7 +849,7 @@ func (action *Action) IssuanceFeed(feed *pty.IssuanceFeed) (*types.Receipt, erro
kv
=
append
(
kv
,
receipt
.
KV
...
)
}
var
priceRecord
pty
.
AssetPriceRecord
var
priceRecord
pty
.
Issuance
AssetPriceRecord
priceRecord
.
BtyPrice
=
price
priceRecord
.
RecordTime
=
action
.
blocktime
...
...
@@ -871,34 +888,37 @@ func (action *Action) IssuanceClose(close *pty.IssuanceClose) (*types.Receipt, e
clog
.
Debug
(
"IssuanceClose"
,
"ID"
,
close
.
IssuanceId
)
issu
:=
&
IssuanceDB
{
*
issuance
}
preStatus
:=
issu
.
Status
issu
.
Status
=
pty
.
IssuanceStatusClose
issu
.
PreIndex
=
issu
.
CreateIndex
issu
.
Index
=
action
.
GetIndex
()
issu
.
Save
(
action
.
db
)
kv
=
append
(
kv
,
issu
.
GetKVSet
()
...
)
receiptLog
:=
action
.
GetCloseReceiptLog
(
&
issu
.
Issuance
,
preStatus
)
receiptLog
:=
action
.
GetCloseReceiptLog
(
&
issu
.
Issuance
)
logs
=
append
(
logs
,
receiptLog
)
return
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
,
KV
:
kv
,
Logs
:
logs
},
nil
}
//
查找借贷
func
queryIssuanceByID
(
db
dbm
.
KV
,
I
ssuanceID
string
)
(
*
pty
.
Issuance
,
error
)
{
data
,
err
:=
db
.
Get
(
Key
(
I
ssuanceID
))
//
根据ID查找发行信息
func
queryIssuanceByID
(
db
dbm
.
KV
,
i
ssuanceID
string
)
(
*
pty
.
Issuance
,
error
)
{
data
,
err
:=
db
.
Get
(
Key
(
i
ssuanceID
))
if
err
!=
nil
{
clog
.
Debug
(
"queryIssuanceByID"
,
"error"
,
err
)
clog
.
Error
(
"queryIssuanceByID"
,
"error"
,
err
)
return
nil
,
err
}
var
issu
pty
.
Issuance
err
=
types
.
Decode
(
data
,
&
issu
)
if
err
!=
nil
{
clog
.
Debug
(
"queryIssuanceByID"
,
"decode"
,
err
)
clog
.
Error
(
"queryIssuanceByID"
,
"decode"
,
err
)
return
nil
,
err
}
return
&
issu
,
nil
}
// 根据发行状态查找发行ID
func
queryIssuanceByStatus
(
localdb
dbm
.
Lister
,
status
int32
)
([]
*
pty
.
IssuanceRecord
,
error
)
{
data
,
err
:=
localdb
.
List
(
calcIssuanceStatusPrefix
(
status
),
nil
,
DefultCount
,
ListDESC
)
if
err
!=
nil
{
...
...
@@ -920,44 +940,88 @@ func queryIssuanceByStatus(localdb dbm.Lister, status int32) ([]*pty.IssuanceRec
return
colls
,
nil
}
func
queryIssuanceByAddr
(
localdb
dbm
.
Lister
,
addr
string
)
([]
*
pty
.
IssuanceRecord
,
error
)
{
data
,
err
:=
localdb
.
List
(
calcIssuanceAddrPrefix
(
addr
),
nil
,
DefultCount
,
ListDESC
)
// 精确查找发行记录
func
queryIssuanceRecordByID
(
db
dbm
.
KV
,
issuanceID
string
,
debtID
string
)
(
*
pty
.
DebtRecord
,
error
)
{
issu
,
err
:=
queryIssuanceByID
(
db
,
issuanceID
)
if
err
!=
nil
{
clog
.
Debug
(
"queryIssuancesByAddr
"
,
"error"
,
err
)
clog
.
Error
(
"queryIssuanceRecordByID
"
,
"error"
,
err
)
return
nil
,
err
}
var
colls
[]
*
pty
.
IssuanceRecord
for
_
,
record
:=
range
issu
.
DebtRecords
{
if
record
.
DebtId
==
debtID
{
return
record
,
nil
}
}
for
_
,
record
:=
range
issu
.
InvalidRecords
{
if
record
.
DebtId
==
debtID
{
return
record
,
nil
}
}
return
nil
,
types
.
ErrNotFound
}
// 根据发行状态查找
func
queryIssuanceRecordsByStatus
(
db
dbm
.
KV
,
localdb
dbm
.
Lister
,
status
int32
)
([]
*
pty
.
DebtRecord
,
error
)
{
var
statusKey
string
if
status
==
0
{
statusKey
=
""
}
else
{
statusKey
=
string
(
status
)
}
data
,
err
:=
localdb
.
List
(
calcIssuanceRecordStatusPrefix
(
statusKey
),
nil
,
DefultCount
,
ListDESC
)
if
err
!=
nil
{
clog
.
Error
(
"queryIssuanceRecordsByStatus"
,
"error"
,
err
)
return
nil
,
err
}
var
records
[]
*
pty
.
DebtRecord
var
issu
pty
.
IssuanceRecord
for
_
,
collBytes
:=
range
data
{
err
=
types
.
Decode
(
collBytes
,
&
issu
)
if
err
!=
nil
{
clog
.
Debug
(
"queryIssuancesByAddr
"
,
"decode"
,
err
)
clog
.
Error
(
"queryIssuanceRecordsByStatus
"
,
"decode"
,
err
)
return
nil
,
err
}
colls
=
append
(
colls
,
&
issu
)
record
,
err
:=
queryIssuanceRecordByID
(
db
,
issu
.
IssuanceId
,
issu
.
DebtId
)
if
err
!=
nil
{
clog
.
Error
(
"queryIssuanceRecordsByStatus"
,
"decode"
,
err
)
return
nil
,
err
}
records
=
append
(
records
,
record
)
}
return
coll
s
,
nil
return
record
s
,
nil
}
func
queryIssuanceRecordByStatus
(
localdb
dbm
.
Lister
,
status
int32
)
([]
*
pty
.
IssuanceRecord
,
error
)
{
data
,
err
:=
localdb
.
List
(
calcIssuanceRecordStatusPrefix
(
status
),
nil
,
DefultCount
,
ListDESC
)
// 根据用户地址查找
func
queryIssuanceRecordByAddr
(
db
dbm
.
KV
,
localdb
dbm
.
Lister
,
addr
string
)
([]
*
pty
.
DebtRecord
,
error
)
{
data
,
err
:=
localdb
.
List
(
calcIssuanceRecordAddrPrefix
(
addr
),
nil
,
DefultCount
,
ListDESC
)
if
err
!=
nil
{
clog
.
Debug
(
"queryIssuanceRecordByStatus
"
,
"error"
,
err
)
clog
.
Error
(
"queryIssuanceRecordByAddr
"
,
"error"
,
err
)
return
nil
,
err
}
var
colls
[]
*
pty
.
Issuance
Record
var
records
[]
*
pty
.
Debt
Record
var
issu
pty
.
IssuanceRecord
for
_
,
collBytes
:=
range
data
{
err
=
types
.
Decode
(
collBytes
,
&
issu
)
if
err
!=
nil
{
clog
.
Debug
(
"queryIssuancesByStatus
"
,
"decode"
,
err
)
clog
.
Error
(
"queryIssuanceRecordByAddr
"
,
"decode"
,
err
)
return
nil
,
err
}
colls
=
append
(
colls
,
&
issu
)
record
,
err
:=
queryIssuanceRecordByID
(
db
,
issu
.
IssuanceId
,
issu
.
DebtId
)
if
err
!=
nil
{
clog
.
Error
(
"queryIssuanceRecordByAddr"
,
"decode"
,
err
)
return
nil
,
err
}
records
=
append
(
records
,
record
)
}
return
coll
s
,
nil
return
record
s
,
nil
}
plugin/dapp/issuance/executor/keys.go
View file @
adb27358
...
...
@@ -21,13 +21,13 @@ func calcIssuanceStatusKey(status int32, index int64) []byte {
return
[]
byte
(
key
)
}
func
calcIssuanceAddrPrefix
(
addr
string
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-Issuance-addr:%s"
,
addr
)
func
calcIssuance
Record
AddrPrefix
(
addr
string
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-Issuance-
record-
addr:%s"
,
addr
)
return
[]
byte
(
key
)
}
func
calcIssuanceAddrKey
(
addr
string
,
index
int64
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-Issuance-addr:%s:%018d"
,
addr
,
index
)
func
calcIssuance
Record
AddrKey
(
addr
string
,
index
int64
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-Issuance-
record-
addr:%s:%018d"
,
addr
,
index
)
return
[]
byte
(
key
)
}
...
...
@@ -41,8 +41,8 @@ func calcIssuanceLatestPriceKey() []byte {
return
[]
byte
(
key
)
}
func
calcIssuanceRecordStatusPrefix
(
status
int32
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-Issuance-record-status:%
d
"
,
status
)
func
calcIssuanceRecordStatusPrefix
(
status
string
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-Issuance-record-status:%
s
"
,
status
)
return
[]
byte
(
key
)
}
...
...
plugin/dapp/issuance/executor/query.go
View file @
adb27358
...
...
@@ -61,81 +61,38 @@ func (c *Issuance) Query_IssuanceByStatus(req *pty.ReqIssuanceByStatus) (types.M
return
ids
,
nil
}
func
(
c
*
Issuance
)
Query_IssuanceByAddr
(
req
*
pty
.
ReqIssuanceByAddr
)
(
types
.
Message
,
error
)
{
ids
:=
&
pty
.
RepIssuanceIDs
{}
issuIDRecords
,
err
:=
queryIssuanceByAddr
(
c
.
GetLocalDB
(),
req
.
Addr
)
func
(
c
*
Issuance
)
Query_IssuanceRecordByID
(
req
*
pty
.
ReqIssuanceDebtInfo
)
(
types
.
Message
,
error
)
{
issuRecord
,
err
:=
queryIssuanceRecordByID
(
c
.
GetStateDB
(),
req
.
IssuanceId
,
req
.
DebtId
)
if
err
!=
nil
{
clog
.
Error
(
"Query_Issuance
ByAddr
"
,
"get issuance record error"
,
err
)
clog
.
Error
(
"Query_Issuance
RecordByID
"
,
"get issuance record error"
,
err
)
return
nil
,
err
}
for
_
,
record
:=
range
issuIDRecords
{
ids
.
IDs
=
append
(
ids
.
IDs
,
record
.
IssuanceId
)
}
return
ids
,
nil
ret
:=
&
pty
.
RepIssuanceDebtInfo
{}
ret
.
Record
=
issuRecord
return
issuRecord
,
nil
}
func
(
c
*
Issuance
)
Query_IssuanceDebtInfoByAddr
(
req
*
pty
.
ReqIssuanceDebtInfoByAddr
)
(
types
.
Message
,
error
)
{
records
,
err
:=
queryIssuanceByAddr
(
c
.
GetLocalDB
(),
req
.
Addr
)
if
err
!=
nil
{
clog
.
Error
(
"Query_IssuanceDebtInfoByAddr"
,
"get issuance record error"
,
err
)
return
nil
,
err
}
ret
:=
&
pty
.
RepIssuanceDebtInfos
{}
for
_
,
record
:=
range
records
{
if
record
.
IssuanceId
==
req
.
IssuanceId
{
issu
,
err
:=
queryIssuanceByID
(
c
.
GetStateDB
(),
record
.
IssuanceId
)
func
(
c
*
Issuance
)
Query_IssuanceRecordsByAddr
(
req
*
pty
.
ReqIssuanceRecordsByAddr
)
(
types
.
Message
,
error
)
{
records
,
err
:=
queryIssuanceRecordByAddr
(
c
.
GetStateDB
(),
c
.
GetLocalDB
(),
req
.
Addr
)
if
err
!=
nil
{
clog
.
Error
(
"Query_IssuanceDebtInfoByAddr"
,
"get issuance record error"
,
err
)
return
nil
,
err
}
for
_
,
borrowRecord
:=
range
issu
.
DebtRecords
{
if
borrowRecord
.
AccountAddr
==
req
.
Addr
{
ret
.
Record
=
append
(
ret
.
Record
,
borrowRecord
)
}
}
for
_
,
borrowRecord
:=
range
issu
.
InvalidRecords
{
if
borrowRecord
.
AccountAddr
==
req
.
Addr
{
ret
.
Record
=
append
(
ret
.
Record
,
borrowRecord
)
}
}
}
}
return
nil
,
pty
.
ErrRecordNotExist
ret
:=
&
pty
.
RepIssuanceRecords
{}
ret
.
Records
=
records
return
ret
,
nil
}
func
(
c
*
Issuance
)
Query_IssuanceDebtInfoByStatus
(
req
*
pty
.
ReqIssuanceDebtInfoByStatus
)
(
types
.
Message
,
error
)
{
records
,
err
:=
queryIssuanceRecordByStatus
(
c
.
GetLocalDB
(),
req
.
Status
)
if
err
!=
nil
{
clog
.
Error
(
"Query_IssuanceDebtInfoByAddr"
,
"get issuance record error"
,
err
)
return
nil
,
err
}
ret
:=
&
pty
.
RepIssuanceDebtInfos
{}
for
_
,
record
:=
range
records
{
issu
,
err
:=
queryIssuanceByID
(
c
.
GetStateDB
(),
record
.
IssuanceId
)
func
(
c
*
Issuance
)
Query_IssuanceRecordsByStatus
(
req
*
pty
.
ReqIssuanceRecordsByStatus
)
(
types
.
Message
,
error
)
{
records
,
err
:=
queryIssuanceRecordsByStatus
(
c
.
GetStateDB
(),
c
.
GetLocalDB
(),
req
.
Status
)
if
err
!=
nil
{
clog
.
Error
(
"Query_IssuanceDebtInfoByAddr"
,
"get issuance record error"
,
err
)
return
nil
,
err
}
for
_
,
borrowRecord
:=
range
issu
.
DebtRecords
{
if
borrowRecord
.
Status
==
req
.
Status
{
ret
.
Record
=
append
(
ret
.
Record
,
borrowRecord
)
}
}
for
_
,
borrowRecord
:=
range
issu
.
InvalidRecords
{
if
borrowRecord
.
Status
==
req
.
Status
{
ret
.
Record
=
append
(
ret
.
Record
,
borrowRecord
)
}
}
}
ret
:=
&
pty
.
RepIssuanceRecords
{}
ret
.
Records
=
records
return
ret
,
nil
}
\ No newline at end of file
plugin/dapp/issuance/proto/issuance.proto
View file @
adb27358
...
...
@@ -19,6 +19,9 @@ message Issuance {
int64
createTime
=
13
;
//创建时间
int64
balance
=
14
;
//剩余可发行ccny
string
issuerAddr
=
15
;
//发行地址
int64
index
=
16
;
//当前索引
int64
preIndex
=
17
;
//上级索引
int64
createIndex
=
18
;
//创建索引,用于close删除状态
}
// 抵押记录
...
...
@@ -33,10 +36,11 @@ message DebtRecord {
int64
liquidateTime
=
8
;
//清算时间
int64
expireTime
=
9
;
//超时清算时间
int32
preStatus
=
10
;
//上一次抵押状态,用于告警恢复
string
debtId
=
11
;
//借贷id
}
// 资产价格记录
message
AssetPriceRecord
{
message
Issuance
AssetPriceRecord
{
int64
recordTime
=
1
;
//价格记录时间
float
btyPrice
=
2
;
//bty价格
}
...
...
@@ -68,13 +72,14 @@ message IssuanceCreate {
// 质押借出
message
IssuanceDebt
{
string
I
ssuanceId
=
1
;
//借贷期数ID
string
i
ssuanceId
=
1
;
//借贷期数ID
int64
value
=
2
;
//借贷价值(ccny)
}
// 质押清算
message
IssuanceRepay
{
string
IssuanceId
=
1
;
//借贷期数ID
string
issuanceId
=
1
;
//借贷期数ID
string
debtId
=
2
;
//借贷ID
}
// 喂价
...
...
@@ -86,24 +91,27 @@ message IssuanceFeed {
// 借贷关闭
message
IssuanceClose
{
string
I
ssuanceId
=
1
;
//借贷期数ID
string
i
ssuanceId
=
1
;
//借贷期数ID
}
// exec_local 借贷信息
message
ReceiptIssuance
{
string
IssuanceId
=
1
;
string
issuanceId
=
1
;
string
accountAddr
=
2
;
int32
status
=
3
;
int32
preStatus
=
4
;
int64
index
=
5
;
int32
recordStatus
=
6
;
string
debtId
=
4
;
int32
recordStatus
=
5
;
int32
recordPreStatus
=
6
;
int64
index
=
7
;
int64
preIndex
=
8
;
}
// exec_local 借贷记录信息
message
IssuanceRecord
{
string
I
ssuanceId
=
1
;
string
i
ssuanceId
=
1
;
string
addr
=
2
;
int64
index
=
3
;
string
debtId
=
3
;
int64
index
=
4
;
}
// exec_local 借贷记录信息列表
...
...
@@ -113,7 +121,7 @@ message IssuanceRecords {
// 根据ID查询一期借贷信息
message
ReqIssuanceInfo
{
string
I
ssuanceId
=
1
;
string
i
ssuanceId
=
1
;
}
// 返回一期借贷信息
...
...
@@ -129,7 +137,7 @@ message RepIssuanceCurrentInfo {
// 根据ID列表查询多期借贷信息
message
ReqIssuanceInfos
{
repeated
string
I
ssuanceIds
=
1
;
repeated
string
i
ssuanceIds
=
1
;
}
// 返回多期借贷信息
...
...
@@ -137,34 +145,40 @@ message RepIssuanceCurrentInfos {
repeated
RepIssuanceCurrentInfo
infos
=
1
;
}
// 根据
借贷
状态查询
// 根据
发行
状态查询
message
ReqIssuanceByStatus
{
int32
status
=
1
;
}
// 根据用户地址查询
message
ReqIssuanceByAddr
{
string
addr
=
1
;
}
// 返回借贷ID列表
message
RepIssuanceIDs
{
repeated
string
IDs
=
1
;
}
// 根据
地址和借贷ID混合查询具体借贷
记录
message
ReqIssuance
DebtInfo
ByAddr
{
string
I
ssuanceId
=
1
;
// 根据
用户地址查询发行
记录
message
ReqIssuance
Records
ByAddr
{
string
i
ssuanceId
=
1
;
string
addr
=
2
;
}
// 根据状态
和借贷ID混合查询具体借贷
记录
message
ReqIssuance
DebtInfo
ByStatus
{
string
I
ssuanceId
=
1
;
// 根据状态
查询发行
记录
message
ReqIssuance
Records
ByStatus
{
string
i
ssuanceId
=
1
;
int32
status
=
2
;
}
// 返回借贷记录
message
RepIssuanceDebtInfos
{
repeated
DebtRecord
record
=
1
;
// 返回记录列表
message
RepIssuanceRecords
{
repeated
DebtRecord
records
=
1
;
}
// 精确查找发行记录
message
ReqIssuanceDebtInfo
{
string
issuanceId
=
1
;
string
debtId
=
2
;
}
// 返回记录
message
RepIssuanceDebtInfo
{
DebtRecord
record
=
1
;
}
plugin/dapp/issuance/types/issuance.pb.go
View file @
adb27358
...
...
@@ -37,6 +37,9 @@ type Issuance struct {
CreateTime
int64
`protobuf:"varint,13,opt,name=createTime,proto3" json:"createTime,omitempty"`
Balance
int64
`protobuf:"varint,14,opt,name=balance,proto3" json:"balance,omitempty"`
IssuerAddr
string
`protobuf:"bytes,15,opt,name=issuerAddr,proto3" json:"issuerAddr,omitempty"`
Index
int64
`protobuf:"varint,16,opt,name=index,proto3" json:"index,omitempty"`
PreIndex
int64
`protobuf:"varint,17,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
CreateIndex
int64
`protobuf:"varint,18,opt,name=createIndex,proto3" json:"createIndex,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -172,6 +175,27 @@ func (m *Issuance) GetIssuerAddr() string {
return
""
}
func
(
m
*
Issuance
)
GetIndex
()
int64
{
if
m
!=
nil
{
return
m
.
Index
}
return
0
}
func
(
m
*
Issuance
)
GetPreIndex
()
int64
{
if
m
!=
nil
{
return
m
.
PreIndex
}
return
0
}
func
(
m
*
Issuance
)
GetCreateIndex
()
int64
{
if
m
!=
nil
{
return
m
.
CreateIndex
}
return
0
}
// 抵押记录
type
DebtRecord
struct
{
AccountAddr
string
`protobuf:"bytes,1,opt,name=accountAddr,proto3" json:"accountAddr,omitempty"`
...
...
@@ -184,6 +208,7 @@ type DebtRecord struct {
LiquidateTime
int64
`protobuf:"varint,8,opt,name=liquidateTime,proto3" json:"liquidateTime,omitempty"`
ExpireTime
int64
`protobuf:"varint,9,opt,name=expireTime,proto3" json:"expireTime,omitempty"`
PreStatus
int32
`protobuf:"varint,10,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
DebtId
string
`protobuf:"bytes,11,opt,name=debtId,proto3" json:"debtId,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -284,8 +309,15 @@ func (m *DebtRecord) GetPreStatus() int32 {
return
0
}
func
(
m
*
DebtRecord
)
GetDebtId
()
string
{
if
m
!=
nil
{
return
m
.
DebtId
}
return
""
}
// 资产价格记录
type
AssetPriceRecord
struct
{
type
Issuance
AssetPriceRecord
struct
{
RecordTime
int64
`protobuf:"varint,1,opt,name=recordTime,proto3" json:"recordTime,omitempty"`
BtyPrice
float32
`protobuf:"fixed32,2,opt,name=btyPrice,proto3" json:"btyPrice,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
...
...
@@ -293,39 +325,39 @@ type AssetPriceRecord struct {
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
AssetPriceRecord
)
Reset
()
{
*
m
=
AssetPriceRecord
{}
}
func
(
m
*
AssetPriceRecord
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
AssetPriceRecord
)
ProtoMessage
()
{}
func
(
*
AssetPriceRecord
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
m
*
IssuanceAssetPriceRecord
)
Reset
()
{
*
m
=
Issuance
AssetPriceRecord
{}
}
func
(
m
*
Issuance
AssetPriceRecord
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Issuance
AssetPriceRecord
)
ProtoMessage
()
{}
func
(
*
Issuance
AssetPriceRecord
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7110f4228953d675
,
[]
int
{
2
}
}
func
(
m
*
AssetPriceRecord
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_AssetPriceRecord
.
Unmarshal
(
m
,
b
)
func
(
m
*
Issuance
AssetPriceRecord
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_
Issuance
AssetPriceRecord
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
AssetPriceRecord
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_AssetPriceRecord
.
Marshal
(
b
,
m
,
deterministic
)
func
(
m
*
Issuance
AssetPriceRecord
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_
Issuance
AssetPriceRecord
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
AssetPriceRecord
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_AssetPriceRecord
.
Merge
(
m
,
src
)
func
(
m
*
Issuance
AssetPriceRecord
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_
Issuance
AssetPriceRecord
.
Merge
(
m
,
src
)
}
func
(
m
*
AssetPriceRecord
)
XXX_Size
()
int
{
return
xxx_messageInfo_AssetPriceRecord
.
Size
(
m
)
func
(
m
*
Issuance
AssetPriceRecord
)
XXX_Size
()
int
{
return
xxx_messageInfo_
Issuance
AssetPriceRecord
.
Size
(
m
)
}
func
(
m
*
AssetPriceRecord
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_AssetPriceRecord
.
DiscardUnknown
(
m
)
func
(
m
*
Issuance
AssetPriceRecord
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_
Issuance
AssetPriceRecord
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_AssetPriceRecord
proto
.
InternalMessageInfo
var
xxx_messageInfo_
Issuance
AssetPriceRecord
proto
.
InternalMessageInfo
func
(
m
*
AssetPriceRecord
)
GetRecordTime
()
int64
{
func
(
m
*
Issuance
AssetPriceRecord
)
GetRecordTime
()
int64
{
if
m
!=
nil
{
return
m
.
RecordTime
}
return
0
}
func
(
m
*
AssetPriceRecord
)
GetBtyPrice
()
float32
{
func
(
m
*
Issuance
AssetPriceRecord
)
GetBtyPrice
()
float32
{
if
m
!=
nil
{
return
m
.
BtyPrice
}
...
...
@@ -586,7 +618,7 @@ func (m *IssuanceCreate) GetPeriod() int64 {
// 质押借出
type
IssuanceDebt
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=
IssuanceId,proto3" json:"I
ssuanceId,omitempty"`
IssuanceId
string
`protobuf:"bytes,1,opt,name=
issuanceId,proto3" json:"i
ssuanceId,omitempty"`
Value
int64
`protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
...
...
@@ -634,7 +666,8 @@ func (m *IssuanceDebt) GetValue() int64 {
// 质押清算
type
IssuanceRepay
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=IssuanceId,proto3" json:"IssuanceId,omitempty"`
IssuanceId
string
`protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
DebtId
string
`protobuf:"bytes,2,opt,name=debtId,proto3" json:"debtId,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -672,6 +705,13 @@ func (m *IssuanceRepay) GetIssuanceId() string {
return
""
}
func
(
m
*
IssuanceRepay
)
GetDebtId
()
string
{
if
m
!=
nil
{
return
m
.
DebtId
}
return
""
}
// 喂价
type
IssuanceFeed
struct
{
CollType
int32
`protobuf:"varint,1,opt,name=collType,proto3" json:"collType,omitempty"`
...
...
@@ -730,7 +770,7 @@ func (m *IssuanceFeed) GetVolume() []int64 {
// 借贷关闭
type
IssuanceClose
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=
IssuanceId,proto3" json:"I
ssuanceId,omitempty"`
IssuanceId
string
`protobuf:"bytes,1,opt,name=
issuanceId,proto3" json:"i
ssuanceId,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -770,12 +810,14 @@ func (m *IssuanceClose) GetIssuanceId() string {
// exec_local 借贷信息
type
ReceiptIssuance
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=
IssuanceId,proto3" json:"I
ssuanceId,omitempty"`
IssuanceId
string
`protobuf:"bytes,1,opt,name=
issuanceId,proto3" json:"i
ssuanceId,omitempty"`
AccountAddr
string
`protobuf:"bytes,2,opt,name=accountAddr,proto3" json:"accountAddr,omitempty"`
Status
int32
`protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
PreStatus
int32
`protobuf:"varint,4,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
Index
int64
`protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
RecordStatus
int32
`protobuf:"varint,6,opt,name=recordStatus,proto3" json:"recordStatus,omitempty"`
DebtId
string
`protobuf:"bytes,4,opt,name=debtId,proto3" json:"debtId,omitempty"`
RecordStatus
int32
`protobuf:"varint,5,opt,name=recordStatus,proto3" json:"recordStatus,omitempty"`
RecordPreStatus
int32
`protobuf:"varint,6,opt,name=recordPreStatus,proto3" json:"recordPreStatus,omitempty"`
Index
int64
`protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"`
PreIndex
int64
`protobuf:"varint,8,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -827,9 +869,23 @@ func (m *ReceiptIssuance) GetStatus() int32 {
return
0
}
func
(
m
*
ReceiptIssuance
)
Get
PreStatus
()
int32
{
func
(
m
*
ReceiptIssuance
)
Get
DebtId
()
string
{
if
m
!=
nil
{
return
m
.
PreStatus
return
m
.
DebtId
}
return
""
}
func
(
m
*
ReceiptIssuance
)
GetRecordStatus
()
int32
{
if
m
!=
nil
{
return
m
.
RecordStatus
}
return
0
}
func
(
m
*
ReceiptIssuance
)
GetRecordPreStatus
()
int32
{
if
m
!=
nil
{
return
m
.
RecordPreStatus
}
return
0
}
...
...
@@ -841,18 +897,19 @@ func (m *ReceiptIssuance) GetIndex() int64 {
return
0
}
func
(
m
*
ReceiptIssuance
)
Get
RecordStatus
()
int32
{
func
(
m
*
ReceiptIssuance
)
Get
PreIndex
()
int64
{
if
m
!=
nil
{
return
m
.
RecordStatus
return
m
.
PreIndex
}
return
0
}
// exec_local 借贷记录信息
type
IssuanceRecord
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=
IssuanceId,proto3" json:"I
ssuanceId,omitempty"`
IssuanceId
string
`protobuf:"bytes,1,opt,name=
issuanceId,proto3" json:"i
ssuanceId,omitempty"`
Addr
string
`protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Index
int64
`protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
DebtId
string
`protobuf:"bytes,3,opt,name=debtId,proto3" json:"debtId,omitempty"`
Index
int64
`protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -897,6 +954,13 @@ func (m *IssuanceRecord) GetAddr() string {
return
""
}
func
(
m
*
IssuanceRecord
)
GetDebtId
()
string
{
if
m
!=
nil
{
return
m
.
DebtId
}
return
""
}
func
(
m
*
IssuanceRecord
)
GetIndex
()
int64
{
if
m
!=
nil
{
return
m
.
Index
...
...
@@ -946,7 +1010,7 @@ func (m *IssuanceRecords) GetRecords() []*IssuanceRecord {
// 根据ID查询一期借贷信息
type
ReqIssuanceInfo
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=
IssuanceId,proto3" json:"I
ssuanceId,omitempty"`
IssuanceId
string
`protobuf:"bytes,1,opt,name=
issuanceId,proto3" json:"i
ssuanceId,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -1074,7 +1138,7 @@ func (m *RepIssuanceCurrentInfo) GetDebtValue() int64 {
// 根据ID列表查询多期借贷信息
type
ReqIssuanceInfos
struct
{
IssuanceIds
[]
string
`protobuf:"bytes,1,rep,name=
IssuanceIds,proto3" json:"I
ssuanceIds,omitempty"`
IssuanceIds
[]
string
`protobuf:"bytes,1,rep,name=
issuanceIds,proto3" json:"i
ssuanceIds,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -1152,7 +1216,7 @@ func (m *RepIssuanceCurrentInfos) GetInfos() []*RepIssuanceCurrentInfo {
return
nil
}
// 根据
借贷
状态查询
// 根据
发行
状态查询
type
ReqIssuanceByStatus
struct
{
Status
int32
`protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
...
...
@@ -1192,46 +1256,6 @@ func (m *ReqIssuanceByStatus) GetStatus() int32 {
return
0
}
// 根据用户地址查询
type
ReqIssuanceByAddr
struct
{
Addr
string
`protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReqIssuanceByAddr
)
Reset
()
{
*
m
=
ReqIssuanceByAddr
{}
}
func
(
m
*
ReqIssuanceByAddr
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqIssuanceByAddr
)
ProtoMessage
()
{}
func
(
*
ReqIssuanceByAddr
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7110f4228953d675
,
[]
int
{
18
}
}
func
(
m
*
ReqIssuanceByAddr
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqIssuanceByAddr
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqIssuanceByAddr
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqIssuanceByAddr
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqIssuanceByAddr
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqIssuanceByAddr
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqIssuanceByAddr
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqIssuanceByAddr
.
Size
(
m
)
}
func
(
m
*
ReqIssuanceByAddr
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqIssuanceByAddr
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqIssuanceByAddr
proto
.
InternalMessageInfo
func
(
m
*
ReqIssuanceByAddr
)
GetAddr
()
string
{
if
m
!=
nil
{
return
m
.
Addr
}
return
""
}
// 返回借贷ID列表
type
RepIssuanceIDs
struct
{
IDs
[]
string
`protobuf:"bytes,1,rep,name=IDs,proto3" json:"IDs,omitempty"`
...
...
@@ -1244,7 +1268,7 @@ func (m *RepIssuanceIDs) Reset() { *m = RepIssuanceIDs{} }
func
(
m
*
RepIssuanceIDs
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RepIssuanceIDs
)
ProtoMessage
()
{}
func
(
*
RepIssuanceIDs
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7110f4228953d675
,
[]
int
{
1
9
}
return
fileDescriptor_7110f4228953d675
,
[]
int
{
1
8
}
}
func
(
m
*
RepIssuanceIDs
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1272,136 +1296,224 @@ func (m *RepIssuanceIDs) GetIDs() []string {
return
nil
}
// 根据
地址和借贷ID混合查询具体借贷
记录
type
ReqIssuance
DebtInfo
ByAddr
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=
IssuanceId,proto3" json:"I
ssuanceId,omitempty"`
// 根据
用户地址查询发行
记录
type
ReqIssuance
Records
ByAddr
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=
issuanceId,proto3" json:"i
ssuanceId,omitempty"`
Addr
string
`protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReqIssuance
DebtInfoByAddr
)
Reset
()
{
*
m
=
ReqIssuanceDebtInfo
ByAddr
{}
}
func
(
m
*
ReqIssuance
DebtInfo
ByAddr
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqIssuance
DebtInfo
ByAddr
)
ProtoMessage
()
{}
func
(
*
ReqIssuance
DebtInfo
ByAddr
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7110f4228953d675
,
[]
int
{
20
}
func
(
m
*
ReqIssuance
RecordsByAddr
)
Reset
()
{
*
m
=
ReqIssuanceRecords
ByAddr
{}
}
func
(
m
*
ReqIssuance
Records
ByAddr
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqIssuance
Records
ByAddr
)
ProtoMessage
()
{}
func
(
*
ReqIssuance
Records
ByAddr
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7110f4228953d675
,
[]
int
{
19
}
}
func
(
m
*
ReqIssuance
DebtInfo
ByAddr
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqIssuance
DebtInfo
ByAddr
.
Unmarshal
(
m
,
b
)
func
(
m
*
ReqIssuance
Records
ByAddr
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqIssuance
Records
ByAddr
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqIssuance
DebtInfo
ByAddr
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqIssuance
DebtInfo
ByAddr
.
Marshal
(
b
,
m
,
deterministic
)
func
(
m
*
ReqIssuance
Records
ByAddr
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqIssuance
Records
ByAddr
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqIssuance
DebtInfo
ByAddr
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqIssuance
DebtInfo
ByAddr
.
Merge
(
m
,
src
)
func
(
m
*
ReqIssuance
Records
ByAddr
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqIssuance
Records
ByAddr
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqIssuance
DebtInfo
ByAddr
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqIssuance
DebtInfo
ByAddr
.
Size
(
m
)
func
(
m
*
ReqIssuance
Records
ByAddr
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqIssuance
Records
ByAddr
.
Size
(
m
)
}
func
(
m
*
ReqIssuance
DebtInfo
ByAddr
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqIssuance
DebtInfo
ByAddr
.
DiscardUnknown
(
m
)
func
(
m
*
ReqIssuance
Records
ByAddr
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqIssuance
Records
ByAddr
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqIssuance
DebtInfo
ByAddr
proto
.
InternalMessageInfo
var
xxx_messageInfo_ReqIssuance
Records
ByAddr
proto
.
InternalMessageInfo
func
(
m
*
ReqIssuance
DebtInfo
ByAddr
)
GetIssuanceId
()
string
{
func
(
m
*
ReqIssuance
Records
ByAddr
)
GetIssuanceId
()
string
{
if
m
!=
nil
{
return
m
.
IssuanceId
}
return
""
}
func
(
m
*
ReqIssuance
DebtInfo
ByAddr
)
GetAddr
()
string
{
func
(
m
*
ReqIssuance
Records
ByAddr
)
GetAddr
()
string
{
if
m
!=
nil
{
return
m
.
Addr
}
return
""
}
// 根据状态
和借贷ID混合查询具体借贷
记录
type
ReqIssuance
DebtInfo
ByStatus
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=
IssuanceId,proto3" json:"I
ssuanceId,omitempty"`
// 根据状态
查询发行
记录
type
ReqIssuance
Records
ByStatus
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=
issuanceId,proto3" json:"i
ssuanceId,omitempty"`
Status
int32
`protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReqIssuance
DebtInfoByStatus
)
Reset
()
{
*
m
=
ReqIssuanceDebtInfo
ByStatus
{}
}
func
(
m
*
ReqIssuance
DebtInfo
ByStatus
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqIssuance
DebtInfo
ByStatus
)
ProtoMessage
()
{}
func
(
*
ReqIssuance
DebtInfo
ByStatus
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7110f4228953d675
,
[]
int
{
2
1
}
func
(
m
*
ReqIssuance
RecordsByStatus
)
Reset
()
{
*
m
=
ReqIssuanceRecords
ByStatus
{}
}
func
(
m
*
ReqIssuance
Records
ByStatus
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqIssuance
Records
ByStatus
)
ProtoMessage
()
{}
func
(
*
ReqIssuance
Records
ByStatus
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7110f4228953d675
,
[]
int
{
2
0
}
}
func
(
m
*
ReqIssuance
DebtInfo
ByStatus
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqIssuance
DebtInfo
ByStatus
.
Unmarshal
(
m
,
b
)
func
(
m
*
ReqIssuance
Records
ByStatus
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqIssuance
Records
ByStatus
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqIssuance
DebtInfo
ByStatus
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqIssuance
DebtInfo
ByStatus
.
Marshal
(
b
,
m
,
deterministic
)
func
(
m
*
ReqIssuance
Records
ByStatus
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqIssuance
Records
ByStatus
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqIssuance
DebtInfo
ByStatus
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqIssuance
DebtInfo
ByStatus
.
Merge
(
m
,
src
)
func
(
m
*
ReqIssuance
Records
ByStatus
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqIssuance
Records
ByStatus
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqIssuance
DebtInfo
ByStatus
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqIssuance
DebtInfo
ByStatus
.
Size
(
m
)
func
(
m
*
ReqIssuance
Records
ByStatus
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqIssuance
Records
ByStatus
.
Size
(
m
)
}
func
(
m
*
ReqIssuance
DebtInfo
ByStatus
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqIssuance
DebtInfo
ByStatus
.
DiscardUnknown
(
m
)
func
(
m
*
ReqIssuance
Records
ByStatus
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqIssuance
Records
ByStatus
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqIssuance
DebtInfo
ByStatus
proto
.
InternalMessageInfo
var
xxx_messageInfo_ReqIssuance
Records
ByStatus
proto
.
InternalMessageInfo
func
(
m
*
ReqIssuance
DebtInfo
ByStatus
)
GetIssuanceId
()
string
{
func
(
m
*
ReqIssuance
Records
ByStatus
)
GetIssuanceId
()
string
{
if
m
!=
nil
{
return
m
.
IssuanceId
}
return
""
}
func
(
m
*
ReqIssuance
DebtInfo
ByStatus
)
GetStatus
()
int32
{
func
(
m
*
ReqIssuance
Records
ByStatus
)
GetStatus
()
int32
{
if
m
!=
nil
{
return
m
.
Status
}
return
0
}
// 返回借贷记录
type
RepIssuanceDebtInfos
struct
{
Record
[]
*
DebtRecord
`protobuf:"bytes,1,rep,name=record,proto3" json:"record,omitempty"`
// 返回记录列表
type
RepIssuanceRecords
struct
{
Records
[]
*
DebtRecord
`protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
RepIssuanceRecords
)
Reset
()
{
*
m
=
RepIssuanceRecords
{}
}
func
(
m
*
RepIssuanceRecords
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RepIssuanceRecords
)
ProtoMessage
()
{}
func
(
*
RepIssuanceRecords
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7110f4228953d675
,
[]
int
{
21
}
}
func
(
m
*
RepIssuanceRecords
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_RepIssuanceRecords
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
RepIssuanceRecords
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_RepIssuanceRecords
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
RepIssuanceRecords
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_RepIssuanceRecords
.
Merge
(
m
,
src
)
}
func
(
m
*
RepIssuanceRecords
)
XXX_Size
()
int
{
return
xxx_messageInfo_RepIssuanceRecords
.
Size
(
m
)
}
func
(
m
*
RepIssuanceRecords
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_RepIssuanceRecords
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_RepIssuanceRecords
proto
.
InternalMessageInfo
func
(
m
*
RepIssuanceRecords
)
GetRecords
()
[]
*
DebtRecord
{
if
m
!=
nil
{
return
m
.
Records
}
return
nil
}
// 精确查找发行记录
type
ReqIssuanceDebtInfo
struct
{
IssuanceId
string
`protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
DebtId
string
`protobuf:"bytes,2,opt,name=debtId,proto3" json:"debtId,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
Re
pIssuanceDebtInfos
)
Reset
()
{
*
m
=
RepIssuanceDebtInfos
{}
}
func
(
m
*
Re
pIssuanceDebtInfos
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Re
pIssuanceDebtInfos
)
ProtoMessage
()
{}
func
(
*
Re
pIssuanceDebtInfos
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
m
*
Re
qIssuanceDebtInfo
)
Reset
()
{
*
m
=
ReqIssuanceDebtInfo
{}
}
func
(
m
*
Re
qIssuanceDebtInfo
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Re
qIssuanceDebtInfo
)
ProtoMessage
()
{}
func
(
*
Re
qIssuanceDebtInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7110f4228953d675
,
[]
int
{
22
}
}
func
(
m
*
RepIssuanceDebtInfos
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_RepIssuanceDebtInfos
.
Unmarshal
(
m
,
b
)
func
(
m
*
ReqIssuanceDebtInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqIssuanceDebtInfo
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqIssuanceDebtInfo
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqIssuanceDebtInfo
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqIssuanceDebtInfo
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqIssuanceDebtInfo
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqIssuanceDebtInfo
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqIssuanceDebtInfo
.
Size
(
m
)
}
func
(
m
*
ReqIssuanceDebtInfo
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqIssuanceDebtInfo
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqIssuanceDebtInfo
proto
.
InternalMessageInfo
func
(
m
*
ReqIssuanceDebtInfo
)
GetIssuanceId
()
string
{
if
m
!=
nil
{
return
m
.
IssuanceId
}
return
""
}
func
(
m
*
ReqIssuanceDebtInfo
)
GetDebtId
()
string
{
if
m
!=
nil
{
return
m
.
DebtId
}
return
""
}
// 返回记录
type
RepIssuanceDebtInfo
struct
{
Record
*
DebtRecord
`protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
RepIssuanceDebtInfo
)
Reset
()
{
*
m
=
RepIssuanceDebtInfo
{}
}
func
(
m
*
RepIssuanceDebtInfo
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RepIssuanceDebtInfo
)
ProtoMessage
()
{}
func
(
*
RepIssuanceDebtInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7110f4228953d675
,
[]
int
{
23
}
}
func
(
m
*
RepIssuanceDebtInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_RepIssuanceDebtInfo
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
RepIssuanceDebtInfo
s
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_RepIssuanceDebtInfo
s
.
Marshal
(
b
,
m
,
deterministic
)
func
(
m
*
RepIssuanceDebtInfo
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_RepIssuanceDebtInfo
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
RepIssuanceDebtInfo
s
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_RepIssuanceDebtInfo
s
.
Merge
(
m
,
src
)
func
(
m
*
RepIssuanceDebtInfo
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_RepIssuanceDebtInfo
.
Merge
(
m
,
src
)
}
func
(
m
*
RepIssuanceDebtInfo
s
)
XXX_Size
()
int
{
return
xxx_messageInfo_RepIssuanceDebtInfo
s
.
Size
(
m
)
func
(
m
*
RepIssuanceDebtInfo
)
XXX_Size
()
int
{
return
xxx_messageInfo_RepIssuanceDebtInfo
.
Size
(
m
)
}
func
(
m
*
RepIssuanceDebtInfo
s
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_RepIssuanceDebtInfo
s
.
DiscardUnknown
(
m
)
func
(
m
*
RepIssuanceDebtInfo
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_RepIssuanceDebtInfo
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_RepIssuanceDebtInfo
s
proto
.
InternalMessageInfo
var
xxx_messageInfo_RepIssuanceDebtInfo
proto
.
InternalMessageInfo
func
(
m
*
RepIssuanceDebtInfo
s
)
GetRecord
()
[]
*
DebtRecord
{
func
(
m
*
RepIssuanceDebtInfo
)
GetRecord
()
*
DebtRecord
{
if
m
!=
nil
{
return
m
.
Record
}
...
...
@@ -1411,7 +1523,7 @@ func (m *RepIssuanceDebtInfos) GetRecord() []*DebtRecord {
func
init
()
{
proto
.
RegisterType
((
*
Issuance
)(
nil
),
"types.Issuance"
)
proto
.
RegisterType
((
*
DebtRecord
)(
nil
),
"types.DebtRecord"
)
proto
.
RegisterType
((
*
AssetPriceRecord
)(
nil
),
"types.
AssetPriceRecord"
)
proto
.
RegisterType
((
*
IssuanceAssetPriceRecord
)(
nil
),
"types.Issuance
AssetPriceRecord"
)
proto
.
RegisterType
((
*
IssuanceAction
)(
nil
),
"types.IssuanceAction"
)
proto
.
RegisterType
((
*
IssuanceManage
)(
nil
),
"types.IssuanceManage"
)
proto
.
RegisterType
((
*
IssuanceCreate
)(
nil
),
"types.IssuanceCreate"
)
...
...
@@ -1427,78 +1539,83 @@ func init() {
proto
.
RegisterType
((
*
ReqIssuanceInfos
)(
nil
),
"types.ReqIssuanceInfos"
)
proto
.
RegisterType
((
*
RepIssuanceCurrentInfos
)(
nil
),
"types.RepIssuanceCurrentInfos"
)
proto
.
RegisterType
((
*
ReqIssuanceByStatus
)(
nil
),
"types.ReqIssuanceByStatus"
)
proto
.
RegisterType
((
*
ReqIssuanceByAddr
)(
nil
),
"types.ReqIssuanceByAddr"
)
proto
.
RegisterType
((
*
RepIssuanceIDs
)(
nil
),
"types.RepIssuanceIDs"
)
proto
.
RegisterType
((
*
ReqIssuanceDebtInfoByAddr
)(
nil
),
"types.ReqIssuanceDebtInfoByAddr"
)
proto
.
RegisterType
((
*
ReqIssuanceDebtInfoByStatus
)(
nil
),
"types.ReqIssuanceDebtInfoByStatus"
)
proto
.
RegisterType
((
*
RepIssuanceDebtInfos
)(
nil
),
"types.RepIssuanceDebtInfos"
)
proto
.
RegisterType
((
*
ReqIssuanceRecordsByAddr
)(
nil
),
"types.ReqIssuanceRecordsByAddr"
)
proto
.
RegisterType
((
*
ReqIssuanceRecordsByStatus
)(
nil
),
"types.ReqIssuanceRecordsByStatus"
)
proto
.
RegisterType
((
*
RepIssuanceRecords
)(
nil
),
"types.RepIssuanceRecords"
)
proto
.
RegisterType
((
*
ReqIssuanceDebtInfo
)(
nil
),
"types.ReqIssuanceDebtInfo"
)
proto
.
RegisterType
((
*
RepIssuanceDebtInfo
)(
nil
),
"types.RepIssuanceDebtInfo"
)
}
func
init
()
{
proto
.
RegisterFile
(
"issuance.proto"
,
fileDescriptor_7110f4228953d675
)
}
var
fileDescriptor_7110f4228953d675
=
[]
byte
{
// 996 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00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xb2
,
0x4e
,
0xb8
,
0x97
,
0xd0
,
0x57
,
0x07
,
0xea
,
0x57
,
0xc3
,
0x8a
,
0x8c
,
0x34
,
0xe0
,
0xae
,
0x4f
,
0xff
,
0xf3
,
0x5c
,
0xfc
,
0x13
,
0x00
,
0x00
,
0xff
,
0xff
,
0x80
,
0xd9
,
0xe6
,
0x0e
,
0x05
,
0x0d
,
0x00
,
0x00
,
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment