-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add Mevshare protocol #8
Conversation
cc: @zeroXbrock |
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.
this is awesome, gonna save so much hassle. Just had one unresolved TODO @ferranbt not sure if you wanna merge before that's finished
src/protocols/MevShare.sol
Outdated
request.headers = new string[](1); | ||
request.headers[0] = "Content-Type:application/json"; | ||
request.body = encodeBundle(bundle); | ||
// TODO: Add Flashbots signature |
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's needed to add the FB signature? I think we can just add the private key as a param to this function, then it's basically copypasta from the ethers lib
test/protocols/MevShare.t.sol
Outdated
bundle.inclusionBlock = 1; | ||
|
||
bundle.bodies = new bytes[](1); | ||
bundle.bodies[0] = abi.encode(1234); |
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.
just a nit but might change 1234
to 0x1234
. I like to use hex values directly in cases like this where you'd want to see [where] the same number shows up in the test assertion
This PR adds a library for the Mev-Share protocol specified here