Contract 0xd3f07EA86DDf7BAebEfd49731D7Bbd207FedC53B

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0x8d63d00a1e88ed16bfcfb833200672d958a7f5bd22deda79e84e5ff03c2fb9d6Approve407297452023-03-24 23:07:201 day 13 hrs ago0xb85083177705ebb1a9d5719f51abc4dde8526137 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.004262508886 74.346517483
0x2fbb32836df7d63a1eff81496fa48fc6155234fe317f62145692384629afeb08Approve405387792023-03-19 19:55:286 days 17 hrs ago0x60c809705e045572ffe3c44badd4d680165960fa IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.003540933292 61.439336709
0x0bebe93216a14ac7edee178c802393fc3df048599979779321adc2c8b8ec1ab3Approve405357182023-03-19 17:58:566 days 19 hrs ago0x685b5623db05e2298ad745124e425e5c8c687edb IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.00531300642 92.186879394
0xec6132922d0c332c207c02a63cb0503b0d1c57b13503ac369d255abdbf2e25d9Approve404927742023-03-18 14:30:507 days 22 hrs ago0xd67da12dc33d9730d9341bbfa4f0b67d0688b28b IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.007647769557 133.39210502
0xc0c3c3ef9f7755fb618a41c163109b036434df7239c878100fbf01b07d34c079Approve404776032023-03-18 5:18:268 days 7 hrs ago visualvibrations.nft  IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.003998554211113.116473198
0xca5812593b229da012ffb3dc4554e9771640552670122fd8254ce087203d731bApprove402232292023-03-11 13:54:3514 days 23 hrs ago0x5207948d16d4d78893692d369ae62888aa398f58 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.010534002298
0xa0e32d010394f27ab3a3e800f9143453cb49e565eedce939b09bd174e2e6e149Approve401820722023-03-10 11:44:2916 days 1 hr ago0xd67da12dc33d9730d9341bbfa4f0b67d0688b28b IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.007486039069 130.571208015
0x3e6f6b4b6bdd1b3a6b5381983252b2339f1ad6cd69837cd7979a12a54c2a99a1Approve401093282023-03-08 13:42:1017 days 23 hrs ago0x39780c69e8c7850621146af3d227ad47df88e923 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.009870335779 172.194061164
0x238beb0c46b8a76bccb3bce2d8c8bf24cd0f237cd33ba2f3f7a99f144160de23Approve397381312023-02-26 17:24:3927 days 19 hrs ago0x6eebae27d69fa80f0e4c0e973a2fed218a56880c IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.010286559291
0xf3e58bfba47ddea00da2c631ded0846e19016e3551ecb7c2ada8d45c14696e9eApprove395656492023-02-21 23:06:0232 days 13 hrs ago0xfa5beabe9c39712c92d98ede40921c6e6f744536 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.003961971495 105.000172139
0x78141ff88e4f0a7844ad734cd3cf9845ced7e5d3d60f261955157ccd11bda835Approve395652502023-02-21 22:51:5432 days 14 hrs ago0xfa5beabe9c39712c92d98ede40921c6e6f744536 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.003818961667 101.210125562
0xf1d0cd5dc63e81b601494fa315840a32025bffd60384b21a8aa47b32dbb51026Exit Pool394430562023-02-18 20:15:4935 days 16 hrs ago0xdca6143e849247df9d1a32264fe5108fe31ae878 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.041311303018 131.095387906
0xc2c7d23435c0ebc6050020585ab373dd7e75133a2bb0efe2ec65b07859864ec9Approve394429702023-02-18 20:12:1235 days 16 hrs ago0x7cd514afedc5a9ecd9e61eca1fdf02f0067646aa IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.006380688151 170.839598162
0x2c4c3683f39621213fa419076ff015d8ac74c6d58f02d68da64aa309767eb616Approve394429262023-02-18 20:10:0635 days 16 hrs ago0x7cd514afedc5a9ecd9e61eca1fdf02f0067646aa IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.005334365257 150.90569062
0xeb22d1653dc7944208876e7cfb924cee0bcf20fb6efbc1af923594422e18d91fExit Pool394418252023-02-18 19:28:2735 days 17 hrs ago0xdca6143e849247df9d1a32264fe5108fe31ae878 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.093612122877 297.053090976
0x5d7f911945daaca36b5ad59fe03cf34ec5d216a6aa95d8808e5b01f229c4802fApprove393277242023-02-15 17:11:1838 days 19 hrs ago0x83cd846f18e156a9e2e81c51eb800d471871ca33 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.014722260055 255.448441959
0x4c4d6d4eddaba90680a690d1fa129712a539bdec14430706295ad357ee466af0Approve393276202023-02-15 17:06:4538 days 19 hrs ago0x83cd846f18e156a9e2e81c51eb800d471871ca33 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.01440825 250
0x0169460a651ab975bbada6c5c7fb4a82714723bef53b92a6022e32dcf57a5e5fExit Pool390720982023-02-08 21:37:3045 days 15 hrs ago0xd91a035178d4ed75f3aa09448b5150426c1cb9cb IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.03585664421 113.781491833
0x6c961ecbaf0beb3b40ff52b426c242b136d8817bd3b3b0cfd6d85e0051f453f7Exit Pool390715562023-02-08 21:18:0445 days 15 hrs ago0x39a6afc920eab4722cf217ba84644ebd6adecf15 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.025451055203 114.668669509
0xa36c96db1c1efbdd0640333cf51d1091071bd0e7d1f4b8447f85511906f62d74Exit Pool390715562023-02-08 21:18:0445 days 15 hrs ago0x39a6afc920eab4722cf217ba84644ebd6adecf15 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.036137601858 114.668669509
0x0b9bd3bad24f3ad347f2647e7410787d94da8a8ad151bdcb8e01a45b45768289Approve390712982023-02-08 21:08:4445 days 15 hrs ago0x39a6afc920eab4722cf217ba84644ebd6adecf15 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.006851442317 118.880542704
0xd4212f8b6ae90259f74ef2b8c147c9fb38bf6898014c1ee65472158ebbadbc3dExit Pool390462322023-02-08 6:08:3646 days 6 hrs ago0xdca6143e849247df9d1a32264fe5108fe31ae878 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.071930990932 228.253804492
0xd677f76a01c6571aa7f65e2e83dc57c5ca9e1f90d87a4072cf5a726b8d89502cExit Pool389210002023-02-05 1:06:3649 days 11 hrs ago0xdca6143e849247df9d1a32264fe5108fe31ae878 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.026727717817 84.810050571
0x12222428eb5793c88643f8c7eb9f616d3be332c574982b3dca937ca2306257e1Exit Pool388674692023-02-03 16:01:0450 days 21 hrs ago0x68863699ae0be79db4591f38295672d1bc6f5112 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.065118713629 206.628992187
0xcb4b9452a515c157eeedd78a6242046dc6923f944fde8c18c606be2734b10d5eExit Pool388661442023-02-03 15:12:0650 days 21 hrs ago0xb85083177705ebb1a9d5719f51abc4dde8526137 IN  0xd3f07ea86ddf7baebefd49731d7bbd207fedc53b0 MATIC0.086465930553 274.376556641
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xa1a9efd85b722a42faa89b23e5723c0a8d72ab9e4784ddaa6e86450321712558186316612021-09-01 17:16:42570 days 19 hrs ago 0x6a10bb7ac83fdd9cecdb13a8cfc3fc0a017912e2  Contract Creation0 MATIC
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x28cC94Cf01A8f29668368687e409d7E3DAC17bFE

