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
0b169565
Commit
0b169565
authored
Dec 21, 2021
by
hezhengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct event type to ClaimTypeWithdraw
parent
165af6d9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
ethereum.go
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go
+1
-1
chain33Event.go
...n/dapp/cross2eth/ebrelayer/relayer/events/chain33Event.go
+8
-10
events.go
plugin/dapp/cross2eth/ebrelayer/relayer/events/events.go
+1
-1
No files found.
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go
View file @
0b169565
...
@@ -814,7 +814,7 @@ func (ethRelayer *Relayer4Ethereum) newTx(from, to common.Address, input []byte,
...
@@ -814,7 +814,7 @@ func (ethRelayer *Relayer4Ethereum) newTx(from, to common.Address, input []byte,
func
(
ethRelayer
*
Relayer4Ethereum
)
handleLogLockBurn
(
chain33Msg
*
events
.
Chain33Msg
)
{
func
(
ethRelayer
*
Relayer4Ethereum
)
handleLogLockBurn
(
chain33Msg
*
events
.
Chain33Msg
)
{
//对于通过代理人登录的中继器,不处理lock和burn事件
//对于通过代理人登录的中继器,不处理lock和burn事件
if
ethRelayer
.
processWithDraw
{
if
ethRelayer
.
processWithDraw
{
relayerLog
.
Info
(
"handleLog
Withdraw
"
,
"Needn't process lock and burn for this withdraw process specified validator"
,
ethRelayer
.
ethSender
)
relayerLog
.
Info
(
"handleLog
LockBurn
"
,
"Needn't process lock and burn for this withdraw process specified validator"
,
ethRelayer
.
ethSender
)
return
return
}
}
relayerLog
.
Info
(
"handleLogLockBurn"
,
"Received chain33Msg"
,
chain33Msg
,
"tx hash string"
,
common
.
Bytes2Hex
(
chain33Msg
.
TxHash
))
relayerLog
.
Info
(
"handleLogLockBurn"
,
"Received chain33Msg"
,
chain33Msg
,
"tx hash string"
,
common
.
Bytes2Hex
(
chain33Msg
.
TxHash
))
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/events/chain33Event.go
View file @
0b169565
...
@@ -51,13 +51,13 @@ type LockEventOnChain33 struct {
...
@@ -51,13 +51,13 @@ type LockEventOnChain33 struct {
// 发生在chain33 evm上的withdraw事件,当用户发起通过代理人提币交易时,则弹射出该事件信息
// 发生在chain33 evm上的withdraw事件,当用户发起通过代理人提币交易时,则弹射出该事件信息
type
WithdrawEventOnChain33
struct
{
type
WithdrawEventOnChain33
struct
{
BridgeToken
chain33EvmCommon
.
Hash160Address
BridgeToken
chain33EvmCommon
.
Hash160Address
Symbol
string
Symbol
string
Amount
*
big
.
Int
Amount
*
big
.
Int
OwnerFrom
chain33EvmCommon
.
Hash160Address
OwnerFrom
chain33EvmCommon
.
Hash160Address
EthereumReceiver
[]
byte
EthereumReceiver
[]
byte
ProxyReceiver
chain33EvmCommon
.
Hash160Address
ProxyReceiver
chain33EvmCommon
.
Hash160Address
Nonce
*
big
.
Int
Nonce
*
big
.
Int
}
}
// 发生在chain33evm上的burn事件,当eth/erc20资产需要提币回到以太坊链上时,会发生该种事件
// 发生在chain33evm上的burn事件,当eth/erc20资产需要提币回到以太坊链上时,会发生该种事件
...
@@ -125,8 +125,6 @@ func UnpackLogWithdraw(contractAbi abi.ABI, eventName string, eventData []byte)
...
@@ -125,8 +125,6 @@ func UnpackLogWithdraw(contractAbi abi.ABI, eventName string, eventData []byte)
return
withdrawEvent
,
nil
return
withdrawEvent
,
nil
}
}
// ParseBurnLock4chain33 ParseBurnLockTxReceipt : parses data from a Burn/Lock/Withdraw event witnessed on chain33 into a Chain33Msg struct
// ParseBurnLock4chain33 ParseBurnLockTxReceipt : parses data from a Burn/Lock/Withdraw event witnessed on chain33 into a Chain33Msg struct
func
ParseBurnLock4chain33
(
evmEventType
Chain33EvmEvent
,
data
[]
byte
,
bridgeBankAbi
abi
.
ABI
,
chain33TxHash
[]
byte
)
(
*
Chain33Msg
,
error
)
{
func
ParseBurnLock4chain33
(
evmEventType
Chain33EvmEvent
,
data
[]
byte
,
bridgeBankAbi
abi
.
ABI
,
chain33TxHash
[]
byte
)
(
*
Chain33Msg
,
error
)
{
if
Chain33EventLogLock
==
evmEventType
{
if
Chain33EventLogLock
==
evmEventType
{
...
@@ -171,7 +169,7 @@ func ParseBurnLock4chain33(evmEventType Chain33EvmEvent, data []byte, bridgeBank
...
@@ -171,7 +169,7 @@ func ParseBurnLock4chain33(evmEventType Chain33EvmEvent, data []byte, bridgeBank
}
}
chain33Msg
:=
&
Chain33Msg
{
chain33Msg
:=
&
Chain33Msg
{
ClaimType
:
ClaimType
Burn
,
ClaimType
:
ClaimType
Withdraw
,
Chain33Sender
:
burnEvent
.
OwnerFrom
.
ToAddress
(),
Chain33Sender
:
burnEvent
.
OwnerFrom
.
ToAddress
(),
EthereumReceiver
:
common
.
BytesToAddress
(
burnEvent
.
EthereumReceiver
),
EthereumReceiver
:
common
.
BytesToAddress
(
burnEvent
.
EthereumReceiver
),
TokenContractAddress
:
burnEvent
.
BridgeToken
.
ToAddress
(),
TokenContractAddress
:
burnEvent
.
BridgeToken
.
ToAddress
(),
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/events/events.go
View file @
0b169565
...
@@ -31,5 +31,5 @@ func (d Event) String() string {
...
@@ -31,5 +31,5 @@ func (d Event) String() string {
}
}
func
(
d
ClaimType
)
String
()
string
{
func
(
d
ClaimType
)
String
()
string
{
return
[
...
]
string
{
"unknown-LOG"
,
"burn"
,
"lock"
}[
d
]
return
[
...
]
string
{
"unknown-LOG"
,
"burn"
,
"lock"
,
"withdraw"
}[
d
]
}
}
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