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
66894d52
Unverified
Commit
66894d52
authored
Aug 09, 2024
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-e2e: Fix preimage upload to use new ABI. (#274)
parent
ff136e1f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1091 deletions
+3
-1091
preimageoracle.go
op-e2e/bindings/preimageoracle.go
+0
-1072
output_game_helper.go
op-e2e/e2eutils/disputegame/output_game_helper.go
+3
-19
No files found.
op-e2e/bindings/preimageoracle.go
deleted
100644 → 0
View file @
ff136e1f
This diff is collapsed.
Click to expand it.
op-e2e/e2eutils/disputegame/output_game_helper.go
View file @
66894d52
...
...
@@ -14,10 +14,8 @@ import (
"github.com/ethereum-optimism/optimism/op-challenger/game/fault/types"
keccakTypes
"github.com/ethereum-optimism/optimism/op-challenger/game/keccak/types"
gameTypes
"github.com/ethereum-optimism/optimism/op-challenger/game/types"
"github.com/ethereum-optimism/optimism/op-e2e/bindings"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/transactions"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
preimage
"github.com/ethereum-optimism/optimism/op-preimage"
"github.com/ethereum-optimism/optimism/op-service/errutil"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/sources/batching/rpcblock"
...
...
@@ -651,23 +649,9 @@ func (g *OutputGameHelper) WaitForPreimageInOracle(ctx context.Context, data *ty
func
(
g
*
OutputGameHelper
)
UploadPreimage
(
ctx
context
.
Context
,
data
*
types
.
PreimageOracleData
,
privateKey
*
ecdsa
.
PrivateKey
)
{
oracle
:=
g
.
oracle
(
ctx
)
boundOracle
,
err
:=
bindings
.
NewPreimageOracle
(
oracle
.
Addr
(),
g
.
Client
)
g
.
Require
.
NoError
(
err
)
var
tx
*
gethtypes
.
Transaction
switch
data
.
OracleKey
[
0
]
{
case
byte
(
preimage
.
PrecompileKeyType
)
:
tx
,
err
=
boundOracle
.
LoadPrecompilePreimagePart
(
g
.
Opts
,
new
(
big
.
Int
)
.
SetUint64
(
uint64
(
data
.
OracleOffset
)),
data
.
GetPrecompileAddress
(),
data
.
GetPrecompileInput
(),
)
default
:
tx
,
err
=
boundOracle
.
LoadKeccak256PreimagePart
(
g
.
Opts
,
new
(
big
.
Int
)
.
SetUint64
(
uint64
(
data
.
OracleOffset
)),
data
.
GetPreimageWithoutSize
())
}
g
.
Require
.
NoError
(
err
,
"Failed to load preimage part"
)
_
,
err
=
wait
.
ForReceiptOK
(
ctx
,
g
.
Client
,
tx
.
Hash
())
g
.
Require
.
NoError
(
err
)
tx
,
err
:=
oracle
.
AddGlobalDataTx
(
data
)
g
.
Require
.
NoError
(
err
,
"Failed to create preimage upload tx"
)
transactions
.
RequireSendTx
(
g
.
T
,
ctx
,
g
.
Client
,
tx
,
g
.
PrivKey
)
}
func
(
g
*
OutputGameHelper
)
oracle
(
ctx
context
.
Context
)
contracts
.
PreimageOracleContract
{
...
...
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