{"id":17604862,"url":"https://github.com/metachris/flashbotsrpc","last_synced_at":"2025-08-20T08:08:32.079Z","repository":{"id":42625919,"uuid":"396828803","full_name":"metachris/flashbotsrpc","owner":"metachris","description":"Golang client for Flashbots Relay, mev-geth and standard Ethereum JSON-RPC API endpoints","archived":false,"fork":false,"pushed_at":"2024-08-05T14:45:29.000Z","size":48,"stargazers_count":171,"open_issues_count":7,"forks_count":58,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-29T03:11:18.931Z","etag":null,"topics":["flashbots","golang","rpc"],"latest_commit_sha":null,"homepage":"https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metachris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-16T14:23:36.000Z","updated_at":"2025-03-25T11:57:52.000Z","dependencies_parsed_at":"2024-06-18T14:04:32.647Z","dependency_job_id":"ea85acce-019a-4170-8ef8-9a805a1940cf","html_url":"https://github.com/metachris/flashbotsrpc","commit_stats":{"total_commits":23,"total_committers":4,"mean_commits":5.75,"dds":"0.13043478260869568","last_synced_commit":"f234223caf535fadac0838c151689ed79103086d"},"previous_names":["metachris/flashbots-rpc"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metachris%2Fflashbotsrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metachris%2Fflashbotsrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metachris%2Fflashbotsrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metachris%2Fflashbotsrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metachris","download_url":"https://codeload.github.com/metachris/flashbotsrpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284954,"owners_count":20913704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flashbots","golang","rpc"],"created_at":"2024-10-22T14:24:46.388Z","updated_at":"2025-04-05T04:14:57.276Z","avatar_url":"https://github.com/metachris.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flashbots RPC client\n\n[![Test status](https://github.com/metachris/flashbotsrpc/workflows/Test/badge.svg)](https://github.com/metachris/flashbotsrpc/actions?query=workflow%3A%22Test%22)\n\nFork of [ethrpc](https://github.com/onrik/ethrpc) with additional [Flashbots RPC methods](https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint):\n\n* `FlashbotsCallBundle` ([`eth_callBundle`](https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint/#eth_callbundle))\n* `FlashbotsSendBundle` ([`eth_sendBundle`](https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint/#eth_sendbundle))\n* `FlashbotsGetUserStats` ([`flashbots_getUserStats`](https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint/#flashbots_getuserstats))\n* `FlashbotsSendPrivateTransaction` (`eth_sendPrivateTransaction`)\n* `FlashbotsCancelPrivateTransaction` (`eth_cancelPrivateTransaction`)\n* `FlashbotsSimulateBlock`: simulate a full block\n\n## Usage\n\nAdd library to your project:\n\n`go get github.com/metachris/flashbotsrpc`\n\nCreate a new private key here for testing (you probably want to use an existing one):\n\n```go\nprivateKey, _ := crypto.GenerateKey()\n```\n\n#### Simulate transactions with `eth_callBundle`:\n\n```go\ncallBundleArgs := flashbotsrpc.FlashbotsCallBundleParam{\n    Txs:              []string{\"YOUR_RAW_TX\"},\n    BlockNumber:      fmt.Sprintf(\"0x%x\", 13281018),\n    StateBlockNumber: \"latest\",\n}\n\nresult, err := rpc.FlashbotsCallBundle(privateKey, callBundleArgs)\nif err != nil {\n    log.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)\n```\n\n#### Get Flashbots user stats:\n\n```go\nrpc := flashbotsrpc.New(\"https://relay.flashbots.net\")\nresult, err := rpc.FlashbotsGetUserStats(privateKey, 13281018)\nif err != nil {\n    log.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)\n```\n\n#### Send a transaction bundle to Flashbots with `eth_sendBundle`:\n\n```go\nsendBundleArgs := flashbotsrpc.FlashbotsSendBundleRequest{\n    Txs:         []string{\"YOUR_RAW_TX\"},\n    BlockNumber: fmt.Sprintf(\"0x%x\", 13281018),\n}\n\nresult, err := rpc.FlashbotsSendBundle(privateKey, sendBundleArgs)\nif err != nil {\n    log.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)\n```\n\n#### Send a transaction bundle to a list of Builder endpoints with `eth_sendBundle` (full example [/examples/broadcastbundle]):\n\n```go\nurls := []string{\n\t\"https://relay.flashbots.net\",\n    // Refer to https://www.mev.to/builders for builder endpoints \n}\nrpc := flashbotsrpc.NewBuilderBroadcastRPC(urls)\n\nsendBundleArgs := flashbotsrpc.FlashbotsSendBundleRequest{\n    Txs:         []string{\"YOUR_RAW_TX\"},\n    BlockNumber: fmt.Sprintf(\"0x%x\", 13281018),\n}\n\nresults := rpc.BroadcastBundle(privateKey, sendBundleArgs)\nfor _, result := range results {\n    if result.Err != nil {\n        log.Fatal(result.Err)\n    }\n    fmt.Printf(\"%+v\\n\", result.BundleResponse)\n}\n```\n\n#### More examples\n\nYou can find example code in the [`/examples/` directory](https://github.com/metachris/flashbotsrpc/tree/master/examples).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetachris%2Fflashbotsrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetachris%2Fflashbotsrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetachris%2Fflashbotsrpc/lists"}