ETH Price: $3,635.31 (-6.63%)

Contract

0xf02C96DbbB92DC0325AD52B3f9F2b951f972bf00
 
Transaction Hash
Method
Block
From
To
Redeem214128802024-12-16 5:05:592 days ago1734325559IN
Kernel Protocol: krETH Token
0 ETH0.000982559.2
Redeem214078992024-12-15 12:24:113 days ago1734265451IN
Kernel Protocol: krETH Token
0 ETH0.000663336.20962501
Redeem214009562024-12-14 13:08:594 days ago1734181739IN
Kernel Protocol: krETH Token
0 ETH0.000924488.65436799
Redeem214000322024-12-14 10:03:114 days ago1734170591IN
Kernel Protocol: krETH Token
0 ETH0.000950728.9
Redeem213876042024-12-12 16:25:116 days ago1734020711IN
Kernel Protocol: krETH Token
0 ETH0.0043125240.38437099
Redeem213844682024-12-12 5:55:116 days ago1733982911IN
Kernel Protocol: krETH Token
0 ETH0.0016233415.2
Redeem213639552024-12-09 9:09:359 days ago1733735375IN
Kernel Protocol: krETH Token
0 ETH0.0013039612.20818142
Redeem213478092024-12-07 3:03:5911 days ago1733540639IN
Kernel Protocol: krETH Token
0 ETH0.0014150213.24498118
Approve213359932024-12-05 11:27:3513 days ago1733398055IN
Kernel Protocol: krETH Token
0 ETH0.0008907519.2613277
Redeem213265702024-12-04 3:52:2314 days ago1733284343IN
Kernel Protocol: krETH Token
0 ETH0.002038219.08023429
Approve213262182024-12-04 2:41:1114 days ago1733280071IN
Kernel Protocol: krETH Token
0 ETH0.0008265617.8407891
Redeem213073132024-12-01 11:18:3517 days ago1733051915IN
Kernel Protocol: krETH Token
0 ETH0.000912728.5442541
Redeem213072452024-12-01 11:04:5917 days ago1733051099IN
Kernel Protocol: krETH Token
0 ETH0.000972149.1004966
Approve213036182024-11-30 22:56:4718 days ago1733007407IN
Kernel Protocol: krETH Token
0 ETH0.0006486114.01808403
Approve213017272024-11-30 16:36:3518 days ago1732984595IN
Kernel Protocol: krETH Token
0 ETH0.0007584316.4
Approve212597602024-11-24 19:41:4724 days ago1732477307IN
Kernel Protocol: krETH Token
0 ETH0.000362437.77455181
Redeem212406082024-11-22 3:32:5926 days ago1732246379IN
Kernel Protocol: krETH Token
0 ETH0.0011923911.16237927
Redeem212268192024-11-20 5:19:4728 days ago1732079987IN
Kernel Protocol: krETH Token
0 ETH0.00095128.90650717
Approve212260282024-11-20 2:41:1128 days ago1732070471IN
Kernel Protocol: krETH Token
0 ETH0.0006416513.78183336
Redeem212229242024-11-19 16:18:2329 days ago1732033103IN
Kernel Protocol: krETH Token
0 ETH0.0024499722.93485714
Redeem212186272024-11-19 1:55:5929 days ago1731981359IN
Kernel Protocol: krETH Token
0 ETH0.00100519.41222898
Redeem212110392024-11-18 0:32:5930 days ago1731889979IN
Kernel Protocol: krETH Token
0 ETH0.001078719.67198223
Approve212050542024-11-17 4:31:1131 days ago1731817871IN
Kernel Protocol: krETH Token
0 ETH0.0005122911.00342015
Approve212014792024-11-16 16:33:4732 days ago1731774827IN
Kernel Protocol: krETH Token
0 ETH0.0008129317.43814979
Approve211706422024-11-12 9:15:3536 days ago1731402935IN
Kernel Protocol: krETH Token
0 ETH0.0016376235.17393415
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:
krETH

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 10 : krETH.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

interface IRateProvider {
    function krETHPerToken() external view returns (uint256);
    function tokenPerkrETH() external view returns (uint256);
}

interface IVaultSupervisor {
    function deposit(address vault, uint256 amount, uint256 minSharesOut) external returns (uint256 shares);
    function gimmieShares(address vault, uint256 shares) external;
}

contract krETH is ERC20, Ownable2Step {
    /// DEPENDENCIES ///

    using SafeERC20 for IERC20;

    /// STRUCTS ///

    struct Token {
        address vaultToken;
        address rateProvider;
        uint256 cap;
        uint256 deposited;
        bool paused;
    }

    /// STATE VARIABLES ///

    /// @notice Address of Karak vault supervisor
    address public immutable vaultSupervisor = 0x54e44DbB92dBA848ACe27F44c0CB4268981eF1CC;
    /// @notice Address of fee address
    address public feeAddress;

    /// @notice Array of approved tokens
    address[] public approvedTokens;

    /// @notice Bool if address is approved token
    mapping(address => bool) public approvedToken;
    /// @notice Bool if address is vault token
    mapping(address => bool) public vaultToken;
    /// @notice Bool is address is approved protector
    mapping(address => bool) public approvedProtector;
    /// @notice Token struct for token
    mapping(address => Token) public tokens;

    /// @notice Bool if deposits are open
    bool public depositsOpen;

    /// @notice Number of approved tokens
    uint256 public numApprovedTokens;
    /// @notice Mint fee percent - 100 = 1%
    uint256 public mintFee;
    /// @notice Redeem fee percent - 100 = 1%
    uint256 public redeemFee;
    /// @notice Fee denom
    uint256 public constant FEE_DENOM = 10_000;
    /// @notice Mint amount out
    uint256 public constant MIN_MINT = 0.001 ether;
    /// @notice Mint amount to redeem
    uint256 public constant MIN_REDEEM = 0.001 ether;

    /// EVENTS ///

    event Deposit(address indexed staker, uint256 krETHReceived);
    event Redeemed(address indexed staker, uint256 krETHBurned);
    event TokenBalanceUpdated(address indexed token, uint256 newBalance);
    event TokenAdded(address tokenAdded);
    event RateProviderUpdated(address indexed token, address indexed newProvider);
    event TokenRemoved(address tokenRemoved);
    event ProtectorAdded(address indexed protectorAdded);
    event ProtectorRemoved(address indexed protectorRemoved);
    event DepositsOpened();
    event DepositsClosed();
    event DepositPaused(address indexed token);
    event DepositUnpaused(address indexed token);
    event CapIncrease(address indexed token, uint256 oldCap, uint256 newCap);
    event MintFeeSet(uint256 oldFee, uint256 newFee);
    event RedeemFeeSet(uint256 oldFee, uint256 newFee);
    event FeeAddressSet(address oldAddress, address newAddress);

    /// CONSTRUCTOR ///

    constructor() ERC20("Kernel Restaked ETH", "krETH") Ownable2Step() {
        feeAddress = owner();
        mintFee = 10;
        redeemFee = 25;
    }

    /// MUTATIVE FUNCTIONS ///

    /// @notice                Deposit `_approvedToken` to receive krETH
    /// @param _approvedToken  Token to deposit
    /// @param _to             Address to send minted krETH to
    /// @param _amount         Amount of `_approvedToken` to deposit
    /// @param _receipt        Bool if to deposit receipt token
    function deposit(address _approvedToken, address _to, uint256 _amount, bool _receipt) external {
        if (!depositsOpen) require(msg.sender == owner(), "Deposits not open");

        Token memory token = tokens[_approvedToken];
        require(approvedToken[_approvedToken] && !token.paused, "Deposits not open for token");
        require(_amount > 0, "Can not deposit 0");
        require(token.deposited + _amount <= token.cap, "Exceeds cap");
        uint256 _rate = IRateProvider(token.rateProvider).krETHPerToken();

        address _vaultToken = token.vaultToken;

        if (!_receipt) {
            IERC20(_approvedToken).safeTransferFrom(msg.sender, address(this), _amount);
            IERC20(_approvedToken).forceApprove(_vaultToken, _amount);
            uint256 _min = _amount * 99 / 100;

            _amount = IVaultSupervisor(vaultSupervisor).deposit(_vaultToken, _amount, _min);
            IVaultSupervisor(vaultSupervisor).gimmieShares(_vaultToken, _amount);
        } else {
            IERC20(_vaultToken).safeTransferFrom(msg.sender, address(this), _amount);
        }

        uint256 _amountToMint = (_rate * _amount) / (10 ** IERC20Metadata(_vaultToken).decimals());
        require(_amountToMint >= MIN_MINT, "Less than min mint");

        if (msg.sender != owner() && msg.sender != feeAddress && mintFee > 0) {
            uint256 _fee = _amountToMint * mintFee / FEE_DENOM;
            _amountToMint -= _fee;
            _mint(feeAddress, _fee);
        }

        tokens[_approvedToken].deposited += _amount;

        _mint(_to, _amountToMint);
        emit Deposit(_to, _amountToMint);
    }

    /// @notice                         Redeem krETH to receive `_approvedTokenToReceive`
    /// @param _approvedTokenToReceive  Token to receieve receipt for
    /// @param _to                      Address to send receive redeemed `_approvedTokenToReceive`
    /// @param _krETHToRedeem           Amount of krETH to redeem
    function redeem(address _approvedTokenToReceive, address _to, uint256 _krETHToRedeem) external {
        require(approvedToken[_approvedTokenToReceive], "Not token");
        require(_krETHToRedeem >= MIN_REDEEM, "Less than min redeem");

        Token memory token = tokens[_approvedTokenToReceive];

        uint256 _rate = IRateProvider(token.rateProvider).tokenPerkrETH();

        if (msg.sender != owner() && msg.sender != feeAddress && redeemFee > 0) {
            uint256 _fee = _krETHToRedeem * redeemFee / FEE_DENOM;
            _krETHToRedeem -= _fee;
            _transfer(msg.sender, feeAddress, _fee);
        }

        uint256 _toSend = _rate * _krETHToRedeem / (10 ** decimals());

        require(token.deposited >= _toSend, "Not enough funds to redeem token");

        tokens[_approvedTokenToReceive].deposited -= _toSend;
        _burn(msg.sender, _krETHToRedeem);

        address _vaultToken = token.vaultToken;

        IERC20(_vaultToken).safeTransfer(_to, _toSend);

        emit Redeemed(_to, _krETHToRedeem);
    }

    /// OWNER FUNCTION ///

    /// @notice Set mint fee to `_fee`
    function setMintFee(uint256 _fee) external onlyOwner {
        require(_fee <= 50, "Mint fee > 0.50%");
        uint256 _oldFee = mintFee;
        mintFee = _fee;

        emit MintFeeSet(_oldFee, _fee);
    }

    /// @notice Set redeem fee to `_fee`
    function setRedeemFee(uint256 _fee) external onlyOwner {
        require(_fee <= 50, "Redeem fee > 0.50%");
        uint256 _oldFee = redeemFee;
        redeemFee = _fee;

        emit RedeemFeeSet(_oldFee, _fee);
    }

    /// @notice Set fee address to `_address`
    function setFeeAddress(address _address) external onlyOwner {
        require(_address != address(0), "Can not be zero address");
        address _oldAddress = feeAddress;
        feeAddress = _address;

        emit FeeAddressSet(_oldAddress, _address);
    }

    /// @notice                Add approved token
    /// @param _approvedToken  Address of approved token to add
    /// @param _vaultToken     Address of karak vault
    /// @param _rateProvider   Address of rate provider
    /// @param _cap            Cap of `_approvedToken`
    function addToken(address _approvedToken, address _vaultToken, address _rateProvider, uint256 _cap)
        external
        onlyOwner
    {
        require(!approvedToken[_approvedToken], "Already added");

        Token storage token = tokens[_approvedToken];

        approvedToken[_approvedToken] = true;
        vaultToken[_vaultToken] = true;

        token.vaultToken = _vaultToken;
        token.rateProvider = _rateProvider;
        setCap(_approvedToken, _cap);

        approvedTokens.push(_approvedToken);
        ++numApprovedTokens;

        emit TokenAdded(_approvedToken);
        emit RateProviderUpdated(_approvedToken, _rateProvider);
    }

    /// @notice              Remove `_approvedToken`
    /// @param _approvedToken  Address of approved token to remove
    function removeToken(address _approvedToken) external onlyOwner {
        require(approvedToken[_approvedToken], "Not approved token");

        Token memory token = tokens[_approvedToken];

        approvedToken[_approvedToken] = false;
        vaultToken[token.vaultToken] = false;
        tokens[_approvedToken].rateProvider = address(0);
        tokens[_approvedToken].vaultToken = address(0);

        uint256 _arrLength = approvedTokens.length;
        for (uint256 i; i < _arrLength; ++i) {
            if (approvedTokens[i] == _approvedToken) {
                approvedTokens[i] = approvedTokens[_arrLength - 1];
                approvedTokens.pop();
                break;
            }
        }
        --numApprovedTokens;

        emit TokenRemoved(_approvedToken);
        emit RateProviderUpdated(_approvedToken, address(0));
    }

    /// @notice Update rate provider to `_rateProvider` for `_token`
    function updateRateProvider(address _token, address _rateProvider) external onlyOwner {
        require(approvedToken[_token], "Not approved token");
        tokens[_token].rateProvider = _rateProvider;

        emit RateProviderUpdated(_token, _rateProvider);
    }

    /// @notice Unpause deposits of `_token`
    function unpauseDeposits(address _token) external onlyOwner {
        require(approvedToken[_token], "Not approved token");
        require(tokens[_token].paused, "Token not paused");

        tokens[_token].paused = false;

        emit DepositUnpaused(_token);
    }

    /// @notice Set `_newCap` for `_token`
    function setCap(address _token, uint256 _newCap) public onlyOwner {
        require(approvedToken[_token], "Not approved token");
        uint256 _oldCap = tokens[_token].cap;
        require(_newCap > _oldCap, "Cannot lower cap");

        tokens[_token].cap = _newCap;

        emit CapIncrease(_token, _oldCap, _newCap);
    }

    /// @notice         Recover tokens
    /// @param _to      Address to send recovered tokens
    /// @param _token   Address of token to recover
    /// @param _amount  Amount of token to recover
    function recoverTokens(address _to, address _token, uint256 _amount) external onlyOwner {
        require(!vaultToken[_token], "Can Not transfer vault token");
        IERC20(_token).safeTransfer(_to, _amount);
    }

    /// @notice Add protector
    function addProtector(address _protector) external onlyOwner {
        require(!approvedProtector[_protector], "Already Protector");
        approvedProtector[_protector] = true;
        emit ProtectorAdded(_protector);
    }

    /// @notice Remove protector
    function removeProtector(address _protector) external onlyOwner {
        require(approvedProtector[_protector], "Not Protector");
        approvedProtector[_protector] = false;
        emit ProtectorRemoved(_protector);
    }

    /// @notice Open deposits
    function openDeposits() external onlyOwner {
        require(!depositsOpen, "Deposits already opened");
        depositsOpen = true;
        emit DepositsOpened();
    }

    /// PROTECTOR FUNCTIONS ///

    /// @notice Pause deposits of `_token`
    function pauseDeposits(address _token) external {
        require(approvedProtector[msg.sender] || msg.sender == owner(), "Not approved protector");
        require(approvedToken[_token], "Not approved token");
        require(!tokens[_token].paused, "Token already paused");

        tokens[_token].paused = true;

        emit DepositPaused(_token);
    }

    /// @notice Close deposits
    function closeDeposits() external {
        require(approvedProtector[msg.sender] || msg.sender == owner(), "Not approved protector");
        require(depositsOpen, "Deposits already closed");
        depositsOpen = false;
        emit DepositsClosed();
    }
}

File 2 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/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.
 */
abstract 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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 10 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.0;

import "./Ownable.sol";

/**
 * @dev Contract module which provides 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} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}

File 4 of 10 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead 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, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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 default value returned by this function, unless
     * it's overridden.
     *
     * 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 virtual override returns (uint8) {
        return 18;
    }

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, 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}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        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 virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + 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 virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This 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:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(address from, address to, uint256 amount) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, 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:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

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

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(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 virtual {
        require(account != address(0), "ERC20: burn from the zero address");

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This 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 virtual {
        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 Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}

File 5 of 10 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 6 of 10 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @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 7 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

File 8 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../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 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.encodeWithSelector(token.transfer.selector, 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.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'
        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));
    }

    /**
     * @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);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @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.encodeWithSelector(token.approve.selector, spender, value);

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

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @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.isContract(address(token));
    }
}

File 9 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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.0/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");

        (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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
        }
    }
}

File 10 of 10 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCap","type":"uint256"}],"name":"CapIncrease","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"krETHReceived","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"DepositPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"DepositUnpaused","type":"event"},{"anonymous":false,"inputs":[],"name":"DepositsClosed","type":"event"},{"anonymous":false,"inputs":[],"name":"DepositsOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"FeeAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"MintFeeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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":"protectorAdded","type":"address"}],"name":"ProtectorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"protectorRemoved","type":"address"}],"name":"ProtectorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"newProvider","type":"address"}],"name":"RateProviderUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"RedeemFeeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"krETHBurned","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenAdded","type":"address"}],"name":"TokenAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"TokenBalanceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenRemoved","type":"address"}],"name":"TokenRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"FEE_DENOM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_REDEEM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_protector","type":"address"}],"name":"addProtector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_approvedToken","type":"address"},{"internalType":"address","name":"_vaultToken","type":"address"},{"internalType":"address","name":"_rateProvider","type":"address"},{"internalType":"uint256","name":"_cap","type":"uint256"}],"name":"addToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedProtector","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"approvedTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closeDeposits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_approvedToken","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_receipt","type":"bool"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositsOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numApprovedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openDeposits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"pauseDeposits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_approvedTokenToReceive","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_krETHToRedeem","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_protector","type":"address"}],"name":"removeProtector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_approvedToken","type":"address"}],"name":"removeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_newCap","type":"uint256"}],"name":"setCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setMintFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setRedeemFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokens","outputs":[{"internalType":"address","name":"vaultToken","type":"address"},{"internalType":"address","name":"rateProvider","type":"address"},{"internalType":"uint256","name":"cap","type":"uint256"},{"internalType":"uint256","name":"deposited","type":"uint256"},{"internalType":"bool","name":"paused","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"unpauseDeposits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_rateProvider","type":"address"}],"name":"updateRateProvider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultSupervisor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vaultToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60a06040527354e44dbb92dba848ace27f44c0cb4268981ef1cc6080523480156200002957600080fd5b506040518060400160405280601381526020017f4b65726e656c2052657374616b65642045544800000000000000000000000000815250604051806040016040528060058152602001640d6e48aa8960db1b81525081600390816200008f919062000206565b5060046200009e828262000206565b505050620000bb620000b5620000ed60201b60201c565b620000f1565b600554600780546001600160a01b0319166001600160a01b03909216919091179055600a600f556019601055620002d2565b3390565b600680546001600160a01b03191690556200010c816200010f565b50565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200018c57607f821691505b602082108103620001ad57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200020157600081815260208120601f850160051c81016020861015620001dc5750805b601f850160051c820191505b81811015620001fd57828155600101620001e8565b5050505b505050565b81516001600160401b0381111562000222576200022262000161565b6200023a8162000233845462000177565b84620001b3565b602080601f831160018114620002725760008415620002595750858301515b600019600386901b1c1916600185901b178555620001fd565b600085815260208120601f198616915b82811015620002a35788860151825594840194600190910190840162000282565b5085821015620002c25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6080516131e7620002fc6000396000818161050901528181611eb00152611f6101526131e76000f3fe608060405234801561001057600080fd5b506004361061030a5760003560e01c80637235200e1161019c578063a9059cbb116100ee578063e30c397811610097578063f2fde38b11610071578063f2fde38b146106f4578063f4d770e414610707578063f8690117146103e857600080fd5b8063e30c39781461064f578063e486033914610660578063eddd0d9c146106e157600080fd5b8063d0a8f24c116100c8578063d0a8f24c146105fa578063dbea37b814610603578063dd62ed3e1461061657600080fd5b8063a9059cbb146105bc578063b2b83111146105cf578063c3f81cc5146105f257600080fd5b80638da5cb5b1161015057806395d89b411161012a57806395d89b4114610598578063965fa21e146105a0578063a457c2d7146105a957600080fd5b80638da5cb5b1461056c57806391f809631461057d5780639496fd1c1461059057600080fd5b806380ad2cf31161018157806380ad2cf31461053357806385184db7146105465780638705fcd41461055957600080fd5b80637235200e1461050457806379ba50971461052b57600080fd5b806339509351116102605780635d841af51161020957806370a08231116101e357806370a08231146104c0578063711c8876146104e9578063715018a6146104fc57600080fd5b80635d841af5146104875780635f3e849f1461049a5780635fa7b584146104ad57600080fd5b80634df87c091161023a5780634df87c0914610434578063510985c014610457578063549c46271461047a57600080fd5b8063395093511461040557806341275358146104185780634886c6751461042b57600080fd5b806318160ddd116102c257806327c71b501161029c57806327c71b50146103d55780632a0c42a1146103e8578063313ce567146103f657600080fd5b806318160ddd1461038f5780631dafede01461039757806323b872dd146103c257600080fd5b8063095ea7b3116102f3578063095ea7b3146103425780630e6dfcd51461036557806313966db51461037857600080fd5b80630351b22b1461030f57806306fdde0314610324575b600080fd5b61032261031d366004612d6b565b61071a565b005b61032c6107dc565b6040516103399190612db1565b60405180910390f35b610355610350366004612de4565b61086e565b6040519015158152602001610339565b610322610373366004612e0e565b610888565b610381600f5481565b604051908152602001610339565b600254610381565b6103aa6103a5366004612e4a565b610bc4565b6040516001600160a01b039091168152602001610339565b6103556103d0366004612e0e565b610bee565b6103226103e3366004612d6b565b610c12565b61038166038d7ea4c6800081565b60405160128152602001610339565b610355610413366004612de4565b610d9e565b6007546103aa906001600160a01b031681565b61038161271081565b610355610442366004612d6b565b60096020526000908152604090205460ff1681565b610355610465366004612d6b565b600b6020526000908152604090205460ff1681565b600d546103559060ff1681565b610322610495366004612e4a565b610ddd565b6103226104a8366004612e0e565b610e7c565b6103226104bb366004612d6b565b610f06565b6103816104ce366004612d6b565b6001600160a01b031660009081526020819052604090205490565b6103226104f7366004612d6b565b611199565b610322611252565b6103aa7f000000000000000000000000000000000000000000000000000000000000000081565b610322611266565b610322610541366004612de4565b6112f4565b610322610554366004612e63565b611421565b610322610567366004612d6b565b6114e0565b6005546001600160a01b03166103aa565b61032261058b366004612e96565b611598565b610322611764565b61032c61185f565b61038160105481565b6103556105b7366004612de4565b61186e565b6103556105ca366004612de4565b611918565b6103556105dd366004612d6b565b600a6020526000908152604090205460ff1681565b610322611926565b610381600e5481565b610322610611366004612d6b565b6119b9565b610381610624366004612e63565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6006546001600160a01b03166103aa565b6106ac61066e366004612d6b565b600c60205260009081526040902080546001820154600283015460038401546004909401546001600160a01b03938416949390921692909160ff1685565b604080516001600160a01b0396871681529590941660208601529284019190915260608301521515608082015260a001610339565b6103226106ef366004612e4a565b611ad5565b610322610702366004612d6b565b611b6c565b610322610715366004612eef565b611bdd565b6107226121bb565b6001600160a01b0381166000908152600b602052604090205460ff16156107905760405162461bcd60e51b815260206004820152601160248201527f416c72656164792050726f746563746f7200000000000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0381166000818152600b6020526040808220805460ff19166001179055517ff13867159a6367ba345985a484e0a7618ca52cc88dd1e31406499f89287ba9009190a250565b6060600380546107eb90612f3e565b80601f016020809104026020016040519081016040528092919081815260200182805461081790612f3e565b80156108645780601f1061083957610100808354040283529160200191610864565b820191906000526020600020905b81548152906001019060200180831161084757829003601f168201915b5050505050905090565b60003361087c818585612215565b60019150505b92915050565b6001600160a01b03831660009081526009602052604090205460ff166108f05760405162461bcd60e51b815260206004820152600960248201527f4e6f7420746f6b656e00000000000000000000000000000000000000000000006044820152606401610787565b66038d7ea4c680008110156109475760405162461bcd60e51b815260206004820152601460248201527f4c657373207468616e206d696e2072656465656d0000000000000000000000006044820152606401610787565b6001600160a01b038084166000908152600c60209081526040808320815160a08101835281548616815260018201549095168584018190526002820154868401526003820154606087015260049182015460ff161515608087015282517fcd8bd4e30000000000000000000000000000000000000000000000000000000081529251909363cd8bd4e39380840193919291908290030181865afa1580156109f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a169190612f78565b9050610a2a6005546001600160a01b031690565b6001600160a01b0316336001600160a01b031614158015610a5657506007546001600160a01b03163314155b8015610a6457506000601054115b15610aaf57600061271060105485610a7c9190612fa7565b610a869190612fbe565b9050610a928185612fe0565b600754909450610aad9033906001600160a01b03168361236d565b505b6000610abd6012600a6130d7565b610ac78584612fa7565b610ad19190612fbe565b90508083606001511015610b275760405162461bcd60e51b815260206004820181905260248201527f4e6f7420656e6f7567682066756e647320746f2072656465656d20746f6b656e6044820152606401610787565b6001600160a01b0386166000908152600c602052604081206003018054839290610b52908490612fe0565b90915550610b629050338561255c565b8251610b786001600160a01b03821687846126c5565b856001600160a01b03167f4896181ff8f4543cc00db9fe9b6fb7e6f032b7eb772c72ab1ec1b4d2e03b936986604051610bb391815260200190565b60405180910390a250505050505050565b60088181548110610bd457600080fd5b6000918252602090912001546001600160a01b0316905081565b600033610bfc85828561276e565b610c0785858561236d565b506001949350505050565b336000908152600b602052604090205460ff1680610c3a57506005546001600160a01b031633145b610c865760405162461bcd60e51b815260206004820152601660248201527f4e6f7420617070726f7665642070726f746563746f72000000000000000000006044820152606401610787565b6001600160a01b03811660009081526009602052604090205460ff16610ce35760405162461bcd60e51b81526020600482015260126024820152712737ba1030b8383937bb32b2103a37b5b2b760711b6044820152606401610787565b6001600160a01b0381166000908152600c602052604090206004015460ff1615610d4f5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e20616c7265616479207061757365640000000000000000000000006044820152606401610787565b6001600160a01b0381166000818152600c6020526040808220600401805460ff19166001179055517f278126b2e1991e1ba19609bfc354c3308c2c71ca4e545c3171b68b1c0abba4209190a250565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061087c9082908690610dd89087906130e6565b612215565b610de56121bb565b6032811115610e365760405162461bcd60e51b815260206004820152601260248201527f52656465656d20666565203e20302e35302500000000000000000000000000006044820152606401610787565b601080549082905560408051828152602081018490527fffec246ec3cd6013aa24cef90073be16c9fdfd36228cd46e72c9eea216a836ad91015b60405180910390a15050565b610e846121bb565b6001600160a01b0382166000908152600a602052604090205460ff1615610eed5760405162461bcd60e51b815260206004820152601c60248201527f43616e204e6f74207472616e73666572207661756c7420746f6b656e000000006044820152606401610787565b610f016001600160a01b03831684836126c5565b505050565b610f0e6121bb565b6001600160a01b03811660009081526009602052604090205460ff16610f6b5760405162461bcd60e51b81526020600482015260126024820152712737ba1030b8383937bb32b2103a37b5b2b760711b6044820152606401610787565b6001600160a01b038082166000818152600c60208181526040808420815160a08101835281548816815260018201805489168286015260028301548285015260038301546060830152600483015460ff161515608083015287875260098552838720805460ff1990811690915582519099168752600a8552928620805490981690975594845291905280546001600160a01b0319908116909155825416909155600854905b8181101561110e57836001600160a01b031660088281548110611035576110356130f9565b6000918252602090912001546001600160a01b0316036110fe57600861105c600184612fe0565b8154811061106c5761106c6130f9565b600091825260209091200154600880546001600160a01b039092169183908110611098576110986130f9565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060088054806110d7576110d761310f565b600082815260209020810160001990810180546001600160a01b031916905501905561110e565b61110781613125565b9050611010565b50600e6000815461111e9061313e565b909155506040516001600160a01b03841681527f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd39060200160405180910390a16040516000906001600160a01b038516907f198f904b16806dad4efbe8f4ee9e422ab7e99c4a2a968c07684fa1fcf76d9e68908390a3505050565b6111a16121bb565b6001600160a01b0381166000908152600b602052604090205460ff166112095760405162461bcd60e51b815260206004820152600d60248201527f4e6f742050726f746563746f72000000000000000000000000000000000000006044820152606401610787565b6001600160a01b0381166000818152600b6020526040808220805460ff19169055517fb9e541e39407dbb821dd624b82f5f06228d92ffe3ce830971cfd44f293c91a919190a250565b61125a6121bb565b61126460006127fa565b565b60065433906001600160a01b031681146112e85760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e657200000000000000000000000000000000000000000000006064820152608401610787565b6112f1816127fa565b50565b6112fc6121bb565b6001600160a01b03821660009081526009602052604090205460ff166113595760405162461bcd60e51b81526020600482015260126024820152712737ba1030b8383937bb32b2103a37b5b2b760711b6044820152606401610787565b6001600160a01b0382166000908152600c60205260409020600201548082116113c45760405162461bcd60e51b815260206004820152601060248201527f43616e6e6f74206c6f77657220636170000000000000000000000000000000006044820152606401610787565b6001600160a01b0383166000818152600c602090815260409182902060020185905581518481529081018590527ff7eb57dc8fcd93bcdf9b13023381fa59ac731b50c479570ceaff0974bca022ba910160405180910390a2505050565b6114296121bb565b6001600160a01b03821660009081526009602052604090205460ff166114865760405162461bcd60e51b81526020600482015260126024820152712737ba1030b8383937bb32b2103a37b5b2b760711b6044820152606401610787565b6001600160a01b038281166000818152600c602052604080822060010180546001600160a01b0319169486169485179055517f198f904b16806dad4efbe8f4ee9e422ab7e99c4a2a968c07684fa1fcf76d9e689190a35050565b6114e86121bb565b6001600160a01b03811661153e5760405162461bcd60e51b815260206004820152601760248201527f43616e206e6f74206265207a65726f20616464726573730000000000000000006044820152606401610787565b600780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f32c7f8c60f86ae20e5414c27c3d06e25fa775321683e23c95456c83d0ce0a6529101610e70565b6115a06121bb565b6001600160a01b03841660009081526009602052604090205460ff16156116095760405162461bcd60e51b815260206004820152600d60248201527f416c7265616479206164646564000000000000000000000000000000000000006044820152606401610787565b6001600160a01b038481166000908152600c60209081526040808320600983528184208054600160ff199182168117909255898716808752600a909552929094208054909216841790915580546001600160a01b0319908116909217815591820180549091169285169290921790915561168385836112f4565b6008805460018101825560009182527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b038816179055600e80549091906116dd90613125565b909155506040516001600160a01b03861681527f784c8f4dbf0ffedd6e72c76501c545a70f8b203b30a26ce542bf92ba87c248a49060200160405180910390a1826001600160a01b0316856001600160a01b03167f198f904b16806dad4efbe8f4ee9e422ab7e99c4a2a968c07684fa1fcf76d9e6860405160405180910390a35050505050565b336000908152600b602052604090205460ff168061178c57506005546001600160a01b031633145b6117d85760405162461bcd60e51b815260206004820152601660248201527f4e6f7420617070726f7665642070726f746563746f72000000000000000000006044820152606401610787565b600d5460ff1661182a5760405162461bcd60e51b815260206004820152601760248201527f4465706f7369747320616c726561647920636c6f7365640000000000000000006044820152606401610787565b600d805460ff191690556040517f1a8ade30f60946b8fb7b4d1cf93dc594fa0e441eca24e1b9b88cfa375e3488b190600090a1565b6060600480546107eb90612f3e565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091908381101561190b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610787565b610c078286868403612215565b60003361087c81858561236d565b61192e6121bb565b600d5460ff16156119815760405162461bcd60e51b815260206004820152601760248201527f4465706f7369747320616c7265616479206f70656e65640000000000000000006044820152606401610787565b600d805460ff191660011790556040517fbd0d1cedfd4b96931ddded2368f63c090b88e5e313b383f6f95480bd4835acde90600090a1565b6119c16121bb565b6001600160a01b03811660009081526009602052604090205460ff16611a1e5760405162461bcd60e51b81526020600482015260126024820152712737ba1030b8383937bb32b2103a37b5b2b760711b6044820152606401610787565b6001600160a01b0381166000908152600c602052604090206004015460ff16611a895760405162461bcd60e51b815260206004820152601060248201527f546f6b656e206e6f7420706175736564000000000000000000000000000000006044820152606401610787565b6001600160a01b0381166000818152600c6020526040808220600401805460ff19169055517f060c47e20dcfff848b570ffc777cf30c3e518c1c3c52058f05564fbb880aeba49190a250565b611add6121bb565b6032811115611b2e5760405162461bcd60e51b815260206004820152601060248201527f4d696e7420666565203e20302e353025000000000000000000000000000000006044820152606401610787565b600f80549082905560408051828152602081018490527f387269377ae17304805d5f88cea4252e5ca47346783c279aeb9e8627335a49ac9101610e70565b611b746121bb565b600680546001600160a01b0383166001600160a01b03199091168117909155611ba56005546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600d5460ff16611c41576005546001600160a01b03163314611c415760405162461bcd60e51b815260206004820152601160248201527f4465706f73697473206e6f74206f70656e0000000000000000000000000000006044820152606401610787565b6001600160a01b038085166000818152600c60209081526040808320815160a081018352815487168152600182015490961686840152600281015486830152600381015460608701526004015460ff908116151560808701529383526009909152902054168015611cb457508060800151155b611d005760405162461bcd60e51b815260206004820152601b60248201527f4465706f73697473206e6f74206f70656e20666f7220746f6b656e00000000006044820152606401610787565b60008311611d505760405162461bcd60e51b815260206004820152601160248201527f43616e206e6f74206465706f73697420300000000000000000000000000000006044820152606401610787565b8060400151838260600151611d6591906130e6565b1115611db35760405162461bcd60e51b815260206004820152600b60248201527f45786365656473206361700000000000000000000000000000000000000000006044820152606401610787565b600081602001516001600160a01b031663cd8f16356040518163ffffffff1660e01b8152600401602060405180830381865afa158015611df7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e1b9190612f78565b825190915083611fc557611e3a6001600160a01b038816333088612813565b611e4e6001600160a01b0388168287612864565b60006064611e5d876063612fa7565b611e679190612fbe565b6040517f0efe6a8b0000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201899052604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690630efe6a8b906064016020604051808303816000875af1158015611efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1f9190612f78565b6040517f7fb2a0a10000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018390529197507f000000000000000000000000000000000000000000000000000000000000000090911690637fb2a0a190604401600060405180830381600087803b158015611fa757600080fd5b505af1158015611fbb573d6000803e3d6000fd5b5050505050611fda565b611fda6001600160a01b038216333088612813565b6000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561201a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203e9190613155565b61204990600a6130d7565b6120538785612fa7565b61205d9190612fbe565b905066038d7ea4c680008110156120b65760405162461bcd60e51b815260206004820152601260248201527f4c657373207468616e206d696e206d696e7400000000000000000000000000006044820152606401610787565b6005546001600160a01b031633148015906120dc57506007546001600160a01b03163314155b80156120ea57506000600f54115b15612133576000612710600f54836121029190612fa7565b61210c9190612fbe565b90506121188183612fe0565b600754909250612131906001600160a01b031682612908565b505b6001600160a01b0388166000908152600c60205260408120600301805488929061215e9084906130e6565b9091555061216e90508782612908565b866001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c826040516121a991815260200190565b60405180910390a25050505050505050565b6005546001600160a01b031633146112645760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610787565b6001600160a01b0383166122905760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b03821661230c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166123e95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b0382166124655760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b038316600090815260208190526040902054818110156124f45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35b50505050565b6001600160a01b0382166125d85760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b038216600090815260208190526040902054818110156126675760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6040516001600160a01b038316602482015260448101829052610f019084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526129c7565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461255657818110156127ed5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610787565b6125568484848403612215565b600680546001600160a01b03191690556112f181612aaf565b6040516001600160a01b03808516602483015283166044820152606481018290526125569085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161270a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663095ea7b360e01b1790526128ca8482612b01565b612556576040516001600160a01b0384166024820152600060448201526128fe90859063095ea7b360e01b9060640161270a565b61255684826129c7565b6001600160a01b03821661295e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610787565b806002600082825461297091906130e6565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6000612a1c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ba89092919063ffffffff16565b9050805160001480612a3d575080806020019051810190612a3d9190613178565b610f015760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610787565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806000846001600160a01b031684604051612b1e9190613195565b6000604051808303816000865af19150503d8060008114612b5b576040519150601f19603f3d011682016040523d82523d6000602084013e612b60565b606091505b5091509150818015612b8a575080511580612b8a575080806020019051810190612b8a9190613178565b8015612b9f57506001600160a01b0385163b15155b95945050505050565b6060612bb78484600085612bbf565b949350505050565b606082471015612c375760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610787565b600080866001600160a01b03168587604051612c539190613195565b60006040518083038185875af1925050503d8060008114612c90576040519150601f19603f3d011682016040523d82523d6000602084013e612c95565b606091505b5091509150612ca687838387612cb1565b979650505050505050565b60608315612d20578251600003612d19576001600160a01b0385163b612d195760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610787565b5081612bb7565b612bb78383815115612d355781518083602001fd5b8060405162461bcd60e51b81526004016107879190612db1565b80356001600160a01b0381168114612d6657600080fd5b919050565b600060208284031215612d7d57600080fd5b612d8682612d4f565b9392505050565b60005b83811015612da8578181015183820152602001612d90565b50506000910152565b6020815260008251806020840152612dd0816040850160208701612d8d565b601f01601f19169190910160400192915050565b60008060408385031215612df757600080fd5b612e0083612d4f565b946020939093013593505050565b600080600060608486031215612e2357600080fd5b612e2c84612d4f565b9250612e3a60208501612d4f565b9150604084013590509250925092565b600060208284031215612e5c57600080fd5b5035919050565b60008060408385031215612e7657600080fd5b612e7f83612d4f565b9150612e8d60208401612d4f565b90509250929050565b60008060008060808587031215612eac57600080fd5b612eb585612d4f565b9350612ec360208601612d4f565b9250612ed160408601612d4f565b9396929550929360600135925050565b80151581146112f157600080fd5b60008060008060808587031215612f0557600080fd5b612f0e85612d4f565b9350612f1c60208601612d4f565b9250604085013591506060850135612f3381612ee1565b939692955090935050565b600181811c90821680612f5257607f821691505b602082108103612f7257634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612f8a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761088257610882612f91565b600082612fdb57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561088257610882612f91565b600181815b8085111561302e57816000190482111561301457613014612f91565b8085161561302157918102915b93841c9390800290612ff8565b509250929050565b60008261304557506001610882565b8161305257506000610882565b816001811461306857600281146130725761308e565b6001915050610882565b60ff84111561308357613083612f91565b50506001821b610882565b5060208310610133831016604e8410600b84101617156130b1575081810a610882565b6130bb8383612ff3565b80600019048211156130cf576130cf612f91565b029392505050565b6000612d8660ff841683613036565b8082018082111561088257610882612f91565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60006001820161313757613137612f91565b5060010190565b60008161314d5761314d612f91565b506000190190565b60006020828403121561316757600080fd5b815160ff81168114612d8657600080fd5b60006020828403121561318a57600080fd5b8151612d8681612ee1565b600082516131a7818460208701612d8d565b919091019291505056fea2646970667358221220728f05999bded79f5a58ef6e6ca718e1ba754eac426d9239a7c54778a47f5b6e64736f6c63430008140033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061030a5760003560e01c80637235200e1161019c578063a9059cbb116100ee578063e30c397811610097578063f2fde38b11610071578063f2fde38b146106f4578063f4d770e414610707578063f8690117146103e857600080fd5b8063e30c39781461064f578063e486033914610660578063eddd0d9c146106e157600080fd5b8063d0a8f24c116100c8578063d0a8f24c146105fa578063dbea37b814610603578063dd62ed3e1461061657600080fd5b8063a9059cbb146105bc578063b2b83111146105cf578063c3f81cc5146105f257600080fd5b80638da5cb5b1161015057806395d89b411161012a57806395d89b4114610598578063965fa21e146105a0578063a457c2d7146105a957600080fd5b80638da5cb5b1461056c57806391f809631461057d5780639496fd1c1461059057600080fd5b806380ad2cf31161018157806380ad2cf31461053357806385184db7146105465780638705fcd41461055957600080fd5b80637235200e1461050457806379ba50971461052b57600080fd5b806339509351116102605780635d841af51161020957806370a08231116101e357806370a08231146104c0578063711c8876146104e9578063715018a6146104fc57600080fd5b80635d841af5146104875780635f3e849f1461049a5780635fa7b584146104ad57600080fd5b80634df87c091161023a5780634df87c0914610434578063510985c014610457578063549c46271461047a57600080fd5b8063395093511461040557806341275358146104185780634886c6751461042b57600080fd5b806318160ddd116102c257806327c71b501161029c57806327c71b50146103d55780632a0c42a1146103e8578063313ce567146103f657600080fd5b806318160ddd1461038f5780631dafede01461039757806323b872dd146103c257600080fd5b8063095ea7b3116102f3578063095ea7b3146103425780630e6dfcd51461036557806313966db51461037857600080fd5b80630351b22b1461030f57806306fdde0314610324575b600080fd5b61032261031d366004612d6b565b61071a565b005b61032c6107dc565b6040516103399190612db1565b60405180910390f35b610355610350366004612de4565b61086e565b6040519015158152602001610339565b610322610373366004612e0e565b610888565b610381600f5481565b604051908152602001610339565b600254610381565b6103aa6103a5366004612e4a565b610bc4565b6040516001600160a01b039091168152602001610339565b6103556103d0366004612e0e565b610bee565b6103226103e3366004612d6b565b610c12565b61038166038d7ea4c6800081565b60405160128152602001610339565b610355610413366004612de4565b610d9e565b6007546103aa906001600160a01b031681565b61038161271081565b610355610442366004612d6b565b60096020526000908152604090205460ff1681565b610355610465366004612d6b565b600b6020526000908152604090205460ff1681565b600d546103559060ff1681565b610322610495366004612e4a565b610ddd565b6103226104a8366004612e0e565b610e7c565b6103226104bb366004612d6b565b610f06565b6103816104ce366004612d6b565b6001600160a01b031660009081526020819052604090205490565b6103226104f7366004612d6b565b611199565b610322611252565b6103aa7f00000000000000000000000054e44dbb92dba848ace27f44c0cb4268981ef1cc81565b610322611266565b610322610541366004612de4565b6112f4565b610322610554366004612e63565b611421565b610322610567366004612d6b565b6114e0565b6005546001600160a01b03166103aa565b61032261058b366004612e96565b611598565b610322611764565b61032c61185f565b61038160105481565b6103556105b7366004612de4565b61186e565b6103556105ca366004612de4565b611918565b6103556105dd366004612d6b565b600a6020526000908152604090205460ff1681565b610322611926565b610381600e5481565b610322610611366004612d6b565b6119b9565b610381610624366004612e63565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6006546001600160a01b03166103aa565b6106ac61066e366004612d6b565b600c60205260009081526040902080546001820154600283015460038401546004909401546001600160a01b03938416949390921692909160ff1685565b604080516001600160a01b0396871681529590941660208601529284019190915260608301521515608082015260a001610339565b6103226106ef366004612e4a565b611ad5565b610322610702366004612d6b565b611b6c565b610322610715366004612eef565b611bdd565b6107226121bb565b6001600160a01b0381166000908152600b602052604090205460ff16156107905760405162461bcd60e51b815260206004820152601160248201527f416c72656164792050726f746563746f7200000000000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0381166000818152600b6020526040808220805460ff19166001179055517ff13867159a6367ba345985a484e0a7618ca52cc88dd1e31406499f89287ba9009190a250565b6060600380546107eb90612f3e565b80601f016020809104026020016040519081016040528092919081815260200182805461081790612f3e565b80156108645780601f1061083957610100808354040283529160200191610864565b820191906000526020600020905b81548152906001019060200180831161084757829003601f168201915b5050505050905090565b60003361087c818585612215565b60019150505b92915050565b6001600160a01b03831660009081526009602052604090205460ff166108f05760405162461bcd60e51b815260206004820152600960248201527f4e6f7420746f6b656e00000000000000000000000000000000000000000000006044820152606401610787565b66038d7ea4c680008110156109475760405162461bcd60e51b815260206004820152601460248201527f4c657373207468616e206d696e2072656465656d0000000000000000000000006044820152606401610787565b6001600160a01b038084166000908152600c60209081526040808320815160a08101835281548616815260018201549095168584018190526002820154868401526003820154606087015260049182015460ff161515608087015282517fcd8bd4e30000000000000000000000000000000000000000000000000000000081529251909363cd8bd4e39380840193919291908290030181865afa1580156109f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a169190612f78565b9050610a2a6005546001600160a01b031690565b6001600160a01b0316336001600160a01b031614158015610a5657506007546001600160a01b03163314155b8015610a6457506000601054115b15610aaf57600061271060105485610a7c9190612fa7565b610a869190612fbe565b9050610a928185612fe0565b600754909450610aad9033906001600160a01b03168361236d565b505b6000610abd6012600a6130d7565b610ac78584612fa7565b610ad19190612fbe565b90508083606001511015610b275760405162461bcd60e51b815260206004820181905260248201527f4e6f7420656e6f7567682066756e647320746f2072656465656d20746f6b656e6044820152606401610787565b6001600160a01b0386166000908152600c602052604081206003018054839290610b52908490612fe0565b90915550610b629050338561255c565b8251610b786001600160a01b03821687846126c5565b856001600160a01b03167f4896181ff8f4543cc00db9fe9b6fb7e6f032b7eb772c72ab1ec1b4d2e03b936986604051610bb391815260200190565b60405180910390a250505050505050565b60088181548110610bd457600080fd5b6000918252602090912001546001600160a01b0316905081565b600033610bfc85828561276e565b610c0785858561236d565b506001949350505050565b336000908152600b602052604090205460ff1680610c3a57506005546001600160a01b031633145b610c865760405162461bcd60e51b815260206004820152601660248201527f4e6f7420617070726f7665642070726f746563746f72000000000000000000006044820152606401610787565b6001600160a01b03811660009081526009602052604090205460ff16610ce35760405162461bcd60e51b81526020600482015260126024820152712737ba1030b8383937bb32b2103a37b5b2b760711b6044820152606401610787565b6001600160a01b0381166000908152600c602052604090206004015460ff1615610d4f5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e20616c7265616479207061757365640000000000000000000000006044820152606401610787565b6001600160a01b0381166000818152600c6020526040808220600401805460ff19166001179055517f278126b2e1991e1ba19609bfc354c3308c2c71ca4e545c3171b68b1c0abba4209190a250565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061087c9082908690610dd89087906130e6565b612215565b610de56121bb565b6032811115610e365760405162461bcd60e51b815260206004820152601260248201527f52656465656d20666565203e20302e35302500000000000000000000000000006044820152606401610787565b601080549082905560408051828152602081018490527fffec246ec3cd6013aa24cef90073be16c9fdfd36228cd46e72c9eea216a836ad91015b60405180910390a15050565b610e846121bb565b6001600160a01b0382166000908152600a602052604090205460ff1615610eed5760405162461bcd60e51b815260206004820152601c60248201527f43616e204e6f74207472616e73666572207661756c7420746f6b656e000000006044820152606401610787565b610f016001600160a01b03831684836126c5565b505050565b610f0e6121bb565b6001600160a01b03811660009081526009602052604090205460ff16610f6b5760405162461bcd60e51b81526020600482015260126024820152712737ba1030b8383937bb32b2103a37b5b2b760711b6044820152606401610787565b6001600160a01b038082166000818152600c60208181526040808420815160a08101835281548816815260018201805489168286015260028301548285015260038301546060830152600483015460ff161515608083015287875260098552838720805460ff1990811690915582519099168752600a8552928620805490981690975594845291905280546001600160a01b0319908116909155825416909155600854905b8181101561110e57836001600160a01b031660088281548110611035576110356130f9565b6000918252602090912001546001600160a01b0316036110fe57600861105c600184612fe0565b8154811061106c5761106c6130f9565b600091825260209091200154600880546001600160a01b039092169183908110611098576110986130f9565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060088054806110d7576110d761310f565b600082815260209020810160001990810180546001600160a01b031916905501905561110e565b61110781613125565b9050611010565b50600e6000815461111e9061313e565b909155506040516001600160a01b03841681527f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd39060200160405180910390a16040516000906001600160a01b038516907f198f904b16806dad4efbe8f4ee9e422ab7e99c4a2a968c07684fa1fcf76d9e68908390a3505050565b6111a16121bb565b6001600160a01b0381166000908152600b602052604090205460ff166112095760405162461bcd60e51b815260206004820152600d60248201527f4e6f742050726f746563746f72000000000000000000000000000000000000006044820152606401610787565b6001600160a01b0381166000818152600b6020526040808220805460ff19169055517fb9e541e39407dbb821dd624b82f5f06228d92ffe3ce830971cfd44f293c91a919190a250565b61125a6121bb565b61126460006127fa565b565b60065433906001600160a01b031681146112e85760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e657200000000000000000000000000000000000000000000006064820152608401610787565b6112f1816127fa565b50565b6112fc6121bb565b6001600160a01b03821660009081526009602052604090205460ff166113595760405162461bcd60e51b81526020600482015260126024820152712737ba1030b8383937bb32b2103a37b5b2b760711b6044820152606401610787565b6001600160a01b0382166000908152600c60205260409020600201548082116113c45760405162461bcd60e51b815260206004820152601060248201527f43616e6e6f74206c6f77657220636170000000000000000000000000000000006044820152606401610787565b6001600160a01b0383166000818152600c602090815260409182902060020185905581518481529081018590527ff7eb57dc8fcd93bcdf9b13023381fa59ac731b50c479570ceaff0974bca022ba910160405180910390a2505050565b6114296121bb565b6001600160a01b03821660009081526009602052604090205460ff166114865760405162461bcd60e51b81526020600482015260126024820152712737ba1030b8383937bb32b2103a37b5b2b760711b6044820152606401610787565b6001600160a01b038281166000818152600c602052604080822060010180546001600160a01b0319169486169485179055517f198f904b16806dad4efbe8f4ee9e422ab7e99c4a2a968c07684fa1fcf76d9e689190a35050565b6114e86121bb565b6001600160a01b03811661153e5760405162461bcd60e51b815260206004820152601760248201527f43616e206e6f74206265207a65726f20616464726573730000000000000000006044820152606401610787565b600780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f32c7f8c60f86ae20e5414c27c3d06e25fa775321683e23c95456c83d0ce0a6529101610e70565b6115a06121bb565b6001600160a01b03841660009081526009602052604090205460ff16156116095760405162461bcd60e51b815260206004820152600d60248201527f416c7265616479206164646564000000000000000000000000000000000000006044820152606401610787565b6001600160a01b038481166000908152600c60209081526040808320600983528184208054600160ff199182168117909255898716808752600a909552929094208054909216841790915580546001600160a01b0319908116909217815591820180549091169285169290921790915561168385836112f4565b6008805460018101825560009182527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b038816179055600e80549091906116dd90613125565b909155506040516001600160a01b03861681527f784c8f4dbf0ffedd6e72c76501c545a70f8b203b30a26ce542bf92ba87c248a49060200160405180910390a1826001600160a01b0316856001600160a01b03167f198f904b16806dad4efbe8f4ee9e422ab7e99c4a2a968c07684fa1fcf76d9e6860405160405180910390a35050505050565b336000908152600b602052604090205460ff168061178c57506005546001600160a01b031633145b6117d85760405162461bcd60e51b815260206004820152601660248201527f4e6f7420617070726f7665642070726f746563746f72000000000000000000006044820152606401610787565b600d5460ff1661182a5760405162461bcd60e51b815260206004820152601760248201527f4465706f7369747320616c726561647920636c6f7365640000000000000000006044820152606401610787565b600d805460ff191690556040517f1a8ade30f60946b8fb7b4d1cf93dc594fa0e441eca24e1b9b88cfa375e3488b190600090a1565b6060600480546107eb90612f3e565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091908381101561190b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610787565b610c078286868403612215565b60003361087c81858561236d565b61192e6121bb565b600d5460ff16156119815760405162461bcd60e51b815260206004820152601760248201527f4465706f7369747320616c7265616479206f70656e65640000000000000000006044820152606401610787565b600d805460ff191660011790556040517fbd0d1cedfd4b96931ddded2368f63c090b88e5e313b383f6f95480bd4835acde90600090a1565b6119c16121bb565b6001600160a01b03811660009081526009602052604090205460ff16611a1e5760405162461bcd60e51b81526020600482015260126024820152712737ba1030b8383937bb32b2103a37b5b2b760711b6044820152606401610787565b6001600160a01b0381166000908152600c602052604090206004015460ff16611a895760405162461bcd60e51b815260206004820152601060248201527f546f6b656e206e6f7420706175736564000000000000000000000000000000006044820152606401610787565b6001600160a01b0381166000818152600c6020526040808220600401805460ff19169055517f060c47e20dcfff848b570ffc777cf30c3e518c1c3c52058f05564fbb880aeba49190a250565b611add6121bb565b6032811115611b2e5760405162461bcd60e51b815260206004820152601060248201527f4d696e7420666565203e20302e353025000000000000000000000000000000006044820152606401610787565b600f80549082905560408051828152602081018490527f387269377ae17304805d5f88cea4252e5ca47346783c279aeb9e8627335a49ac9101610e70565b611b746121bb565b600680546001600160a01b0383166001600160a01b03199091168117909155611ba56005546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600d5460ff16611c41576005546001600160a01b03163314611c415760405162461bcd60e51b815260206004820152601160248201527f4465706f73697473206e6f74206f70656e0000000000000000000000000000006044820152606401610787565b6001600160a01b038085166000818152600c60209081526040808320815160a081018352815487168152600182015490961686840152600281015486830152600381015460608701526004015460ff908116151560808701529383526009909152902054168015611cb457508060800151155b611d005760405162461bcd60e51b815260206004820152601b60248201527f4465706f73697473206e6f74206f70656e20666f7220746f6b656e00000000006044820152606401610787565b60008311611d505760405162461bcd60e51b815260206004820152601160248201527f43616e206e6f74206465706f73697420300000000000000000000000000000006044820152606401610787565b8060400151838260600151611d6591906130e6565b1115611db35760405162461bcd60e51b815260206004820152600b60248201527f45786365656473206361700000000000000000000000000000000000000000006044820152606401610787565b600081602001516001600160a01b031663cd8f16356040518163ffffffff1660e01b8152600401602060405180830381865afa158015611df7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e1b9190612f78565b825190915083611fc557611e3a6001600160a01b038816333088612813565b611e4e6001600160a01b0388168287612864565b60006064611e5d876063612fa7565b611e679190612fbe565b6040517f0efe6a8b0000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201899052604482018390529192507f00000000000000000000000054e44dbb92dba848ace27f44c0cb4268981ef1cc90911690630efe6a8b906064016020604051808303816000875af1158015611efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1f9190612f78565b6040517f7fb2a0a10000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018390529197507f00000000000000000000000054e44dbb92dba848ace27f44c0cb4268981ef1cc90911690637fb2a0a190604401600060405180830381600087803b158015611fa757600080fd5b505af1158015611fbb573d6000803e3d6000fd5b5050505050611fda565b611fda6001600160a01b038216333088612813565b6000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561201a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203e9190613155565b61204990600a6130d7565b6120538785612fa7565b61205d9190612fbe565b905066038d7ea4c680008110156120b65760405162461bcd60e51b815260206004820152601260248201527f4c657373207468616e206d696e206d696e7400000000000000000000000000006044820152606401610787565b6005546001600160a01b031633148015906120dc57506007546001600160a01b03163314155b80156120ea57506000600f54115b15612133576000612710600f54836121029190612fa7565b61210c9190612fbe565b90506121188183612fe0565b600754909250612131906001600160a01b031682612908565b505b6001600160a01b0388166000908152600c60205260408120600301805488929061215e9084906130e6565b9091555061216e90508782612908565b866001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c826040516121a991815260200190565b60405180910390a25050505050505050565b6005546001600160a01b031633146112645760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610787565b6001600160a01b0383166122905760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b03821661230c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166123e95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b0382166124655760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b038316600090815260208190526040902054818110156124f45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35b50505050565b6001600160a01b0382166125d85760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b038216600090815260208190526040902054818110156126675760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610787565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6040516001600160a01b038316602482015260448101829052610f019084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526129c7565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461255657818110156127ed5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610787565b6125568484848403612215565b600680546001600160a01b03191690556112f181612aaf565b6040516001600160a01b03808516602483015283166044820152606481018290526125569085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161270a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663095ea7b360e01b1790526128ca8482612b01565b612556576040516001600160a01b0384166024820152600060448201526128fe90859063095ea7b360e01b9060640161270a565b61255684826129c7565b6001600160a01b03821661295e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610787565b806002600082825461297091906130e6565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6000612a1c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ba89092919063ffffffff16565b9050805160001480612a3d575080806020019051810190612a3d9190613178565b610f015760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610787565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806000846001600160a01b031684604051612b1e9190613195565b6000604051808303816000865af19150503d8060008114612b5b576040519150601f19603f3d011682016040523d82523d6000602084013e612b60565b606091505b5091509150818015612b8a575080511580612b8a575080806020019051810190612b8a9190613178565b8015612b9f57506001600160a01b0385163b15155b95945050505050565b6060612bb78484600085612bbf565b949350505050565b606082471015612c375760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610787565b600080866001600160a01b03168587604051612c539190613195565b60006040518083038185875af1925050503d8060008114612c90576040519150601f19603f3d011682016040523d82523d6000602084013e612c95565b606091505b5091509150612ca687838387612cb1565b979650505050505050565b60608315612d20578251600003612d19576001600160a01b0385163b612d195760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610787565b5081612bb7565b612bb78383815115612d355781518083602001fd5b8060405162461bcd60e51b81526004016107879190612db1565b80356001600160a01b0381168114612d6657600080fd5b919050565b600060208284031215612d7d57600080fd5b612d8682612d4f565b9392505050565b60005b83811015612da8578181015183820152602001612d90565b50506000910152565b6020815260008251806020840152612dd0816040850160208701612d8d565b601f01601f19169190910160400192915050565b60008060408385031215612df757600080fd5b612e0083612d4f565b946020939093013593505050565b600080600060608486031215612e2357600080fd5b612e2c84612d4f565b9250612e3a60208501612d4f565b9150604084013590509250925092565b600060208284031215612e5c57600080fd5b5035919050565b60008060408385031215612e7657600080fd5b612e7f83612d4f565b9150612e8d60208401612d4f565b90509250929050565b60008060008060808587031215612eac57600080fd5b612eb585612d4f565b9350612ec360208601612d4f565b9250612ed160408601612d4f565b9396929550929360600135925050565b80151581146112f157600080fd5b60008060008060808587031215612f0557600080fd5b612f0e85612d4f565b9350612f1c60208601612d4f565b9250604085013591506060850135612f3381612ee1565b939692955090935050565b600181811c90821680612f5257607f821691505b602082108103612f7257634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612f8a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761088257610882612f91565b600082612fdb57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561088257610882612f91565b600181815b8085111561302e57816000190482111561301457613014612f91565b8085161561302157918102915b93841c9390800290612ff8565b509250929050565b60008261304557506001610882565b8161305257506000610882565b816001811461306857600281146130725761308e565b6001915050610882565b60ff84111561308357613083612f91565b50506001821b610882565b5060208310610133831016604e8410600b84101617156130b1575081810a610882565b6130bb8383612ff3565b80600019048211156130cf576130cf612f91565b029392505050565b6000612d8660ff841683613036565b8082018082111561088257610882612f91565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60006001820161313757613137612f91565b5060010190565b60008161314d5761314d612f91565b506000190190565b60006020828403121561316757600080fd5b815160ff81168114612d8657600080fd5b60006020828403121561318a57600080fd5b8151612d8681612ee1565b600082516131a7818460208701612d8d565b919091019291505056fea2646970667358221220728f05999bded79f5a58ef6e6ca718e1ba754eac426d9239a7c54778a47f5b6e64736f6c63430008140033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

Providing the first suite of Karak-native LRTs to unlock liquid restaking for a full range of crypto assets.

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.