Contract Name:
PProxy

Compiler Version
v0.7.1+commit.f4a555be

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-08-30
*/

/**
 *Submitted for verification at polygonscan.com on 2021-08-29
*/

// File: Interfaces/ICallFacet.sol


pragma solidity ^0.7.1;

interface ICallFacet {

    event CallerAdded(address indexed caller);
    event CallerRemoved(address indexed caller);
    event Call(address indexed caller, address indexed target, bytes data, uint256 value);

    /**
        @notice Lets whitelisted callers execute a batch of arbitrary calls from the pool. Reverts if one of the calls fails
        @param _targets Array of addresses of targets to call
        @param _calldata Array of calldata for each call
        @param _values Array of amounts of ETH to send with the call
    */
    function call(
        address[] memory _targets,
        bytes[] memory _calldata,
        uint256[] memory _values
    ) external;

    /**
        @notice Lets whitelisted callers execute a batch of arbitrary calls from the pool without sending any Ether. Reverts if one of the calls fail
        @param _targets Array of addresses of targets to call
        @param _calldata Array of calldata for each call
    */
    function callNoValue(
        address[] memory _targets,
        bytes[] memory _calldata
    ) external;

    /**
        @notice Lets whitelisted callers execute a single arbitrary call from the pool. Reverts if the call fails
        @param _target Address of the target to call
        @param _calldata Calldata of the call
        @param _value Amount of ETH to send with the call
    */
    function singleCall(
        address _target,
        bytes calldata _calldata,
        uint256 _value
    ) external;

    /**
        @notice Add a whitelisted caller. Can only be called by the contract owner
        @param _caller Caller to add
    */
    function addCaller(address _caller) external;

    /**
        @notice Remove a whitelisted caller. Can only be called by the contract owner
    */
    function removeCaller(address _caller) external;

    /**
        @notice Checks if an address is a whitelisted caller
        @param _caller Address to check
        @return If the address is whitelisted
    */
    function canCall(address _caller) external view returns (bool);

    /**
        @notice Get all whitelisted callers
        @return Array of whitelisted callers
    */
    function getCallers() external view returns (address[] memory);
}
// File: Interfaces/IERC20Facet.sol


pragma solidity ^0.7.1;

interface IERC20Facet {
    
    /**
        @notice Get the token name
        @return The token name
    */
    function name() external view returns (string memory);

    /**
        @notice Get the token symbol
        @return The token symbol 
    */
    function symbol() external view returns (string memory);

    /**
        @notice Get the amount of decimals
        @return Amount of decimals
    */
    function decimals() external view returns (uint8);

    /**
        @notice Mints tokens. Can only be called by the contract owner or the contract itself
        @param _receiver Address receiving the tokens
        @param _amount Amount to mint
    */
    function mint(address _receiver, uint256 _amount) external;

    /**
        @notice Burns tokens. Can only be called by the contract owner or the contract itself
        @param _from Address to burn from
        @param _amount Amount to burn
    */
    function burn(address _from, uint256 _amount) external;

    /**
        @notice Sets up the metadata and initial supply. Can be called by the contract owner
        @param _initialSupply Initial supply of the token
        @param _name Name of the token
        @param _symbol Symbol of the token
    */
    function initialize(
        uint256 _initialSupply,
        string memory _name,
        string memory _symbol
    ) external;

    /**
        @notice Set the token name of the contract. Can only be called by the contract owner or the contract itself
        @param _name New token name
    */
    function setName(string calldata _name) external;

    /**
        @notice Set the token symbol of the contract. Can only be called by the contract owner or the contract itself
        @param _symbol New token symbol
    */
    function setSymbol(string calldata _symbol) external;
    
    /**
        @notice Increase the amount of tokens another address can spend
        @param _spender Spender
        @param _amount Amount to increase by
    */
    function increaseApproval(address _spender, uint256 _amount) external returns (bool);

    /**
        @notice Decrease the amount of tokens another address can spend
        @param _spender Spender
        @param _amount Amount to decrease by
    */
    function decreaseApproval(address _spender, uint256 _amount) external returns (bool);

}
// File: Interfaces/IBasketFacet.sol


pragma solidity ^0.7.1;

interface IBasketFacet {

    event TokenAdded(address indexed _token);
    event TokenRemoved(address indexed _token);
    event EntryFeeSet(uint256 fee);
    event ExitFeeSet(uint256 fee);
    event AnnualizedFeeSet(uint256 fee);
    event FeeBeneficiarySet(address indexed beneficiary);
    event EntryFeeBeneficiaryShareSet(uint256 share);
    event ExitFeeBeneficiaryShareSet(uint256 share);

    event PoolJoined(address indexed who, uint256 amount);
    event PoolExited(address indexed who, uint256 amount);
    event FeeCharged(uint256 amount);
    event LockSet(uint256 lockBlock);
    event CapSet(uint256 cap);

    /** 
        @notice Sets entry fee paid when minting
        @param _fee Amount of fee. 1e18 == 100%, capped at 10%
    */
    function setEntryFee(uint256 _fee) external;

    /**
        @notice Get the entry fee
        @return Current entry fee
    */
    function getEntryFee() external view returns(uint256);

    /**
        @notice Set the exit fee paid when exiting
        @param _fee Amount of fee. 1e18 == 100%, capped at 10%
    */
    function setExitFee(uint256 _fee) external;

    /**
        @notice Get the exit fee
        @return Current exit fee
    */
    function getExitFee() external view returns(uint256);

    /**
        @notice Set the annualized fee. Often referred to as streaming fee
        @param _fee Amount of fee. 1e18 == 100%, capped at 10%
    */
    function setAnnualizedFee(uint256 _fee) external;

    /**
        @notice Get the annualized fee.
        @return Current annualized fee.
    */
    function getAnnualizedFee() external view returns(uint256);

    /**
        @notice Set the address receiving the fees.
    */
    function setFeeBeneficiary(address _beneficiary) external;

    /**
        @notice Get the fee benificiary
        @return The current fee beneficiary
    */
    function getFeeBeneficiary() external view returns(address);

    /**
        @notice Set the fee beneficiaries share of the entry fee
        @notice _share Share of the fee. 1e18 == 100%. Capped at 100% 
    */
    function setEntryFeeBeneficiaryShare(uint256 _share) external;

    /**
        @notice Get the entry fee beneficiary share
        @return Feeshare amount
    */
    function getEntryFeeBeneficiaryShare() external view returns(uint256);

    /**
        @notice Set the fee beneficiaries share of the exit fee
        @notice _share Share of the fee. 1e18 == 100%. Capped at 100% 
    */
    function setExitFeeBeneficiaryShare(uint256 _share) external;

    /**
        @notice Get the exit fee beneficiary share
        @return Feeshare amount
    */
    function getExitFeeBeneficiaryShare() external view returns(uint256);

    /**
        @notice Calculate the oustanding annualized fee
        @return Amount of pool tokens to be minted to charge the annualized fee
    */
    function calcOutStandingAnnualizedFee() external view returns(uint256);

    /**
        @notice Charges the annualized fee
    */
    function chargeOutstandingAnnualizedFee() external;

    /**
        @notice Pulls underlying from caller and mints the pool token
        @param _amount Amount of pool tokens to mint
    */
    function joinPool(uint256 _amount) external;

    /**
        @notice Burns pool tokens from the caller and returns underlying assets
    */
    function exitPool(uint256 _amount) external;

    /**
        @notice Get if the pool is locked or not. (not accepting exit and entry)
        @return Boolean indicating if the pool is locked
    */
    function getLock() external view returns (bool);

    /**
        @notice Get the block until which the pool is locked
        @return The lock block
    */
    function getLockBlock() external view returns (uint256);

    /**
        @notice Set the lock block
        @param _lock Block height of the lock
    */
    function setLock(uint256 _lock) external;

    /**
        @notice Get the maximum of pool tokens that can be minted
        @return Cap
    */
    function getCap() external view returns (uint256);

    /**
        @notice Set the maximum of pool tokens that can be minted
        @param _maxCap Max cap 
    */
    function setCap(uint256 _maxCap) external;

    /**
        @notice Get the amount of tokens owned by the pool
        @param _token Addres of the token
        @return Amount owned by the contract
    */
    function balance(address _token) external view returns (uint256);

    /**
        @notice Get the tokens in the pool
        @return Array of tokens in the pool
    */
    function getTokens() external view returns (address[] memory);

    /**
        @notice Add a token to the pool. Should have at least a balance of 10**6
        @param _token Address of the token to add
    */
    function addToken(address _token) external;

    /**
        @notice Removes a token from the pool
        @param _token Address of the token to remove
    */
    function removeToken(address _token) external;

    /**
        @notice Checks if a token was added to the pool
        @param _token address of the token
        @return If token is in the pool or not
    */
    function getTokenInPool(address _token) external view returns (bool);

    /**
        @notice Calculate the amounts of underlying needed to mint that pool amount.
        @param _amount Amount of pool tokens to mint
        @return tokens Tokens needed
        @return amounts Amounts of underlying needed
    */
    function calcTokensForAmount(uint256 _amount)
        external
        view
        returns (address[] memory tokens, uint256[] memory amounts);

    /**
        @notice Calculate the amounts of underlying to receive when burning that pool amount
        @param _amount Amount of pool tokens to burn
        @return tokens Tokens returned
        @return amounts Amounts of underlying returned
    */
    function calcTokensForAmountExit(uint256 _amount)
        external
        view
        returns (address[] memory tokens, uint256[] memory amounts);
}

// File: Interfaces/IERC20.sol



pragma solidity ^0.7.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: Interfaces/IERC173.sol


pragma solidity ^0.7.1;

/// @title ERC-173 Contract Ownership Standard
///  Note: the ERC-165 identifier for this interface is 0x7f5828d0
/* is ERC165 */
interface IERC173 {
    /// @dev This emits when ownership of a contract changes.
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /// @notice Get the address of the owner
    /// @return owner_ The address of the owner.
    function owner() external view returns (address owner_);

    /// @notice Set the address of the new owner of the contract
    /// @dev Set _newOwner to address(0) to renounce any ownership.
    /// @param _newOwner The address of the new owner of the contract
    function transferOwnership(address _newOwner) external;
}

// File: Interfaces/IExperiPie.sol


pragma solidity ^0.7.1;


/**
    @title ExperiPie Interface
    @dev Combines all ExperiPie facet interfaces into one
*/
interface IExperiPie is IERC20, IBasketFacet, IERC20Facet, IERC173, ICallFacet {
}
// File: Diamond/PProxyStorage.sol

pragma solidity ^0.7.1;

contract PProxyStorage {

    function readBool(bytes32 _key) public view returns(bool) {
        return storageRead(_key) == bytes32(uint256(1));
    }

    function setBool(bytes32 _key, bool _value) internal {
        if(_value) {
            storageSet(_key, bytes32(uint256(1)));
        } else {
            storageSet(_key, bytes32(uint256(0)));
        }
    }

    function readAddress(bytes32 _key) public view returns(address) {
        return bytes32ToAddress(storageRead(_key));
    }

    function setAddress(bytes32 _key, address _value) internal {
        storageSet(_key, addressToBytes32(_value));
    }

    function storageRead(bytes32 _key) public view returns(bytes32) {
        bytes32 value;
        //solium-disable-next-line security/no-inline-assembly
        assembly {
            value := sload(_key)
        }
        return value;
    }

    function storageSet(bytes32 _key, bytes32 _value) internal {
        // targetAddress = _address;  // No!
        bytes32 implAddressStorageKey = _key;
        //solium-disable-next-line security/no-inline-assembly
        assembly {
            sstore(implAddressStorageKey, _value)
        }
    }

    function bytes32ToAddress(bytes32 _value) public pure returns(address) {
        return address(uint160(uint256(_value)));
    }

    function addressToBytes32(address _value) public pure returns(bytes32) {
        return bytes32(uint256(_value));
    }

}
// File: Diamond/PProxy.sol

