As per my understanding, if we want to get or interract with an already deployed contract, we can use this ethers.getContractAt() function.
But since it's already deployed, can't we just give the contract name and address to get it? Is it compulsory to have the contract (here, ILendingPoolAddressesProvider.sol) code in my local folder too?
And also, why am I attaching an account with it, since it has been deployed already?
There might be some mistakes in my basic understanding. Kindly explain.
const lendingPoolAddressesProvider = await ethers.getContractAt(
"ILendingPoolAddressesProvider",
"0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5",
account
)