Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ update-superchain-registry:
update-and-vendor-superchain-registry: update-superchain-registry vendor-superchain-registry

generate-monorepo-bindings: install-abigen
./scripts/generate-bindings.sh -u $(just calculate-artifact-url) -n CrossL2Inbox,L2ToL2CrossDomainMessenger,L1BlockInterop,SuperchainWETH,SuperchainERC20,SuperchainTokenBridge -o ./bindings
./scripts/generate-bindings.sh -u $(just calculate-artifact-url) -n CrossL2Inbox,L2ToL2CrossDomainMessenger,L1Block,SuperchainWETH,SuperchainERC20,SuperchainTokenBridge -o ./bindings

generate-genesis: build-contracts
go run ./genesis/cmd/main.go --monorepo-artifacts $(just calculate-artifact-url) --periphery-artifacts ./contracts/out --outdir ./genesis/generated
Expand Down
37 changes: 23 additions & 14 deletions anvil/anvil.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,13 @@ func (a *Anvil) SetIntervalMining(ctx context.Context, result interface{}, inter

// DebugTraceCall internal types
type txArgs struct {
From common.Address `json:"from"`
To *common.Address `json:"to"`
Gas hexutil.Uint64 `json:"gas"`
GasPrice *hexutil.Big `json:"gasPrice"`
Data hexutil.Bytes `json:"data"`
Value *hexutil.Big `json:"value"`
From common.Address `json:"from"`
To *common.Address `json:"to"`
Gas hexutil.Uint64 `json:"gas"`
GasPrice *hexutil.Big `json:"gasPrice"`
Data hexutil.Bytes `json:"data"`
Value *hexutil.Big `json:"value"`
AccessList types.AccessList `json:"accessList"`
}
type callFrame struct {
Logs []callLog `json:"logs"`
Expand All @@ -331,7 +332,15 @@ func (a *Anvil) SimulatedLogs(ctx context.Context, tx *types.Transaction) ([]typ
return nil, fmt.Errorf("failed to retrieve tx sender: %w", err)
}

txArgs := txArgs{From: from, To: tx.To(), Gas: hexutil.Uint64(tx.Gas()), GasPrice: (*hexutil.Big)(tx.GasPrice()), Data: tx.Data(), Value: (*hexutil.Big)(tx.Value())}
txArgs := txArgs{
From: from,
To: tx.To(),
Gas: hexutil.Uint64(tx.Gas()),
GasPrice: (*hexutil.Big)(tx.GasPrice()),
Data: tx.Data(),
Value: (*hexutil.Big)(tx.Value()),
AccessList: tx.AccessList(),
}
result := callFrame{}
if err := a.rpcClient.CallContext(ctx, &result, "debug_traceCall", txArgs, "pending", logTracerParams); err != nil {
return nil, err
Expand All @@ -358,14 +367,14 @@ func (a *Anvil) DebugTraceCall(ctx context.Context, tx *types.Transaction) (*con
}

txArgs := txArgs{
From: from,
To: tx.To(),
Gas: hexutil.Uint64(tx.Gas()),
GasPrice: (*hexutil.Big)(tx.GasPrice()),
Data: tx.Data(),
Value: (*hexutil.Big)(tx.Value()),
From: from,
To: tx.To(),
Gas: hexutil.Uint64(tx.Gas()),
GasPrice: (*hexutil.Big)(tx.GasPrice()),
Data: tx.Data(),
Value: (*hexutil.Big)(tx.Value()),
AccessList: tx.AccessList(),
}

var result config.TraceCallResult
err = a.rpcClient.CallContext(ctx, &result, "debug_traceCall", txArgs, "pending", map[string]interface{}{
"tracer": "callTracer",
Expand Down
206 changes: 15 additions & 191 deletions bindings/crossl2inbox.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading