ETH Price: $3,306.09 (-4.01%)
Gas: 5 Gwei

Contract

0xe8955E12Eed4A1686b232CfA5E30182317A00204
 
Transaction Hash
Method
Block
From
To
Emergency Withdr...124591802021-05-18 15:27:081163 days ago1621351628IN
0xe8955E12...317A00204
0 ETH0.00400814116
Withdraw124590692021-05-18 14:57:071163 days ago1621349827IN
0xe8955E12...317A00204
0 ETH0.0076410387
Migrate119201522021-02-24 13:39:551246 days ago1614173995IN
0xe8955E12...317A00204
0 ETH0.02039748236
Update Lp Token ...119201502021-02-24 13:39:271246 days ago1614173967IN
0xe8955E12...317A00204
0 ETH0.00338754236
Migrate119200292021-02-24 13:11:381246 days ago1614172298IN
0xe8955E12...317A00204
0 ETH0.01365594158
Update Lp Token ...119200292021-02-24 13:11:381246 days ago1614172298IN
0xe8955E12...317A00204
0 ETH0.0035045143
Migrate119199892021-02-24 13:02:191246 days ago1614171739IN
0xe8955E12...317A00204
0 ETH0.01218663141
Update Lp Token ...119199832021-02-24 13:01:111246 days ago1614171671IN
0xe8955E12...317A00204
0 ETH0.00182295127
Migrate119199582021-02-24 12:56:161246 days ago1614171376IN
0xe8955E12...317A00204
0 ETH0.01080225125
Update Lp Token ...119199532021-02-24 12:54:341246 days ago1614171274IN
0xe8955E12...317A00204
0 ETH0.00188037131
Update Lp Token ...119196032021-02-24 11:39:061246 days ago1614166746IN
0xe8955E12...317A00204
0 ETH0.00186602130
Set Migrator119196032021-02-24 11:39:061246 days ago1614166746IN
0xe8955E12...317A00204
0 ETH0.00370162130
Migrate119193212021-02-24 10:37:441246 days ago1614163064IN
0xe8955E12...317A00204
0 ETH0.01179911129
Set Migrator119193162021-02-24 10:36:141246 days ago1614162974IN
0xe8955E12...317A00204
0 ETH0.00361619127
Update Lp Token ...119190982021-02-24 9:49:261246 days ago1614160166IN
0xe8955E12...317A00204
0 ETH0.00244018170
Set Migrator119186682021-02-24 8:11:141246 days ago1614154274IN
0xe8955E12...317A00204
0 ETH0.0086948200
Withdraw115732662021-01-02 6:08:281299 days ago1609567708IN
0xe8955E12...317A00204
0 ETH0.0039065732.1
Withdraw115731782021-01-02 5:49:551299 days ago1609566595IN
0xe8955E12...317A00204
0 ETH0.0052929632.1
Withdraw113766442020-12-03 1:29:521329 days ago1606958992IN
0xe8955E12...317A00204
0 ETH0.0017159714.1
Withdraw113766442020-12-03 1:29:521329 days ago1606958992IN
0xe8955E12...317A00204
0 ETH0.0018044413.2
Withdraw113734592020-12-02 13:53:241330 days ago1606917204IN
0xe8955E12...317A00204
0 ETH0.0041091431
Withdraw113287022020-11-25 16:50:361337 days ago1606323036IN
0xe8955E12...317A00204
0 ETH0.0024461720.1
Withdraw113287022020-11-25 16:50:361337 days ago1606323036IN
0xe8955E12...317A00204
0 ETH0.0027476720.1
Deposit112900262020-11-19 18:09:141343 days ago1605809354IN
0xe8955E12...317A00204
0 ETH0.005410447.25
Deposit112900262020-11-19 18:09:141343 days ago1605809354IN
0xe8955E12...317A00204
0 ETH0.005410447.25
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Samurai

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 1 of 9: Samurai.sol
pragma solidity ^0.5.8;

import './IERC20.sol';
import './SafeMath.sol';
import './Ownable.sol';
import './SafeERC20.sol';
import './KatanaToken.sol';

interface IMigratorChef {
    // Perform LP token migration from legacy UniswapV2 to KatanaSwap.
    // Take the current LP token address and return the new LP token address.
    // Migrator should have full access to the caller's LP token.
    // Return the new LP token address.
    //
    // XXX Migrator must have allowance access to UniswapV2 LP tokens.
    // KatanaSwap must mint EXACTLY the same amount of KatanaSwap LP tokens or
    // else something bad will happen. Traditional UniswapV2 does not
    // do that so be careful!
    function migrate(IERC20 token) external returns (IERC20);
}

// Samurai is the master of Katana.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once KATANA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract Samurai is Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of KATANAs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accKatanaPerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. KATANAs to distribute per block.
        uint256 lastRewardBlock; // Last block number that KATANAs distribution occurs.
        uint256 accKatanaPerShare; // Accumulated KATANAs per share, times 1e12. See below.
    }

    // The KATANA TOKEN!
    KatanaToken public katana;
    // Dev address.
    address public devaddr;
    // Block number when bonus KATANA period ends.
    uint256 public bonusEndBlock;
    // KATANA tokens created per block.
    uint256 public katanaPerBlock;
    // Reward distribution end block
    uint256 public rewardsEndBlock;
    // Bonus muliplier for early katana makers.
    uint256 public constant BONUS_MULTIPLIER = 3;
    // The migrator contract. It has a lot of power. Can only be set through governance (owner).
    IMigratorChef public migrator;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    mapping(address => bool) public lpTokenExistsInPool;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Total allocation poitns. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when KATANA mining starts.
    uint256 public startBlock;

    uint256 public blockInAMonth = 97500;
    uint256 public halvePeriod = blockInAMonth;
    uint256 public lastHalveBlock;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );
    event Halve(uint256 newKatanaPerBlock, uint256 nextHalveBlockNumber);

    constructor(
        KatanaToken _katana,
        address _devaddr,
        uint256 _katanaPerBlock,
        uint256 _startBlock,
        uint256 _bonusEndBlock,
        uint256 _rewardsEndBlock
    ) public {
        katana = _katana;
        devaddr = _devaddr;
        katanaPerBlock = _katanaPerBlock;
        bonusEndBlock = _bonusEndBlock;
        startBlock = _startBlock;
        lastHalveBlock = _startBlock;
        rewardsEndBlock = _rewardsEndBlock;
    }

    function doHalvingCheck(bool _withUpdate) public {
        uint256 blockNumber = min(block.number, rewardsEndBlock);
        bool doHalve = blockNumber > lastHalveBlock + halvePeriod;
        if (!doHalve) {
            return;
        }
        uint256 newKatanaPerBlock = katanaPerBlock.div(2);
        katanaPerBlock = newKatanaPerBlock;
        lastHalveBlock = blockNumber;
        emit Halve(newKatanaPerBlock, blockNumber + halvePeriod);

        if (_withUpdate) {
            massUpdatePools();
        }
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    // Add a new lp to the pool. Can only be called by the owner.
    // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
    function add(
        uint256 _allocPoint,
        IERC20 _lpToken,
        bool _withUpdate
    ) public onlyOwner {
        require(
            !lpTokenExistsInPool[address(_lpToken)],
            'Samurai: LP Token Address already exists in pool'
        );
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 blockNumber = min(block.number, rewardsEndBlock);
        uint256 lastRewardBlock = blockNumber > startBlock
            ? blockNumber
            : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(
            PoolInfo({
                lpToken: _lpToken,
                allocPoint: _allocPoint,
                lastRewardBlock: lastRewardBlock,
                accKatanaPerShare: 0
            })
        );
        lpTokenExistsInPool[address(_lpToken)] = true;
    }

    function updateLpTokenExists(address _lpTokenAddr, bool _isExists)
        external
        onlyOwner
    {
        lpTokenExistsInPool[_lpTokenAddr] = _isExists;
    }

    // Update the given pool's KATANA allocation point. Can only be called by the owner.
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        bool _withUpdate
    ) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
            _allocPoint
        );
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    // Set the migrator contract. Can only be called by the owner.
    function setMigrator(IMigratorChef _migrator) public onlyOwner {
        migrator = _migrator;
    }

    function migrate(uint256 _pid) public onlyOwner {
        require(
            address(migrator) != address(0),
            'Samurai: Address of migrator is null'
        );
        PoolInfo storage pool = poolInfo[_pid];
        IERC20 lpToken = pool.lpToken;
        uint256 bal = lpToken.balanceOf(address(this));
        lpToken.safeApprove(address(migrator), bal);
        IERC20 newLpToken = migrator.migrate(lpToken);
        require(
            !lpTokenExistsInPool[address(newLpToken)],
            'Samurai: New LP Token Address already exists in pool'
        );
        require(
            bal == newLpToken.balanceOf(address(this)),
            'Samurai: New LP Token balance incorrect'
        );
        pool.lpToken = newLpToken;
        lpTokenExistsInPool[address(newLpToken)] = true;
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to)
        public
        view
        returns (uint256)
    {
        if (_to <= bonusEndBlock) {
            return _to.sub(_from).mul(BONUS_MULTIPLIER);
        } else if (_from >= bonusEndBlock) {
            return _to.sub(_from);
        } else {
            return
                bonusEndBlock.sub(_from).mul(BONUS_MULTIPLIER).add(
                    _to.sub(bonusEndBlock)
                );
        }
    }

    // View function to see pending KATANAs on frontend.
    function pendingKatana(uint256 _pid, address _user)
        external
        view
        returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accKatanaPerShare = pool.accKatanaPerShare;
        uint256 blockNumber = min(block.number, rewardsEndBlock);
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (blockNumber > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(
                pool.lastRewardBlock,
                blockNumber
            );
            uint256 katanaReward = multiplier
                .mul(katanaPerBlock)
                .mul(pool.allocPoint)
                .div(totalAllocPoint);
            accKatanaPerShare = accKatanaPerShare.add(
                katanaReward.mul(1e12).div(lpSupply)
            );
        }
        return user.amount.mul(accKatanaPerShare).div(1e12).sub(user.rewardDebt);
    }

    // Update reward vairables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        doHalvingCheck(false);
        PoolInfo storage pool = poolInfo[_pid];
        uint256 blockNumber = min(block.number, rewardsEndBlock);
        if (blockNumber <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0) {
            pool.lastRewardBlock = blockNumber;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, blockNumber);
        uint256 katanaReward = multiplier
            .mul(katanaPerBlock)
            .mul(pool.allocPoint)
            .div(totalAllocPoint);
        katana.mint(devaddr, katanaReward.div(10));
        katana.mint(address(this), katanaReward);
        pool.accKatanaPerShare = pool.accKatanaPerShare.add(
            katanaReward.mul(1e12).div(lpSupply)
        );
        pool.lastRewardBlock = blockNumber;
    }

    // Deposit LP tokens to Samurai for KATANA allocation.
    function deposit(uint256 _pid, uint256 _amount) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user
                .amount
                .mul(pool.accKatanaPerShare)
                .div(1e12)
                .sub(user.rewardDebt);
            safeKatanaTransfer(msg.sender, pending);
        }
        pool.lpToken.safeTransferFrom(
            address(msg.sender),
            address(this),
            _amount
        );
        user.amount = user.amount.add(_amount);
        user.rewardDebt = user.amount.mul(pool.accKatanaPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from Samurai.
    function withdraw(uint256 _pid, uint256 _amount) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(
            user.amount >= _amount,
            'Samurai: Insufficient Amount to withdraw'
        );
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accKatanaPerShare).div(1e12).sub(
            user.rewardDebt
        );
        safeKatanaTransfer(msg.sender, pending);
        user.amount = user.amount.sub(_amount);
        user.rewardDebt = user.amount.mul(pool.accKatanaPerShare).div(1e12);
        pool.lpToken.safeTransfer(address(msg.sender), _amount);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        pool.lpToken.safeTransfer(address(msg.sender), user.amount);
        emit EmergencyWithdraw(msg.sender, _pid, user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
    }

    // Safe katana transfer function, just in case if rounding error causes pool to not have enough KATANAs.
    function safeKatanaTransfer(address _to, uint256 _amount) internal {
        uint256 katanaBal = katana.balanceOf(address(this));
        if (_amount > katanaBal) {
            katana.transfer(_to, katanaBal);
        } else {
            katana.transfer(_to, _amount);
        }
    }

    function isRewardsActive() public view returns (bool) {
        return rewardsEndBlock > block.number;
    }

    function min(uint256 a, uint256 b) public view returns (uint256) {
        if (a > b) {
            return b;
        }
        return a;
    }

    // Update dev address by the previous dev.
    function dev(address _devaddr) public {
        require(
            msg.sender == devaddr,
            'Samurai: Sender is not the developer'
        );
        devaddr = _devaddr;
    }
}

File 2 of 9: Address.sol
pragma solidity ^0.5.8;

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


            bytes32 accountHash
         = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }

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

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

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

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

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

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

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

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

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

File 3 of 9: Context.sol
pragma solidity ^0.5.8;

/*
 * @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.
 */
contract Context {
    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

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

File 4 of 9: ERC20.sol
pragma solidity ^0.5.8;

import './SafeMath.sol';
import './Context.sol';
import './Address.sol';

/**
 * @dev Implementation of the {IERC20} 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}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context {
    using SafeMath for uint256;
    using Address for address;

    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

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

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender)
        public
        view
        returns (uint256)
    {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(
            sender,
            _msgSender(),
            _allowances[sender][_msgSender()].sub(
                amount,
                'ERC20: transfer amount exceeds allowance'
            )
        );
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue)
        public
        returns (bool)
    {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].add(addedValue)
        );
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue)
        public
        returns (bool)
    {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].sub(
                subtractedValue,
                'ERC20: decreased allowance below zero'
            )
        );
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal {
        require(sender != address(0), 'ERC20: transfer from the zero address');
        require(recipient != address(0), 'ERC20: transfer to the zero address');

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(
            amount,
            'ERC20: transfer amount exceeds balance'
        );
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal {
        require(account != address(0), 'ERC20: mint to the zero address');

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

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal {
        require(account != address(0), 'ERC20: burn from the zero address');

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

        _balances[account] = _balances[account].sub(
            amount,
            'ERC20: burn amount exceeds balance'
        );
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal {
        require(owner != address(0), 'ERC20: approve from the zero address');
        require(spender != address(0), 'ERC20: approve to the zero address');

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * 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 from,
        address to,
        uint256 amount
    ) internal {}

    /**
     * @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 5 of 9: IERC20.sol
pragma solidity ^0.5.8;

/**
 * @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 6 of 9: KatanaToken.sol
pragma solidity ^0.5.8;

import './Ownable.sol';
import './ERC20.sol';

// KatanaToken with Governance.
contract KatanaToken is ERC20('KatanaToken', 'KATANA'), Ownable {
    /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
        _moveDelegates(address(0), _delegates[_to], _amount);
    }

    // Copied and modified from YAM code:
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernanceStorage.sol
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernance.sol
    // Which is copied and modified from COMPOUND:
    // https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol

    /// @notice A record of each accounts delegate
    mapping(address => address) internal _delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping(address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256(
        'EIP712Domain(string name,uint256 chainId,address verifyingContract)'
    );

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH = keccak256(
        'Delegation(address delegatee,uint256 nonce,uint256 expiry)'
    );

    /// @notice A record of states for signing / validating signatures
    mapping(address => uint256) public nonces;

    /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(
        address indexed delegator,
        address indexed fromDelegate,
        address indexed toDelegate
    );

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(
        address indexed delegate,
        uint256 previousBalance,
        uint256 newBalance
    );

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegator The address to get delegatee for
     */
    function delegates(address delegator) external view returns (address) {
        return _delegates[delegator];
    }

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegatee The address to delegate votes to
     */
    function delegate(address delegatee) external {
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external {
        bytes32 domainSeparator = keccak256(
            abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), address(this))
        );

        bytes32 structHash = keccak256(
            abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)
        );

        bytes32 digest = keccak256(
            abi.encodePacked('\x19\x01', domainSeparator, structHash)
        );

        address signatory = ecrecover(digest, v, r, s);
        require(
            signatory != address(0),
            'KATANA::delegateBySig: invalid signature'
        );
        require(
            nonce == nonces[signatory]++,
            'KATANA::delegateBySig: invalid nonce'
        );
        require(now <= expiry, 'KATANA::delegateBySig: signature expired');
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account) external view returns (uint256) {
        uint32 nCheckpoints = numCheckpoints[account];
        return
            nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint256 blockNumber)
        external
        view
        returns (uint256)
    {
        require(
            blockNumber < block.number,
            'KATANA::getPriorVotes: not yet determined'
        );

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee) internal {
        address currentDelegate = _delegates[delegator];
        uint256 delegatorBalance = balanceOf(delegator); // balance of underlying KATANAs (not scaled);
        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    function _moveDelegates(
        address srcRep,
        address dstRep,
        uint256 amount
    ) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                // decrease old representative
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint256 srcRepOld = srcRepNum > 0
                    ? checkpoints[srcRep][srcRepNum - 1].votes
                    : 0;
                uint256 srcRepNew = srcRepOld.sub(amount);
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                // increase new representative
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint256 dstRepOld = dstRepNum > 0
                    ? checkpoints[dstRep][dstRepNum - 1].votes
                    : 0;
                uint256 dstRepNew = dstRepOld.add(amount);
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint256 oldVotes,
        uint256 newVotes
    ) internal {
        uint32 blockNumber = safe32(
            block.number,
            'KATANA::_writeCheckpoint: block number exceeds 32 bits'
        );

        if (
            nCheckpoints > 0 &&
            checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber
        ) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(
                blockNumber,
                newVotes
            );
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint256 n, string memory errorMessage)
        internal
        pure
        returns (uint32)
    {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }
}

File 7 of 9: Ownable.sol
pragma solidity ^0.5.8;

import './Context.sol';

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

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

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

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

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

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

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

File 8 of 9: SafeERC20.sol
pragma solidity ^0.5.8;

import './SafeMath.sol';
import './IERC20.sol';
import './Address.sol';

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

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

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

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

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

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

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

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

File 9 of 9: SafeMath.sol
pragma solidity ^0.5.8;

/**
 * @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;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract KatanaToken","name":"_katana","type":"address"},{"internalType":"address","name":"_devaddr","type":"address"},{"internalType":"uint256","name":"_katanaPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_bonusEndBlock","type":"uint256"},{"internalType":"uint256","name":"_rewardsEndBlock","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newKatanaPerBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nextHalveBlockNumber","type":"uint256"}],"name":"Halve","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"constant":true,"inputs":[],"name":"BONUS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"blockInAMonth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bonusEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_devaddr","type":"address"}],"name":"dev","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"devaddr","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"doHalvingCheck","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"halvePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isRewardsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"katana","outputs":[{"internalType":"contract KatanaToken","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"katanaPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastHalveBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lpTokenExistsInPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"massUpdatePools","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"migrate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"migrator","outputs":[{"internalType":"contract IMigratorChef","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingKatana","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accKatanaPerShare","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardsEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract IMigratorChef","name":"_migrator","type":"address"}],"name":"setMigrator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_lpTokenAddr","type":"address"},{"internalType":"bool","name":"_isExists","type":"bool"}],"name":"updateLpTokenExists","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

60806040526000600a5562017cdc600c55600c54600d5534801561002257600080fd5b50604051612321380380612321833981810160405260c081101561004557600080fd5b508051602082015160408301516060840151608085015160a0909501519394929391929091600061007d6001600160e01b0361011616565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039788166001600160a01b0319918216179091556002805496909716951694909417909455600491909155600392909255600b829055600e9190915560055561011a565b3390565b6121f8806101296000396000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c806364482f7911610125578063938d44f3116100ad578063ce872d871161007c578063ce872d8714610566578063d49e77cd1461056e578063e2bbb15814610576578063ec43277214610599578063f2fde38b146105a157610211565b8063938d44f3146104eb57806393f1a40b146104f3578063ae60076914610538578063cc4d32401461054057610211565b80638107c3a8116100f45780638107c3a8146104765780638aa28550146104925780638d88a90e1461049a5780638da5cb5b146104c05780638dbb1e3a146104c857610211565b806364482f7914610418578063715018a6146104435780637ae2b5c71461044b5780637cd07e471461046e57610211565b806340d3dc87116101a85780634e7f745a116101775780634e7f745a1461037c57806351eb05a6146103a85780635312ea8e146103c5578063607df9b9146103e2578063630b5ba11461041057610211565b806340d3dc8714610315578063441a3e7014610334578063454b06081461035757806348cd4cb11461037457610211565b80631aed6553116101e45780631aed6553146102a95780631eaaa045146102b157806323cf3118146102e7578063328aa1391461030d57610211565b8063081e3eda146102165780630c64589d146102305780631526fe271461025457806317caf6f1146102a1575b600080fd5b61021e6105c7565b60408051918252519081900360200190f35b6102386105cd565b604080516001600160a01b039092168252519081900360200190f35b6102716004803603602081101561026a57600080fd5b50356105dc565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b61021e61061d565b61021e610623565b6102e5600480360360608110156102c757600080fd5b508035906001600160a01b0360208201351690604001351515610629565b005b6102e5600480360360208110156102fd57600080fd5b50356001600160a01b0316610832565b61021e6108ac565b6102e56004803603602081101561032b57600080fd5b503515156108b2565b6102e56004803603604081101561034a57600080fd5b508035906020013561094e565b6102e56004803603602081101561036d57600080fd5b5035610ab4565b61021e610dce565b61021e6004803603604081101561039257600080fd5b50803590602001356001600160a01b0316610dd4565b6102e5600480360360208110156103be57600080fd5b5035610f6b565b6102e5600480360360208110156103db57600080fd5b50356111b6565b6102e5600480360360408110156103f857600080fd5b506001600160a01b0381351690602001351515611257565b6102e56112da565b6102e56004803603606081101561042e57600080fd5b508035906020810135906040013515156112fd565b6102e56113d4565b61021e6004803603604081101561046157600080fd5b5080359060200135611476565b61023861148e565b61047e61149d565b604080519115158252519081900360200190f35b61021e6114a5565b6102e5600480360360208110156104b057600080fd5b50356001600160a01b03166114aa565b610238611515565b61021e600480360360408110156104de57600080fd5b5080359060200135611524565b61021e611596565b61051f6004803603604081101561050957600080fd5b50803590602001356001600160a01b031661159c565b6040805192835260208301919091528051918290030190f35b61021e6115c0565b61047e6004803603602081101561055657600080fd5b50356001600160a01b03166115c6565b61021e6115db565b6102386115e1565b6102e56004803603604081101561058c57600080fd5b50803590602001356115f0565b61021e611707565b6102e5600480360360208110156105b757600080fd5b50356001600160a01b031661170d565b60075490565b6001546001600160a01b031681565b600781815481106105e957fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b600a5481565b60035481565b610631611805565b6000546001600160a01b03908116911614610681576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526008602052604090205460ff16156106d95760405162461bcd60e51b81526004018080602001828103825260308152602001806121946030913960400191505060405180910390fd5b80156106e7576106e76112da565b60006106f543600554611476565b90506000600b54821161070a57600b5461070c565b815b600a54909150610722908663ffffffff61180916565b600a55604080516080810182526001600160a01b039586168082526020808301988952828401948552600060608401818152600780546001808201835591845295517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490970296870180546001600160a01b03191691909c1617909a5599517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68985015594517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a84015597517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b909201919091558252600890955293909320805460ff19169092179091555050565b61083a611805565b6000546001600160a01b0390811691161461088a576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b600c5481565b60006108c043600554611476565b600d54600e54919250018111806108d857505061094b565b6004546000906108ef90600263ffffffff61186a16565b6004819055600e849055600d5460408051838152918601602083015280519293507f757a5d62748298563ed8cef6be1d0fdd42752f59a03f5be31295b83a696baf3392918290030190a18315610947576109476112da565b5050505b50565b60006007838154811061095d57fe5b6000918252602080832086845260098252604080852033865290925292208054600490920290920192508311156109c55760405162461bcd60e51b81526004018080602001828103825260288152602001806120286028913960400191505060405180910390fd5b6109ce84610f6b565b6000610a148260010154610a0864e8d4a510006109fc876003015487600001546118ac90919063ffffffff16565b9063ffffffff61186a16565b9063ffffffff61190516565b9050610a203382611947565b8154610a32908563ffffffff61190516565b8083556003840154610a559164e8d4a51000916109fc919063ffffffff6118ac16565b60018301558254610a76906001600160a01b0316338663ffffffff611ad816565b604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b610abc611805565b6000546001600160a01b03908116911614610b0c576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b6006546001600160a01b0316610b535760405162461bcd60e51b81526004018080602001828103825260248152602001806120ab6024913960400191505060405180910390fd5b600060078281548110610b6257fe5b600091825260208083206004928302018054604080516370a0823160e01b81523095810195909552519195506001600160a01b0316939284926370a0823192602480840193829003018186803b158015610bbb57600080fd5b505afa158015610bcf573d6000803e3d6000fd5b505050506040513d6020811015610be557600080fd5b5051600654909150610c0a906001600160a01b0384811691168363ffffffff611b2a16565b6006546040805163ce5494bb60e01b81526001600160a01b0385811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b158015610c5c57600080fd5b505af1158015610c70573d6000803e3d6000fd5b505050506040513d6020811015610c8657600080fd5b50516001600160a01b03811660009081526008602052604090205490915060ff1615610ce35760405162461bcd60e51b81526004018080602001828103825260348152602001806120776034913960400191505060405180910390fd5b604080516370a0823160e01b815230600482015290516001600160a01b038316916370a08231916024808301926020929190829003018186803b158015610d2957600080fd5b505afa158015610d3d573d6000803e3d6000fd5b505050506040513d6020811015610d5357600080fd5b50518214610d925760405162461bcd60e51b81526004018080602001828103825260278152602001806120506027913960400191505060405180910390fd5b83546001600160a01b039091166001600160a01b0319909116811790935550506000908152600860205260409020805460ff1916600117905550565b600b5481565b60008060078481548110610de457fe5b600091825260208083208784526009825260408085206001600160a01b0389168652909252908320600492909202016003810154600554919450919290610e2c904390611476565b8454604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610e7c57600080fd5b505afa158015610e90573d6000803e3d6000fd5b505050506040513d6020811015610ea657600080fd5b5051600286015490915082118015610ebd57508015155b15610f35576000610ed2866002015484611524565b90506000610f05600a546109fc8960010154610ef9600454876118ac90919063ffffffff16565b9063ffffffff6118ac16565b9050610f30610f23846109fc8464e8d4a5100063ffffffff6118ac16565b869063ffffffff61180916565b945050505b610f5d8460010154610a0864e8d4a510006109fc8789600001546118ac90919063ffffffff16565b955050505050505b92915050565b610f7560006108b2565b600060078281548110610f8457fe5b906000526020600020906004020190506000610fa243600554611476565b905081600201548111610fb657505061094b565b8154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561100057600080fd5b505afa158015611014573d6000803e3d6000fd5b505050506040513d602081101561102a57600080fd5b505190508061103f575060029091015561094b565b600061104f846002015484611524565b90506000611076600a546109fc8760010154610ef9600454876118ac90919063ffffffff16565b6001546002549192506001600160a01b03908116916340c10f1991166110a384600a63ffffffff61186a16565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156110f257600080fd5b505af1158015611106573d6000803e3d6000fd5b5050600154604080516340c10f1960e01b81523060048201526024810186905290516001600160a01b0390921693506340c10f19925060448082019260009290919082900301818387803b15801561115d57600080fd5b505af1158015611171573d6000803e3d6000fd5b505050506111a5611194846109fc64e8d4a51000856118ac90919063ffffffff16565b60038701549063ffffffff61180916565b600386015550505060029091015550565b6000600782815481106111c557fe5b60009182526020808320858452600982526040808520338087529352909320805460049093029093018054909450611210926001600160a01b0391909116919063ffffffff611ad816565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b61125f611805565b6000546001600160a01b039081169116146112af576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b60075460005b818110156112f9576112f181610f6b565b6001016112e0565b5050565b611305611805565b6000546001600160a01b03908116911614611355576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b8015611363576113636112da565b6113a68261139a6007868154811061137757fe5b906000526020600020906004020160010154600a5461190590919063ffffffff16565b9063ffffffff61180916565b600a8190555081600784815481106113ba57fe5b906000526020600020906004020160010181905550505050565b6113dc611805565b6000546001600160a01b0390811691161461142c576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600081831115611487575080610f65565b5090919050565b6006546001600160a01b031681565b600554431090565b600381565b6002546001600160a01b031633146114f35760405162461bcd60e51b81526004018080602001828103825260248152602001806120cf6024913960400191505060405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b6000600354821161154b576115446003610ef9848663ffffffff61190516565b9050610f65565b600354831061156457611544828463ffffffff61190516565b61154461157c6003548461190590919063ffffffff16565b61139a6003610ef98760035461190590919063ffffffff16565b600e5481565b60096020908152600092835260408084209091529082529020805460019091015482565b60045481565b60086020526000908152604090205460ff1681565b60055481565b6002546001600160a01b031681565b6000600783815481106115ff57fe5b6000918252602080832086845260098252604080852033865290925292206004909102909101915061163084610f6b565b8054156116735760006116658260010154610a0864e8d4a510006109fc876003015487600001546118ac90919063ffffffff16565b90506116713382611947565b505b8154611690906001600160a01b031633308663ffffffff611c3d16565b80546116a2908463ffffffff61180916565b80825560038301546116c59164e8d4a51000916109fc919063ffffffff6118ac16565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b600d5481565b611715611805565b6000546001600160a01b03908116911614611765576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b6001600160a01b0381166117aa5760405162461bcd60e51b81526004018080602001828103825260268152602001806120026026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b600082820183811015611863576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600061186383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c97565b6000826118bb57506000610f65565b828202828482816118c857fe5b04146118635760405162461bcd60e51b81526004018080602001828103825260218152602001806120f36021913960400191505060405180910390fd5b600061186383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d39565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561199257600080fd5b505afa1580156119a6573d6000803e3d6000fd5b505050506040513d60208110156119bc57600080fd5b5051905080821115611a50576001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611a1e57600080fd5b505af1158015611a32573d6000803e3d6000fd5b505050506040513d6020811015611a4857600080fd5b50611ad39050565b6001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611aa657600080fd5b505af1158015611aba573d6000803e3d6000fd5b505050506040513d6020811015611ad057600080fd5b50505b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611ad3908490611d93565b801580611bb0575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611b8257600080fd5b505afa158015611b96573d6000803e3d6000fd5b505050506040513d6020811015611bac57600080fd5b5051155b611beb5760405162461bcd60e51b815260040180806020018281038252603681526020018061215e6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052611ad3908490611d93565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610947908590611d93565b60008183611d235760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611ce8578181015183820152602001611cd0565b50505050905090810190601f168015611d155780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611d2f57fe5b0495945050505050565b60008184841115611d8b5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611ce8578181015183820152602001611cd0565b505050900390565b6060611de8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e449092919063ffffffff16565b805190915015611ad357808060200190516020811015611e0757600080fd5b5051611ad35760405162461bcd60e51b815260040180806020018281038252602a815260200180612134602a913960400191505060405180910390fd5b6060611e538484600085611e5b565b949350505050565b6060611e6685611fc8565b611eb7576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611ef65780518252601f199092019160209182019101611ed7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611f58576040519150601f19603f3d011682016040523d82523d6000602084013e611f5d565b606091505b50915091508115611f71579150611e539050565b805115611f815780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315611ce8578181015183820152602001611cd0565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611e5357505015159291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353616d757261693a20496e73756666696369656e7420416d6f756e7420746f20776974686472617753616d757261693a204e6577204c5020546f6b656e2062616c616e636520696e636f727265637453616d757261693a204e6577204c5020546f6b656e204164647265737320616c72656164792065786973747320696e20706f6f6c53616d757261693a2041646472657373206f66206d69677261746f72206973206e756c6c53616d757261693a2053656e646572206973206e6f742074686520646576656c6f706572536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e636553616d757261693a204c5020546f6b656e204164647265737320616c72656164792065786973747320696e20706f6f6ca265627a7a7231582006e5357307d31281d66c6450a456ab4ba24663dfc1da3d7f9ee861e0742dedc264736f6c63430005110032000000000000000000000000e6410569602124506658ff992f258616ea2d4a3d00000000000000000000000043bab6d115324acd2755e10910367abe38174f5800000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000a578960000000000000000000000000000000000000000000000000000000000a6f5720000000000000000000000000000000000000000000000000000000000c92d36

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102115760003560e01c806364482f7911610125578063938d44f3116100ad578063ce872d871161007c578063ce872d8714610566578063d49e77cd1461056e578063e2bbb15814610576578063ec43277214610599578063f2fde38b146105a157610211565b8063938d44f3146104eb57806393f1a40b146104f3578063ae60076914610538578063cc4d32401461054057610211565b80638107c3a8116100f45780638107c3a8146104765780638aa28550146104925780638d88a90e1461049a5780638da5cb5b146104c05780638dbb1e3a146104c857610211565b806364482f7914610418578063715018a6146104435780637ae2b5c71461044b5780637cd07e471461046e57610211565b806340d3dc87116101a85780634e7f745a116101775780634e7f745a1461037c57806351eb05a6146103a85780635312ea8e146103c5578063607df9b9146103e2578063630b5ba11461041057610211565b806340d3dc8714610315578063441a3e7014610334578063454b06081461035757806348cd4cb11461037457610211565b80631aed6553116101e45780631aed6553146102a95780631eaaa045146102b157806323cf3118146102e7578063328aa1391461030d57610211565b8063081e3eda146102165780630c64589d146102305780631526fe271461025457806317caf6f1146102a1575b600080fd5b61021e6105c7565b60408051918252519081900360200190f35b6102386105cd565b604080516001600160a01b039092168252519081900360200190f35b6102716004803603602081101561026a57600080fd5b50356105dc565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b61021e61061d565b61021e610623565b6102e5600480360360608110156102c757600080fd5b508035906001600160a01b0360208201351690604001351515610629565b005b6102e5600480360360208110156102fd57600080fd5b50356001600160a01b0316610832565b61021e6108ac565b6102e56004803603602081101561032b57600080fd5b503515156108b2565b6102e56004803603604081101561034a57600080fd5b508035906020013561094e565b6102e56004803603602081101561036d57600080fd5b5035610ab4565b61021e610dce565b61021e6004803603604081101561039257600080fd5b50803590602001356001600160a01b0316610dd4565b6102e5600480360360208110156103be57600080fd5b5035610f6b565b6102e5600480360360208110156103db57600080fd5b50356111b6565b6102e5600480360360408110156103f857600080fd5b506001600160a01b0381351690602001351515611257565b6102e56112da565b6102e56004803603606081101561042e57600080fd5b508035906020810135906040013515156112fd565b6102e56113d4565b61021e6004803603604081101561046157600080fd5b5080359060200135611476565b61023861148e565b61047e61149d565b604080519115158252519081900360200190f35b61021e6114a5565b6102e5600480360360208110156104b057600080fd5b50356001600160a01b03166114aa565b610238611515565b61021e600480360360408110156104de57600080fd5b5080359060200135611524565b61021e611596565b61051f6004803603604081101561050957600080fd5b50803590602001356001600160a01b031661159c565b6040805192835260208301919091528051918290030190f35b61021e6115c0565b61047e6004803603602081101561055657600080fd5b50356001600160a01b03166115c6565b61021e6115db565b6102386115e1565b6102e56004803603604081101561058c57600080fd5b50803590602001356115f0565b61021e611707565b6102e5600480360360208110156105b757600080fd5b50356001600160a01b031661170d565b60075490565b6001546001600160a01b031681565b600781815481106105e957fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b600a5481565b60035481565b610631611805565b6000546001600160a01b03908116911614610681576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526008602052604090205460ff16156106d95760405162461bcd60e51b81526004018080602001828103825260308152602001806121946030913960400191505060405180910390fd5b80156106e7576106e76112da565b60006106f543600554611476565b90506000600b54821161070a57600b5461070c565b815b600a54909150610722908663ffffffff61180916565b600a55604080516080810182526001600160a01b039586168082526020808301988952828401948552600060608401818152600780546001808201835591845295517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490970296870180546001600160a01b03191691909c1617909a5599517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68985015594517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a84015597517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b909201919091558252600890955293909320805460ff19169092179091555050565b61083a611805565b6000546001600160a01b0390811691161461088a576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b600c5481565b60006108c043600554611476565b600d54600e54919250018111806108d857505061094b565b6004546000906108ef90600263ffffffff61186a16565b6004819055600e849055600d5460408051838152918601602083015280519293507f757a5d62748298563ed8cef6be1d0fdd42752f59a03f5be31295b83a696baf3392918290030190a18315610947576109476112da565b5050505b50565b60006007838154811061095d57fe5b6000918252602080832086845260098252604080852033865290925292208054600490920290920192508311156109c55760405162461bcd60e51b81526004018080602001828103825260288152602001806120286028913960400191505060405180910390fd5b6109ce84610f6b565b6000610a148260010154610a0864e8d4a510006109fc876003015487600001546118ac90919063ffffffff16565b9063ffffffff61186a16565b9063ffffffff61190516565b9050610a203382611947565b8154610a32908563ffffffff61190516565b8083556003840154610a559164e8d4a51000916109fc919063ffffffff6118ac16565b60018301558254610a76906001600160a01b0316338663ffffffff611ad816565b604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b610abc611805565b6000546001600160a01b03908116911614610b0c576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b6006546001600160a01b0316610b535760405162461bcd60e51b81526004018080602001828103825260248152602001806120ab6024913960400191505060405180910390fd5b600060078281548110610b6257fe5b600091825260208083206004928302018054604080516370a0823160e01b81523095810195909552519195506001600160a01b0316939284926370a0823192602480840193829003018186803b158015610bbb57600080fd5b505afa158015610bcf573d6000803e3d6000fd5b505050506040513d6020811015610be557600080fd5b5051600654909150610c0a906001600160a01b0384811691168363ffffffff611b2a16565b6006546040805163ce5494bb60e01b81526001600160a01b0385811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b158015610c5c57600080fd5b505af1158015610c70573d6000803e3d6000fd5b505050506040513d6020811015610c8657600080fd5b50516001600160a01b03811660009081526008602052604090205490915060ff1615610ce35760405162461bcd60e51b81526004018080602001828103825260348152602001806120776034913960400191505060405180910390fd5b604080516370a0823160e01b815230600482015290516001600160a01b038316916370a08231916024808301926020929190829003018186803b158015610d2957600080fd5b505afa158015610d3d573d6000803e3d6000fd5b505050506040513d6020811015610d5357600080fd5b50518214610d925760405162461bcd60e51b81526004018080602001828103825260278152602001806120506027913960400191505060405180910390fd5b83546001600160a01b039091166001600160a01b0319909116811790935550506000908152600860205260409020805460ff1916600117905550565b600b5481565b60008060078481548110610de457fe5b600091825260208083208784526009825260408085206001600160a01b0389168652909252908320600492909202016003810154600554919450919290610e2c904390611476565b8454604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610e7c57600080fd5b505afa158015610e90573d6000803e3d6000fd5b505050506040513d6020811015610ea657600080fd5b5051600286015490915082118015610ebd57508015155b15610f35576000610ed2866002015484611524565b90506000610f05600a546109fc8960010154610ef9600454876118ac90919063ffffffff16565b9063ffffffff6118ac16565b9050610f30610f23846109fc8464e8d4a5100063ffffffff6118ac16565b869063ffffffff61180916565b945050505b610f5d8460010154610a0864e8d4a510006109fc8789600001546118ac90919063ffffffff16565b955050505050505b92915050565b610f7560006108b2565b600060078281548110610f8457fe5b906000526020600020906004020190506000610fa243600554611476565b905081600201548111610fb657505061094b565b8154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561100057600080fd5b505afa158015611014573d6000803e3d6000fd5b505050506040513d602081101561102a57600080fd5b505190508061103f575060029091015561094b565b600061104f846002015484611524565b90506000611076600a546109fc8760010154610ef9600454876118ac90919063ffffffff16565b6001546002549192506001600160a01b03908116916340c10f1991166110a384600a63ffffffff61186a16565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156110f257600080fd5b505af1158015611106573d6000803e3d6000fd5b5050600154604080516340c10f1960e01b81523060048201526024810186905290516001600160a01b0390921693506340c10f19925060448082019260009290919082900301818387803b15801561115d57600080fd5b505af1158015611171573d6000803e3d6000fd5b505050506111a5611194846109fc64e8d4a51000856118ac90919063ffffffff16565b60038701549063ffffffff61180916565b600386015550505060029091015550565b6000600782815481106111c557fe5b60009182526020808320858452600982526040808520338087529352909320805460049093029093018054909450611210926001600160a01b0391909116919063ffffffff611ad816565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b61125f611805565b6000546001600160a01b039081169116146112af576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b60075460005b818110156112f9576112f181610f6b565b6001016112e0565b5050565b611305611805565b6000546001600160a01b03908116911614611355576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b8015611363576113636112da565b6113a68261139a6007868154811061137757fe5b906000526020600020906004020160010154600a5461190590919063ffffffff16565b9063ffffffff61180916565b600a8190555081600784815481106113ba57fe5b906000526020600020906004020160010181905550505050565b6113dc611805565b6000546001600160a01b0390811691161461142c576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600081831115611487575080610f65565b5090919050565b6006546001600160a01b031681565b600554431090565b600381565b6002546001600160a01b031633146114f35760405162461bcd60e51b81526004018080602001828103825260248152602001806120cf6024913960400191505060405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b6000600354821161154b576115446003610ef9848663ffffffff61190516565b9050610f65565b600354831061156457611544828463ffffffff61190516565b61154461157c6003548461190590919063ffffffff16565b61139a6003610ef98760035461190590919063ffffffff16565b600e5481565b60096020908152600092835260408084209091529082529020805460019091015482565b60045481565b60086020526000908152604090205460ff1681565b60055481565b6002546001600160a01b031681565b6000600783815481106115ff57fe5b6000918252602080832086845260098252604080852033865290925292206004909102909101915061163084610f6b565b8054156116735760006116658260010154610a0864e8d4a510006109fc876003015487600001546118ac90919063ffffffff16565b90506116713382611947565b505b8154611690906001600160a01b031633308663ffffffff611c3d16565b80546116a2908463ffffffff61180916565b80825560038301546116c59164e8d4a51000916109fc919063ffffffff6118ac16565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b600d5481565b611715611805565b6000546001600160a01b03908116911614611765576040805162461bcd60e51b81526020600482018190526024820152600080516020612114833981519152604482015290519081900360640190fd5b6001600160a01b0381166117aa5760405162461bcd60e51b81526004018080602001828103825260268152602001806120026026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b600082820183811015611863576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600061186383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c97565b6000826118bb57506000610f65565b828202828482816118c857fe5b04146118635760405162461bcd60e51b81526004018080602001828103825260218152602001806120f36021913960400191505060405180910390fd5b600061186383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d39565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561199257600080fd5b505afa1580156119a6573d6000803e3d6000fd5b505050506040513d60208110156119bc57600080fd5b5051905080821115611a50576001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611a1e57600080fd5b505af1158015611a32573d6000803e3d6000fd5b505050506040513d6020811015611a4857600080fd5b50611ad39050565b6001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611aa657600080fd5b505af1158015611aba573d6000803e3d6000fd5b505050506040513d6020811015611ad057600080fd5b50505b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611ad3908490611d93565b801580611bb0575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611b8257600080fd5b505afa158015611b96573d6000803e3d6000fd5b505050506040513d6020811015611bac57600080fd5b5051155b611beb5760405162461bcd60e51b815260040180806020018281038252603681526020018061215e6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052611ad3908490611d93565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610947908590611d93565b60008183611d235760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611ce8578181015183820152602001611cd0565b50505050905090810190601f168015611d155780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611d2f57fe5b0495945050505050565b60008184841115611d8b5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611ce8578181015183820152602001611cd0565b505050900390565b6060611de8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e449092919063ffffffff16565b805190915015611ad357808060200190516020811015611e0757600080fd5b5051611ad35760405162461bcd60e51b815260040180806020018281038252602a815260200180612134602a913960400191505060405180910390fd5b6060611e538484600085611e5b565b949350505050565b6060611e6685611fc8565b611eb7576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611ef65780518252601f199092019160209182019101611ed7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611f58576040519150601f19603f3d011682016040523d82523d6000602084013e611f5d565b606091505b50915091508115611f71579150611e539050565b805115611f815780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315611ce8578181015183820152602001611cd0565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611e5357505015159291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353616d757261693a20496e73756666696369656e7420416d6f756e7420746f20776974686472617753616d757261693a204e6577204c5020546f6b656e2062616c616e636520696e636f727265637453616d757261693a204e6577204c5020546f6b656e204164647265737320616c72656164792065786973747320696e20706f6f6c53616d757261693a2041646472657373206f66206d69677261746f72206973206e756c6c53616d757261693a2053656e646572206973206e6f742074686520646576656c6f706572536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e636553616d757261693a204c5020546f6b656e204164647265737320616c72656164792065786973747320696e20706f6f6ca265627a7a7231582006e5357307d31281d66c6450a456ab4ba24663dfc1da3d7f9ee861e0742dedc264736f6c63430005110032

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

000000000000000000000000e6410569602124506658ff992f258616ea2d4a3d00000000000000000000000043bab6d115324acd2755e10910367abe38174f5800000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000a578960000000000000000000000000000000000000000000000000000000000a6f5720000000000000000000000000000000000000000000000000000000000c92d36

-----Decoded View---------------
Arg [0] : _katana (address): 0xe6410569602124506658Ff992F258616Ea2D4A3D
Arg [1] : _devaddr (address): 0x43BAb6d115324aCD2755E10910367aBE38174f58
Arg [2] : _katanaPerBlock (uint256): 200000000000000000000
Arg [3] : _startBlock (uint256): 10844310
Arg [4] : _bonusEndBlock (uint256): 10941810
Arg [5] : _rewardsEndBlock (uint256): 13184310

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000e6410569602124506658ff992f258616ea2d4a3d
Arg [1] : 00000000000000000000000043bab6d115324acd2755e10910367abe38174f58
Arg [2] : 00000000000000000000000000000000000000000000000ad78ebc5ac6200000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000a57896
Arg [4] : 0000000000000000000000000000000000000000000000000000000000a6f572
Arg [5] : 0000000000000000000000000000000000000000000000000000000000c92d36


Deployed Bytecode Sourcemap

1078:12300:8:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1078:12300:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4877:93;;;:::i;:::-;;;;;;;;;;;;;;;;2417:25;;;:::i;:::-;;;;-1:-1:-1;;;;;2417:25:8;;;;;;;;;;;;;;2986:26;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2986:26:8;;:::i;:::-;;;;-1:-1:-1;;;;;2986:26:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3280:34;;;:::i;2547:28::-;;;:::i;5135:862::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5135:862:8;;;-1:-1:-1;;;;;5135:862:8;;;;;;;;;;;;:::i;:::-;;6689:100;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6689:100:8;-1:-1:-1;;;;;6689:100:8;;:::i;3403:36::-;;;:::i;4352:519::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4352:519:8;;;;:::i;11331:725::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11331:725:8;;;;;;;:::i;6795:810::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6795:810:8;;:::i;3371:25::-;;;:::i;8206:985::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8206:985:8;;;;;;-1:-1:-1;;;;;8206:985:8;;:::i;9519:937::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9519:937:8;;:::i;12124:349::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12124:349:8;;:::i;6003:168::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;6003:168:8;;;;;;;;;;:::i;9271:175::-;;;:::i;6266:350::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6266:350:8;;;;;;;;;;;;;;:::i;1673:137:5:-;;;:::i;12993:143:8:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12993:143:8;;;;;;;:::i;2924:29::-;;;:::i;12879:108::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;2777:44;;;:::i;13189:187::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13189:187:8;-1:-1:-1;;;;;13189:187:8;;:::i;1050:77:5:-;;;:::i;7678:465:8:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7678:465:8;;;;;;;:::i;3493:29::-;;;:::i;3123:64::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3123:64:8;;;;;;-1:-1:-1;;;;;3123:64:8;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2621:29;;;:::i;3018:51::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3018:51:8;-1:-1:-1;;;;;3018:51:8;;:::i;2693:30::-;;;:::i;2468:22::-;;;:::i;10521:764::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10521:764:8;;;;;;;:::i;3445:42::-;;;:::i;1959:266:5:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1959:266:5;-1:-1:-1;;;;;1959:266:5;;:::i;4877:93:8:-;4948:8;:15;4877:93;:::o;2417:25::-;;;-1:-1:-1;;;;;2417:25:8;;:::o;2986:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2986:26:8;;;;-1:-1:-1;2986:26:8;;;:::o;3280:34::-;;;;:::o;2547:28::-;;;;:::o;5135:862::-;1264:12:5;:10;:12::i;:::-;1254:6;;-1:-1:-1;;;;;1254:6:5;;;:22;;;1246:67;;;;;-1:-1:-1;;;1246:67:5;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1246:67:5;;;;;;;;;;;;;;;-1:-1:-1;;;;;5283:38:8;;;;;;:19;:38;;;;;;;;5282:39;5261:134;;;;-1:-1:-1;;;5261:134:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5409:11;5405:59;;;5436:17;:15;:17::i;:::-;5473:19;5495:34;5499:12;5513:15;;5495:3;:34::i;:::-;5473:56;;5539:23;5579:10;;5565:11;:24;:75;;5630:10;;5565:75;;;5604:11;5565:75;5668:15;;5539:101;;-1:-1:-1;5668:32:8;;5688:11;5668:32;:19;:32;:::i;:::-;5650:15;:50;5737:188;;;;;;;;-1:-1:-1;;;;;5737:188:8;;;;;;;;;;;;;;;;;;;-1:-1:-1;5737:188:8;;;;;;5710:8;27:10:-1;;39:1;23:18;;;45:23;;5710:225:8;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5710:225:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5945:38;;:19;:38;;;;;;;:45;;-1:-1:-1;;5945:45:8;;;;;;;-1:-1:-1;;5135:862:8:o;6689:100::-;1264:12:5;:10;:12::i;:::-;1254:6;;-1:-1:-1;;;;;1254:6:5;;;:22;;;1246:67;;;;;-1:-1:-1;;;1246:67:5;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1246:67:5;;;;;;;;;;;;;;;6762:8:8;:20;;-1:-1:-1;;;;;;6762:20:8;-1:-1:-1;;;;;6762:20:8;;;;;;;;;;6689:100::o;3403:36::-;;;;:::o;4352:519::-;4411:19;4433:34;4437:12;4451:15;;4433:3;:34::i;:::-;4523:11;;4506:14;;4411:56;;-1:-1:-1;4506:28:8;4492:42;;;4544:45;;4572:7;;;;4544:45;4626:14;;4598:25;;4626:21;;4645:1;4626:21;:18;:21;:::i;:::-;4657:14;:34;;;4701:14;:28;;;4783:11;;4744:51;;;;;;4769:25;;;4744:51;;;;;;4598:49;;-1:-1:-1;4744:51:8;;;;;;;;;4810:11;4806:59;;;4837:17;:15;:17::i;:::-;4352:519;;;;;:::o;11331:725::-;11397:21;11421:8;11430:4;11421:14;;;;;;;;;;;;;;;;11469;;;:8;:14;;;;;;11484:10;11469:26;;;;;;;11526:11;;11421:14;;;;;;;;-1:-1:-1;11526:22:8;-1:-1:-1;11526:22:8;11505:109;;;;-1:-1:-1;;;11505:109:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11624:16;11635:4;11624:10;:16::i;:::-;11650:15;11668:92;11735:4;:15;;;11668:49;11712:4;11668:39;11684:4;:22;;;11668:4;:11;;;:15;;:39;;;;:::i;:::-;:43;:49;:43;:49;:::i;:::-;:53;:92;:53;:92;:::i;:::-;11650:110;;11770:39;11789:10;11801:7;11770:18;:39::i;:::-;11833:11;;:24;;11849:7;11833:24;:15;:24;:::i;:::-;11819:38;;;11901:22;;;;11885:49;;11929:4;;11885:39;;11819:38;11885:39;:15;:39;:::i;:49::-;11867:15;;;:67;11944:12;;:55;;-1:-1:-1;;;;;11944:12:8;11978:10;11991:7;11944:55;:25;:55;:::i;:::-;12014:35;;;;;;;;12035:4;;12023:10;;12014:35;;;;;;;;;11331:725;;;;;:::o;6795:810::-;1264:12:5;:10;:12::i;:::-;1254:6;;-1:-1:-1;;;;;1254:6:5;;;:22;;;1246:67;;;;;-1:-1:-1;;;1246:67:5;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1246:67:5;;;;;;;;;;;;;;;6882:8:8;;-1:-1:-1;;;;;6882:8:8;6853:114;;;;-1:-1:-1;;;6853:114:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6977:21;7001:8;7010:4;7001:14;;;;;;;;;;;;;;;;;;;;;7042:12;;7078:32;;;-1:-1:-1;;;7078:32:8;;7104:4;7078:32;;;;;;;;7001:14;;-1:-1:-1;;;;;;7042:12:8;;7001:14;7042:12;;7078:17;;:32;;;;;;;;;;7042:12;7078:32;;;5:2:-1;;;;30:1;27;20:12;5:2;7078:32:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7078:32:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7078:32:8;7148:8;;7078:32;;-1:-1:-1;7120:43:8;;-1:-1:-1;;;;;7120:19:8;;;;7148:8;7078:32;7120:43;:19;:43;:::i;:::-;7193:8;;:25;;;-1:-1:-1;;;7193:25:8;;-1:-1:-1;;;;;7193:25:8;;;;;;;;;7173:17;;7193:8;;;;;:16;;:25;;;;;;;;;;;;;;;7173:17;7193:8;:25;;;5:2:-1;;;;30:1;27;20:12;5:2;7193:25:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7193:25:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7193:25:8;-1:-1:-1;;;;;7250:40:8;;;;;;:19;7193:25;7250:40;;;;;7193:25;;-1:-1:-1;7250:40:8;;7249:41;7228:140;;;;-1:-1:-1;;;7228:140:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7406:35;;;-1:-1:-1;;;7406:35:8;;7435:4;7406:35;;;;;;-1:-1:-1;;;;;7406:20:8;;;;;:35;;;;;;;;;;;;;;:20;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;7406:35:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7406:35:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7406:35:8;7399:42;;7378:128;;;;-1:-1:-1;;;7378:128:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7516:25;;-1:-1:-1;;;;;7516:25:8;;;-1:-1:-1;;;;;;7516:25:8;;;;;;;;-1:-1:-1;;7516:12:8;7551:40;;;:19;:40;;;;;:47;;-1:-1:-1;;7551:47:8;7516:25;7551:47;;;-1:-1:-1;6795:810:8:o;3371:25::-;;;;:::o;8206:985::-;8305:7;8328:21;8352:8;8361:4;8352:14;;;;;;;;;;;;;;;;8400;;;:8;:14;;;;;;-1:-1:-1;;;;;8400:21:8;;;;;;;;;;8352:14;;;;;;8459:22;;;;8531:15;;8352:14;;-1:-1:-1;8400:21:8;;8352:14;8513:34;;8517:12;;8513:3;:34::i;:::-;8576:12;;:37;;;-1:-1:-1;;;8576:37:8;;8607:4;8576:37;;;;;;8491:56;;-1:-1:-1;8557:16:8;;-1:-1:-1;;;;;8576:12:8;;;;:22;;:37;;;;;;;;;;;;;;;:12;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;8576:37:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8576:37:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8576:37:8;8641:20;;;;8576:37;;-1:-1:-1;8627:34:8;;:51;;;;-1:-1:-1;8665:13:8;;;8627:51;8623:480;;;8694:18;8715:94;8746:4;:20;;;8784:11;8715:13;:94::i;:::-;8694:115;;8823:20;8846:123;8953:15;;8846:85;8915:4;:15;;;8846:47;8878:14;;8846:10;:31;;:47;;;;:::i;:::-;:68;:85;:68;:85;:::i;:123::-;8823:146;-1:-1:-1;9003:89:8;9042:36;9069:8;9042:22;8823:146;9059:4;9042:22;:16;:22;:::i;:36::-;9003:17;;:89;:21;:89;:::i;:::-;8983:109;;8623:480;;;9119:65;9168:4;:15;;;9119:44;9158:4;9119:34;9135:17;9119:4;:11;;;:15;;:34;;;;:::i;:65::-;9112:72;;;;;;;8206:985;;;;;:::o;9519:937::-;9570:21;9585:5;9570:14;:21::i;:::-;9601;9625:8;9634:4;9625:14;;;;;;;;;;;;;;;;;;9601:38;;9649:19;9671:34;9675:12;9689:15;;9671:3;:34::i;:::-;9649:56;;9734:4;:20;;;9719:11;:35;9715:72;;9770:7;;;;9715:72;9815:12;;:37;;;-1:-1:-1;;;9815:37:8;;9846:4;9815:37;;;;;;9796:16;;-1:-1:-1;;;;;9815:12:8;;:22;;:37;;;;;;;;;;;;;;:12;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;9815:37:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9815:37:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9815:37:8;;-1:-1:-1;9866:13:8;9862:98;;-1:-1:-1;9895:20:8;;;;:34;9943:7;;9862:98;9969:18;9990:48;10004:4;:20;;;10026:11;9990:13;:48::i;:::-;9969:69;;10048:20;10071:111;10166:15;;10071:77;10132:4;:15;;;10071:43;10099:14;;10071:10;:27;;:43;;;;:::i;:111::-;10192:6;;10204:7;;10048:134;;-1:-1:-1;;;;;;10192:6:8;;;;:11;;10204:7;10213:20;10048:134;10230:2;10213:20;:16;:20;:::i;:::-;10192:42;;;;;;;;;;;;;-1:-1:-1;;;;;10192:42:8;-1:-1:-1;;;;;10192:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10192:42:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;10244:6:8;;:40;;;-1:-1:-1;;;10244:40:8;;10264:4;10244:40;;;;;;;;;;;;-1:-1:-1;;;;;10244:6:8;;;;-1:-1:-1;10244:11:8;;-1:-1:-1;10244:40:8;;;;;:6;;:40;;;;;;;;:6;;:40;;;5:2:-1;;;;30:1;27;20:12;5:2;10244:40:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10244:40:8;;;;10319:86;10359:36;10386:8;10359:22;10376:4;10359:12;:16;;:22;;;;:::i;:36::-;10319:22;;;;;:86;:26;:86;:::i;:::-;10294:22;;;:111;-1:-1:-1;;;10415:20:8;;;;:34;9519:937;:::o;12124:349::-;12182:21;12206:8;12215:4;12206:14;;;;;;;;;;;;;;;;12254;;;:8;:14;;;;;;12269:10;12254:26;;;;;;;;12337:11;;12206:14;;;;;;;12290:12;;12206:14;;-1:-1:-1;12290:59:8;;-1:-1:-1;;;;;12290:12:8;;;;;12269:10;12290:59;:25;:59;:::i;:::-;12400:11;;12364:48;;;;;;;12394:4;;12382:10;;12364:48;;;;;;;;;12436:1;12422:15;;;12447;;;;:19;-1:-1:-1;;12124:349:8:o;6003:168::-;1264:12:5;:10;:12::i;:::-;1254:6;;-1:-1:-1;;;;;1254:6:5;;;:22;;;1246:67;;;;;-1:-1:-1;;;1246:67:5;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1246:67:5;;;;;;;;;;;;;;;-1:-1:-1;;;;;6119:33:8;;;;;;;;:19;:33;;;;;:45;;-1:-1:-1;;6119:45:8;;;;;;;;;;6003:168::o;9271:175::-;9332:8;:15;9315:14;9357:83;9385:6;9379:3;:12;9357:83;;;9414:15;9425:3;9414:10;:15::i;:::-;9393:5;;9357:83;;;;9271:175;:::o;6266:350::-;1264:12:5;:10;:12::i;:::-;1254:6;;-1:-1:-1;;;;;1254:6:5;;;:22;;;1246:67;;;;;-1:-1:-1;;;1246:67:5;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1246:67:5;;;;;;;;;;;;;;;6393:11:8;6389:59;;;6420:17;:15;:17::i;:::-;6475:85;6539:11;6475:46;6495:8;6504:4;6495:14;;;;;;;;;;;;;;;;;;:25;;;6475:15;;:19;;:46;;;;:::i;:::-;:50;:85;:50;:85;:::i;:::-;6457:15;:103;;;;6598:11;6570:8;6579:4;6570:14;;;;;;;;;;;;;;;;;;:25;;:39;;;;6266:350;;;:::o;1673:137:5:-;1264:12;:10;:12::i;:::-;1254:6;;-1:-1:-1;;;;;1254:6:5;;;:22;;;1246:67;;;;;-1:-1:-1;;;1246:67:5;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1246:67:5;;;;;;;;;;;;;;;1771:1;1755:6;;1734:40;;-1:-1:-1;;;;;1755:6:5;;;;1734:40;;1771:1;;1734:40;1801:1;1784:19;;-1:-1:-1;;;;;;1784:19:5;;;1673:137::o;12993:143:8:-;13049:7;13076:1;13072;:5;13068:44;;;-1:-1:-1;13100:1:8;13093:8;;13068:44;-1:-1:-1;13128:1:8;;12993:143;-1:-1:-1;12993:143:8:o;2924:29::-;;;-1:-1:-1;;;;;2924:29:8;;:::o;12879:108::-;12950:15;;12968:12;-1:-1:-1;12879:108:8;:::o;2777:44::-;2820:1;2777:44;:::o;13189:187::-;13272:7;;-1:-1:-1;;;;;13272:7:8;13258:10;:21;13237:104;;;;-1:-1:-1;;;13237:104:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13351:7;:18;;-1:-1:-1;;;;;;13351:18:8;-1:-1:-1;;;;;13351:18:8;;;;;;;;;;13189:187::o;1050:77:5:-;1088:7;1114:6;-1:-1:-1;;;;;1114:6:5;1050:77;:::o;7678:465:8:-;7774:7;7808:13;;7801:3;:20;7797:340;;7844:36;2820:1;7844:14;:3;7852:5;7844:14;:7;:14;:::i;:36::-;7837:43;;;;7797:340;7910:13;;7901:5;:22;7897:240;;7946:14;:3;7954:5;7946:14;:7;:14;:::i;7897:240::-;8014:112;8086:22;8094:13;;8086:3;:7;;:22;;;;:::i;:::-;8014:46;2820:1;8014:24;8032:5;8014:13;;:17;;:24;;;;:::i;3493:29::-;;;;:::o;3123:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2621:29::-;;;;:::o;3018:51::-;;;;;;;;;;;;;;;:::o;2693:30::-;;;;:::o;2468:22::-;;;-1:-1:-1;;;;;2468:22:8;;:::o;10521:764::-;10586:21;10610:8;10619:4;10610:14;;;;;;;;;;;;;;;;10658;;;:8;:14;;;;;;10673:10;10658:26;;;;;;;10610:14;;;;;;;;-1:-1:-1;10694:16:8;10667:4;10694:10;:16::i;:::-;10724:11;;:15;10720:255;;10755:15;10773:138;10895:4;:15;;;10773:100;10868:4;10773:73;10823:4;:22;;;10773:4;:28;;;:49;;:73;;;;:::i;:138::-;10755:156;;10925:39;10944:10;10956:7;10925:18;:39::i;:::-;10720:255;;10984:12;;:120;;-1:-1:-1;;;;;10984:12:8;11035:10;11068:4;11087:7;10984:120;:29;:120;:::i;:::-;11128:11;;:24;;11144:7;11128:24;:15;:24;:::i;:::-;11114:38;;;11196:22;;;;11180:49;;11224:4;;11180:39;;11114:38;11180:39;:15;:39;:::i;:49::-;11162:15;;;:67;11244:34;;;;;;;;11264:4;;11252:10;;11244:34;;;;;;;;;10521:764;;;;:::o;3445:42::-;;;;:::o;1959:266:5:-;1264:12;:10;:12::i;:::-;1254:6;;-1:-1:-1;;;;;1254:6:5;;;:22;;;1246:67;;;;;-1:-1:-1;;;1246:67:5;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1246:67:5;;;;;;;;;;;;;;;-1:-1:-1;;;;;2052:22:5;;2031:107;;;;-1:-1:-1;;;2031:107:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2174:6;;;2153:38;;-1:-1:-1;;;;;2153:38:5;;;;2174:6;;;2153:38;;;2201:6;:17;;-1:-1:-1;;;;;;2201:17:5;-1:-1:-1;;;;;2201:17:5;;;;;;;;;;1959:266::o;548:96:1:-;627:10;548:96;:::o;841:176:7:-;899:7;930:5;;;953:6;;;;945:46;;;;;-1:-1:-1;;;945:46:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;1009:1;841:176;-1:-1:-1;;;841:176:7:o;3098:130::-;3156:7;3182:39;3186:1;3189;3182:39;;;;;;;;;;;;;;;;;:3;:39::i;2177:459::-;2235:7;2476:6;2472:45;;-1:-1:-1;2505:1:7;2498:8;;2472:45;2539:5;;;2543:1;2539;:5;:1;2562:5;;;;;:10;2554:56;;;;-1:-1:-1;;;2554:56:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1288:134;1346:7;1372:43;1376:1;1379;1372:43;;;;;;;;;;;;;;;;;:3;:43::i;12588:285:8:-;12685:6;;:31;;;-1:-1:-1;;;12685:31:8;;12710:4;12685:31;;;;;;12665:17;;-1:-1:-1;;;;;12685:6:8;;:16;;:31;;;;;;;;;;;;;;:6;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;12685:31:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12685:31:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12685:31:8;;-1:-1:-1;12730:19:8;;;12726:141;;;12765:6;;:31;;;-1:-1:-1;;;12765:31:8;;-1:-1:-1;;;;;12765:31:8;;;;;;;;;;;;;;;:6;;;;;:15;;:31;;;;;;;;;;;;;;:6;;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;12765:31:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12765:31:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12726:141:8;;-1:-1:-1;12726:141:8;;12827:6;;:29;;;-1:-1:-1;;;12827:29:8;;-1:-1:-1;;;;;12827:29:8;;;;;;;;;;;;;;;:6;;;;;:15;;:29;;;;;;;;;;;;;;:6;;:29;;;5:2:-1;;;;30:1;27;20:12;5:2;12827:29:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12827:29:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;12726:141:8;12588:285;;;:::o;644:239:6:-;808:58;;;-1:-1:-1;;;;;808:58:6;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;808:58:6;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;756:120:6;;789:5;;756:19;:120::i;1424:690::-;1832:10;;;1831:62;;-1:-1:-1;1848:39:6;;;-1:-1:-1;;;1848:39:6;;1872:4;1848:39;;;;-1:-1:-1;;;;;1848:39:6;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;1848:39:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1848:39:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1848:39:6;:44;1831:62;1810:163;;;;-1:-1:-1;;;1810:163:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2035:62;;;-1:-1:-1;;;;;2035:62:6;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2035:62:6;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;1983:124:6;;2016:5;;1983:19;:124::i;889:275::-;1079:68;;;-1:-1:-1;;;;;1079:68:6;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1079:68:6;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;1027:130:6;;1060:5;;1027:19;:130::i;3710:302:7:-;3826:7;3860:12;3853:5;3845:28;;;;-1:-1:-1;;;3845:28:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3845:28:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3883:9;3899:1;3895;:5;;;;;;;3710:302;-1:-1:-1;;;;;3710:302:7:o;1713:217::-;1829:7;1864:12;1856:6;;;;1848:29;;;;-1:-1:-1;;;1848:29:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;1848:29:7;-1:-1:-1;;;1899:5:7;;;1713:217::o;3428:843:6:-;3847:23;3873:103;3914:4;3873:103;;;;;;;;;;;;;;;;;3881:5;-1:-1:-1;;;;;3873:27:6;;;:103;;;;;:::i;:::-;3990:17;;3847:129;;-1:-1:-1;3990:21:6;3986:279;;4159:10;4148:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4148:30:6;4123:131;;;;-1:-1:-1;;;4123:131:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3859:224:0;3992:12;4023:53;4046:6;4054:4;4060:1;4063:12;4023:22;:53::i;:::-;4016:60;3859:224;-1:-1:-1;;;;3859:224:0:o;5428:1015::-;5596:12;5628:18;5639:6;5628:10;:18::i;:::-;5620:60;;;;;-1:-1:-1;;;5620:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5751:12;5765:23;5792:6;-1:-1:-1;;;;;5792:11:0;5810:8;5833:4;5792:55;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;5792:55:0;;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;5750:97:0;;;;5861:7;5857:580;;;5891:10;-1:-1:-1;5884:17:0;;-1:-1:-1;5884:17:0;5857:580;6002:17;;:21;5998:429;;6260:10;6254:17;6320:15;6307:10;6303:2;6299:19;6292:44;6209:145;6392:20;;-1:-1:-1;;;6392:20:0;;;;;;;;;;;;;;;;;6399:12;;6392:20;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;685:645:0;745:4;1233:20;;1066:66;1280:23;;;;;;:42;;-1:-1:-1;;1307:15:0;;;1272:51;-1:-1:-1;;685:645:0:o

Swarm Source

bzzr://06e5357307d31281d66c6450a456ab4ba24663dfc1da3d7f9ee861e0742dedc2

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.