Last active
May 22, 2021 11:36
-
-
Save bhavya2611/a0f2696900f7a6399025f4661beb9a20 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const getLpTokenTotalSupply = async () => { | |
try { | |
const LpTokenContract = new web3.eth.Contract( | |
IUniswapV2Pair, | |
LP_TOKEN_ADDRESS | |
); | |
const totalSupply = await LpTokenContract.methods.totalSupply().call(); | |
return totalSupply; | |
} catch (e) { | |
console.log(e); | |
return 0; | |
} | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment