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
efe9dcbe
Commit
efe9dcbe
authored
Jun 08, 2020
by
hezhengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix linter
parent
ac44f5a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
32 deletions
+2
-32
parser.go
plugin/dapp/x2ethereum/ebrelayer/ethtxs/parser.go
+0
-29
queryFromEth.go
plugin/dapp/x2ethereum/ebrelayer/ethtxs/queryFromEth.go
+1
-1
sync_tx_receipts.go
...ayer/relayer/chain33/transceiver/sync/sync_tx_receipts.go
+1
-1
ethereum.go
...in/dapp/x2ethereum/ebrelayer/relayer/ethereum/ethereum.go
+0
-1
No files found.
plugin/dapp/x2ethereum/ebrelayer/ethtxs/parser.go
View file @
efe9dcbe
...
...
@@ -10,7 +10,6 @@ package ethtxs
// --------------------------------------------------------
import
(
"crypto/ecdsa"
"math/big"
"strings"
...
...
@@ -117,34 +116,6 @@ func ParseBurnLockTxReceipt(claimType events.Event, receipt *chain33Types.Receip
return
nil
}
// ProphecyClaimToSignedOracleClaim : packages and signs a prophecy claim's data, returning a new oracle claim
func
ProphecyClaimToSignedOracleClaim
(
event
events
.
NewProphecyClaimEvent
,
privateKey
*
ecdsa
.
PrivateKey
)
(
*
OracleClaim
,
error
)
{
// Parse relevant data into type byte[]
prophecyID
:=
event
.
ProphecyID
.
Bytes
()
sender
:=
event
.
Chain33Sender
recipient
:=
[]
byte
(
event
.
EthereumReceiver
.
Hex
())
token
:=
[]
byte
(
event
.
TokenAddress
.
Hex
())
amount
:=
event
.
Amount
.
Bytes
()
validator
:=
[]
byte
(
event
.
ValidatorAddress
.
Hex
())
// Generate rawHash using ProphecyClaim data
hash
:=
GenerateClaimHash
(
prophecyID
,
sender
,
recipient
,
token
,
amount
,
validator
)
// Sign the hash using the active validator's private key
signature
,
err
:=
SignClaim4Eth
(
hash
,
privateKey
)
if
nil
!=
err
{
return
nil
,
err
}
// Package the ProphecyID, Message, and Signature into an OracleClaim
oracleClaim
:=
&
OracleClaim
{
ProphecyID
:
event
.
ProphecyID
,
Message
:
hash
,
Signature
:
signature
,
}
return
oracleClaim
,
nil
}
// Chain33MsgToProphecyClaim : parses event data from a Chain33Msg, packaging it as a ProphecyClaim
func
Chain33MsgToProphecyClaim
(
event
events
.
Chain33Msg
)
ProphecyClaim
{
claimType
:=
event
.
ClaimType
...
...
plugin/dapp/x2ethereum/ebrelayer/ethtxs/queryFromEth.go
View file @
efe9dcbe
...
...
@@ -113,7 +113,7 @@ func GetLockedFunds(bridgeBank *generated.BridgeBank, tokenAddrStr string) (stri
return
balance
.
String
(),
nil
}
func
GetDepositFunds
(
client
ethinterface
.
EthClientSpec
,
tokenAddrStr
string
)
(
string
,
error
)
{
func
GetDepositFunds
(
client
bind
.
ContractBackend
,
tokenAddrStr
string
)
(
string
,
error
)
{
if
tokenAddrStr
==
""
{
return
""
,
errors
.
New
(
"nil token address"
)
}
...
...
plugin/dapp/x2ethereum/ebrelayer/relayer/chain33/transceiver/sync/sync_tx_receipts.go
View file @
efe9dcbe
...
...
@@ -141,7 +141,7 @@ func bindOrResumePush(cfg *relayerTypes.SyncTxReceiptConfig) {
}
if
!
res
.
IsOk
{
fmt
.
Println
(
"Failed to AddSubscribeTxReceipt to rpc addr:"
,
cfg
.
Chain33Host
,
"ReplySubTxReceipt"
,
res
)
panic
(
"bindOrResumePush client failed due to:"
+
string
(
res
.
Msg
)
)
panic
(
"bindOrResumePush client failed due to:"
+
res
.
Msg
)
}
log
.
Info
(
"bindOrResumePush"
,
"Succeed to AddSubscribeTxReceipt for rpc address:"
,
cfg
.
Chain33Host
)
fmt
.
Println
(
"Succeed to AddPushSubscribe"
)
...
...
plugin/dapp/x2ethereum/ebrelayer/relayer/ethereum/ethereum.go
View file @
efe9dcbe
...
...
@@ -46,7 +46,6 @@ type Relayer4Ethereum struct {
privateKey4Chain33
chain33Crypto
.
PrivKey
ethValidator
common
.
Address
totalTx4Eth2Chain33
int64
totalTx4Chain33ToEth
int64
rpcURL2Chain33
string
unlockchan
chan
int
maturityDegree
int32
...
...
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