-
Notifications
You must be signed in to change notification settings - Fork 20
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: added public addresses with failover #365
Conversation
pkg/web3/sdk.go
Outdated
@@ -229,7 +238,8 @@ func NewContractSDK(options Web3Options) (*Web3SDK, error) { | |||
TransactOpts: transactOpts, | |||
Contracts: contracts, | |||
} | |||
log.Debug().Msgf("Public Address: %s", web3SDK.GetAddress()) | |||
// fmt.Printf("Public Address: %s\n", web3SDK.GetAddress()) |
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.
Left over commented code
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.
Thank you @narbs91, I removed the commented code.
00ebd4d
to
c24eebc
Compare
c24eebc
to
0d09857
Compare
var client *ethclient.Client | ||
var err error | ||
for _, url := range rpcs { | ||
client, err = ethclient.Dial(url) |
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.
using dial is useless for select available rpc. since arb not check cu when connect.
my sugesstion is to use module like index := address%len(rpcsClients)
. or a more simple way to use random select
Summary
This pull request makes the following changes:
We are saturating our RPC endpoint. This fix uses a public rpc with a failover
Task/Issue reference
Closes: add_link_here
Test plan
These modifications were tested using my local GPU RP on the lilypad testnet- as a lilypad resource provider
Details (optional)
Add any additional details that will help to review this pull request.
Related issues or PRs (optional)
Add any related issues or PRs.