diff --git a/.vscode/settings.json b/.vscode/settings.json index aefa079..8a04d84 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,11 @@ { "solidity.compileUsingRemoteVersion": "v0.8.26+commit.8a97fa7a", "cSpell.words": [ - "multicurrency" + "Initializable", + "multicurrency", + "Reentrancy", + "solhint", + "synaps", + "UUPS" ] } \ No newline at end of file diff --git a/contracts/access/AccessManager.sol b/contracts/access/AccessManager.sol index 5cdf858..3b94def 100644 --- a/contracts/access/AccessManager.sol +++ b/contracts/access/AccessManager.sol @@ -5,7 +5,7 @@ import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/I import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; // solhint-disable-next-line max-line-length import { AccessManagerUpgradeable } from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagerUpgradeable.sol"; -import { C } from "contracts/core/primitives/Constants.sol"; +import { C } from "@synaps3/core/primitives/Constants.sol"; /// @title AccessManager /// @dev Manages roles and permissions across the protocol. diff --git a/contracts/assets/AssetOwnership.sol b/contracts/assets/AssetOwnership.sol index 9769d3f..f9df5b0 100644 --- a/contracts/assets/AssetOwnership.sol +++ b/contracts/assets/AssetOwnership.sol @@ -8,9 +8,9 @@ import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils import { ERC721Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; // solhint-disable-next-line max-line-length import { ERC721EnumerableUpgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; -import { IAssetVerifiable } from "contracts/core/interfaces/assets/IAssetVerifiable.sol"; -import { IAssetOwnership } from "contracts/core/interfaces/assets/IAssetOwnership.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { IAssetVerifiable } from "@synaps3/core/interfaces/assets/IAssetVerifiable.sol"; +import { IAssetOwnership } from "@synaps3/core/interfaces/assets/IAssetOwnership.sol"; // TODO imp ERC404 // TODO imp EIP4337 accounting diff --git a/contracts/assets/AssetReferendum.sol b/contracts/assets/AssetReferendum.sol index 66c208b..f207bd7 100644 --- a/contracts/assets/AssetReferendum.sol +++ b/contracts/assets/AssetReferendum.sol @@ -8,12 +8,12 @@ import { NoncesUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/Non import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; -import { QuorumUpgradeable } from "contracts/core/primitives/upgradeable/QuorumUpgradeable.sol"; -import { IAssetReferendum } from "contracts/core/interfaces/assets/IAssetReferendum.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { QuorumUpgradeable } from "@synaps3/core/primitives/upgradeable/QuorumUpgradeable.sol"; +import { IAssetReferendum } from "@synaps3/core/interfaces/assets/IAssetReferendum.sol"; -import { C } from "contracts/core/primitives/Constants.sol"; -import { T } from "contracts/core/primitives/Types.sol"; +import { C } from "@synaps3/core/primitives/Constants.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; /// @title Asset curation contract. /// @notice This contract allows for the submission, voting, and approval/rejection of asset. diff --git a/contracts/assets/AssetVault.sol b/contracts/assets/AssetVault.sol index 38e7076..afb5fb3 100644 --- a/contracts/assets/AssetVault.sol +++ b/contracts/assets/AssetVault.sol @@ -4,10 +4,10 @@ pragma solidity 0.8.26; import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; -import { IAssetOwnership } from "contracts/core/interfaces/assets/IAssetOwnership.sol"; -import { IAssetVault } from "contracts/core/interfaces/assets/IAssetVault.sol"; -import { T } from "contracts/core/primitives/Types.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { IAssetOwnership } from "@synaps3/core/interfaces/assets/IAssetOwnership.sol"; +import { IAssetVault } from "@synaps3/core/interfaces/assets/IAssetVault.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; /// @notice This contract is designed as a secure and decentralized area to exchange complementary data related to /// content access, such as encrypted keys, license keys, or metadata. It does not store the actual content itself, diff --git a/contracts/core/interfaces/assets/IAssetReferendum.sol b/contracts/core/interfaces/assets/IAssetReferendum.sol index fbe7903..5a89732 100644 --- a/contracts/core/interfaces/assets/IAssetReferendum.sol +++ b/contracts/core/interfaces/assets/IAssetReferendum.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { IAssetRegistrable } from "contracts/core/interfaces/assets/IAssetRegistrable.sol"; -import { IAssetVerifiable } from "contracts/core/interfaces/assets/IAssetVerifiable.sol"; +import { IAssetRegistrable } from "@synaps3/core/interfaces/assets/IAssetRegistrable.sol"; +import { IAssetVerifiable } from "@synaps3/core/interfaces/assets/IAssetVerifiable.sol"; /// @title IAssetReferendum /// @notice Interface manage content registration, roles, and verifications within a referendum context. diff --git a/contracts/core/interfaces/assets/IAssetVault.sol b/contracts/core/interfaces/assets/IAssetVault.sol index c4900ab..231f6fe 100644 --- a/contracts/core/interfaces/assets/IAssetVault.sol +++ b/contracts/core/interfaces/assets/IAssetVault.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { T } from "contracts/core/primitives/Types.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; /// @title IAssetVault /// @notice Interface for a content vault that manages secured content. diff --git a/contracts/core/interfaces/economics/ITollgate.sol b/contracts/core/interfaces/economics/ITollgate.sol index ca146df..f3ea52f 100644 --- a/contracts/core/interfaces/economics/ITollgate.sol +++ b/contracts/core/interfaces/economics/ITollgate.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { T } from "contracts/core/primitives/Types.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; /// @title Tollgate Interface /// @dev This interface defines the essential functions for managing fees and the currencies diff --git a/contracts/core/interfaces/economics/ITreasury.sol b/contracts/core/interfaces/economics/ITreasury.sol index e3cd134..40d487e 100644 --- a/contracts/core/interfaces/economics/ITreasury.sol +++ b/contracts/core/interfaces/economics/ITreasury.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { IBalanceWithdrawable } from "contracts/core/interfaces/IBalanceWithdrawable.sol"; +import { IBalanceWithdrawable } from "@synaps3/core/interfaces/IBalanceWithdrawable.sol"; /// @title ITreasury Interface /// @notice Defines the standard functions for a Treasury contract. diff --git a/contracts/core/interfaces/policies/IPolicy.sol b/contracts/core/interfaces/policies/IPolicy.sol index b90a95a..563cbaa 100644 --- a/contracts/core/interfaces/policies/IPolicy.sol +++ b/contracts/core/interfaces/policies/IPolicy.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { T } from "contracts/core/primitives/Types.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; /// @title IPolicyDescriptor /// @notice Interface for managing access to content based on licensing terms. diff --git a/contracts/core/interfaces/policies/IPolicyAuditor.sol b/contracts/core/interfaces/policies/IPolicyAuditor.sol index 7101fda..e737935 100644 --- a/contracts/core/interfaces/policies/IPolicyAuditor.sol +++ b/contracts/core/interfaces/policies/IPolicyAuditor.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { IPolicyAuditorRegistrable } from "contracts/core/interfaces/policies/IPolicyAuditorRegistrable.sol"; -import { IPolicyAuditorVerifiable } from "contracts/core/interfaces/policies/IPolicyAuditorVerifiable.sol"; +import { IPolicyAuditorRegistrable } from "@synaps3/core/interfaces/policies/IPolicyAuditorRegistrable.sol"; +import { IPolicyAuditorVerifiable } from "@synaps3/core/interfaces/policies/IPolicyAuditorVerifiable.sol"; /// @title IPolicyAuditor /// @notice Interface for managing the registration and verification of policies auditors within the system. diff --git a/contracts/core/interfaces/rights/IRightsAccessAgreement.sol b/contracts/core/interfaces/rights/IRightsAccessAgreement.sol index 98a691b..74daa47 100644 --- a/contracts/core/interfaces/rights/IRightsAccessAgreement.sol +++ b/contracts/core/interfaces/rights/IRightsAccessAgreement.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { T } from "contracts/core/primitives/Types.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; /// @title IRightsAccessAgreement /// @notice Interface for managing agreements related to content rights access. diff --git a/contracts/core/interfaces/syndication/IDistributor.sol b/contracts/core/interfaces/syndication/IDistributor.sol index 1b47fee..815cf0b 100644 --- a/contracts/core/interfaces/syndication/IDistributor.sol +++ b/contracts/core/interfaces/syndication/IDistributor.sol @@ -2,8 +2,8 @@ // NatSpec format convention - https://docs.soliditylang.org/en/v0.5.10/natspec-format.html pragma solidity 0.8.26; -import { IBalanceVerifiable } from "contracts/core/interfaces/IBalanceVerifiable.sol"; -import { IBalanceWithdrawable } from "contracts/core/interfaces/IBalanceWithdrawable.sol"; +import { IBalanceVerifiable } from "@synaps3/core/interfaces/IBalanceVerifiable.sol"; +import { IBalanceWithdrawable } from "@synaps3/core/interfaces/IBalanceWithdrawable.sol"; interface IDistributor is IBalanceVerifiable, IBalanceWithdrawable { /// @notice Set the endpoint of the distributor. diff --git a/contracts/core/interfaces/syndication/IDistributorReferendum.sol b/contracts/core/interfaces/syndication/IDistributorReferendum.sol index ec4f5f2..aa428c2 100644 --- a/contracts/core/interfaces/syndication/IDistributorReferendum.sol +++ b/contracts/core/interfaces/syndication/IDistributorReferendum.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { IDistributorExpirable } from "contracts/core/interfaces/syndication/IDistributorExpirable.sol"; -import { IDistributorRegistrable } from "contracts/core/interfaces/syndication/IDistributorRegistrable.sol"; -import { IDistributorVerifiable } from "contracts/core/interfaces/syndication/IDistributorVerifiable.sol"; +import { IDistributorExpirable } from "@synaps3/core/interfaces/syndication/IDistributorExpirable.sol"; +import { IDistributorRegistrable } from "@synaps3/core/interfaces/syndication/IDistributorRegistrable.sol"; +import { IDistributorVerifiable } from "@synaps3/core/interfaces/syndication/IDistributorVerifiable.sol"; /// @title IDistributorReferendum /// @notice Interface that defines the necessary operations for managing distributor registration. diff --git a/contracts/core/libraries/FeesOps.sol b/contracts/core/libraries/FeesOps.sol index fe29108..2306d84 100644 --- a/contracts/core/libraries/FeesOps.sol +++ b/contracts/core/libraries/FeesOps.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { C } from "contracts/core/primitives/Constants.sol"; +import { C } from "@synaps3/core/primitives/Constants.sol"; /// @title FeesOps /// @notice Library for handling fee-related calculations and operations. diff --git a/contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol b/contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol index 8b761bf..f26414e 100644 --- a/contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol +++ b/contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol @@ -6,8 +6,8 @@ import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/I // solhint-disable-next-line max-line-length import { AccessManagedUpgradeable } from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol"; -import { IAccessManager } from "contracts/core/interfaces/access/IAccessManager.sol"; -import { C } from "contracts/core/primitives/Constants.sol"; +import { IAccessManager } from "@synaps3/core/interfaces/access/IAccessManager.sol"; +import { C } from "@synaps3/core/primitives/Constants.sol"; /// @title AccessControlledUpgradeable /// @dev Abstract contract that provides role-based access control functionality to upgradeable contracts. diff --git a/contracts/core/primitives/upgradeable/FeesCollectorUpgradeable.sol b/contracts/core/primitives/upgradeable/FeesCollectorUpgradeable.sol index 96869ac..055bada 100644 --- a/contracts/core/primitives/upgradeable/FeesCollectorUpgradeable.sol +++ b/contracts/core/primitives/upgradeable/FeesCollectorUpgradeable.sol @@ -3,9 +3,9 @@ pragma solidity 0.8.26; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; -import { LedgerUpgradeable } from "contracts/core/primitives/upgradeable/LedgerUpgradeable.sol"; -import { IFeesCollector } from "contracts/core/interfaces/economics/IFeesCollector.sol"; -import { TreasuryOps } from "contracts/core/libraries/TreasuryOps.sol"; +import { LedgerUpgradeable } from "@synaps3/core/primitives/upgradeable/LedgerUpgradeable.sol"; +import { IFeesCollector } from "@synaps3/core/interfaces/economics/IFeesCollector.sol"; +import { TreasuryOps } from "@synaps3/core/libraries/TreasuryOps.sol"; /// @title FeesCollectorUpgradeable Contract /// @notice Manages the address of the treasury and disburses collected funds in an upgradeable way. diff --git a/contracts/core/primitives/upgradeable/LedgerUpgradeable.sol b/contracts/core/primitives/upgradeable/LedgerUpgradeable.sol index a36d0de..47d5a98 100644 --- a/contracts/core/primitives/upgradeable/LedgerUpgradeable.sol +++ b/contracts/core/primitives/upgradeable/LedgerUpgradeable.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.26; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; -import { ILedgerVerifiable } from "contracts/core/interfaces/ILedgerVerifiable.sol"; +import { ILedgerVerifiable } from "@synaps3/core/interfaces/ILedgerVerifiable.sol"; /// @title LedgerUpgradeable /// @notice Abstract contract for managing accounts ledger that support upgradability. diff --git a/contracts/economics/Tollgate.sol b/contracts/economics/Tollgate.sol index 7e1d731..42f026c 100644 --- a/contracts/economics/Tollgate.sol +++ b/contracts/economics/Tollgate.sol @@ -7,11 +7,11 @@ import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC16 import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; -import { ITollgate } from "contracts/core/interfaces/economics/ITollgate.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { ITollgate } from "@synaps3/core/interfaces/economics/ITollgate.sol"; -import { T } from "contracts/core/primitives/Types.sol"; -import { FeesOps } from "contracts/core/libraries/FeesOps.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; +import { FeesOps } from "@synaps3/core/libraries/FeesOps.sol"; /// @title Tollgate Contract /// @dev This contract acts as a financial gateway, managing fees and the currencies allowed diff --git a/contracts/economics/Treasury.sol b/contracts/economics/Treasury.sol index 8f3bc09..20aff17 100644 --- a/contracts/economics/Treasury.sol +++ b/contracts/economics/Treasury.sol @@ -6,13 +6,13 @@ import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/I import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; // solhint-disable-next-line max-line-length import { ReentrancyGuardTransientUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardTransientUpgradeable.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; -import { LedgerUpgradeable } from "contracts/core/primitives/upgradeable/LedgerUpgradeable.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { LedgerUpgradeable } from "@synaps3/core/primitives/upgradeable/LedgerUpgradeable.sol"; -import { IFeesCollector } from "contracts/core/interfaces/economics/IFeesCollector.sol"; -import { ITreasury } from "contracts/core/interfaces/economics/ITreasury.sol"; -import { TreasuryOps } from "contracts/core/libraries/TreasuryOps.sol"; -import { LoopOps } from "contracts/core/libraries/LoopOps.sol"; +import { IFeesCollector } from "@synaps3/core/interfaces/economics/IFeesCollector.sol"; +import { ITreasury } from "@synaps3/core/interfaces/economics/ITreasury.sol"; +import { TreasuryOps } from "@synaps3/core/libraries/TreasuryOps.sol"; +import { LoopOps } from "@synaps3/core/libraries/LoopOps.sol"; // TODO payment splitter // TODO aca se puede tener un metodo que collecte todos los fees diff --git a/contracts/policies/BasePolicy.sol b/contracts/policies/BasePolicy.sol index cda2947..e57a4bd 100644 --- a/contracts/policies/BasePolicy.sol +++ b/contracts/policies/BasePolicy.sol @@ -4,12 +4,12 @@ pragma solidity 0.8.26; import { ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; -import { IAssetOwnership } from "contracts/core/interfaces/assets/IAssetOwnership.sol"; -import { IRightsPolicyManager } from "contracts/core/interfaces/rights/IRightsPolicyManager.sol"; -import { IAttestationProvider } from "contracts/core/interfaces/IAttestationProvider.sol"; -import { IPolicy } from "contracts/core/interfaces/policies/IPolicy.sol"; -import { LoopOps } from "contracts/core/libraries/LoopOps.sol"; -import { T } from "contracts/core/primitives/Types.sol"; +import { IAssetOwnership } from "@synaps3/core/interfaces/assets/IAssetOwnership.sol"; +import { IRightsPolicyManager } from "@synaps3/core/interfaces/rights/IRightsPolicyManager.sol"; +import { IAttestationProvider } from "@synaps3/core/interfaces/IAttestationProvider.sol"; +import { IPolicy } from "@synaps3/core/interfaces/policies/IPolicy.sol"; +import { LoopOps } from "@synaps3/core/libraries/LoopOps.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; /// @title BasePolicy /// @notice This abstract contract serves as a base for policies that manage access to content. diff --git a/contracts/policies/PolicyAudit.sol b/contracts/policies/PolicyAudit.sol index f149326..cc87357 100644 --- a/contracts/policies/PolicyAudit.sol +++ b/contracts/policies/PolicyAudit.sol @@ -4,11 +4,11 @@ pragma solidity 0.8.26; import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; -import { QuorumUpgradeable } from "contracts/core/primitives/upgradeable/QuorumUpgradeable.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { QuorumUpgradeable } from "@synaps3/core/primitives/upgradeable/QuorumUpgradeable.sol"; -import { IPolicy } from "contracts/core/interfaces/policies/IPolicy.sol"; -import { IPolicyAuditor } from "contracts/core/interfaces/policies/IPolicyAuditor.sol"; +import { IPolicy } from "@synaps3/core/interfaces/policies/IPolicy.sol"; +import { IPolicyAuditor } from "@synaps3/core/interfaces/policies/IPolicyAuditor.sol"; /// @title PolicyAudit /// @notice This contract audits content policies and ensures that only authorized entities can approve or revoke. diff --git a/contracts/policies/access/SubscriptionPolicy.sol b/contracts/policies/access/SubscriptionPolicy.sol index a7101fa..9baa135 100644 --- a/contracts/policies/access/SubscriptionPolicy.sol +++ b/contracts/policies/access/SubscriptionPolicy.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { BasePolicy } from "contracts/policies/BasePolicy.sol"; -import { T } from "contracts/core/primitives/Types.sol"; +import { BasePolicy } from "@synaps3/policies/BasePolicy.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; /// @title SubscriptionPolicy /// @notice Implements a subscription-based content access policy. diff --git a/contracts/policies/attestation/Eas.sol b/contracts/policies/attestation/Eas.sol index b9579c9..04d8fd1 100644 --- a/contracts/policies/attestation/Eas.sol +++ b/contracts/policies/attestation/Eas.sol @@ -5,8 +5,8 @@ import { IEAS } from "@ethereum-attestation-service/eas-contracts/contracts/IEAS import { Attestation } from "@ethereum-attestation-service/eas-contracts/contracts/IEAS.sol"; import { MultiAttestationRequest } from "@ethereum-attestation-service/eas-contracts/contracts/IEAS.sol"; import { AttestationRequestData } from "@ethereum-attestation-service/eas-contracts/contracts/IEAS.sol"; -import { IAttestationProvider } from "contracts/core/interfaces/IAttestationProvider.sol"; -import { LoopOps } from "contracts/core/libraries/LoopOps.sol"; +import { IAttestationProvider } from "@synaps3/core/interfaces/IAttestationProvider.sol"; +import { LoopOps } from "@synaps3/core/libraries/LoopOps.sol"; contract EAS is IAttestationProvider { using LoopOps for uint256; diff --git a/contracts/policies/attestation/SignGlobal.sol b/contracts/policies/attestation/SignGlobal.sol index f9bbb60..ab68736 100644 --- a/contracts/policies/attestation/SignGlobal.sol +++ b/contracts/policies/attestation/SignGlobal.sol @@ -4,8 +4,8 @@ pragma solidity 0.8.26; import { ISP } from "@ethsign/sign-protocol-evm/src/interfaces/ISP.sol"; import { Attestation } from "@ethsign/sign-protocol-evm/src/models/Attestation.sol"; import { DataLocation } from "@ethsign/sign-protocol-evm/src/models/DataLocation.sol"; -import { IAttestationProvider } from "contracts/core/interfaces/IAttestationProvider.sol"; -import { LoopOps } from "contracts/core/libraries/LoopOps.sol"; +import { IAttestationProvider } from "@synaps3/core/interfaces/IAttestationProvider.sol"; +import { LoopOps } from "@synaps3/core/libraries/LoopOps.sol"; contract SignGlobal is IAttestationProvider { using LoopOps for uint256; diff --git a/contracts/rights/RightsAccessAgreement.sol b/contracts/rights/RightsAccessAgreement.sol index 5cb77c4..e0e4ef9 100644 --- a/contracts/rights/RightsAccessAgreement.sol +++ b/contracts/rights/RightsAccessAgreement.sol @@ -5,17 +5,17 @@ pragma solidity 0.8.26; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; // solhint-disable-next-line max-line-length import { ReentrancyGuardTransientUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardTransientUpgradeable.sol"; -import { FeesCollectorUpgradeable } from "contracts/core/primitives/upgradeable/FeesCollectorUpgradeable.sol"; - -import { IRightsAccessAgreement } from "contracts/core/interfaces/rights/IRightsAccessAgreement.sol"; -import { ITollgate } from "contracts/core/interfaces/economics/ITollgate.sol"; -import { ITreasury } from "contracts/core/interfaces/economics/ITreasury.sol"; -import { TreasuryOps } from "contracts/core/libraries/TreasuryOps.sol"; -import { FeesOps } from "contracts/core/libraries/FeesOps.sol"; -import { T } from "contracts/core/primitives/Types.sol"; +import { FeesCollectorUpgradeable } from "@synaps3/core/primitives/upgradeable/FeesCollectorUpgradeable.sol"; + +import { IRightsAccessAgreement } from "@synaps3/core/interfaces/rights/IRightsAccessAgreement.sol"; +import { ITollgate } from "@synaps3/core/interfaces/economics/ITollgate.sol"; +import { ITreasury } from "@synaps3/core/interfaces/economics/ITreasury.sol"; +import { TreasuryOps } from "@synaps3/core/libraries/TreasuryOps.sol"; +import { FeesOps } from "@synaps3/core/libraries/FeesOps.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; contract RightsAccessAgreement is Initializable, diff --git a/contracts/rights/RightsAssetCustodian.sol b/contracts/rights/RightsAssetCustodian.sol index fcf9ad9..8968bf2 100644 --- a/contracts/rights/RightsAssetCustodian.sol +++ b/contracts/rights/RightsAssetCustodian.sol @@ -5,11 +5,11 @@ pragma solidity 0.8.26; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; -import { IDistributorVerifiable } from "contracts/core/interfaces/syndication/IDistributorVerifiable.sol"; -import { IRightsAssetCustodian } from "contracts/core/interfaces/rights/IRightsAssetCustodian.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { IDistributorVerifiable } from "@synaps3/core/interfaces/syndication/IDistributorVerifiable.sol"; +import { IRightsAssetCustodian } from "@synaps3/core/interfaces/rights/IRightsAssetCustodian.sol"; -import { C } from "contracts/core/primitives/Constants.sol"; +import { C } from "@synaps3/core/primitives/Constants.sol"; contract RightsAssetCustodian is Initializable, UUPSUpgradeable, AccessControlledUpgradeable, IRightsAssetCustodian { using EnumerableSet for EnumerableSet.AddressSet; diff --git a/contracts/rights/RightsPolicyAuthorizer.sol b/contracts/rights/RightsPolicyAuthorizer.sol index a663829..89473f3 100644 --- a/contracts/rights/RightsPolicyAuthorizer.sol +++ b/contracts/rights/RightsPolicyAuthorizer.sol @@ -5,11 +5,11 @@ pragma solidity 0.8.26; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; -import { IPolicy } from "contracts/core/interfaces/policies/IPolicy.sol"; -import { IRightsPolicyAuthorizer } from "contracts/core/interfaces/rights/IRightsPolicyAuthorizer.sol"; -import { IPolicyAuditorVerifiable } from "contracts/core/interfaces/policies/IPolicyAuditorVerifiable.sol"; +import { IPolicy } from "@synaps3/core/interfaces/policies/IPolicy.sol"; +import { IRightsPolicyAuthorizer } from "@synaps3/core/interfaces/rights/IRightsPolicyAuthorizer.sol"; +import { IPolicyAuditorVerifiable } from "@synaps3/core/interfaces/policies/IPolicyAuditorVerifiable.sol"; contract RightsPolicyAuthorizer is Initializable, diff --git a/contracts/rights/RightsPolicyManager.sol b/contracts/rights/RightsPolicyManager.sol index a926f8d..e7c32a2 100644 --- a/contracts/rights/RightsPolicyManager.sol +++ b/contracts/rights/RightsPolicyManager.sol @@ -5,15 +5,15 @@ pragma solidity 0.8.26; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; -import { IPolicy } from "contracts/core/interfaces/policies/IPolicy.sol"; -import { IRightsPolicyManager } from "contracts/core/interfaces/rights/IRightsPolicyManager.sol"; -import { IRightsPolicyAuthorizer } from "contracts/core/interfaces/rights/IRightsPolicyAuthorizer.sol"; -import { IRightsAccessAgreement } from "contracts/core/interfaces/rights/IRightsAccessAgreement.sol"; -import { LoopOps } from "contracts/core/libraries/LoopOps.sol"; -import { T } from "contracts/core/primitives/Types.sol"; +import { IPolicy } from "@synaps3/core/interfaces/policies/IPolicy.sol"; +import { IRightsPolicyManager } from "@synaps3/core/interfaces/rights/IRightsPolicyManager.sol"; +import { IRightsPolicyAuthorizer } from "@synaps3/core/interfaces/rights/IRightsPolicyAuthorizer.sol"; +import { IRightsAccessAgreement } from "@synaps3/core/interfaces/rights/IRightsAccessAgreement.sol"; +import { LoopOps } from "@synaps3/core/libraries/LoopOps.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; contract RightsPolicyManager is Initializable, UUPSUpgradeable, AccessControlledUpgradeable, IRightsPolicyManager { using EnumerableSet for EnumerableSet.AddressSet; diff --git a/contracts/syndication/DistributorFactory.sol b/contracts/syndication/DistributorFactory.sol index ca91092..e42435d 100644 --- a/contracts/syndication/DistributorFactory.sol +++ b/contracts/syndication/DistributorFactory.sol @@ -5,7 +5,7 @@ pragma solidity 0.8.26; import { Pausable } from "@openzeppelin/contracts/utils/Pausable.sol"; import { BeaconProxy } from "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; import { UpgradeableBeacon } from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; -import { IDistributorFactory } from "contracts/core/interfaces/syndication/IDistributorFactory.sol"; +import { IDistributorFactory } from "@synaps3/core/interfaces/syndication/IDistributorFactory.sol"; // Each distributor has their own contract. The problem with this approach is that each contract // has its own implementation. If in the future we need to improve the distributor contract, diff --git a/contracts/syndication/DistributorImpl.sol b/contracts/syndication/DistributorImpl.sol index d4d4988..6e2d3e7 100644 --- a/contracts/syndication/DistributorImpl.sol +++ b/contracts/syndication/DistributorImpl.sol @@ -4,8 +4,8 @@ pragma solidity 0.8.26; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { ERC165Upgradeable } from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; -import { IDistributor } from "contracts/core/interfaces/syndication/IDistributor.sol"; -import { TreasuryOps } from "contracts/core/libraries/TreasuryOps.sol"; +import { IDistributor } from "@synaps3/core/interfaces/syndication/IDistributor.sol"; +import { TreasuryOps } from "@synaps3/core/libraries/TreasuryOps.sol"; /// @title Asset Distributor Implementation /// @notice This contract handles all the necessary logic for managing content distributors. diff --git a/contracts/syndication/DistributorReferendum.sol b/contracts/syndication/DistributorReferendum.sol index 2219fa4..fce5908 100644 --- a/contracts/syndication/DistributorReferendum.sol +++ b/contracts/syndication/DistributorReferendum.sol @@ -7,16 +7,16 @@ import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; // solhint-disable-next-line max-line-length import { ReentrancyGuardTransientUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardTransientUpgradeable.sol"; -import { AccessControlledUpgradeable } from "contracts/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; -import { FeesCollectorUpgradeable } from "contracts/core/primitives/upgradeable/FeesCollectorUpgradeable.sol"; -import { QuorumUpgradeable } from "contracts/core/primitives/upgradeable/QuorumUpgradeable.sol"; - -import { ITreasury } from "contracts/core/interfaces/economics/ITreasury.sol"; -import { ITollgate } from "contracts/core/interfaces/economics/ITollgate.sol"; -import { IDistributor } from "contracts/core/interfaces/syndication/IDistributor.sol"; -import { IDistributorReferendum } from "contracts/core/interfaces/syndication/IDistributorReferendum.sol"; -import { TreasuryOps } from "contracts/core/libraries/TreasuryOps.sol"; -import { T } from "contracts/core/primitives/Types.sol"; +import { AccessControlledUpgradeable } from "@synaps3/core/primitives/upgradeable/AccessControlledUpgradeable.sol"; +import { FeesCollectorUpgradeable } from "@synaps3/core/primitives/upgradeable/FeesCollectorUpgradeable.sol"; +import { QuorumUpgradeable } from "@synaps3/core/primitives/upgradeable/QuorumUpgradeable.sol"; + +import { ITreasury } from "@synaps3/core/interfaces/economics/ITreasury.sol"; +import { ITollgate } from "@synaps3/core/interfaces/economics/ITollgate.sol"; +import { IDistributor } from "@synaps3/core/interfaces/syndication/IDistributor.sol"; +import { IDistributorReferendum } from "@synaps3/core/interfaces/syndication/IDistributorReferendum.sol"; +import { TreasuryOps } from "@synaps3/core/libraries/TreasuryOps.sol"; +import { T } from "@synaps3/core/primitives/Types.sol"; contract DistributorReferendum is Initializable, diff --git a/packages/types/package.json b/packages/types/package.json index 8901989..866e723 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,26 +1,26 @@ { - "name": "@synaps3/types", - "version": "1.0.8", - "description": "Essential interfaces and types for Synapse Protocol.", - "homepage": "https://github.com/Synaps3Protocol/protocol-core-v1#readme", - "bugs": { - "url": "https://github.com/Synaps3Protocol/protocol-core-v1/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Synaps3Protocol/protocol-core-v1.git" - }, - "files": [ - "contracts/core//**/*.sol" - ], - "keywords": [ - "solidity", - "ethereum", - "smart contracts", - "distribution", - "ip", - "intellectual property", - "monetization", - "access control" - ] -} \ No newline at end of file + "name": "@synaps3/types", + "version": "1.0.9", + "description": "Essential interfaces and types for Synapse Protocol.", + "homepage": "https://github.com/Synaps3Protocol/protocol-core-v1#readme", + "bugs": { + "url": "https://github.com/Synaps3Protocol/protocol-core-v1/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Synaps3Protocol/protocol-core-v1.git" + }, + "files": [ + "contracts/core/**/*.sol" + ], + "keywords": [ + "solidity", + "ethereum", + "smart contracts", + "distribution", + "ip", + "intellectual property", + "monetization", + "access control" + ] + } \ No newline at end of file diff --git a/remappings.txt b/remappings.txt index 1f446f3..cfb2029 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,3 +1,4 @@ +@synaps3/=contracts/ @ethereum-attestation-service/=node_modules/@ethereum-attestation-service/ @ethsign/=node_modules/@ethsign/ @openzeppelin/=node_modules/@openzeppelin/