-
Notifications
You must be signed in to change notification settings - Fork 9
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
Proxy issues #56
Comments
Hey I just totally redid it Notes: It's really solid after first time initalization for a few seconds. then the fastest network is cached. The test is way more robust, it actually downloads the smart contract code of permit2. The RPC endpoints cant lie about that response, like block height. They have to actually read the chain data correctly https://github.com/0x4007/rpc2 Will install and test in pay.ubq.fi after I get some rest. If you're motivated you can work on integrating it for the next 12 hours or so. |
How come you didn't use JsonRpcProvider from ethers? Without that we have to manually encode and decode data |
I can probably make an adapter quite easily when I have more time |
Sorry guys I'll be back home tonight. Probs missed it, but as far as I know pay.ubq.fi is running on @whilefoo I'm sure it was because |
Same applies here as in this comment @whilefoo Do you feel it'd be better/cleaner to extend the |
It sounds like it's cleaner to extend BaseProvider but I'm not sure how much work is that and how much abstraction we lose, maybe extending JsonRpcProvider could be another option |
Because we are having problems with RPCs I looked at the code and found some quirks that I don't understand and some improvements that could be made.
@Keyrxng since you did this part, is there any reason why a JsonRpcProvider is wrapped with the Proxy two times, once here:
https://github.com/ubiquity/rpc-handler/blame/7a24b8a491695bb2121d01e44f4e7a4745ec61e7/types/rpc-handler.ts#L271
and here:
https://github.com/ubiquity/rpc-handler/blame/7a24b8a491695bb2121d01e44f4e7a4745ec61e7/types/rpc-handler.ts#L93
And is there a reason why we didn't just extend the BaseProvider from ethers?
Improvements:
The text was updated successfully, but these errors were encountered: