Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.22 KB

README.md

File metadata and controls

40 lines (31 loc) · 1.22 KB

URL Shortener on Blockchain

その名の通り、ブロックチェーン上で動くURL短縮ツール

Demo

Description

EthereumのContractにURLを送ると、ハッシュ関数から[a-zA-Z0-9]からなる8文字のkeyを生成してmappingに登録する。短縮URLはルートに"#[key]"を加えたものになる。

短縮URLにアクセスがあった場合は、Contractにkeyを送って元のURLを受け取り、javascriptでそのページにジャンプする。

現在のところtestnet(ropsten)でのみ動作確認済み。

Requirement

  • truffle@4.1.14
  • truffle-hdwallet-provider@0.0.6
  • MetaMask@4.11.1 (for registraction)

Using Libraries

Setup

install truffle-hdwallet-provider

npm install truffle-hdwallet-provider

migrate contract (to require MetaMask nmemonic of "../nmemonic.txt")

npm run migrate

and serve files in local

npm run serve // to serve "./docs" at http://127.0.0.1:8080