Skip to content

blocknotary/proofofgithub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proof of Phone logo

Proof of Github is a smart oracle developed for the Ethereum blockchain to serve as a simple form of KYC (Know-Your-Customer).

MIT licensed

Installation

  1. Download zip archive
  2. Unpack it
  3. Go to the /web folder in terminal and install the dependencies npm install
  4. Set environment in web/config.json (see config.json with placeholders below): test or live
  5. Set smart contract key points in web/config.json (see config.json with placeholders below):
    • wallet.test, wallet.live
    • rpc.test, rpc.live
  6. Go to the root in terminal / and run node deployContract.js to deploy your smart contract into Ethereum.
  7. After creation you will get the message in terminal like this: Contract mined! address: 0xb713e9195f44a10383015f38774f31869053750c transactionHash: 0x85e85f78a4e1b40f26e491eb88b9a231b31085db11799734edc54d0285edc190
  8. Copy created smart contract address from this message and paste it to the config.json to contractAddress.test or contractAddress.live depending on your environment.
  9. Go to /web folder in terminal and start proofofgithub web application node app.js

config.json with placeholders

{
  "environment": "live/test",
  "globalToken": "globalToken_for_using_proof_of_github_api",
  "salt": "salt_for_cookie_id_hash_creating",
  "githubAPI": {
    "host": "api.github.com",
    "path": "/gists"
  },
  "smartContract" : {
    "bin": "0x606060405260008054600160a060020a031916331790556109b0806100246000396000f36060604052361561006c5760e060020a60003504631f83f440811461015c57806321a3e5071461018457806341c0e1b51461022457806369609b9714610244578063a02b9aac146102c5578063cf6083ab14610348578063e30a323d146103ae578063e3ffc9a314610427575b60408051608081018252600060608201818152825267016345785d8a000034046020838101919091528351601f369081018390048302820183018652808252610447958501939192819084018382808284378201915050505050508152602001506002600050600033600160a060020a031681526020019081526020016000206000506000820151816000016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061045057805160ff19168380011785555b506104809291505b808211156104ec5760008155600101610148565b610520600435600160a060020a0381166000908152600260205260409020600101545b919050565b6040805160206004803580820135601f81018490048402850184019095528484526105329491936024939092918401919081908401838280828437509496505050505050506000600360005082604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060009054906101000a9004600160a060020a0316905061017f565b610447600054600160a060020a039081163391909116146105d15761044e565b61054f60043560408051602081810183526000808352600160a060020a0385168152600280835290849020805485516001821615610100026000190190911692909204601f8101849004840283018401909552848252929390929183018282801561060a5780601f106105df5761010080835404028352916020019161060a565b61054f60043560408051602081810183526000808352600160a060020a03851681526002808352908490208101805485516001821615610100026000190190911692909204601f8101849004840283018401909552848252929390929183018282801561060a5780601f106105df5761010080835404028352916020019161060a565b60408051602060248035600481810135601f81018590048502860185019096528585526104479581359591946044949293909201918190840183828082843750949650505050505050600054600160a060020a0390811633919091161461067a57610676565b6105bd600435600160a060020a038116600090815260026020818152604080518185208054600181161561010002600019011694909404601f810184900484028201840190925281815261085a9390929091908301828280156108925780601f1061086757610100808354040283529160200191610892565b610447600054600160a060020a039081163391909116146108dc5761044e565b005b505050505b565b82800160010185558215610140579182015b82811115610140578251826000505591602001919060010190610462565b5050602082015181600101600050556040820151816002016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106104f057805160ff19168380011785555b50610449929150610148565b5090565b828001600101855582156104e0579182015b828111156104e0578251826000505591602001919060010190610502565b60408051918252519081900360200190f35b60408051600160a060020a03929092168252519081900360200190f35b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156105af5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b604080519115158252519081900360200190f35b600054600160a060020a0316ff5b820191906000526020600020905b8154815290600101906020018083116105ed57829003601f168201915b5050505050905061017f565b505090505081600360005082604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060006101000a815481600160a060020a03021916908302179055505b5050565b604080516060810182528281526000602082810191909152600180548451600282841615610100026000190190921691909104601f81018490048402820184018652808252939485019390928301828280156107175780601f106106ec57610100808354040283529160200191610717565b820191906000526020600020905b8154815290600101906020018083116106fa57829003601f168201915b505050919092525050600160a060020a0383166000908152600260208181526040832084518051825483875295849020929586956001821615610100026000190190911604601f9081018590048401949193929091019083901061078e57805160ff19168380011785555b506107be929150610148565b82800160010185558215610782579182015b828111156107825782518260005055916020019190600101906107a0565b5050602082015181600101600050556040820151816002016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061082a57805160ff19168380011785555b50610616929150610148565b8280016001018555821561081e579182015b8281111561081e57825182600050559160200191906001019061083c565b156108d45750600061017f565b820191906000526020600020905b81548152906001019060200180831161087557829003601f168201915b50506040805160208181018352600080835283518083018552819052835191820190935282905280518651919550919350859250849184911461091157610908565b50600161017f565b60008054604051600160a060020a0391821692913016319082818181858883f15050505050565b600193505b50505092915050565b5060005b825181101561090357818181518110156100025790602001015160f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168382815181101561000257016020015160f860020a90819004027fff0000000000000000000000000000000000000000000000000000000000000016146109a85760009350610908565b60010161091556",
  	"abi": [{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getPaymentByAddress","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"gistLink","type":"string"}],"name":"getAddressByGistLink","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getGistLinkByAddress","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getPaymentDataByAddress","outputs":[{"name":"","type":"bytes"}],"type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"},{"name":"gistLink","type":"string"}],"name":"newGistLinkToAddr","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"hasGistLink","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":false,"inputs":[],"name":"sendEtherToOwner","outputs":[],"type":"function"},{"inputs":[],"type":"constructor"}],
    "wallet": {
      "test": "0x0000000000000000000000000000000000000000",
      "live": "0x0000000000000000000000000000000000000000"
    },
    "contractAddress": {
      "test": "0x0000000000000000000000000000000000000000",
      "live": "0x0000000000000000000000000000000000000000"
    }, 
    "rpc": {
      "test": "http://host:port",
      "live": "http://host:port",
      "user": "user_for_http_basic_auth_for_live_rpc",
      "pass": "pass_for_http_basic_auth_for_live_rpc"
    }
  }
}

Contributors

Viktor Baranov

Pasha Goncharenko

Igor Barinov

Anton Grin

License

MIT

Support

Supported by Wanxiang Blockchain Labs

About

KYC oracle to link your github account and ethereum wallet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •