From 7b0161f3e62c0fc7f633a291c10720ddbd3feae1 Mon Sep 17 00:00:00 2001 From: Senji888 <44082144+Ben-Rey@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:27:03 +0100 Subject: [PATCH 1/2] Remove setTokenURI function --- smart-contracts/assembly/contracts/NFT/NFT.ts | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/smart-contracts/assembly/contracts/NFT/NFT.ts b/smart-contracts/assembly/contracts/NFT/NFT.ts index 4a6d49e..30991f6 100644 --- a/smart-contracts/assembly/contracts/NFT/NFT.ts +++ b/smart-contracts/assembly/contracts/NFT/NFT.ts @@ -135,26 +135,6 @@ export function nft1_tokenURI(binaryArgs: StaticArray): StaticArray { } } -/** - * Set a token URI (external link written in NFT where pictures or others are stored). - * If not set the tokenURI will be the baseURI + tokenId - * @param binaryArgs - u64 serialized tokenID with `Args` + URI string - */ -export function nft1_setTokenURI(binaryArgs: StaticArray): void { - const args = new Args(binaryArgs); - const tokenId = args - .nextU64() - .expect('token id argument is missing or invalid'); - - assertIsMinted(tokenId); - assertIsOwner(Context.caller().toString(), tokenId); - - Storage.set( - tokenURIKey + tokenId.toString(), - args.nextString().expect('tokenURI argument is missing or invalid'), - ); -} - /** * Returns the base URI * @param _ - unused see https://github.com/massalabs/massa-sc-std/issues/18 From 40ad3a482df4a4bd206ae35e8ddf062cca286846 Mon Sep 17 00:00:00 2001 From: Senji888 <44082144+Ben-Rey@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:04:47 +0100 Subject: [PATCH 2/2] Remove unused assertIsOwner function --- smart-contracts/assembly/contracts/NFT/NFT.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/smart-contracts/assembly/contracts/NFT/NFT.ts b/smart-contracts/assembly/contracts/NFT/NFT.ts index 30991f6..6894c0d 100644 --- a/smart-contracts/assembly/contracts/NFT/NFT.ts +++ b/smart-contracts/assembly/contracts/NFT/NFT.ts @@ -24,7 +24,6 @@ import { _isApprovedForAll, _updateBalanceOf, _getBalanceOf, - assertIsOwner, _constructor, } from './NFT-internals';