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
59b1cbdc
Commit
59b1cbdc
authored
Oct 22, 2018
by
任硕
Committed by
linj
Nov 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unfreeze exec/del local
parent
8de1b924
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
231 additions
and
160 deletions
+231
-160
action.go
executor/action.go
+7
-24
exec_del_local.go
executor/exec_del_local.go
+17
-2
exec_local.go
executor/exec_local.go
+17
-2
query.go
executor/query.go
+2
-2
unfreeze.go
executor/unfreeze.go
+18
-0
unfreeze.proto
proto/unfreeze.proto
+3
-10
const.go
types/const.go
+8
-8
types.go
types/types.go
+111
-35
unfreeze.pb.go
types/unfreeze.pb.go
+48
-77
No files found.
executor/action.go
View file @
59b1cbdc
...
...
@@ -61,7 +61,7 @@ func (a *action) UnfreezeCreate(create *uf.UnfreezeCreate) (*types.Receipt, erro
k
:=
[]
byte
(
unfreezeID
)
v
:=
types
.
Encode
(
unfreeze
)
kv
=
append
(
kv
,
&
types
.
KeyValue
{
k
,
v
})
receiptLog
:=
a
.
get
Creat
eLog
(
unfreeze
)
receiptLog
:=
a
.
get
Unfreez
eLog
(
unfreeze
)
logs
=
append
(
logs
,
receiptLog
)
return
&
types
.
Receipt
{
types
.
ExecOk
,
kv
,
logs
},
nil
}
...
...
@@ -103,7 +103,7 @@ func (a *action) UnfreezeWithdraw(withdraw *uf.UnfreezeWithdraw) (*types.Receipt
unfreeze
.
WithdrawTimes
+=
int32
(
reaTimes
)
unfreeze
.
Remaining
-=
available
a
.
saveStateDB
(
&
unfreeze
)
receiptLog
:=
a
.
get
Withdraw
Log
(
&
unfreeze
)
receiptLog
:=
a
.
get
Unfreeze
Log
(
&
unfreeze
)
logs
=
append
(
logs
,
receiptLog
)
k
:=
[]
byte
(
withdraw
.
UnfreezeID
)
v
:=
types
.
Encode
(
&
unfreeze
)
...
...
@@ -147,7 +147,7 @@ func (a *action) UnfreezeTerminate(terminate *uf.UnfreezeTerminate) (*types.Rece
kv
=
append
(
kv
,
receipt
.
KV
...
)
unfreeze
.
Remaining
=
0
a
.
saveStateDB
(
&
unfreeze
)
receiptLog
:=
a
.
get
Terminat
eLog
(
&
unfreeze
)
receiptLog
:=
a
.
get
Unfreez
eLog
(
&
unfreeze
)
logs
=
append
(
logs
,
receiptLog
)
k
:=
[]
byte
(
terminate
.
UnfreezeID
)
v
:=
types
.
Encode
(
&
unfreeze
)
...
...
@@ -165,37 +165,20 @@ func key(id string) (keys []byte) {
return
keys
}
func
(
a
*
action
)
get
Creat
eLog
(
unfreeze
*
uf
.
Unfreeze
)
*
types
.
ReceiptLog
{
func
(
a
*
action
)
get
Unfreez
eLog
(
unfreeze
*
uf
.
Unfreeze
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
uf
.
TyLogCreateUnfreeze
r
:=
&
uf
.
Receipt
Creat
e
{}
r
:=
&
uf
.
Receipt
Unfreez
e
{}
r
.
UnfreezeID
=
unfreeze
.
UnfreezeID
r
.
Initiator
=
unfreeze
.
Initiator
log
.
Log
=
types
.
Encode
(
r
)
return
log
}
func
(
a
*
action
)
getWithdrawLog
(
unfreeze
*
uf
.
Unfreeze
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
uf
.
TyLogCreateUnfreeze
r
:=
&
uf
.
ReceiptWithdraw
{}
r
.
WithdrawTimes
=
unfreeze
.
WithdrawTimes
r
.
Beneficiary
=
unfreeze
.
Beneficiary
log
.
Log
=
types
.
Encode
(
r
)
return
log
}
func
(
a
*
action
)
getTerminateLog
(
unfreeze
*
uf
.
Unfreeze
)
*
types
.
ReceiptLog
{
log
:=
&
types
.
ReceiptLog
{}
log
.
Ty
=
uf
.
TyLogCreateUnfreeze
r
:=
&
uf
.
ReceiptTerminate
{}
r
.
UnfreezeID
=
unfreeze
.
UnfreezeID
r
.
TokenName
=
unfreeze
.
TokenName
log
.
Log
=
types
.
Encode
(
r
)
return
log
}
//查询可提币状态
func
QueryWithdraw
(
stateDB
dbm
.
KV
,
param
*
uf
.
QueryUnfreezeWithdraw
)
(
types
.
Message
,
error
)
{
func
Query
Unfreeze
Withdraw
(
stateDB
dbm
.
KV
,
param
*
uf
.
QueryUnfreezeWithdraw
)
(
types
.
Message
,
error
)
{
//查询提币次数
//计算当前可否提币
unfreezeID
:=
param
.
UnfreezeID
...
...
executor/exec_del_local.go
View file @
59b1cbdc
...
...
@@ -6,9 +6,24 @@ import (
)
func
(
u
*
Unfreeze
)
execDelLocal
(
receiptData
*
types
.
ReceiptData
)
(
*
types
.
LocalDBSet
,
error
)
{
dbSet
:=
&
types
.
LocalDBSet
{}
if
receiptData
.
GetTy
()
!=
types
.
ExecOk
{
return
dbSet
,
nil
}
for
_
,
log
:=
range
receiptData
.
Logs
{
switch
log
.
Ty
{
case
uf
.
TyLogCreateUnfreeze
,
uf
.
TyLogWithdrawUnfreeze
,
uf
.
TyLogTerminateUnfreeze
:
var
receipt
uf
.
ReceiptUnfreeze
err
:=
types
.
Decode
(
log
.
Log
,
&
receipt
)
if
err
!=
nil
{
return
nil
,
err
}
kv
:=
u
.
rollbackUnfreezeCreate
(
&
receipt
)
dbSet
.
KV
=
append
(
dbSet
.
KV
,
kv
...
)
default
:
return
nil
,
types
.
ErrNotSupport
}
}
return
dbSet
,
nil
}
...
...
executor/exec_local.go
View file @
59b1cbdc
...
...
@@ -6,9 +6,24 @@ import (
)
func
(
u
*
Unfreeze
)
execLocal
(
receiptData
*
types
.
ReceiptData
)
(
*
types
.
LocalDBSet
,
error
)
{
dbSet
:=
&
types
.
LocalDBSet
{}
if
receiptData
.
GetTy
()
!=
types
.
ExecOk
{
return
dbSet
,
nil
}
for
_
,
log
:=
range
receiptData
.
Logs
{
switch
log
.
Ty
{
case
uf
.
TyLogCreateUnfreeze
,
uf
.
TyLogWithdrawUnfreeze
,
uf
.
TyLogTerminateUnfreeze
:
var
receipt
uf
.
ReceiptUnfreeze
err
:=
types
.
Decode
(
log
.
Log
,
&
receipt
)
if
err
!=
nil
{
return
nil
,
err
}
kv
:=
u
.
saveUnfreezeCreate
(
&
receipt
)
dbSet
.
KV
=
append
(
dbSet
.
KV
,
kv
...
)
default
:
return
nil
,
types
.
ErrNotSupport
}
}
return
dbSet
,
nil
}
...
...
executor/query.go
View file @
59b1cbdc
...
...
@@ -5,6 +5,6 @@ import (
"gitlab.33.cn/chain33/chain33/types"
)
func
(
u
*
Unfreeze
)
Query_QueryWithdraw
(
in
*
uf
.
QueryUnfreezeWithdraw
)
(
types
.
Message
,
error
)
{
return
QueryWithdraw
(
u
.
GetStateDB
(),
in
)
func
(
u
*
Unfreeze
)
Query_Query
Unfreeze
Withdraw
(
in
*
uf
.
QueryUnfreezeWithdraw
)
(
types
.
Message
,
error
)
{
return
Query
Unfreeze
Withdraw
(
u
.
GetStateDB
(),
in
)
}
executor/unfreeze.go
View file @
59b1cbdc
package
executor
import
(
"fmt"
log
"github.com/inconshreveable/log15"
uf
"gitlab.33.cn/chain33/chain33/plugin/dapp/unfreeze/types"
drivers
"gitlab.33.cn/chain33/chain33/system/dapp"
...
...
@@ -38,3 +40,19 @@ func GetName() string {
func
(
u
*
Unfreeze
)
GetDriverName
()
string
{
return
driverName
}
func
(
u
*
Unfreeze
)
saveUnfreezeCreate
(
res
*
uf
.
ReceiptUnfreeze
)
(
kvs
[]
*
types
.
KeyValue
)
{
kv
:=
&
types
.
KeyValue
{}
kv
.
Key
=
[]
byte
(
fmt
.
Sprintf
(
"mavl-unfreeze-"
+
"%s-"
+
"%s-"
+
"%s"
,
res
.
Initiator
,
res
.
Beneficiary
,
res
.
TokenName
))
kv
.
Value
=
[]
byte
(
res
.
UnfreezeID
)
kvs
=
append
(
kvs
,
kv
)
return
kvs
}
func
(
u
*
Unfreeze
)
rollbackUnfreezeCreate
(
res
*
uf
.
ReceiptUnfreeze
)
(
kvs
[]
*
types
.
KeyValue
)
{
kv
:=
&
types
.
KeyValue
{}
kv
.
Key
=
[]
byte
(
fmt
.
Sprintf
(
"mavl-unfreeze-"
+
"%s-"
+
"%s-"
+
"%s"
,
res
.
Initiator
,
res
.
Beneficiary
,
res
.
TokenName
))
kv
.
Value
=
[]
byte
(
res
.
UnfreezeID
)
kvs
=
append
(
kvs
,
kv
)
return
kvs
}
proto/unfreeze.proto
View file @
59b1cbdc
...
...
@@ -57,18 +57,11 @@ message UnfreezeTerminate {
}
// receipt
message
Receipt
Creat
e
{
message
Receipt
Unfreez
e
{
string
unfreezeID
=
1
;
string
initiator
=
2
;
}
message
ReceiptWithdraw
{
int32
withdrawTimes
=
1
;
string
beneficiary
=
3
;
}
message
ReceiptTerminate
{
string
unfreezeID
=
1
;
string
beneficiary
=
3
;
string
tokenName
=
4
;
}
// query
...
...
types/const.go
View file @
59b1cbdc
...
...
@@ -22,12 +22,12 @@ var (
ExecerUnfreeze
=
[]
byte
(
UnfreezeX
)
)
//
const (
//
Action_CreateUnfreeze = "createUnfreeze"
//
Action_WithdrawUnfreeze = "withdrawUnfreeze"
//
Action_TerminateUnfreeze = "terminateUnfreeze"
//
)
const
(
Action_CreateUnfreeze
=
"createUnfreeze"
Action_WithdrawUnfreeze
=
"withdrawUnfreeze"
Action_TerminateUnfreeze
=
"terminateUnfreeze"
)
//
const (
// FuncName_QueryXXX = "QueryXXX
"
//
)
const
(
FuncName_QueryUnfreezeWithdraw
=
"QueryUnfreezeWithdraw
"
)
types/types.go
View file @
59b1cbdc
package
types
import
(
"encoding/json"
"math/rand"
"reflect"
"time"
log
"github.com/inconshreveable/log15"
"gitlab.33.cn/chain33/chain33/common/address"
"gitlab.33.cn/chain33/chain33/types"
)
...
...
@@ -35,9 +39,9 @@ type UnfreezeType struct {
func
(
u
*
UnfreezeType
)
GetLogMap
()
map
[
int64
]
*
types
.
LogInfo
{
return
map
[
int64
]
*
types
.
LogInfo
{
TyLogCreateUnfreeze
:
{
reflect
.
TypeOf
(
Receipt
Creat
e
{}),
"LogCreateUnfreeze"
},
TyLogWithdrawUnfreeze
:
{
reflect
.
TypeOf
(
Receipt
Withdraw
{}),
"LogWithdrawUnfreeze"
},
TyLogTerminateUnfreeze
:
{
reflect
.
TypeOf
(
Receipt
Terminat
e
{}),
"LogTerminateUnfreeze"
},
TyLogCreateUnfreeze
:
{
reflect
.
TypeOf
(
Receipt
Unfreez
e
{}),
"LogCreateUnfreeze"
},
TyLogWithdrawUnfreeze
:
{
reflect
.
TypeOf
(
Receipt
Unfreeze
{}),
"LogWithdrawUnfreeze"
},
TyLogTerminateUnfreeze
:
{
reflect
.
TypeOf
(
Receipt
Unfreez
e
{}),
"LogTerminateUnfreeze"
},
}
}
...
...
@@ -53,35 +57,107 @@ func (u *UnfreezeType) GetTypeMap() map[string]int32 {
}
}
////创建解冻相关交易
//func (u UnfreezeType) CreateTx(action string, message json.RawMessage) (*types.Transaction, error) {
// tlog.Debug("UnfreezeType.CreateTx", "action", action)
// if action == Action_CreateUnfreeze {
// var param UnfreezeCreate
// err := json.Unmarshal(message, ¶m)
// if err != nil {
// tlog.Error("CreateTx", "Error", err)
// return nil, types.ErrInputPara
// }
// return CreateRawGamePreCreateTx(¶m)
// } else if action == Action_WithdrawUnfreeze {
// var param UnfreezeWithdraw
// err := json.Unmarshal(message, ¶m)
// if err != nil {
// tlog.Error("CreateTx", "Error", err)
// return nil, types.ErrInputPara
// }
// return CreateRawGamePreMatchTx(¶m)
// } else if action == Action_TerminateUnfreeze {
// var param UnfreezeTerminate
// err := json.Unmarshal(message, ¶m)
// if err != nil {
// tlog.Error("CreateTx", "Error", err)
// return nil, types.ErrInputPara
// }
// return CreateRawGamePreCancelTx(¶m)
// } else {
// return nil, types.ErrNotSupport
// }
// return nil, nil
//}
// TODO createTx接口暂时没法用,作为一个预留接口
func
(
u
UnfreezeType
)
CreateTx
(
action
string
,
message
json
.
RawMessage
)
(
*
types
.
Transaction
,
error
)
{
tlog
.
Debug
(
"UnfreezeType.CreateTx"
,
"action"
,
action
)
if
action
==
Action_CreateUnfreeze
{
var
param
UnfreezeCreate
err
:=
json
.
Unmarshal
(
message
,
&
param
)
if
err
!=
nil
{
tlog
.
Error
(
"CreateTx"
,
"Error"
,
err
)
return
nil
,
types
.
ErrInputPara
}
return
CreateUnfreezeCreateTx
(
&
param
)
}
else
if
action
==
Action_WithdrawUnfreeze
{
var
param
UnfreezeWithdraw
err
:=
json
.
Unmarshal
(
message
,
&
param
)
if
err
!=
nil
{
tlog
.
Error
(
"CreateTx"
,
"Error"
,
err
)
return
nil
,
types
.
ErrInputPara
}
return
CreateUnfreezeWithdrawTx
(
&
param
)
}
else
if
action
==
Action_TerminateUnfreeze
{
var
param
UnfreezeTerminate
err
:=
json
.
Unmarshal
(
message
,
&
param
)
if
err
!=
nil
{
tlog
.
Error
(
"CreateTx"
,
"Error"
,
err
)
return
nil
,
types
.
ErrInputPara
}
return
CreateUnfreezeTerminateTx
(
&
param
)
}
else
{
return
nil
,
types
.
ErrNotSupport
}
return
nil
,
nil
}
func
CreateUnfreezeCreateTx
(
parm
*
UnfreezeCreate
)
(
*
types
.
Transaction
,
error
)
{
if
parm
==
nil
{
tlog
.
Error
(
"CreateUnfreezeCreateTx"
,
"parm"
,
parm
)
return
nil
,
types
.
ErrInvalidParam
}
v
:=
&
UnfreezeCreate
{
StartTime
:
parm
.
StartTime
,
TokenName
:
parm
.
TokenName
,
TotalCount
:
parm
.
TotalCount
,
Beneficiary
:
parm
.
Beneficiary
,
Period
:
parm
.
Period
,
Means
:
parm
.
Means
,
Amount
:
parm
.
Amount
,
}
create
:=
&
UnfreezeAction
{
Ty
:
UnfreezeActionCreate
,
Value
:
&
UnfreezeAction_Create
{
v
},
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
getRealExecName
(
types
.
GetParaName
())),
Payload
:
types
.
Encode
(
create
),
Nonce
:
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()))
.
Int63
(),
To
:
address
.
ExecAddress
(
getRealExecName
(
types
.
GetParaName
())),
}
tx
.
SetRealFee
(
types
.
MinFee
)
return
tx
,
nil
}
func
CreateUnfreezeWithdrawTx
(
parm
*
UnfreezeWithdraw
)
(
*
types
.
Transaction
,
error
)
{
if
parm
==
nil
{
tlog
.
Error
(
"CreateUnfreezeWithdrawTx"
,
"parm"
,
parm
)
return
nil
,
types
.
ErrInvalidParam
}
v
:=
&
UnfreezeWithdraw
{
UnfreezeID
:
parm
.
UnfreezeID
,
}
withdraw
:=
&
UnfreezeAction
{
Ty
:
UnfreezeActionWithdraw
,
Value
:
&
UnfreezeAction_Withdraw
{
v
},
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
getRealExecName
(
types
.
GetParaName
())),
Payload
:
types
.
Encode
(
withdraw
),
Nonce
:
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()))
.
Int63
(),
To
:
address
.
ExecAddress
(
getRealExecName
(
types
.
GetParaName
())),
}
tx
.
SetRealFee
(
types
.
MinFee
)
return
tx
,
nil
}
func
CreateUnfreezeTerminateTx
(
parm
*
UnfreezeTerminate
)
(
*
types
.
Transaction
,
error
)
{
if
parm
==
nil
{
tlog
.
Error
(
"CreateUnfreezeTerminateTx"
,
"parm"
,
parm
)
return
nil
,
types
.
ErrInvalidParam
}
v
:=
&
UnfreezeTerminate
{
UnfreezeID
:
parm
.
UnfreezeID
,
}
terminate
:=
&
UnfreezeAction
{
Ty
:
UnfreezeActionTerminate
,
Value
:
&
UnfreezeAction_Terminate
{
v
},
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
getRealExecName
(
types
.
GetParaName
())),
Payload
:
types
.
Encode
(
terminate
),
Nonce
:
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()))
.
Int63
(),
To
:
address
.
ExecAddress
(
getRealExecName
(
types
.
GetParaName
())),
}
tx
.
SetRealFee
(
types
.
MinFee
)
return
tx
,
nil
}
types/unfreeze.pb.go
View file @
59b1cbdc
...
...
@@ -13,9 +13,7 @@ It has these top-level messages:
UnfreezeCreate
UnfreezeWithdraw
UnfreezeTerminate
ReceiptCreate
ReceiptWithdraw
ReceiptTerminate
ReceiptUnfreeze
QueryUnfreezeWithdraw
ReplyQueryUnfreezeWithdraw
*/
...
...
@@ -402,66 +400,42 @@ func (m *UnfreezeTerminate) GetUnfreezeID() string {
}
// receipt
type
ReceiptCreate
struct
{
UnfreezeID
string
`protobuf:"bytes,1,opt,name=unfreezeID" json:"unfreezeID,omitempty"`
Initiator
string
`protobuf:"bytes,2,opt,name=initiator" json:"initiator,omitempty"`
type
ReceiptUnfreeze
struct
{
UnfreezeID
string
`protobuf:"bytes,1,opt,name=unfreezeID" json:"unfreezeID,omitempty"`
Initiator
string
`protobuf:"bytes,2,opt,name=initiator" json:"initiator,omitempty"`
Beneficiary
string
`protobuf:"bytes,3,opt,name=beneficiary" json:"beneficiary,omitempty"`
TokenName
string
`protobuf:"bytes,4,opt,name=tokenName" json:"tokenName,omitempty"`
}
func
(
m
*
Receipt
Create
)
Reset
()
{
*
m
=
ReceiptCreat
e
{}
}
func
(
m
*
Receipt
Creat
e
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Receipt
Creat
e
)
ProtoMessage
()
{}
func
(
*
Receipt
Creat
e
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
5
}
}
func
(
m
*
Receipt
Unfreeze
)
Reset
()
{
*
m
=
ReceiptUnfreez
e
{}
}
func
(
m
*
Receipt
Unfreez
e
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Receipt
Unfreez
e
)
ProtoMessage
()
{}
func
(
*
Receipt
Unfreez
e
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
5
}
}
func
(
m
*
Receipt
Creat
e
)
GetUnfreezeID
()
string
{
func
(
m
*
Receipt
Unfreez
e
)
GetUnfreezeID
()
string
{
if
m
!=
nil
{
return
m
.
UnfreezeID
}
return
""
}
func
(
m
*
Receipt
Creat
e
)
GetInitiator
()
string
{
func
(
m
*
Receipt
Unfreez
e
)
GetInitiator
()
string
{
if
m
!=
nil
{
return
m
.
Initiator
}
return
""
}
type
ReceiptWithdraw
struct
{
WithdrawTimes
int32
`protobuf:"varint,1,opt,name=withdrawTimes" json:"withdrawTimes,omitempty"`
Beneficiary
string
`protobuf:"bytes,3,opt,name=beneficiary" json:"beneficiary,omitempty"`
}
func
(
m
*
ReceiptWithdraw
)
Reset
()
{
*
m
=
ReceiptWithdraw
{}
}
func
(
m
*
ReceiptWithdraw
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReceiptWithdraw
)
ProtoMessage
()
{}
func
(
*
ReceiptWithdraw
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
6
}
}
func
(
m
*
ReceiptWithdraw
)
GetWithdrawTimes
()
int32
{
if
m
!=
nil
{
return
m
.
WithdrawTimes
}
return
0
}
func
(
m
*
ReceiptWithdraw
)
GetBeneficiary
()
string
{
func
(
m
*
ReceiptUnfreeze
)
GetBeneficiary
()
string
{
if
m
!=
nil
{
return
m
.
Beneficiary
}
return
""
}
type
ReceiptTerminate
struct
{
UnfreezeID
string
`protobuf:"bytes,1,opt,name=unfreezeID" json:"unfreezeID,omitempty"`
}
func
(
m
*
ReceiptTerminate
)
Reset
()
{
*
m
=
ReceiptTerminate
{}
}
func
(
m
*
ReceiptTerminate
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReceiptTerminate
)
ProtoMessage
()
{}
func
(
*
ReceiptTerminate
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
7
}
}
func
(
m
*
ReceiptTerminate
)
GetUnfreezeID
()
string
{
func
(
m
*
ReceiptUnfreeze
)
GetTokenName
()
string
{
if
m
!=
nil
{
return
m
.
UnfreezeID
return
m
.
TokenName
}
return
""
}
...
...
@@ -474,7 +448,7 @@ type QueryUnfreezeWithdraw struct {
func
(
m
*
QueryUnfreezeWithdraw
)
Reset
()
{
*
m
=
QueryUnfreezeWithdraw
{}
}
func
(
m
*
QueryUnfreezeWithdraw
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
QueryUnfreezeWithdraw
)
ProtoMessage
()
{}
func
(
*
QueryUnfreezeWithdraw
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
8
}
}
func
(
*
QueryUnfreezeWithdraw
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
6
}
}
func
(
m
*
QueryUnfreezeWithdraw
)
GetUnfreezeID
()
string
{
if
m
!=
nil
{
...
...
@@ -491,7 +465,7 @@ type ReplyQueryUnfreezeWithdraw struct {
func
(
m
*
ReplyQueryUnfreezeWithdraw
)
Reset
()
{
*
m
=
ReplyQueryUnfreezeWithdraw
{}
}
func
(
m
*
ReplyQueryUnfreezeWithdraw
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyQueryUnfreezeWithdraw
)
ProtoMessage
()
{}
func
(
*
ReplyQueryUnfreezeWithdraw
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
9
}
}
func
(
*
ReplyQueryUnfreezeWithdraw
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
7
}
}
func
(
m
*
ReplyQueryUnfreezeWithdraw
)
GetUnfreezeID
()
string
{
if
m
!=
nil
{
...
...
@@ -513,9 +487,7 @@ func init() {
proto
.
RegisterType
((
*
UnfreezeCreate
)(
nil
),
"types.UnfreezeCreate"
)
proto
.
RegisterType
((
*
UnfreezeWithdraw
)(
nil
),
"types.UnfreezeWithdraw"
)
proto
.
RegisterType
((
*
UnfreezeTerminate
)(
nil
),
"types.UnfreezeTerminate"
)
proto
.
RegisterType
((
*
ReceiptCreate
)(
nil
),
"types.ReceiptCreate"
)
proto
.
RegisterType
((
*
ReceiptWithdraw
)(
nil
),
"types.ReceiptWithdraw"
)
proto
.
RegisterType
((
*
ReceiptTerminate
)(
nil
),
"types.ReceiptTerminate"
)
proto
.
RegisterType
((
*
ReceiptUnfreeze
)(
nil
),
"types.ReceiptUnfreeze"
)
proto
.
RegisterType
((
*
QueryUnfreezeWithdraw
)(
nil
),
"types.QueryUnfreezeWithdraw"
)
proto
.
RegisterType
((
*
ReplyQueryUnfreezeWithdraw
)(
nil
),
"types.ReplyQueryUnfreezeWithdraw"
)
}
...
...
@@ -523,35 +495,34 @@ func init() {
func
init
()
{
proto
.
RegisterFile
(
"unfreeze.proto"
,
fileDescriptor0
)
}
var
fileDescriptor0
=
[]
byte
{
// 480 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0x9c
,
0x54
,
0xc1
,
0x6e
,
0xd3
,
0x40
,
0x10
,
0x8d
,
0xed
,
0xda
,
0x49
,
0x26
,
0x6a
,
0x0a
,
0x2b
,
0x0a
,
0x2b
,
0x84
,
0x50
,
0x64
,
0x71
,
0xc8
,
0x29
,
0x48
,
0xa9
,
0x10
,
0x5c
,
0x4b
,
0x39
,
0x84
,
0x03
,
0x48
,
0xac
,
0x8a
,
0x10
,
0xc7
,
0x4d
,
0x3a
,
0x81
,
0x15
,
0xf6
,
0xda
,
0xda
,
0x4c
,
0x5a
,
0x99
,
0x5f
,
0xe4
,
0xc2
,
0x81
,
0x0f
,
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
,
0x34
,
0x82
,
0x6e
,
0x1f
,
0x0a
,
0x3a
,
0xbc
,
0x3f
,
0xe8
,
0xe8
,
0xfe
,
0xa0
,
0x3b
,
0xf5
,
0xa0
,
0xe3
,
0x09
,
0x3c
,
0x6e
,
0x3a
,
0x79
,
0xac
,
0xfd
,
0xe3
,
0x0b
,
0x78
,
0xb2
,
0xe7
,
0xe2
,
0x51
,
0xd1
,
0x6f
,
0x0f
,
0xce
,
0x04
,
0xce
,
0x51
,
0xe5
,
0x74
,
0xca
,
0x9c
,
0x6d
,
0x67
,
0xc1
,
0x3f
,
0x32
,
0x0b
,
0xc1
,
0xbe
,
0x45
,
0x3b
,
0x11
,
0xb4
,
0x1b
,
0x11
,
0xc4
,
0xef
,
0xe0
,
0xfc
,
0xcb
,
0x0a
,
0x4d
,
0x71
,
0xf2
,
0xfb
,
0x17
,
0xf0
,
0x42
,
0x60
,
0x9e
,
0x14
,
0x0f
,
0x52
,
0xb3
,
0x11
,
0x9c
,
0xc9
,
0x5b
,
0xa9
,
0x12
,
0x39
,
0x4b
,
0xf0
,
0xd2
,
0x45
,
0xe2
,
0xbe
,
0x90
,
0x26
,
0x3c
,
0x8b
,
0xec
,
0x0f
,
0x75
,
0xf1
,
0x3f
,
0x00
,
0x00
,
0xff
,
0xff
,
0xb1
,
0x2c
,
0x93
,
0xab
,
0xb3
,
0x04
,
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