{"id":20652514,"url":"https://github.com/pyncz/refuel","last_synced_at":"2025-06-25T15:07:46.350Z","repository":{"id":232990457,"uuid":"622984612","full_name":"pyncz/refuel","owner":"pyncz","description":"⛽ Don't let your account run out of fuel","archived":false,"fork":false,"pushed_at":"2023-04-15T09:56:50.000Z","size":2528,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T21:23:18.207Z","etag":null,"topics":["automation","contracts","gas","gelato","nextjs","solidity","swap","typescript","wagmi","web3"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/pyncz.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}},"created_at":"2023-04-03T13:14:00.000Z","updated_at":"2023-04-15T12:54:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c2a7eb7-9384-4015-903e-3268dbe8b463","html_url":"https://github.com/pyncz/refuel","commit_stats":null,"previous_names":["pyncz/refuel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pyncz/refuel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyncz%2Frefuel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyncz%2Frefuel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyncz%2Frefuel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyncz%2Frefuel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyncz","download_url":"https://codeload.github.com/pyncz/refuel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyncz%2Frefuel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261897003,"owners_count":23226648,"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":["automation","contracts","gas","gelato","nextjs","solidity","swap","typescript","wagmi","web3"],"created_at":"2024-11-16T17:35:25.550Z","updated_at":"2025-06-25T15:07:46.311Z","avatar_url":"https://github.com/pyncz.png","language":"TypeScript","readme":"# refuel\n⛽ Don't let your account run out of fuel\n\n\u003e **Warning**\n\u003e\n\u003e This is my sandbox project to try out Gelato (and Uniswap v3, along the way). Don't take it seriously.\n\n![refuel cover](./app/public/img/cover.jpg)\n\n---\n\n## How it works\n\n### The Problem\n\nIt's always sad when your native network token balance runs out, and you can't send any transaction anymore. You **do** have some assets in non-native tokens but still can't exchange them because you **don't have enough amount of the native token to pay for the gas**!\n\nSo, you need to top up your balance through a bridge with another network or, even worse, use a fiat gateway!\n\n🤯 🤯 🤯\n\n\n### The Solution\n\nWith **`refuel`** you won't have to worry about your balance anymore! When the balance is about to run out, `refuel` will replenish it by swapping the required amount of the token of your choice.\n\n\n### Okay, but what's going on exactly?\n\n- User selects\n  - the source token\n  - the watched token\n  - the threshold\n  - the amount to replenish\n  - the maximum amount of the source token to spend\n- `refuel` submits a [gelato](https://www.gelato.network/automate) task\n- The task executes a [uniswap v3](https://uniswap.org/) swap if the balance of the watched token gets less than the threshold\n\n\u003e **Note** Conditions of the task's execution are resolved by the [`RefuelResolver`](./contracts/contracts/RefuelResolver.sol) contract.\n\n\u003e **Note** Swap is provided by the [`Refuel`](./contracts/contracts/Refuel.sol) contract. Gelato automation contract is the only who allowed to exec its `execute` method.\n\nUser can see all their active tasks.\nFor more actions like pausing / restarting tasks, it's always an option to go to the [Gelato Automate app](https://app.gelato.network/task/) since all the tasks in `refuel` are mined directly by the user.\n\n\n### Deployments\n\n`refuel` is deployed only on Goerli Testnet now. The swap implementation is very basic and follows [the Uniswap tutorial](https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps) closely, so it's not production-ready.\n\nBut you can pick up the idea if you like 😉\n\n| Contract | Goerli Address |\n| --- | --- |\n| [`Refuel`](./contracts/contracts/Refuel.sol) | `0xA573493A66d946212763EC26cC9D117b1a03b026` |\n| [`RefuelResolver`](./contracts/contracts/RefuelResolver.sol) | `0xF92d58e8227a1652C3dAa6cF19aC64f0F45F8C2e` |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyncz%2Frefuel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyncz%2Frefuel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyncz%2Frefuel/lists"}