district0x / survey-memefactory Goto Github PK
View Code? Open in Web Editor NEWLicense: Eclipse Public License 1.0
License: Eclipse Public License 1.0
We need to support urls such as https://survey.memefactory.io/cn/
and https://survey.memefactory.io/ko/
in order to have translations for asian languages.
Add this functionality, so we can add translated texts. No need to adopt any robust mechanisms/libraries for this, this is just temporary application, translated texts can be pasted into cljs files, same as with English texts right now.
Write snippet that calculates DANK rewards for voters.
800M DANK tokens will be distributed to voters in following way:
A voter's votes from all 6 rounds will be summed up and he'll then get proportional amount of DANK relative to all other votes.
Example:
User voted as such in 6 surveys:
So together he voted: 2.1M DNT
Let's say votes from all voters in all 6 rounds were together 50M DNT
This user would be eligible for (2,1/50)*100 = 4,2. 4,2% from 800M DANK = 33,6M.
User would get 33,6M DANK.
Output from this script should be in format:
[user-address] [amount of DANK]
0x619e9f8f181866fedb5e6c96c21d27323a233808 2000000
Survey contract can be found here https://github.com/district0x/survey-memefactory/blob/04b7e1576a08f5f721c93a62a7f93135b3cb713a/resources/public/contracts/src/Survey.sol
Address is 0x582ccc8fecacb8cbc3ad280f32194022a64f9ca3
Survey IDs are: 0, 2, 3, 4, 5, 6 (beware 1 is skipped)
In db.cljs and syncer.cljs and graphql_resolvers.cljs, we're already calculating user's votes, so you might wanna use code from there.
It's not important to write standalone script that calculates this, feel free to get output just from REPL, using existing db.cljs and everything server-side code uses. Just output is important.
Deploy MiniMeToken into mainnet and distribute DANK token accordingly.
First you'll need to deploy MiniMeTokenFactory
and MiniMeToken
, after that, so you can pass the factory address into constructor.
Parameters passed into constructor:
_tokenFactory
- Address you'll obtain after deploying MiniMeTokenFactory
_parentToken
- 0x0
_parentSnapShotBlock
- 0
_tokenName
- DANK Token
_decimalUnits
- 18
_tokenSymbol
- DANK
_transfersEnabled
- true
After deploying, you'll call generateTokens
and generate 1000000000 DANK to your address (1 billion in ether unit, but you need to pass it in wei, therefore multiply by 18) and then distribute from your address. You can do this from any address you want, after distribution is done, we'll change token controller to multisig.
You can do it in REPL from this repo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.