pragma solidity ^0.7.1;


contract PProxy is PProxyStorage {

    bytes32 constant IMPLEMENTATION_SLOT = keccak256(abi.encodePacked("IMPLEMENTATION_SLOT"));
    bytes32 constant OWNER_SLOT = keccak256(abi.encodePacked("OWNER_SLOT"));

    modifier onlyProxyOwner() {
        require(msg.sender == readAddress(OWNER_SLOT), "PProxy.onlyProxyOwner: msg sender not owner");
        _;
    }

    constructor () public {
        setAddress(OWNER_SLOT, msg.sender);
    }

    function getProxyOwner() public view returns (address) {
       return readAddress(OWNER_SLOT);
    }

    function setProxyOwner(address _newOwner) onlyProxyOwner public {
        setAddress(OWNER_SLOT, _newOwner);
    }

    function getImplementation() public view returns (address) {
        return readAddress(IMPLEMENTATION_SLOT);
    }

    function setImplementation(address _newImplementation) onlyProxyOwner public {
        setAddress(IMPLEMENTATION_SLOT, _newImplementation);
    }


    fallback () external payable {
       return internalFallback();
    }

    function internalFallback() internal virtual {
        address contractAddr = readAddress(IMPLEMENTATION_SLOT);
        assembly {
            let ptr := mload(0x40)
            calldatacopy(ptr, 0, calldatasize())
            let result := delegatecall(gas(), contractAddr, ptr, calldatasize(), 0, 0)
            let size := returndatasize()
            returndatacopy(ptr, 0, size)

            switch result
            case 0 { revert(ptr, size) }
            default { return(ptr, size) }
        }
    }

}
// File: OpenZeppelin/Address.sol



pragma solidity ^0.7.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
// File: OpenZeppelin/SafeMath.sol



pragma solidity ^0.7.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: OpenZeppelin/SafeERC20.sol



pragma solidity ^0.7.0;




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}
// File: OpenZeppelin/Context.sol



pragma solidity ^0.7.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}
// File: OpenZeppelin/Ownable.sol



pragma solidity ^0.7.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}
// File: Interfaces/IERC165.sol


pragma solidity ^0.7.1;

interface IERC165 {
    /// @notice Query if a contract implements an interface
    /// @param interfaceId The interface identifier, as specified in ERC-165
    /// @dev Interface identification is specified in ERC-165. This function
    ///  uses less than 30,000 gas.
    /// @return `true` if the contract implements `interfaceID` and
    ///  `interfaceID` is not 0xffffffff, `false` otherwise
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File: Interfaces/IDiamondLoupe.sol


pragma solidity ^0.7.1;

// A loupe is a small magnifying glass used to look at diamonds.
// These functions look at diamonds
interface IDiamondLoupe {
    /// These functions are expected to be called frequently
    /// by tools.

    struct Facet {
        address facetAddress;
        bytes4[] functionSelectors;
    }

    /// @notice Gets all facet addresses and their four byte function selectors.
    /// @return facets_ Facet
    function facets() external view returns (Facet[] memory facets_);

    /// @notice Gets all the function selectors supported by a specific facet.
    /// @param _facet The facet address.
    /// @return facetFunctionSelectors_
    function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);

    /// @notice Get all the facet addresses used by a diamond.
    /// @return facetAddresses_
    function facetAddresses() external view returns (address[] memory facetAddresses_);

    /// @notice Gets the facet that supports the given selector.
    /// @dev If facet is not found return address(0).
    /// @param _functionSelector The function selector.
    /// @return facetAddress_ The facet address.
    function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);
}
// File: Diamond/LibDiamondInitialize.sol


pragma solidity ^0.7.1;

/******************************************************************************\
* Author: Mick de Graaf
*
* Tracks if the contract is already intialized or not
/******************************************************************************/


library LibDiamondInitialize {
    bytes32 constant DIAMOND_INITIALIZE_STORAGE_POSITION = keccak256("diamond.standard.initialize.diamond.storage");

    struct InitializedStorage {
        bool initialized;
    }

    function diamondInitializeStorage() internal pure returns (InitializedStorage storage ids) {
        bytes32 position = DIAMOND_INITIALIZE_STORAGE_POSITION;
        assembly {
            ids.slot := position
        }
    }

}
// File: Interfaces/IDiamondCut.sol


pragma solidity ^0.7.1;

/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
/******************************************************************************/

interface IDiamondCut {
    enum FacetCutAction {Add, Replace, Remove}

    struct FacetCut {
        address facetAddress;
        FacetCutAction action;
        bytes4[] functionSelectors;
    }

    /// @notice Add/replace/remove any number of functions and optionally execute
    ///         a function with delegatecall
    /// @param _diamondCut Contains the facet addresses and function selectors
    /// @param _init The address of the contract or facet to execute _calldata
    /// @param _calldata A function call, including function selector and arguments
    ///                  _calldata is executed with delegatecall on _init
    function diamondCut(
        FacetCut[] calldata _diamondCut,
        address _init,
        bytes calldata _calldata
    ) external;

    event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);
}
// File: Diamond/LibDiamond.sol


pragma solidity ^0.7.1;

/******************************************************************************\
* Author: Nick Mudge
*
* Implementation of Diamond facet.
* This is gas optimized by reducing storage reads and storage writes.
* This code is as complex as it is to reduce gas costs.
/******************************************************************************/


library LibDiamond {
        bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage");

    struct DiamondStorage {
        // maps function selectors to the facets that execute the functions.
        // and maps the selectors to their position in the selectorSlots array.        
        // func selector => address facet, selector position
        mapping(bytes4 => bytes32) facets;
        // array of slots of function selectors.
        // each slot holds 8 function selectors.
        mapping(uint256 => bytes32) selectorSlots;
        // The number of function selectors in selectorSlots
        uint16 selectorCount;
        // owner of the contract
        // Used to query if a contract implements an interface.
        // Used to implement ERC-165.
        mapping(bytes4 => bool) supportedInterfaces;
        // owner of the contract
        address contractOwner;
    }

    function diamondStorage() internal pure returns (DiamondStorage storage ds) {
        bytes32 position = DIAMOND_STORAGE_POSITION;
        assembly {
            ds.slot := position
        }
    }
   
   event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

   function setContractOwner(address _newOwner) internal {
        DiamondStorage storage ds = diamondStorage();
        address previousOwner = ds.contractOwner;
        ds.contractOwner = _newOwner;
        emit OwnershipTransferred(previousOwner, _newOwner);
    }

    function contractOwner() internal view returns (address contractOwner_) {
        contractOwner_ = diamondStorage().contractOwner;
    }

    function enforceIsContractOwner() view internal {
        require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner");
    }

    modifier onlyOwner {
        require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner");
        _;
    }

    event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);

    bytes32 constant CLEAR_ADDRESS_MASK = bytes32(uint256(0xffffffffffffffffffffffff));
    bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224));

    // Internal function version of diamondCut
    // This code is almost the same as the external diamondCut,
    // except it is using 'Facet[] memory _diamondCut' instead of
    // 'Facet[] calldata _diamondCut'.
    // The code is duplicated to prevent copying calldata to memory which
    // causes an error for a two dimensional array.
    function diamondCut(
        IDiamondCut.FacetCut[] memory _diamondCut,
        address _init,
        bytes memory _calldata
    ) internal {
        DiamondStorage storage ds = diamondStorage();
        uint256 originalSelectorCount = ds.selectorCount;
        uint256 selectorCount = originalSelectorCount;
        bytes32 selectorSlot;
        // Check if last selector slot is not full
        if (selectorCount % 8 > 0) {
            // get last selectorSlot
            selectorSlot = ds.selectorSlots[selectorCount / 8];
        }
        // loop through diamond cut
        for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {
            (selectorCount, selectorSlot) = addReplaceRemoveFacetSelectors(
                selectorCount,
                selectorSlot,
                _diamondCut[facetIndex].facetAddress,
                _diamondCut[facetIndex].action,
                _diamondCut[facetIndex].functionSelectors
            );
        }
        if (selectorCount != originalSelectorCount) {
            ds.selectorCount = uint16(selectorCount);
        }
        // If last selector slot is not full
        if (selectorCount % 8 > 0) {
            ds.selectorSlots[selectorCount / 8] = selectorSlot;
        }
        emit DiamondCut(_diamondCut, _init, _calldata);
        initializeDiamondCut(_init, _calldata);
    }

    function addReplaceRemoveFacetSelectors(
        uint256 _selectorCount,
        bytes32 _selectorSlot,
        address _newFacetAddress,
        IDiamondCut.FacetCutAction _action,
        bytes4[] memory _selectors
    ) internal returns (uint256, bytes32) {
        DiamondStorage storage ds = diamondStorage();
        require(_selectors.length > 0, "LibDiamondCut: No selectors in facet to cut");        
        if (_action == IDiamondCut.FacetCutAction.Add) {
            require(_newFacetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)");
            enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Add facet has no code");
            for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
                bytes4 selector = _selectors[selectorIndex];
                bytes32 oldFacet = ds.facets[selector];                
                require(address(bytes20(oldFacet)) == address(0), "LibDiamondCut: Can't add function that already exists");
                // add facet for selector                                
                ds.facets[selector] = bytes20(_newFacetAddress) | bytes32(_selectorCount);                
                uint256 selectorInSlotPosition = (_selectorCount % 8) * 32;
                // clear selector position in slot and add selector
                _selectorSlot =
                    (_selectorSlot & ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) |
                    (bytes32(selector) >> selectorInSlotPosition);
                // if slot is full then write it to storage
                if (selectorInSlotPosition == 224) {
                    ds.selectorSlots[_selectorCount / 8] = _selectorSlot;
                    _selectorSlot = 0;
                }
                _selectorCount++;
            }
        } else if(_action == IDiamondCut.FacetCutAction.Replace) {
            require(_newFacetAddress != address(0), "LibDiamondCut: Replace facet can't be address(0)");
            enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Replace facet has no code");
            for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
                bytes4 selector = _selectors[selectorIndex];
                bytes32 oldFacet = ds.facets[selector];  
                address oldFacetAddress = address(bytes20(oldFacet));
                // only useful if immutable functions exist
                require(oldFacetAddress != address(this), "LibDiamondCut: Can't replace immutable function");
                require(oldFacetAddress != _newFacetAddress, "LibDiamondCut: Can't replace function with same function");
                require(oldFacetAddress != address(0), "LibDiamondCut: Can't replace function that doesn't exist");
                // replace old facet address
                ds.facets[selector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(_newFacetAddress);
            }
        } else if(_action == IDiamondCut.FacetCutAction.Remove) {
            require(_newFacetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)");
            uint256 selectorSlotCount = _selectorCount / 8;
            uint256 selectorInSlotIndex = (_selectorCount % 8) - 1;
            for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
                if (_selectorSlot == 0) {
                    // get last selectorSlot
                    selectorSlotCount--;
                    _selectorSlot = ds.selectorSlots[selectorSlotCount];
                    selectorInSlotIndex = 7;
                }
                bytes4 lastSelector;
                uint256 oldSelectorsSlotCount;
                uint256 oldSelectorInSlotPosition;
                // adding a block here prevents stack too deep error
                {
                    bytes4 selector = _selectors[selectorIndex];
                    bytes32 oldFacet = ds.facets[selector];
                    require(address(bytes20(oldFacet)) != address(0), "LibDiamondCut: Can't remove function that doesn't exist");
                    // only useful if immutable functions exist
                    require(address(bytes20(oldFacet)) != address(this), "LibDiamondCut: Can't remove immutable function");
                    // replace selector with last selector in ds.facets
                    // gets the last selector
                    lastSelector = bytes4(_selectorSlot << (selectorInSlotIndex * 32));
                    if (lastSelector != selector) {
                        // update last selector slot position info
                        ds.facets[lastSelector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(ds.facets[lastSelector]);
                    }
                    delete ds.facets[selector];
                    uint256 oldSelectorCount = uint16(uint256(oldFacet));
                    oldSelectorsSlotCount = oldSelectorCount / 8;
                    oldSelectorInSlotPosition = (oldSelectorCount % 8) * 32;
                }
                if (oldSelectorsSlotCount != selectorSlotCount) {
                    bytes32 oldSelectorSlot = ds.selectorSlots[oldSelectorsSlotCount];
                    // clears the selector we are deleting and puts the last selector in its place.
                    oldSelectorSlot =
                        (oldSelectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) |
                        (bytes32(lastSelector) >> oldSelectorInSlotPosition);
                    // update storage with the modified slot
                    ds.selectorSlots[oldSelectorsSlotCount] = oldSelectorSlot;
                } else {
                    // clears the selector we are deleting and puts the last selector in its place.
                    _selectorSlot =
                        (_selectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) |
                        (bytes32(lastSelector) >> oldSelectorInSlotPosition);
                }
                if (selectorInSlotIndex == 0) {
                    delete ds.selectorSlots[selectorSlotCount];
                    _selectorSlot = 0;
                }
                selectorInSlotIndex--;
            }
            _selectorCount = selectorSlotCount * 8 + selectorInSlotIndex + 1;
        } else {
            revert("LibDiamondCut: Incorrect FacetCutAction");
        }       
        return (_selectorCount, _selectorSlot);
    }

    function initializeDiamondCut(address _init, bytes memory _calldata) internal {
        if (_init == address(0)) {
            require(_calldata.length == 0, "LibDiamondCut: _init is address(0) but_calldata is not empty");
        } else {
            require(_calldata.length > 0, "LibDiamondCut: _calldata is empty but _init is not address(0)");
            if (_init != address(this)) {
                enforceHasContractCode(_init, "LibDiamondCut: _init address has no code");
            }
            (bool success, bytes memory error) = _init.delegatecall(_calldata);
            if (!success) {
                if (error.length > 0) {
                    // bubble up the error
                    revert(string(error));
                } else {
                    revert("LibDiamondCut: _init function reverted");
                }
            }
        }
    }

    function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {
        uint256 contractSize;
        assembly {
            contractSize := extcodesize(_contract)
        }
        require(contractSize > 0, _errorMessage);
    }
}
// File: Diamond/Diamond.sol


