Farseen0/scar-pairs huggingface dataset:
MEDIUM severity: The `MigrateWithdrawal` function in the `migrate.go` file is responsible for transforming a LegacyWi. The `MigrateWithdrawal` function in the `migrate.go` file is responsible for transforming a LegacyWithdrawal into a Bedrock-style Withdrawal. This process involves setting a minimum gas limit for the withdrawal. However, the function's gas limit calculation is flawed, as it overestimates the require...

Vulnerable code:
```\nfunc MigrateWithdrawal(withdrawal *LegacyWithdrawal, l1CrossDomainMessenger *common.Address) (*Withdrawal, error) {\n    value, err := withdrawal.Value()\n    if err!= nil {\n        return nil, fmt.Errorf("cannot migrate withdrawal: %w", err)\n    }\n\n    abi, err := bindings.L1CrossDomainMessengerMetaData.GetAbi()\n    if err!= nil {\n        return nil, err\n    }\n\n    versionedNonce := EncodeVersionedNonce(withdrawal.Nonce, new(big.Int))\n\n    data, err := abi.Pack(\n        "relayMessage",\n        versionedNonce,\n        withdrawal.Sender,\n        withdrawal.Target,\n        value,\n        new(big.Int),\n        withdrawal.Data,\n    )\n    if err!= nil {\n        return nil, fmt.Errorf("cannot abi encode relayMessage: %w", err)\n    }\n\n    gasLimit := uint64(len(data)*16 + 200_000)\n\n    w := NewWithdrawal(\n        versionedNonce,\n        &predeploys.L2CrossDomainMessengerAddr,\n        l1CrossDomainMessenger,\n        value,\n        new(big.Int).SetUint64(gasLimit),\n        data,\n    )\n    return w, nil\n```