false
false
100

Contract Address Details

0xA9A96Ee51dD54B9f51d46b1fbD2A19c1295Ec75b

Contract Name
OnchainSwapV3
Creator
0x6dcb5e–32be33 at 0x509a92–fa7214
Balance
0 KAVA ( )
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
0 Transfers
Gas Used
28,651
Last Balance Update
11602229
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
OnchainSwapV3




Optimization enabled
true
Compiler version
v0.8.7+commit.e28d00a7




Optimization runs
2000
EVM Version
default




Verified at
2023-09-12T10:10:57.036648Z

contracts/periphery/OnchainSwapV3.sol

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./OnchainGateway.sol";
import '@openzeppelin/contracts/access/Ownable.sol';



contract OnchainSwapV3  is Context, Ownable{

    uint256 public fee = 0.05 ether;

    event ClaimedTokens(address token, address owner, uint256 balance);
    event OnchainSwap(address token, uint256 amount, uint256 fee);

    OnchainGateway public immutable onchainGateway;

    constructor() {
        onchainGateway = new OnchainGateway(address(this));
    }

    modifier hasFee() {
        require(msg.value >= fee);
        _;
    }

    function onswap(
        address token,
        uint amount,
        address dex,
        address dexgateway,
        bytes memory calldata_
    ) external payable hasFee {

        if(token!=address(0)) {
            onchainGateway.claimTokens(
                token,
                _msgSender(),
                amount
            );

            if (dexgateway == address(0)) {
                IERC20(token).approve(dex, amount);
            } else {
                IERC20(token).approve(dexgateway, amount);
            }
        }

        require(dex != address(onchainGateway), "OnchainSwap: call to onchain gateway");

        {
                uint256 size;
                address toCheck = dex;

                assembly {
                    size := extcodesize(toCheck)
                }

                require(size != 0, "OnchainSwap: call for a non-contract account");
            }


        (bool swapPassed, ) = dex.call{value: msg.value - fee}(
            calldata_
        );

        require(swapPassed, "OnchainSwap: Fail to call");
        emit OnchainSwap(token, amount, fee);
    }

    function changeFee(uint256 _newFee) public onlyOwner {
        fee = _newFee;
    }

    function claimTokens(address _token) public onlyOwner {
        if (_token == address(0x0)) {
            (bool sent, ) = _msgSender().call{value: address(this).balance}("");
            require(sent, "Failed to send Ether");
            return;
        }
        IERC20 erc20token = IERC20(_token);
        uint256 balance = erc20token.balanceOf(address(this));
        erc20token.transfer(_msgSender(), balance);
        emit ClaimedTokens(_token, _msgSender(), balance);
    }
}
        

@openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public 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);
    }
}
          

@openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}
          

@openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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;
    }
}
          

contracts/periphery/OnchainGateway.sol

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";


contract OnchainGateway {
    address public immutable onchainSwap;

    modifier onlyOnchainSwap() {
        require(onchainSwap == msg.sender, "Symb: caller is not the onchainSwap");
        _;
    }

    constructor(address _onchainSwap) {
        onchainSwap = _onchainSwap;
    }

    function claimTokens(
        address _token,
        address _from,
        uint256 _amount
    ) external onlyOnchainSwap {
        IERC20(_token).transferFrom(_from, onchainSwap, _amount );
    }
}
          

@openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public 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);
    }
}
          

@openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}
          

@openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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;
    }
}
          

contracts/periphery/OnchainGateway.sol

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";


contract OnchainGateway {
    address public immutable onchainSwap;

    modifier onlyOnchainSwap() {
        require(onchainSwap == msg.sender, "Symb: caller is not the onchainSwap");
        _;
    }

    constructor(address _onchainSwap) {
        onchainSwap = _onchainSwap;
    }

    function claimTokens(
        address _token,
        address _from,
        uint256 _amount
    ) external onlyOnchainSwap {
        IERC20(_token).transferFrom(_from, onchainSwap, _amount );
    }
}
          

Compiler Settings

