All Projects → EtherTW → LogoVote2017

EtherTW / LogoVote2017

Licence: other
Collection of smart contract samples

Programming Languages

javascript
184084 projects - #8 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to LogoVote2017

Truffle Next
🛰️ A boilerplate Truffle Box project with Next.js for rapid Ethereum Dapp development
Stars: ✭ 130 (+441.67%)
Mutual labels:  truffle, ethereum-contract
Solidity Smart Contracts
smart contracts which are built on ethereum wallet mist,truffle compiler using solidity language.
Stars: ✭ 11 (-54.17%)
Mutual labels:  truffle, ethereum-contract
truffle-react
⚛️ A boilerplate Truffle Box project with Create React App for rapid Ethereum Dapp development
Stars: ✭ 45 (+87.5%)
Mutual labels:  truffle, ethereum-contract
solidity-contracts
📦 Resources for the Ethereum Smart Contract Development tutorial series.
Stars: ✭ 64 (+166.67%)
Mutual labels:  truffle, ethereum-contract
pyrrha-consensus
Core set of Ethereum contracts for Pandora Boxchain functioning
Stars: ✭ 25 (+4.17%)
Mutual labels:  truffle, ethereum-contract
Eth Vue
Featured in Awesome Vue [https://github.com/vuejs/awesome-vue], a curated list maintained by vuejs of awesome things related to the Vue.js framework, and Awesome List [https://awesomelists.net/150-Vue.js/3863-Open+Source/18749-DOkwufulueze-eth-vue], this Truffle Box provides everything you need to quickly build Ethereum dApps that have authentication features with vue, including configuration for easy deployment to the Ropsten Network. It's also Gravatar-enabled. Connecting to a running Ganache blockchain network from Truffle is also possible -- for fast development and testing purposes. Built on Truffle 5 and Vue 3, eth-vue uses vuex for state management, vuex-persist for local storage of app state, and vue-router for routing. Authentication functionalities are handled by Smart Contracts running on the Ethereum blockchain.
Stars: ✭ 171 (+612.5%)
Mutual labels:  truffle, ethereum-contract
React Ethereum Dapp Example
A starter boilerplate for an Ethereum dapp using web3.js v1.0, truffle, react, and parity
Stars: ✭ 384 (+1500%)
Mutual labels:  truffle, ethereum-contract
ethereum-contracts
Knowledge Ethereum Smart Contracts
Stars: ✭ 41 (+70.83%)
Mutual labels:  truffle, ethereum-contract
Angular Truffle Starter Dapp
Angular CLI + Truffle Starter Dapp; write, compile & deploy smart contracts on Ethereum blockchains
Stars: ✭ 174 (+625%)
Mutual labels:  truffle, ethereum-contract
etherbrite
🗓 Clone eventbrite on Ethereum, built in Solidity, TruffleJS, Web3js and React/Redux.
Stars: ✭ 19 (-20.83%)
Mutual labels:  truffle, ethereum-contract
GameOfLife
The world's most expensive version of Conway's Game of Life - running on the Ethereum Blockchain
Stars: ✭ 72 (+200%)
Mutual labels:  ethereum-contract
Ethplorer
Viewer of Ethereum tokens and transactions based on ERC20 standard.
Stars: ✭ 722 (+2908.33%)
Mutual labels:  ethereum-contract
defiprime
All things #DeFi - trustless and transparent financial products built on top of the blockchain.
Stars: ✭ 117 (+387.5%)
Mutual labels:  ethereum-contract
bitdegree-token-crowdsale
Token Website
Stars: ✭ 26 (+8.33%)
Mutual labels:  ethereum-contract
web3-gear
Proxy Thor's RESTful API to Eth JSON-RPC, to support Remix, Truffle and more.
Stars: ✭ 27 (+12.5%)
Mutual labels:  truffle
escrow-eth
Escrow contract
Stars: ✭ 41 (+70.83%)
Mutual labels:  truffle
mortgage-blockchain-demo
A demo DApp on Ethereum to process mortgage loans and payments
Stars: ✭ 42 (+75%)
Mutual labels:  truffle
contracts
Contracts for FundRequest (platform, token, crowdsale)
Stars: ✭ 56 (+133.33%)
Mutual labels:  ethereum-contract
CryptoKitties
A simple implementation of CryptoKitties on Ethereum using ERC721 token.
Stars: ✭ 32 (+33.33%)
Mutual labels:  ethereum-contract
likecoin-contracts
Token contracts of Like Coin
Stars: ✭ 22 (-8.33%)
Mutual labels:  truffle

Logo Vote 2017

Travis

Vote a new logo for Taipei Ethereum Meetup with smart contracts!

Read the general guideline and this technical document for more detail.

Usage

Two ways to get vote

  • donate to the LogoVote by send ethers to LogoVote address
    • 0.001 ether get 1 vote
    • all the funds will be the reward to the winner (need discussion)
  • get from faucet by send 0 ether transaction to Faucet address
    • it will give 1 vote to your ethereum account
    • it will fail if you send the ethers to faucet, and send back all the ethers

Vote to the Logos

  • by transfer vote to the logo address
  • ERC20 functions
  • any ether send to the logo address will be transfer to the author’s account (like tips), use it carefully.
  • you can check if the logo address is valid or not in LogoVote contract

Deploy

  • Deploy LogoVote.sol, it will automatically create Vote and Faucet contract.
  • Donate start.
  • Owner call the sendToFaucet function with amount, then Faucet is available.
  • Owner call the RegistLogo function for each logo.
  • Voting start.
  • End in 86400 blocks. (about 20 days)

Owner’s ability (and only owner can do)

  • dispatch the vote to the Faucet.
  • add the new logo to the contract.
  • end the vote by claimWinner() function. 0 stop the contract if in emergency.
  • backer can get back their funds (donate) in emergency.
  • release the emergency situation

FAQ

  1. RegistLogo 可以給一個範例嗎?

Call the registLogo() in LogoVote contract with three parameters only the owner of the LogoVote sc can do it. The function will create a Logo smart contract for the logo. The first parameter is the address of owner who owned the logo smart contract. The second parameter is the author’s address, the competition reward and the tips for the logo will be send to author’s address directly. final parameter is for the logo’s metadata, give it a URL. Or using IPFS to store it in decentralized storage.

  1. Release 是做什麼用的?
  • release the emergency situation
  • see the owner’s ability 4&5
  1. 用哪一個 command 來 Donate?

donate by send ether’s to the LogoVote’s address.

Ropsten TestNet on address

https://ropsten.etherscan.io/address/0x4720969735e6495cfe1029e5638f22f563079d9e#

Address of mainnet

Main Contract

0x3Ab1d534Bb477f516817eFaAf0B569f419b8e292

Faucet

0x5041bfBa3DEB602d794F6CF6C3Db50D572912c40

TLV token

0x795a9bFa0B30b92eFE663cBfbEC1656b6378748E

Start / End Block

3867102 / 4039902

Address on Kovan testnet

LogoVote (main contract)

0xc9e3118332E08cdb05938d2BEDfA9f9BA3874Dc2

(update by mingder) LogoVote is deployed to Ropsten TestNet on address: 0x4720969735e6495CFE1029e5638F22F563079d9E (obsolete)舊版, 放棄使用

Vote (ERC20 Token)

0xEbe2B44e72682CAcD5A53B2869cf52f0eA451220

(on Rosten Test Net on address: 0x94b717C56a2b20B898Ab418b5AE8216AB737C2d8 (obsolete)舊版, 放棄使用

https://ropsten.etherscan.io/token/0x13e4f3d6a0edf9a8a0106bb86baae4c388ba6081?a=0x94b717c56a2b20b898ab418b5ae8216ab737c2d8 (舊版, 放棄使用)

Vote Faucet

0x8dF2248a671378D70006a14d3f6Ba28Aa4B02007

ABI

LogoVote

[{"constant":true,"inputs":[],"name":"endBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isAfterEnd","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getLogos","outputs":[{"name":"","type":"address[]"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"logos","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_author","type":"address"},{"name":"_metadatUrl","type":"string"}],"name":"registLogo","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"claimWinner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getBlockNumber","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"startBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"getFunds","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"votePerETH","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_logoAddress","type":"address"}],"name":"isLogo","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"vote","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"emergencyStop","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"sendToFaucet","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalReward","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"stopped","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"cleanBalance","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"release","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isRespectTimeFrame","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"}],"name":"claimReward","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"faucet","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"winner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"ReceiveDonate","type":"event"}]

Logo

[{"constant":false,"inputs":[],"name":"tips","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_metadataUrl","type":"string"}],"name":"setMetadata","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"author","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"claimReward","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"metadataUrl","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"logoVote","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_owner","type":"address"},{"name":"_author","type":"address"},{"name":"_metadatUrl","type":"string"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_from","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"ReceiveTips","type":"event"}]

Vote

Using ERC20 standard is enough, or use below 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":"","type":"bool"}],"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":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"initialSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_address","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"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"},{"inputs":[],"payable":false,"type":"constructor"},{"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"}]

Developing

Install truffle

npm config set python python2.7
npm install -g ethereumjs-testrpc
npm install -g truffle
//
// visual studio 2015 build tools 
// npm install -g ethereumjs-testrpc --msvs_version=2015
// npm install -g truffle --msvs_version=2015
//
mkdir taipei-eth-logovote && cd taipei-eth-logovote 
truffle init

Test LogoVote contract

testrpc &
cd taipei-eth-logovote && npm install
truffle test

LogoVote/Migrations contract deployment on kovan/rinkeby network

cd taipei-eth-logovote
TEST_MNEMONIC="kovan foo bar blah ..."
truffle migrate --network kovan --verbose-rpc
TEST_MNEMONIC="rinkeby foo bar blah ..."
truffle migrate --network rinkeby --verbose-rpc
// Windows
// $env:TEST_MNEMONIC="kovan foo bar blah ..." ; truffle migrate --network kovan --verbose-rpc
// $env:TEST_MNEMONIC="rinkeby foo bar blah ..." ; truffle migrate --network rinkeby --verbose-rpc
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].