{"id":27742595,"url":"https://github.com/astarnetwork/gas-station","last_synced_at":"2025-07-08T16:39:55.645Z","repository":{"id":39979070,"uuid":"488363932","full_name":"AstarNetwork/gas-station","owner":"AstarNetwork","description":"Gas price estimation api","archived":false,"fork":false,"pushed_at":"2024-10-30T06:45:09.000Z","size":1455,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-04-28T16:57:35.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/AstarNetwork.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":"2022-05-03T21:09:31.000Z","updated_at":"2024-10-30T06:45:07.000Z","dependencies_parsed_at":"2024-10-30T07:35:51.675Z","dependency_job_id":null,"html_url":"https://github.com/AstarNetwork/gas-station","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AstarNetwork/gas-station","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstarNetwork%2Fgas-station","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstarNetwork%2Fgas-station/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstarNetwork%2Fgas-station/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstarNetwork%2Fgas-station/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AstarNetwork","download_url":"https://codeload.github.com/AstarNetwork/gas-station/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstarNetwork%2Fgas-station/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264305635,"owners_count":23588172,"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":[],"created_at":"2025-04-28T16:43:47.100Z","updated_at":"2025-07-08T16:39:55.595Z","avatar_url":"https://github.com/AstarNetwork.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Astar gas station\n\n## Overview\nGas is the unit of measure for how much computational work is required to process transactions and smart contracts. Essentially a transaction fee, the term originates from Ethereum, in which context it refers to computation undertaken on the Ethereum Virtual Machine (EVM). Since Ethereum was founded, numerous EVM-compatible networks have emerged and adopted similar models.\n\nThe term can be considered analogous to the gas that powers a car engine: it's the fluctuating, occasionally expensive cost of operation. More complex smart contracts require more gas to power their computation, just as a bigger, more powerful car takes more gas to run.\nGas price API is a service that allows you to get the various gas prices of the astar network for various transaction times. Gas fee are provided in wei.\n\n## API\nAPI is provided in repo https://github.com/AstarNetwork/gas-station. node.js is the requirement to run the API server.\n\nSteps to setup the API server:\nClone the repo.\n```\n\u003e git clone https://github.com/AstarNetwork/gas-station\n```\nInstall Dependencies.\n```\n\u003e cd gas-station\n\u003e yarn install\n```\nStart the server.\n```\n\u003e yarn start\n```\nServer will start on port 3000 or environment variable PORT if provided.\n\nYou can get the gas for different chain with these http APIs.\n\n### EVM gas\n\n- Shibuya API:: GET https://gas.astar.network/api/gasnow?network=shibuya\u0026type=gas\n- Shiden API: : GET https://gas.astar.network/api/gasnow?network=shiden\u0026type=gas\n- Astar API: GET https://gas.astar.network/api/gasnow?network=astar\u0026type=gas\n\nResponse\n```\n{\n    \"code\":200,\n    \"data\":{\n        \"slow\":\"1746510000\",\n        \"average\":\"5119200000\",\n        \"fast\":\"9501250000\",\n        \"timestamp\":1653037338668,\n        \"eip1559\":{\n            \"priorityFeePerGas\":{\n                \"slow\":\"746510000\",\n                \"average\":\"4119200000\",\n                \"fast\":\"8501250000\"\n            },\n            \"baseFeePerGas\":\"1000000000\"\n        }\n    }\n}\n```\n\n**Response:**\n\n- **slow**: The gas price for a transaction that takes a long time to execute.\n- **average**: The gas price for a transaction that takes a medium time to execute.\n- **fast**: The gas price for a transaction that takes a short time to execute.\n- **eip1559**: With EIP1559 transactions gas fee are divided in two parts: base fee and priority fee.\nThe Base Fee, which is determined by the network itself. And is same for a block. Priority Fee, which is optional, determined by the user, is a tip to validators, and incentivizes them to prioritize your transaction.\nEIP-1559's purpose is essentially to make gas fees more transparent and predictable for users. Previously, to have your transaction processed, you essentially had to 'bid' with a high enough total fee to make sure the miner was incentivized to pick up your transaction reasonably soon. This meant the market price was constantly moving according to demand.\n- **priorityFeePerGas**: The variable part of the gas fee. Determined by the user.\n- **baseFeePerGas**: The fixed part of the gas fee. Determined by the network.\n\n### Native Extrinsic TIP\n\n- Shibuya API: GET https://gas.astar.network/api/gasnow?network=shibuya\u0026type=tip\n- Shiden API: GET https://gas.astar.network/api/gasnow?network=shiden\u0026type=tip\n- Astar API: GET https://gas.astar.network/api/gasnow?network=astar\u0026type=tip\n\nResponse\n```\n{\n    \"code\":200,\n    \"data\":{\n        \"tip\":{\n            \"slow\":\"746510000000\",\n            \"average\":\"4119200000000\",\n            \"fast\":\"8501250000000\"\n        }\n    }\n}\n```\n\n- **tip**: Tips are an optional transaction fee that users can add. Tips are not part of the inclusion fee and are an incentive to block authors for prioritizing a transaction, and the entire tip goes directly to the block author. Tip is provided in gas API and can be used when sending native transactions. Tip is provided for slow, average and fast speed.\n\n- **slow**: The tip for a transaction that takes a long time to execute.\n- **average**: The tip for a transaction that takes a medium time to execute.\n- **fast**: The tip for a transaction that takes a short time to execute.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastarnetwork%2Fgas-station","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastarnetwork%2Fgas-station","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastarnetwork%2Fgas-station/lists"}