Address Details
contract

0xe55C3eb4a04F93c3302A5d8058348157561BF5ca

Creator
0x4887c4–fe025c at 0xc27877–d00d15
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
337 Transactions
Transfers
0 Transfers
Gas Used
280,466,239
Last Balance Update
10468601
This contract has been partially verified via Sourcify. View contract in Sourcify repository
Contract name:
ImpactMarket




Optimization enabled
true
Compiler version
v0.6.5+commit.f956cc89




Optimization runs
200
EVM Version
istanbul




Verified at
2021-12-16T19:15:04.634633Z

/home/obernardovieira/Documentos/GitHub/impact-market/smart-contracts/contracts/ImpactMarket.sol

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.6.0;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "./interfaces/ICommunity.sol";
import "./interfaces/ICommunityFactory.sol";
import "./Community.sol";

/**
 * @notice Welcome to ImpactMarket, the main contract. This is an
 * administrative (for now) contract where the admins have control
 * over the list of communities. Being only able to add and
 * remove communities
 */
contract ImpactMarket is AccessControl {
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");

    mapping(bytes32 => address[]) public pendingValidations;
    mapping(address => bool) public communities;
    address public cUSDAddress;
    address public communityFactory;
    uint256 public signaturesThreshold;

    event CommunityAdded(
        address indexed _communityAddress,
        address indexed _firstManager,
        uint256 _claimAmount,
        uint256 _maxClaim,
        uint256 _baseInterval,
        uint256 _incrementInterval
    );
    event CommunityRemoved(address indexed _communityAddress);
    event CommunityMigrated(
        address indexed _firstManager,
        address indexed _communityAddress,
        address indexed _previousCommunityAddress
    );
    event CommunityFactoryChanged(address indexed _newCommunityFactory);

    /**
     * @dev It sets the first admin, which later can add others
     * and add/remove communities.
     */
    constructor(address _cUSDAddress, address[] memory _signatures) public {
        require(_signatures.length > 0, "NOT_VALID");
        _setupRole(ADMIN_ROLE, address(_signatures[0]));
        _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE);
        cUSDAddress = _cUSDAddress;
        if (_signatures.length > 2) {
            signaturesThreshold = _signatures.length - 1;
        } else {
            signaturesThreshold = _signatures.length;
        }
        for (uint8 u = 1; u < _signatures.length; u += 1) {
            _setupRole(ADMIN_ROLE, address(_signatures[u]));
        }
    }

    modifier onlyAdmin() {
        require(hasRole(ADMIN_ROLE, msg.sender), "NOT_ADMIN");
        _;
    }

    modifier validateRequest(bytes32 _type, bytes memory _packedParams) {
        bytes32 requestIdentifier = keccak256(
            abi.encodePacked(_type, _packedParams)
        );
        address[] memory validations = pendingValidations[requestIdentifier];
        for (uint8 u = 0; u < validations.length; u += 1) {
            require(validations[u] != msg.sender, "SIGNED");
        }
        pendingValidations[requestIdentifier].push(msg.sender);
        uint256 totalValidations = pendingValidations[requestIdentifier].length;
        if (totalValidations == signaturesThreshold) {
            delete pendingValidations[requestIdentifier];
            _;
        }
    }

    /**
     * @dev Add a new community. Can be used only by an admin.
     * For further information regarding each parameter, see
     * *Community* smart contract constructor.
     */
    function addCommunity(
        address _firstManager,
        uint256 _claimAmount,
        uint256 _maxClaim,
        uint256 _baseInterval,
        uint256 _incrementInterval
    )
        external
        onlyAdmin
        validateRequest(
            "addCommunity",
            abi.encodePacked(
                _firstManager,
                _claimAmount,
                _maxClaim,
                _baseInterval,
                _incrementInterval
            )
        )
    {
        address community = ICommunityFactory(communityFactory).deployCommunity(
            _firstManager,
            _claimAmount,
            _maxClaim,
            _baseInterval,
            _incrementInterval,
            address(0)
        );
        require(community != address(0), "NOT_VALID");
        communities[community] = true;
        emit CommunityAdded(
            community,
            _firstManager,
            _claimAmount,
            _maxClaim,
            _baseInterval,
            _incrementInterval
        );
    }

    /**
     * @dev Migrate community by deploying a new contract. Can be used only by an admin.
     * For further information regarding each parameter, see
     * *Community* smart contract constructor.
     */
    function migrateCommunity(
        address _firstManager,
        address _previousCommunityAddress,
        address _newCommunityFactory
    )
        external
        onlyAdmin
        validateRequest(
            "migrateCommunity",
            abi.encodePacked(_firstManager, _previousCommunityAddress)
        )
    {
        communities[_previousCommunityAddress] = false;
        require(address(_previousCommunityAddress) != address(0), "NOT_VALID");
        ICommunity previousCommunity = ICommunity(_previousCommunityAddress);
        address community = ICommunityFactory(_newCommunityFactory).deployCommunity(
            _firstManager,
            previousCommunity.claimAmount(),
            previousCommunity.maxClaim(),
            previousCommunity.baseInterval(),
            previousCommunity.incrementInterval(),
            _previousCommunityAddress
        );
        require(community != address(0), "NOT_VALID");
        previousCommunity.migrateFunds(community, _firstManager);
        communities[community] = true;
        emit CommunityMigrated(
            _firstManager,
            community,
            _previousCommunityAddress
        );
    }

    /**
     * @dev Remove an existing community. Can be used only by an admin.
     */
    function removeCommunity(address _community)
        external
        onlyAdmin
        validateRequest("removeCommunity", abi.encodePacked(_community))
    {
        communities[_community] = false;
        emit CommunityRemoved(_community);
    }

    /**
     * @dev Set the community factory address, if the contract is valid.
     */
    function setCommunityFactory(address _communityFactory)
        external
        onlyAdmin
        validateRequest(
            "setCommunityFactory",
            abi.encodePacked(_communityFactory)
        )
    {
        ICommunityFactory factory = ICommunityFactory(_communityFactory);
        require(factory.impactMarketAddress() == address(this), "NOT_ALLOWED");
        communityFactory = _communityFactory;
        emit CommunityFactoryChanged(_communityFactory);
    }

    /**
     * @dev Init community factory, used only at deploy time.
     */
    function initCommunityFactory(address _communityFactory)
        external
    {
        require(communityFactory == address(0), "");
        communityFactory = _communityFactory;
        emit CommunityFactoryChanged(_communityFactory);
    }

    /**
     * @dev Not allowed.
     */
    function grantRole(bytes32, address) public override {
        revert("NOT_ALLOWED");
    }

    /**
     * @dev Not allowed.
     */
    function revokeRole(bytes32, address) public override {
        revert("NOT_ALLOWED");
    }

    /**
     * @dev Not allowed.
     */
    function renounceRole(bytes32, address) public override {
        revert("NOT_ALLOWED");
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_cUSDAddress","internalType":"address"},{"type":"address[]","name":"_signatures","internalType":"address[]"}]},{"type":"event","name":"CommunityAdded","inputs":[{"type":"address","name":"_communityAddress","internalType":"address","indexed":true},{"type":"address","name":"_firstManager","internalType":"address","indexed":true},{"type":"uint256","name":"_claimAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"_maxClaim","internalType":"uint256","indexed":false},{"type":"uint256","name":"_baseInterval","internalType":"uint256","indexed":false},{"type":"uint256","name":"_incrementInterval","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CommunityFactoryChanged","inputs":[{"type":"address","name":"_newCommunityFactory","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"CommunityMigrated","inputs":[{"type":"address","name":"_firstManager","internalType":"address","indexed":true},{"type":"address","name":"_communityAddress","internalType":"address","indexed":true},{"type":"address","name":"_previousCommunityAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"CommunityRemoved","inputs":[{"type":"address","name":"_communityAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addCommunity","inputs":[{"type":"address","name":"_firstManager","internalType":"address"},{"type":"uint256","name":"_claimAmount","internalType":"uint256"},{"type":"uint256","name":"_maxClaim","internalType":"uint256"},{"type":"uint256","name":"_baseInterval","internalType":"uint256"},{"type":"uint256","name":"_incrementInterval","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"cUSDAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"communities","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"communityFactory","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getRoleMember","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRoleMemberCount","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initCommunityFactory","inputs":[{"type":"address","name":"_communityFactory","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"migrateCommunity","inputs":[{"type":"address","name":"_firstManager","internalType":"address"},{"type":"address","name":"_previousCommunityAddress","internalType":"address"},{"type":"address","name":"_newCommunityFactory","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pendingValidations","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeCommunity","inputs":[{"type":"address","name":"_community","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setCommunityFactory","inputs":[{"type":"address","name":"_communityFactory","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"signaturesThreshold","inputs":[]}]
              

Contract Creation Code

Verify & Publish
0x60806040523480156200001157600080fd5b5060405162001af038038062001af0833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82518660208202830111640100000000821117156200009357600080fd5b82525081516020918201928201910280838360005b83811015620000c2578181015183820152602001620000a8565b50505050905001604052505050600081511162000112576040805162461bcd60e51b81526020600482015260096024820152681393d517d59053125160ba1b604482015290519081900360640190fd5b6200015b60405180806941444d494e5f524f4c4560b01b815250600a0190506040518091039020826000815181106200014757fe5b60200260200101516200023460201b60201c565b604080516941444d494e5f524f4c4560b01b808252825191829003600a90810183209183529251918290039092019020620001a091906001600160e01b036200024d16565b600380546001600160a01b0319166001600160a01b038416179055805160021015620001d557805160001901600555620001db565b80516005555b60015b81518160ff1610156200022b576200022260405180806941444d494e5f524f4c4560b01b815250600a0190506040518091039020838360ff16815181106200014757fe5b600101620001de565b50505062000381565b6200024982826001600160e01b036200026216565b5050565b60009182526020829052604090912060020155565b60008281526020818152604090912062000287918390620016ad620002e4821b17901c565b156200024957620002a06001600160e01b036200030d16565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000304836001600160a01b0384166001600160e01b036200031116565b90505b92915050565b3390565b60006200032883836001600160e01b036200036916565b620003605750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000307565b50600062000307565b60009081526001919091016020526040902054151590565b61175f80620003916000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80638226dab0116100ad578063a217fddf11610071578063a217fddf14610325578063ca15c8731461032d578063cc579ec41461034a578063d547741f14610195578063fac8a6101461037057610121565b80638226dab0146102555780638774be9b146102785780639010d07c146102b057806391d14854146102d357806392634540146102ff57610121565b806339ce73c7116100f457806339ce73c7146101c15780633ff574b6146101c95780636e6930d2146101ed57806375b238fc146102135780637f2813d21461021b57610121565b80630b4afb1b14610126578063248a9ca3146101665780632f2ff15d1461019557806336568abe14610195575b600080fd5b610164600480360360a081101561013c57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060800135610378565b005b6101836004803603602081101561017c57600080fd5b503561076d565b60408051918252519081900360200190f35b610164600480360360408110156101ab57600080fd5b50803590602001356001600160a01b0316610782565b6101836107bd565b6101d16107c3565b604080516001600160a01b039092168252519081900360200190f35b6101646004803603602081101561020357600080fd5b50356001600160a01b03166107d2565b610183610b52565b6102416004803603602081101561023157600080fd5b50356001600160a01b0316610b74565b604080519115158252519081900360200190f35b6101d16004803603604081101561026b57600080fd5b5080359060200135610b89565b6101646004803603606081101561028e57600080fd5b506001600160a01b038135811691602081013582169160409091013516610bbe565b6101d1600480360360408110156102c657600080fd5b5080359060200135611211565b610241600480360360408110156102e957600080fd5b50803590602001356001600160a01b0316611238565b6101646004803603602081101561031557600080fd5b50356001600160a01b0316611256565b610183611512565b6101836004803603602081101561034357600080fd5b5035611517565b6101646004803603602081101561036057600080fd5b50356001600160a01b031661152e565b6101d16115b0565b604080516941444d494e5f524f4c4560b01b8152905190819003600a0190206103a19033611238565b6103de576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa0a226a4a760b91b604482015290519081900360640190fd5b6b616464436f6d6d756e69747960a01b858585858560405160200180866001600160a01b03166001600160a01b031660601b815260140185815260200184815260200183815260200182815260200195505050505050604051602081830303815290604052600082826040516020018083815260200182805190602001908083835b6020831061047f5780518252601f199092019160209182019101610460565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405280519060200120905060606001600083815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561052657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610508575b50939450600093505050505b81518160ff1610156105ac57336001600160a01b0316828260ff168151811061055757fe5b60200260200101516001600160a01b031614156105a4576040805162461bcd60e51b815260206004820152600660248201526514d251d3915160d21b604482015290519081900360640190fd5b600101610532565b50600082815260016020818152604083208054928301815580845290832090910180546001600160a01b0319163317905590839052546005548114156107615760008381526001602052604081206106039161166b565b6004805460408051638523f31160e01b81526001600160a01b038e811694820194909452602481018d9052604481018c9052606481018b9052608481018a9052600060a482018190529151919390921691638523f3119160c480830192602092919082900301818787803b15801561067a57600080fd5b505af115801561068e573d6000803e3d6000fd5b505050506040513d60208110156106a457600080fd5b505190506001600160a01b0381166106ef576040805162461bcd60e51b81526020600482015260096024820152681393d517d59053125160ba1b604482015290519081900360640190fd5b6001600160a01b03808216600081815260026020908152604091829020805460ff1916600117905581518e81529081018d90528082018c9052606081018b90529051928e16927f5864130135b8d46c4808bc474964778f56ef5f98402be58df45a515edd08d3049181900360800190a3505b50505050505050505050565b60009081526020819052604090206002015490565b6040805162461bcd60e51b815260206004820152600b60248201526a1393d517d0531313d5d15160aa1b604482015290519081900360640190fd5b60055481565b6003546001600160a01b031681565b604080516941444d494e5f524f4c4560b01b8152905190819003600a0190206107fb9033611238565b610838576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa0a226a4a760b91b604482015290519081900360640190fd5b72736574436f6d6d756e697479466163746f727960681b8160405160200180826001600160a01b03166001600160a01b031660601b8152601401915050604051602081830303815290604052600082826040516020018083815260200182805190602001908083835b602083106108c05780518252601f1990920191602091820191016108a1565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405280519060200120905060606001600083815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561096757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610949575b50939450600093505050505b81518160ff1610156109ed57336001600160a01b0316828260ff168151811061099857fe5b60200260200101516001600160a01b031614156109e5576040805162461bcd60e51b815260206004820152600660248201526514d251d3915160d21b604482015290519081900360640190fd5b600101610973565b50600082815260016020818152604083208054928301815580845290832090910180546001600160a01b031916331790559083905254600554811415610b4a576000838152600160205260408120610a449161166b565b6000869050306001600160a01b0316816001600160a01b031663c041fdc56040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8c57600080fd5b505afa158015610aa0573d6000803e3d6000fd5b505050506040513d6020811015610ab657600080fd5b50516001600160a01b031614610b01576040805162461bcd60e51b815260206004820152600b60248201526a1393d517d0531313d5d15160aa1b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0389169081179091556040517fd8961aaf9fb4046ee3c9088247c5ada34a3d089c61b6accad9e03b18b7376db490600090a2505b505050505050565b604080516941444d494e5f524f4c4560b01b8152905190819003600a01902081565b60026020526000908152604090205460ff1681565b60016020528160005260406000208181548110610ba257fe5b6000918252602090912001546001600160a01b03169150829050565b604080516941444d494e5f524f4c4560b01b8152905190819003600a019020610be79033611238565b610c24576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa0a226a4a760b91b604482015290519081900360640190fd5b6f6d696772617465436f6d6d756e69747960801b838360405160200180836001600160a01b03166001600160a01b031660601b8152601401826001600160a01b03166001600160a01b031660601b815260140192505050604051602081830303815290604052600082826040516020018083815260200182805190602001908083835b60208310610cc65780518252601f199092019160209182019101610ca7565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050606060016000838152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015610d6d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610d4f575b50939450600093505050505b81518160ff161015610df357336001600160a01b0316828260ff1681518110610d9e57fe5b60200260200101516001600160a01b03161415610deb576040805162461bcd60e51b815260206004820152600660248201526514d251d3915160d21b604482015290519081900360640190fd5b600101610d79565b50600082815260016020818152604083208054928301815580845290832090910180546001600160a01b031916331790559083905254600554811415611207576000838152600160205260408120610e4a9161166b565b6001600160a01b0387166000818152600260205260409020805460ff19169055610ea7576040805162461bcd60e51b81526020600482015260096024820152681393d517d59053125160ba1b604482015290519081900360640190fd5b60008790506000876001600160a01b0316638523f3118b846001600160a01b031663830953ab6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ef757600080fd5b505afa158015610f0b573d6000803e3d6000fd5b505050506040513d6020811015610f2157600080fd5b50516040805163d4938db360e01b815290516001600160a01b0388169163d4938db3916004808301926020929190829003018186803b158015610f6357600080fd5b505afa158015610f77573d6000803e3d6000fd5b505050506040513d6020811015610f8d57600080fd5b505160408051630e5b7c5360e01b815290516001600160a01b03891691630e5b7c53916004808301926020929190829003018186803b158015610fcf57600080fd5b505afa158015610fe3573d6000803e3d6000fd5b505050506040513d6020811015610ff957600080fd5b50516040805163597be18b60e01b815290516001600160a01b038a169163597be18b916004808301926020929190829003018186803b15801561103b57600080fd5b505afa15801561104f573d6000803e3d6000fd5b505050506040513d602081101561106557600080fd5b5051604080516001600160e01b031960e089901b1681526001600160a01b0396871660048201526024810195909552604485019390935260648401919091526084830152918d1660a4820152905160c48083019260209291908290030181600087803b1580156110d457600080fd5b505af11580156110e8573d6000803e3d6000fd5b505050506040513d60208110156110fe57600080fd5b505190506001600160a01b038116611149576040805162461bcd60e51b81526020600482015260096024820152681393d517d59053125160ba1b604482015290519081900360640190fd5b60408051630ff4abc760e11b81526001600160a01b0383811660048301528c81166024830152915191841691631fe9578e9160448082019260009290919082900301818387803b15801561119c57600080fd5b505af11580156111b0573d6000803e3d6000fd5b505050506001600160a01b03818116600081815260026020526040808220805460ff19166001179055518c8416938e16917f98c0ae41ed9dcfef204d20409e01d4051eee4da4276aa4b5fa1cb3cf01403d6891a450505b5050505050505050565b600082815260208190526040812061122f908363ffffffff6115bf16565b90505b92915050565b600082815260208190526040812061122f908363ffffffff6115cb16565b604080516941444d494e5f524f4c4560b01b8152905190819003600a01902061127f9033611238565b6112bc576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa0a226a4a760b91b604482015290519081900360640190fd5b6e72656d6f7665436f6d6d756e69747960881b8160405160200180826001600160a01b03166001600160a01b031660601b8152601401915050604051602081830303815290604052600082826040516020018083815260200182805190602001908083835b602083106113405780518252601f199092019160209182019101611321565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040528051906020012090506060600160008381526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156113e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116113c9575b50939450600093505050505b81518160ff16101561146d57336001600160a01b0316828260ff168151811061141857fe5b60200260200101516001600160a01b03161415611465576040805162461bcd60e51b815260206004820152600660248201526514d251d3915160d21b604482015290519081900360640190fd5b6001016113f3565b50600082815260016020818152604083208054928301815580845290832090910180546001600160a01b031916331790559083905254600554811415610b4a5760008381526001602052604081206114c49161166b565b6001600160a01b038616600081815260026020526040808220805460ff19169055517fa285b77d62d36ec6881b2cbc019c53874eb061798176f3577f2beab0848d16c69190a2505050505050565b600081565b6000818152602081905260408120611232906115e0565b6004546001600160a01b031615611566576040805162461bcd60e51b8152602060048201526000602482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383169081179091556040517fd8961aaf9fb4046ee3c9088247c5ada34a3d089c61b6accad9e03b18b7376db490600090a250565b6004546001600160a01b031681565b600061122f83836115eb565b600061122f836001600160a01b03841661164f565b600061123282611667565b8154600090821061162d5760405162461bcd60e51b81526004018080602001828103825260228152602001806117086022913960400191505060405180910390fd5b82600001828154811061163c57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b5080546000825590600052602060002090810190611689919061168c565b50565b6116aa91905b808211156116a65760008155600101611692565b5090565b90565b600061122f836001600160a01b03841660006116c9838361164f565b6116ff57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611232565b50600061123256fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473a2646970667358221220ce6bac2991dc5a4a3ab426986f130211a4b38d1d28a2654ec8e5c17296b6c66864736f6c63430006050033000000000000000000000000765de816845861e75a25fca122bb6898b8b1282a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000003000000000000000000000000e4d2d3468605ccefa8810eced765845d9d6426c60000000000000000000000003a84aa862b9a4d3286d5b1dc173af8971a132160000000000000000000000000d9ca091af9a1716249dfbfd01aa2ed47d47ea5c3

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101215760003560e01c80638226dab0116100ad578063a217fddf11610071578063a217fddf14610325578063ca15c8731461032d578063cc579ec41461034a578063d547741f14610195578063fac8a6101461037057610121565b80638226dab0146102555780638774be9b146102785780639010d07c146102b057806391d14854146102d357806392634540146102ff57610121565b806339ce73c7116100f457806339ce73c7146101c15780633ff574b6146101c95780636e6930d2146101ed57806375b238fc146102135780637f2813d21461021b57610121565b80630b4afb1b14610126578063248a9ca3146101665780632f2ff15d1461019557806336568abe14610195575b600080fd5b610164600480360360a081101561013c57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060800135610378565b005b6101836004803603602081101561017c57600080fd5b503561076d565b60408051918252519081900360200190f35b610164600480360360408110156101ab57600080fd5b50803590602001356001600160a01b0316610782565b6101836107bd565b6101d16107c3565b604080516001600160a01b039092168252519081900360200190f35b6101646004803603602081101561020357600080fd5b50356001600160a01b03166107d2565b610183610b52565b6102416004803603602081101561023157600080fd5b50356001600160a01b0316610b74565b604080519115158252519081900360200190f35b6101d16004803603604081101561026b57600080fd5b5080359060200135610b89565b6101646004803603606081101561028e57600080fd5b506001600160a01b038135811691602081013582169160409091013516610bbe565b6101d1600480360360408110156102c657600080fd5b5080359060200135611211565b610241600480360360408110156102e957600080fd5b50803590602001356001600160a01b0316611238565b6101646004803603602081101561031557600080fd5b50356001600160a01b0316611256565b610183611512565b6101836004803603602081101561034357600080fd5b5035611517565b6101646004803603602081101561036057600080fd5b50356001600160a01b031661152e565b6101d16115b0565b604080516941444d494e5f524f4c4560b01b8152905190819003600a0190206103a19033611238565b6103de576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa0a226a4a760b91b604482015290519081900360640190fd5b6b616464436f6d6d756e69747960a01b858585858560405160200180866001600160a01b03166001600160a01b031660601b815260140185815260200184815260200183815260200182815260200195505050505050604051602081830303815290604052600082826040516020018083815260200182805190602001908083835b6020831061047f5780518252601f199092019160209182019101610460565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405280519060200120905060606001600083815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561052657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610508575b50939450600093505050505b81518160ff1610156105ac57336001600160a01b0316828260ff168151811061055757fe5b60200260200101516001600160a01b031614156105a4576040805162461bcd60e51b815260206004820152600660248201526514d251d3915160d21b604482015290519081900360640190fd5b600101610532565b50600082815260016020818152604083208054928301815580845290832090910180546001600160a01b0319163317905590839052546005548114156107615760008381526001602052604081206106039161166b565b6004805460408051638523f31160e01b81526001600160a01b038e811694820194909452602481018d9052604481018c9052606481018b9052608481018a9052600060a482018190529151919390921691638523f3119160c480830192602092919082900301818787803b15801561067a57600080fd5b505af115801561068e573d6000803e3d6000fd5b505050506040513d60208110156106a457600080fd5b505190506001600160a01b0381166106ef576040805162461bcd60e51b81526020600482015260096024820152681393d517d59053125160ba1b604482015290519081900360640190fd5b6001600160a01b03808216600081815260026020908152604091829020805460ff1916600117905581518e81529081018d90528082018c9052606081018b90529051928e16927f5864130135b8d46c4808bc474964778f56ef5f98402be58df45a515edd08d3049181900360800190a3505b50505050505050505050565b60009081526020819052604090206002015490565b6040805162461bcd60e51b815260206004820152600b60248201526a1393d517d0531313d5d15160aa1b604482015290519081900360640190fd5b60055481565b6003546001600160a01b031681565b604080516941444d494e5f524f4c4560b01b8152905190819003600a0190206107fb9033611238565b610838576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa0a226a4a760b91b604482015290519081900360640190fd5b72736574436f6d6d756e697479466163746f727960681b8160405160200180826001600160a01b03166001600160a01b031660601b8152601401915050604051602081830303815290604052600082826040516020018083815260200182805190602001908083835b602083106108c05780518252601f1990920191602091820191016108a1565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405280519060200120905060606001600083815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561096757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610949575b50939450600093505050505b81518160ff1610156109ed57336001600160a01b0316828260ff168151811061099857fe5b60200260200101516001600160a01b031614156109e5576040805162461bcd60e51b815260206004820152600660248201526514d251d3915160d21b604482015290519081900360640190fd5b600101610973565b50600082815260016020818152604083208054928301815580845290832090910180546001600160a01b031916331790559083905254600554811415610b4a576000838152600160205260408120610a449161166b565b6000869050306001600160a01b0316816001600160a01b031663c041fdc56040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8c57600080fd5b505afa158015610aa0573d6000803e3d6000fd5b505050506040513d6020811015610ab657600080fd5b50516001600160a01b031614610b01576040805162461bcd60e51b815260206004820152600b60248201526a1393d517d0531313d5d15160aa1b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0389169081179091556040517fd8961aaf9fb4046ee3c9088247c5ada34a3d089c61b6accad9e03b18b7376db490600090a2505b505050505050565b604080516941444d494e5f524f4c4560b01b8152905190819003600a01902081565b60026020526000908152604090205460ff1681565b60016020528160005260406000208181548110610ba257fe5b6000918252602090912001546001600160a01b03169150829050565b604080516941444d494e5f524f4c4560b01b8152905190819003600a019020610be79033611238565b610c24576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa0a226a4a760b91b604482015290519081900360640190fd5b6f6d696772617465436f6d6d756e69747960801b838360405160200180836001600160a01b03166001600160a01b031660601b8152601401826001600160a01b03166001600160a01b031660601b815260140192505050604051602081830303815290604052600082826040516020018083815260200182805190602001908083835b60208310610cc65780518252601f199092019160209182019101610ca7565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050606060016000838152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015610d6d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610d4f575b50939450600093505050505b81518160ff161015610df357336001600160a01b0316828260ff1681518110610d9e57fe5b60200260200101516001600160a01b03161415610deb576040805162461bcd60e51b815260206004820152600660248201526514d251d3915160d21b604482015290519081900360640190fd5b600101610d79565b50600082815260016020818152604083208054928301815580845290832090910180546001600160a01b031916331790559083905254600554811415611207576000838152600160205260408120610e4a9161166b565b6001600160a01b0387166000818152600260205260409020805460ff19169055610ea7576040805162461bcd60e51b81526020600482015260096024820152681393d517d59053125160ba1b604482015290519081900360640190fd5b60008790506000876001600160a01b0316638523f3118b846001600160a01b031663830953ab6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ef757600080fd5b505afa158015610f0b573d6000803e3d6000fd5b505050506040513d6020811015610f2157600080fd5b50516040805163d4938db360e01b815290516001600160a01b0388169163d4938db3916004808301926020929190829003018186803b158015610f6357600080fd5b505afa158015610f77573d6000803e3d6000fd5b505050506040513d6020811015610f8d57600080fd5b505160408051630e5b7c5360e01b815290516001600160a01b03891691630e5b7c53916004808301926020929190829003018186803b158015610fcf57600080fd5b505afa158015610fe3573d6000803e3d6000fd5b505050506040513d6020811015610ff957600080fd5b50516040805163597be18b60e01b815290516001600160a01b038a169163597be18b916004808301926020929190829003018186803b15801561103b57600080fd5b505afa15801561104f573d6000803e3d6000fd5b505050506040513d602081101561106557600080fd5b5051604080516001600160e01b031960e089901b1681526001600160a01b0396871660048201526024810195909552604485019390935260648401919091526084830152918d1660a4820152905160c48083019260209291908290030181600087803b1580156110d457600080fd5b505af11580156110e8573d6000803e3d6000fd5b505050506040513d60208110156110fe57600080fd5b505190506001600160a01b038116611149576040805162461bcd60e51b81526020600482015260096024820152681393d517d59053125160ba1b604482015290519081900360640190fd5b60408051630ff4abc760e11b81526001600160a01b0383811660048301528c81166024830152915191841691631fe9578e9160448082019260009290919082900301818387803b15801561119c57600080fd5b505af11580156111b0573d6000803e3d6000fd5b505050506001600160a01b03818116600081815260026020526040808220805460ff19166001179055518c8416938e16917f98c0ae41ed9dcfef204d20409e01d4051eee4da4276aa4b5fa1cb3cf01403d6891a450505b5050505050505050565b600082815260208190526040812061122f908363ffffffff6115bf16565b90505b92915050565b600082815260208190526040812061122f908363ffffffff6115cb16565b604080516941444d494e5f524f4c4560b01b8152905190819003600a01902061127f9033611238565b6112bc576040805162461bcd60e51b81526020600482015260096024820152682727aa2fa0a226a4a760b91b604482015290519081900360640190fd5b6e72656d6f7665436f6d6d756e69747960881b8160405160200180826001600160a01b03166001600160a01b031660601b8152601401915050604051602081830303815290604052600082826040516020018083815260200182805190602001908083835b602083106113405780518252601f199092019160209182019101611321565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040528051906020012090506060600160008381526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156113e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116113c9575b50939450600093505050505b81518160ff16101561146d57336001600160a01b0316828260ff168151811061141857fe5b60200260200101516001600160a01b03161415611465576040805162461bcd60e51b815260206004820152600660248201526514d251d3915160d21b604482015290519081900360640190fd5b6001016113f3565b50600082815260016020818152604083208054928301815580845290832090910180546001600160a01b031916331790559083905254600554811415610b4a5760008381526001602052604081206114c49161166b565b6001600160a01b038616600081815260026020526040808220805460ff19169055517fa285b77d62d36ec6881b2cbc019c53874eb061798176f3577f2beab0848d16c69190a2505050505050565b600081565b6000818152602081905260408120611232906115e0565b6004546001600160a01b031615611566576040805162461bcd60e51b8152602060048201526000602482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383169081179091556040517fd8961aaf9fb4046ee3c9088247c5ada34a3d089c61b6accad9e03b18b7376db490600090a250565b6004546001600160a01b031681565b600061122f83836115eb565b600061122f836001600160a01b03841661164f565b600061123282611667565b8154600090821061162d5760405162461bcd60e51b81526004018080602001828103825260228152602001806117086022913960400191505060405180910390fd5b82600001828154811061163c57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b5080546000825590600052602060002090810190611689919061168c565b50565b6116aa91905b808211156116a65760008155600101611692565b5090565b90565b600061122f836001600160a01b03841660006116c9838361164f565b6116ff57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611232565b50600061123256fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473a2646970667358221220ce6bac2991dc5a4a3ab426986f130211a4b38d1d28a2654ec8e5c17296b6c66864736f6c63430006050033