-
Notifications
You must be signed in to change notification settings - Fork 13
Refactor dual broadcast clients #114
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
Conversation
Closed by accident |
af3b955
to
1f7ad31
Compare
func SelectClient(lggr logger.Logger, client client.Client, keyStore keys.ChainStore, url *url.URL, chainID *big.Int) txm.Client { | ||
urlString := url.String() | ||
switch { | ||
case strings.Contains(urlString, "flashbots"): |
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.
Is is possible to make this more specific to avoid incidental false positives? Like by comparing to the url fields, or including more characters at the start & end?
SignTx(ctx context.Context, fromAddress common.Address, tx *evmtypes.Transaction) (*evmtypes.Transaction, error) | ||
} | ||
|
||
type MetaClient struct { |
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.
What does Meta
mean in this context? We are already in package dualbroadcast
, can this just be a dualbroadcast.Client
?
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.
Er, maybe just some docs would help
lggr logger.SugaredLogger | ||
c client.Client | ||
ks MetaClientKeystore | ||
customURL *url.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.
customURL *url.URL | |
url *url.URL |
or
customURL *url.URL | |
endpoint *url.URL |
Signature hexutil.Bytes `json:"signature"` | ||
} | ||
|
||
type requestResponse struct { |
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.
Slightly more descriptive:
type requestResponse struct { | |
type metaResponse struct { |
Please fill in the PR description a bit, helpful for traceability |
This PR is stale because it has been open 30 days with no activity. |
20db9bf
to
0920cd0
Compare
2bc3717
to
6479762
Compare
4516176
to
5fb674c
Compare
360144c
bfdacb3
to
eea7b24
Compare
9ebf5a4
to
d12bb4d
Compare
* Refactor dual broadcast clients * Fix DetectionURL * Add verification * More changes * Update metaclient params * Add control check * Add metacalldata unpacking for verification * Nit * Add tests * Update client * Fix send transaction bug * Add fuzzing tests * Don't broadcast without SOPs * Use mapstructure for unpacking input tuple to go struct * Tidy --------- Co-authored-by: Eric Fornaciari <[email protected]>
* Refactor dual broadcast clients * Fix DetectionURL * Add verification * More changes * Update metaclient params * Add control check * Add metacalldata unpacking for verification * Nit * Add tests * Update client * Fix send transaction bug * Add fuzzing tests * Don't broadcast without SOPs * Use mapstructure for unpacking input tuple to go struct * Tidy --------- Co-authored-by: Eric Fornaciari <[email protected]>
No description provided.