In my first pass at upgrading siwe to use ethers 2, I changed siwe to accept an Arc. My code worked with this but it changed the api. Prestwich then showed us how to have a contract that took a reference, so I removed the Arc. It compiled with that change, but I didn't test it with my app.
The problem now is that my app currently has the provider in an Arc. So I can pass either an Arc<Provider<Http>> or a &Provider<Http>, but VerificationOpts currently wants a Provider<Http>.
So something about VerificationOpts needs to change. I'm not sure the best option.
Maybe change it to take a reference? Maybe use the maybe-owned crate?
We can also use this as a chance to let it accept other connection types instead of just Http (I would like to use IPC for my app, but websockets are also common).
In my first pass at upgrading siwe to use ethers 2, I changed siwe to accept an
Arc. My code worked with this but it changed the api. Prestwich then showed us how to have a contract that took a reference, so I removed theArc. It compiled with that change, but I didn't test it with my app.The problem now is that my app currently has the provider in an
Arc. So I can pass either anArc<Provider<Http>>or a&Provider<Http>, but VerificationOpts currently wants aProvider<Http>.So something about VerificationOpts needs to change. I'm not sure the best option.
Maybe change it to take a reference? Maybe use the maybe-owned crate?
We can also use this as a chance to let it accept other connection types instead of just Http (I would like to use IPC for my app, but websockets are also common).