Skip to content

Instantly share code, notes, and snippets.

@AndonMitev
Created April 14, 2020 08:55
Show Gist options
  • Save AndonMitev/5add6808a83d8df593029dfb99c98255 to your computer and use it in GitHub Desktop.
Save AndonMitev/5add6808a83d8df593029dfb99c98255 to your computer and use it in GitHub Desktop.
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