diff --git a/package.json b/package.json index a7f28d2..2662693 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "test": "npx hardhat test", "deploy": "npx hardhat run scripts/deploy.ts", "erc20": "npx hardhat run scripts/erc20.ts", + "erc721": "npx hardhat run scripts/erc721.ts --network mainnet", "storage": "npx hardhat run scripts/storage.ts", "send-avax-wallet-signer": "npx hardhat run scripts/sendAvaxWalletSigner.ts", "send-avax-json-provider": "npx hardhat run scripts/sendAvaxJSONProvider.ts", diff --git a/scripts/erc721.ts b/scripts/erc721.ts new file mode 100644 index 0000000..f5f4c46 --- /dev/null +++ b/scripts/erc721.ts @@ -0,0 +1,18 @@ +import { Contract } from "ethers" +import { ethers } from "hardhat" +import { abi } from "../artifacts/contracts/ERC721.sol/NFT.json" + +const coinAddr: string = "0xe304EDd5C4e590e2b8ce08b9625597FF38192D71" +const main = async (): Promise => { + const contract: Contract = new Contract(coinAddr, abi, ethers.provider) + const tokenID: number = 395 + const tokenURI = await contract.tokenURI(tokenID) + console.log(tokenURI) +} + +main() + .then(() => process.exit(0)) + .catch(error => { + console.error(error) + process.exit(1) + }) \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..122b657 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "resolveJsonModule": true + } +} \ No newline at end of file