Skip to content

Instantly share code, notes, and snippets.

@polluterofminds
Last active March 7, 2022 22:06
Show Gist options
  • Save polluterofminds/0f7c91fc181b63e13081c5f08e462093 to your computer and use it in GitHub Desktop.
Save polluterofminds/0f7c91fc181b63e13081c5f08e462093 to your computer and use it in GitHub Desktop.
Get Token Owner
const hre = require("hardhat");
async function main() {
const PFPinata = await hre.ethers.getContractFactory("PFPinatas");
const contract = PFPinata.attach("YOUR CONTRACT ADDRESS");
const owner = await contract.ownerOf(1);
console.log({owner});
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment