Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BlockchainHackathon2019 ワークショップ ~ Twitterとブロックチェーンを使ったアイデンティフィケーションの実現~

daisuke sato
February 09, 2019

BlockchainHackathon2019 ワークショップ ~ Twitterとブロックチェーンを使ったアイデンティフィケーションの実現~

このスライドは、経産省主催のブロックチェーンハッカソン2019のワークショップで使用されたスライドです。

daisuke sato

February 09, 2019
Tweet

More Decks by daisuke sato

Other Decks in Technology

Transcript

  1. TwitterIdentifyίϯτϥΫτ ./contracts/TwitterIdentify.sol contract TwitterIdentify { // ΞυϨεͱTwitterΞΧ΢ϯτIDͷmapping mapping(address => string)

    public twitterIdentifications; function identify(string twitterId, bytes32 hash, bytes signature) public { ... } function ecverify(bytes32 hash, bytes signature) internal pure returns(address sig_address) { ... } }
  2. ίϯτϥΫτσϓϩΠ ※<YOUR SUBDOMAIN>ͷ෦෼Λॻ͖׵͍͑ͯͩ͘͞ ./truffle-config.js module.exports = { networks: { getho:

    { host: "<YOUR SUBDOMAIN>.getho.io/jsonrpc", port: 80, network_id: 1010, gas: 4712388 } } }
  3. webαʔόىಈ <YOUR SUBDOMAIN>ͱ<CONTARCT ADDRESS>Λॻ͖׵͑ ͍ͯͩ͘͞ ./app.js var web3 = new

    Web3('http://<YOUR SUBDOMAIN>.getho.io:80/jsonrpc'); const contractAddr = '<CONTRACT ADDRESS>';
  4. gethoʹίϯτϥΫτΞοϓϩʔυ ϩάΠϯ $ ./getho_osx login ϊʔυҰཡऔಘ $ ./getho_osx nodes ίϯτϥΫτͷΞοϓϩʔυ

    $ ./getho_osx upload ./builds/contracts/ TwitterIdentify.json -s <YOUR SUBDOMAIN>