all files / contracts/mocks/ MockSpanningERC721Upgradeable.sol

62.5% Statements 5/8
100% Branches 0/0
62.5% Functions 5/8
62.5% Lines 5/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86                                                                                                                                                                 
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: Copyright (C) 2022 Spanning Labs Inc.
 
pragma solidity ^0.8.0;
 
import "../token/ERC721/SpanningERC721Upgradeable.sol";
 
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
 
/**
 * @title SpanningERC721MockUpgradeable
 * This mock just provides an initialize function for testing purposes
 */
contract SpanningERC721MockUpgradeable is
    Initializable,
    SpanningERC721Upgradeable
{
    /**
     * @dev Creates the contract, initializing various base contracts.
     *
     * @param delegateLegacyAddress - Legacy (local) Address of the Delegate
     */
    function initialize(address delegateLegacyAddress)
        public
        virtual
        initializer
    {
        __SpanningERC721Mock_init(delegateLegacyAddress);
    }
 
    function __SpanningERC721Mock_init(address delegateLegacyAddress)
        internal
        onlyInitializing
    {
        __SpanningERC721_init("Spanning Token", "SPAN", delegateLegacyAddress);
        __SpanningERC721Mock_init_unchained(delegateLegacyAddress);
    }
 
    function __SpanningERC721Mock_init_unchained(address delegateLegacyAddress)
        internal
        onlyInitializing
    {}
 
    function baseURI() public view returns (string memory) {
        return "v1";
    }
}
 
contract SpanningERC721MockUpgradeableV2 is
    Initializable,
    SpanningERC721Upgradeable
{
    /**
     * @dev Creates the contract, initializing various base contracts.
     *
     * @param delegateLegacyAddress - Legacy (local) Address of the Delegate
     */
    function initialize(address delegateLegacyAddress)
        public
        virtual
        initializer
    {
        __SpanningERC721MockV2_init(delegateLegacyAddress);
    }
 
    function __SpanningERC721MockV2_init(address delegateLegacyAddress)
        internal
        onlyInitializing
    {
        __SpanningERC721_init(
            "Spanning Token",
            "SPAN v2",
            delegateLegacyAddress
        );
        __SpanningERC721MockV2_init_unchained(delegateLegacyAddress);
    }
 
    function __SpanningERC721MockV2_init_unchained(
        address delegateLegacyAddress
    ) internal onlyInitializing {}
 
    function baseURI() public view returns (string memory) {
        return "v2";
    }
}