Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MetaMask and web3 1.0
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
You can’t perform that action at this time.