{"id":16392030,"url":"https://github.com/mikeshultz/ethereum-subscribe","last_synced_at":"2025-07-01T09:37:05.497Z","repository":{"id":147876707,"uuid":"102908191","full_name":"mikeshultz/ethereum-subscribe","owner":"mikeshultz","description":"Contract to handle monthly subscriptions (based off of calendar month)","archived":false,"fork":false,"pushed_at":"2017-09-09T02:33:36.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T22:27:52.393Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mikeshultz.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":"2017-09-08T22:04:43.000Z","updated_at":"2017-09-09T02:15:12.000Z","dependencies_parsed_at":"2023-04-13T12:38:27.051Z","dependency_job_id":null,"html_url":"https://github.com/mikeshultz/ethereum-subscribe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikeshultz/ethereum-subscribe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeshultz%2Fethereum-subscribe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeshultz%2Fethereum-subscribe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeshultz%2Fethereum-subscribe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeshultz%2Fethereum-subscribe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeshultz","download_url":"https://codeload.github.com/mikeshultz/ethereum-subscribe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeshultz%2Fethereum-subscribe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262937351,"owners_count":23387569,"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":"2024-10-11T04:48:16.754Z","updated_at":"2025-07-01T09:37:05.470Z","avatar_url":"https://github.com/mikeshultz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ethereum-subscribe\n\nContract to handle subscriptions.\n\n## MonthlySubscriptions\n\nThis contract handles monthly subscriptions based on calendar months.  If your\nsubscription doesn't follow the calendar, you would need to keep track of the \nday of month on your other systems.\n\n### event Payment\n\nThis event is emitted when a payment is made to the contract.\n\n - `by` is and `address` containing who made the payment\n - `amount` is a `uint`\n - `formonth` is a uint representing the month of the year(1-12)\n\n### payable function [default]\n\nThe default function when sending value to the contract.  This allows a \nsubscriber to pay for the current month.\n\n    eth.sendTransaction({from: accounts[0], to: subscriptionContract, value: subscriptionCost, gas: 50000})\n\n### payable function makePayment\n\nAllows a subscriber to make a payment for a specific month.\n\n#### Parameters\n\n - `uint16 year` - The year\n - `uint8 month` - The month of the year\n\n### constant function getPayment\n\nReturning a `uint` representing the amount the subscriber has paid for a \nspecific month.\n\n#### Parameters\n\n - `address who` - `address` of the subject account\n - `uint16 year` - The year\n - `uint8 month` - The month of the year\n\n### constant function isAlive\n\nReturns `bool` representing whether or not the contract is \"alive\".  A contract\nthat is not \"alive\" can not accept payments.\n\n### constant function paidUp\n\nReturning a `bool` this function tells us if the user is paid up for the current\nmonth.\n\n#### Parameters\n\n - `who` `address` of the subject account\n\n### constant function getManager\n\nReturns the current manager's `address`.\n\n### function setManager\n\nSets the manager of the contract.\n\n#### Parameters\n\n - `address newManager` - `address` of the new managing account\n\n### function withdraw\n\nWithdraw the full balance of the contract.\n\n### function escape\n\nWithdraw the full balance of the contract and disable it.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeshultz%2Fethereum-subscribe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeshultz%2Fethereum-subscribe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeshultz%2Fethereum-subscribe/lists"}