pragma solidity ^0.7.1;

/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
*
* Implementation of a diamond.
/******************************************************************************/







contract Diamond {
    function initialize(IDiamondCut.FacetCut[] memory _diamondCut, address _owner) external payable {
        require(LibDiamondInitialize.diamondInitializeStorage().initialized == false, "ALREADY_INITIALIZED");
        LibDiamondInitialize.diamondInitializeStorage().initialized = true;
        LibDiamond.diamondCut(_diamondCut, address(0), new bytes(0));
        LibDiamond.setContractOwner(_owner);

        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();

        // adding ERC165 data
        ds.supportedInterfaces[type(IERC165).interfaceId] = true;
        ds.supportedInterfaces[type(IDiamondCut).interfaceId] = true;
        ds.supportedInterfaces[type(IDiamondLoupe).interfaceId] = true;
        ds.supportedInterfaces[type(IERC173).interfaceId] = true;
    }

    // Find facet for function that is called and execute the
    // function if a facet is found and return any value.
    fallback() external payable {
        LibDiamond.DiamondStorage storage ds;
        bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION;
        assembly {
            ds.slot := position
        }
        address facet = address(bytes20(ds.facets[msg.sig]));
        require(facet != address(0), "Diamond: Function does not exist");
        assembly {
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
            returndatacopy(0, 0, returndatasize())
            switch result
                case 0 {
                    revert(0, returndatasize())
                }
                default {
                    return(0, returndatasize())
                }
        }
    }

    receive() external payable {}
}
// File: PieFactoryContract.sol


pragma solidity ^0.7.1;
pragma experimental ABIEncoderV2;






