ETH Price: $2,839.79 (+6.83%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Get Clone209151282024-10-07 17:18:4730 days ago1728321527IN
0xaAaeE5CE...54b132D81
0 ETH0.0030580634.6099761
0x60806040209151262024-10-07 17:18:2330 days ago1728321503IN
 Create: SDAOLockedStaking
0 ETH0.0558103232.16307292

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
209151282024-10-07 17:18:4730 days ago1728321527
0xaAaeE5CE...54b132D81
 Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SDAOLockedStaking

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 8 : SDAOLockedStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./utils/Clonable.sol";
import "./rewards/SDAOSimpleRewardAPI.sol";

/*
 * @title SDAO Locked Staking contract
 * @notice requirements:
 *  1. users lock their tokens for a certain period
 *  2. users can extend their locking period to increase their score
 *  3. users can withdraw after their tokens unlock or withdraw immediately deducting an early unlock fee
 *  4. protocol should be able to query per wallet the score calculated by locked amount times locking period
 *  5. users can claim rewards proportionaly in the ratio of their score in respect to totalScore
 */
contract SDAOLockedStaking is Clonable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    uint256 constant public MAX_PERCENTAGE = 10000; // 100.00%
    uint256 constant public MAX_EARLY_UNLOCK_FEE = 5000; // 50.00%
    uint256 public MAX_LOCKING_PERIOD; // 360 days;
    uint256 public MAX_EARLY_UNLOCK_FEE_PER_DAY; // 5 = 0.05%

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many tokens the user has provided.
        uint256 lockDate; // Last date when user locked funds
        uint256 unlockDate; // Unlock date for user funds
        uint256 score; // Aggregation of locked amount times locked days
    }
    // Info of each user that locks tokens.
    mapping(address => UserInfo) public userInfo;

    bool public depositsEnabled; // deposits are enabled
    address public depositToken; // Address of deposit token contract.
    address public rewardToken; // Address of reward token contract.
    address public rewardsAPI;  // Rewards API module
    address public zapperContract; // Zapper contract allowed to deposit on behalf of a user
    uint256 public totalScore; // total score of all users
    uint256 public earlyUnlockFees; // accumulated fees for early withdrawals
    uint256 public earlyUnlockFeePerDay; // Default unlockFeePerDay 0.05%

    event Deposit(address indexed user, uint256 amount, uint256 lockingPeriod);
    event Withdraw(address indexed user, uint256 amount);
    event Claimed(address indexed user, uint256 claimed);
    event PaidEarlyUnlockFee(address indexed user, uint256 fee, uint256 secondsUntilUnlock);
    event CollectedFees(address admin, uint256 fees);
    event SetDepositsEnabled(address admin, bool depositsEnabled);
    event SetEarlyUnlockFeePerDay(address admin, uint256 earlyUnlockFeePerDay);
    event SetZapperContract(address admin, address zapperContract);
    
    error AlreadyInitialized();
    error MissingToken();
    error MissingAmount();
    error MissingDepositToken();
    error MissingRewardsAPI();
    error MissingZapperContract();
    error DepositsDisabled();
    error DepositTokenRecoveryNotAllowed();
    error SenderIsNotZapper(address sender, address zapper);
    error ExceedsMaxEarlyUnlockFeePerDay(uint256 fee, uint maxFee);
    error ExceedsMaxLockingPeriod(uint256 period, uint256 maxPeriod);
    error WithdrawalRequestExceedsDeposited(uint256 requestedWithdrawal, uint256 currentBalance);
    error RequestedUnlockDateBeforeCurrent(uint256 requestedUnlockDate, uint256 currentUnlockDate);

    /*
     * @dev initialize function to setup cloned instance
     * @notice marked the initialize function as payable, because it costs less gas to execute,
     * since the compiler does not have to add extra checks to ensure that a payment wasn't provided.
     */
    function initialize(
        address _depositToken,
        address _rewardsAPI,
        uint256 maxLockingPeriodInDays,
        uint256 maxEarlyUnlockFeePerDay
    ) external payable onlyOwner {
        if (depositToken != address(0)) {
            revert AlreadyInitialized();
        }
        if (_depositToken == address(0)) {
            revert MissingDepositToken();
        }
        if (_rewardsAPI == address(0)) {
            revert MissingRewardsAPI();
        }

        require(
            maxLockingPeriodInDays > 0 && maxEarlyUnlockFeePerDay > 0,
            "maxLockingPeriodInDays and maxEarlyUnlockFeePerDay must be > 0"
        );

        MAX_LOCKING_PERIOD = maxLockingPeriodInDays * 1 days;
        MAX_EARLY_UNLOCK_FEE_PER_DAY = maxEarlyUnlockFeePerDay;

        depositToken = _depositToken;
        rewardsAPI = _rewardsAPI;      
        rewardToken = SDAOSimpleRewardAPI(_rewardsAPI).rewardToken();
        earlyUnlockFeePerDay = 5;
    }


    /*
     * @dev Deposit tokens
     */
    function deposit(uint256 _amount, uint256 _lockingPeriod) external nonReentrant {
        uint256 _tokens_deposited = _deposit(_amount, msg.sender, msg.sender, _lockingPeriod);
        emit Deposit(msg.sender, _tokens_deposited, _lockingPeriod);
    }

    /*
     * @dev Deposit tokens from zapper contract on behalf of the user
     */
    function depositFor(address _recipient, uint256 _amount, uint256 _lockingPeriod) external nonReentrant {
        if (msg.sender != zapperContract) {
            revert SenderIsNotZapper(msg.sender, zapperContract);
        }
        uint256 _tokens_deposited = _deposit(_amount, msg.sender, _recipient, _lockingPeriod);
        emit Deposit(msg.sender, _tokens_deposited, _lockingPeriod);
    }

    /*
     * @dev Withdraw tokens
     */
    function withdraw(uint256 _amount) external nonReentrant {
        _withdraw(_amount, msg.sender);
        emit Withdraw(msg.sender, _amount);
    }

    /*
     * @dev Pending rewards
     */
    function pending() external view returns(uint256) {
        return SDAOSimpleRewardAPI(rewardsAPI).claimableForUser(msg.sender);
    }

    /*
     * @dev Pending rewards for user
     */
    function pendingFor(address _user) external view returns(uint256) {
        return SDAOSimpleRewardAPI(rewardsAPI).claimableForUser(_user);
    }

    /*
     * @dev Claim rewards
     */
    function claim() external {
        uint256 _claimed = SDAOSimpleRewardAPI(rewardsAPI).claimForUser(msg.sender);
        emit Claimed(msg.sender, _claimed);
    }

    /*
     * @dev withdraw and claim in one transaction
     */
    function withdrawAndClaim(uint256 _amount) external nonReentrant {
        _withdraw(_amount, msg.sender);
        emit Withdraw(msg.sender, _amount);
        SDAOSimpleRewardAPI(rewardsAPI).claimForUser(msg.sender);
    }
  
    /*
     * @dev enable/disable new deposits
     */
    function setDepositsEnabled(bool _depositsEnabled) external onlyOwner {
        depositsEnabled = _depositsEnabled;
        emit SetDepositsEnabled(msg.sender, _depositsEnabled);
    }

    /**
      * @dev change earlyUnlockFeePerDay
      */
    function setEarlyUnlockFeePerDay(uint256 _earlyUnlockFeePerDay) external onlyOwner {
        if (_earlyUnlockFeePerDay > MAX_EARLY_UNLOCK_FEE_PER_DAY) {
            revert ExceedsMaxEarlyUnlockFeePerDay(_earlyUnlockFeePerDay, MAX_EARLY_UNLOCK_FEE_PER_DAY);
        }
        earlyUnlockFeePerDay = _earlyUnlockFeePerDay;
        emit SetEarlyUnlockFeePerDay(msg.sender, _earlyUnlockFeePerDay);
    }
  
    /*
     * @dev Register zapper contract
     */
    function setZapperContract(address _zapperContract) external onlyOwner {
        if (_zapperContract == address(0)) {
            revert MissingZapperContract();
        }
        zapperContract = _zapperContract;
        emit SetZapperContract(msg.sender, _zapperContract);
    }

    /**
      * @dev recover unsupported tokens
      */
    function recoverUnsupportedTokens(address _token, uint256 amount, address to) external onlyOwner {
        if (_token == address(0)) {
            revert MissingToken();
        }
        if (_token == depositToken) {
            revert DepositTokenRecoveryNotAllowed();
        }
        IERC20(_token).safeTransfer(to, amount);
    }
  
    /**
      * @dev collect accumulated early unlock fees
      */
    function collectFees() external onlyOwner {
        uint256 fees = earlyUnlockFees;
        earlyUnlockFees = 0;
        IERC20(depositToken).safeTransfer(msg.sender, fees);
        emit CollectedFees(msg.sender, fees);
    }

    /*
     * @dev internal deposit function
     */
    function _deposit(uint256 _amount, 
                      address _depositor, 
                      address _recipient, 
                      uint256 _lockingPeriod) internal returns (uint256 tokensDeposited) {
        if (_lockingPeriod > MAX_LOCKING_PERIOD) {
            revert ExceedsMaxLockingPeriod(_lockingPeriod, MAX_LOCKING_PERIOD);
        }
        if (!depositsEnabled) {
            revert DepositsDisabled();
        }
        UserInfo memory user = userInfo[_recipient];
        if (_amount == 0 && user.amount == 0) {
            revert MissingAmount();
        }
        uint256 newEndPeriod = block.timestamp + _lockingPeriod;
        if (newEndPeriod < user.unlockDate) {
            revert RequestedUnlockDateBeforeCurrent(newEndPeriod, user.unlockDate);
        }
        uint256 deltaScore;
        
        if (_amount > 0) {
            IERC20 _depositToken = IERC20(depositToken);
            uint256 _before = _depositToken.balanceOf(address(this));
            _depositToken.safeTransferFrom(_depositor, address(this), _amount);
            tokensDeposited = _depositToken.balanceOf(address(this)) - _before;
        } 

        if (user.amount > 0) {
            // extend unlock date
            uint256 extensionPeriod = newEndPeriod - user.unlockDate;
            deltaScore += user.amount * extensionPeriod;
        }

        // handle new deposit
        deltaScore += tokensDeposited * _lockingPeriod;
      
        totalScore += deltaScore;
        user.score += deltaScore;
        SDAOSimpleRewardAPI(rewardsAPI).changeUserShares(_recipient, user.score);
        user.amount += tokensDeposited;
        user.lockDate = block.timestamp;
        user.unlockDate = newEndPeriod;
        userInfo[_recipient] = user;
    }

    /*
     * @dev internal withdraw function
     */
    function _withdraw(uint256 _amount, address _user) internal {
        UserInfo storage user = userInfo[_user];
        if (user.amount < _amount) {
            revert WithdrawalRequestExceedsDeposited(_amount, user.amount);
        }
        if (_amount == 0) {
            revert MissingAmount();
        }
        uint256 originalUnlockDate = user.unlockDate;
        uint256 deltaScore;
        // when unlock date has passed
        if (originalUnlockDate < block.timestamp) {
            // extend unlock date
            uint256 extensionPeriod = block.timestamp - originalUnlockDate; 
            deltaScore = user.amount * extensionPeriod;
            totalScore += deltaScore;
            user.score += deltaScore;
            user.unlockDate = block.timestamp;
        }
        uint256 withdrawalAmount = _amount;
        // score will be reduced proportional to the amount withdrawn
        deltaScore = user.score * withdrawalAmount / user.amount;
        // apply withdrawal amount
        user.amount -= withdrawalAmount;
        // update scores
        totalScore -= deltaScore;
        user.score -= deltaScore;
        SDAOSimpleRewardAPI(rewardsAPI).changeUserShares(_user, user.score);
        // when not yet completely unlocked, apply early unlock fee
        if (user.unlockDate > block.timestamp) {
            uint256 earlyUnlockFee = withdrawalAmount * (originalUnlockDate - block.timestamp) * earlyUnlockFeePerDay 
                                                      / 1 days                                 / MAX_PERCENTAGE;
            earlyUnlockFees += earlyUnlockFee;
            withdrawalAmount -= earlyUnlockFee;
            emit PaidEarlyUnlockFee(_user, earlyUnlockFee, originalUnlockDate - block.timestamp);
        }
        // when completely withdrawn, reset unlockdate
        if (user.amount == 0) {
            user.unlockDate = block.timestamp;
        }
        IERC20(depositToken).safeTransfer(_user, withdrawalAmount);
    }
  
}

File 2 of 8 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 3 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

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

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

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

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

File 4 of 8 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/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 Address for address;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

File 5 of 8 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

File 6 of 8 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

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

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

File 7 of 8 : SDAOSimpleRewardAPI.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

// Interface for holding and managing emission of rewards for single reward token
// - reward contract can collect accrued reward tokens
interface SDAOSimpleRewardAPI {

    event UpdatedRewardEmission(uint256 amount, uint256 start, uint256 end);
    event ReservedForUser(address user, address token, uint256 rewards);
    event ClaimedByUser(address user, address token, uint256 amount);
    event CommissionFromUser(address user, address token, uint256 amount);



    struct UserInfo {
        uint256 shares; // user shares
        uint256 rewardFloor; // reward floor to calculate pending
        uint256 reserved; // reserved for user
    }
    
    struct RewardTokenInfo {
          address rewardToken; // token to be distributed as rewards
          uint256 balance; // total claimed and held for reward contract to collect
          uint256 totalAmount; // total amount to be distributed during emissionPeriod
          uint256 emissionPeriod; // emission period in seconds to distribute these reward tokens
          uint256 startOfEmission; // start time of emissions
          uint256 endOfEmission; // last time when these rewards are emitted
          uint256 lastClaim; // last time when rewards have been claimed
    }

    function depositContract() external view returns (address);
    function rewardToken() external view returns (address);
    function getRewardInfo() external view returns (RewardTokenInfo memory);
    
    function changeUserShares(address _user, uint256 _newShares) external;
    function pendingForUser(address _user) external view returns (uint256 pendingRewards);
    function claimableForUser(address _user) external view returns (uint256 claimable);
    function claimForUser(address _user) external returns (uint256 claimed);
}

File 8 of 8 : Clonable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

contract Clonable {
    address private _owner;

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

    error CallerIsNotOwner();
    error AlreadyInitializedOwner();
    error MissingOwner();
    
    /*
     * @notice marked the constructor function as payable, because it costs less gas to execute,
     * since the compiler does not have to add extra checks to ensure that a payment wasn't provided.
     * A constructor can safely be marked as payable, since only the deployer would be able to pass funds, 
     * and the project itself would not pass any funds.
     */
    constructor() payable {
        _owner = msg.sender;
    }
    
    function owner() external view returns(address) {
        return _owner;
    }

    modifier onlyOwner() {
        if (_owner != msg.sender) {
            revert CallerIsNotOwner();
        }
        _;
    }

    function setOwnerAfterClone(address initialOwner) external {
        if (_owner != address(0)) {
            revert AlreadyInitializedOwner();
        }
        _owner = initialOwner;
        emit OwnershipTransferred(address(0), initialOwner);
    }

    function transferOwnership(address newOwner) external onlyOwner {
        if (newOwner == address(0)) {
            revert MissingOwner();
        }
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

    function clone(address newOwner) public returns (address newInstance){
        if (newOwner == address(0)) {
            revert MissingOwner();
        }
        // Copied from https://github.com/optionality/clone-factory/blob/master/contracts/CloneFactory.sol
        bytes20 addressBytes = bytes20(address(this));
        assembly {
            // EIP-1167 bytecode
            let clone_code := mload(0x40)
            mstore(clone_code, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(clone_code, 0x14), addressBytes)
            mstore(add(clone_code, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            newInstance := create(0, clone_code, 0x37)
        }
        emit Cloned(newInstance);
        Clonable(newInstance).setOwnerAfterClone(newOwner);
    }
    
    function getClone() external returns (address) {
        return clone(msg.sender);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"AlreadyInitializedOwner","type":"error"},{"inputs":[],"name":"CallerIsNotOwner","type":"error"},{"inputs":[],"name":"DepositTokenRecoveryNotAllowed","type":"error"},{"inputs":[],"name":"DepositsDisabled","type":"error"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"maxFee","type":"uint256"}],"name":"ExceedsMaxEarlyUnlockFeePerDay","type":"error"},{"inputs":[{"internalType":"uint256","name":"period","type":"uint256"},{"internalType":"uint256","name":"maxPeriod","type":"uint256"}],"name":"ExceedsMaxLockingPeriod","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"MissingAmount","type":"error"},{"inputs":[],"name":"MissingDepositToken","type":"error"},{"inputs":[],"name":"MissingOwner","type":"error"},{"inputs":[],"name":"MissingRewardsAPI","type":"error"},{"inputs":[],"name":"MissingToken","type":"error"},{"inputs":[],"name":"MissingZapperContract","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"uint256","name":"requestedUnlockDate","type":"uint256"},{"internalType":"uint256","name":"currentUnlockDate","type":"uint256"}],"name":"RequestedUnlockDateBeforeCurrent","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"zapper","type":"address"}],"name":"SenderIsNotZapper","type":"error"},{"inputs":[{"internalType":"uint256","name":"requestedWithdrawal","type":"uint256"},{"internalType":"uint256","name":"currentBalance","type":"uint256"}],"name":"WithdrawalRequestExceedsDeposited","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"claimed","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newInstance","type":"address"}],"name":"Cloned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"CollectedFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockingPeriod","type":"uint256"}],"name":"Deposit","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":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"secondsUntilUnlock","type":"uint256"}],"name":"PaidEarlyUnlockFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"bool","name":"depositsEnabled","type":"bool"}],"name":"SetDepositsEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"uint256","name":"earlyUnlockFeePerDay","type":"uint256"}],"name":"SetEarlyUnlockFeePerDay","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"address","name":"zapperContract","type":"address"}],"name":"SetZapperContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MAX_EARLY_UNLOCK_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_EARLY_UNLOCK_FEE_PER_DAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_LOCKING_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"clone","outputs":[{"internalType":"address","name":"newInstance","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_lockingPeriod","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_lockingPeriod","type":"uint256"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"earlyUnlockFeePerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"earlyUnlockFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClone","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_depositToken","type":"address"},{"internalType":"address","name":"_rewardsAPI","type":"address"},{"internalType":"uint256","name":"maxLockingPeriodInDays","type":"uint256"},{"internalType":"uint256","name":"maxEarlyUnlockFeePerDay","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pending","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"recoverUnsupportedTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsAPI","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_depositsEnabled","type":"bool"}],"name":"setDepositsEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_earlyUnlockFeePerDay","type":"uint256"}],"name":"setEarlyUnlockFeePerDay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"name":"setOwnerAfterClone","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_zapperContract","type":"address"}],"name":"setZapperContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalScore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"lockDate","type":"uint256"},{"internalType":"uint256","name":"unlockDate","type":"uint256"},{"internalType":"uint256","name":"score","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawAndClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"zapperContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6080604052348015600f57600080fd5b50600080546001600160a01b0319163317905560018055611dbf806100356000396000f3fe6080604052600436106101d85760003560e01c80639c816d6e11610102578063df98e0c811610095578063ea5ccf5311610064578063ea5ccf5314610551578063eb990c5914610567578063f2fde38b1461057a578063f7c618c11461059a57600080fd5b8063df98e0c8146104e6578063e2032d18146104fc578063e20ccec31461051c578063e2bbb1581461053157600080fd5b8063c8796572116100d1578063c87965721461046c578063c89039c514610481578063d7820452146104a6578063db1e0bf6146104c657600080fd5b80639c816d6e146103f65780639f04586c14610416578063ad456dfe14610436578063c006719f1461045657600080fd5b80634c255c971161017a578063808ee92f11610149578063808ee92f1461038c5780638124b78e146103a25780638978f407146103c25780638da5cb5b146103d857600080fd5b80634c255c97146103175780634cf5fbf51461032d5780634e71d92d1461034d5780635392fd1c1461036257600080fd5b80632e1a7d4d116101b65780632e1a7d4d146102a05780632f49e6cc146102c2578063448a1047146102d75780634a7a2914146102f757600080fd5b806315a39747146101dd5780631959a0021461021a57806327e15a131461027c575b600080fd5b3480156101e957600080fd5b506008546101fd906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561022657600080fd5b5061025c610235366004611b52565b60046020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610211565b34801561028857600080fd5b5061029261138881565b604051908152602001610211565b3480156102ac57600080fd5b506102c06102bb366004611b6f565b6105ba565b005b3480156102ce57600080fd5b506101fd61060d565b3480156102e357600080fd5b506102c06102f2366004611b6f565b61061d565b34801561030357600080fd5b506007546101fd906001600160a01b031681565b34801561032357600080fd5b5061029261271081565b34801561033957600080fd5b506102c0610348366004611b88565b6106dc565b34801561035957600080fd5b506102c061079d565b34801561036e57600080fd5b5060055461037c9060ff1681565b6040519015158152602001610211565b34801561039857600080fd5b50610292600b5481565b3480156103ae57600080fd5b506101fd6103bd366004611b52565b610847565b3480156103ce57600080fd5b50610292600a5481565b3480156103e457600080fd5b506000546001600160a01b03166101fd565b34801561040257600080fd5b506102c0610411366004611b52565b610988565b34801561042257600080fd5b506102c0610431366004611bcb565b610a4f565b34801561044257600080fd5b506102c0610451366004611b52565b610ac2565b34801561046257600080fd5b5061029260095481565b34801561047857600080fd5b506102c0610b50565b34801561048d57600080fd5b506005546101fd9061010090046001600160a01b031681565b3480156104b257600080fd5b506102926104c1366004611b52565b610bd6565b3480156104d257600080fd5b506102c06104e1366004611be8565b610c4b565b3480156104f257600080fd5b5061029260035481565b34801561050857600080fd5b506102c0610517366004611b6f565b610d17565b34801561052857600080fd5b50610292610dc7565b34801561053d57600080fd5b506102c061054c366004611c2a565b610e34565b34801561055d57600080fd5b5061029260025481565b6102c0610575366004611c4c565b610e96565b34801561058657600080fd5b506102c0610595366004611b52565b611132565b3480156105a657600080fd5b506006546101fd906001600160a01b031681565b6105c26111df565b6105cc8133611222565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a261060a60018055565b50565b600061061833610847565b905090565b6106256111df565b61062f8133611222565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a260075460405163a31254d160e01b81523360048201526001600160a01b039091169063a31254d1906024016020604051808303816000875af11580156106ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d29190611c92565b5061060a60018055565b6106e46111df565b6008546001600160a01b03163314610742576008546040517f9878471e0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b6000610750833386856114d9565b604080518281526020810185905291925033917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a25061079860018055565b505050565b60075460405163a31254d160e01b81523360048201526000916001600160a01b03169063a31254d1906024016020604051808303816000875af11580156107e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080c9190611c92565b60405181815290915033907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a250565b60006001600160a01b038216610870576040516301443de560e61b815260040160405180910390fd5b6040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081523060601b601482018190527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028830152906037816000f06040516001600160a01b03821681529093507f783540fb4221a3238720dc7038937d0d79982bcf895274aa6ad179f82cf0d53c915060200160405180910390a16040517fad456dfe0000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283169063ad456dfe90602401600060405180830381600087803b15801561096a57600080fd5b505af115801561097e573d6000803e3d6000fd5b5050505050919050565b6000546001600160a01b031633146109b357604051636db2465f60e01b815260040160405180910390fd5b6001600160a01b0381166109f3576040517f83b1ca5a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040805133815260208101929092527fe42a2d70ecf20f6f3bc3600a441569aa3b175ed0883d1e26011db060367dee8291015b60405180910390a150565b6000546001600160a01b03163314610a7a57604051636db2465f60e01b815260040160405180910390fd5b6005805460ff19168215159081179091556040805133815260208101929092527feafd77c9fa26ce797aa519fcee932a662cc58f6d55ced547c1db42b90b6f3e499101610a44565b6000546001600160a01b031615610b05576040517f7c1dbcc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350565b6000546001600160a01b03163314610b7b57604051636db2465f60e01b815260040160405180910390fd5b600a80546000909155600554610ba09061010090046001600160a01b0316338361188c565b60408051338152602081018390527f4a3c76a47561e8a3caaa0588b06516c573c53d9b462a67e6b1ceb8f67eb81dba9101610a44565b600754604051639601497b60e01b81526001600160a01b0383811660048301526000921690639601497b90602401602060405180830381865afa158015610c21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c459190611c92565b92915050565b6000546001600160a01b03163314610c7657604051636db2465f60e01b815260040160405180910390fd5b6001600160a01b038316610cb6576040517fcb59f26700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546001600160a01b03610100909104811690841603610d03576040517f322dd9d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107986001600160a01b038416828461188c565b6000546001600160a01b03163314610d4257604051636db2465f60e01b815260040160405180910390fd5b600354811115610d8c576003546040517fa6f2f5d7000000000000000000000000000000000000000000000000000000008152610739918391600401918252602082015260400190565b600b81905560408051338152602081018390527fdc5b5255ffac2a0690bab37810eff46daef9e62e5d8aae65f256228bfe824b339101610a44565b600754604051639601497b60e01b81523360048201526000916001600160a01b031690639601497b90602401602060405180830381865afa158015610e10573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106189190611c92565b610e3c6111df565b6000610e4a833333856114d9565b604080518281526020810185905291925033917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a250610e9260018055565b5050565b6000546001600160a01b03163314610ec157604051636db2465f60e01b815260040160405180910390fd5b60055461010090046001600160a01b031615610f09576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416610f49576040517f807578a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316610f89576040517f4a1aabeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082118015610f995750600081115b611025576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f6d61784c6f636b696e67506572696f64496e4461797320616e64206d6178456160448201527f726c79556e6c6f636b466565506572446179206d757374206265203e203000006064820152608401610739565b6110328262015180611cc1565b6002556003819055600580546001600160a01b03808716610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff90921691909117909155600780549185166001600160a01b031990921682179055604080517ff7c618c1000000000000000000000000000000000000000000000000000000008152905163f7c618c1916004808201926020929091908290030181865afa1580156110e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111079190611cd8565b600680546001600160a01b0319166001600160a01b039290921691909117905550506005600b555050565b6000546001600160a01b0316331461115d57604051636db2465f60e01b815260040160405180910390fd5b6001600160a01b038116611184576040516301443de560e61b815260040160405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60026001540361121b576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600155565b6001600160a01b038116600090815260046020526040902080548311156112825780546040517fcd777af3000000000000000000000000000000000000000000000000000000008152610739918591600401918252602082015260400190565b826000036112a3576040516306551f4d60e01b815260040160405180910390fd5b600281015460004282101561130a5760006112be8342611cf5565b84549091506112ce908290611cc1565b915081600960008282546112e29190611d08565b92505081905550818460030160008282546112fd9190611d08565b9091555050426002850155505b8254600384015486919061131f908390611cc1565b6113299190611d1b565b91508084600001600082825461133f9190611cf5565b9250508190555081600960008282546113589190611cf5565b92505081905550818460030160008282546113739190611cf5565b90915550506007546003850154604051630dd96ce360e11b81526001600160a01b0388811660048301526024820192909252911690631bb2d9c690604401600060405180830381600087803b1580156113cb57600080fd5b505af11580156113df573d6000803e3d6000fd5b5050505042846002015411156114a557600061271062015180600b5442876114079190611cf5565b6114119086611cc1565b61141b9190611cc1565b6114259190611d1b565b61142f9190611d1b565b905080600a60008282546114439190611d08565b9091555061145390508183611cf5565b91506001600160a01b0386167f204399c527f9dd2e64595a61f7ba62df2512bfe0403396acc162dd9064fd643a8261148b4288611cf5565b6040805192835260208301919091520160405180910390a2505b83546000036114b5574260028501555b6005546114d19061010090046001600160a01b0316868361188c565b505050505050565b6000600254821115611525576002546040517f0858c6b2000000000000000000000000000000000000000000000000000000008152610739918491600401918252602082015260400190565b60055460ff16611561576040517f717a164800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383166000908152600460209081526040918290208251608081018452815481526001820154928101929092526002810154928201929092526003909101546060820152851580156115b957508051155b156115d7576040516306551f4d60e01b815260040160405180910390fd5b60006115e38442611d08565b90508160400151811015611634578082604001516040517fe0eca1e7000000000000000000000000000000000000000000000000000000008152600401610739929190918252602082015260400190565b60008715611741576005546040516370a0823160e01b81523060048201526101009091046001600160a01b03169060009082906370a0823190602401602060405180830381865afa15801561168d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b19190611c92565b90506116c86001600160a01b0383168a308d611900565b6040516370a0823160e01b815230600482015281906001600160a01b038416906370a0823190602401602060405180830381865afa15801561170e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117329190611c92565b61173c9190611cf5565b955050505b82511561177857600083604001518361175a9190611cf5565b845190915061176a908290611cc1565b6117749083611d08565b9150505b6117828585611cc1565b61178c9082611d08565b905080600960008282546117a09190611d08565b9250508190555080836060018181516117b99190611d08565b9052506007546060840151604051630dd96ce360e11b81526001600160a01b0389811660048301526024820192909252911690631bb2d9c690604401600060405180830381600087803b15801561180f57600080fd5b505af1158015611823573d6000803e3d6000fd5b5050505083836000018181516118399190611d08565b9052505042602080840191825260408085019384526001600160a01b0390971660009081526004909152959095208251815594516001860155516002850155606001516003909301929092555092915050565b6040516001600160a01b0383811660248301526044820183905261079891859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061193f565b6040516001600160a01b0384811660248301528381166044830152606482018390526119399186918216906323b872dd906084016118b9565b50505050565b60006119546001600160a01b038416836119bb565b905080516000141580156119795750808060200190518101906119779190611d3d565b155b15610798576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610739565b60606119c9838360006119d0565b9392505050565b606081471015611a0e576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610739565b600080856001600160a01b03168486604051611a2a9190611d5a565b60006040518083038185875af1925050503d8060008114611a67576040519150601f19603f3d011682016040523d82523d6000602084013e611a6c565b606091505b5091509150611a7c868383611a86565b9695505050505050565b606082611a9b57611a9682611afb565b6119c9565b8151158015611ab257506001600160a01b0384163b155b15611af4576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610739565b50806119c9565b805115611b0b5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116811461060a57600080fd5b600060208284031215611b6457600080fd5b81356119c981611b3d565b600060208284031215611b8157600080fd5b5035919050565b600080600060608486031215611b9d57600080fd5b8335611ba881611b3d565b95602085013595506040909401359392505050565b801515811461060a57600080fd5b600060208284031215611bdd57600080fd5b81356119c981611bbd565b600080600060608486031215611bfd57600080fd5b8335611c0881611b3d565b9250602084013591506040840135611c1f81611b3d565b809150509250925092565b60008060408385031215611c3d57600080fd5b50508035926020909101359150565b60008060008060808587031215611c6257600080fd5b8435611c6d81611b3d565b93506020850135611c7d81611b3d565b93969395505050506040820135916060013590565b600060208284031215611ca457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610c4557610c45611cab565b600060208284031215611cea57600080fd5b81516119c981611b3d565b81810381811115610c4557610c45611cab565b80820180821115610c4557610c45611cab565b600082611d3857634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611d4f57600080fd5b81516119c981611bbd565b6000825160005b81811015611d7b5760208186018101518583015201611d61565b50600092019182525091905056fea26469706673582212202cb7f6f0289c6109a596c1bf1d929ff4defcae453355aaaa714b0957d157115c64736f6c63430008190033

Deployed Bytecode

0x6080604052600436106101d85760003560e01c80639c816d6e11610102578063df98e0c811610095578063ea5ccf5311610064578063ea5ccf5314610551578063eb990c5914610567578063f2fde38b1461057a578063f7c618c11461059a57600080fd5b8063df98e0c8146104e6578063e2032d18146104fc578063e20ccec31461051c578063e2bbb1581461053157600080fd5b8063c8796572116100d1578063c87965721461046c578063c89039c514610481578063d7820452146104a6578063db1e0bf6146104c657600080fd5b80639c816d6e146103f65780639f04586c14610416578063ad456dfe14610436578063c006719f1461045657600080fd5b80634c255c971161017a578063808ee92f11610149578063808ee92f1461038c5780638124b78e146103a25780638978f407146103c25780638da5cb5b146103d857600080fd5b80634c255c97146103175780634cf5fbf51461032d5780634e71d92d1461034d5780635392fd1c1461036257600080fd5b80632e1a7d4d116101b65780632e1a7d4d146102a05780632f49e6cc146102c2578063448a1047146102d75780634a7a2914146102f757600080fd5b806315a39747146101dd5780631959a0021461021a57806327e15a131461027c575b600080fd5b3480156101e957600080fd5b506008546101fd906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561022657600080fd5b5061025c610235366004611b52565b60046020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610211565b34801561028857600080fd5b5061029261138881565b604051908152602001610211565b3480156102ac57600080fd5b506102c06102bb366004611b6f565b6105ba565b005b3480156102ce57600080fd5b506101fd61060d565b3480156102e357600080fd5b506102c06102f2366004611b6f565b61061d565b34801561030357600080fd5b506007546101fd906001600160a01b031681565b34801561032357600080fd5b5061029261271081565b34801561033957600080fd5b506102c0610348366004611b88565b6106dc565b34801561035957600080fd5b506102c061079d565b34801561036e57600080fd5b5060055461037c9060ff1681565b6040519015158152602001610211565b34801561039857600080fd5b50610292600b5481565b3480156103ae57600080fd5b506101fd6103bd366004611b52565b610847565b3480156103ce57600080fd5b50610292600a5481565b3480156103e457600080fd5b506000546001600160a01b03166101fd565b34801561040257600080fd5b506102c0610411366004611b52565b610988565b34801561042257600080fd5b506102c0610431366004611bcb565b610a4f565b34801561044257600080fd5b506102c0610451366004611b52565b610ac2565b34801561046257600080fd5b5061029260095481565b34801561047857600080fd5b506102c0610b50565b34801561048d57600080fd5b506005546101fd9061010090046001600160a01b031681565b3480156104b257600080fd5b506102926104c1366004611b52565b610bd6565b3480156104d257600080fd5b506102c06104e1366004611be8565b610c4b565b3480156104f257600080fd5b5061029260035481565b34801561050857600080fd5b506102c0610517366004611b6f565b610d17565b34801561052857600080fd5b50610292610dc7565b34801561053d57600080fd5b506102c061054c366004611c2a565b610e34565b34801561055d57600080fd5b5061029260025481565b6102c0610575366004611c4c565b610e96565b34801561058657600080fd5b506102c0610595366004611b52565b611132565b3480156105a657600080fd5b506006546101fd906001600160a01b031681565b6105c26111df565b6105cc8133611222565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a261060a60018055565b50565b600061061833610847565b905090565b6106256111df565b61062f8133611222565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a260075460405163a31254d160e01b81523360048201526001600160a01b039091169063a31254d1906024016020604051808303816000875af11580156106ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d29190611c92565b5061060a60018055565b6106e46111df565b6008546001600160a01b03163314610742576008546040517f9878471e0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b6000610750833386856114d9565b604080518281526020810185905291925033917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a25061079860018055565b505050565b60075460405163a31254d160e01b81523360048201526000916001600160a01b03169063a31254d1906024016020604051808303816000875af11580156107e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080c9190611c92565b60405181815290915033907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a250565b60006001600160a01b038216610870576040516301443de560e61b815260040160405180910390fd5b6040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081523060601b601482018190527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028830152906037816000f06040516001600160a01b03821681529093507f783540fb4221a3238720dc7038937d0d79982bcf895274aa6ad179f82cf0d53c915060200160405180910390a16040517fad456dfe0000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283169063ad456dfe90602401600060405180830381600087803b15801561096a57600080fd5b505af115801561097e573d6000803e3d6000fd5b5050505050919050565b6000546001600160a01b031633146109b357604051636db2465f60e01b815260040160405180910390fd5b6001600160a01b0381166109f3576040517f83b1ca5a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040805133815260208101929092527fe42a2d70ecf20f6f3bc3600a441569aa3b175ed0883d1e26011db060367dee8291015b60405180910390a150565b6000546001600160a01b03163314610a7a57604051636db2465f60e01b815260040160405180910390fd5b6005805460ff19168215159081179091556040805133815260208101929092527feafd77c9fa26ce797aa519fcee932a662cc58f6d55ced547c1db42b90b6f3e499101610a44565b6000546001600160a01b031615610b05576040517f7c1dbcc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350565b6000546001600160a01b03163314610b7b57604051636db2465f60e01b815260040160405180910390fd5b600a80546000909155600554610ba09061010090046001600160a01b0316338361188c565b60408051338152602081018390527f4a3c76a47561e8a3caaa0588b06516c573c53d9b462a67e6b1ceb8f67eb81dba9101610a44565b600754604051639601497b60e01b81526001600160a01b0383811660048301526000921690639601497b90602401602060405180830381865afa158015610c21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c459190611c92565b92915050565b6000546001600160a01b03163314610c7657604051636db2465f60e01b815260040160405180910390fd5b6001600160a01b038316610cb6576040517fcb59f26700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546001600160a01b03610100909104811690841603610d03576040517f322dd9d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107986001600160a01b038416828461188c565b6000546001600160a01b03163314610d4257604051636db2465f60e01b815260040160405180910390fd5b600354811115610d8c576003546040517fa6f2f5d7000000000000000000000000000000000000000000000000000000008152610739918391600401918252602082015260400190565b600b81905560408051338152602081018390527fdc5b5255ffac2a0690bab37810eff46daef9e62e5d8aae65f256228bfe824b339101610a44565b600754604051639601497b60e01b81523360048201526000916001600160a01b031690639601497b90602401602060405180830381865afa158015610e10573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106189190611c92565b610e3c6111df565b6000610e4a833333856114d9565b604080518281526020810185905291925033917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a250610e9260018055565b5050565b6000546001600160a01b03163314610ec157604051636db2465f60e01b815260040160405180910390fd5b60055461010090046001600160a01b031615610f09576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416610f49576040517f807578a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316610f89576040517f4a1aabeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082118015610f995750600081115b611025576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f6d61784c6f636b696e67506572696f64496e4461797320616e64206d6178456160448201527f726c79556e6c6f636b466565506572446179206d757374206265203e203000006064820152608401610739565b6110328262015180611cc1565b6002556003819055600580546001600160a01b03808716610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff90921691909117909155600780549185166001600160a01b031990921682179055604080517ff7c618c1000000000000000000000000000000000000000000000000000000008152905163f7c618c1916004808201926020929091908290030181865afa1580156110e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111079190611cd8565b600680546001600160a01b0319166001600160a01b039290921691909117905550506005600b555050565b6000546001600160a01b0316331461115d57604051636db2465f60e01b815260040160405180910390fd5b6001600160a01b038116611184576040516301443de560e61b815260040160405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60026001540361121b576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600155565b6001600160a01b038116600090815260046020526040902080548311156112825780546040517fcd777af3000000000000000000000000000000000000000000000000000000008152610739918591600401918252602082015260400190565b826000036112a3576040516306551f4d60e01b815260040160405180910390fd5b600281015460004282101561130a5760006112be8342611cf5565b84549091506112ce908290611cc1565b915081600960008282546112e29190611d08565b92505081905550818460030160008282546112fd9190611d08565b9091555050426002850155505b8254600384015486919061131f908390611cc1565b6113299190611d1b565b91508084600001600082825461133f9190611cf5565b9250508190555081600960008282546113589190611cf5565b92505081905550818460030160008282546113739190611cf5565b90915550506007546003850154604051630dd96ce360e11b81526001600160a01b0388811660048301526024820192909252911690631bb2d9c690604401600060405180830381600087803b1580156113cb57600080fd5b505af11580156113df573d6000803e3d6000fd5b5050505042846002015411156114a557600061271062015180600b5442876114079190611cf5565b6114119086611cc1565b61141b9190611cc1565b6114259190611d1b565b61142f9190611d1b565b905080600a60008282546114439190611d08565b9091555061145390508183611cf5565b91506001600160a01b0386167f204399c527f9dd2e64595a61f7ba62df2512bfe0403396acc162dd9064fd643a8261148b4288611cf5565b6040805192835260208301919091520160405180910390a2505b83546000036114b5574260028501555b6005546114d19061010090046001600160a01b0316868361188c565b505050505050565b6000600254821115611525576002546040517f0858c6b2000000000000000000000000000000000000000000000000000000008152610739918491600401918252602082015260400190565b60055460ff16611561576040517f717a164800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383166000908152600460209081526040918290208251608081018452815481526001820154928101929092526002810154928201929092526003909101546060820152851580156115b957508051155b156115d7576040516306551f4d60e01b815260040160405180910390fd5b60006115e38442611d08565b90508160400151811015611634578082604001516040517fe0eca1e7000000000000000000000000000000000000000000000000000000008152600401610739929190918252602082015260400190565b60008715611741576005546040516370a0823160e01b81523060048201526101009091046001600160a01b03169060009082906370a0823190602401602060405180830381865afa15801561168d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b19190611c92565b90506116c86001600160a01b0383168a308d611900565b6040516370a0823160e01b815230600482015281906001600160a01b038416906370a0823190602401602060405180830381865afa15801561170e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117329190611c92565b61173c9190611cf5565b955050505b82511561177857600083604001518361175a9190611cf5565b845190915061176a908290611cc1565b6117749083611d08565b9150505b6117828585611cc1565b61178c9082611d08565b905080600960008282546117a09190611d08565b9250508190555080836060018181516117b99190611d08565b9052506007546060840151604051630dd96ce360e11b81526001600160a01b0389811660048301526024820192909252911690631bb2d9c690604401600060405180830381600087803b15801561180f57600080fd5b505af1158015611823573d6000803e3d6000fd5b5050505083836000018181516118399190611d08565b9052505042602080840191825260408085019384526001600160a01b0390971660009081526004909152959095208251815594516001860155516002850155606001516003909301929092555092915050565b6040516001600160a01b0383811660248301526044820183905261079891859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061193f565b6040516001600160a01b0384811660248301528381166044830152606482018390526119399186918216906323b872dd906084016118b9565b50505050565b60006119546001600160a01b038416836119bb565b905080516000141580156119795750808060200190518101906119779190611d3d565b155b15610798576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610739565b60606119c9838360006119d0565b9392505050565b606081471015611a0e576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610739565b600080856001600160a01b03168486604051611a2a9190611d5a565b60006040518083038185875af1925050503d8060008114611a67576040519150601f19603f3d011682016040523d82523d6000602084013e611a6c565b606091505b5091509150611a7c868383611a86565b9695505050505050565b606082611a9b57611a9682611afb565b6119c9565b8151158015611ab257506001600160a01b0384163b155b15611af4576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610739565b50806119c9565b805115611b0b5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116811461060a57600080fd5b600060208284031215611b6457600080fd5b81356119c981611b3d565b600060208284031215611b8157600080fd5b5035919050565b600080600060608486031215611b9d57600080fd5b8335611ba881611b3d565b95602085013595506040909401359392505050565b801515811461060a57600080fd5b600060208284031215611bdd57600080fd5b81356119c981611bbd565b600080600060608486031215611bfd57600080fd5b8335611c0881611b3d565b9250602084013591506040840135611c1f81611b3d565b809150509250925092565b60008060408385031215611c3d57600080fd5b50508035926020909101359150565b60008060008060808587031215611c6257600080fd5b8435611c6d81611b3d565b93506020850135611c7d81611b3d565b93969395505050506040820135916060013590565b600060208284031215611ca457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610c4557610c45611cab565b600060208284031215611cea57600080fd5b81516119c981611b3d565b81810381811115610c4557610c45611cab565b80820180821115610c4557610c45611cab565b600082611d3857634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611d4f57600080fd5b81516119c981611bbd565b6000825160005b81811015611d7b5760208186018101518583015201611d61565b50600092019182525091905056fea26469706673582212202cb7f6f0289c6109a596c1bf1d929ff4defcae453355aaaa714b0957d157115c64736f6c63430008190033

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  ]
[ 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.