{"id":20844324,"url":"https://github.com/bootnodedev/gas-tank-module","last_synced_at":"2026-06-30T04:31:55.748Z","repository":{"id":209726356,"uuid":"676700944","full_name":"BootNodeDev/gas-tank-module","owner":"BootNodeDev","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-19T16:50:09.000Z","size":1100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-27T16:51:51.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BootNodeDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-08-09T20:05:34.000Z","updated_at":"2023-11-28T19:50:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"be53871d-e907-45d9-b6b8-c1a67f25236f","html_url":"https://github.com/BootNodeDev/gas-tank-module","commit_stats":null,"previous_names":["bootnodedev/gas-tank-module"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BootNodeDev/gas-tank-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BootNodeDev%2Fgas-tank-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BootNodeDev%2Fgas-tank-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BootNodeDev%2Fgas-tank-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BootNodeDev%2Fgas-tank-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BootNodeDev","download_url":"https://codeload.github.com/BootNodeDev/gas-tank-module/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BootNodeDev%2Fgas-tank-module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34952850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"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-11-18T02:09:20.665Z","updated_at":"2026-06-30T04:31:55.730Z","avatar_url":"https://github.com/BootNodeDev.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GasTank Module\n\nThe GasTank Module eliminates the need for a user to hold gas tokens in their EOAs, which is required for executing a\ntransaction. To achieve this goal, the Module offers the following two key functionalities:\n\n1. **Transaction Execution:** The GasTank Module facilitates the execution of transactions within a specific Safe. These\n   transactions are initiated using the [Gelato Network relayer](https://www.gelato.network/relay), allowing them to be\n   executed without the user being burdened with gas requirements.\n\n2. **Gelato Fee Payment:** To cover the Gelato Network relaying services fees, the GasTank Module retrieves the\n   necessary tokens from a Safe designated as the \"GasTank\". Depending on the organization's setup, it could either be\n   the Safe where the transaction originated or an external Safe (Use case: one GasTank to pay for many Safe's fees).\n\nThere are two options to pay for the Relaying fee, depending on where the GasTank is located:\n\n- **Option 1: same Safe from which the transaction is executed** In this case, the transaction executor must be an\n  owner. It is required to sign a series of parameters authorizing the payment of fees from the GasTank.\n\n- **Option 2: a different Safe** The user must be added as a delegate or owner of the GasTank and authorize fee payment.\n\nTo put it simply, the GasTank Module addresses the gas expenses incurred during the execution of transactions within a\nSafe by utilizing tokens to cover Gelato's relayer service fees. It provides users with the option to use the same Safe\nfor execution or a different one, as long as they meet the authorization requirements, thus offering flexibility.\n\nThe Smart Contract is designed as a singleton, which means that it can be shared between different Safes, eliminating\nthe need for each Safe to deploy its own module.\n\n![diagram](./docs/GasTank.png)\n\n## Authentication and Authorization\n\nTo authenticate the sender and validate the authorization to pay the fees, two signatures are required.\n\n1. [required by Gelato](https://docs.gelato.network/developer-services/relay/erc-2771-recommended#rationale) to\n   authenticate the sender of the relayed transaction, which then is appended to the calldata passed to the module.\n\n2. Validate that the sender is whether an Owner or a delegate of the GasTank, and is authorized to pay the fees using a\n   given token up to a maximum amount. To achieve this, the module relies on the ERC-721 signature and uses the\n   following schema:\n\n- EIP721Domain\n\n```\n{\n  EIP712Domain: [\n    { name: 'name', type: 'string' },\n    { name: 'version', type: 'string' },\n    { name: 'chainId', type: 'uint256' },\n    { name: 'verifyingContract', type: 'address' }\n  ]\n}\n```\n\n- AllowedFee\n\n```\n{\n  AllowedFee: [\n        { name: 'gasTank', type: 'address' },\n        { name: 'token', type: 'address' },\n        { name: 'maxFee', type: 'uint256' },\n        { name: 'nonce', type: 'uint16' }\n    ]\n}\n```\n\n## Setting a Delegate\n\nTo authorize a non-owner to use a GasTank (a Safe) to pay for the transaction of a different Safe, the non-owner account\nmust be set as a `delegate` of the GasTank and indicate which token this new delegate is allowed to use.\n\nFor this, the following steps should be followed:\n\n1. Enable the **GasTankModule** on the GasTank.\n2. Call the `GasTankModule.addDelegate(address _delegate)` from GasTank.\n3. Call the `GasTankModule.addTokenAllowance(address _delegate, address _token)` from the GasTank for each token the\n   given delegate is allowed to use\n\n## Networks\n\nThe module would be available on the same address for all the networks where\n[Gelato is](https://docs.gelato.network/developer-services/relay/networks-and-rate-limits) and also the Safe.\n\n`GasTankModule address: 0x150EfE6b6E093D625313cAe5E7083a4C57fb9BA0`\n\n## Development\n\n### Install Foundry\n\n_Having issues? See the\n[troubleshooting section](https://github.com/foundry-rs/foundry/blob/master/README.md#troubleshooting-installation)_.\n\nFirst, run the command below to get `foundryup`, the Foundry toolchain installer:\n\n```sh\ncurl -L https://foundry.paradigm.xyz | bash\n```\n\nIf you do not want to use the redirect, feel free to manually download the foundryup installation script from\n[here](https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup).\n\nThen, run `foundryup` in a new terminal session or after reloading your `PATH`.\n\nOther ways to use `foundryup` can be found in the\n[documentation](https://github.com/foundry-rs/foundry/tree/master/foundryup). Happy forging!\n\n### Install dependencies\n\n#### Yarn\n\n```\nyarn install\n```\n\n#### Forge\n\n```\nforge install\n```\n\n### Run tests\n\nCreate an `.env` file using `.env.example` as a template, then run.\n\n```\nyarn test\n```\n\n## License\n\nThis project is licensed under Business Source License 1.1.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbootnodedev%2Fgas-tank-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbootnodedev%2Fgas-tank-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbootnodedev%2Fgas-tank-module/lists"}