Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit 8b84ae3

Browse files
authored
Rename to BundlerExecutionTracer for clarity (#223)
1 parent e70171f commit 8b84ae3

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

pkg/entrypoint/execution/trace.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type TraceInput struct {
3232
}
3333

3434
type TraceOutput struct {
35-
Trace *tracer.BundlerErrorReturn
35+
Trace *tracer.BundlerExecutionReturn
3636
Result *reverts.ExecutionResultRevert
3737
Event *entrypoint.EntrypointUserOperationEvent
3838
}
@@ -84,14 +84,14 @@ func TraceSimulateHandleOp(in *TraceInput) (*TraceOutput, error) {
8484
}
8585
out := &TraceOutput{}
8686

87-
var res tracer.BundlerErrorReturn
87+
var res tracer.BundlerExecutionReturn
8888
req := utils.TraceCallReq{
8989
From: common.HexToAddress("0x"),
9090
To: in.EntryPoint,
9191
Data: tx.Data(),
9292
}
9393
opts := utils.TraceCallOpts{
94-
Tracer: tracer.Loaded.BundlerErrorTracer,
94+
Tracer: tracer.Loaded.BundlerExecutionTracer,
9595
}
9696
if err := in.Rpc.CallContext(context.Background(), &res, "debug_traceCall", &req, "latest", &opts); err != nil {
9797
return nil, err

pkg/tracer/load.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
//go:embed *BundlerCollectorTracer.js
13-
//go:embed *BundlerErrorTracer.js
13+
//go:embed *BundlerExecutionTracer.js
1414
var files embed.FS
1515
var (
1616
commentRegex = regexp.MustCompile("(?m)^.*//.*$[\r\n]+")
@@ -31,7 +31,7 @@ func parse(code string) string {
3131

3232
type Tracers struct {
3333
BundlerCollectorTracer string
34-
BundlerErrorTracer string
34+
BundlerExecutionTracer string
3535
}
3636

3737
// NewBundlerTracers reads the *Tracer.js files and returns a collection of strings that can be passed to a
@@ -64,7 +64,7 @@ func NewTracers() (*Tracers, error) {
6464
}
6565

6666
var et string
67-
err = fs.WalkDir(files, "BundlerErrorTracer.js", func(path string, d fs.DirEntry, err error) error {
67+
err = fs.WalkDir(files, "BundlerExecutionTracer.js", func(path string, d fs.DirEntry, err error) error {
6868
if err != nil {
6969
return err
7070
}
@@ -87,6 +87,6 @@ func NewTracers() (*Tracers, error) {
8787

8888
return &Tracers{
8989
BundlerCollectorTracer: bct,
90-
BundlerErrorTracer: et,
90+
BundlerExecutionTracer: et,
9191
}, nil
9292
}

pkg/tracer/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ type BundlerCollectorReturn struct {
5454
Debug []any `json:"debug"`
5555
}
5656

57-
// BundlerErrorReturn is the return value from performing an EVM trace with BundlerErrorTracer.js.
58-
type BundlerErrorReturn struct {
57+
// BundlerExecutionReturn is the return value from performing an EVM trace with BundlerExecutionTracer.js.
58+
type BundlerExecutionReturn struct {
5959
Reverts []string `json:"reverts"`
6060
ValidationOOG bool `json:"validationOOG"`
6161
ExecutionOOG bool `json:"executionOOG"`

0 commit comments

Comments
 (0)