{"id":45816354,"url":"https://github.com/init4tech/signet-orders","last_synced_at":"2026-02-26T18:56:21.222Z","repository":{"id":307356370,"uuid":"996105055","full_name":"init4tech/signet-orders","owner":"init4tech","description":"Example code for signing, sending, and filling Signet Orders","archived":false,"fork":false,"pushed_at":"2026-01-30T11:19:39.000Z","size":231,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-31T04:02:21.148Z","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/init4tech.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-04T13:13:59.000Z","updated_at":"2026-01-30T11:19:37.000Z","dependencies_parsed_at":"2025-09-26T00:20:27.840Z","dependency_job_id":"00fc92f9-69c2-4164-8ae7-4178415cfff7","html_url":"https://github.com/init4tech/signet-orders","commit_stats":null,"previous_names":["init4tech/signet-orders"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/init4tech/signet-orders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fsignet-orders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fsignet-orders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fsignet-orders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fsignet-orders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/init4tech","download_url":"https://codeload.github.com/init4tech/signet-orders/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fsignet-orders/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29867960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T18:42:30.764Z","status":"ssl_error","status_checked_at":"2026-02-26T18:41:47.936Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-02-26T18:56:20.515Z","updated_at":"2026-02-26T18:56:21.208Z","avatar_url":"https://github.com/init4tech.png","language":"Rust","readme":"# Signet Orders\n\nThis repository provides example code for **placing and filling Orders** on Signet, built using utilities from [signet-sdk](https://github.com/init4tech/signet-sdk).\n\nThe repo is intended to _illustrate_ how Fillers can interact with the Signet SDK in order to build Filler software. It is a set of demos and examples; it is not a full-service, out-of-the-box, production-ready Filler. \n\n---\n\n## Fillers\n**Code:** `src/filler.rs`\n\nThe `Filler` struct demonstrates the basic steps required to **fill Signet Orders**. Given a set of Orders, it:\n\n1. Constructs and signs **Permit2** structs to fill the Orders on their destination chains.\n2. Builds a **Signet Bundle** that batches `initiate` and `fill` transactions for those Orders.\n3. Sends the Signet Bundle to the **Transaction Cache**, where it can be mined by Signet Builders.\n\n### Missing Components\nIn production, a Filler will need to:\n\n- Add **scaffolding** around the the Filler logic to run on a perpetual basis. \n- Implement custom **business logic** to determine which Orders to fill.  \n- Potentially extend the example logic with **advanced strategies**, such as performing swaps to source liquidity between fills.\n\n### Filling Strategies\nThe `Filler` struct demonstrates two strategies for filling Orders:\n\n1. **Fill together (`fill`)**  \n   - Submits all Orders/Fills in a single Signet Bundle.  \n   - Either **all Orders mine** together or **none do** (atomic execution).\n\n2. **Fill individually (`fill_individually`)**  \n   - Submits each Order/Fill in its own Bundle.  \n   - Orders succeed or fail **independently**.\n\n**Pros and Cons:**\n\n- **Individual fills** are simpler — Fillers can rely on Builder simulation instead of pre-checking if an Order is already filled. If an `initiate` transaction reverts (because the Order was already filled), the Bundle is simply discarded.\n- **Aggregate fills** are **more gas-efficient** and allow strategies like reusing inputs from one Order to fill another. However, if any single Order fails, the **entire Bundle will not mine**.\n\n---\n\n## Orders\n**Code:** `src/order.rs`\n\nThe `SendOrder` struct provides example code for **initiating an Order**. Given an Order specifying input and output tokens, it:\n\n1. Constructs and signs a **Permit2** struct to initiate the Order on-chain.  \n2. Sends the signed Order to the **Transaction Cache**, where Fillers can fill it.\n\n---\n\n## Full Example\n**Code:** `bin/roundtrip.rs`\n\nThis example executable:\n\n1. Constructs an example Order, signs it, and sends it to the Transaction Cache.  \n2. Queries available Orders and fills the example Order.\n\nYou can freely modify the example Order to:\n\n- Swap **any set of tokens** on the Host and/or Rollup.  \n- Use **multiple Inputs and Outputs**, targeting either the Host or Rollup.\n\n---\n\n### Running the Example\n\n1. **Set environment variables**  \n```bash\nexport CHAIN_NAME=pecorino\nexport RU_RPC_URL=https://rpc.pecorino.signet.sh/\nexport HOST_RPC_URL=https://host-rpc.pecorino.signet.sh/\nexport SIGNER_KEY=[AWS KMS key ID or local private key]\n```\n\n2. **Fund your key**  \nThe example works with **either** an AWS KMS key or a raw local private key.  \nThis key acts as **both** the Order Initiator and Filler, and must be funded with:\n\n- Input tokens on the Rollup  \n- Output tokens on the Host and/or Rollup  \n- Gas tokens to pay for Rollup transactions\n- Gas tokens to pay for Host transactions\n\nBy default, the example swaps **1 Rollup WETH Input → 1 Host WETH Output**, but you can edit the Order freely.\n\n3. **Configure token permissions**  \nThis example uses **Permit2** for both initiating and filling Orders.  \nApprove Permit2 to spend all relevant Input and Output tokens for the key:\n\n```bash\ncast send [TOKEN_ADDRESS] \"approve(address,uint256)\" \\\n  0x000000000022D473030F116dDEE9F6B43aC78BA3 \\\n  0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff \\\n  --rpc-url $RPC_URL\n```\n\nPermit2 uses the same address on Pecorino Rollup and Host as on Ethereum Mainnet.\n\n4. **Run the script**  \n\nThis runs an RU to HOST fill.\n\n```bash\ncargo run --bin order-roundtrip-example\n```\n\nTo run an RU to RU fill, pass the `--rollup` flag to the command.\n\n```bash\ncargo run --bin order-roundtrip-example -- --rollup    \n```\n\nEt voilà! 🎉\n\n---\n\n### Troubleshooting\nSignet Bundles target one **specific block number**.\nIf a Bundle is not included in that exact block, it won't be “retried” in subsequent blocks.\n\nThe current example script naively sends each Bundle to one single target block. When running the example, if Bundles are not mining, it is possible that they were simply not included in the target block. A naive solution is to simply re-run the script to try submitting a new Bundle. \n\nMore robust, production-ready software should include bespoke business logic to continually run the Filler logic, such that Bundles are perpetually (re)submitted on a block-by-block basis. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finit4tech%2Fsignet-orders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finit4tech%2Fsignet-orders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finit4tech%2Fsignet-orders/lists"}