Skip to content

fix(cacao): derive EIP-1271 ABI signature length from bytes - #278

Open
SashaMIT wants to merge 1 commit into
WalletConnect:masterfrom
SashaMIT:fix/cacao-eip1271-signature-length
Open

fix(cacao): derive EIP-1271 ABI signature length from bytes#278
SashaMIT wants to merge 1 commit into
WalletConnect:masterfrom
SashaMIT:fix/cacao-eip1271-signature-length

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • @walletconnect/cacao hardcoded the EIP-1271 ABI bytes length to 0x41 (65), so non-65-byte smart-account signatures were mis-encoded into eth_call calldata.
  • Derive length from the hex signature payload (parity with @walletconnect/utils / walletconnect-monorepo).
  • Also include SIWE Expiration Time / Not Before / Request ID in formatMessage when present on the CACAO payload.

Test plan

  • Existing cacao EIP-1271 mocha tests (need TEST_PROJECT_ID)
  • Manual review against monorepo packages/utils/src/signatures.ts length derivation

Made with Cursor

Hardcoding 0x41 (65) mis-encodes non-65-byte smart-account signatures
on eth_call. Match @walletconnect/utils by deriving length from the
hex payload. Also bind SIWE exp/nbf/requestId into formatMessage.

Signed-off-by: Sasha Mitchell <sash.t.mitchell@gmail.com>
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Thank you for your contribution! We ask that you please read and sign our CTA Document before we can accept your contribution. You can sign the CTA simply by posting a Pull Request Comment with the following text:


I have read the CTA Document and I hereby sign the CTA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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.

1 participant