Skip to content

Prediction and Betting dApp of Token Price is a dApp which is created by Amberdata.io and Chainlink Oracle.

Notifications You must be signed in to change notification settings

masaun/amberdata-prediction-and-betting-dApp-of-token-price

Repository files navigation

Prediction and Betting dApp of Token Price(by using Amberdata.io and Chainlink Oracle)

Introduction of Prediction and Betting dApp of Token Price


  • Prediction and Betting dApp of Token Price works on Ropsten Testnet right now.

Introduce using process of this dApp


UI and process of Prediction and Betting dApp

Once you follow the previous steps, your browser should display the page below at http://localhost:3000/. If the page is blank, try logging in to your MetaMask add-on.


Before installation

  • Install npm

  • Install truffle globally using:

npm install -g truffle

  • Install the Metamask add-on to your browser and create a wallet.
    Note down the mnemonics. Fund it with Ropsten ETH and Ropsten LINK.

  • Create an Infura account, get an endpoint URL for the Ropsten testnet and note it down.

  • (Optional) Install Visual Studio Code


Installation

  • ① Clone this repo using:
    git clone git@github.com:masaun/amberdata_chainlink_oracle_integration.git

  • ② Go to the main directory (/amberdata_chainlink_oracle_integration)

  • ③ Install the dependencies for the smart contract:
    npm install

  • ④ Create the file that you are going to enter your Infura credentials:
    cp wallet.json.example wallet.json

  • ⑤ Open the newly created wallet.json file and enter the mnemonics and the endpoint URL you have noted down earlier, similar to wallet.json.example.

  • ⑥ Deploy the contract (Ropsten LINK will be transferred from your wallet to the contract automatically during deployment)
    npm run migrate:ropsten

  • ⑦ Go to the front-end project directory (/amberdata_chainlink_oracle_integration/client)

  • ⑧ Install the dependencies for the front-end project:
    npm install

  • ⑨ Start the server
    npm run start

  • ⑩ Access browser
    http://localhost:3000/


Recommendation when setup

  • After process of ⑥(Deploy the contract) above, it is better to transfer LINK token from Chainlink fancet on ropsten below to deployed contract address. (Chainlink fancet on ropsten below are able to transfer 100 LINK)
    https://ropsten.chain.link/
    • In this case,
      • deployed contract address of "PredictionAndBetting" is "0x1E471587D723bD45B31FfFC0819054C0Ac917cE2"
        amberdata_7 1
    • In this case above, developer should send some amount LINK to deployed contract address of "PredictionAndBetting" ( "0x1E471587D723bD45B31FfFC0819054C0Ac917cE2" ) in advance.
      (In case developer send via chainlink-fancet below link, it can send 100LINK)
      https://ropsten.chain.link/ amberdata_7_2020-03-17 at 14 12 52

References




About

Prediction and Betting dApp of Token Price is a dApp which is created by Amberdata.io and Chainlink Oracle.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published