<commit_before>import React from 'react'
import ReactDOM from 'react-dom'

import contract from 'truffle-contract'
import metacoinJson from 'contracts/build/contracts/MetaCoin.json'
const MetaCoin = contract(metacoinJson)

MetaCoin.deployed()

ReactDOM.render(
  <h1>Hello, world!</h1>,
  document.getElementById('root')
)<commit_msg>Added some code to prove that we can actually call contract code<commit_after>import React from 'react'
import ReactDOM from 'react-dom'

import contract from 'truffle-contract'
import metacoinJson from 'contracts/build/contracts/MetaCoin.json'
const MetaCoin = contract(metacoinJson)

import Web3 from 'web3'

var web3Location = `http://localhost:8545`

window.addEventListener('load', function() {
  var web3Provided;
  // Supports Metamask and Mist, and other wallets that provide 'web3'.
  if (typeof web3 !== 'undefined') {
    // Use the Mist/wallet provider.
    // eslint-disable-next-line
    web3Provided = new Web3(web3.currentProvider);
  } else {
    web3Provided = new Web3(new Web3.providers.HttpProvider(web3Location))
  }

  MetaCoin.setProvider(web3Provided.currentProvider)
  MetaCoin.deployed()
    .then(function (deployed) {
      let account = web3Provided.eth.accounts[0]
      return deployed.getBalanceInEth.call(account, {from: account})
    })
    .then(function (balance) {
      console.debug('Balance: ' + balance.toNumber())
    })

  ReactDOM.render(
    <h1>Hello, world!</h1>,
    document.getElementById('root'))
})
{'fraction_non_alphanumeric': 0.1191919191919192, 'fraction_numerical': 0.01616161616161616, 'mean_word_length': 4.544776119402985, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7200304', 'n_tokens_mistral': 480, 'n_tokens_neox': 480, 'n_words': 111}