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
8898b5a7
Commit
8898b5a7
authored
Nov 29, 2018
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update chain33 to master
parent
ed27051b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
36 additions
and
36 deletions
+36
-36
paracross.go
plugin/dapp/paracross/commands/paracross.go
+2
-2
privacy.go
plugin/dapp/privacy/wallet/privacy.go
+3
-3
token.go
plugin/dapp/token/commands/token.go
+0
-1
utils.go
plugin/dapp/token/commands/utils.go
+2
-2
init.go
plugin/init.go
+2
-1
mock_wallet_test.go
vendor/github.com/33cn/chain33/client/mock_wallet_test.go
+1
-1
queueprotocol_test.go
vendor/github.com/33cn/chain33/client/queueprotocol_test.go
+1
-1
updateinit.go
.../github.com/33cn/chain33/cmd/tools/strategy/updateinit.go
+1
-1
write.go
vendor/github.com/33cn/chain33/cmd/write/write.go
+1
-1
client_test.go
vendor/github.com/33cn/chain33/rpc/client_test.go
+3
-3
jrpchandler_test.go
vendor/github.com/33cn/chain33/rpc/jrpchandler_test.go
+1
-1
bty.go
vendor/github.com/33cn/chain33/system/dapp/commands/bty.go
+3
-3
utils.go
...thub.com/33cn/chain33/system/dapp/commands/types/utils.go
+4
-4
transaction.proto
vendor/github.com/33cn/chain33/types/proto/transaction.proto
+4
-4
wallet.proto
vendor/github.com/33cn/chain33/types/proto/wallet.proto
+2
-2
transaction.pb.go
vendor/github.com/33cn/chain33/types/transaction.pb.go
+0
-0
wallet.pb.go
vendor/github.com/33cn/chain33/types/wallet.pb.go
+0
-0
sendtx.go
vendor/github.com/33cn/chain33/wallet/sendtx.go
+1
-1
wallet_proc.go
vendor/github.com/33cn/chain33/wallet/wallet_proc.go
+2
-2
wallet_test.go
vendor/github.com/33cn/chain33/wallet/wallet_test.go
+3
-3
No files found.
plugin/dapp/paracross/commands/paracross.go
View file @
8898b5a7
...
@@ -125,7 +125,7 @@ func createAssetTx(cmd *cobra.Command, isWithdraw bool) (string, error) {
...
@@ -125,7 +125,7 @@ func createAssetTx(cmd *cobra.Command, isWithdraw bool) (string, error) {
To
:
toAddr
,
To
:
toAddr
,
Amount
:
amountInt64
,
Amount
:
amountInt64
,
Fee
:
0
,
Fee
:
0
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
IsWithdraw
:
isWithdraw
,
IsWithdraw
:
isWithdraw
,
IsToken
:
false
,
IsToken
:
false
,
TokenSymbol
:
symbol
,
TokenSymbol
:
symbol
,
...
@@ -267,7 +267,7 @@ func createTransferTx(cmd *cobra.Command, isWithdraw bool) (string, error) {
...
@@ -267,7 +267,7 @@ func createTransferTx(cmd *cobra.Command, isWithdraw bool) (string, error) {
To
:
toAddr
,
To
:
toAddr
,
Amount
:
amountInt64
,
Amount
:
amountInt64
,
Fee
:
0
,
Fee
:
0
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
IsWithdraw
:
isWithdraw
,
IsWithdraw
:
isWithdraw
,
IsToken
:
false
,
IsToken
:
false
,
TokenSymbol
:
symbol
,
TokenSymbol
:
symbol
,
...
...
plugin/dapp/privacy/wallet/privacy.go
View file @
8898b5a7
...
@@ -592,7 +592,7 @@ func (policy *privacyPolicy) createPublic2PrivacyTx(req *types.ReqCreateTransact
...
@@ -592,7 +592,7 @@ func (policy *privacyPolicy) createPublic2PrivacyTx(req *types.ReqCreateTransact
value
:=
&
privacytypes
.
Public2Privacy
{
value
:=
&
privacytypes
.
Public2Privacy
{
Tokenname
:
req
.
Tokenname
,
Tokenname
:
req
.
Tokenname
,
Amount
:
amount
,
Amount
:
amount
,
Note
:
req
.
GetNote
(
),
Note
:
string
(
req
.
GetNote
()
),
Output
:
privacyOutput
,
Output
:
privacyOutput
,
}
}
...
@@ -662,7 +662,7 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *types.ReqCreateTransac
...
@@ -662,7 +662,7 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *types.ReqCreateTransac
value
:=
&
privacytypes
.
Privacy2Privacy
{
value
:=
&
privacytypes
.
Privacy2Privacy
{
Tokenname
:
req
.
GetTokenname
(),
Tokenname
:
req
.
GetTokenname
(),
Amount
:
req
.
GetAmount
(),
Amount
:
req
.
GetAmount
(),
Note
:
req
.
GetNote
(
),
Note
:
string
(
req
.
GetNote
()
),
Input
:
privacyInput
,
Input
:
privacyInput
,
Output
:
privacyOutput
,
Output
:
privacyOutput
,
}
}
...
@@ -731,7 +731,7 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *types.ReqCreateTransact
...
@@ -731,7 +731,7 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *types.ReqCreateTransact
value
:=
&
privacytypes
.
Privacy2Public
{
value
:=
&
privacytypes
.
Privacy2Public
{
Tokenname
:
req
.
GetTokenname
(),
Tokenname
:
req
.
GetTokenname
(),
Amount
:
req
.
GetAmount
(),
Amount
:
req
.
GetAmount
(),
Note
:
req
.
GetNote
(
),
Note
:
string
(
req
.
GetNote
()
),
Input
:
privacyInput
,
Input
:
privacyInput
,
Output
:
privacyOutput
,
Output
:
privacyOutput
,
}
}
...
...
plugin/dapp/token/commands/token.go
View file @
8898b5a7
...
@@ -248,7 +248,6 @@ func tokenAssets(cmd *cobra.Command, args []string) {
...
@@ -248,7 +248,6 @@ func tokenAssets(cmd *cobra.Command, args []string) {
Address
:
addr
,
Address
:
addr
,
Execer
:
execer
,
Execer
:
execer
,
}
}
var
params
rpctypes
.
Query4Jrpc
var
params
rpctypes
.
Query4Jrpc
params
.
Execer
=
getRealExecName
(
paraName
,
"token"
)
params
.
Execer
=
getRealExecName
(
paraName
,
"token"
)
params
.
FuncName
=
"GetAccountTokenAssets"
params
.
FuncName
=
"GetAccountTokenAssets"
...
...
plugin/dapp/token/commands/utils.go
View file @
8898b5a7
...
@@ -30,11 +30,11 @@ func CreateRawTx(cmd *cobra.Command, to string, amount float64, note string, isW
...
@@ -30,11 +30,11 @@ func CreateRawTx(cmd *cobra.Command, to string, amount float64, note string, isW
var
tx
*
types
.
Transaction
var
tx
*
types
.
Transaction
transfer
:=
&
tokenty
.
TokenAction
{}
transfer
:=
&
tokenty
.
TokenAction
{}
if
!
isWithdraw
{
if
!
isWithdraw
{
v
:=
&
tokenty
.
TokenAction_Transfer
{
Transfer
:
&
types
.
AssetsTransfer
{
Cointoken
:
tokenSymbol
,
Amount
:
amountInt64
,
Note
:
note
,
To
:
to
}}
v
:=
&
tokenty
.
TokenAction_Transfer
{
Transfer
:
&
types
.
AssetsTransfer
{
Cointoken
:
tokenSymbol
,
Amount
:
amountInt64
,
Note
:
[]
byte
(
note
)
,
To
:
to
}}
transfer
.
Value
=
v
transfer
.
Value
=
v
transfer
.
Ty
=
tokenty
.
ActionTransfer
transfer
.
Ty
=
tokenty
.
ActionTransfer
}
else
{
}
else
{
v
:=
&
tokenty
.
TokenAction_Withdraw
{
Withdraw
:
&
types
.
AssetsWithdraw
{
Cointoken
:
tokenSymbol
,
Amount
:
amountInt64
,
Note
:
note
}}
v
:=
&
tokenty
.
TokenAction_Withdraw
{
Withdraw
:
&
types
.
AssetsWithdraw
{
Cointoken
:
tokenSymbol
,
Amount
:
amountInt64
,
Note
:
[]
byte
(
note
)
}}
transfer
.
Value
=
v
transfer
.
Value
=
v
transfer
.
Ty
=
tokenty
.
ActionWithdraw
transfer
.
Ty
=
tokenty
.
ActionWithdraw
}
}
...
...
plugin/init.go
View file @
8898b5a7
...
@@ -5,4 +5,4 @@ import (
...
@@ -5,4 +5,4 @@ import (
_
"github.com/33cn/plugin/plugin/crypto/init"
//crypto init
_
"github.com/33cn/plugin/plugin/crypto/init"
//crypto init
_
"github.com/33cn/plugin/plugin/dapp/init"
//dapp init
_
"github.com/33cn/plugin/plugin/dapp/init"
//dapp init
_
"github.com/33cn/plugin/plugin/store/init"
//store init
_
"github.com/33cn/plugin/plugin/store/init"
//store init
)
)
\ No newline at end of file
vendor/github.com/33cn/chain33/client/mock_wallet_test.go
View file @
8898b5a7
...
@@ -53,7 +53,7 @@ func (m *mockWallet) SetQueueClient(q queue.Queue) {
...
@@ -53,7 +53,7 @@ func (m *mockWallet) SetQueueClient(q queue.Queue) {
}
}
case
types
.
EventWalletSendToAddress
:
case
types
.
EventWalletSendToAddress
:
if
req
,
ok
:=
msg
.
GetData
()
.
(
*
types
.
ReqWalletSendToAddress
);
ok
{
if
req
,
ok
:=
msg
.
GetData
()
.
(
*
types
.
ReqWalletSendToAddress
);
ok
{
if
req
.
Note
==
"case1"
{
if
string
(
req
.
Note
)
==
"case1"
{
msg
.
Reply
(
client
.
NewMessage
(
walletKey
,
types
.
EventReplyHashes
,
&
types
.
Transaction
{}))
msg
.
Reply
(
client
.
NewMessage
(
walletKey
,
types
.
EventReplyHashes
,
&
types
.
Transaction
{}))
}
else
{
}
else
{
msg
.
Reply
(
client
.
NewMessage
(
walletKey
,
types
.
EventReplyHashes
,
&
types
.
ReplyHash
{}))
msg
.
Reply
(
client
.
NewMessage
(
walletKey
,
types
.
EventReplyHashes
,
&
types
.
ReplyHash
{}))
...
...
vendor/github.com/33cn/chain33/client/queueprotocol_test.go
View file @
8898b5a7
...
@@ -436,7 +436,7 @@ func testWalletSendToAddress(t *testing.T, api client.QueueProtocolAPI) {
...
@@ -436,7 +436,7 @@ func testWalletSendToAddress(t *testing.T, api client.QueueProtocolAPI) {
if
err
==
nil
{
if
err
==
nil
{
t
.
Error
(
"WalletSendToAddress(nil) need return error."
)
t
.
Error
(
"WalletSendToAddress(nil) need return error."
)
}
}
_
,
err
=
api
.
WalletSendToAddress
(
&
types
.
ReqWalletSendToAddress
{
Note
:
"case1"
})
_
,
err
=
api
.
WalletSendToAddress
(
&
types
.
ReqWalletSendToAddress
{
Note
:
[]
byte
(
"case1"
)
})
if
err
==
nil
{
if
err
==
nil
{
t
.
Error
(
"WalletSendToAddress(&types.ReqWalletSendToAddress{Note:
\"
case1
\"
}) need return error."
)
t
.
Error
(
"WalletSendToAddress(&types.ReqWalletSendToAddress{Note:
\"
case1
\"
}) need return error."
)
}
}
...
...
vendor/github.com/33cn/chain33/cmd/tools/strategy/updateinit.go
View file @
8898b5a7
...
@@ -75,7 +75,7 @@ import (
...
@@ -75,7 +75,7 @@ import (
_ "${packname}/consensus/init" //consensus init
_ "${packname}/consensus/init" //consensus init
_ "${packname}/crypto/init" //crypto init
_ "${packname}/crypto/init" //crypto init
_ "${packname}/dapp/init" //dapp init
_ "${packname}/dapp/init" //dapp init
_ "${packname}/store/init
//store init"
_ "${packname}/store/init
" //store init
)`
)
)`
)
data
=
bytes
.
Replace
(
data
,
[]
byte
(
"${packname}"
),
[]
byte
(
packname
),
-
1
)
data
=
bytes
.
Replace
(
data
,
[]
byte
(
"${packname}"
),
[]
byte
(
packname
),
-
1
)
ioutil
.
WriteFile
(
path
,
data
,
0666
)
ioutil
.
WriteFile
(
path
,
data
,
0666
)
...
...
vendor/github.com/33cn/chain33/cmd/write/write.go
View file @
8898b5a7
...
@@ -158,7 +158,7 @@ func scanWrite() {
...
@@ -158,7 +158,7 @@ func scanWrite() {
continue
continue
}
}
var
noteTx
types
.
Transaction
var
noteTx
types
.
Transaction
txBytes
,
err
:=
common
.
FromHex
(
action
.
GetTransfer
()
.
Note
)
txBytes
,
err
:=
common
.
FromHex
(
string
(
action
.
GetTransfer
()
.
Note
)
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Fprintln
(
os
.
Stderr
,
"not a user data tx"
)
fmt
.
Fprintln
(
os
.
Stderr
,
"not a user data tx"
)
continue
continue
...
...
vendor/github.com/33cn/chain33/rpc/client_test.go
View file @
8898b5a7
...
@@ -85,7 +85,7 @@ func testCreateRawTransactionCoinTransfer(t *testing.T) {
...
@@ -85,7 +85,7 @@ func testCreateRawTransactionCoinTransfer(t *testing.T) {
IsToken
:
false
,
IsToken
:
false
,
IsWithdraw
:
false
,
IsWithdraw
:
false
,
To
:
"to"
,
To
:
"to"
,
Note
:
"note"
,
Note
:
[]
byte
(
"note"
)
,
}
}
//v := &cty.CoinsAction_Transfer{
//v := &cty.CoinsAction_Transfer{
...
@@ -125,7 +125,7 @@ func testCreateRawTransactionCoinTransferExec(t *testing.T) {
...
@@ -125,7 +125,7 @@ func testCreateRawTransactionCoinTransferExec(t *testing.T) {
IsToken
:
false
,
IsToken
:
false
,
IsWithdraw
:
false
,
IsWithdraw
:
false
,
To
:
"to"
,
To
:
"to"
,
Note
:
"note"
,
Note
:
[]
byte
(
"note"
)
,
}
}
client
:=
newTestChannelClient
()
client
:=
newTestChannelClient
()
...
@@ -152,7 +152,7 @@ func testCreateRawTransactionCoinWithdraw(t *testing.T) {
...
@@ -152,7 +152,7 @@ func testCreateRawTransactionCoinWithdraw(t *testing.T) {
IsToken
:
false
,
IsToken
:
false
,
IsWithdraw
:
true
,
IsWithdraw
:
true
,
To
:
"to"
,
To
:
"to"
,
Note
:
"note"
,
Note
:
[]
byte
(
"note"
)
,
}
}
client
:=
newTestChannelClient
()
client
:=
newTestChannelClient
()
...
...
vendor/github.com/33cn/chain33/rpc/jrpchandler_test.go
View file @
8898b5a7
...
@@ -391,7 +391,7 @@ func TestChain33_CreateRawTransaction(t *testing.T) {
...
@@ -391,7 +391,7 @@ func TestChain33_CreateRawTransaction(t *testing.T) {
To
:
"qew"
,
To
:
"qew"
,
Amount
:
10
,
Amount
:
10
,
Fee
:
1
,
Fee
:
1
,
Note
:
"12312"
,
Note
:
[]
byte
(
"12312"
)
,
IsWithdraw
:
false
,
IsWithdraw
:
false
,
IsToken
:
false
,
IsToken
:
false
,
TokenSymbol
:
""
,
TokenSymbol
:
""
,
...
...
vendor/github.com/33cn/chain33/system/dapp/commands/bty.go
View file @
8898b5a7
...
@@ -371,7 +371,7 @@ func createPub2PrivTx(cmd *cobra.Command, args []string) {
...
@@ -371,7 +371,7 @@ func createPub2PrivTx(cmd *cobra.Command, args []string) {
Tokenname
:
tokenname
,
Tokenname
:
tokenname
,
Type
:
types
.
PrivacyTypePublic2Privacy
,
Type
:
types
.
PrivacyTypePublic2Privacy
,
Amount
:
amount
,
Amount
:
amount
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
Pubkeypair
:
pubkeypair
,
Pubkeypair
:
pubkeypair
,
Expire
:
expire
,
Expire
:
expire
,
}
}
...
@@ -431,7 +431,7 @@ func createPriv2PrivTx(cmd *cobra.Command, args []string) {
...
@@ -431,7 +431,7 @@ func createPriv2PrivTx(cmd *cobra.Command, args []string) {
Tokenname
:
tokenname
,
Tokenname
:
tokenname
,
Type
:
types
.
PrivacyTypePrivacy2Privacy
,
Type
:
types
.
PrivacyTypePrivacy2Privacy
,
Amount
:
amount
,
Amount
:
amount
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
Pubkeypair
:
pubkeypair
,
Pubkeypair
:
pubkeypair
,
From
:
sender
,
From
:
sender
,
Mixcount
:
defaultPrivacyMixCount
,
Mixcount
:
defaultPrivacyMixCount
,
...
@@ -493,7 +493,7 @@ func createPriv2PubTx(cmd *cobra.Command, args []string) {
...
@@ -493,7 +493,7 @@ func createPriv2PubTx(cmd *cobra.Command, args []string) {
Tokenname
:
tokenname
,
Tokenname
:
tokenname
,
Type
:
types
.
PrivacyTypePrivacy2Public
,
Type
:
types
.
PrivacyTypePrivacy2Public
,
Amount
:
amount
,
Amount
:
amount
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
From
:
from
,
From
:
from
,
To
:
to
,
To
:
to
,
Mixcount
:
defaultPrivacyMixCount
,
Mixcount
:
defaultPrivacyMixCount
,
...
...
vendor/github.com/33cn/chain33/system/dapp/commands/types/utils.go
View file @
8898b5a7
...
@@ -62,7 +62,7 @@ func SendToAddress(rpcAddr string, from string, to string, amount int64, note st
...
@@ -62,7 +62,7 @@ func SendToAddress(rpcAddr string, from string, to string, amount int64, note st
if
isWithdraw
{
if
isWithdraw
{
amt
=
-
amount
amt
=
-
amount
}
}
params
:=
types
.
ReqWalletSendToAddress
{
From
:
from
,
To
:
to
,
Amount
:
amt
,
Note
:
note
}
params
:=
types
.
ReqWalletSendToAddress
{
From
:
from
,
To
:
to
,
Amount
:
amt
,
Note
:
[]
byte
(
note
)
}
if
!
isToken
{
if
!
isToken
{
params
.
IsToken
=
false
params
.
IsToken
=
false
}
else
{
}
else
{
...
@@ -95,16 +95,16 @@ func CreateRawTx(cmd *cobra.Command, to string, amount float64, note string, isW
...
@@ -95,16 +95,16 @@ func CreateRawTx(cmd *cobra.Command, to string, amount float64, note string, isW
transfer
:=
&
cty
.
CoinsAction
{}
transfer
:=
&
cty
.
CoinsAction
{}
if
!
isWithdraw
{
if
!
isWithdraw
{
if
initExecName
!=
""
{
if
initExecName
!=
""
{
v
:=
&
cty
.
CoinsAction_TransferToExec
{
TransferToExec
:
&
types
.
AssetsTransferToExec
{
Amount
:
amountInt64
,
Note
:
note
,
ExecName
:
execName
,
To
:
to
}}
v
:=
&
cty
.
CoinsAction_TransferToExec
{
TransferToExec
:
&
types
.
AssetsTransferToExec
{
Amount
:
amountInt64
,
Note
:
[]
byte
(
note
)
,
ExecName
:
execName
,
To
:
to
}}
transfer
.
Value
=
v
transfer
.
Value
=
v
transfer
.
Ty
=
cty
.
CoinsActionTransferToExec
transfer
.
Ty
=
cty
.
CoinsActionTransferToExec
}
else
{
}
else
{
v
:=
&
cty
.
CoinsAction_Transfer
{
Transfer
:
&
types
.
AssetsTransfer
{
Amount
:
amountInt64
,
Note
:
note
,
To
:
to
}}
v
:=
&
cty
.
CoinsAction_Transfer
{
Transfer
:
&
types
.
AssetsTransfer
{
Amount
:
amountInt64
,
Note
:
[]
byte
(
note
)
,
To
:
to
}}
transfer
.
Value
=
v
transfer
.
Value
=
v
transfer
.
Ty
=
cty
.
CoinsActionTransfer
transfer
.
Ty
=
cty
.
CoinsActionTransfer
}
}
}
else
{
}
else
{
v
:=
&
cty
.
CoinsAction_Withdraw
{
Withdraw
:
&
types
.
AssetsWithdraw
{
Amount
:
amountInt64
,
Note
:
note
,
ExecName
:
execName
}}
v
:=
&
cty
.
CoinsAction_Withdraw
{
Withdraw
:
&
types
.
AssetsWithdraw
{
Amount
:
amountInt64
,
Note
:
[]
byte
(
note
)
,
ExecName
:
execName
}}
transfer
.
Value
=
v
transfer
.
Value
=
v
transfer
.
Ty
=
cty
.
CoinsActionWithdraw
transfer
.
Ty
=
cty
.
CoinsActionWithdraw
}
}
...
...
vendor/github.com/33cn/chain33/types/proto/transaction.proto
View file @
8898b5a7
...
@@ -14,7 +14,7 @@ message AssetsGenesis {
...
@@ -14,7 +14,7 @@ message AssetsGenesis {
message
AssetsTransferToExec
{
message
AssetsTransferToExec
{
string
cointoken
=
1
;
string
cointoken
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
string
note
=
3
;
bytes
note
=
3
;
string
execName
=
4
;
string
execName
=
4
;
string
to
=
5
;
string
to
=
5
;
}
}
...
@@ -22,7 +22,7 @@ message AssetsTransferToExec {
...
@@ -22,7 +22,7 @@ message AssetsTransferToExec {
message
AssetsWithdraw
{
message
AssetsWithdraw
{
string
cointoken
=
1
;
string
cointoken
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
string
note
=
3
;
bytes
note
=
3
;
string
execName
=
4
;
string
execName
=
4
;
string
to
=
5
;
string
to
=
5
;
}
}
...
@@ -30,7 +30,7 @@ message AssetsWithdraw {
...
@@ -30,7 +30,7 @@ message AssetsWithdraw {
message
AssetsTransfer
{
message
AssetsTransfer
{
string
cointoken
=
1
;
string
cointoken
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
string
note
=
3
;
bytes
note
=
3
;
string
to
=
4
;
string
to
=
4
;
}
}
...
@@ -44,7 +44,7 @@ message CreateTx {
...
@@ -44,7 +44,7 @@ message CreateTx {
string
to
=
1
;
string
to
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
int64
fee
=
3
;
int64
fee
=
3
;
string
note
=
4
;
bytes
note
=
4
;
bool
isWithdraw
=
5
;
bool
isWithdraw
=
5
;
bool
isToken
=
6
;
bool
isToken
=
6
;
string
tokenSymbol
=
7
;
string
tokenSymbol
=
7
;
...
...
vendor/github.com/33cn/chain33/types/proto/wallet.proto
View file @
8898b5a7
...
@@ -147,7 +147,7 @@ message ReqWalletSendToAddress {
...
@@ -147,7 +147,7 @@ message ReqWalletSendToAddress {
string
from
=
1
;
string
from
=
1
;
string
to
=
2
;
string
to
=
2
;
int64
amount
=
3
;
int64
amount
=
3
;
string
note
=
4
;
bytes
note
=
4
;
bool
isToken
=
5
;
bool
isToken
=
5
;
string
tokenSymbol
=
6
;
string
tokenSymbol
=
6
;
}
}
...
@@ -231,7 +231,7 @@ message ReqCreateTransaction {
...
@@ -231,7 +231,7 @@ message ReqCreateTransaction {
// 3:隐私交易 隐私->公开
// 3:隐私交易 隐私->公开
int32
type
=
2
;
int32
type
=
2
;
int64
amount
=
3
;
int64
amount
=
3
;
string
note
=
4
;
bytes
note
=
4
;
// 普通交易的发送方
// 普通交易的发送方
string
from
=
5
;
string
from
=
5
;
// 普通交易的接收方
// 普通交易的接收方
...
...
vendor/github.com/33cn/chain33/types/transaction.pb.go
View file @
8898b5a7
This diff is collapsed.
Click to expand it.
vendor/github.com/33cn/chain33/types/wallet.pb.go
View file @
8898b5a7
This diff is collapsed.
Click to expand it.
vendor/github.com/33cn/chain33/wallet/sendtx.go
View file @
8898b5a7
...
@@ -202,7 +202,7 @@ func (wallet *Wallet) createSendToAddress(addrto string, amount int64, note stri
...
@@ -202,7 +202,7 @@ func (wallet *Wallet) createSendToAddress(addrto string, amount int64, note stri
create
:=
&
types
.
CreateTx
{
create
:=
&
types
.
CreateTx
{
To
:
addrto
,
To
:
addrto
,
Amount
:
amount
,
Amount
:
amount
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
IsWithdraw
:
isWithdraw
,
IsWithdraw
:
isWithdraw
,
IsToken
:
Istoken
,
IsToken
:
Istoken
,
TokenSymbol
:
tokenSymbol
,
TokenSymbol
:
tokenSymbol
,
...
...
vendor/github.com/33cn/chain33/wallet/wallet_proc.go
View file @
8898b5a7
...
@@ -572,7 +572,7 @@ func (wallet *Wallet) ProcSendToAddress(SendToAddress *types.ReqWalletSendToAddr
...
@@ -572,7 +572,7 @@ func (wallet *Wallet) ProcSendToAddress(SendToAddress *types.ReqWalletSendToAddr
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
return
wallet
.
sendToAddress
(
priv
,
addrto
,
amount
,
note
,
SendToAddress
.
IsToken
,
SendToAddress
.
TokenSymbol
)
return
wallet
.
sendToAddress
(
priv
,
addrto
,
amount
,
string
(
note
)
,
SendToAddress
.
IsToken
,
SendToAddress
.
TokenSymbol
)
}
}
// ProcWalletSetFee 处理设置手续费
// ProcWalletSetFee 处理设置手续费
...
@@ -729,7 +729,7 @@ func (wallet *Wallet) ProcMergeBalance(MergeBalance *types.ReqWalletMergeBalance
...
@@ -729,7 +729,7 @@ func (wallet *Wallet) ProcMergeBalance(MergeBalance *types.ReqWalletMergeBalance
}
}
amount
=
amount
-
wallet
.
FeeAmount
amount
=
amount
-
wallet
.
FeeAmount
v
:=
&
cty
.
CoinsAction_Transfer
{
v
:=
&
cty
.
CoinsAction_Transfer
{
Transfer
:
&
types
.
AssetsTransfer
{
Amount
:
amount
,
Note
:
note
},
Transfer
:
&
types
.
AssetsTransfer
{
Amount
:
amount
,
Note
:
[]
byte
(
note
)
},
}
}
transfer
:=
&
cty
.
CoinsAction
{
Value
:
v
,
Ty
:
cty
.
CoinsActionTransfer
}
transfer
:=
&
cty
.
CoinsAction
{
Value
:
v
,
Ty
:
cty
.
CoinsActionTransfer
}
//初始化随机数
//初始化随机数
...
...
vendor/github.com/33cn/chain33/wallet/wallet_test.go
View file @
8898b5a7
...
@@ -461,7 +461,7 @@ func testProcSendToAddress(t *testing.T, wallet *Wallet) {
...
@@ -461,7 +461,7 @@ func testProcSendToAddress(t *testing.T, wallet *Wallet) {
transfer
:=
&
types
.
ReqWalletSendToAddress
{
transfer
:=
&
types
.
ReqWalletSendToAddress
{
Amount
:
1000
,
Amount
:
1000
,
From
:
FromAddr
,
From
:
FromAddr
,
Note
:
"test"
,
Note
:
[]
byte
(
"test"
)
,
To
:
"1L1zEgVcjqdM2KkQixENd7SZTaudKkcyDu"
,
To
:
"1L1zEgVcjqdM2KkQixENd7SZTaudKkcyDu"
,
}
}
msg
:=
wallet
.
client
.
NewMessage
(
"wallet"
,
types
.
EventWalletSendToAddress
,
transfer
)
msg
:=
wallet
.
client
.
NewMessage
(
"wallet"
,
types
.
EventWalletSendToAddress
,
transfer
)
...
@@ -473,7 +473,7 @@ func testProcSendToAddress(t *testing.T, wallet *Wallet) {
...
@@ -473,7 +473,7 @@ func testProcSendToAddress(t *testing.T, wallet *Wallet) {
withdraw
:=
&
types
.
ReqWalletSendToAddress
{
withdraw
:=
&
types
.
ReqWalletSendToAddress
{
Amount
:
-
1000
,
Amount
:
-
1000
,
From
:
FromAddr
,
From
:
FromAddr
,
Note
:
"test"
,
Note
:
[]
byte
(
"test"
)
,
To
:
"16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
,
To
:
"16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
,
}
}
msg
=
wallet
.
client
.
NewMessage
(
"wallet"
,
types
.
EventWalletSendToAddress
,
withdraw
)
msg
=
wallet
.
client
.
NewMessage
(
"wallet"
,
types
.
EventWalletSendToAddress
,
withdraw
)
...
@@ -592,7 +592,7 @@ func testProcWalletLock(t *testing.T, wallet *Wallet) {
...
@@ -592,7 +592,7 @@ func testProcWalletLock(t *testing.T, wallet *Wallet) {
transfer
:=
&
types
.
ReqWalletSendToAddress
{
transfer
:=
&
types
.
ReqWalletSendToAddress
{
Amount
:
1000
,
Amount
:
1000
,
From
:
FromAddr
,
From
:
FromAddr
,
Note
:
"test"
,
Note
:
[]
byte
(
"test"
)
,
To
:
"1L1zEgVcjqdM2KkQixENd7SZTaudKkcyDu"
,
To
:
"1L1zEgVcjqdM2KkQixENd7SZTaudKkcyDu"
,
}
}
msg
=
wallet
.
client
.
NewMessage
(
"wallet"
,
types
.
EventWalletSendToAddress
,
transfer
)
msg
=
wallet
.
client
.
NewMessage
(
"wallet"
,
types
.
EventWalletSendToAddress
,
transfer
)
...
...
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