Skip to content

Conversation

@hiletmis
Copy link
Contributor

@hiletmis hiletmis commented Dec 1, 2025

Closes Add keycard support as alternative to MNEMONIC based signer

This PR adds support for keycard by implementing keycard-hardhat-provider plugin.

  • accounts object is changed to optional to allow keycardAccount to override the main signer.
  • KEYCARD_ACCOUNT is a wallet address, once it is placed in .env file hardhat config will expect a keycard wallet with specified account. If there is no wallet address keycardAccount will not be configured.

Additional changes:
A transaction confirmation is added to deployApi3ReaderProxyV1 to avoid transaction overlap while deploying contracts.

@hiletmis hiletmis requested a review from bdrhn9 December 1, 2025 14:06
Copy link
Contributor

@bdrhn9 bdrhn9 left a comment

Choose a reason for hiding this comment

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

Thank you for this intellectual approach and the clean implementation. I took the time to review the source code for keycard-hardhat-provider, and I learned about how the Hardhat provider can be extended as a side effect of the import.

I tested the following configurations, and they worked as expected:

  • Filling KEYCARD_ACCOUNT with the correct address.
  • Filling KEYCARD_ACCOUNT with an incorrect address.
  • Filling only the MNEMONIC.

The only thing that could be improved is the handling of EIP-55 checksums. I encountered this error when providing an address that satisfies checksum encoding (e.g., 0x46C6Ef8f5C3f13Ef35d94C4E7E0287b0cdbFCfa2). It appears the current implementation throws an error because it strictly expects a lowercase address.

Merge main into add-keycard-support branch
@hiletmis
Copy link
Contributor Author

hiletmis commented Jan 9, 2026

Thanks a lot for the detailed review. I will add comply with eip-55 on keycard-hardhat-provider side

@hiletmis hiletmis marked this pull request as ready for review January 9, 2026 07:06
@hiletmis hiletmis requested a review from bbenligiray as a code owner January 9, 2026 07:06
@hiletmis hiletmis merged commit 6256c47 into main Jan 9, 2026
4 checks passed
@hiletmis hiletmis deleted the add-keycard-support branch January 9, 2026 13:31
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.

Add keycard support as alternative to MNEMONIC based signer

3 participants