Giter VIP home page Giter VIP logo

tokencreation's Introduction

TokenCreation Library

The intention of this library is to be included in existing site in order to provide an easy way for people to buy such tokens. To set it up, you need simply need to follow these steps:

  • in your existing site add containers to be replaced with the content from this library.

    <div id="dao_container">
       loading the TokeCreation....
    </div>
    <div id="dao_stats">
       the statisticss...
    </div>
    <div id="dao_balancecheck">
       loading balancecheck
    </div>

Also if you want to support for IE8-11 you should add this meta-tag in your header:

```html
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />    
```
  • at the end of the html-file include this script:

  • <script src="tokencreation/src/init.js"></script>
  • edit the configuration found in tokencreation/server/config.json

    {
      "client"  : "http://MyIP:8545",   // this is a running client to be used to check balances and execute signed transactions. 
      "dao"     : "0x...",              // the address of the DAO
      "data"    : "/data/dao",          // this is the path where all incoming data (transactions and privatekeys to be mailed) will be stored and executed. (make sure this directory is included in the php php_admin_value open_basedir)
      "mailer"  : {
        "from"    : "[email protected]",  // the from-address for all outgoing emails.
        "sendKey" : {                       // the email-templates for sending the key to the user
            "subject" : "Your new DAO-Account",
            "text"    : "Dear User\n\nYou just created a new Account in order to take part on the DAO.\nYour public address is 0x$address$\n\nYou may put this key into ~/.ethereum/keystore -folder in order to use it\n\nYour DAO-Team"
        },
        "confirmTx" : {                     // the email-template for confirming the execution of the transaction.
            "subject" : "DAO-Transaction confirmed",
            "text"    : "Dear DAO User\n\nYour Transaction of $amount$ Ether has been confirmed. You can now use your Tokens assigned to the $adr$ to vote.\n\nThe DAO Team"
         }
    },
      "gatecoin" : {                        // in order to use the gatecoin-api, you need to fill the Key here.
         "secretKey"  : "TODO INSERT HERE",
         "publicKey"  : "TODO INSERT HERE"
       },
       "shapeshift" : {                     // in order to use the shift-button, you need a special public key to be put here.
          "publicKey"   : "TODO INSERT HERE"
       }
    }
  • after putting these file to the server, you need to go into the directory tokencreation and call

    bower update
  • and in the directory tokencreation/server/tx

    npm install
  • now active a cronjob, which is used to handle all incoming requests and also updating the statistics.

    crontab -e

    The lines to add there should look something like this:

     0 * * * * /usr/bin/nodejs {PATHTOSITE}/tokencreation/server/tx/updateStats.js /var/log/updatestats 2>&1
     */5 * * * * /usr/bin/node {PATHTOSITE}/tokencreation/server/tx/import.js >> /var/log/dao_tx 2>&1

    This will let the first cronjob update the statistics every hour and check for incoming transaction every 5 min.

Before you test the site you may update the statistics even manually, if you don't want to wait for the cronjob to do it:

Go to tokencreation/server/tx and run

nodejs updateStats.js

Now it's ready to go!

tokencreation's People

Contributors

griffgreen avatar jeffanthony avatar lefterisjp avatar simon-jentzsch avatar stephantual avatar vcealicu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.