Contract Details
Tech Stack
Solidity ^0.8.24 TypeScript Gelato Foundry
Chains
Ethereum Arbitrum Base Optimism Polygon
Description
Automated subscription renewal system using a smart contract with Gelato Web3 Functions integration. Users approve a spending allowance, and the keeper automatically renews subscriptions before expiry.
Features
- ✓ On-chain renewal contract with allowance management
- ✓ Gelato Web3 Functions keeper for automation
- ✓ Configurable renewal window (days before expiry)
- ✓ Batch renewal support for gas efficiency
- ✓ User opt-in/opt-out at any time
- ✓ Failed renewal retry with backoff
- ✓ Event emission for off-chain tracking
- ✓ Full Foundry tests + keeper integration tests
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Renewal Automator /// @notice Automated subscription renewal via smart contract + Gelato. contract RenewalAutomator { address public immutable owner; uint256 public constant VERSION = 1; event Initialized(address indexed deployer); constructor() { owner = msg.sender; emit Initialized(msg.sender); } // ... full implementation in purchased package }