Code Monkey home page Code Monkey logo

token-wizard's Introduction

Token Wizard DApp

Token Wizard DApp

MIT licensed Build Status Waffle.io - Columns and their card count Join the chat at https://gitter.im/poanetwork/ico-wizard Coverage Status

Attention!

This repository is no longer supported by the POA Network. Use at your own discretion.

A Quote

ICO tools should be available for non-coders for free. Raising funds from a crowd is our basic human right.

Token Wizard is a tool to create token and crowdsale contracts in five simple steps. The Token Wizard is based on TokenMarket contracts, and is decentralized, client side, serverless, and open-source.

ICOs usually have two or more contracts - One token contract and one or more crowdsale contracts plus supplemental contracts, e.g., safe math, pricing strategy, etc. Most token contracts are the same (ERC-20); most crowdsale contracts are different. Token implementation should be stable for compatibility, and it is crucial to connect a token to exchanges and wallets. Crowdsale contracts on the other hand side should differentiate a project from others, e.g., create a new type of FOMO, fear of missing out.

This tool is free to use and open source. Although the tool is free to use, deploying contracts to the Ethereum network requires GAS in the form of ETHER. See "Deployment Time & Gas" part of Wiki for estimates. It is recommended to test the Token Wizard on Kovan testnet or POA's Sokol testnet, before deploying to the main network. See below for links to obtain testnet tokens for the Kovan or Sokol networks:

Deploying on POA's Sokol or Main network is much faster then using Ethereum's networks.

Kovan Testnet/faucet - Gitter

Find out other ways to obtain kETH

Sokol Testnet/faucet

POA Sokol Network RPC URL: https://sokol.poa.network

POA Main Network RPC URL: https://core.poa.network

For a guide on how to connect to the POA network using MetaMask see here.

Token Wizard DApp Wiki

Policies

Managing your Crowdsale

Support

This open source software is currently unsupported. You can create an issue in the Github Issues section and members of the open-source community may respond.

Disclaimer

The software is in Beta stage.

Token Wizard is constantly under active development. The “Beta” labelling implies that while the core features of the software have been implemented, bugs and issues may still remain undiscovered until this phase of testing is complete. As such, Token Wizard may experience the following issues, but not limited to, during usage:

  • loss of tokens/funds from incorrect configuration;
  • unexpected delays;
  • unexpected visual artifacts.

token-wizard's People

Contributors

andogro avatar dynamitechetan avatar fernandomg avatar fvictorio avatar gitter-badger avatar idobrovolskyi avatar igorbarinov avatar limonte avatar mgarciap avatar mmmikhail avatar sdzharkov avatar vbaranov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

token-wizard's Issues

Form Validation

Implement form validation and type checking for step three, four, and five.

Change behavior of “Add whitelist” and “Add reserved token” UI elements

Problem:
If a user doesnt press Plus UI element in “Add whitelist” and “Add reserved token” the row is not added to a state of a contracts and therefore is not used in a crowdsale.

Solution:
If a button is not pressed and a row is filled, use it for the smart contract state .
After pressing Plus button clear the row and add it as it is now. If row is filled and Plus not pressed use the row in the contract state

Remove all commented code

Comments should be reserved for explaining code not disabling it. All commented code should be deleted from the codebase.

Sweetalert about Metamask

Add Sweetalert to all pages of Wizard but Invest page if Metamask is not installed.
For the Invest page will be an additional issue.

Title: Warning
Text:
"You don't have Metamask installed. Check ICO Wizard GitHub for the instruction."

Wizard hangs on Mainnet after 2nd tx with Basic scenario

When deploying to mainnet, the Wizard doesn't handle exception
"main.3ba23847.js:1 Unhandled rejection Error: Transaction was not mined within 50 blocks, please make sure your transaction was properly send. Be aware that it might still be mined!"

I reproduced it and time between submitting tx and this error is much less than 50 blocks time, which is like 50*15sec=12.5 minutes

