Created
April 8, 2018 15:48
-
-
Save MichalZalecki/be03c3b9b9a12bc0402ce7eac32688d9 to your computer and use it in GitHub Desktop.
MetaMask and web3 1.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Web3 from "web3"; | |
const web3 = new Web3(Web3.givenProvider); | |
const web3Events = new Web3(new Web3.providers.WebsocketProvider("wss://mainnet.infura.io/ws")); | |
const Contract = new web3.eth.Contract(ABI, ADDRESS); | |
const ContractEvents = new web3Events.eth.Contract(ABI, ADDRESS); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment