{"id":30126480,"url":"https://github.com/iotaledger/gas-station","last_synced_at":"2025-08-29T21:40:34.260Z","repository":{"id":279448235,"uuid":"890925479","full_name":"iotaledger/gas-station","owner":"iotaledger","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-29T09:21:27.000Z","size":911,"stargazers_count":9,"open_issues_count":41,"forks_count":3,"subscribers_count":6,"default_branch":"dev","last_synced_at":"2025-08-29T12:33:36.963Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iotaledger.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,"zenodo":null}},"created_at":"2024-11-19T12:27:29.000Z","updated_at":"2025-08-29T08:54:52.000Z","dependencies_parsed_at":"2025-02-25T16:39:36.829Z","dependency_job_id":"4f1ac87c-a157-43f8-b99d-6f3d8c2386d9","html_url":"https://github.com/iotaledger/gas-station","commit_stats":null,"previous_names":["iotaledger/gas-station"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iotaledger/gas-station","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotaledger%2Fgas-station","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotaledger%2Fgas-station/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotaledger%2Fgas-station/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotaledger%2Fgas-station/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iotaledger","download_url":"https://codeload.github.com/iotaledger/gas-station/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotaledger%2Fgas-station/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272766964,"owners_count":24989408,"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-08-29T02:00:10.610Z","response_time":87,"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":"2025-08-10T16:50:22.288Z","updated_at":"2025-08-29T21:40:34.249Z","avatar_url":"https://github.com/iotaledger.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\".github/imgs/banner_gas_station.svg\" alt=\"banner\" /\u003e\n\u003c/div\u003e\n\n# IOTA Gas Station\n\nIOTA Gas Station is a component that powers sponsored transactions on IOTA at scale. It manages a database of gas coins owned\nby a sponsor address and provides APIs to reserve gas coins and use them to pay for transactions. It achieves\nscalability and high throughput by managing a large number of gas coin objects in the pool, so that it can sponsor a\nlarge number of transactions concurrently.\n\n## Documentation\n\nFor complete documentation, visit this [link](https://docs.iota.org/operator/gas-station/).\n\n## How to run with Docker\n\n### Prerequisites\n\n* [Git](https://github.com/git-guides/install-git)\n* [Docker](https://docs.docker.com/engine/install/)\n* [Docker Compose](https://docs.docker.com/compose/install/)\n\n### Setup Steps\n\n1. **Clone the IOTA Gas Station Repository:**\n\n```sh\ngit clone https://github.com/iotaledger/gas-station\n```\n\n2. **Navigate to the Docker Directory and Generate the Config File:**\n\n```sh\ncd gas-station/docker\n../utils/./gas-station-tool.sh generate-sample-config --config-path config.yaml --docker-compose -n testnet\n```\n\n   **Note:** If the generated private key pair doesn’t meet your requirements, replace it with your own keys.\n\n3. **Set Up Authentication:** Define a bearer token for the Gas Station API using the `GAS_STATION_AUTH` environment variable.\n\n4. **Start the Gas Station**\n\n```sh\nGAS_STATION_AUTH=[bearer_token] docker-compose up\n```\n\n\n### Expected Output\n\nWhen the gas station starts, it will perform the initial coin-splitting procedure. You should see logs similar to the following:\n\n```log\n2024-12-16T17:12:49.369620Z  INFO iota_gas_station::gas_station_initializer: Number of coins got so far: 392\n2024-12-16T17:12:49.369690Z  INFO iota_gas_station::gas_station_initializer: Splitting finished. Got 392 coins. New total balance: 39615604800. Spent 384395200 gas in total\n2024-12-16T17:12:49.381289Z DEBUG iota_gas_station::storage::redis: After add_new_coins. New total balance: 39615604800, new coin count: 392\n2024-12-16T17:12:49.381378Z DEBUG iota_gas_station::storage::redis: Releasing the init lock.\n2024-12-16T17:12:49.382094Z  INFO iota_gas_station::gas_station_initializer: New coin initialization took 0s\n2024-12-16T17:12:49.383373Z  INFO iota_gas_station::rpc::server: listening on 0.0.0.0:9527\n```\n\n### API\n\nYour Gas Station instance should now be running and accessible via its [HTTP API](https://docs.iota.org/operator/gas-station/api-reference/).\n\n## How to build\n\n### Build prerequisites\n\n- [Rust 1.86](https://www.rust-lang.org/tools/install)\n\n### Build\n\nTo build the gas station binary, run:\n\n```bash\ncargo build --release\n```\n\n### Binaries\n\n- `./target/release/tool`: gas station helper tool\n- `./target/release/iota-gas-station`: gas station server binary\n\n## Configuration\n\nThe example configuration file `config.yaml` can be generated with the `tool`. The example of config:\n\n```yaml\nsigner-config:\n  local:\n    keypair: AKT1Ghtd+yNbI9fFCQin3FpiGx8xoUdJMe7iAhoFUm4f\nrpc-host-ip: 0.0.0.0\nrpc-port: 9527\nmetrics-port: 9184\nstorage-config:\n  redis:\n    redis_url: \"redis://127.0.0.1\"\nfullnode-url: \"https://api.testnet.iota.cafe\"\ncoin-init-config:\n  target-init-balance: 100000000\n  refresh-interval-sec: 86400\ndaily-gas-usage-cap: 1500000000000\naccess-controller:\n  access-policy: disabled\n```\n\n### Configuration parameters\n\n| Parameter                               | Description                                                         | Example                          |\n| --------------------------------------- | ------------------------------------------------------------------- | -------------------------------- |\n| `signer-config`                         | Configuration of signer. It can be a local or an external KMS.      |  See [down below](#signer-configuration)|\n| `rpc-host-ip`                           | IP address for the RPC server                                       | `0.0.0.0`                        |\n| `rpc-port`                              | Port for the RPC server                                             | `9527`                           |\n| `metrics-port`                          | Port for collecting and exposing metrics                            | `9184`                           |\n| `storage-config.redis.redis_url`        | Redis connection URL                                                | `redis://127.0.0.1`              |\n| `fullnode-url`                          | URL of the IOTA full node                                           | `https://api.testnet.iota.cafe`  |\n| `coin-init-config.target-init-balance`  | Initial balance to maintain                                         | `100000000`                      |\n| `coin-init-config.refresh-interval-sec` | Interval in seconds to refresh balance                              | `86400`                          |\n| `daily-gas-usage-cap`                   | Maximum allowed daily gas usage                                     | `1500000000000`                  |\n| `access-controller.access-policy`       | Access policy mode.                                                 | `disabled`, `allow-all`, `deny-all`. See [this link](./docs/access-controller.md) to learn more|\n\n#### Signer Configuration\n\nYou can configure the signer in two ways:\n\n- **Local (hardcoded) key** _(unsafe)_\n\n   **Example**:\n\n   ```yaml\n   local:\n      keypair: AKT1Ghtd+yNbI9fFCQin3FpiGx8xoUdJMe7iAhoFUm4f # base64 encoded private key\n   ```\n\n   To convert a private key to base64, follow these steps:\n   1. List available keys: `iota keytool list`\n   2. Export the key for a selected alias: `iota keytool export --key-identity [alias]`\n   3. Convert the bech32 key to base64: `./utils/gas-station-tool.sh convert-key --key iotaprivatkey...`\n\n- **External key management store (KMS)**\n\n   **Example**:\n\n   ```yaml\n   sidecar:\n      sidecar-url: https://localhost:8001\n   ```\n\n   For more details, see the [documentation](https://docs.iota.org/operator/gas-station/architecture/components#key-store-manager) and the [KMS sidecar](./sample_kms_sidecar/) example.\n\n## Sponsored Transaction Examples\n\n- [Rust Example](examples/rust/README.md)\n- [TypeScript Example](examples/ts/README.md)\n\n## Common Issues\n\n[See the Common Issues section](./docs/common-issues.md)\n\n## Contributing\n\nWe would love to have you help us with the development of IOTA Identity. Each and every contribution is greatly valued!\n\nTo contribute directly to the repository, simply fork the project, push your changes to your fork and create a pull request to get them included!\n\nThe best place to get involved in discussions about this library or to look for support at is the `#gas-station-dev` channel on the [IOTA Discord](https://discord.iota.org). You can also ask questions on our [Stack Exchange](https://iota.stackexchange.com/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotaledger%2Fgas-station","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiotaledger%2Fgas-station","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotaledger%2Fgas-station/lists"}