eusthace811 / trueflip-contracts

TrueFlip Token and ICO contracts for Ethereum

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TrueFlip Smart Contracts

Installation

  1. Install Yarn
  2. Run yarn upgrade

Testing with Yarn

  1. ./run_testrpc.sh - run testrpc node with required params
  2. yarn truffle compile - compile all contracts
  3. yarn truffle test - run tests
  4. Restart testrpc before running each tests again.

##ICO ABI

[ { "constant": true, "inputs": [], "name": "targetSatoshi", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "endBlock", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "escrowAddress", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "advisoryPercentOfTotal", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "new", "type": "address" } ], "name": "setOwner", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "teamAddress", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "isActive", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [], "name": "finalizeICO", "outputs": [], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "investmentInSatoshi", "type": "uint256" }, { "name": "beneficiary", "type": "address" }, { "name": "investorId", "type": "string" }, { "name": "investmentId", "type": "uint256" } ], "name": "investment", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "startBlock", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "x", "type": "address" } ], "name": "toString", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "tokensPerSatoshi", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "newAddress", "type": "address" } ], "name": "setTeamAddress", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "maxICOIssuance", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "satoshiCollected", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "advisoryAddress", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "investmentInSatoshi", "type": "uint256" } ], "name": "calculateTokens", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "teamPercentOfTotal", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "potentialOwner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "tokensIssuedDuringICO", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "getBonus", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "icoFinalized", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "satoshiPerEther", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [], "name": "confirmOwnership", "outputs": [], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "rate", "type": "uint256" } ], "name": "setExchangeRate", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "token", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "type": "function" }, { "inputs": [ { "name": "ownerAddress", "type": "address" }, { "name": "tokenAddress", "type": "address" }, { "name": "teamAddress", "type": "address" }, { "name": "advisoryAddress_", "type": "address" }, { "name": "escrowAddress_", "type": "address" }, { "name": "startBlock_", "type": "uint256" } ], "payable": false, "type": "constructor" }, { "payable": true, "type": "fallback" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "satoshi", "type": "uint256" }, { "indexed": false, "name": "issuedTo", "type": "address" }, { "indexed": false, "name": "tokens", "type": "uint256" }, { "indexed": false, "name": "bonus", "type": "uint256" }, { "indexed": false, "name": "investor", "type": "string" }, { "indexed": false, "name": "investmentId", "type": "uint256" } ], "name": "Investment", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "old", "type": "address" }, { "indexed": false, "name": "current", "type": "address" } ], "name": "NewOwner", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "old", "type": "address" }, { "indexed": false, "name": "potential", "type": "address" } ], "name": "NewPotentialOwner", "type": "event" } ]

Token ABI

[ { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "approve", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "_new", "type": "address" } ], "name": "setOwner", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "_from", "type": "address" }, { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "mintAddress", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [], "name": "finalize", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "name": "balance", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "potentialOwner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "mintedTokens", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [], "name": "withdrawTokens", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "mintingAllowed", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "transfer", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "beneficiary", "type": "address" }, { "name": "amount", "type": "uint256" }, { "name": "transfer", "type": "bool" } ], "name": "mint", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "type": "function" }, { "constant": true, "inputs": [], "name": "maxSupply", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [], "name": "confirmOwnership", "outputs": [], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "beneficiary", "type": "address" }, { "name": "amount", "type": "uint256" } ], "name": "requestWithdrawal", "outputs": [], "payable": false, "type": "function" }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" }, { "name": "_spender", "type": "address" } ], "name": "allowance", "outputs": [ { "name": "remaining", "type": "uint256" } ], "payable": false, "type": "function" }, { "constant": false, "inputs": [ { "name": "newAddress", "type": "address" } ], "name": "setMintAddress", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "type": "function" }, { "inputs": [ { "name": "ownerAddress", "type": "address" } ], "payable": false, "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "old", "type": "address" }, { "indexed": false, "name": "current", "type": "address" } ], "name": "NewOwner", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "old", "type": "address" }, { "indexed": false, "name": "potential", "type": "address" } ], "name": "NewPotentialOwner", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "from", "type": "address" }, { "indexed": true, "name": "to", "type": "address" }, { "indexed": false, "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "owner", "type": "address" }, { "indexed": true, "name": "spender", "type": "address" }, { "indexed": false, "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "to", "type": "address" }, { "indexed": false, "name": "value", "type": "uint256" } ], "name": "Issuance", "type": "event" } ]

About

TrueFlip Token and ICO contracts for Ethereum

License:GNU General Public License v3.0


Languages

Language:JavaScript 96.4%Language:Shell 3.6%