contract PieFactoryContract is Ownable {
    using SafeERC20 for IERC20;

    address[] public pies;
    mapping(address => bool) public isPie;
    address public defaultController;
    address public diamondImplementation;

    IDiamondCut.FacetCut[] public defaultCut;

    event PieCreated(
        address indexed pieAddress,
        address indexed deployer,
        uint256 indexed index
    );

    event DefaultControllerSet(address indexed controller);
    event FacetAdded(IDiamondCut.FacetCut);
    event FacetRemoved(IDiamondCut.FacetCut);

    constructor() {
        defaultController = msg.sender;
    }

    function setDefaultController(address _controller) external onlyOwner {
        defaultController = _controller;
        emit DefaultControllerSet(_controller);
    }

    function removeFacet(uint256 _index) external onlyOwner {
        require(_index < defaultCut.length, "INVALID_INDEX");
        emit FacetRemoved(defaultCut[_index]);
        defaultCut[_index] = defaultCut[defaultCut.length - 1];
        defaultCut.pop();
    }

    function addFacet(IDiamondCut.FacetCut memory _facet) external onlyOwner {
        defaultCut.push(_facet);
        emit FacetAdded(_facet);
    }

    // Diamond should be Initialized to prevent it from being selfdestructed
    function setDiamondImplementation(address _diamondImplementation) external onlyOwner {
        diamondImplementation = _diamondImplementation;
    }

    function bakePie(
        address[] memory _tokens,
        uint256[] memory _amounts,
        uint256 _initialSupply,
        string memory _symbol,
        string memory _name
    ) external {
        PProxy proxy = new PProxy();
        Diamond d = Diamond(address(proxy));

        proxy.setImplementation(diamondImplementation);

        d.initialize(defaultCut, address(this));

        pies.push(address(d));
        isPie[address(d)] = true;

        // emit DiamondCreated(address(d));
        require(_tokens.length != 0, "CANNOT_CREATE_ZERO_TOKEN_LENGTH_PIE");
        require(_tokens.length == _amounts.length, "ARRAY_LENGTH_MISMATCH");

        IExperiPie pie = IExperiPie(address(d));

        // Init erc20 facet
        pie.initialize(_initialSupply, _name, _symbol);

        // Transfer and add tokens
        for (uint256 i = 0; i < _tokens.length; i++) {
            IERC20 token = IERC20(_tokens[i]);
            token.safeTransferFrom(msg.sender, address(pie), _amounts[i]);
            pie.addToken(_tokens[i]);
        }

        // Unlock pool
        pie.setLock(1);

        // Uncap pool
        pie.setCap(uint256(-1));

        // Send minted pie to msg.sender
        pie.transfer(msg.sender, _initialSupply);
        pie.transferOwnership(defaultController);
        proxy.setProxyOwner(defaultController);

        emit PieCreated(address(d), msg.sender, pies.length - 1);
    }

    function getDefaultCut()
        external
        view
        returns (IDiamondCut.FacetCut[] memory)
    {
        return defaultCut;
    }

    function getDefaultCutCount() external view returns (uint256) {
        return defaultCut.length;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"_value","type":"address"}],"name":"addressToBytes32","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_value","type":"bytes32"}],"name":"bytes32ToAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProxyOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"readAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"readBool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newImplementation","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"setProxyOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"storageRead","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50610045604051602001610023906100dc565b604051602081830303815290604052805190602001203361004a60201b60201c565b6100fc565b6100688261005d8361006c60201b60201c565b61008f60201b60201c565b5050565b60008173ffffffffffffffffffffffffffffffffffffffff1660001b9050919050565b6000829050818155505050565b60006100a9600a836100f1565b91507f4f574e45525f534c4f54000000000000000000000000000000000000000000006000830152600a82019050919050565b60006100e78261009c565b9150819050919050565b600081905092915050565b61084b8061010b6000396000f3fe60806040526004361061008a5760003560e01c80639d84ae69116100595780639d84ae6914610177578063aaf10f42146101b4578063bb15ac8e146101df578063caaee91c1461021c578063d784d426146102455761008b565b80631ab7710d1461009557806337a440e6146100c05780635ced058e146100fd57806382c947b71461013a5761008b565b5b61009361026e565b005b3480156100a157600080fd5b506100aa6102c6565b6040516100b79190610712565b60405180910390f35b3480156100cc57600080fd5b506100e760048036038101906100e291906105ac565b6102fa565b6040516100f49190610748565b60405180910390f35b34801561010957600080fd5b50610124600480360381019061011f91906105ac565b61030a565b6040516101319190610712565b60405180910390f35b34801561014657600080fd5b50610161600480360381019061015c9190610583565b610317565b60405161016e9190610748565b60405180910390f35b34801561018357600080fd5b5061019e600480360381019061019991906105ac565b61033a565b6040516101ab9190610712565b60405180910390f35b3480156101c057600080fd5b506101c9610354565b6040516101d69190610712565b60405180910390f35b3480156101eb57600080fd5b50610206600480360381019061020191906105ac565b610388565b604051610213919061072d565b60405180910390f35b34801561022857600080fd5b50610243600480360381019061023e9190610583565b6103a0565b005b34801561025157600080fd5b5061026c60048036038101906102679190610583565b61046b565b005b600061029d604051602001610282906106fd565b6040516020818303038152906040528051906020012061033a565b905060405136600082376000803683855af43d806000843e81600081146102c2578184f35b8184fd5b60006102f56040516020016102da906106e8565b6040516020818303038152906040528051906020012061033a565b905090565b6000808254905080915050919050565b60008160001c9050919050565b60008173ffffffffffffffffffffffffffffffffffffffff1660001b9050919050565b600061034d610348836102fa565b61030a565b9050919050565b6000610383604051602001610368906106fd565b6040516020818303038152906040528051906020012061033a565b905090565b6000600160001b610398836102fa565b149050919050565b6103cd6040516020016103b2906106e8565b6040516020818303038152906040528051906020012061033a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461043a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043190610763565b60405180910390fd5b61046860405160200161044c906106e8565b6040516020818303038152906040528051906020012082610536565b50565b61049860405160200161047d906106e8565b6040516020818303038152906040528051906020012061033a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610505576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104fc90610763565b60405180910390fd5b610533604051602001610517906106fd565b6040516020818303038152906040528051906020012082610536565b50565b6105488261054383610317565b61054c565b5050565b6000829050818155505050565b600081359050610568816107e7565b92915050565b60008135905061057d816107fe565b92915050565b60006020828403121561059557600080fd5b60006105a384828501610559565b91505092915050565b6000602082840312156105be57600080fd5b60006105cc8482850161056e565b91505092915050565b6105de8161079f565b82525050565b6105ed816107b1565b82525050565b6105fc816107bd565b82525050565b600061060f600a83610794565b91507f4f574e45525f534c4f54000000000000000000000000000000000000000000006000830152600a82019050919050565b600061064f602b83610783565b91507f5050726f78792e6f6e6c7950726f78794f776e65723a206d73672073656e646560008301527f72206e6f74206f776e65720000000000000000000000000000000000000000006020830152604082019050919050565b60006106b5601383610794565b91507f494d504c454d454e544154494f4e5f534c4f54000000000000000000000000006000830152601382019050919050565b60006106f382610602565b9150819050919050565b6000610708826106a8565b9150819050919050565b600060208201905061072760008301846105d5565b92915050565b600060208201905061074260008301846105e4565b92915050565b600060208201905061075d60008301846105f3565b92915050565b6000602082019050818103600083015261077c81610642565b9050919050565b600082825260208201905092915050565b600081905092915050565b60006107aa826107c7565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6107f08161079f565b81146107fb57600080fd5b50565b610807816107bd565b811461081257600080fd5b5056fea2646970667358221220810edba9763a45c8204f37a92a980125557b939dac5d4fc9fe892fa42ca7de3764736f6c63430007010033

Deployed ByteCode Sourcemap

