Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
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
exchain
nebula
Commits
0b345704
Commit
0b345704
authored
Sep 10, 2023
by
Hamdi Allam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci fixes
parent
62db2c04
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
bridge.go
indexer/processors/bridge.go
+1
-1
legacy.go
indexer/processors/bridge/legacy.go
+1
-1
legacy_bridge.go
indexer/processors/contracts/legacy_bridge.go
+4
-0
No files found.
indexer/processors/bridge.go
View file @
0b345704
...
...
@@ -145,7 +145,7 @@ func (b *BridgeProcessor) Start(ctx context.Context) error {
legacyFromL2Height
,
legacyToL2Height
:=
fromL2Height
,
toL2Height
if
l1BedrockStartingHeight
.
Cmp
(
toL1Height
)
<=
0
{
legacyToL1Height
=
new
(
big
.
Int
)
.
Sub
(
l1BedrockStartingHeight
,
big
.
NewInt
(
1
))
legacyToL
1
Height
=
new
(
big
.
Int
)
.
Sub
(
l2BedrockStartingHeight
,
big
.
NewInt
(
1
))
legacyToL
2
Height
=
new
(
big
.
Int
)
.
Sub
(
l2BedrockStartingHeight
,
big
.
NewInt
(
1
))
}
l1BridgeLog
:=
l1BridgeLog
.
New
(
"mode"
,
"legacy"
)
...
...
indexer/processors/bridge/legacy.go
View file @
0b345704
...
...
@@ -135,7 +135,7 @@ func LegacyL2ProcessInitiatedBridgeEvents(log log.Logger, db *database.DB, fromH
sentMessage
:=
crossDomainSentMessages
[
i
]
sentMessages
[
logKey
{
sentMessage
.
Event
.
BlockHash
,
sentMessage
.
Event
.
LogIndex
}]
=
&
sentMessage
// To ensure consitency in our schema, we duplicate this as the "root" transaction withdrawal. We re-use the same withdrawal hash as the storage
// To ensure consi
s
tency in our schema, we duplicate this as the "root" transaction withdrawal. We re-use the same withdrawal hash as the storage
// key for the proof sha3(calldata + sender) can be derived from the fields. (NOTE: should we just use the storage key here?)
l2BridgeMessages
[
i
]
=
database
.
L2BridgeMessage
{
TransactionWithdrawalHash
:
sentMessage
.
BridgeMessage
.
MessageHash
,
BridgeMessage
:
sentMessage
.
BridgeMessage
}
l2TransactionWithdrawals
[
i
]
=
database
.
L2TransactionWithdrawal
{
...
...
indexer/processors/contracts/legacy_bridge.go
View file @
0b345704
...
...
@@ -88,6 +88,10 @@ func L2StandardBridgeLegacyWithdrawalInitiatedEvents(contractAddress common.Addr
withdrawalInitiatedEventAbi
:=
l2StandardBridgeAbi
.
Events
[
"WithdrawalInitiated"
]
withdrawalEvents
,
err
:=
db
.
ContractEvents
.
L2ContractEventsWithFilter
(
database
.
ContractEvent
{
ContractAddress
:
contractAddress
,
EventSignature
:
withdrawalInitiatedEventAbi
.
ID
},
fromHeight
,
toHeight
)
if
err
!=
nil
{
return
nil
,
err
}
withdrawals
:=
make
([]
LegacyBridgeEvent
,
len
(
withdrawalEvents
))
for
i
:=
range
withdrawalEvents
{
bridgeEvent
:=
bindings
.
L2StandardBridgeWithdrawalInitiated
{
Raw
:
*
withdrawalEvents
[
i
]
.
RLPLog
}
...
...
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