[ { "type": "constructor", "inputs": [ { "name": "usdg_", "type": "address", "internalType": "address" }, { "name": "router_", "type": "address", "internalType": "address" }, { "name": "factory_", "type": "address", "internalType": "address" }, { "name": "keeper_", "type": "address", "internalType": "address" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "BASE_CAP", "inputs": [], "outputs": [ { "name": "", "type": "uint64", "internalType": "uint64" } ], "stateMutability": "view" }, { "type": "function", "name": "MAX_ACTIVE", "inputs": [], "outputs": [ { "name": "", "type": "uint8", "internalType": "uint8" } ], "stateMutability": "view" }, { "type": "function", "name": "MAX_INTERVAL", "inputs": [], "outputs": [ { "name": "", "type": "uint32", "internalType": "uint32" } ], "stateMutability": "view" }, { "type": "function", "name": "MAX_SLIP_BPS", "inputs": [], "outputs": [ { "name": "", "type": "uint16", "internalType": "uint16" } ], "stateMutability": "view" }, { "type": "function", "name": "MIN_BUY", "inputs": [], "outputs": [ { "name": "", "type": "uint64", "internalType": "uint64" } ], "stateMutability": "view" }, { "type": "function", "name": "MIN_INTERVAL", "inputs": [], "outputs": [ { "name": "", "type": "uint32", "internalType": "uint32" } ], "stateMutability": "view" }, { "type": "function", "name": "MIN_SLIP_BPS", "inputs": [], "outputs": [ { "name": "", "type": "uint16", "internalType": "uint16" } ], "stateMutability": "view" }, { "type": "function", "name": "TIER1_CAP", "inputs": [], "outputs": [ { "name": "", "type": "uint64", "internalType": "uint64" } ], "stateMutability": "view" }, { "type": "function", "name": "TIER1_HOLD", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "TIER2_CAP", "inputs": [], "outputs": [ { "name": "", "type": "uint64", "internalType": "uint64" } ], "stateMutability": "view" }, { "type": "function", "name": "TIER2_HOLD", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "TWAP_WINDOW", "inputs": [], "outputs": [ { "name": "", "type": "uint32", "internalType": "uint32" } ], "stateMutability": "view" }, { "type": "function", "name": "activeOf", "inputs": [ { "name": "", "type": "address", "internalType": "address" } ], "outputs": [ { "name": "", "type": "uint8", "internalType": "uint8" } ], "stateMutability": "view" }, { "type": "function", "name": "cancelPlan", "inputs": [ { "name": "id", "type": "uint256", "internalType": "uint256" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "capOf", "inputs": [ { "name": "user", "type": "address", "internalType": "address" } ], "outputs": [ { "name": "", "type": "uint64", "internalType": "uint64" } ], "stateMutability": "view" }, { "type": "function", "name": "createPlan", "inputs": [ { "name": "token", "type": "address", "internalType": "address" }, { "name": "fee", "type": "uint24", "internalType": "uint24" }, { "name": "usdgPerBuy", "type": "uint64", "internalType": "uint64" }, { "name": "interval", "type": "uint32", "internalType": "uint32" }, { "name": "maxSlipBps", "type": "uint16", "internalType": "uint16" } ], "outputs": [ { "name": "id", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "execute", "inputs": [ { "name": "id", "type": "uint256", "internalType": "uint256" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "factory", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "contract IUniV3Factory" } ], "stateMutability": "view" }, { "type": "function", "name": "holdToken", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "contract IERC20" } ], "stateMutability": "view" }, { "type": "function", "name": "isDue", "inputs": [ { "name": "id", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "keeper", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "minOutOf", "inputs": [ { "name": "id", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "owner", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "planCount", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "plans", "inputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "user", "type": "address", "internalType": "address" }, { "name": "token", "type": "address", "internalType": "address" }, { "name": "pool", "type": "address", "internalType": "address" }, { "name": "fee", "type": "uint24", "internalType": "uint24" }, { "name": "usdgPerBuy", "type": "uint64", "internalType": "uint64" }, { "name": "interval", "type": "uint32", "internalType": "uint32" }, { "name": "maxSlipBps", "type": "uint16", "internalType": "uint16" }, { "name": "nextAt", "type": "uint64", "internalType": "uint64" }, { "name": "buys", "type": "uint32", "internalType": "uint32" }, { "name": "active", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "router", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "contract ISwapRouter02" } ], "stateMutability": "view" }, { "type": "function", "name": "setHoldToken", "inputs": [ { "name": "t", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setKeeper", "inputs": [ { "name": "k", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "usdg", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "contract IERC20" } ], "stateMutability": "view" }, { "type": "event", "name": "HoldTokenSet", "inputs": [ { "name": "holdToken", "type": "address", "indexed": false, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "KeeperSet", "inputs": [ { "name": "keeper", "type": "address", "indexed": false, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "PlanCancelled", "inputs": [ { "name": "id", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "user", "type": "address", "indexed": true, "internalType": "address" }, { "name": "buys", "type": "uint32", "indexed": false, "internalType": "uint32" } ], "anonymous": false }, { "type": "event", "name": "PlanCreated", "inputs": [ { "name": "id", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "user", "type": "address", "indexed": true, "internalType": "address" }, { "name": "token", "type": "address", "indexed": true, "internalType": "address" }, { "name": "fee", "type": "uint24", "indexed": false, "internalType": "uint24" }, { "name": "usdgPerBuy", "type": "uint64", "indexed": false, "internalType": "uint64" }, { "name": "interval", "type": "uint32", "indexed": false, "internalType": "uint32" }, { "name": "maxSlipBps", "type": "uint16", "indexed": false, "internalType": "uint16" }, { "name": "nextAt", "type": "uint64", "indexed": false, "internalType": "uint64" } ], "anonymous": false }, { "type": "event", "name": "PlanExecuted", "inputs": [ { "name": "id", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "user", "type": "address", "indexed": true, "internalType": "address" }, { "name": "token", "type": "address", "indexed": true, "internalType": "address" }, { "name": "usdgIn", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "tokenOut", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "nextAt", "type": "uint64", "indexed": false, "internalType": "uint64" }, { "name": "buys", "type": "uint32", "indexed": false, "internalType": "uint32" } ], "anonymous": false }, { "type": "error", "name": "AlreadySet", "inputs": [] }, { "type": "error", "name": "BadAmount", "inputs": [] }, { "type": "error", "name": "BadInterval", "inputs": [] }, { "type": "error", "name": "BadSlip", "inputs": [] }, { "type": "error", "name": "Inactive", "inputs": [] }, { "type": "error", "name": "NoFloor", "inputs": [] }, { "type": "error", "name": "NoPool", "inputs": [] }, { "type": "error", "name": "NotDue", "inputs": [] }, { "type": "error", "name": "NotKeeper", "inputs": [] }, { "type": "error", "name": "NotOwner", "inputs": [] }, { "type": "error", "name": "NotPlanOwner", "inputs": [] }, { "type": "error", "name": "OverCap", "inputs": [ { "name": "cap", "type": "uint64", "internalType": "uint64" } ] }, { "type": "error", "name": "Reentrancy", "inputs": [] }, { "type": "error", "name": "SafeERC20FailedOperation", "inputs": [ { "name": "token", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "TooManyPlans", "inputs": [] }, { "type": "error", "name": "ZeroAddress", "inputs": [] } ]