metachris / flashbotsrpc

Golang client for Flashbots Relay, mev-geth and standard Ethereum JSON-RPC API endpoints
https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint/
MIT License
165 stars 55 forks source link

feat: validate callBundle params #24

Open tiennampham23 opened 1 year ago

tiennampham23 commented 1 year ago

When we send callBundle requests, the Flashbot specifies certain parameters that are necessary. But when we miss one of these fields, Flashbot will return the error "Internal Error".

It is very hard to debug. So I add some lines of code to validate the parameters following the Flashbot documentation to save a lot of time for other developers who will use this endpoint.

tiennampham23 commented 1 year ago

@metachris PTAL, thanks