Allow to modify tier parameters after creation

In UI:
On setup a tier step. For each tier:

  • add a radio button to each tier "Allow modifying". By default is off
  • add Lorem ipsum description for radio button

if the switch is on, tier created with a method to update parameters of the tier such as

  • cap
  • rate
  • start date
  • end date

File Configuration of Components

Each Component Should have its own directory in the components directory and should have their own constants, utils, and eventually, actions and reducers files.

The current file such as stepOne.js should be replaced with index.js as follows in the directory.

components 
  stepOne
     utils.js
     constants.js
     index.js
     reducers.js
     actions.js

Pre-Ico Tiers from White list

Organiser performs KYC data collection with the White-List from the crowd before starting private Pre-Ico-Tier and pick up a group from the crowd who meet the requirements (could be > 2000 people) to set up Tiers (1, 2 or 3 pre-ico tiers with different params).

Selected group get the private link to the private Pre-ICO-Tier with specified by organiser params of the Tier:

– hard cap;
– min / max check for one investor;
– dates;
– discount.

Automatically verify contrats in etherscan

After deployment to ethereum network automatically verify contracts in etherscan

  1. parity approach with creation of multisig wallet
  2. plan B. tokenmarket approach with Selenium driver

White list adding error: incorrect minCap, maxCap

Unhandled rejection Error: Error: [number-to-bn] while converting number 1e+21 to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: "1e+21"
at Object.l [as toBN] (https://wizard.oracles.org/static/js/main.3ba23847.js:1:423452)
at s (https://wizard.oracles.org/static/js/main.3ba23847.js:1:92390)
at o.c [as _inputFormatter] (https://wizard.oracles.org/static/js/main.3ba23847.js:1:92487)
at o.encode (https://wizard.oracles.org/static/js/main.3ba23847.js:1:111282)
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:111119
at Array.forEach ()
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:111090
at o.encode (https://wizard.oracles.org/static/js/main.3ba23847.js:1:111136)
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:358198
at Array.map ()
at m.encodeParameters (https://wizard.oracles.org/static/js/main.3ba23847.js:1:358171)
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:1381438
at Array.map ()
at Object.p._encodeMethodABI (https://wizard.oracles.org/static/js/main.3ba23847.js:1:1381413)
at Object.p._processExecuteArguments (https://wizard.oracles.org/static/js/main.3ba23847.js:1:1385504)
at Object.p._executeMethod (https://wizard.oracles.org/static/js/main.3ba23847.js:1:1385995)
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:251424
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:98770
at a (https://wizard.oracles.org/static/js/main.3ba23847.js:1:1167349)
at i._settlePromiseFromHandler (https://wizard.oracles.org/static/js/main.3ba23847.js:1:1140792)
at i._settlePromise (https://wizard.oracles.org/static/js/main.3ba23847.js:1:1141636)
at i._settlePromise0 (https://wizard.oracles.org/static/js/main.3ba23847.js:1:1142338)
From previous event:
at i.d [as _captureStackTrace] (https://wizard.oracles.org/static/js/main.3ba23847.js:1:1107076)
at i._then (https://wizard.oracles.org/static/js/main.3ba23847.js:1:1136426)
at i.then (https://wizard.oracles.org/static/js/main.3ba23847.js:1:1134794)
at f (https://wizard.oracles.org/static/js/main.3ba23847.js:1:98605)
at o (https://wizard.oracles.org/static/js/main.3ba23847.js:1:250931)
at d (https://wizard.oracles.org/static/js/main.3ba23847.js:1:255134)
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:489908
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:254995
at e (https://wizard.oracles.org/static/js/main.3ba23847.js:1:250247)
at Object.callback (https://wizard.oracles.org/static/js/main.3ba23847.js:1:98558)
at o (https://wizard.oracles.org/static/js/main.3ba23847.js:1:107831)
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:1193283
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:9899:9
at completeRequest (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:9950:9)
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:673:16
at replenish (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:1193:25)
at iterateeCallback (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:1183:17)
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:1158:16
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:9827:7
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:9923:18
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:3335:16
at replenish (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:1198:17)
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:1202:9
at eachLimit$1 (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:3421:24)
at Object. (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:1232:16)
at runReturnHandlers (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:9922:15)
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:4105:24
at replenish (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:1198:17)
R @ main.3ba23847.js:1

FE Validation: Supply can't be 0

If I were to deploy a contract I would assume if I set supply to 0 , the crowdsale would be uncapped.

If that is not the case, I'd expect that I have to have this value being set. So, make sure the user can't proceed with Supply = 0

Refactor style of code

-replace '$this' with 'this' across the application. Using jquery like syntax is an anti-pattern in react

-use ES6 instead of regular javascript/ES5 or lower
-replace 'var' with the usage of let of const.

  • use arrow functions () => rather than function() {} in most cases

-extract most of the logic into separate class or util functions,
-right now there is too much logic in componentDidMount/componentWillMount, each function should have all of its logic at the same level of abstraction and be very readable by anyone who is not familiar with JS or react

  • state should be extracted at the application level, or passed down through props, not passed down as state to be mutated continually i.e. going passing and using state from home -> page1

  • remove nested ternary operators, multiple functions should be used to extract this logic or use &&/|| operators

  • don't mutate state directly any state changes should be made with this.setState({}) using the this.state = 'hello' will cause re-render issues within react

-remove console logs

-add extensive variable naming, i.e. using descriptive words to describe the items one is iterating over instead of 'i' in a for loop

Store parameters of crowdsales in a local file for Invest page

An attacker can send a user to a legit website with a fraudulent contract. Crowdsale addresses now in GET parameters in URL and it's easy to commit fraud for the attacker.

One solution to mitigate the problem is to store parameters of the crowdsale in a configuration file. I propose to store them in local structure of an instance of ICO Wizard, e.g. using this technique https://stackoverflow.com/questions/37066758/how-can-i-use-a-config-file-in-react

If a file with config is present, the app should use parameters from the file even GET parameters are used.

After implementation of the feature add a section about configuration to README.md file

minCap calculated incorrectly in the second transcation

In an example, minCap=1 maxCap=100 tokens for a user

when a crowdsale starts he buy 1 token
and after he can't buy <1 tokens, e.g. 0.1. The contract returns exception

he should be able in any amount < 100-1 in the next transaction

Refactor contracts creations for Step 3 and Step 4

As is:
We have two rounds of contract creations. Between Step 3 and 4, and between Step 4 and 5.

To be:

All contracts will be created Between Step 3 and 4. It will allow having metadata of all contracts in the downloaded file and therefore verify all contracts.

Gas allocation at 0

Processing 3 tier ICO, at least 6 contracts needed to be signed where gas limit was not filled in, was unsure of amount and might be a reason why contracts failed not knowing the amount of gas to send to each one.

Download results of Page4 (Results) to PDF

Information on Page 4 (Results) is very important for the crowdsale and token. It contains all settings of all tiers, code of a contract, ABI, constructor parameters. ICO Wizard is a client-side app without persistence besides an Ethereum blockchain.

We need to store the data somewhere. I propose to store data in a generated PDF document and download it to user's computer.

  • add button Download PDF
  • add all related fields to PDF
  • on click, Download PDF

Add "Disable whitelisting" switch

If "Disable whitelisting" switch is enabled, anyone can buy without limits on a tier. It's not possible to update "Disable whitelisting" after the creation of a smart contract. The switch is located near "Enable update" switch

Reserve tokens for early contributors (Project 001)

Additional block in Step 2. An organizer can add a string with a pair of address and amounts of tokens reserved. There is a + button to add next row.

CAP = CAP - SUM(RESERVED AMOUNTS)
Regular crowd buyers can't buy reserved amount. After crowdsale ends, reserved buyers can't buy reserved amounts and it will be burned.

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.