imusify profits from active users and users are rewarded for their activity. This is the source code for the user reward NEO smart contract for the imusify platform that realizes this idea.
When a user creates an imusify account, a NEO wallet is created and assigned to him or her. The users IMU token balance, as well as their reputation level, is stored in the context of the smart contract on the immutable NEO blockchain. User actions on the web platform raise the users reputation level and this level, in turn, determines their IMU reward.
In more details, events on the web user interface (see below) are signaled to the Python middleware designed for this project, which then triggers a return. And indeed, the awarded amount is not determined by imusify but by the contract and the users level alone.
Beyond the NEP5 compliant method calls (like levelOf
or transfer
, which always enables users to freely exchange IMU tokens) the main chain of new methods of the imusify contract logic are as follows:
BigInteger LevelUp(byte[] account)
BigInteger RewardFunction(BigInteger level)
BigInteger Reward(byte[] account)
This is accompanied by the query
BigInteger LevelOf(byte[] account)
Simply call levelOf
followed by any NEO address. Before the final release, anybody can test the reward trigger. To this end, similar to levelOf
and balanceOf
, call reward
followed by a NEO address. In the source code above, the reward scheme is designed so that the curious developer can test the functionality and quickly witness the effect of a level raise. At a later point, the scheme will be scaled for long term incentification of users.
Here is a Video "How to deploy a smart contract and do token transfers" which describes the imusify incentify smart contract in depth:
The project is released under the MIT license.
0x645c4dcdc6cc4b69a8b8d7c0a532795d0312d5e6
Upload music
Follow your favorite users
Display song details and comments
and purchase music for personal or commercial use
Display most upvoted content
and implement following functionality
Create user profiles
and artist profiles
...playlists
and check out this beautiful player...
Explore music by using tags and filters