Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade ethereumjs packages #209

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Feb 14, 2025

Upgrade all @ethereumjs/* packages:

  • @ethereumjs/util - ^8.1.0 > ^9.1.0
  • @ethereumjs/tx - ^4.2.0 > ^5.4.0
  • @ethereumjs/common - ^3.2.0 > ^4.4.0

Necessary to align with @metamask/transaction-controller which requires the latest versions to support EIP-7702 transactions.

Requires @metamask/utils PR.

Minor refactors to support breaking changes, primarily:

  • Buffer usage replaced with Uint8Array.
  • bufferToHex > bytesToHex
  • Transaction Constructor > LegacyTransaction.fromTxData
  • TxData > TypedTxData
  • getMessageToSign(false) > getMessageToSign
  • getMessageToSign(true) > getHashedMessageToSign

Notes

  • Using bytesToHex from @metamask/utils rather than @ethereumjs/utils for additional control and performance.
  • Intentionally doing the minimum refactors to private methods and existing logic hence the continued use of Buffer.

@matthewwalsh0
Copy link
Member Author

@metamaskbot publish-preview

Copy link

Preview builds have been published. See these instructions (from the core monorepo) for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/keyring-api": "17.0.0-44b05d1",
  "@metamask-previews/eth-hd-keyring": "10.0.0-44b05d1",
  "@metamask-previews/eth-ledger-bridge-keyring": "8.0.4-44b05d1",
  "@metamask-previews/eth-simple-keyring": "8.1.0-44b05d1",
  "@metamask-previews/eth-trezor-keyring": "6.1.0-44b05d1",
  "@metamask-previews/keyring-internal-api": "4.0.2-44b05d1",
  "@metamask-previews/keyring-internal-snap-client": "4.0.0-44b05d1",
  "@metamask-previews/eth-snap-keyring": "10.0.0-44b05d1",
  "@metamask-previews/keyring-snap-client": "4.0.0-44b05d1",
  "@metamask-previews/keyring-snap-sdk": "3.0.0-44b05d1",
  "@metamask-previews/keyring-utils": "2.1.0-44b05d1"
}

@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review February 14, 2025 23:07
@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner February 14, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant