We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// Withdraw async function withdraw() { const daiAmountinWei = web3.utils.toWei("2", "ether").toString() const daiAddress = "0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD" // kovan testnet DAI
try { // Make the borrow transaction via LendingPool contract const lpAddress = await getLendingPoolAddress() const lpContract = new web3.eth.Contract(LendingPoolABI, lpAddress) await lpContract.methods .withdraw(daiAddress, daiAmountinWei, myAddress) .send({ from: myAddress }) .catch((e) => { throw Error(`Error borrowing from the LendingPool contract: ${e.message}`) }) } catch (e) { alert(e.message) console.log(e.message) }
}`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
`lpContract.methods.withdraw is not a function
// Withdraw
async function withdraw() {
const daiAmountinWei = web3.utils.toWei("2", "ether").toString()
const daiAddress = "0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD" // kovan testnet DAI
}`
The text was updated successfully, but these errors were encountered: