Skip to content

Instantly share code, notes, and snippets.

@georgecode
Created March 21, 2019 01:18
Show Gist options
  • Save georgecode/fc5fde6c3a3139065adc8863517d00eb to your computer and use it in GitHub Desktop.
Save georgecode/fc5fde6c3a3139065adc8863517d00eb to your computer and use it in GitHub Desktop.
Set up web3.js and ethereumjs-tx
// basic_web3js_transaction_tutorial/src/App.js
import React, { Component } from "react";
import "./App.css";
import Web3 from "web3";
import Tx from "ethereumjs-tx";
const web3 = new Web3(
new Web3.providers.HttpProvider(
"https://kovan.infura.io/v3/YOUR_KEY_FROM_INFURA"
)
);
//**Gen Keys
let genKeyPairs = web3.eth.accounts.create();
console.log("KEYS", genKeyPairs);
class App extends Component {
render() {
return (
<div className="App">
<h1>sudo_web_wallet</h1>
</div>
);
}
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment