yarn install
yarn start
All web3 related items are available in the wallet.js
provider using the React Context API.
You can import the following variables from the wallet context:
- dalpManager - DALPManager contract
- dalpToken - DALP contract
- wallet - web3 provider
- account - current metamask account
import React, { useContext } from "react";
import { WalletContext } from "../../providers/wallet";
const { dalpManager, dalpToken, account } = useContext(WalletContext);
Contract methods can then be called
await dalpToken.methods.balanceOf(account).call();