This boilerplate smart contract template introduces the core ideas and implementations for tickets management. It showcases key opportunities that immutable distributed ledgers and Solidity smart contracts offer: profit sharing between all participants of the value creation and resales chain.
DISCLAIMER: THIS SMART CONTRACT SUITE WAS DESIGNED FOR DEMO PURPOSES; UNLESS EXPLICITLY INDICATED OTHERWISE, THESE SMART CONTRACTS HAVE NOT BEEN AUDITED FOR PRODUCTION USAGE.
dThankYou smart contract components are:
Management/Management.sol is a base smart contract, which is established in each of the contracts supporting the platform operation or activities. This smart contract includes the following functions:
It also comprises the basic functions that allow to manage and check state variables.
Management/Managed.sol is a parent contract for the platform-related smart contracts, except the Management contract. It is designed to keep the actual Management contract address and interact with all other contracts through the Management contract.
Management/Constants.sol is a contract designed for storing constants, to specify contracts for their registration in the system, and constants to indicate permission for performing certain actions.
Thank-you-token/CompanyThankYouToken.sol is the ERC-20-based mintable-token smart contract. It is the basic smart contract responsible for:
CompanyToken.sol is a smart contract which extends the basic CompanyThankYouToken contract. It is created to store initial holder balance and spent tokens for each recognition period. In addition, it is responsible for the calculation and distribution of tokens for whitelisted users. Calculations for each recognizing period are based on the token balance of the initial holder and spent tokens for a previous period.
CompanyFabric.sol is a smart contract which stores all the created CompanyTokens and provides the ability to create a new CompanyToken contract (ThankYouCoin) for the permitted account.
There are four main roles that interact with smart contract:
In order to get tokens, every team member should claim them with a hash generated by the platform.
The hash data contains claimTokens functions with signed sender address (a team member which will receive tokens) and current timestamp by the specific platform-related ethereum address.
After receiving tokens, a user can utilize them to send recognition to another team member.
After receiving recognition, a team member can claim a reward by sending tokens to the platform reward exchange address.
At the end of recognizing period, all tokens will be burned and users should claim tokens for the next recognizing period. Tokens amount for the new period depends on the initial balance and spent tokens for the previous period (prev period initial balance * 2 * percentage of prev period spent tokens).