all files / contracts/mocks/ MockSpanningERC20Upgradeable.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 87                                                                                                                                                                   
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: Copyright (C) 2022 Spanning Labs Inc.
 
pragma solidity ^0.8.0;
 
import "../token/ERC20/SpanningERC20Upgradeable.sol";
 
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
 
/**
 * @title SpanningERC20MockUpgradeable
 * This mock just provides an initialize function for testing purposes
 */
contract SpanningERC20MockUpgradeable is
    Initializable,
    SpanningERC20Upgradeable
{
    /**
     * @dev Creates the contract, initializing various base contracts.
     *
     * @param delegateLegacyAddress - Legacy (local) Address of the Delegate
     */
    function initialize(address delegateLegacyAddress)
        public
        virtual
        initializer
    {
        __SpanningERC20Mock_init(delegateLegacyAddress);
    }
 
    function __SpanningERC20Mock_init(address delegateLegacyAddress)
        internal
        onlyInitializing
    {
        __SpanningERC20_init("Spanning Token", "SPAN", delegateLegacyAddress);
        __SpanningERC20Mock_init_unchained(delegateLegacyAddress);
    }
 
    function __SpanningERC20Mock_init_unchained(address delegateLegacyAddress)
        internal
        onlyInitializing
    {}
 
    function baseURI() public view returns (string memory) {
        return "v1";
    }
}
 
contract SpanningERC20MockUpgradeableV2 is
    Initializable,
    SpanningERC20Upgradeable
{
    /**
     * @dev Creates the contract, initializing various base contracts.
     *
     * @param delegateLegacyAddress - Legacy (local) Address of the Delegate
     */
    function initialize(address delegateLegacyAddress)
        public
        virtual
        initializer
    {
        __SpanningERC20MockV2_init(delegateLegacyAddress);
    }
 
    function __SpanningERC20MockV2_init(address delegateLegacyAddress)
        internal
        onlyInitializing
    {
        __SpanningERC20_init(
            "Spanning Token",
            "SPAN v2",
            delegateLegacyAddress
        );
        __SpanningERC20MockV2_init_unchained(delegateLegacyAddress);
    }
 
    function __SpanningERC20MockV2_init_unchained(address delegateLegacyAddress)
        internal
        onlyInitializing
    {}
 
    function baseURI() public view returns (string memory) {
        return "v2";
    }
}