{"id":13634745,"url":"https://github.com/gakonst/opensea-rs","last_synced_at":"2025-09-03T01:39:14.453Z","repository":{"id":41228785,"uuid":"395786272","full_name":"gakonst/opensea-rs","owner":"gakonst","description":"Rust client to Opensea's APIs and Ethereum smart contracts","archived":false,"fork":false,"pushed_at":"2022-01-10T11:53:59.000Z","size":21,"stargazers_count":244,"open_issues_count":5,"forks_count":33,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-08T21:11:26.291Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gakonst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-13T20:25:14.000Z","updated_at":"2025-05-02T23:40:00.000Z","dependencies_parsed_at":"2022-09-09T20:10:43.610Z","dependency_job_id":null,"html_url":"https://github.com/gakonst/opensea-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gakonst/opensea-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gakonst%2Fopensea-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gakonst%2Fopensea-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gakonst%2Fopensea-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gakonst%2Fopensea-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gakonst","download_url":"https://codeload.github.com/gakonst/opensea-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gakonst%2Fopensea-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273377148,"owners_count":25094526,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-02T00:00:32.655Z","updated_at":"2025-09-03T01:39:14.416Z","avatar_url":"https://github.com/gakonst.png","language":"Rust","funding_links":[],"categories":["Applications","应用程序 Applications"],"sub_categories":["Blockchain","Cryptocurrencies","加密货币 Cryptocurrencies"],"readme":"# \u003ch1 align=\"center\"\u003e opensea.rs \u003c/h1\u003e\n\n*Rust bindings \u0026 CLI to the Opensea API and Contracts*\n\n![Github Actions](https://github.com/gakonst/opensea-rs/workflows/Tests/badge.svg)\n\n## CLI Usage\n\nRun `cargo r -- --help` to get the top level help menu:\n\n```\nopensea-cli 0.1.0\nChoose what NFT subcommand you want to execute\n\nUSAGE:\n    opensea-cli \u003cSUBCOMMAND\u003e\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nSUBCOMMANDS:\n    buy       Purchase 1 or more NFTs, with optional Flashbots support\n    deploy    Deploy the Ethereum contract for doing consistency checks inside a Flashbots bundle\n    help      Prints this message or the help of the given subcommand(s)\n    prices    Get OpenSea orderbook information about the token\n```\n\nTo view each individual subcommand's help menu, run: `opensea-cli \u003csubcommand name\u003e --help`\n\n### Buying NFT(s)\n\nHere's an example command for purchasing some ERC1155 NFTs using Flashbots:\n\n```bash\ncargo run buy \\\n    --nft.erc1155 \\\n    --nft.address \"0xTheNFTAddress\" \\\n    --nft.ids 1 --nft.ids 2 --nft.ids 3 \\\n    --eth.private_key \"0xMyPrivateKey\" \\\n    --eth.url http://localhost:8545 \\\n    --flashbots.bribe 1000000000000000000 \\\n    --flashbots.bribe_receiver 0xYourBriberContract\n```\n\nInstead of providing `nft.ids`, you can also provide a CSV file via the `--nft.ids_path` command,\nwhere the first column contains the `id` of the NFT and the second column contains \nthe `quantity` of purchased NFT.\n\nHere's an ERC1155 example (which also requires passing the `--nft.erc1155` flag)\n\n```\n1,1\n2,5\n3,2\n```\n\nAnd an ERC721 example\n\n```\n1\n2\n3\n```\n\n**Flashbots Support**: This will proceed to create a Flashbots bundle with 4 transactions: 3 NFT take orders on\nOpenSea, and a 4th transaction which sends the bribe to the briber contract while also doing\nconsistency checks that we have received the NFTs\n\n**Public Mempool**: If you omit the Flashbots parameters, it'll proceed to submit the transactions normally\nvia the public mempool.\n\n## Development\n\n### Rust Toolchain\n\nWe use the stable Rust toolchain. Install by running: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`\n\n### Building \u0026 testing\n\n```\ncargo check\ncargo test\ncargo doc --open\ncargo build [--release]\n```\n\n## Features\n\n* [x] Opensea API\n* [x] Opensea Types (Orders etc.)\n* [x] Opensea Contract clients\n    * [x] ERC721\n    * [x] ERC1155\n    * [x] Fill a Sell order\n    * [ ] Generalize the API to arbitrary Opensea marketplace schemas\n* [x] CLI for operations\n    * [x] Flashbots contract deployer\n    * [x] Query prices\n    * [x] Purchase NFT(s)\n    * [ ] Sniping drops (pre-configuring the target and looping)\n\n## Running ignored tests\n\n1. Create a `hardhat.config.js` file and fork from mainnet at this block:\n\n```\nexport default {\n  networks: {\n    hardhat: {\n      forking: {\n        url: \"https://eth-mainnet.alchemyapi.io/v2/\u003cYOUR API KEY\u003e\",\n        blockNumber: 13037331,\n      },\n      hardfork: \"london\",\n    }\n  }\n}\n```\n\n2. `cargo test --ignored`\n\n\n## Acknowledgements\n\n`Briber.sol` contract written by [`Anish Agnihotri`](https://github.com/Anish-Agnihotri/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgakonst%2Fopensea-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgakonst%2Fopensea-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgakonst%2Fopensea-rs/lists"}