Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Documentation for ethers.getContractAt()

Can somebody please point me to the documentation (official or otherwise ) that explains the function ethers.getContractAt():

the original context of this is as follows:

vrfCoordinator = await ethers.getContractAt('VRFCoordinatorMock', VRFCoordinatorMock.address, signer)

and the full code can be found here... https://github.com/PatrickAlphaC/all-on-chain-generated-nft/blob/main/deploy/02_Deploy_RandomSVG.js

In the absence of such documentation, an explanation would be much appreciated. Thank you!

like image 960
maskara Avatar asked Apr 15 '26 23:04

maskara


1 Answers

The getContractAt() function is part of the hardhat-ethers plugin for Hardhat, expanding the ethers object.

It's not a part of the core Ethers package, so it's not included in their documentation.

Hardhat docs mentioning the plugin: https://hardhat.org/plugins/nomiclabs-hardhat-ethers.html#helpers

like image 188
Petr Hejda Avatar answered Apr 17 '26 21:04

Petr Hejda