From e577d3c09d5f853ec167f129c98312eb0c9e0c8c Mon Sep 17 00:00:00 2001 From: Miguel Angel Rojo <29736144+freemanzMrojo@users.noreply.github.com> Date: Sat, 21 Feb 2026 17:13:55 +0000 Subject: [PATCH] Fix missing references in `transfer-advanced` Also removed unnecessary await Signed-off-by: Miguel Angel Rojo <29736144+freemanzMrojo@users.noreply.github.com> --- ...and-transfer-an-erc-721-token-using-hardhat-part-2.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hedera/tutorials/smart-contracts/how-to-set-access-control-a-token-uri-pause-and-transfer-an-erc-721-token-using-hardhat-part-2.mdx b/hedera/tutorials/smart-contracts/how-to-set-access-control-a-token-uri-pause-and-transfer-an-erc-721-token-using-hardhat-part-2.mdx index 22e29d1e..b802584d 100644 --- a/hedera/tutorials/smart-contracts/how-to-set-access-control-a-token-uri-pause-and-transfer-an-erc-721-token-using-hardhat-part-2.mdx +++ b/hedera/tutorials/smart-contracts/how-to-set-access-control-a-token-uri-pause-and-transfer-an-erc-721-token-using-hardhat-part-2.mdx @@ -351,6 +351,12 @@ The contract will return `true` when it is paused. Now, nobody can mint new toke Create a `transfer-advanced.ts` script to transfer an NFT to another address. Don't forget to replace the `contractAddress` with your smart contract address. ```typescript scripts/transfer-advanced.ts +import { network } from "hardhat"; + +const { ethers } = await network.connect({ + network: "testnet", +}); + async function main() { const [deployer] = await ethers.getSigners(); const MyTokenAdvanced = await ethers.getContractFactory( @@ -360,7 +366,7 @@ async function main() { // Connect to the deployed contract (REPLACE WITH YOUR CONTRACT ADDRESS) const contractAddress = "0x11828533C93F8A1e19623343308dFb4a811005dE"; - const contract = await MyTokenAdvanced.attach(contractAddress); + const contract = MyTokenAdvanced.attach(contractAddress); // Unpause the token const unpauseTx = await contract.unpause();