Skip to content

Lesson 13: hardhat & DeFi: Error: VM Exception while processing transaction: reverted with reason string '12' #6259

Answered by Nlferu
sthurley asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @sthurley

Please be informed that Aave got updated. Please see below.

async function borrowAsset(assetAddress, lendingPool, amountToBorrow, account) {
    /** @dev ILendingPool: function borrow(address asset, uint256 amount, uint256 interestRateMode, uint16 referralCode, address onBehalfOf) external; */
    /** Stable Interest Rate: 1 Variable Interest Rate: 2 (New Aave -> variable) */
    const borrowTx = await lendingPool.borrow(assetAddress, amountToBorrow, 2, 0, account)
    await borrowTx.wait(1)
}

Please also see this: link

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sthurley
Comment options

Answer selected by sthurley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants