FuelLabs / fuels-rs

Fuel Network Rust SDK
https://fuellabs.github.io/fuels-rs
Apache License 2.0
44.04k stars 1.34k forks source link

Multiple provider support #1508

Open digorithm opened 2 months ago

digorithm commented 2 months ago

Because we'll now have multiple official third-party RPC providers for the Fuel network, we should support more advanced use cases for setting providers within the Rust SDK, including multiple providers with basic failover logic.

Ideally, we want to support the building of something like the Ethers JS FallbackProvider.

This RPC failover support should allow developers to provide an ordered list of RPC endpoint URLs. The first endpoint in the list should be tried first, followed by the second, and so on until a successful response is returned or the list is exhausted.