{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers"]}},"optimizer":{"runs":2000,"enabled":true},"libraries":{}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"ClaimedTokens","inputs":[{"type":"address","name":"token","internalType":"address","indexed":false},{"type":"address","name":"owner","internalType":"address","indexed":false},{"type":"uint256","name":"balance","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OnchainSwap","inputs":[{"type":"address","name":"token","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"fee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeFee","inputs":[{"type":"uint256","name":"_newFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimTokens","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"fee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract OnchainGateway"}],"name":"onchainGateway","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"onswap","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"address","name":"dex","internalType":"address"},{"type":"address","name":"dexgateway","internalType":"address"},{"type":"bytes","name":"calldata_","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
              

Contract Creation Code

0x60a060405266b1a2bc2ec5000060015534801561001b57600080fd5b5061002533610074565b30604051610032906100c4565b6001600160a01b039091168152602001604051809103906000f08015801561005e573d6000803e3d6000fd5b5060601b6001600160601b0319166080526100d1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6103a180610df883390190565b60805160601c610cfb6100fd60003960008181610113015281816101c101526103b50152610cfb6000f3fe60806040526004361061007b5760003560e01c8063c20bb33c1161004e578063c20bb33c14610101578063ddca3f4314610135578063df8de3e714610159578063f2fde38b1461017957600080fd5b806321c69a19146100805780636a1db1bf14610095578063715018a6146100b55780638da5cb5b146100ca575b600080fd5b61009361008e366004610abe565b610199565b005b3480156100a157600080fd5b506100936100b0366004610beb565b6105e6565b3480156100c157600080fd5b50610093610645565b3480156100d657600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010d57600080fd5b506100e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561014157600080fd5b5061014b60015481565b6040519081526020016100f8565b34801561016557600080fd5b50610093610174366004610a9c565b6106ab565b34801561018557600080fd5b50610093610194366004610a9c565b61093d565b6001543410156101a857600080fd5b6001600160a01b038516156103b3576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016639fc314c886336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0392831660048201529116602482015260448101879052606401600060405180830381600087803b15801561024f57600080fd5b505af1158015610263573d6000803e3d6000fd5b505050506001600160a01b038216610316576040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820186905286169063095ea7b390604401602060405180830381600087803b1580156102d857600080fd5b505af11580156102ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103109190610bc9565b506103b3565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820186905286169063095ea7b390604401602060405180830381600087803b15801561037957600080fd5b505af115801561038d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b19190610bc9565b505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316141561045f5760405162461bcd60e51b8152602060048201526024808201527f4f6e636861696e537761703a2063616c6c20746f206f6e636861696e2067617460448201527f657761790000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b823b83816104d55760405162461bcd60e51b815260206004820152602c60248201527f4f6e636861696e537761703a2063616c6c20666f722061206e6f6e2d636f6e7460448201527f72616374206163636f756e7400000000000000000000000000000000000000006064820152608401610456565b50506000836001600160a01b0316600154346104f19190610c58565b836040516104ff9190610c1d565b60006040518083038185875af1925050503d806000811461053c576040519150601f19603f3d011682016040523d82523d6000602084013e610541565b606091505b50509050806105925760405162461bcd60e51b815260206004820152601960248201527f4f6e636861696e537761703a204661696c20746f2063616c6c000000000000006044820152606401610456565b600154604080516001600160a01b03891681526020810188905280820192909252517f61a4ff3bb8bbf861e1aa28d574e4b88959510ac2ae1b845521bb8c13c33d566b9181900360600190a1505050505050565b6000546001600160a01b031633146106405760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610456565b600155565b6000546001600160a01b0316331461069f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610456565b6106a96000610a18565b565b6000546001600160a01b031633146107055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610456565b6001600160a01b0381166107af57604051600090339047908381818185875af1925050503d8060008114610755576040519150601f19603f3d011682016040523d82523d6000602084013e61075a565b606091505b50509050806107ab5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610456565b5050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281906000906001600160a01b038316906370a082319060240160206040518083038186803b15801561080c57600080fd5b505afa158015610820573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108449190610c04565b90506001600160a01b03821663a9059cbb336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b1580156108b657600080fd5b505af11580156108ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ee9190610bc9565b50604080516001600160a01b038516815233602082015280820183905290517ff931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c9181900360600190a150505b50565b6000546001600160a01b031633146109975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610456565b6001600160a01b038116610a135760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610456565b61093a815b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610a9757600080fd5b919050565b600060208284031215610aae57600080fd5b610ab782610a80565b9392505050565b600080600080600060a08688031215610ad657600080fd5b610adf86610a80565b945060208601359350610af460408701610a80565b9250610b0260608701610a80565b9150608086013567ffffffffffffffff80821115610b1f57600080fd5b818801915088601f830112610b3357600080fd5b813581811115610b4557610b45610c96565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610b8b57610b8b610c96565b816040528281528b6020848701011115610ba457600080fd5b8260208601602083013760006020848301015280955050505050509295509295909350565b600060208284031215610bdb57600080fd5b81518015158114610ab757600080fd5b600060208284031215610bfd57600080fd5b5035919050565b600060208284031215610c1657600080fd5b5051919050565b6000825160005b81811015610c3e5760208186018101518583015201610c24565b81811115610c4d576000828501525b509190910192915050565b600082821015610c91577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea26469706673582212204665789103019acbffe78aa6326573f47235b6a3092e6ad24348b5ae0525560c64736f6c6343000807003360a060405234801561001057600080fd5b506040516103a13803806103a183398101604081905261002f91610044565b60601b6001600160601b031916608052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160601c61030361009e6000396000818160400152818160a201526101ae01526103036000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632ec609031461003b5780639fc314c81461008b575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009e610099366004610268565b6100a0565b005b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163314610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f53796d623a2063616c6c6572206973206e6f7420746865206f6e636861696e5360448201527f7761700000000000000000000000000000000000000000000000000000000000606482015260840160405180910390fd5b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018390528416906323b872dd90606401602060405180830381600087803b15801561020157600080fd5b505af1158015610215573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023991906102a4565b50505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461026357600080fd5b919050565b60008060006060848603121561027d57600080fd5b6102868461023f565b92506102946020850161023f565b9150604084013590509250925092565b6000602082840312156102b657600080fd5b815180151581146102c657600080fd5b939250505056fea2646970667358221220489f9ae0e5ff4d708afb664245d895032f4ff127fcb2102de46b4363065f699e64736f6c63430008070033

Deployed ByteCode

0x60806040526004361061007b5760003560e01c8063c20bb33c1161004e578063c20bb33c14610101578063ddca3f4314610135578063df8de3e714610159578063f2fde38b1461017957600080fd5b806321c69a19146100805780636a1db1bf14610095578063715018a6146100b55780638da5cb5b146100ca575b600080fd5b61009361008e366004610abe565b610199565b005b3480156100a157600080fd5b506100936100b0366004610beb565b6105e6565b3480156100c157600080fd5b50610093610645565b3480156100d657600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010d57600080fd5b506100e47f000000000000000000000000356d322bf762d4022d8c241428770565f236c2ea81565b34801561014157600080fd5b5061014b60015481565b6040519081526020016100f8565b34801561016557600080fd5b50610093610174366004610a9c565b6106ab565b34801561018557600080fd5b50610093610194366004610a9c565b61093d565b6001543410156101a857600080fd5b6001600160a01b038516156103b3576001600160a01b037f000000000000000000000000356d322bf762d4022d8c241428770565f236c2ea16639fc314c886336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0392831660048201529116602482015260448101879052606401600060405180830381600087803b15801561024f57600080fd5b505af1158015610263573d6000803e3d6000fd5b505050506001600160a01b038216610316576040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820186905286169063095ea7b390604401602060405180830381600087803b1580156102d857600080fd5b505af11580156102ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103109190610bc9565b506103b3565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820186905286169063095ea7b390604401602060405180830381600087803b15801561037957600080fd5b505af115801561038d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b19190610bc9565b505b7f000000000000000000000000356d322bf762d4022d8c241428770565f236c2ea6001600160a01b0316836001600160a01b0316141561045f5760405162461bcd60e51b8152602060048201526024808201527f4f6e636861696e537761703a2063616c6c20746f206f6e636861696e2067617460448201527f657761790000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b823b83816104d55760405162461bcd60e51b815260206004820152602c60248201527f4f6e636861696e537761703a2063616c6c20666f722061206e6f6e2d636f6e7460448201527f72616374206163636f756e7400000000000000000000000000000000000000006064820152608401610456565b50506000836001600160a01b0316600154346104f19190610c58565b836040516104ff9190610c1d565b60006040518083038185875af1925050503d806000811461053c576040519150601f19603f3d011682016040523d82523d6000602084013e610541565b606091505b50509050806105925760405162461bcd60e51b815260206004820152601960248201527f4f6e636861696e537761703a204661696c20746f2063616c6c000000000000006044820152606401610456565b600154604080516001600160a01b03891681526020810188905280820192909252517f61a4ff3bb8bbf861e1aa28d574e4b88959510ac2ae1b845521bb8c13c33d566b9181900360600190a1505050505050565b6000546001600160a01b031633146106405760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610456565b600155565b6000546001600160a01b0316331461069f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610456565b6106a96000610a18565b565b6000546001600160a01b031633146107055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610456565b6001600160a01b0381166107af57604051600090339047908381818185875af1925050503d8060008114610755576040519150601f19603f3d011682016040523d82523d6000602084013e61075a565b606091505b50509050806107ab5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610456565b5050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281906000906001600160a01b038316906370a082319060240160206040518083038186803b15801561080c57600080fd5b505afa158015610820573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108449190610c04565b90506001600160a01b03821663a9059cbb336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b1580156108b657600080fd5b505af11580156108ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ee9190610bc9565b50604080516001600160a01b038516815233602082015280820183905290517ff931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c9181900360600190a150505b50565b6000546001600160a01b031633146109975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610456565b6001600160a01b038116610a135760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610456565b61093a815b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610a9757600080fd5b919050565b600060208284031215610aae57600080fd5b610ab782610a80565b9392505050565b600080600080600060a08688031215610ad657600080fd5b610adf86610a80565b945060208601359350610af460408701610a80565b9250610b0260608701610a80565b9150608086013567ffffffffffffffff80821115610b1f57600080fd5b818801915088601f830112610b3357600080fd5b813581811115610b4557610b45610c96565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610b8b57610b8b610c96565b816040528281528b6020848701011115610ba457600080fd5b8260208601602083013760006020848301015280955050505050509295509295909350565b600060208284031215610bdb57600080fd5b81518015158114610ab757600080fd5b600060208284031215610bfd57600080fd5b5035919050565b600060208284031215610c1657600080fd5b5051919050565b6000825160005b81811015610c3e5760208186018101518583015201610c24565b81811115610c4d576000828501525b509190910192915050565b600082821015610c91577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea26469706673582212204665789103019acbffe78aa6326573f47235b6a3092e6ad24348b5ae0525560c64736f6c63430008070033