16647:1583:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17669:18;:16;:18::i;:::-;16647:1583;17106:103;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;15751:248;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16321:130;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16459:121;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;15490:125;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;17341:117;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;15134:124;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;17217:116;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;17466:147;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;17703:522;17759:20;17782:32;16738:39;;;;;;;:::i;:::-;;;;;;;;;;;;;16728:50;;;;;;17782:11;:32::i;:::-;17759:55;;17866:4;17860:11;17906:14;17903:1;17898:3;17885:36;18007:1;18004;17988:14;17983:3;17969:12;17962:5;17949:60;18035:16;18088:4;18085:1;18080:3;18065:28;18116:6;18141:1;18136:28;;;;18200:4;18195:3;18188:17;18136:28;18157:4;18152:3;18145:17;17106:103;17152:7;17178:23;16825:30;;;;;;;:::i;:::-;;;;;;;;;;;;;16815:41;;;;;;17178:11;:23::i;:::-;17171:30;;17106:103;:::o;15751:248::-;15806:7;15826:13;15953:4;15947:11;15938:20;;15986:5;15979:12;;;15751:248;;;:::o;16321:130::-;16383:7;16434:6;16426:15;;16403:40;;16321:130;;;:::o;16459:121::-;16521:7;16564:6;16556:15;;16548:24;;16541:31;;16459:121;;;:::o;15490:125::-;15545:7;15572:35;15589:17;15601:4;15589:11;:17::i;:::-;15572:16;:35::i;:::-;15565:42;;15490:125;;;:::o;17341:117::-;17391:7;17418:32;16738:39;;;;;;;:::i;:::-;;;;;;;;;;;;;16728:50;;;;;;17418:11;:32::i;:::-;17411:39;;17341:117;:::o;15134:124::-;15186:4;15247:1;15231:19;;15210:17;15222:4;15210:11;:17::i;:::-;:40;15203:47;;15134:124;;;:::o;17217:116::-;16924:23;16825:30;;;;;;;:::i;:::-;;;;;;;;;;;;;16815:41;;;;;;16924:11;:23::i;:::-;16910:37;;:10;:37;;;16902:93;;;;;;;;;;;;:::i;:::-;;;;;;;;;17292:33:::1;16825:30;;;;;;;:::i;:::-;;;;;;;;;;;;;16815:41;;;;;;17315:9;17292:10;:33::i;:::-;17217:116:::0;:::o;17466:147::-;16924:23;16825:30;;;;;;;:::i;:::-;;;;;;;;;;;;;16815:41;;;;;;16924:11;:23::i;:::-;16910:37;;:10;:37;;;16902:93;;;;;;;;;;;;:::i;:::-;;;;;;;;;17554:51:::1;16738:39;;;;;;;:::i;:::-;;;;;;;;;;;;;16728:50;;;;;;17586:18;17554:10;:51::i;:::-;17466:147:::0;:::o;15623:120::-;15693:42;15704:4;15710:24;15727:6;15710:16;:24::i;:::-;15693:10;:42::i;:::-;15623:120;;:::o;16007:306::-;16123:29;16155:4;16123:36;;16288:6;16265:21;16258:37;16243:63;;;:::o;5:130:-1:-;;85:6;72:20;63:29;;97:33;124:5;97:33;:::i;:::-;57:78;;;;:::o;142:130::-;;222:6;209:20;200:29;;234:33;261:5;234:33;:::i;:::-;194:78;;;;:::o;279:241::-;;383:2;371:9;362:7;358:23;354:32;351:2;;;399:1;396;389:12;351:2;434:1;451:53;496:7;487:6;476:9;472:22;451:53;:::i;:::-;441:63;;413:97;345:175;;;;:::o;527:241::-;;631:2;619:9;610:7;606:23;602:32;599:2;;;647:1;644;637:12;599:2;682:1;699:53;744:7;735:6;724:9;720:22;699:53;:::i;:::-;689:63;;661:97;593:175;;;;:::o;775:113::-;858:24;876:5;858:24;:::i;:::-;853:3;846:37;840:48;;:::o;895:104::-;972:21;987:5;972:21;:::i;:::-;967:3;960:34;954:45;;:::o;1006:113::-;1089:24;1107:5;1089:24;:::i;:::-;1084:3;1077:37;1071:48;;:::o;1127:346::-;;1305:85;1387:2;1382:3;1305:85;:::i;:::-;1298:92;;1423:12;1419:1;1414:3;1410:11;1403:33;1464:2;1459:3;1455:12;1448:19;;1291:182;;;:::o;1482:380::-;;1642:67;1706:2;1701:3;1642:67;:::i;:::-;1635:74;;1742:34;1738:1;1733:3;1729:11;1722:55;1811:13;1806:2;1801:3;1797:12;1790:35;1853:2;1848:3;1844:12;1837:19;;1628:234;;;:::o;1871:355::-;;2049:85;2131:2;2126:3;2049:85;:::i;:::-;2042:92;;2167:21;2163:1;2158:3;2154:11;2147:42;2217:2;2212:3;2208:12;2201:19;;2035:191;;;:::o;2234:381::-;;2442:148;2586:3;2442:148;:::i;:::-;2435:155;;2607:3;2600:10;;2423:192;;;:::o;2622:381::-;;2830:148;2974:3;2830:148;:::i;:::-;2823:155;;2995:3;2988:10;;2811:192;;;:::o;3010:222::-;;3137:2;3126:9;3122:18;3114:26;;3151:71;3219:1;3208:9;3204:17;3195:6;3151:71;:::i;:::-;3108:124;;;;:::o;3239:210::-;;3360:2;3349:9;3345:18;3337:26;;3374:65;3436:1;3425:9;3421:17;3412:6;3374:65;:::i;:::-;3331:118;;;;:::o;3456:222::-;;3583:2;3572:9;3568:18;3560:26;;3597:71;3665:1;3654:9;3650:17;3641:6;3597:71;:::i;:::-;3554:124;;;;:::o;3685:416::-;;3885:2;3874:9;3870:18;3862:26;;3935:9;3929:4;3925:20;3921:1;3910:9;3906:17;3899:47;3960:131;4086:4;3960:131;:::i;:::-;3952:139;;3856:245;;;:::o;4109:163::-;;4224:6;4219:3;4212:19;4261:4;4256:3;4252:14;4237:29;;4205:67;;;;:::o;4281:145::-;;4417:3;4402:18;;4395:31;;;;:::o;4434:91::-;;4496:24;4514:5;4496:24;:::i;:::-;4485:35;;4479:46;;;:::o;4532:85::-;;4605:5;4598:13;4591:21;4580:32;;4574:43;;;:::o;4624:72::-;;4686:5;4675:16;;4669:27;;;:::o;4703:121::-;;4776:42;4769:5;4765:54;4754:65;;4748:76;;;:::o;4831:117::-;4900:24;4918:5;4900:24;:::i;:::-;4893:5;4890:35;4880:2;;4939:1;4936;4929:12;4880:2;4874:74;:::o;4955:117::-;5024:24;5042:5;5024:24;:::i;:::-;5017:5;5014:35;5004:2;;5063:1;5060;5053:12;5004:2;4998:74;:::o

Swarm Source

ipfs://810edba9763a45c8204f37a92a980125557b939dac5d4fc9fe892fa42ca7de37
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.