Created
April 14, 2020 08:55
-
-
Save AndonMitev/5add6808a83d8df593029dfb99c98255 to your computer and use it in GitHub Desktop.
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 LPAddressProviderABI from './abis/lpAddressProvider.json'; | |
import web3 from 'web3'; | |
const lpAddress = '0x1c8756FD2B28e9426CDBDcC7E3c4d64fa9A54728'; | |
const web = new web3(); | |
const lpAddressProviderContract = new web.eth.Contract(LPAddressProviderABI, lpAddress); | |
export const data = (async () => { | |
await lpAddressProviderContract.methods | |
.getLendingPoolCore() | |
.call() | |
.catch(e => { | |
throw Error(`Error getting lendingPool address: ${e.message}`); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment