ETH Price: $2,508.00 (-0.67%)

Token

Corn (CORN)
 

Overview

Max Total Supply

34,375.150600199681875963 CORN

Holders

26

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
69.165142979938001552 CORN

Value
$0.00
0xb3cd06b4044778c38ba3e7ee67cda505e2e1a647
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Farmland is a decentralised yield farming game which aims to cultivate profitable farm for users. Corn is a standard ERC-777 implementation with an initial supply of 0 CORN.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Corn

Compiler Version
v0.6.9+commit.3e3065ac

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : Corn.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.9;

import "@openzeppelin/contracts/token/ERC777/IERC777.sol";
import "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/introspection/IERC1820Registry.sol";
import "@openzeppelin/contracts/token/ERC777/ERC777.sol";
import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC777/IERC777Sender.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/**
 * @dev Details of a farm at an address
 */
struct Farm {
    uint256 amount;
    uint256 compostedAmount;
    uint256 blockNumber;
    uint256 lastHarvestedBlockNumber;
    address harvesterAddress;
}

/**
 * @dev Farmland - Crop Smart Contract
 */
contract Corn is ERC777, IERC777Recipient, ReentrancyGuard {
    /**
     * @dev Protect against overflows by using safe math operations (these are .add,.sub functions)
     */
    using SafeMath for uint256;

    /**
     * @dev To limit one action per block per address
     */
    modifier preventSameBlock(address targetAddress) {
        require(
            farms[targetAddress].blockNumber != block.number &&
                farms[targetAddress].lastHarvestedBlockNumber != block.number,
            "You can not allocate/release or harvest in the same block"
        );
        _; // Call the actual code
    }

    /**
     * @dev There must be a farm on this LAND to execute this function
     */
    modifier requireFarm(address targetAddress, bool requiredState) {
        if (requiredState) {
            require(
                farms[targetAddress].amount != 0,
                "You must have allocated land to grow crops on your farm"
            );
        } else {
            require(
                farms[targetAddress].amount == 0,
                "You must have released your land"
            );
        }
        _; // Call the actual code
    }

    /**
     * @dev This will be LAND token smart contract address
     */
    IERC777 private immutable _token;
    IERC1820Registry private _erc1820 =
        IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);
    bytes32 private constant TOKENS_RECIPIENT_INTERFACE_HASH =
        keccak256("ERC777TokensRecipient");

    /**
     * @dev Decline some incoming transactions (Only allow crop smart contract to send/receive LAND)
     */
    function tokensReceived(
        address operator,
        address from,
        address to,
        uint256 amount,
        bytes calldata,
        bytes calldata
    ) external override {
        require(amount > 0, "You must receive a positive number of tokens");
        require(
            _msgSender() == address(_token),
            "You can only build farms on LAND"
        );

        // Ensure someone doesn't send in some LAND to this contract by mistake (Only the contract itself can send itself LAND)
        require(
            operator == address(this),
            "Only CORN contract can send itself LAND tokens"
        );
        require(to == address(this), "Funds must be coming into a CORN token");
        require(from != to, "Why would CORN contract send tokens to itself?");
    }

    /**
     * @dev How many blocks before the farm maturity boost starts ( Set to 6400 on mainnet - around 1 day )
     */
    uint256 private immutable _startMaturityBoost;

    /**
     * @dev How many blocks before the maximum 3x farm maturity boost is reached ( Set to 179200 on mainnet - around 28 days)
     */
    uint256 private immutable _endMaturityBoost;

    /**
     * @dev How many blocks until the fail safe limit is lifted and you are able to allocate any amount of LAND to growing crops (Set to 161280 on mainnet for 28 day failsafe period)
     */
    uint256 private immutable _failsafeTargetBlock;

    constructor(
        address token,
        uint256 startMaturityBoost,
        uint256 endMaturityBoost,
        uint256 failsafeBlockDuration
    ) public ERC777("Corn", "CORN", new address[](0)) {
        require(
            endMaturityBoost > 0,
            "endMaturityBoost must be at least 1 block (min 24 hours before time farm maturation starts)"
        ); // to avoid division by 0

        _token = IERC777(token);
        _startMaturityBoost = startMaturityBoost;
        _endMaturityBoost = endMaturityBoost;
        _failsafeTargetBlock = block.number.add(failsafeBlockDuration);

        _erc1820.setInterfaceImplementer(
            address(this),
            TOKENS_RECIPIENT_INTERFACE_HASH,
            address(this)
        );
    }

    /**
     * @dev 0.00000001 crops grown per block for each LAND allocated to a farm ... 10^18 / 10^8 = 10^10
     */
    uint256 private constant _harvestPerBlockDivisor = 10**8;

    /**
     * @dev To avoid small burn ratios we multiply the ratios by this number.
     */
    uint256 private constant _ratioMultiplier = 10**10;

    /**
     * @dev To get 4 decimals on our multipliers, we multiply all ratios & divide ratios by this number.
     * @dev This is done because we're using integers without any decimals.
     */
    uint256 private constant _percentMultiplier = 10000;

    /**
     * @dev The maximum LAND that can be allocated to a farm during fail safe period.
     */
    uint256 public constant failsafeMaxAmount = 1000 * (10**18);

    /**
     * @dev This is the farm's maximum 10x compost productivity boost. It's multiplicative with the maturity boost.
     */
    uint256 public constant maxCompostBoost = 100000;

    /**
     * @dev This is the farm's maximum 3x maturity productivity boost. It's multiplicative with the compost boost.
     */
    uint256 public constant maxMaturityBoost = 30000;

    /**
     * @dev This is the maximum number of blocks in each growth cycle ( around 42 days) before a harvest is required. After this many blocks crop will stop growing.
     */
    uint256 public constant maxGrowthCycle = 268800;

    /**
     * @dev This is the maximum the maturity boost extends beyond the base level of 1x. This is the "2x" in the "1x base + (0x to 2x bonus) with a maximum of 3x"
     */
    uint256 public constant maturityBoostExtension = 20000;

    /**
     * @dev PUBLIC: By making farms public we can access elements through the contract view (vs having to create methods)
     */
    mapping(address => Farm) public farms;

    /**
     * @dev PUBLIC: Store how much LAND is allocated to growing crops in farms globally
     */
    uint256 public globalAllocatedAmount;

    /**
     * @dev PUBLIC: Store how much is crop has been composted globally (only from active farms on LAND addresses)
     */
    uint256 public globalCompostedAmount;

    /**
     * @dev PUBLIC: Store how many addresses currently have an active farm
     */
    uint256 public globalTotalFarms;

    // Events
    event Allocated(
        address sender,
        uint256 blockNumber,
        address farmerAddress,
        uint256 amount,
        uint256 burnedAmountIncrease
    );
    event Released(
        address sender,
        uint256 amount,
        uint256 burnedAmountDecrease
    );
    event Composted(
        address sender,
        address targetAddress,
        uint256 amount
    );
    event Harvested(
        address sender,
        uint256 blockNumber,
        address sourceAddress,
        address targetAddress,
        uint256 targetBlock,
        uint256 amount
    );

    //////////////////// END HEADER //////////////////////

    /**
     * @dev PUBLIC: Allocate LAND to growing crops on a farm with the specified address as the harvester.
     */
    function allocate(address farmerAddress, uint256 amount)
        public
        nonReentrant()
        preventSameBlock(_msgSender())
        requireFarm(_msgSender(), false) // Ensure LAND is not already in a farm
    {
        require(
            amount > 0,
            "You must provide a positive amount of LAND to build a farm"
        );

        // Ensure you can only lock up to a limited amount of LAND during failsafe period
        if (block.number < _failsafeTargetBlock) {
            require(
                amount <= failsafeMaxAmount,
                "You can only allocate a maximum of 1000 LAND during failsafe."
            );
        }

        Farm storage senderFarm = farms[_msgSender()]; // Shortcut accessor

        senderFarm.amount = amount;
        senderFarm.blockNumber = block.number;
        senderFarm.lastHarvestedBlockNumber = block.number; // Reset the last harvest height to the new LAND allocation height
        senderFarm.harvesterAddress = farmerAddress;

        globalAllocatedAmount = globalAllocatedAmount.add(amount);
        globalCompostedAmount = globalCompostedAmount.add(
            senderFarm.compostedAmount
        );
        globalTotalFarms += 1;

        emit Allocated(
            _msgSender(),
            block.number,
            farmerAddress,
            amount,
            senderFarm.compostedAmount
        );

        // Send [amount] of LAND token from the address that is calling this function to crop smart contract.
        IERC777(_token).operatorSend(
            _msgSender(),
            address(this),
            amount,
            "",
            ""
        ); // [RE-ENTRANCY WARNING] external call, must be at the end
    }

    /**
     * @dev PUBLIC: Releasing a farm returns LAND to the owners
     */
    function release()
        public
        nonReentrant()
        preventSameBlock(_msgSender())
        requireFarm(_msgSender(), true) // Ensure the address you are releasing has a farm on the LAND
    {
        Farm storage senderFarm = farms[_msgSender()]; // Shortcut accessor

        uint256 amount = senderFarm.amount;
        senderFarm.amount = 0;

        globalAllocatedAmount = globalAllocatedAmount.sub(amount);
        globalCompostedAmount = globalCompostedAmount.sub(
            senderFarm.compostedAmount
        );
        globalTotalFarms = globalTotalFarms.sub(1);

        emit Released(_msgSender(), amount, senderFarm.compostedAmount);

        // Send back the LAND amount to person calling the method
        IERC777(_token).send(_msgSender(), amount, ""); // [RE-ENTRANCY WARNING] external call, must be at the end
    }

    /**
     * @dev PUBLIC: Composting a crop fertilizes a farm at specific address
     */
    function compost(address targetAddress, uint256 amount)
        public
        nonReentrant()
        requireFarm(targetAddress, true) // Ensure the address you are composting to has a farm on the LAND
    {
        require(amount > 0, "Nothing to compost");

        Farm storage targetFarm = farms[targetAddress]; // Shortcut accessor, pay attention to targetAddress here

        targetFarm.compostedAmount = targetFarm.compostedAmount.add(amount);

        globalCompostedAmount = globalCompostedAmount.add(amount);

        emit Composted(_msgSender(), targetAddress, amount);

        // Call the normal ERC-777 burn (this will destroy a crop token). We don't check address balance for amount because the internal burn does this check for us.
        _burn(_msgSender(), amount, "", ""); // [RE-ENTRANCY WARNING] external call, must be at the end
    }

    /**
     * @dev PUBLIC: Harvests crops from a specific address to a specified address UP TO the target block
     */
    function harvest(
        address sourceAddress,
        address targetAddress,
        uint256 targetBlock
    )
        public
        nonReentrant()
        preventSameBlock(sourceAddress)
        requireFarm(sourceAddress, true) // Ensure the adress that is being harvested has a farm on the LAND
    {
        require(
            targetBlock <= block.number,
            "You can only harvest up to current block"
        );

        Farm storage sourceFarm = farms[sourceAddress]; // Shortcut accessor, pay attention to sourceAddress here

        require(
            sourceFarm.lastHarvestedBlockNumber < targetBlock,
            "You can only harvest ahead of last harvested block"
        );
        require(
            sourceFarm.harvesterAddress == _msgSender(),
            "You must be the delegated harvester of the sourceAddress"
        );

        uint256 mintAmount = getHarvestAmount(sourceAddress, targetBlock);
        require(mintAmount > 0, "Nothing to harvest");

        sourceFarm.lastHarvestedBlockNumber = targetBlock; // Reset the last harvested height

        emit Harvested(
            _msgSender(),
            block.number,
            sourceAddress,
            targetAddress,
            targetBlock,
            mintAmount
        );

        // Call the normal ERC-777 mint (this will harvest crop tokens to targetAddress)
        _mint(targetAddress, mintAmount, "", ""); // [RE-ENTRANCY WARNING] external call, must be at the end
    }

    //////////////////// VIEW ONLY //////////////////////

    /**
     * @dev PUBLIC: Get the harvested amount of a specific address up to a target block
     */
    function getHarvestAmount(address targetAddress, uint256 targetBlock)
        public
        view
        returns (uint256)
    {
        Farm storage targetFarm = farms[targetAddress]; // Shortcut accessor

        // Ensure this address has a farm on the LAND
        if (targetFarm.amount == 0) {
            return 0;
        }

        require(
            targetBlock <= block.number,
            "You can only calculate up to current block"
        );
        require(
            targetFarm.lastHarvestedBlockNumber <= targetBlock,
            "You can only specify blocks at or ahead of last harvested block"
        );

        uint256 lastBlockInGrowthCycle =
            targetFarm.lastHarvestedBlockNumber.add(maxGrowthCycle); // end of growth cycle last allowed block
        uint256 blocksMinted = maxGrowthCycle;

        if (targetBlock < lastBlockInGrowthCycle) {
            blocksMinted = targetBlock.sub(targetFarm.lastHarvestedBlockNumber);
        }

        uint256 amount = targetFarm.amount; // Total of size of the farm in LAND for this address
        uint256 blocksMintedByAmount = amount.mul(blocksMinted);

        // Adjust by multipliers
        uint256 compostMultiplier = getAddressCompostMultiplier(targetAddress);
        uint256 maturityMultipler = getAddressMaturityMultiplier(targetAddress);
        uint256 afterMultiplier =
            blocksMintedByAmount
                .mul(compostMultiplier)
                .div(_percentMultiplier)
                .mul(maturityMultipler)
                .div(_percentMultiplier);

        uint256 actualMinted = afterMultiplier.div(_harvestPerBlockDivisor);

        return actualMinted;
    }

    /**
     * @dev PUBLIC: Find out a farms maturity boost for the current LAND address (Using 1 block = 13.5 sec formula)
     */
    function getAddressMaturityMultiplier(address targetAddress)
        public
        view
        returns (uint256)
    {
        Farm storage targetFarm = farms[targetAddress]; // Shortcut accessor

        // Ensure this address has a farm on the LAND
        if (targetFarm.amount == 0) {
            return _percentMultiplier;
        }

        // You don't get a boost until minimum blocks passed
        uint256 targetBlockNumber =
            targetFarm.blockNumber.add(_startMaturityBoost);
        if (block.number < targetBlockNumber) {
            return _percentMultiplier;
        }

        // 24 hours - min before starting to receive rewards
        // 28 days - max for waiting 28 days (The function returns PERCENT (10000x) the multiplier for 4 decimal accuracy
        uint256 blockDiff =
            block.number
            .sub(targetBlockNumber)
            .mul(maturityBoostExtension)
            .div(_endMaturityBoost)
            .add(_percentMultiplier);

        uint256 timeMultiplier = Math.min(maxMaturityBoost, blockDiff); // Min 1x, Max 3x
        return timeMultiplier;
    }

    /**
     * @dev PUBLIC: Find out a farms compost productivity boost for a specific address. This will be returned as PERCENT (10000x)
     */
    function getAddressCompostMultiplier(address targetAddress)
        public
        view
        returns (uint256)
    {
        uint256 myRatio = getAddressRatio(targetAddress);
        uint256 globalRatio = getGlobalRatio();

        // Avoid division by 0 & ensure 1x boost if nothing is locked
        if (globalRatio == 0 || myRatio == 0) {
            return _percentMultiplier;
        }

        // The final multiplier is return with 10000x multiplication and will need to be divided by 10000 for final number
        uint256 compostMultiplier =
            Math.min(
                maxCompostBoost,
                myRatio.mul(_percentMultiplier).div(globalRatio).add(
                    _percentMultiplier
                )
            ); // Min 1x, Max 10x
        return compostMultiplier;
    }

    /**
     * @dev PUBLIC: Get LAND/CROP burn ratio for a specific address
     */
    function getAddressRatio(address targetAddress)
        public
        view
        returns (uint256)
    {
        Farm storage targetFarm = farms[targetAddress]; // Shortcut accessor

        uint256 addressLockedAmount = targetFarm.amount;
        uint256 addressBurnedAmount = targetFarm.compostedAmount;

        // If you haven't harvested or composted anything then you get the default 1x boost
        if (addressLockedAmount == 0) {
            return 0;
        }

        // Compost/Maturity ratios for both address & network
        // Note that we multiply both ratios by the ratio multiplier before dividing. For tiny CROP/LAND burn ratios.
        uint256 myRatio =
            addressBurnedAmount.mul(_ratioMultiplier).div(addressLockedAmount);
        return myRatio;
    }

    /**
     * @dev PUBLIC: Get LAND/CROP compost ratio for global (entire network)
     */
    function getGlobalRatio() public view returns (uint256) {
        // If you haven't harvested or composted anything then you get the default 1x multiplier
        if (globalAllocatedAmount == 0) {
            return 0;
        }

        // Compost/Maturity for both address & network
        // Note that we multiply both ratios by the ratio multiplier before dividing. For tiny CROP/LAND burn ratios.
        uint256 globalRatio =
            globalCompostedAmount.mul(_ratioMultiplier).div(globalAllocatedAmount);
        return globalRatio;
    }

    /**
     * @dev PUBLIC: Get Average LAND/CROP compost ratio for global (entire network)
     */
    function getGlobalAverageRatio() public view returns (uint256) {
        // If you haven't harvested or composted anything then you get the default 1x multiplier
        if (globalAllocatedAmount == 0) {
            return 0;
        }

        // Compost/Maturity for both address & network
        // Note that we multiply both ratios by the ratio multiplier before dividing. For tiny CROP/LAND burn ratios.
        uint256 globalAverageRatio =
            globalCompostedAmount
                .mul(_ratioMultiplier)
                .div(globalAllocatedAmount)
                .div(globalTotalFarms);
        return globalAverageRatio;
    }

    /**
     * @dev PUBLIC: Grab a collection of data associated with an address
     */
    function getAddressDetails(address targetAddress)
        public
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256,
            uint256
        )
    {
        uint256 cropBalance = balanceOf(targetAddress);
        uint256 harvestAmount = getHarvestAmount(targetAddress, block.number);

        uint256 addressMaturityMultiplier = getAddressMaturityMultiplier(targetAddress);
        uint256 addressCompostMultiplier = getAddressCompostMultiplier(targetAddress);

        return (
            block.number,
            cropBalance,
            harvestAmount,
            addressMaturityMultiplier,
            addressCompostMultiplier
        );
    }

    /**
     * @dev PUBLIC: Get additional token details
     */
    function getAddressTokenDetails(address targetAddress)
        public
        view
        returns (
            uint256,
            bool,
            uint256,
            uint256,
            uint256,
            uint256
        )
    {
        bool isOperator =
            IERC777(_token).isOperatorFor(address(this), targetAddress);
        uint256 landBalance = IERC777(_token).balanceOf(targetAddress);
        uint256 myRatio = getAddressRatio(targetAddress);
        uint256 globalRatio = getGlobalRatio();
        uint256 globalAverageRatio = getGlobalAverageRatio();

        return (
            block.number,
            isOperator,
            landBalance,
            myRatio,
            globalRatio,
            globalAverageRatio
        );
    }

    /**
     * @dev PUBLIC: Get some global details
     */
    function getGlobalDetails()
        public
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256,
            uint256
        )
    {
        uint256 globalRatio = getGlobalRatio();
        uint256 globalAverageRatio = getGlobalAverageRatio();

        return (
            globalTotalFarms,
            globalRatio,
            globalAverageRatio,
            globalAllocatedAmount,
            globalCompostedAmount
        );
    }

    /**
     * @dev PUBLIC: Get some contracts constants
     */
    function getConstantDetails()
        public
        pure
        returns (
            uint256,
            uint256,
            uint256,
            uint256
        )
    {
        return (
            maxCompostBoost,
            maxMaturityBoost,
            maxGrowthCycle,
            maturityBoostExtension
        );
    }
}

File 2 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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 3 of 12 : IERC1820Registry.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the global ERC1820 Registry, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register
 * implementers for interfaces in this registry, as well as query support.
 *
 * Implementers may be shared by multiple accounts, and can also implement more
 * than a single interface for each account. Contracts can implement interfaces
 * for themselves, but externally-owned accounts (EOA) must delegate this to a
 * contract.
 *
 * {IERC165} interfaces can also be queried via the registry.
 *
 * For an in-depth explanation and source code analysis, see the EIP text.
 */
interface IERC1820Registry {
    /**
     * @dev Sets `newManager` as the manager for `account`. A manager of an
     * account is able to set interface implementers for it.
     *
     * By default, each account is its own manager. Passing a value of `0x0` in
     * `newManager` will reset the manager to this initial state.
     *
     * Emits a {ManagerChanged} event.
     *
     * Requirements:
     *
     * - the caller must be the current manager for `account`.
     */
    function setManager(address account, address newManager) external;

    /**
     * @dev Returns the manager for `account`.
     *
     * See {setManager}.
     */
    function getManager(address account) external view returns (address);

    /**
     * @dev Sets the `implementer` contract as ``account``'s implementer for
     * `interfaceHash`.
     *
     * `account` being the zero address is an alias for the caller's address.
     * The zero address can also be used in `implementer` to remove an old one.
     *
     * See {interfaceHash} to learn how these are created.
     *
     * Emits an {InterfaceImplementerSet} event.
     *
     * Requirements:
     *
     * - the caller must be the current manager for `account`.
     * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not
     * end in 28 zeroes).
     * - `implementer` must implement {IERC1820Implementer} and return true when
     * queried for support, unless `implementer` is the caller. See
     * {IERC1820Implementer-canImplementInterfaceForAddress}.
     */
    function setInterfaceImplementer(address account, bytes32 _interfaceHash, address implementer) external;

    /**
     * @dev Returns the implementer of `interfaceHash` for `account`. If no such
     * implementer is registered, returns the zero address.
     *
     * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28
     * zeroes), `account` will be queried for support of it.
     *
     * `account` being the zero address is an alias for the caller's address.
     */
    function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address);

    /**
     * @dev Returns the interface hash for an `interfaceName`, as defined in the
     * corresponding
     * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP].
     */
    function interfaceHash(string calldata interfaceName) external pure returns (bytes32);

    /**
     *  @notice Updates the cache with whether the contract implements an ERC165 interface or not.
     *  @param account Address of the contract for which to update the cache.
     *  @param interfaceId ERC165 interface for which to update the cache.
     */
    function updateERC165Cache(address account, bytes4 interfaceId) external;

    /**
     *  @notice Checks whether a contract implements an ERC165 interface or not.
     *  If the result is not cached a direct lookup on the contract address is performed.
     *  If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling
     *  {updateERC165Cache} with the contract address.
     *  @param account Address of the contract to check.
     *  @param interfaceId ERC165 interface to check.
     *  @return True if `account` implements `interfaceId`, false otherwise.
     */
    function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool);

    /**
     *  @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.
     *  @param account Address of the contract to check.
     *  @param interfaceId ERC165 interface to check.
     *  @return True if `account` implements `interfaceId`, false otherwise.
     */
    function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool);

    event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer);

    event ManagerChanged(address indexed account, address indexed newManager);
}

File 4 of 12 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 5 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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 6 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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 7 of 12 : ERC777.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../GSN/Context.sol";
import "./IERC777.sol";
import "./IERC777Recipient.sol";
import "./IERC777Sender.sol";
import "../../token/ERC20/IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";
import "../../introspection/IERC1820Registry.sol";

/**
 * @dev Implementation of the {IERC777} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * Support for ERC20 is included in this contract, as specified by the EIP: both
 * the ERC777 and ERC20 interfaces can be safely used when interacting with it.
 * Both {IERC777-Sent} and {IERC20-Transfer} events are emitted on token
 * movements.
 *
 * Additionally, the {IERC777-granularity} value is hard-coded to `1`, meaning that there
 * are no special restrictions in the amount of tokens that created, moved, or
 * destroyed. This makes integration with ERC20 applications seamless.
 */
contract ERC777 is Context, IERC777, IERC20 {
    using SafeMath for uint256;
    using Address for address;

    IERC1820Registry constant internal _ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);

    mapping(address => uint256) private _balances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    // We inline the result of the following hashes because Solidity doesn't resolve them at compile time.
    // See https://github.com/ethereum/solidity/issues/4024.

    // keccak256("ERC777TokensSender")
    bytes32 constant private _TOKENS_SENDER_INTERFACE_HASH =
        0x29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe895;

    // keccak256("ERC777TokensRecipient")
    bytes32 constant private _TOKENS_RECIPIENT_INTERFACE_HASH =
        0xb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b;

    // This isn't ever read from - it's only used to respond to the defaultOperators query.
    address[] private _defaultOperatorsArray;

    // Immutable, but accounts may revoke them (tracked in __revokedDefaultOperators).
    mapping(address => bool) private _defaultOperators;

    // For each account, a mapping of its operators and revoked default operators.
    mapping(address => mapping(address => bool)) private _operators;
    mapping(address => mapping(address => bool)) private _revokedDefaultOperators;

    // ERC20-allowances
    mapping (address => mapping (address => uint256)) private _allowances;

    /**
     * @dev `defaultOperators` may be an empty array.
     */
    constructor(
        string memory name_,
        string memory symbol_,
        address[] memory defaultOperators_
    ) public {
        _name = name_;
        _symbol = symbol_;

        _defaultOperatorsArray = defaultOperators_;
        for (uint256 i = 0; i < _defaultOperatorsArray.length; i++) {
            _defaultOperators[_defaultOperatorsArray[i]] = true;
        }

        // register interfaces
        _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC777Token"), address(this));
        _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC20Token"), address(this));
    }

    /**
     * @dev See {IERC777-name}.
     */
    function name() public view override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC777-symbol}.
     */
    function symbol() public view override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {ERC20-decimals}.
     *
     * Always returns 18, as per the
     * [ERC777 EIP](https://eips.ethereum.org/EIPS/eip-777#backward-compatibility).
     */
    function decimals() public pure returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC777-granularity}.
     *
     * This implementation always returns `1`.
     */
    function granularity() public view override returns (uint256) {
        return 1;
    }

    /**
     * @dev See {IERC777-totalSupply}.
     */
    function totalSupply() public view override(IERC20, IERC777) returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev Returns the amount of tokens owned by an account (`tokenHolder`).
     */
    function balanceOf(address tokenHolder) public view override(IERC20, IERC777) returns (uint256) {
        return _balances[tokenHolder];
    }

    /**
     * @dev See {IERC777-send}.
     *
     * Also emits a {IERC20-Transfer} event for ERC20 compatibility.
     */
    function send(address recipient, uint256 amount, bytes memory data) public override  {
        _send(_msgSender(), recipient, amount, data, "", true);
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Unlike `send`, `recipient` is _not_ required to implement the {IERC777Recipient}
     * interface if it is a contract.
     *
     * Also emits a {Sent} event.
     */
    function transfer(address recipient, uint256 amount) public override returns (bool) {
        require(recipient != address(0), "ERC777: transfer to the zero address");

        address from = _msgSender();

        _callTokensToSend(from, from, recipient, amount, "", "");

        _move(from, from, recipient, amount, "", "");

        _callTokensReceived(from, from, recipient, amount, "", "", false);

        return true;
    }

    /**
     * @dev See {IERC777-burn}.
     *
     * Also emits a {IERC20-Transfer} event for ERC20 compatibility.
     */
    function burn(uint256 amount, bytes memory data) public override  {
        _burn(_msgSender(), amount, data, "");
    }

    /**
     * @dev See {IERC777-isOperatorFor}.
     */
    function isOperatorFor(
        address operator,
        address tokenHolder
    ) public view override returns (bool) {
        return operator == tokenHolder ||
            (_defaultOperators[operator] && !_revokedDefaultOperators[tokenHolder][operator]) ||
            _operators[tokenHolder][operator];
    }

    /**
     * @dev See {IERC777-authorizeOperator}.
     */
    function authorizeOperator(address operator) public override  {
        require(_msgSender() != operator, "ERC777: authorizing self as operator");

        if (_defaultOperators[operator]) {
            delete _revokedDefaultOperators[_msgSender()][operator];
        } else {
            _operators[_msgSender()][operator] = true;
        }

        emit AuthorizedOperator(operator, _msgSender());
    }

    /**
     * @dev See {IERC777-revokeOperator}.
     */
    function revokeOperator(address operator) public override  {
        require(operator != _msgSender(), "ERC777: revoking self as operator");

        if (_defaultOperators[operator]) {
            _revokedDefaultOperators[_msgSender()][operator] = true;
        } else {
            delete _operators[_msgSender()][operator];
        }

        emit RevokedOperator(operator, _msgSender());
    }

    /**
     * @dev See {IERC777-defaultOperators}.
     */
    function defaultOperators() public view override returns (address[] memory) {
        return _defaultOperatorsArray;
    }

    /**
     * @dev See {IERC777-operatorSend}.
     *
     * Emits {Sent} and {IERC20-Transfer} events.
     */
    function operatorSend(
        address sender,
        address recipient,
        uint256 amount,
        bytes memory data,
        bytes memory operatorData
    )
    public override
    {
        require(isOperatorFor(_msgSender(), sender), "ERC777: caller is not an operator for holder");
        _send(sender, recipient, amount, data, operatorData, true);
    }

    /**
     * @dev See {IERC777-operatorBurn}.
     *
     * Emits {Burned} and {IERC20-Transfer} events.
     */
    function operatorBurn(address account, uint256 amount, bytes memory data, bytes memory operatorData) public override {
        require(isOperatorFor(_msgSender(), account), "ERC777: caller is not an operator for holder");
        _burn(account, amount, data, operatorData);
    }

    /**
     * @dev See {IERC20-allowance}.
     *
     * Note that operator and allowance concepts are orthogonal: operators may
     * not have allowance, and accounts with allowance may not be operators
     * themselves.
     */
    function allowance(address holder, address spender) public view override returns (uint256) {
        return _allowances[holder][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Note that accounts cannot have allowance issued by their operators.
     */
    function approve(address spender, uint256 value) public override returns (bool) {
        address holder = _msgSender();
        _approve(holder, spender, value);
        return true;
    }

   /**
    * @dev See {IERC20-transferFrom}.
    *
    * Note that operator and allowance concepts are orthogonal: operators cannot
    * call `transferFrom` (unless they have allowance), and accounts with
    * allowance cannot call `operatorSend` (unless they are operators).
    *
    * Emits {Sent}, {IERC20-Transfer} and {IERC20-Approval} events.
    */
    function transferFrom(address holder, address recipient, uint256 amount) public override returns (bool) {
        require(recipient != address(0), "ERC777: transfer to the zero address");
        require(holder != address(0), "ERC777: transfer from the zero address");

        address spender = _msgSender();

        _callTokensToSend(spender, holder, recipient, amount, "", "");

        _move(spender, holder, recipient, amount, "", "");
        _approve(holder, spender, _allowances[holder][spender].sub(amount, "ERC777: transfer amount exceeds allowance"));

        _callTokensReceived(spender, holder, recipient, amount, "", "", false);

        return true;
    }

    /**
     * @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * If a send hook is registered for `account`, the corresponding function
     * will be called with `operator`, `data` and `operatorData`.
     *
     * See {IERC777Sender} and {IERC777Recipient}.
     *
     * Emits {Minted} and {IERC20-Transfer} events.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - if `account` is a contract, it must implement the {IERC777Recipient}
     * interface.
     */
    function _mint(
        address account,
        uint256 amount,
        bytes memory userData,
        bytes memory operatorData
    )
    internal virtual
    {
        require(account != address(0), "ERC777: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), account, amount);

        // Update state variables
        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);

        _callTokensReceived(operator, address(0), account, amount, userData, operatorData, true);

        emit Minted(operator, account, amount, userData, operatorData);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Send tokens
     * @param from address token holder address
     * @param to address recipient address
     * @param amount uint256 amount of tokens to transfer
     * @param userData bytes extra information provided by the token holder (if any)
     * @param operatorData bytes extra information provided by the operator (if any)
     * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient
     */
    function _send(
        address from,
        address to,
        uint256 amount,
        bytes memory userData,
        bytes memory operatorData,
        bool requireReceptionAck
    )
        internal
    {
        require(from != address(0), "ERC777: send from the zero address");
        require(to != address(0), "ERC777: send to the zero address");

        address operator = _msgSender();

        _callTokensToSend(operator, from, to, amount, userData, operatorData);

        _move(operator, from, to, amount, userData, operatorData);

        _callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck);
    }

    /**
     * @dev Burn tokens
     * @param from address token holder address
     * @param amount uint256 amount of tokens to burn
     * @param data bytes extra information provided by the token holder
     * @param operatorData bytes extra information provided by the operator (if any)
     */
    function _burn(
        address from,
        uint256 amount,
        bytes memory data,
        bytes memory operatorData
    )
        internal virtual
    {
        require(from != address(0), "ERC777: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), amount);

        _callTokensToSend(operator, from, address(0), amount, data, operatorData);

        // Update state variables
        _balances[from] = _balances[from].sub(amount, "ERC777: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);

        emit Burned(operator, from, amount, data, operatorData);
        emit Transfer(from, address(0), amount);
    }

    function _move(
        address operator,
        address from,
        address to,
        uint256 amount,
        bytes memory userData,
        bytes memory operatorData
    )
        private
    {
        _beforeTokenTransfer(operator, from, to, amount);

        _balances[from] = _balances[from].sub(amount, "ERC777: transfer amount exceeds balance");
        _balances[to] = _balances[to].add(amount);

        emit Sent(operator, from, to, amount, userData, operatorData);
        emit Transfer(from, to, amount);
    }

    /**
     * @dev See {ERC20-_approve}.
     *
     * Note that accounts cannot have allowance issued by their operators.
     */
    function _approve(address holder, address spender, uint256 value) internal {
        require(holder != address(0), "ERC777: approve from the zero address");
        require(spender != address(0), "ERC777: approve to the zero address");

        _allowances[holder][spender] = value;
        emit Approval(holder, spender, value);
    }

    /**
     * @dev Call from.tokensToSend() if the interface is registered
     * @param operator address operator requesting the transfer
     * @param from address token holder address
     * @param to address recipient address
     * @param amount uint256 amount of tokens to transfer
     * @param userData bytes extra information provided by the token holder (if any)
     * @param operatorData bytes extra information provided by the operator (if any)
     */
    function _callTokensToSend(
        address operator,
        address from,
        address to,
        uint256 amount,
        bytes memory userData,
        bytes memory operatorData
    )
        private
    {
        address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(from, _TOKENS_SENDER_INTERFACE_HASH);
        if (implementer != address(0)) {
            IERC777Sender(implementer).tokensToSend(operator, from, to, amount, userData, operatorData);
        }
    }

    /**
     * @dev Call to.tokensReceived() if the interface is registered. Reverts if the recipient is a contract but
     * tokensReceived() was not registered for the recipient
     * @param operator address operator requesting the transfer
     * @param from address token holder address
     * @param to address recipient address
     * @param amount uint256 amount of tokens to transfer
     * @param userData bytes extra information provided by the token holder (if any)
     * @param operatorData bytes extra information provided by the operator (if any)
     * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient
     */
    function _callTokensReceived(
        address operator,
        address from,
        address to,
        uint256 amount,
        bytes memory userData,
        bytes memory operatorData,
        bool requireReceptionAck
    )
        private
    {
        address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(to, _TOKENS_RECIPIENT_INTERFACE_HASH);
        if (implementer != address(0)) {
            IERC777Recipient(implementer).tokensReceived(operator, from, to, amount, userData, operatorData);
        } else if (requireReceptionAck) {
            require(!to.isContract(), "ERC777: token recipient contract has no implementer for ERC777TokensRecipient");
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes
     * calls to {send}, {transfer}, {operatorSend}, minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address operator, address from, address to, uint256 amount) internal virtual { }
}

File 8 of 12 : IERC777.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC777Token standard as defined in the EIP.
 *
 * This contract uses the
 * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let
 * token holders and recipients react to token movements by using setting implementers
 * for the associated interfaces in said registry. See {IERC1820Registry} and
 * {ERC1820Implementer}.
 */
interface IERC777 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the smallest part of the token that is not divisible. This
     * means all token operations (creation, movement and destruction) must have
     * amounts that are a multiple of this number.
     *
     * For most token contracts, this value will equal 1.
     */
    function granularity() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * If send or receive hooks are registered for the caller and `recipient`,
     * the corresponding functions will be called with `data` and empty
     * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.
     *
     * Emits a {Sent} event.
     *
     * Requirements
     *
     * - the caller must have at least `amount` tokens.
     * - `recipient` cannot be the zero address.
     * - if `recipient` is a contract, it must implement the {IERC777Recipient}
     * interface.
     */
    function send(address recipient, uint256 amount, bytes calldata data) external;

    /**
     * @dev Destroys `amount` tokens from the caller's account, reducing the
     * total supply.
     *
     * If a send hook is registered for the caller, the corresponding function
     * will be called with `data` and empty `operatorData`. See {IERC777Sender}.
     *
     * Emits a {Burned} event.
     *
     * Requirements
     *
     * - the caller must have at least `amount` tokens.
     */
    function burn(uint256 amount, bytes calldata data) external;

    /**
     * @dev Returns true if an account is an operator of `tokenHolder`.
     * Operators can send and burn tokens on behalf of their owners. All
     * accounts are their own operator.
     *
     * See {operatorSend} and {operatorBurn}.
     */
    function isOperatorFor(address operator, address tokenHolder) external view returns (bool);

    /**
     * @dev Make an account an operator of the caller.
     *
     * See {isOperatorFor}.
     *
     * Emits an {AuthorizedOperator} event.
     *
     * Requirements
     *
     * - `operator` cannot be calling address.
     */
    function authorizeOperator(address operator) external;

    /**
     * @dev Revoke an account's operator status for the caller.
     *
     * See {isOperatorFor} and {defaultOperators}.
     *
     * Emits a {RevokedOperator} event.
     *
     * Requirements
     *
     * - `operator` cannot be calling address.
     */
    function revokeOperator(address operator) external;

    /**
     * @dev Returns the list of default operators. These accounts are operators
     * for all token holders, even if {authorizeOperator} was never called on
     * them.
     *
     * This list is immutable, but individual holders may revoke these via
     * {revokeOperator}, in which case {isOperatorFor} will return false.
     */
    function defaultOperators() external view returns (address[] memory);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must
     * be an operator of `sender`.
     *
     * If send or receive hooks are registered for `sender` and `recipient`,
     * the corresponding functions will be called with `data` and
     * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.
     *
     * Emits a {Sent} event.
     *
     * Requirements
     *
     * - `sender` cannot be the zero address.
     * - `sender` must have at least `amount` tokens.
     * - the caller must be an operator for `sender`.
     * - `recipient` cannot be the zero address.
     * - if `recipient` is a contract, it must implement the {IERC777Recipient}
     * interface.
     */
    function operatorSend(
        address sender,
        address recipient,
        uint256 amount,
        bytes calldata data,
        bytes calldata operatorData
    ) external;

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the total supply.
     * The caller must be an operator of `account`.
     *
     * If a send hook is registered for `account`, the corresponding function
     * will be called with `data` and `operatorData`. See {IERC777Sender}.
     *
     * Emits a {Burned} event.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     * - the caller must be an operator for `account`.
     */
    function operatorBurn(
        address account,
        uint256 amount,
        bytes calldata data,
        bytes calldata operatorData
    ) external;

    event Sent(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256 amount,
        bytes data,
        bytes operatorData
    );

    event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData);

    event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData);

    event AuthorizedOperator(address indexed operator, address indexed tokenHolder);

    event RevokedOperator(address indexed operator, address indexed tokenHolder);
}

File 9 of 12 : IERC777Recipient.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP.
 *
 * Accounts can be notified of {IERC777} tokens being sent to them by having a
 * contract implement this interface (contract holders can be their own
 * implementer) and registering it on the
 * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry].
 *
 * See {IERC1820Registry} and {ERC1820Implementer}.
 */
interface IERC777Recipient {
    /**
     * @dev Called by an {IERC777} token contract whenever tokens are being
     * moved or created into a registered account (`to`). The type of operation
     * is conveyed by `from` being the zero address or not.
     *
     * This call occurs _after_ the token contract's state is updated, so
     * {IERC777-balanceOf}, etc., can be used to query the post-operation state.
     *
     * This function may revert to prevent the operation from being executed.
     */
    function tokensReceived(
        address operator,
        address from,
        address to,
        uint256 amount,
        bytes calldata userData,
        bytes calldata operatorData
    ) external;
}

File 10 of 12 : IERC777Sender.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC777TokensSender standard as defined in the EIP.
 *
 * {IERC777} Token holders can be notified of operations performed on their
 * tokens by having a contract implement this interface (contract holders can be
 *  their own implementer) and registering it on the
 * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry].
 *
 * See {IERC1820Registry} and {ERC1820Implementer}.
 */
interface IERC777Sender {
    /**
     * @dev Called by an {IERC777} token contract whenever a registered holder's
     * (`from`) tokens are about to be moved or destroyed. The type of operation
     * is conveyed by `to` being the zero address or not.
     *
     * This call occurs _before_ the token contract's state is updated, so
     * {IERC777-balanceOf}, etc., can be used to query the pre-operation state.
     *
     * This function may revert to prevent the operation from being executed.
     */
    function tokensToSend(
        address operator,
        address from,
        address to,
        uint256 amount,
        bytes calldata userData,
        bytes calldata operatorData
    ) external;
}

File 11 of 12 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.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) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @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");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        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 12 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"startMaturityBoost","type":"uint256"},{"internalType":"uint256","name":"endMaturityBoost","type":"uint256"},{"internalType":"uint256","name":"failsafeBlockDuration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"},{"indexed":false,"internalType":"address","name":"farmerAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burnedAmountIncrease","type":"uint256"}],"name":"Allocated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenHolder","type":"address"}],"name":"AuthorizedOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"operatorData","type":"bytes"}],"name":"Burned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"targetAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Composted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"},{"indexed":false,"internalType":"address","name":"sourceAddress","type":"address"},{"indexed":false,"internalType":"address","name":"targetAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"targetBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"operatorData","type":"bytes"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burnedAmountDecrease","type":"uint256"}],"name":"Released","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenHolder","type":"address"}],"name":"RevokedOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"operatorData","type":"bytes"}],"name":"Sent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"farmerAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"authorizeOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenHolder","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"compost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"defaultOperators","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"failsafeMaxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"farms","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"compostedAmount","type":"uint256"},{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"uint256","name":"lastHarvestedBlockNumber","type":"uint256"},{"internalType":"address","name":"harvesterAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"getAddressCompostMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"getAddressDetails","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"getAddressMaturityMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"getAddressRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"getAddressTokenDetails","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConstantDetails","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getGlobalAverageRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGlobalDetails","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGlobalRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"},{"internalType":"uint256","name":"targetBlock","type":"uint256"}],"name":"getHarvestAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"globalAllocatedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"globalCompostedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"globalTotalFarms","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"granularity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sourceAddress","type":"address"},{"internalType":"address","name":"targetAddress","type":"address"},{"internalType":"uint256","name":"targetBlock","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"tokenHolder","type":"address"}],"name":"isOperatorFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maturityBoostExtension","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxCompostBoost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxGrowthCycle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMaturityBoost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"operatorData","type":"bytes"}],"name":"operatorBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"operatorData","type":"bytes"}],"name":"operatorSend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"revokeOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"tokensReceived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

610100604052600a80546001600160a01b031916731820a4b7618bde71dce8cdc73aab6c95905fad241790553480156200003857600080fd5b50604051620042b6380380620042b6833981810160405260808110156200005e57600080fd5b5080516020808301516040808501516060909501518151808301835260048082526321b7b93760e11b828701908152845180860186529182526321a7a92760e11b82880152845160008152968701909452815196979496949592949193909291620000cc9160029162000416565b508151620000e290600390602085019062000416565b508051620000f89060049060208401906200049b565b5060005b6004548110156200015857600160056000600484815481106200011b57fe5b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff1916911515919091179055600101620000fc565b50604080516a22a9219b9b9baa37b5b2b760a91b8152815190819003600b0181206329965a1d60e01b82523060048301819052602483019190915260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b158015620001d757600080fd5b505af1158015620001ec573d6000803e3d6000fd5b5050604080516922a92199182a37b5b2b760b11b8152815190819003600a0181206329965a1d60e01b82523060048301819052602483019190915260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad2493506329965a1d9250606480830192600092919082900301818387803b1580156200026d57600080fd5b505af115801562000282573d6000803e3d6000fd5b505060016009555050508315159150620002d090505760405162461bcd60e51b815260040180806020018281038252605b8152602001806200425b605b913960600191505060405180910390fd5b606084901b6001600160601b03191660805260a083905260c0829052620003044382620003b4602090811b6200281517901c565b60e052600a54604080517f455243373737546f6b656e73526563697069656e740000000000000000000000815281519081900360150181206329965a1d60e01b825230600483018190526024830191909152604482015290516001600160a01b03909216916329965a1d9160648082019260009290919082900301818387803b1580156200039157600080fd5b505af1158015620003a6573d6000803e3d6000fd5b505050505050505062000548565b6000828201838110156200040f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200045957805160ff191683800117855562000489565b8280016001018555821562000489579182015b82811115620004895782518255916020019190600101906200046c565b506200049792915062000501565b5090565b828054828255906000526020600020908101928215620004f3579160200282015b82811115620004f357825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620004bc565b506200049792915062000521565b6200051e91905b8082111562000497576000815560010162000508565b90565b6200051e91905b80821115620004975780546001600160a01b031916815560010162000528565b60805160601c60a05160c05160e051613cc66200059560003980611bb35250806121c3525080612176525080610cc152806116b55280611d115280611de95280611ecb5250613cc66000f3fe608060405234801561001057600080fd5b506004361061025d5760003560e01c806386d1a69f11610146578063c2ceb95f116100c3578063d9f04bc511610087578063d9f04bc514610a33578063db97fc9214610a3b578063dd62ed3e14610a43578063fad8b32a14610a71578063fc673c4f14610a97578063fe9d930314610bd55761025d565b8063c2ceb95f146109b7578063c2f028e2146109ed578063c7a18160146109f5578063d883f4c1146109fd578063d95b637114610a055761025d565b8063a9059cbb1161010a578063a9059cbb146108b4578063b78b52df146108e0578063be6ca56d1461090c578063c018101714610965578063c11aad6e146109915761025d565b806386d1a69f14610797578063959b8c3f1461079f57806395d89b41146107c55780639bd9bbc6146107cd578063a5b78c4b146108865761025d565b806338fd8033116101df578063658edb99116101a3578063658edb99146106e957806370295f9d146106f157806370a082311461071d578063710b2d8c1461074357806376053425146107695780637e3fa2b91461078f5761025d565b806338fd80331461052e578063421adfa0146105365780634de6d9eb14610590578063556f0dc71461059857806362ad1b83146105a05761025d565b806318160ddd1161022657806318160ddd1461047957806323b872dd146104815780633133e3ab146104b7578063313ce56714610508578063389b7b5b146105265761025d565b806223de2914610262578063059b3eb11461034a57806306e485381461036457806306fdde03146103bc578063095ea7b314610439575b600080fd5b610348600480360360c081101561027857600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b8111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460018302840111600160201b831117156102ed57600080fd5b919390929091602081019035600160201b81111561030a57600080fd5b82018360208201111561031c57600080fd5b803590602001918460018302840111600160201b8311171561033d57600080fd5b509092509050610c80565b005b610352610e35565b60408051918252519081900360200190f35b61036c610e3b565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103a8578181015183820152602001610390565b505050509050019250505060405180910390f35b6103c4610e9e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103fe5781810151838201526020016103e6565b50505050905090810190601f16801561042b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104656004803603604081101561044f57600080fd5b506001600160a01b038135169060200135610f28565b604080519115158252519081900360200190f35b610352610f4c565b6104656004803603606081101561049757600080fd5b506001600160a01b03813581169160208101359091169060400135610f52565b6104dd600480360360208110156104cd57600080fd5b50356001600160a01b03166110d5565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b610510611124565b6040805160ff9092168252519081900360200190f35b6104dd611129565b610352611162565b61055c6004803603602081101561054c57600080fd5b50356001600160a01b0316611169565b6040805195865260208601949094528484019290925260608401526001600160a01b03166080830152519081900360a00190f35b6103526111a1565b6103526111a7565b610348600480360360a08110156105b657600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156105f057600080fd5b82018360208201111561060257600080fd5b803590602001918460018302840111600160201b8311171561062357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561067557600080fd5b82018360208201111561068757600080fd5b803590602001918460018302840111600160201b831117156106a857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506111ac945050505050565b61035261120e565b6103526004803603604081101561070757600080fd5b506001600160a01b038135169060200135611214565b6103526004803603602081101561073357600080fd5b50356001600160a01b031661138e565b6103526004803603602081101561075957600080fd5b50356001600160a01b03166113ad565b6103526004803603602081101561077f57600080fd5b50356001600160a01b0316611402565b610352611475565b6103486114b2565b610348600480360360208110156107b557600080fd5b50356001600160a01b0316611767565b6103c46118b3565b610348600480360360608110156107e357600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561081257600080fd5b82018360208201111561082457600080fd5b803590602001918460018302840111600160201b8311171561084557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611914945050505050565b61088e61193e565b604080519485526020850193909352838301919091526060830152519081900360800190f35b610465600480360360408110156108ca57600080fd5b506001600160a01b038135169060200135611952565b610348600480360360408110156108f657600080fd5b506001600160a01b038135169060200135611a2b565b6109326004803603602081101561092257600080fd5b50356001600160a01b0316611ddc565b604080519687529415156020870152858501939093526060850191909152608084015260a0830152519081900360c00190f35b6103486004803603604081101561097b57600080fd5b506001600160a01b038135169060200135611f7c565b610352600480360360208110156109a757600080fd5b50356001600160a01b031661213f565b610348600480360360608110156109cd57600080fd5b506001600160a01b03813581169160208101359091169060400135612208565b61035261251b565b610352612528565b61035261252e565b61046560048036036040811015610a1b57600080fd5b506001600160a01b038135811691602001351661256b565b61035261260d565b610352612613565b61035260048036036040811015610a5957600080fd5b506001600160a01b038135811691602001351661261a565b61034860048036036020811015610a8757600080fd5b50356001600160a01b0316612645565b61034860048036036080811015610aad57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b811115610adc57600080fd5b820183602082011115610aee57600080fd5b803590602001918460018302840111600160201b83111715610b0f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610b6157600080fd5b820183602082011115610b7357600080fd5b803590602001918460018302840111600160201b83111715610b9457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612791945050505050565b61034860048036036040811015610beb57600080fd5b81359190810190604081016020820135600160201b811115610c0c57600080fd5b820183602082011115610c1e57600080fd5b803590602001918460018302840111600160201b83111715610c3f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506127ef945050505050565b60008511610cbf5760405162461bcd60e51b815260040180806020018281038252602c815260200180613abf602c913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610cf161286f565b6001600160a01b031614610d4c576040805162461bcd60e51b815260206004820181905260248201527f596f752063616e206f6e6c79206275696c64206661726d73206f6e204c414e44604482015290519081900360640190fd5b6001600160a01b0388163014610d935760405162461bcd60e51b815260040180806020018281038252602e815260200180613b13602e913960400191505060405180910390fd5b6001600160a01b0386163014610dda5760405162461bcd60e51b8152600401808060200182810382526026815260200180613a756026913960400191505060405180910390fd5b856001600160a01b0316876001600160a01b03161415610e2b5760405162461bcd60e51b815260040180806020018281038252602e815260200180613b41602e913960400191505060405180910390fd5b5050505050505050565b600c5481565b60606004805480602002602001604051908101604052809291908181526020018280548015610e9357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e75575b505050505090505b90565b60028054604080516020601f6000196101006001871615020190941685900493840181900481028201810190925282815260609390929091830182828015610e935780601f10610efc57610100808354040283529160200191610e93565b820191906000526020600020905b815481529060010190602001808311610f0a57509395945050505050565b600080610f3361286f565b9050610f40818585612873565b60019150505b92915050565b60015490565b60006001600160a01b038316610f995760405162461bcd60e51b8152600401808060200182810382526024815260200180613a9b6024913960400191505060405180910390fd5b6001600160a01b038416610fde5760405162461bcd60e51b8152600401808060200182810382526026815260200180613bfb6026913960400191505060405180910390fd5b6000610fe861286f565b905061101681868686604051806020016040528060008152506040518060200160405280600081525061295f565b611042818686866040518060200160405280600081525060405180602001604052806000815250612ba7565b61109c858261109786604051806060016040528060298152602001613bd2602991396001600160a01b03808c166000908152600860209081526040808320938b1683529290522054919063ffffffff612dcc16565b612873565b6110ca8186868660405180602001604052806000815250604051806020016040528060008152506000612e63565b506001949350505050565b6000806000806000806110e78761138e565b905060006110f58843611214565b905060006111028961213f565b9050600061110f8a611402565b439b949a509298509096509094509092505050565b601290565b60008060008060008061113a611475565b9050600061114661252e565b600e54600c54600d54919a949950919750909550935090915050565b62041a0081565b600b6020526000908152604090208054600182015460028301546003840154600490940154929391929091906001600160a01b031685565b614e2081565b600190565b6111bd6111b761286f565b8661256b565b6111f85760405162461bcd60e51b815260040180806020018281038252602c815260200180613ba6602c913960400191505060405180910390fd5b611207858585858560016130f9565b5050505050565b600d5481565b6001600160a01b0382166000908152600b60205260408120805461123c576000915050610f46565b4383111561127b5760405162461bcd60e51b815260040180806020018281038252602a815260200180613c67602a913960400191505060405180910390fd5b82816003015411156112be5760405162461bcd60e51b815260040180806020018281038252603f815260200180613959603f913960400191505060405180910390fd5b60038101546000906112d99062041a0063ffffffff61281516565b905062041a00818510156113005760038301546112fd90869063ffffffff6131d016565b90505b82546000611314828463ffffffff61321216565b9050600061132189611402565b9050600061132e8a61213f565b9050600061136661271061134e8461135a83838a8a63ffffffff61321216565b9063ffffffff61326b16565b9063ffffffff61321216565b9050600061137e826305f5e10063ffffffff61326b16565b9c9b505050505050505050505050565b6001600160a01b0381166000908152602081905260409020545b919050565b6001600160a01b0381166000908152600b6020526040812080546001820154816113dd57600093505050506113a8565b60006113f88361134e846402540be40063ffffffff61321216565b9695505050505050565b60008061140e836113ad565b9050600061141a611475565b9050801580611427575081155b1561143857612710925050506113a8565b600061146c620186a061146761271061145b8661134e898463ffffffff61321216565b9063ffffffff61281516565b6132ad565b95945050505050565b6000600c546000141561148a57506000610e9b565b60006114ac600c5461134e6402540be400600d5461321290919063ffffffff16565b91505090565b600260095414156114f8576040805162461bcd60e51b815260206004820152601f60248201526000805160206137b9833981519152604482015290519081900360640190fd5b600260095561150561286f565b6001600160a01b0381166000908152600b6020526040902060020154431480159061154b57506001600160a01b0381166000908152600b60205260409020600301544314155b6115865760405162461bcd60e51b81526004018080602001828103825260398152602001806138476039913960400191505060405180910390fd5b61158e61286f565b60016001600160a01b0382166000908152600b60205260409020546115e45760405162461bcd60e51b8152600401808060200182810382526037815260200180613b6f6037913960400191505060405180910390fd5b6000600b60006115f261286f565b6001600160a01b03168152602081019190915260400160009081208054918155600c54909250611628908263ffffffff6131d016565b600c556001820154600d546116429163ffffffff6131d016565b600d55600e5461165990600163ffffffff6131d016565b600e557f82e416ba72d10e709b5de7ac16f5f49ff1d94f22d55bf582d353d3c313a1e8dd61168561286f565b6001840154604080516001600160a01b0390931683526020830185905282810191909152519081900360600190a17f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639bd9bbc66116ea61286f565b604080516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820185905260606044830152600060648301819052905160a48084019382900301818387803b15801561174357600080fd5b505af1158015611757573d6000803e3d6000fd5b5050600160095550505050505050565b806001600160a01b031661177961286f565b6001600160a01b031614156117bf5760405162461bcd60e51b81526004018080602001828103825260248152602001806138a26024913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff161561182257600760006117ec61286f565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff19169055611869565b60016006600061183061286f565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff19169115159190911790555b61187161286f565b6001600160a01b0316816001600160a01b03167ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f960405160405180910390a350565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610e935780601f10610efc57610100808354040283529160200191610e93565b61193961191f61286f565b8484846040518060200160405280600081525060016130f9565b505050565b620186a061753062041a00614e2090919293565b60006001600160a01b0383166119995760405162461bcd60e51b8152600401808060200182810382526024815260200180613a9b6024913960400191505060405180910390fd5b60006119a361286f565b90506119d181828686604051806020016040528060008152506040518060200160405280600081525061295f565b6119fd818286866040518060200160405280600081525060405180602001604052806000815250612ba7565b610f408182868660405180602001604052806000815250604051806020016040528060008152506000612e63565b60026009541415611a71576040805162461bcd60e51b815260206004820152601f60248201526000805160206137b9833981519152604482015290519081900360640190fd5b6002600955611a7e61286f565b6001600160a01b0381166000908152600b60205260409020600201544314801590611ac457506001600160a01b0381166000908152600b60205260409020600301544314155b611aff5760405162461bcd60e51b81526004018080602001828103825260398152602001806138476039913960400191505060405180910390fd5b611b0761286f565b6001600160a01b0381166000908152600b602052604081205415611b72576040805162461bcd60e51b815260206004820181905260248201527f596f75206d75737420686176652072656c656173656420796f7572206c616e64604482015290519081900360640190fd5b60008411611bb15760405162461bcd60e51b815260040180806020018281038252603a8152602001806138fe603a913960400191505060405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000431015611c2157683635c9adc5dea00000841115611c215760405162461bcd60e51b815260040180806020018281038252603d815260200180613998603d913960400191505060405180910390fd5b6000600b6000611c2f61286f565b6001600160a01b0390811682526020820192909252604001600020868155436002820181905560038201556004810180546001600160a01b03191692891692909217909155600c54909150611c849086612815565b600c556001810154600d54611c9e9163ffffffff61281516565b600d55600e805460010190557f39d12b1a9bde2a7e34304e5a951514ac2a0679475d0a8b35bedf400ebe8b506d611cd361286f565b6001830154604080516001600160a01b039384168152436020820152928a1683820152606083018990526080830191909152519081900360a00190a17f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166362ad1b83611d4661286f565b6040805160e084811b6001600160e01b03191682526001600160a01b03939093166004820152306024820152604481018a905260a06064820152600060a48201819052608482019390935260e481018390529051610124808301939282900301818387803b158015611db757600080fd5b505af1158015611dcb573d6000803e3d6000fd5b505060016009555050505050505050565b60008060008060008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d95b6371308a6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160a01b03166001600160a01b031681526020019250505060206040518083038186803b158015611e7757600080fd5b505afa158015611e8b573d6000803e3d6000fd5b505050506040513d6020811015611ea157600080fd5b5051604080516370a0823160e01b81526001600160a01b038b8116600483015291519293506000927f0000000000000000000000000000000000000000000000000000000000000000909216916370a0823191602480820192602092909190829003018186803b158015611f1457600080fd5b505afa158015611f28573d6000803e3d6000fd5b505050506040513d6020811015611f3e57600080fd5b505190506000611f4d8a6113ad565b90506000611f59611475565b90506000611f6561252e565b439d959c50939a5091985096509094509092505050565b60026009541415611fc2576040805162461bcd60e51b815260206004820152601f60248201526000805160206137b9833981519152604482015290519081900360640190fd5b60026009558160016001600160a01b0382166000908152600b602052604090205461201e5760405162461bcd60e51b8152600401808060200182810382526037815260200180613b6f6037913960400191505060405180910390fd5b60008311612068576040805162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc818dbdb5c1bdcdd60721b604482015290519081900360640190fd5b6001600160a01b0384166000908152600b602052604090206001810154612095908563ffffffff61281516565b6001820155600d546120ad908563ffffffff61281516565b600d557f50d5021e89f71b9bd30ac0fbb4c129df45b513ca20d18835fb739f2a784f5cf96120d961286f565b604080516001600160a01b0392831681529188166020830152818101879052519081900360600190a161213361210d61286f565b8560405180602001604052806000815250604051806020016040528060008152506132c3565b50506001600955505050565b6001600160a01b0381166000908152600b602052604081208054612168576127109150506113a8565b60028101546000906121a0907f000000000000000000000000000000000000000000000000000000000000000063ffffffff61281516565b9050804310156121b657612710925050506113a8565b60006121f861271061145b7f000000000000000000000000000000000000000000000000000000000000000061134e614e2061135a438963ffffffff6131d016565b905060006113f8617530836132ad565b6002600954141561224e576040805162461bcd60e51b815260206004820152601f60248201526000805160206137b9833981519152604482015290519081900360640190fd5b600260098190556001600160a01b0384166000908152600b6020526040902001548390431480159061229b57506001600160a01b0381166000908152600b60205260409020600301544314155b6122d65760405162461bcd60e51b81526004018080602001828103825260398152602001806138476039913960400191505060405180910390fd5b8360016001600160a01b0382166000908152600b602052604090205461232d5760405162461bcd60e51b8152600401808060200182810382526037815260200180613b6f6037913960400191505060405180910390fd5b4384111561236c5760405162461bcd60e51b8152600401808060200182810382526028815260200180613aeb6028913960400191505060405180910390fd5b6001600160a01b0386166000908152600b60205260409020600381015485116123c65760405162461bcd60e51b81526004018080602001828103825260328152602001806139d56032913960400191505060405180910390fd5b6123ce61286f565b60048201546001600160a01b0390811691161461241c5760405162461bcd60e51b81526004018080602001828103825260388152602001806138c66038913960400191505060405180910390fd5b60006124288887611214565b905060008111612474576040805162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc81a185c9d995cdd60721b604482015290519081900360640190fd5b600382018690557fb757d83b4531499e2d84501fbd6edd8467f4aa78b20051773e245c703fb891db6124a461286f565b604080516001600160a01b039283168152436020820152828c1681830152918a1660608301526080820189905260a08201849052519081900360c00190a161250c87826040518060200160405280600081525060405180602001604052806000815250613509565b50506001600955505050505050565b683635c9adc5dea0000081565b61753081565b6000600c546000141561254357506000610e9b565b60006114ac600e5461134e600c5461134e6402540be400600d5461321290919063ffffffff16565b6000816001600160a01b0316836001600160a01b031614806125d657506001600160a01b03831660009081526005602052604090205460ff1680156125d657506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b8061260657506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b600e5481565b620186a081565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b61264d61286f565b6001600160a01b0316816001600160a01b0316141561269d5760405162461bcd60e51b81526004018080602001828103825260218152602001806139386021913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff1615612709576001600760006126cc61286f565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff1916911515919091179055612747565b6006600061271561286f565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff191690555b61274f61286f565b6001600160a01b0316816001600160a01b03167f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa160405160405180910390a350565b6127a261279c61286f565b8561256b565b6127dd5760405162461bcd60e51b815260040180806020018281038252602c815260200180613ba6602c913960400191505060405180910390fd5b6127e9848484846132c3565b50505050565b6128116127fa61286f565b8383604051806020016040528060008152506132c3565b5050565b600082820183811015612606576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b6001600160a01b0383166128b85760405162461bcd60e51b81526004018080602001828103825260258152602001806137d96025913960400191505060405180910390fd5b6001600160a01b0382166128fd5760405162461bcd60e51b8152600401808060200182810382526023815260200180613c446023913960400191505060405180910390fd5b6001600160a01b03808416600081815260086020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6040805163555ddc6560e11b81526001600160a01b03871660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe89560248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b1580156129e357600080fd5b505afa1580156129f7573d6000803e3d6000fd5b505050506040513d6020811015612a0d57600080fd5b505190506001600160a01b03811615612b9e57806001600160a01b03166375ab97828888888888886040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015612ad3578181015183820152602001612abb565b50505050905090810190601f168015612b005780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015612b33578181015183820152602001612b1b565b50505050905090810190601f168015612b605780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b158015612b8557600080fd5b505af1158015612b99573d6000803e3d6000fd5b505050505b50505050505050565b612bb3868686866127e9565b612bf683604051806060016040528060278152602001613820602791396001600160a01b038816600090815260208190526040902054919063ffffffff612dcc16565b6001600160a01b038087166000908152602081905260408082209390935590861681522054612c2b908463ffffffff61281516565b600080866001600160a01b03166001600160a01b0316815260200190815260200160002081905550836001600160a01b0316856001600160a01b0316876001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015612cdc578181015183820152602001612cc4565b50505050905090810190601f168015612d095780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015612d3c578181015183820152602001612d24565b50505050905090810190601f168015612d695780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a4836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050565b60008184841115612e5b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612e20578181015183820152602001612e08565b50505050905090810190601f168015612e4d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6040805163555ddc6560e11b81526001600160a01b03871660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b158015612ee757600080fd5b505afa158015612efb573d6000803e3d6000fd5b505050506040513d6020811015612f1157600080fd5b505190506001600160a01b038116156130a557806001600160a01b03166223de298989898989896040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015612fd6578181015183820152602001612fbe565b50505050905090810190601f1680156130035780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561303657818101518382015260200161301e565b50505050905090810190601f1680156130635780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b15801561308857600080fd5b505af115801561309c573d6000803e3d6000fd5b50505050610e2b565b8115610e2b576130bd866001600160a01b031661374d565b15610e2b5760405162461bcd60e51b815260040180806020018281038252604d815260200180613a28604d913960600191505060405180910390fd5b6001600160a01b03861661313e5760405162461bcd60e51b81526004018080602001828103825260228152602001806137fe6022913960400191505060405180910390fd5b6001600160a01b038516613199576040805162461bcd60e51b815260206004820181905260248201527f4552433737373a2073656e6420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b60006131a361286f565b90506131b381888888888861295f565b6131c1818888888888612ba7565b612b9e81888888888888612e63565b600061260683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612dcc565b60008261322157506000610f46565b8282028284828161322e57fe5b04146126065760405162461bcd60e51b8152600401808060200182810382526021815260200180613a076021913960400191505060405180910390fd5b600061260683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613753565b60008183106132bc5781612606565b5090919050565b6001600160a01b0384166133085760405162461bcd60e51b81526004018080602001828103825260228152602001806138806022913960400191505060405180910390fd5b600061331261286f565b905061332181866000876127e9565b6133308186600087878761295f565b61337384604051806060016040528060238152602001613c21602391396001600160a01b038816600090815260208190526040902054919063ffffffff612dcc16565b6001600160a01b03861660009081526020819052604090205560015461339f908563ffffffff6131d016565b600181905550846001600160a01b0316816001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561342457818101518382015260200161340c565b50505050905090810190601f1680156134515780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561348457818101518382015260200161346c565b50505050905090810190601f1680156134b15780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a36040805185815290516000916001600160a01b038816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050505050565b6001600160a01b038416613564576040805162461bcd60e51b815260206004820181905260248201527f4552433737373a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b600061356e61286f565b905061357d81600087876127e9565b600154613590908563ffffffff61281516565b6001556001600160a01b0385166000908152602081905260409020546135bc908563ffffffff61281516565b6001600160a01b0386166000908152602081905260408120919091556135e9908290878787876001612e63565b846001600160a01b0316816001600160a01b03167f2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015613668578181015183820152602001613650565b50505050905090810190601f1680156136955780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156136c85781810151838201526020016136b0565b50505050905090810190601f1680156136f55780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a36040805185815290516001600160a01b038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050505050565b3b151590565b600081836137a25760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e20578181015183820152602001612e08565b5060008385816137ae57fe5b049594505050505056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004552433737373a20617070726f76652066726f6d20746865207a65726f20616464726573734552433737373a2073656e642066726f6d20746865207a65726f20616464726573734552433737373a207472616e7366657220616d6f756e7420657863656564732062616c616e6365596f752063616e206e6f7420616c6c6f636174652f72656c65617365206f72206861727665737420696e207468652073616d6520626c6f636b4552433737373a206275726e2066726f6d20746865207a65726f20616464726573734552433737373a20617574686f72697a696e672073656c66206173206f70657261746f72596f75206d757374206265207468652064656c65676174656420686172766573746572206f662074686520736f7572636541646472657373596f75206d7573742070726f76696465206120706f73697469766520616d6f756e74206f66204c414e4420746f206275696c642061206661726d4552433737373a207265766f6b696e672073656c66206173206f70657261746f72596f752063616e206f6e6c79207370656369667920626c6f636b73206174206f72206168656164206f66206c6173742068617276657374656420626c6f636b596f752063616e206f6e6c7920616c6c6f636174652061206d6178696d756d206f662031303030204c414e4420647572696e67206661696c736166652e596f752063616e206f6e6c792068617276657374206168656164206f66206c6173742068617276657374656420626c6f636b536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433737373a20746f6b656e20726563697069656e7420636f6e747261637420686173206e6f20696d706c656d656e74657220666f7220455243373737546f6b656e73526563697069656e7446756e6473206d75737420626520636f6d696e6720696e746f206120434f524e20746f6b656e4552433737373a207472616e7366657220746f20746865207a65726f2061646472657373596f75206d7573742072656365697665206120706f736974697665206e756d626572206f6620746f6b656e73596f752063616e206f6e6c79206861727665737420757020746f2063757272656e7420626c6f636b4f6e6c7920434f524e20636f6e74726163742063616e2073656e6420697473656c66204c414e4420746f6b656e7357687920776f756c6420434f524e20636f6e74726163742073656e6420746f6b656e7320746f20697473656c663f596f75206d757374206861766520616c6c6f6361746564206c616e6420746f2067726f772063726f7073206f6e20796f7572206661726d4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f7220666f7220686f6c6465724552433737373a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654552433737373a207472616e736665722066726f6d20746865207a65726f20616464726573734552433737373a206275726e20616d6f756e7420657863656564732062616c616e63654552433737373a20617070726f766520746f20746865207a65726f2061646472657373596f752063616e206f6e6c792063616c63756c61746520757020746f2063757272656e7420626c6f636ba26469706673582212202490185c41393a09183c37c40e89fef715f8f38a4f782de8f124a1020e2229de64736f6c63430006090033656e644d61747572697479426f6f7374206d757374206265206174206c65617374203120626c6f636b20286d696e20323420686f757273206265666f72652074696d65206661726d206d617475726174696f6e20737461727473290000000000000000000000003258cd8134b6b28e814772dd91d5ecceea5128180000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000002bc00000000000000000000000000000000000000000000000000000000000002bc00

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061025d5760003560e01c806386d1a69f11610146578063c2ceb95f116100c3578063d9f04bc511610087578063d9f04bc514610a33578063db97fc9214610a3b578063dd62ed3e14610a43578063fad8b32a14610a71578063fc673c4f14610a97578063fe9d930314610bd55761025d565b8063c2ceb95f146109b7578063c2f028e2146109ed578063c7a18160146109f5578063d883f4c1146109fd578063d95b637114610a055761025d565b8063a9059cbb1161010a578063a9059cbb146108b4578063b78b52df146108e0578063be6ca56d1461090c578063c018101714610965578063c11aad6e146109915761025d565b806386d1a69f14610797578063959b8c3f1461079f57806395d89b41146107c55780639bd9bbc6146107cd578063a5b78c4b146108865761025d565b806338fd8033116101df578063658edb99116101a3578063658edb99146106e957806370295f9d146106f157806370a082311461071d578063710b2d8c1461074357806376053425146107695780637e3fa2b91461078f5761025d565b806338fd80331461052e578063421adfa0146105365780634de6d9eb14610590578063556f0dc71461059857806362ad1b83146105a05761025d565b806318160ddd1161022657806318160ddd1461047957806323b872dd146104815780633133e3ab146104b7578063313ce56714610508578063389b7b5b146105265761025d565b806223de2914610262578063059b3eb11461034a57806306e485381461036457806306fdde03146103bc578063095ea7b314610439575b600080fd5b610348600480360360c081101561027857600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b8111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460018302840111600160201b831117156102ed57600080fd5b919390929091602081019035600160201b81111561030a57600080fd5b82018360208201111561031c57600080fd5b803590602001918460018302840111600160201b8311171561033d57600080fd5b509092509050610c80565b005b610352610e35565b60408051918252519081900360200190f35b61036c610e3b565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103a8578181015183820152602001610390565b505050509050019250505060405180910390f35b6103c4610e9e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103fe5781810151838201526020016103e6565b50505050905090810190601f16801561042b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104656004803603604081101561044f57600080fd5b506001600160a01b038135169060200135610f28565b604080519115158252519081900360200190f35b610352610f4c565b6104656004803603606081101561049757600080fd5b506001600160a01b03813581169160208101359091169060400135610f52565b6104dd600480360360208110156104cd57600080fd5b50356001600160a01b03166110d5565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b610510611124565b6040805160ff9092168252519081900360200190f35b6104dd611129565b610352611162565b61055c6004803603602081101561054c57600080fd5b50356001600160a01b0316611169565b6040805195865260208601949094528484019290925260608401526001600160a01b03166080830152519081900360a00190f35b6103526111a1565b6103526111a7565b610348600480360360a08110156105b657600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156105f057600080fd5b82018360208201111561060257600080fd5b803590602001918460018302840111600160201b8311171561062357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561067557600080fd5b82018360208201111561068757600080fd5b803590602001918460018302840111600160201b831117156106a857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506111ac945050505050565b61035261120e565b6103526004803603604081101561070757600080fd5b506001600160a01b038135169060200135611214565b6103526004803603602081101561073357600080fd5b50356001600160a01b031661138e565b6103526004803603602081101561075957600080fd5b50356001600160a01b03166113ad565b6103526004803603602081101561077f57600080fd5b50356001600160a01b0316611402565b610352611475565b6103486114b2565b610348600480360360208110156107b557600080fd5b50356001600160a01b0316611767565b6103c46118b3565b610348600480360360608110156107e357600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561081257600080fd5b82018360208201111561082457600080fd5b803590602001918460018302840111600160201b8311171561084557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611914945050505050565b61088e61193e565b604080519485526020850193909352838301919091526060830152519081900360800190f35b610465600480360360408110156108ca57600080fd5b506001600160a01b038135169060200135611952565b610348600480360360408110156108f657600080fd5b506001600160a01b038135169060200135611a2b565b6109326004803603602081101561092257600080fd5b50356001600160a01b0316611ddc565b604080519687529415156020870152858501939093526060850191909152608084015260a0830152519081900360c00190f35b6103486004803603604081101561097b57600080fd5b506001600160a01b038135169060200135611f7c565b610352600480360360208110156109a757600080fd5b50356001600160a01b031661213f565b610348600480360360608110156109cd57600080fd5b506001600160a01b03813581169160208101359091169060400135612208565b61035261251b565b610352612528565b61035261252e565b61046560048036036040811015610a1b57600080fd5b506001600160a01b038135811691602001351661256b565b61035261260d565b610352612613565b61035260048036036040811015610a5957600080fd5b506001600160a01b038135811691602001351661261a565b61034860048036036020811015610a8757600080fd5b50356001600160a01b0316612645565b61034860048036036080811015610aad57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b811115610adc57600080fd5b820183602082011115610aee57600080fd5b803590602001918460018302840111600160201b83111715610b0f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610b6157600080fd5b820183602082011115610b7357600080fd5b803590602001918460018302840111600160201b83111715610b9457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612791945050505050565b61034860048036036040811015610beb57600080fd5b81359190810190604081016020820135600160201b811115610c0c57600080fd5b820183602082011115610c1e57600080fd5b803590602001918460018302840111600160201b83111715610c3f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506127ef945050505050565b60008511610cbf5760405162461bcd60e51b815260040180806020018281038252602c815260200180613abf602c913960400191505060405180910390fd5b7f0000000000000000000000003258cd8134b6b28e814772dd91d5ecceea5128186001600160a01b0316610cf161286f565b6001600160a01b031614610d4c576040805162461bcd60e51b815260206004820181905260248201527f596f752063616e206f6e6c79206275696c64206661726d73206f6e204c414e44604482015290519081900360640190fd5b6001600160a01b0388163014610d935760405162461bcd60e51b815260040180806020018281038252602e815260200180613b13602e913960400191505060405180910390fd5b6001600160a01b0386163014610dda5760405162461bcd60e51b8152600401808060200182810382526026815260200180613a756026913960400191505060405180910390fd5b856001600160a01b0316876001600160a01b03161415610e2b5760405162461bcd60e51b815260040180806020018281038252602e815260200180613b41602e913960400191505060405180910390fd5b5050505050505050565b600c5481565b60606004805480602002602001604051908101604052809291908181526020018280548015610e9357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e75575b505050505090505b90565b60028054604080516020601f6000196101006001871615020190941685900493840181900481028201810190925282815260609390929091830182828015610e935780601f10610efc57610100808354040283529160200191610e93565b820191906000526020600020905b815481529060010190602001808311610f0a57509395945050505050565b600080610f3361286f565b9050610f40818585612873565b60019150505b92915050565b60015490565b60006001600160a01b038316610f995760405162461bcd60e51b8152600401808060200182810382526024815260200180613a9b6024913960400191505060405180910390fd5b6001600160a01b038416610fde5760405162461bcd60e51b8152600401808060200182810382526026815260200180613bfb6026913960400191505060405180910390fd5b6000610fe861286f565b905061101681868686604051806020016040528060008152506040518060200160405280600081525061295f565b611042818686866040518060200160405280600081525060405180602001604052806000815250612ba7565b61109c858261109786604051806060016040528060298152602001613bd2602991396001600160a01b03808c166000908152600860209081526040808320938b1683529290522054919063ffffffff612dcc16565b612873565b6110ca8186868660405180602001604052806000815250604051806020016040528060008152506000612e63565b506001949350505050565b6000806000806000806110e78761138e565b905060006110f58843611214565b905060006111028961213f565b9050600061110f8a611402565b439b949a509298509096509094509092505050565b601290565b60008060008060008061113a611475565b9050600061114661252e565b600e54600c54600d54919a949950919750909550935090915050565b62041a0081565b600b6020526000908152604090208054600182015460028301546003840154600490940154929391929091906001600160a01b031685565b614e2081565b600190565b6111bd6111b761286f565b8661256b565b6111f85760405162461bcd60e51b815260040180806020018281038252602c815260200180613ba6602c913960400191505060405180910390fd5b611207858585858560016130f9565b5050505050565b600d5481565b6001600160a01b0382166000908152600b60205260408120805461123c576000915050610f46565b4383111561127b5760405162461bcd60e51b815260040180806020018281038252602a815260200180613c67602a913960400191505060405180910390fd5b82816003015411156112be5760405162461bcd60e51b815260040180806020018281038252603f815260200180613959603f913960400191505060405180910390fd5b60038101546000906112d99062041a0063ffffffff61281516565b905062041a00818510156113005760038301546112fd90869063ffffffff6131d016565b90505b82546000611314828463ffffffff61321216565b9050600061132189611402565b9050600061132e8a61213f565b9050600061136661271061134e8461135a83838a8a63ffffffff61321216565b9063ffffffff61326b16565b9063ffffffff61321216565b9050600061137e826305f5e10063ffffffff61326b16565b9c9b505050505050505050505050565b6001600160a01b0381166000908152602081905260409020545b919050565b6001600160a01b0381166000908152600b6020526040812080546001820154816113dd57600093505050506113a8565b60006113f88361134e846402540be40063ffffffff61321216565b9695505050505050565b60008061140e836113ad565b9050600061141a611475565b9050801580611427575081155b1561143857612710925050506113a8565b600061146c620186a061146761271061145b8661134e898463ffffffff61321216565b9063ffffffff61281516565b6132ad565b95945050505050565b6000600c546000141561148a57506000610e9b565b60006114ac600c5461134e6402540be400600d5461321290919063ffffffff16565b91505090565b600260095414156114f8576040805162461bcd60e51b815260206004820152601f60248201526000805160206137b9833981519152604482015290519081900360640190fd5b600260095561150561286f565b6001600160a01b0381166000908152600b6020526040902060020154431480159061154b57506001600160a01b0381166000908152600b60205260409020600301544314155b6115865760405162461bcd60e51b81526004018080602001828103825260398152602001806138476039913960400191505060405180910390fd5b61158e61286f565b60016001600160a01b0382166000908152600b60205260409020546115e45760405162461bcd60e51b8152600401808060200182810382526037815260200180613b6f6037913960400191505060405180910390fd5b6000600b60006115f261286f565b6001600160a01b03168152602081019190915260400160009081208054918155600c54909250611628908263ffffffff6131d016565b600c556001820154600d546116429163ffffffff6131d016565b600d55600e5461165990600163ffffffff6131d016565b600e557f82e416ba72d10e709b5de7ac16f5f49ff1d94f22d55bf582d353d3c313a1e8dd61168561286f565b6001840154604080516001600160a01b0390931683526020830185905282810191909152519081900360600190a17f0000000000000000000000003258cd8134b6b28e814772dd91d5ecceea5128186001600160a01b0316639bd9bbc66116ea61286f565b604080516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820185905260606044830152600060648301819052905160a48084019382900301818387803b15801561174357600080fd5b505af1158015611757573d6000803e3d6000fd5b5050600160095550505050505050565b806001600160a01b031661177961286f565b6001600160a01b031614156117bf5760405162461bcd60e51b81526004018080602001828103825260248152602001806138a26024913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff161561182257600760006117ec61286f565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff19169055611869565b60016006600061183061286f565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff19169115159190911790555b61187161286f565b6001600160a01b0316816001600160a01b03167ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f960405160405180910390a350565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610e935780601f10610efc57610100808354040283529160200191610e93565b61193961191f61286f565b8484846040518060200160405280600081525060016130f9565b505050565b620186a061753062041a00614e2090919293565b60006001600160a01b0383166119995760405162461bcd60e51b8152600401808060200182810382526024815260200180613a9b6024913960400191505060405180910390fd5b60006119a361286f565b90506119d181828686604051806020016040528060008152506040518060200160405280600081525061295f565b6119fd818286866040518060200160405280600081525060405180602001604052806000815250612ba7565b610f408182868660405180602001604052806000815250604051806020016040528060008152506000612e63565b60026009541415611a71576040805162461bcd60e51b815260206004820152601f60248201526000805160206137b9833981519152604482015290519081900360640190fd5b6002600955611a7e61286f565b6001600160a01b0381166000908152600b60205260409020600201544314801590611ac457506001600160a01b0381166000908152600b60205260409020600301544314155b611aff5760405162461bcd60e51b81526004018080602001828103825260398152602001806138476039913960400191505060405180910390fd5b611b0761286f565b6001600160a01b0381166000908152600b602052604081205415611b72576040805162461bcd60e51b815260206004820181905260248201527f596f75206d75737420686176652072656c656173656420796f7572206c616e64604482015290519081900360640190fd5b60008411611bb15760405162461bcd60e51b815260040180806020018281038252603a8152602001806138fe603a913960400191505060405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000b4bdb5431015611c2157683635c9adc5dea00000841115611c215760405162461bcd60e51b815260040180806020018281038252603d815260200180613998603d913960400191505060405180910390fd5b6000600b6000611c2f61286f565b6001600160a01b0390811682526020820192909252604001600020868155436002820181905560038201556004810180546001600160a01b03191692891692909217909155600c54909150611c849086612815565b600c556001810154600d54611c9e9163ffffffff61281516565b600d55600e805460010190557f39d12b1a9bde2a7e34304e5a951514ac2a0679475d0a8b35bedf400ebe8b506d611cd361286f565b6001830154604080516001600160a01b039384168152436020820152928a1683820152606083018990526080830191909152519081900360a00190a17f0000000000000000000000003258cd8134b6b28e814772dd91d5ecceea5128186001600160a01b03166362ad1b83611d4661286f565b6040805160e084811b6001600160e01b03191682526001600160a01b03939093166004820152306024820152604481018a905260a06064820152600060a48201819052608482019390935260e481018390529051610124808301939282900301818387803b158015611db757600080fd5b505af1158015611dcb573d6000803e3d6000fd5b505060016009555050505050505050565b60008060008060008060007f0000000000000000000000003258cd8134b6b28e814772dd91d5ecceea5128186001600160a01b031663d95b6371308a6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160a01b03166001600160a01b031681526020019250505060206040518083038186803b158015611e7757600080fd5b505afa158015611e8b573d6000803e3d6000fd5b505050506040513d6020811015611ea157600080fd5b5051604080516370a0823160e01b81526001600160a01b038b8116600483015291519293506000927f0000000000000000000000003258cd8134b6b28e814772dd91d5ecceea512818909216916370a0823191602480820192602092909190829003018186803b158015611f1457600080fd5b505afa158015611f28573d6000803e3d6000fd5b505050506040513d6020811015611f3e57600080fd5b505190506000611f4d8a6113ad565b90506000611f59611475565b90506000611f6561252e565b439d959c50939a5091985096509094509092505050565b60026009541415611fc2576040805162461bcd60e51b815260206004820152601f60248201526000805160206137b9833981519152604482015290519081900360640190fd5b60026009558160016001600160a01b0382166000908152600b602052604090205461201e5760405162461bcd60e51b8152600401808060200182810382526037815260200180613b6f6037913960400191505060405180910390fd5b60008311612068576040805162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc818dbdb5c1bdcdd60721b604482015290519081900360640190fd5b6001600160a01b0384166000908152600b602052604090206001810154612095908563ffffffff61281516565b6001820155600d546120ad908563ffffffff61281516565b600d557f50d5021e89f71b9bd30ac0fbb4c129df45b513ca20d18835fb739f2a784f5cf96120d961286f565b604080516001600160a01b0392831681529188166020830152818101879052519081900360600190a161213361210d61286f565b8560405180602001604052806000815250604051806020016040528060008152506132c3565b50506001600955505050565b6001600160a01b0381166000908152600b602052604081208054612168576127109150506113a8565b60028101546000906121a0907f000000000000000000000000000000000000000000000000000000000000190063ffffffff61281516565b9050804310156121b657612710925050506113a8565b60006121f861271061145b7f000000000000000000000000000000000000000000000000000000000002bc0061134e614e2061135a438963ffffffff6131d016565b905060006113f8617530836132ad565b6002600954141561224e576040805162461bcd60e51b815260206004820152601f60248201526000805160206137b9833981519152604482015290519081900360640190fd5b600260098190556001600160a01b0384166000908152600b6020526040902001548390431480159061229b57506001600160a01b0381166000908152600b60205260409020600301544314155b6122d65760405162461bcd60e51b81526004018080602001828103825260398152602001806138476039913960400191505060405180910390fd5b8360016001600160a01b0382166000908152600b602052604090205461232d5760405162461bcd60e51b8152600401808060200182810382526037815260200180613b6f6037913960400191505060405180910390fd5b4384111561236c5760405162461bcd60e51b8152600401808060200182810382526028815260200180613aeb6028913960400191505060405180910390fd5b6001600160a01b0386166000908152600b60205260409020600381015485116123c65760405162461bcd60e51b81526004018080602001828103825260328152602001806139d56032913960400191505060405180910390fd5b6123ce61286f565b60048201546001600160a01b0390811691161461241c5760405162461bcd60e51b81526004018080602001828103825260388152602001806138c66038913960400191505060405180910390fd5b60006124288887611214565b905060008111612474576040805162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc81a185c9d995cdd60721b604482015290519081900360640190fd5b600382018690557fb757d83b4531499e2d84501fbd6edd8467f4aa78b20051773e245c703fb891db6124a461286f565b604080516001600160a01b039283168152436020820152828c1681830152918a1660608301526080820189905260a08201849052519081900360c00190a161250c87826040518060200160405280600081525060405180602001604052806000815250613509565b50506001600955505050505050565b683635c9adc5dea0000081565b61753081565b6000600c546000141561254357506000610e9b565b60006114ac600e5461134e600c5461134e6402540be400600d5461321290919063ffffffff16565b6000816001600160a01b0316836001600160a01b031614806125d657506001600160a01b03831660009081526005602052604090205460ff1680156125d657506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b8061260657506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b600e5481565b620186a081565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b61264d61286f565b6001600160a01b0316816001600160a01b0316141561269d5760405162461bcd60e51b81526004018080602001828103825260218152602001806139386021913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff1615612709576001600760006126cc61286f565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff1916911515919091179055612747565b6006600061271561286f565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff191690555b61274f61286f565b6001600160a01b0316816001600160a01b03167f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa160405160405180910390a350565b6127a261279c61286f565b8561256b565b6127dd5760405162461bcd60e51b815260040180806020018281038252602c815260200180613ba6602c913960400191505060405180910390fd5b6127e9848484846132c3565b50505050565b6128116127fa61286f565b8383604051806020016040528060008152506132c3565b5050565b600082820183811015612606576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b6001600160a01b0383166128b85760405162461bcd60e51b81526004018080602001828103825260258152602001806137d96025913960400191505060405180910390fd5b6001600160a01b0382166128fd5760405162461bcd60e51b8152600401808060200182810382526023815260200180613c446023913960400191505060405180910390fd5b6001600160a01b03808416600081815260086020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6040805163555ddc6560e11b81526001600160a01b03871660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe89560248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b1580156129e357600080fd5b505afa1580156129f7573d6000803e3d6000fd5b505050506040513d6020811015612a0d57600080fd5b505190506001600160a01b03811615612b9e57806001600160a01b03166375ab97828888888888886040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015612ad3578181015183820152602001612abb565b50505050905090810190601f168015612b005780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015612b33578181015183820152602001612b1b565b50505050905090810190601f168015612b605780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b158015612b8557600080fd5b505af1158015612b99573d6000803e3d6000fd5b505050505b50505050505050565b612bb3868686866127e9565b612bf683604051806060016040528060278152602001613820602791396001600160a01b038816600090815260208190526040902054919063ffffffff612dcc16565b6001600160a01b038087166000908152602081905260408082209390935590861681522054612c2b908463ffffffff61281516565b600080866001600160a01b03166001600160a01b0316815260200190815260200160002081905550836001600160a01b0316856001600160a01b0316876001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015612cdc578181015183820152602001612cc4565b50505050905090810190601f168015612d095780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015612d3c578181015183820152602001612d24565b50505050905090810190601f168015612d695780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a4836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050565b60008184841115612e5b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612e20578181015183820152602001612e08565b50505050905090810190601f168015612e4d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6040805163555ddc6560e11b81526001600160a01b03871660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b158015612ee757600080fd5b505afa158015612efb573d6000803e3d6000fd5b505050506040513d6020811015612f1157600080fd5b505190506001600160a01b038116156130a557806001600160a01b03166223de298989898989896040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015612fd6578181015183820152602001612fbe565b50505050905090810190601f1680156130035780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561303657818101518382015260200161301e565b50505050905090810190601f1680156130635780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b15801561308857600080fd5b505af115801561309c573d6000803e3d6000fd5b50505050610e2b565b8115610e2b576130bd866001600160a01b031661374d565b15610e2b5760405162461bcd60e51b815260040180806020018281038252604d815260200180613a28604d913960600191505060405180910390fd5b6001600160a01b03861661313e5760405162461bcd60e51b81526004018080602001828103825260228152602001806137fe6022913960400191505060405180910390fd5b6001600160a01b038516613199576040805162461bcd60e51b815260206004820181905260248201527f4552433737373a2073656e6420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b60006131a361286f565b90506131b381888888888861295f565b6131c1818888888888612ba7565b612b9e81888888888888612e63565b600061260683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612dcc565b60008261322157506000610f46565b8282028284828161322e57fe5b04146126065760405162461bcd60e51b8152600401808060200182810382526021815260200180613a076021913960400191505060405180910390fd5b600061260683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613753565b60008183106132bc5781612606565b5090919050565b6001600160a01b0384166133085760405162461bcd60e51b81526004018080602001828103825260228152602001806138806022913960400191505060405180910390fd5b600061331261286f565b905061332181866000876127e9565b6133308186600087878761295f565b61337384604051806060016040528060238152602001613c21602391396001600160a01b038816600090815260208190526040902054919063ffffffff612dcc16565b6001600160a01b03861660009081526020819052604090205560015461339f908563ffffffff6131d016565b600181905550846001600160a01b0316816001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561342457818101518382015260200161340c565b50505050905090810190601f1680156134515780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561348457818101518382015260200161346c565b50505050905090810190601f1680156134b15780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a36040805185815290516000916001600160a01b038816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050505050565b6001600160a01b038416613564576040805162461bcd60e51b815260206004820181905260248201527f4552433737373a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b600061356e61286f565b905061357d81600087876127e9565b600154613590908563ffffffff61281516565b6001556001600160a01b0385166000908152602081905260409020546135bc908563ffffffff61281516565b6001600160a01b0386166000908152602081905260408120919091556135e9908290878787876001612e63565b846001600160a01b0316816001600160a01b03167f2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015613668578181015183820152602001613650565b50505050905090810190601f1680156136955780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156136c85781810151838201526020016136b0565b50505050905090810190601f1680156136f55780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a36040805185815290516001600160a01b038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050505050565b3b151590565b600081836137a25760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e20578181015183820152602001612e08565b5060008385816137ae57fe5b049594505050505056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004552433737373a20617070726f76652066726f6d20746865207a65726f20616464726573734552433737373a2073656e642066726f6d20746865207a65726f20616464726573734552433737373a207472616e7366657220616d6f756e7420657863656564732062616c616e6365596f752063616e206e6f7420616c6c6f636174652f72656c65617365206f72206861727665737420696e207468652073616d6520626c6f636b4552433737373a206275726e2066726f6d20746865207a65726f20616464726573734552433737373a20617574686f72697a696e672073656c66206173206f70657261746f72596f75206d757374206265207468652064656c65676174656420686172766573746572206f662074686520736f7572636541646472657373596f75206d7573742070726f76696465206120706f73697469766520616d6f756e74206f66204c414e4420746f206275696c642061206661726d4552433737373a207265766f6b696e672073656c66206173206f70657261746f72596f752063616e206f6e6c79207370656369667920626c6f636b73206174206f72206168656164206f66206c6173742068617276657374656420626c6f636b596f752063616e206f6e6c7920616c6c6f636174652061206d6178696d756d206f662031303030204c414e4420647572696e67206661696c736166652e596f752063616e206f6e6c792068617276657374206168656164206f66206c6173742068617276657374656420626c6f636b536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433737373a20746f6b656e20726563697069656e7420636f6e747261637420686173206e6f20696d706c656d656e74657220666f7220455243373737546f6b656e73526563697069656e7446756e6473206d75737420626520636f6d696e6720696e746f206120434f524e20746f6b656e4552433737373a207472616e7366657220746f20746865207a65726f2061646472657373596f75206d7573742072656365697665206120706f736974697665206e756d626572206f6620746f6b656e73596f752063616e206f6e6c79206861727665737420757020746f2063757272656e7420626c6f636b4f6e6c7920434f524e20636f6e74726163742063616e2073656e6420697473656c66204c414e4420746f6b656e7357687920776f756c6420434f524e20636f6e74726163742073656e6420746f6b656e7320746f20697473656c663f596f75206d757374206861766520616c6c6f6361746564206c616e6420746f2067726f772063726f7073206f6e20796f7572206661726d4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f7220666f7220686f6c6465724552433737373a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654552433737373a207472616e736665722066726f6d20746865207a65726f20616464726573734552433737373a206275726e20616d6f756e7420657863656564732062616c616e63654552433737373a20617070726f766520746f20746865207a65726f2061646472657373596f752063616e206f6e6c792063616c63756c61746520757020746f2063757272656e7420626c6f636ba26469706673582212202490185c41393a09183c37c40e89fef715f8f38a4f782de8f124a1020e2229de64736f6c63430006090033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000003258cd8134b6b28e814772dd91d5ecceea5128180000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000002bc00000000000000000000000000000000000000000000000000000000000002bc00

-----Decoded View---------------
Arg [0] : token (address): 0x3258cd8134b6b28e814772dD91D5EcceEa512818
Arg [1] : startMaturityBoost (uint256): 6400
Arg [2] : endMaturityBoost (uint256): 179200
Arg [3] : failsafeBlockDuration (uint256): 179200

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000003258cd8134b6b28e814772dd91d5ecceea512818
Arg [1] : 0000000000000000000000000000000000000000000000000000000000001900
Arg [2] : 000000000000000000000000000000000000000000000000000000000002bc00
Arg [3] : 000000000000000000000000000000000000000000000000000000000002bc00


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.