From ac89c60780ebb0bcb0cb976e21d40c9e7f026613 Mon Sep 17 00:00:00 2001 From: Vectorized Date: Mon, 6 Nov 2023 20:26:11 +0000 Subject: [PATCH] T --- contracts/modules/SoundMetadataV1_1.sol | 20 ++++++++--------- .../modules/SoundOnChainMetadataV1_1.sol | 22 +++++++++---------- .../modules/interfaces/ISoundMetadataV1_1.sol | 4 ++-- .../interfaces/ISoundOnChainMetadataV1_1.sol | 4 ++-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/contracts/modules/SoundMetadataV1_1.sol b/contracts/modules/SoundMetadataV1_1.sol index f9a38cf6..5a3e8345 100644 --- a/contracts/modules/SoundMetadataV1_1.sol +++ b/contracts/modules/SoundMetadataV1_1.sol @@ -5,11 +5,11 @@ import { LibString } from "solady/utils/LibString.sol"; import { OwnableRoles } from "solady/auth/OwnableRoles.sol"; import { ISoundEditionV2 } from "@core/interfaces/ISoundEditionV2.sol"; import { ArweaveURILib } from "@core/utils/ArweaveURILib.sol"; -import { ISoundMetadata } from "@modules/interfaces/ISoundMetadata.sol"; +import { ISoundMetadataV1_1 } from "@modules/interfaces/ISoundMetadataV1_1.sol"; import { LibMulticaller } from "multicaller/LibMulticaller.sol"; import { LibOps } from "@core/utils/LibOps.sol"; -contract SoundMetadata is ISoundMetadata { +contract SoundMetadataV1_1 is ISoundMetadataV1_1 { using ArweaveURILib for ArweaveURILib.URI; // ============================================================= // STRUCTS @@ -55,7 +55,7 @@ contract SoundMetadata is ISoundMetadata { // ============================================================= /** - * @inheritdoc ISoundMetadata + * @inheritdoc ISoundMetadataV1_1 */ function setNumberedUpTo(address edition, uint32 tokenId) external onlyEditionOwnerOrAdmin(edition) { _configs[edition].numberedUpTo = tokenId; @@ -63,7 +63,7 @@ contract SoundMetadata is ISoundMetadata { } /** - * @inheritdoc ISoundMetadata + * @inheritdoc ISoundMetadataV1_1 */ function setUseTierTokenIdIndex(address edition, bool value) external onlyEditionOwnerOrAdmin(edition) { _configs[edition].useTierTokenIdIndex = value ? 1 : 2; @@ -71,7 +71,7 @@ contract SoundMetadata is ISoundMetadata { } /** - * @inheritdoc ISoundMetadata + * @inheritdoc ISoundMetadataV1_1 */ function setBaseURI( address edition, @@ -87,7 +87,7 @@ contract SoundMetadata is ISoundMetadata { // ============================================================= /** - * @inheritdoc ISoundMetadata + * @inheritdoc ISoundMetadataV1_1 */ function numberedUpTo(address edition) public view returns (uint32) { uint32 n = _configs[edition].numberedUpTo; @@ -95,21 +95,21 @@ contract SoundMetadata is ISoundMetadata { } /** - * @inheritdoc ISoundMetadata + * @inheritdoc ISoundMetadataV1_1 */ function useTierTokenIdIndex(address edition) public view returns (bool) { return _configs[edition].useTierTokenIdIndex != 2; } /** - * @inheritdoc ISoundMetadata + * @inheritdoc ISoundMetadataV1_1 */ function baseURI(address edition, uint8 tier) public view returns (string memory) { return _baseURI[LibOps.packId(edition, tier)].load(); } /** - * @inheritdoc ISoundMetadata + * @inheritdoc ISoundMetadataV1_1 */ function tokenURI(uint256 tokenId) external view returns (string memory) { uint8 tier = ISoundEditionV2(msg.sender).tokenTier(tokenId); @@ -135,7 +135,7 @@ contract SoundMetadata is ISoundMetadata { } /** - * @inheritdoc ISoundMetadata + * @inheritdoc ISoundMetadataV1_1 */ function goldenEggTokenId(address edition, uint8 tier) public view returns (uint256 tokenId) { return ISoundEditionV2(edition).mintRandomnessOneOfOne(tier); diff --git a/contracts/modules/SoundOnChainMetadataV1_1.sol b/contracts/modules/SoundOnChainMetadataV1_1.sol index 774821ee..361a9d8f 100644 --- a/contracts/modules/SoundOnChainMetadataV1_1.sol +++ b/contracts/modules/SoundOnChainMetadataV1_1.sol @@ -9,12 +9,12 @@ import { JSONParserLib } from "solady/utils/JSONParserLib.sol"; import { DynamicBufferLib } from "solady/utils/DynamicBufferLib.sol"; import { OwnableRoles } from "solady/auth/OwnableRoles.sol"; import { ISoundEditionV2 } from "@core/interfaces/ISoundEditionV2.sol"; -import { ISoundOnChainMetadata } from "@modules/interfaces/ISoundOnChainMetadata.sol"; +import { ISoundOnChainMetadataV1_1 } from "@modules/interfaces/ISoundOnChainMetadataV1_1.sol"; import { SoundOnChainMetadataLib as M } from "@modules/utils/SoundOnChainMetadataLib.sol"; import { LibMulticaller } from "multicaller/LibMulticaller.sol"; import { LibOps } from "@core/utils/LibOps.sol"; -contract SoundOnChainMetadata is ISoundOnChainMetadata { +contract SoundOnChainMetadataV1_1 is ISoundOnChainMetadataV1_1 { using JSONParserLib for JSONParserLib.Item; using DynamicBufferLib for DynamicBufferLib.DynamicBuffer; @@ -51,7 +51,7 @@ contract SoundOnChainMetadata is ISoundOnChainMetadata { // ============================================================= /** - * @inheritdoc ISoundOnChainMetadata + * @inheritdoc ISoundOnChainMetadataV1_1 */ function createTemplate(string memory templateJSON) public returns (string memory templateId) { templateId = predictTemplateId(templateJSON); @@ -62,7 +62,7 @@ contract SoundOnChainMetadata is ISoundOnChainMetadata { } /** - * @inheritdoc ISoundOnChainMetadata + * @inheritdoc ISoundOnChainMetadataV1_1 */ function setValues(address edition, string memory valuesJSON) public onlyEditionOwnerOrAdmin(edition) { _values[edition] = Store(SSTORE2.write(bytes(valuesJSON)), false); @@ -70,7 +70,7 @@ contract SoundOnChainMetadata is ISoundOnChainMetadata { } /** - * @inheritdoc ISoundOnChainMetadata + * @inheritdoc ISoundOnChainMetadataV1_1 */ function setValuesCompressed(address edition, bytes memory compressed) public onlyEditionOwnerOrAdmin(edition) { _values[edition] = Store(SSTORE2.write(bytes(compressed)), true); @@ -82,14 +82,14 @@ contract SoundOnChainMetadata is ISoundOnChainMetadata { // ============================================================= /** - * @inheritdoc ISoundOnChainMetadata + * @inheritdoc ISoundOnChainMetadataV1_1 */ function predictTemplateId(string memory templateJSON) public pure returns (string memory) { return Base64.encode(abi.encodePacked(bytes9(keccak256(bytes(templateJSON))))); } /** - * @inheritdoc ISoundOnChainMetadata + * @inheritdoc ISoundOnChainMetadataV1_1 */ function getTemplate(string memory templateId) public view returns (string memory) { address ss2 = _templates[keccak256(bytes(templateId))].value; @@ -98,7 +98,7 @@ contract SoundOnChainMetadata is ISoundOnChainMetadata { } /** - * @inheritdoc ISoundOnChainMetadata + * @inheritdoc ISoundOnChainMetadataV1_1 */ function getValues(address edition) public view returns (string memory) { Store memory s = _values[edition]; @@ -109,7 +109,7 @@ contract SoundOnChainMetadata is ISoundOnChainMetadata { } /** - * @inheritdoc ISoundOnChainMetadata + * @inheritdoc ISoundOnChainMetadataV1_1 */ function rawTokenJSON( address edition, @@ -124,7 +124,7 @@ contract SoundOnChainMetadata is ISoundOnChainMetadata { } /** - * @inheritdoc ISoundOnChainMetadata + * @inheritdoc ISoundOnChainMetadataV1_1 */ function tokenURI(uint256 tokenId) external view returns (string memory) { DynamicBufferLib.DynamicBuffer memory buffer; @@ -139,7 +139,7 @@ contract SoundOnChainMetadata is ISoundOnChainMetadata { } /** - * @inheritdoc ISoundOnChainMetadata + * @inheritdoc ISoundOnChainMetadataV1_1 */ function goldenEggTokenId(address edition, uint8 tier) public view returns (uint256) { return ISoundEditionV2(edition).mintRandomnessOneOfOne(tier); diff --git a/contracts/modules/interfaces/ISoundMetadataV1_1.sol b/contracts/modules/interfaces/ISoundMetadataV1_1.sol index 64db9108..80aa108e 100644 --- a/contracts/modules/interfaces/ISoundMetadataV1_1.sol +++ b/contracts/modules/interfaces/ISoundMetadataV1_1.sol @@ -5,10 +5,10 @@ import { IMetadataModule } from "@core/interfaces/IMetadataModule.sol"; import { ISoundEditionV2 } from "@core/interfaces/ISoundEditionV2.sol"; /** - * @title ISoundMetadata + * @title ISoundMetadataV1_1 * @notice The interface for the Sound Golden Egg metadata module with open edition compatibility. */ -interface ISoundMetadata is IMetadataModule { +interface ISoundMetadataV1_1 is IMetadataModule { // ============================================================= // EVENTS // ============================================================= diff --git a/contracts/modules/interfaces/ISoundOnChainMetadataV1_1.sol b/contracts/modules/interfaces/ISoundOnChainMetadataV1_1.sol index 05243569..2e820e1b 100644 --- a/contracts/modules/interfaces/ISoundOnChainMetadataV1_1.sol +++ b/contracts/modules/interfaces/ISoundOnChainMetadataV1_1.sol @@ -5,10 +5,10 @@ import { IMetadataModule } from "@core/interfaces/IMetadataModule.sol"; import { ISoundEditionV2 } from "@core/interfaces/ISoundEditionV2.sol"; /** - * @title ISoundOnChainMetadata + * @title ISoundOnChainMetadataV1_1 * @notice Sound metadata module with on-chain JSON. */ -interface ISoundOnChainMetadata is IMetadataModule { +interface ISoundOnChainMetadataV1_1 is IMetadataModule { // ============================================================= // EVENTS // =============================================================