-
Notifications
You must be signed in to change notification settings - Fork 2
Add filecoin support #221
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
Add filecoin support #221
Conversation
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2beec61 to
42e8f5a
Compare
42e8f5a to
784738e
Compare
Updates the supported chains to support filecoin and filecoin calibration. Because of the JWT authentication of Glif the rpcFactory and evmClient builder were imported from the hypercerts-indexer. Test were created and updated accordingly
For some reason the Safe provider didn't play nicely with the EIP1193 client and threw the following errors: An unknown RPC error occurred.Details: request already sent (operation="fetchRequest.send", code=UNSUPPORTED_OPERATION, version=6.12.2)Version: [email protected] This patch just goes back to the easy init method of providing an RPC URL, to fix the issue.
For signature validations we need to make contract read calls. Safe protocol kit expects an RPC URL to make these calls, but on Filecoin mainnet and Filecoin Calibration they need to be JWT authenticated. This poses a problem with the initializer of the Safe SDK so we decided to use public RPCs on these two networks.
This is so that additional safe logic can be grouped into the safe folder while keeping the signature verification logic in its own folder.
The type signature that's generated in types/supabaseData.ts claims that chain_id is a number, while in reality it's a string.
Without this patch we solely rely on the Safe API Kit to figure out the URL to the Safe Transaction Service. However, this doesn't work for Filecoin Mainnet and Filecoin Calibration. These networks need an explicit URL.
784738e to
1626b62
Compare
Removes the 1193 provider previously introduces as this is no longer needed. Instead of providing the 1193 provider, we provide public RPCs to the filecoin provider
|
The support for signatures via Safes on FVM unfortunately doesn't work with this PR. The issue was raised with the FVM team and we're investigating. Reported by @pheuberger in Telegram:
As a fast follow up to merging this PR, we should implement feature toggles in the FE ASAP so users won't run into the broken integration. Issue for feature toggles: hypercerts-org/hypercerts-app#349 |
As we want to progress with this PR, the test pipeline should be green. However, we know the code isn't completely functional since the Safe intergration on filecoin is still broken. So, enforcing full coverage of the changes or continuity in the coverage doesn't make sense at this moment. All thresholds were reduces 1 percentage point. We'll manage.
Jipperism
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, great we're following the same pattern with rpc clients everywhere now. Can't wait for hypercerts-org/internal-sdk 😅
Updates the supported chains to support filecoin and filecoin calibration. Because of the JWT authentication of Glif the rpcFactory and evmClient builder were imported from the hypercerts-indexer.
Test were created and updated accordingly