Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshklop committed Dec 17, 2024
1 parent 40406f3 commit 968b142
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,11 @@ func (e *EngineAPI) NewPayloadV2(payload eth.ExecutionPayload) (*eth.PayloadStat
}

// NewPayloadV3 ensures the payload's block hash is present in the block store.
func (e *EngineAPI) NewPayloadV3(payload eth.ExecutionPayload, _ []common.Hash, _ *common.Hash) (*eth.PayloadStatusV1, error) { //nolint:gocritic
func (e *EngineAPI) NewPayloadV3(
payload eth.ExecutionPayload, //nolint:gocritic
_ []common.Hash,
_ *common.Hash,
) (*eth.PayloadStatusV1, error) {
// TODO use the parentBeaconBlockRoot, etc.
e.lock.Lock()
defer e.lock.Unlock()
Expand Down
4 changes: 2 additions & 2 deletions integrations/integrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func startOPDevnet(
if !common.IsHexAddress(l1UserAddressStr) {
return errors.New("l1 user address is not a valid hex address")
}
balance, ok := new(big.Int).SetString("0x152D02C7E14AF6800000", 16) // 100,000 ETH
balance, ok := new(big.Int).SetString("0x152D02C7E14AF6800000", 0) // 100,000 ETH
if !ok {
return errors.New("failed to parse balance as big int")
}
Expand Down Expand Up @@ -491,7 +491,7 @@ func startMonomerNode(
trieDB := triedb.NewDatabase(rawDB, nil)
env.DeferErr("close trieDB", trieDB.Close)
snapshotTree, err := snapshot.New(snapshot.Config{
CacheSize: defaultCacheSize, // TODO
CacheSize: defaultCacheSize,
}, rawDB, trieDB, common.Hash{})
if err != nil {
return fmt.Errorf("new snapshot tree: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion opdevnet/l1.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (cfg *L1Config) Run(ctx context.Context, env *environment.Env, logger log.L
})
gethInstance, err := geth.InitL1(
cfg.BlockTime,
8,
8, //nolint:mnd
cfg.Genesis,
clock.NewAdvancingClock(time.Second), // Arbitrary working duration. Eventually consumed by geth lifecycle instances.,
cfg.BlobsDirPath,
Expand Down
4 changes: 2 additions & 2 deletions testutils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func GenerateEthTxs(t *testing.T) (*gethtypes.Transaction, *gethtypes.Transactio
}

func GenerateEthBridgeDepositTx(t *testing.T, userAddr common.Address, amount *big.Int) *gethtypes.Transaction {
// We should techincally use the ABI for the L2StandardBridge, but we only have the L1 bindings and they work fine here.
// We should technically use the ABI for the L2StandardBridge, but we only have the L1 bindings and they work fine here.
standardBridgeABI, err := abi.JSON(strings.NewReader(opbindings.L1StandardBridgeMetaData.ABI))
require.NoError(t, err)
rng := rand.New(rand.NewSource(1234))
Expand All @@ -108,7 +108,7 @@ func GenerateEthBridgeDepositTx(t *testing.T, userAddr common.Address, amount *b
}

func GenerateERC20DepositTx(t *testing.T, tokenAddr, userAddr common.Address, amount *big.Int) *gethtypes.Transaction {
// We should techincally use the ABI for the L2StandardBridge, but we only have the L1 bindings and they work fine here.
// We should technically use the ABI for the L2StandardBridge, but we only have the L1 bindings and they work fine here.
standardBridgeABI, err := abi.JSON(strings.NewReader(opbindings.L1StandardBridgeMetaData.ABI))
require.NoError(t, err)
rng := rand.New(rand.NewSource(1234))
Expand Down
2 changes: 1 addition & 1 deletion x/rollup/keeper/deposits.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (k *Keeper) processCrossDomainMessage(ctx sdk.Context, txData []byte) (*sdk
}
// It is a bit lazy to use the L1StandardBridge ABI instead of the L2StandardBridge ABI, but the bindings
// package doesn't have the latter. Plus, we know that the functions we want are implemented in the StandardBridge
// abstract contract and aren't overriden.
// abstract contract and aren't overridden.
standardBridgeABI, err := abi.JSON(strings.NewReader(crossdomainbindings.L1StandardBridgeMetaData.ABI))
if err != nil {
return nil, fmt.Errorf("failed to parse StandardBridge ABI: %v", err)
Expand Down

0 comments on commit 968b142

Please sign in to comment.