This is a set of Smart Contracts on Ethereum. Reason to use is the ability to programatically (mathematically) ensure the outcomes of important interaction, such as:
- grant a token which will expire automatically
- list paymements
- list token usage
- User aquires N amount of tokens
- Each token represents a timespan, token holder address, how it could be used, and if it was used or not (holds AppId, AppKey) Example: Alice gets 1 token, valid for 1 hour, for Application App. State of token is Granted
- User starts using an App. Prerequisite: App will check if user has enough tokens to do so (token has to be in Granted/InUse state)
- All tokens which are InUse will be invalidated based on the time validity (1h token will be invalid after 1h)
- User, to continue to use an App, should have enough tokens in InUse/Granted state
Smart contracts are heavily influenced by OpenZeppelin work which focuses on community standards driven source code in Solidity. In addition, transparency of Ethereum Blockchain is adding audiatibility of all the steps.
Code released under the MIT License