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) {
To
:
toAddr
,
Amount
:
amountInt64
,
Fee
:
0
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
IsWithdraw
:
isWithdraw
,
IsToken
:
false
,
TokenSymbol
:
symbol
,
...
...
@@ -267,7 +267,7 @@ func createTransferTx(cmd *cobra.Command, isWithdraw bool) (string, error) {
To
:
toAddr
,
Amount
:
amountInt64
,
Fee
:
0
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
IsWithdraw
:
isWithdraw
,
IsToken
:
false
,
TokenSymbol
:
symbol
,
...
...
plugin/dapp/privacy/wallet/privacy.go
View file @
8898b5a7
...
...
@@ -592,7 +592,7 @@ func (policy *privacyPolicy) createPublic2PrivacyTx(req *types.ReqCreateTransact
value
:=
&
privacytypes
.
Public2Privacy
{
Tokenname
:
req
.
Tokenname
,
Amount
:
amount
,
Note
:
req
.
GetNote
(
),
Note
:
string
(
req
.
GetNote
()
),
Output
:
privacyOutput
,
}
...
...
@@ -662,7 +662,7 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *types.ReqCreateTransac
value
:=
&
privacytypes
.
Privacy2Privacy
{
Tokenname
:
req
.
GetTokenname
(),
Amount
:
req
.
GetAmount
(),
Note
:
req
.
GetNote
(
),
Note
:
string
(
req
.
GetNote
()
),
Input
:
privacyInput
,
Output
:
privacyOutput
,
}
...
...
@@ -731,7 +731,7 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *types.ReqCreateTransact
value
:=
&
privacytypes
.
Privacy2Public
{
Tokenname
:
req
.
GetTokenname
(),
Amount
:
req
.
GetAmount
(),
Note
:
req
.
GetNote
(
),
Note
:
string
(
req
.
GetNote
()
),
Input
:
privacyInput
,
Output
:
privacyOutput
,
}
...
...
plugin/dapp/token/commands/token.go
View file @
8898b5a7
...
...
@@ -248,7 +248,6 @@ func tokenAssets(cmd *cobra.Command, args []string) {
Address
:
addr
,
Execer
:
execer
,
}
var
params
rpctypes
.
Query4Jrpc
params
.
Execer
=
getRealExecName
(
paraName
,
"token"
)
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
var
tx
*
types
.
Transaction
transfer
:=
&
tokenty
.
TokenAction
{}
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
.
Ty
=
tokenty
.
ActionTransfer
}
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
.
Ty
=
tokenty
.
ActionWithdraw
}
...
...
plugin/init.go
View file @
8898b5a7
...
...
@@ -5,4 +5,4 @@ import (
_
"github.com/33cn/plugin/plugin/crypto/init"
//crypto init
_
"github.com/33cn/plugin/plugin/dapp/init"
//dapp 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) {
}
case
types
.
EventWalletSendToAddress
:
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
{}))
}
else
{
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) {
if
err
==
nil
{
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
{
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 (
_ "${packname}/consensus/init" //consensus init
_ "${packname}/crypto/init" //crypto 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
)
ioutil
.
WriteFile
(
path
,
data
,
0666
)
...
...
vendor/github.com/33cn/chain33/cmd/write/write.go
View file @
8898b5a7
...
...
@@ -158,7 +158,7 @@ func scanWrite() {
continue
}
var
noteTx
types
.
Transaction
txBytes
,
err
:=
common
.
FromHex
(
action
.
GetTransfer
()
.
Note
)
txBytes
,
err
:=
common
.
FromHex
(
string
(
action
.
GetTransfer
()
.
Note
)
)
if
err
!=
nil
{
fmt
.
Fprintln
(
os
.
Stderr
,
"not a user data tx"
)
continue
...
...
vendor/github.com/33cn/chain33/rpc/client_test.go
View file @
8898b5a7
...
...
@@ -85,7 +85,7 @@ func testCreateRawTransactionCoinTransfer(t *testing.T) {
IsToken
:
false
,
IsWithdraw
:
false
,
To
:
"to"
,
Note
:
"note"
,
Note
:
[]
byte
(
"note"
)
,
}
//v := &cty.CoinsAction_Transfer{
...
...
@@ -125,7 +125,7 @@ func testCreateRawTransactionCoinTransferExec(t *testing.T) {
IsToken
:
false
,
IsWithdraw
:
false
,
To
:
"to"
,
Note
:
"note"
,
Note
:
[]
byte
(
"note"
)
,
}
client
:=
newTestChannelClient
()
...
...
@@ -152,7 +152,7 @@ func testCreateRawTransactionCoinWithdraw(t *testing.T) {
IsToken
:
false
,
IsWithdraw
:
true
,
To
:
"to"
,
Note
:
"note"
,
Note
:
[]
byte
(
"note"
)
,
}
client
:=
newTestChannelClient
()
...
...
vendor/github.com/33cn/chain33/rpc/jrpchandler_test.go
View file @
8898b5a7
...
...
@@ -391,7 +391,7 @@ func TestChain33_CreateRawTransaction(t *testing.T) {
To
:
"qew"
,
Amount
:
10
,
Fee
:
1
,
Note
:
"12312"
,
Note
:
[]
byte
(
"12312"
)
,
IsWithdraw
:
false
,
IsToken
:
false
,
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) {
Tokenname
:
tokenname
,
Type
:
types
.
PrivacyTypePublic2Privacy
,
Amount
:
amount
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
Pubkeypair
:
pubkeypair
,
Expire
:
expire
,
}
...
...
@@ -431,7 +431,7 @@ func createPriv2PrivTx(cmd *cobra.Command, args []string) {
Tokenname
:
tokenname
,
Type
:
types
.
PrivacyTypePrivacy2Privacy
,
Amount
:
amount
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
Pubkeypair
:
pubkeypair
,
From
:
sender
,
Mixcount
:
defaultPrivacyMixCount
,
...
...
@@ -493,7 +493,7 @@ func createPriv2PubTx(cmd *cobra.Command, args []string) {
Tokenname
:
tokenname
,
Type
:
types
.
PrivacyTypePrivacy2Public
,
Amount
:
amount
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
From
:
from
,
To
:
to
,
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
if
isWithdraw
{
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
{
params
.
IsToken
=
false
}
else
{
...
...
@@ -95,16 +95,16 @@ func CreateRawTx(cmd *cobra.Command, to string, amount float64, note string, isW
transfer
:=
&
cty
.
CoinsAction
{}
if
!
isWithdraw
{
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
.
Ty
=
cty
.
CoinsActionTransferToExec
}
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
.
Ty
=
cty
.
CoinsActionTransfer
}
}
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
.
Ty
=
cty
.
CoinsActionWithdraw
}
...
...
vendor/github.com/33cn/chain33/types/proto/transaction.proto
View file @
8898b5a7
...
...
@@ -14,7 +14,7 @@ message AssetsGenesis {
message
AssetsTransferToExec
{
string
cointoken
=
1
;
int64
amount
=
2
;
string
note
=
3
;
bytes
note
=
3
;
string
execName
=
4
;
string
to
=
5
;
}
...
...
@@ -22,7 +22,7 @@ message AssetsTransferToExec {
message
AssetsWithdraw
{
string
cointoken
=
1
;
int64
amount
=
2
;
string
note
=
3
;
bytes
note
=
3
;
string
execName
=
4
;
string
to
=
5
;
}
...
...
@@ -30,7 +30,7 @@ message AssetsWithdraw {
message
AssetsTransfer
{
string
cointoken
=
1
;
int64
amount
=
2
;
string
note
=
3
;
bytes
note
=
3
;
string
to
=
4
;
}
...
...
@@ -44,7 +44,7 @@ message CreateTx {
string
to
=
1
;
int64
amount
=
2
;
int64
fee
=
3
;
string
note
=
4
;
bytes
note
=
4
;
bool
isWithdraw
=
5
;
bool
isToken
=
6
;
string
tokenSymbol
=
7
;
...
...
vendor/github.com/33cn/chain33/types/proto/wallet.proto
View file @
8898b5a7
...
...
@@ -147,7 +147,7 @@ message ReqWalletSendToAddress {
string
from
=
1
;
string
to
=
2
;
int64
amount
=
3
;
string
note
=
4
;
bytes
note
=
4
;
bool
isToken
=
5
;
string
tokenSymbol
=
6
;
}
...
...
@@ -231,7 +231,7 @@ message ReqCreateTransaction {
// 3:隐私交易 隐私->公开
int32
type
=
2
;
int64
amount
=
3
;
string
note
=
4
;
bytes
note
=
4
;
// 普通交易的发送方
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
create
:=
&
types
.
CreateTx
{
To
:
addrto
,
Amount
:
amount
,
Note
:
note
,
Note
:
[]
byte
(
note
)
,
IsWithdraw
:
isWithdraw
,
IsToken
:
Istoken
,
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
if
err
!=
nil
{
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 处理设置手续费
...
...
@@ -729,7 +729,7 @@ func (wallet *Wallet) ProcMergeBalance(MergeBalance *types.ReqWalletMergeBalance
}
amount
=
amount
-
wallet
.
FeeAmount
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
}
//初始化随机数
...
...
vendor/github.com/33cn/chain33/wallet/wallet_test.go
View file @
8898b5a7
...
...
@@ -461,7 +461,7 @@ func testProcSendToAddress(t *testing.T, wallet *Wallet) {
transfer
:=
&
types
.
ReqWalletSendToAddress
{
Amount
:
1000
,
From
:
FromAddr
,
Note
:
"test"
,
Note
:
[]
byte
(
"test"
)
,
To
:
"1L1zEgVcjqdM2KkQixENd7SZTaudKkcyDu"
,
}
msg
:=
wallet
.
client
.
NewMessage
(
"wallet"
,
types
.
EventWalletSendToAddress
,
transfer
)
...
...
@@ -473,7 +473,7 @@ func testProcSendToAddress(t *testing.T, wallet *Wallet) {
withdraw
:=
&
types
.
ReqWalletSendToAddress
{
Amount
:
-
1000
,
From
:
FromAddr
,
Note
:
"test"
,
Note
:
[]
byte
(
"test"
)
,
To
:
"16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
,
}
msg
=
wallet
.
client
.
NewMessage
(
"wallet"
,
types
.
EventWalletSendToAddress
,
withdraw
)
...
...
@@ -592,7 +592,7 @@ func testProcWalletLock(t *testing.T, wallet *Wallet) {
transfer
:=
&
types
.
ReqWalletSendToAddress
{
Amount
:
1000
,
From
:
FromAddr
,
Note
:
"test"
,
Note
:
[]
byte
(
"test"
)
,
To
:
"1L1zEgVcjqdM2KkQixENd7SZTaudKkcyDu"
,
}
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