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

✨ (signer-eth) [DSDK-617]: Remove ethers dependency from api and accept only raw tx #591

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

aussedatlo
Copy link
Contributor

@aussedatlo aussedatlo commented Jan 6, 2025

📝 Description

⚠️ Warning ⚠️

This PR introduces a breaking change for the signTransaction function of the ethereum signer.

This PR aims to remove the multiple ethers dependency from the api.
From now on, we only need to provide the raw transaction to a signTransaction. The Transaction object from ethers versions v5 and v6 are no longer supported, and there are no plans to integrate other Ethereum libraries since they all provide ways to retrieve the raw transaction.

We internally use ethers v6 for parsing. We don't need it anymore on the sample side as we use directly raw format.

❓ Context

  • Feature:

✅ Checklist

Pull Requests must pass CI checks and undergo code review. Set the PR as Draft if it is not yet ready for review.

  • Covered by automatic tests
  • Changeset is provided
  • Impact of the changes:
    • ⚠️ Warning ⚠️ signTransaction takes now a raw transaction instead of ethers Transaction object.

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.

@aussedatlo aussedatlo requested a review from a team as a code owner January 6, 2025 15:54
Copy link

vercel bot commented Jan 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
device-sdk-ts-sample ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 3:54pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
doc-device-management-kit ⬜️ Ignored (Inspect) Jan 6, 2025 3:54pm

Copy link
Contributor

github-actions bot commented Jan 6, 2025

Messages
Danger: All checks passed successfully! 🎉

Generated by 🚫 dangerJS against 15900a8

"@ledgerhq/device-signer-kit-ethereum": minor
---

Breaking change: remove ethers from api dependency and use only raw tx for signTransaction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if 'breaking change' wording is compatible to minor versioning.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree but basically for signers we shouldn't have release v1.0 it was more 1.0-rc

@@ -46,7 +46,7 @@ describe("DefaultSignerEth", () => {
it("should sign a transaction", async () => {
// GIVEN
const derivationPath = "derivationPath";
const transaction = {} as Transaction;
const transaction = new Uint8Array(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[COULD] I think the 0 parameter is not necessary to initialise a fake data, new Uint8Array() is OK, but not important.

Copy link

@smartine-ledger smartine-ledger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants