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

feat(protocol-kit): Add Viem adapter #665

Draft
wants to merge 45 commits into
base: main
Choose a base branch
from

Conversation

farreldarian
Copy link

What it solves

Resolves #594

How this PR fixes it

Created ViemAdapter

Copy link

github-actions bot commented Jan 14, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@farreldarian farreldarian mentioned this pull request Jan 14, 2024
@farreldarian
Copy link
Author

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

@d4mr
Copy link

d4mr commented Feb 9, 2024

This will be great to have, anything pending to add, or anything we can do to help expedite this?

@farreldarian
Copy link
Author

Hi @d4mr, I hope to continue on this over the weekend, currently the tests are still failing. Additionally, I might need to check for any change from the AbiType migration (e.g. #673)

@farreldarian
Copy link
Author

Update: 10 test failing

     AbiFunctionNotFoundError: Function "isValidSignature(bytes32,bytes)" not found on ABI.
Make sure you are using the correct ABI and that the function exists on it.

Docs: https://viem.sh/docs/contract/encodeFunctionData.html
Version: viem@2.0.6
      at encodeFunctionData (/Users/farreldarian/code/safe-global/safe-core-sdk/node_modules/viem/utils/abi/encodeFunctionData.ts:92:22)
      at CompatibilityFallbackHandler_V1_4_1_Viem.encode (src/adapters/viem/ViemContract.ts:2:789)
      at Safe.isValidSignature (src/Safe.ts:41:17)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Context.<anonymous> (tests/e2e/eip1271-contract-signatures.test.ts:292:11)

Need to check on how to specify overloaded function

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.

Support viem
2 participants