Skip to content

Commit

Permalink
further recommendation applied
Browse files Browse the repository at this point in the history
  • Loading branch information
0xPilou committed Dec 15, 2023
1 parent de02846 commit 95123d4
Show file tree
Hide file tree
Showing 50 changed files with 94 additions and 165 deletions.
2 changes: 1 addition & 1 deletion forge-cache/solidity-files-cache.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion script/base-goerli/create-publisher.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "forge-std/Script.sol";

import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";

contract CreatePublisher is Script {
contract CreatePublisherBaseGoerli is Script {
function run() external {
// Account to deploy from
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
Expand Down
2 changes: 1 addition & 1 deletion script/base-goerli/deploy-ABSuperToken.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Script} from "forge-std/Script.sol";
import {ABSuperToken} from "test/_mocks/ABSuperToken.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract DeployMockSuperToken is Script {
contract DeployMockSuperTokenBaseGoerli is Script {
address public constant SF_HOST_BASE_GOERLI = 0x9D469e8515F0cD12E30699B18059Ac8ca3324110;

function run() external {
Expand Down
2 changes: 1 addition & 1 deletion script/base-goerli/deploy-implementations.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol";
import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol";
import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";

contract DeployImplementation is Script {
contract DeployImplementationBaseGoerli is Script {
ERC721ABLE public erc721Impl;
ERC1155AB public erc1155Impl;

Expand Down
2 changes: 1 addition & 1 deletion script/base-goerli/deploy-kyc-upgrade.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {ERC721ABOE} from "src/token/ERC721/ERC721ABOE.sol";
import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol";
import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";

contract DeployKYCUpgrade is Script {
contract DeployKYCUpgradeBaseGoerli is Script {
string public constant KYC_MODULE_PATH = "deployment/84531/ABKYCModule/address";
string public constant PROXY_ADMIN_PATH = "deployment/84531/ProxyAdmin/address";

Expand Down
2 changes: 1 addition & 1 deletion script/base-goerli/deploy-platform.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol";
import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol";
import {ERC721ABOE} from "src/token/ERC721/ERC721ABOE.sol";

contract DeployPlatform is Script {
contract DeployPlatformBaseGoerli is Script {
uint256 public constant DROP_ID_OFFSET = 20_000;

string public constant VERIFIER_PATH = "deployment/84531/ABVerifier/address";
Expand Down
2 changes: 1 addition & 1 deletion script/base-goerli/deploy-royalty.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transpa
import {ABDataRegistry} from "src/utils/ABDataRegistry.sol";
import {ABRoyalty} from "src/royalty/ABRoyalty.sol";

contract DeployRoyalty is Script {
contract DeployRoyaltyBaseGoerli is Script {
string constant PROXY_ADMIN_PATH = "deployment/84531/ProxyAdmin/address";
string constant DATAREGISTRY_PATH = "deployment/84531/ABDataRegistry/address";

Expand Down
2 changes: 1 addition & 1 deletion script/base-goerli/deploy-upgrade.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {ERC721ABOE} from "src/token/ERC721/ERC721ABOE.sol";
import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol";
import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";

contract DeployUpgrade is Script {
contract DeployUpgradeBaseGoerli is Script {
ERC721ABLE public erc721LimitedEditionImpl;

function run() external {
Expand Down
2 changes: 1 addition & 1 deletion script/base-goerli/fireblocks/create-publisher.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "forge-std/Script.sol";

import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";

contract CreatePublisher is Script {
contract CreatePublisherBaseGoerliFireBlock is Script {
function run() external {
// Account to deploy from
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
Expand Down
2 changes: 1 addition & 1 deletion script/base-goerli/fireblocks/deploy-ABSuperToken.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Script} from "forge-std/Script.sol";
import {ABSuperToken} from "test/_mocks/ABSuperToken.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract DeployMockSuperToken is Script {
contract DeployMockSuperTokenBaseGoerliFireBlock is Script {
address public constant SF_HOST_BASE_GOERLI = 0x9D469e8515F0cD12E30699B18059Ac8ca3324110;

function run() external {
Expand Down
2 changes: 1 addition & 1 deletion script/base-goerli/fireblocks/deploy-platform.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";
import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol";
import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol";

contract DeployPlatform is Script {
contract DeployPlatformBaseGoerliFireBlock is Script {
uint256 public constant DROP_ID_OFFSET = 20_000;

string public constant VERIFIER_PATH = "deployment/84531/ABVerifier/address";
Expand Down
2 changes: 1 addition & 1 deletion script/base-goerli/fireblocks/deploy-royalty.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transpa
import {ABDataRegistry} from "src/utils/ABDataRegistry.sol";
import {ABRoyalty} from "src/royalty/ABRoyalty.sol";

contract DeployRoyalty is Script {
contract DeployRoyaltyBaseGoerliFireBlock is Script {
string constant PROXY_ADMIN_PATH = "deployment/84531/ProxyAdmin/address";
string constant DATAREGISTRY_PATH = "deployment/84531/ABDataRegistry/address";

Expand Down
2 changes: 1 addition & 1 deletion script/base/create-publisher.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "forge-std/Script.sol";

import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";

contract CreatePublisher is Script {
contract CreatePublisherBase is Script {
function run() external {
// Account to deploy from
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
Expand Down
2 changes: 1 addition & 1 deletion script/base/deploy-ABSuperToken.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Script} from "forge-std/Script.sol";
import {ABSuperToken} from "test/_mocks/ABSuperToken.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract DeployMockSuperToken is Script {
contract DeployMockSuperTokenBase is Script {
address public constant SF_HOST_BASE_GOERLI = 0x9D469e8515F0cD12E30699B18059Ac8ca3324110;

function run() external {
Expand Down
4 changes: 2 additions & 2 deletions script/base/deploy-implementations.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol";
import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol";
import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";

contract DeployImplementation is Script {
contract DeployImplementationBase is Script {
ERC721ABLE public erc721Impl;
ERC1155AB public erc1155Impl;
address public constant anotherCloneFactory = 0x137d7d27af9B4d7b467Ac008AFdcDb8C9Ac4ddd9;
address public anotherCloneFactory = 0x137d7d27af9B4d7b467Ac008AFdcDb8C9Ac4ddd9;

function run() external {
// Account to deploy from
Expand Down
2 changes: 1 addition & 1 deletion script/base/deploy-platform.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";
import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol";
import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol";

contract DeployPlatform is Script {
contract DeployPlatformBase is Script {
uint256 public constant DROP_ID_OFFSET = 10_000;

address public constant BASE_MAINNET_MULTISIG_TREASURY = 0x6367DF7dCed8fE1E8B55d0e7b2e4a5EC3E149D38;
Expand Down
2 changes: 1 addition & 1 deletion script/base/deploy-royalty.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transpa
import {ABDataRegistry} from "src/utils/ABDataRegistry.sol";
import {ABRoyalty} from "src/royalty/ABRoyalty.sol";

contract DeployRoyalty is Script {
contract DeployRoyaltyBase is Script {
string constant PROXY_ADMIN_PATH = "deployment/84531/ProxyAdmin/address";
string constant DATAREGISTRY_PATH = "deployment/84531/ABDataRegistry/address";

Expand Down
2 changes: 1 addition & 1 deletion script/base/deploy-v1_1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {ERC721ABOE} from "src/token/ERC721/ERC721ABOE.sol";
import {ABDataRegistry} from "src/utils/ABDataRegistry.sol";
import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";

contract DeployUpgrade is Script {
contract DeployUpgradeBase is Script {
function run() external {
// Account to deploy from
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
Expand Down
2 changes: 1 addition & 1 deletion script/goerli/fireblocks/create-publisher.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "forge-std/Script.sol";

import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";

contract CreatePublisher is Script {
contract CreatePublisherGoerli is Script {
function run() external {
// Account to deploy from
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
Expand Down
2 changes: 1 addition & 1 deletion script/goerli/fireblocks/deploy-ABSuperToken.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Script} from "forge-std/Script.sol";
import {ABSuperToken} from "test/_mocks/ABSuperToken.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract DeployMockSuperToken is Script {
contract DeployMockSuperTokenGoerli is Script {
address public constant SF_HOST_BASE_GOERLI = 0x9D469e8515F0cD12E30699B18059Ac8ca3324110;

function run() external {
Expand Down
2 changes: 1 addition & 1 deletion script/goerli/fireblocks/deploy-platform.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";
import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol";
import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol";

contract DeployPlatform is Script {
contract DeployPlatformGoerli is Script {
uint256 public constant DROP_ID_OFFSET = 30_000;

string public constant VERIFIER_PATH = "deployment/5/ABVerifier/address";
Expand Down
2 changes: 1 addition & 1 deletion script/goerli/fireblocks/deploy-royalty.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transpa
import {ABDataRegistry} from "src/utils/ABDataRegistry.sol";
import {ABRoyalty} from "src/royalty/ABRoyalty.sol";

contract DeployRoyalty is Script {
contract DeployRoyaltyGoerli is Script {
string constant PROXY_ADMIN_PATH = "deployment/84531/ProxyAdmin/address";
string constant DATAREGISTRY_PATH = "deployment/84531/ABDataRegistry/address";

Expand Down
2 changes: 1 addition & 1 deletion script/op/deploy-ABSuperToken.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.18;
import "forge-std/Script.sol";
import "test/_mocks/ABSuperToken.sol";

contract DeployMockSuperToken is Script {
contract DeployMockSuperTokenOptimism is Script {
error INCORRECT_NETWORK();

address public constant SF_HOST_OPTIMISM_GOERLI = 0xE40983C2476032A0915600b9472B3141aA5B5Ba9;
Expand Down
2 changes: 1 addition & 1 deletion script/op/deploy-platform.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol";
import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol";
import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol";

contract DeployPlatform is Script {
contract DeployPlatformOptimism is Script {
uint256 public constant DROP_ID_OFFSET = 10_000;

string public constant VERIFIER_PATH = "deployment/420/ABVerifier/address";
Expand Down
49 changes: 0 additions & 49 deletions script/op/deploy-platform.s.sol.old

This file was deleted.

2 changes: 1 addition & 1 deletion script/op/deploy-royalty.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transpa
import {ABDataRegistry} from "src/utils/ABDataRegistry.sol";
import {ABRoyalty} from "src/royalty/ABRoyalty.sol";

contract DeployRoyalty is Script {
contract DeployRoyaltyOptimism is Script {
function run(address _publisher) external {
// Account to deploy from
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
Expand Down
6 changes: 2 additions & 4 deletions src/factory/AnotherCloneFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title AnotherCloneFactory
* @author anotherblock Technical Team
* @notice Contract responsible for deploying anotherblock collections
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

//SPDX-License-Identifier: MIT
Expand Down Expand Up @@ -131,8 +131,6 @@ contract AnotherCloneFactory is AccessControlUpgradeable {
erc1155Impl = _erc1155Impl;
royaltyImpl = _royaltyImpl;

collectionCount = 0;

// Initialize Access Control
__AccessControl_init();
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
Expand Down Expand Up @@ -240,7 +238,7 @@ contract AnotherCloneFactory is AccessControlUpgradeable {
if (_account == address(0)) revert ABErrors.INVALID_PARAMETER();

// Register new publisher within the publisher registry
abDataRegistry.registerPublisher(_account, address(_abRoyalty), _publisherFee);
abDataRegistry.registerPublisher(_account, _abRoyalty, _publisherFee);

// Grant publisher role to `_account`
grantRole(PUBLISHER_ROLE, _account);
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/ABDataTypes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title ABDataTypes
* @author anotherblock Technical Team
* @notice A standard library of data types used throughout anotherblock contracts
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/ABErrors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title ABErrors
* @author anotherblock Technical Team
* @notice A standard library of custom revert errors used throughout anotherblock contracts
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/ABEvents.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title ABEvents
* @author anotherblock Technical Team
* @notice A standard library of events used throughout anotherblock contracts
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

// SPDX-License-Identifier: MIT
Expand Down
4 changes: 2 additions & 2 deletions src/royalty/ABRoyalty.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title ABRoyalty
* @author anotherblock Technical Team
* @notice anotherblock contract responsible for paying out royalties
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

// SPDX-License-Identifier: MIT
Expand Down Expand Up @@ -180,7 +180,7 @@ contract ABRoyalty is IABRoyalty, Initializable, AccessControlUpgradeable {
_distribute(_dropId, _amount);
}

/**
/**
* @notice
* Claim the owed royalties for the given Drop IDs on behalf of the user
* Only contract owner can perform this operation
Expand Down
2 changes: 1 addition & 1 deletion src/royalty/IABRoyalty.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title IABRoyalty
* @author anotherblock Technical Team
* @notice ABRoyalty contract interface
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/token/ERC1155/ERC1155AB.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title ERC1155AB
* @author anotherblock Technical Team
* @notice anotherblock ERC1155 contract standard
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/token/ERC721/ERC721AB.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title ERC721AB
* @author anotherblock Technical Team
* @notice anotherblock ERC721 contract standard
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/token/ERC721/ERC721ABLE.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title ERC721ABLE
* @author anotherblock Technical Team
* @notice anotherblock ERC721 contract used for regular mint mechanism & limited edition
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/token/ERC721/ERC721ABOE.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title ERC721ABOE
* @author anotherblock Technical Team
* @notice anotherblock ERC721 Open Edition contract standard
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/utils/ABDataRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @title ABDataRegistry
* @author anotherblock Technical Team
* @notice anotherblock Data Registry contract responsible for housekeeping drops & publishers details
* @custom:contact [email protected]
* @custom:security-contact [email protected]
*/

// SPDX-License-Identifier: MIT
Expand Down
Loading

0 comments on commit 95123d4

Please sign in to comment.