ETH Price: $2,423.47 (+0.08%)

Contract

0x970298189050aBd4dc4F119ccae14ee145ad9371
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Distribute207290172024-09-11 17:59:473 days ago1726077587IN
0x97029818...145ad9371
0 ETH0.000331223
Distribute205285732024-08-14 18:10:4731 days ago1723659047IN
0x97029818...145ad9371
0 ETH0.000552035
Distribute204781652024-08-07 17:23:3538 days ago1723051415IN
0x97029818...145ad9371
0 ETH0.0018769117
Distribute203085892024-07-15 1:20:5962 days ago1721006459IN
0x97029818...145ad9371
0 ETH0.000483234.37681814
Distribute200716062024-06-11 22:35:3595 days ago1718145335IN
0x97029818...145ad9371
0 ETH0.001234311.17954618
Distribute199774282024-05-29 18:54:47108 days ago1717008887IN
0x97029818...145ad9371
0 ETH0.0011040710
Distribute198260022024-05-08 14:41:47129 days ago1715179307IN
0x97029818...145ad9371
0 ETH0.0011196812
Distribute198151232024-05-07 2:09:47131 days ago1715047787IN
0x97029818...145ad9371
0 ETH0.000446144.04090927
Distribute196220672024-04-10 1:51:47158 days ago1712713907IN
0x97029818...145ad9371
0 ETH0.0016513614.95707563
Distribute194792942024-03-20 23:50:47178 days ago1710978647IN
0x97029818...145ad9371
0 ETH0.0038642435
Distribute193746002024-03-06 7:20:59193 days ago1709709659IN
0x97029818...145ad9371
0 ETH0.0064271258.21302857
Distribute192713572024-02-20 20:41:47207 days ago1708461707IN
0x97029818...145ad9371
0 ETH0.0036434333
Distribute191767212024-02-07 13:50:23220 days ago1707313823IN
0x97029818...145ad9371
0 ETH0.0038658935.01498931
Distribute191286862024-01-31 19:57:11227 days ago1706731031IN
0x97029818...145ad9371
0 ETH0.0025601723.18850272
Distribute190246632024-01-17 5:57:35242 days ago1705471055IN
0x97029818...145ad9371
0 ETH0.0027510929.48434622
Distribute189805012024-01-11 1:44:59248 days ago1704937499IN
0x97029818...145ad9371
0 ETH0.0038642435
Distribute189250622024-01-03 6:30:35256 days ago1704263435IN
0x97029818...145ad9371
0 ETH0.0015124513.69893136
Distribute188732272023-12-26 23:45:47263 days ago1703634347IN
0x97029818...145ad9371
0 ETH0.001399615
Distribute188658632023-12-25 23:00:23264 days ago1703545223IN
0x97029818...145ad9371
0 ETH0.001581614.32524421
Distribute187256762023-12-06 7:04:35284 days ago1701846275IN
0x97029818...145ad9371
0 ETH0.0058864853.31618713
Distribute186774672023-11-29 13:07:47290 days ago1701263267IN
0x97029818...145ad9371
0 ETH0.0035311731.98323151
Distribute186238882023-11-22 1:03:35298 days ago1700615015IN
0x97029818...145ad9371
0 ETH0.0036112732.70871967
Distribute185758242023-11-15 7:31:59305 days ago1700033519IN
0x97029818...145ad9371
0 ETH0.0031584128.60704273
Distribute184753302023-11-01 6:00:35319 days ago1698818435IN
0x97029818...145ad9371
0 ETH0.0014434513.07397434
Distribute184226962023-10-24 21:07:59326 days ago1698181679IN
0x97029818...145ad9371
0 ETH0.0033122130
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:
PowerTONSwapperProxy

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 16 : PowerTONSwapperProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;


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

import "../interfaces/IPoolProxy.sol";

import "../common/AccessibleCommon.sol";
import "../stake/ProxyBase.sol";
import "./PowerTONSwapperStorage.sol";

// import "hardhat/console.sol";

/// @title The proxy of PowerTONSwapper
contract PowerTONSwapperProxy is
    PowerTONSwapperStorage,
    AccessibleCommon,
    ProxyBase,
    IPoolProxy
{
    event Upgraded(address indexed implementation);


    /// @dev constructor of PowerTONSwapperProxy
    constructor(
        address _impl,
        address _wton,
        address _tos,
        address _uniswapRouter,
        address _autocoinageSnapshot,
        address _layer2Registry,
        address _seigManager
    ) {
        assert(
            IMPLEMENTATION_SLOT ==
                bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1)
        );

        require(_impl != address(0), "PowerTONSwapperProxy: logic is zero");

        _setImplementation(_impl);

        _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE);
        _setupRole(ADMIN_ROLE, msg.sender);

        wton = _wton;
        tos = ITOS(_tos);
        uniswapRouter = ISwapRouter(_uniswapRouter);
        autocoinageSnapshot = _autocoinageSnapshot;
        layer2Registry = _layer2Registry;
        seigManager = _seigManager;

    }

    /// @notice Set pause state
    /// @param _pause true:pause or false:resume
    function setProxyPause(bool _pause) external override onlyOwner {
        pauseProxy = _pause;
    }

    /// @notice Set implementation contract
    /// @param impl New implementation contract address
    function upgradeTo(address impl) external override onlyOwner {
        require(impl != address(0), "PowerTONSwapperProxy: input is zero");
        require(_implementation() != impl, "PowerTONSwapperProxy: same");
        _setImplementation(impl);
        emit Upgraded(impl);
    }

    /// @dev returns the implementation
    function implementation() public view override returns (address) {
        return _implementation();
    }

    /// @dev receive ether
    receive() external payable {
        revert("cannot receive Ether");
    }

    /// @dev fallback function , execute on undefined function call
    fallback() external payable {
        _fallback();
    }

    /// @dev fallback function , execute on undefined function call
    function _fallback() internal {
        address _impl = _implementation();
        require(
            _impl != address(0) && !pauseProxy,
            "PowerTONSwapperProxy: impl OR proxy is false"
        );

        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            // out and outsize are 0 because we don't know the size yet.
            let result := delegatecall(gas(), _impl, 0, calldatasize(), 0, 0)

            // Copy the returned data.
            returndatacopy(0, 0, returndatasize())

            switch result
                // delegatecall returns 0 on error.
                case 0 {
                    revert(0, returndatasize())
                }
                default {
                    return(0, returndatasize())
                }
        }
    }

}

File 2 of 16 : IPoolProxy.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

interface IPoolProxy {
    /// @dev Set pause state
    /// @param _pause true:pause or false:resume
    function setProxyPause(bool _pause) external;

    /// @dev Set implementation contract
    /// @param _impl New implementation contract address
    function upgradeTo(address _impl) external;

    /// @dev view implementation address
    /// @return the logic address
    function implementation() external view returns (address);

}

File 3 of 16 : AccessibleCommon.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./AccessRoleCommon.sol";

contract AccessibleCommon is AccessRoleCommon, AccessControl {
    modifier onlyOwner() {
        require(isAdmin(msg.sender), "Accessible: Caller is not an admin");
        _;
    }

    /// @dev add admin
    /// @param account  address to add
    function addAdmin(address account) public virtual onlyOwner {
        grantRole(ADMIN_ROLE, account);
    }

    /// @dev remove admin
    /// @param account  address to remove
    function removeAdmin(address account) public virtual onlyOwner {
        renounceRole(ADMIN_ROLE, account);
    }

    /// @dev transfer admin
    /// @param newAdmin new admin address
    function transferAdmin(address newAdmin) external virtual onlyOwner {
        require(newAdmin != address(0), "Accessible: zero address");
        require(msg.sender != newAdmin, "Accessible: same admin");

        grantRole(ADMIN_ROLE, newAdmin);
        renounceRole(ADMIN_ROLE, msg.sender);
    }

    /// @dev whether admin
    /// @param account  address to check
    function isAdmin(address account) public view virtual returns (bool) {
        return hasRole(ADMIN_ROLE, account);
    }
}

File 4 of 16 : ProxyBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Address} from "@openzeppelin/contracts/utils/Address.sol";

abstract contract ProxyBase {
    // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1))
    bytes32 internal constant IMPLEMENTATION_SLOT =
        0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /// @dev Sets the implementation address of the proxy.
    /// @param newImplementation Address of the new implementation.
    function _setImplementation(address newImplementation) internal {
        require(
            Address.isContract(newImplementation),
            "ProxyBase: Cannot set a proxy implementation to a non-contract address"
        );

        bytes32 slot = IMPLEMENTATION_SLOT;

        assembly {
            sstore(slot, newImplementation)
        }
    }

    function _implementation() internal view returns (address impl) {
        bytes32 slot = IMPLEMENTATION_SLOT;
        assembly {
            impl := sload(slot)
        }
    }
}

File 5 of 16 : PowerTONSwapperStorage.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import { ITOS } from "./ITOS.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";

contract PowerTONSwapperStorage {

    bool public pauseProxy;

    address public wton;
    ITOS public tos;
    ISwapRouter public uniswapRouter;
    address public autocoinageSnapshot;
    address public layer2Registry;
    address public seigManager;

    bool public migratedL2;
}

File 6 of 16 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 7 of 16 : AccessRoleCommon.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract AccessRoleCommon {
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER");
    bytes32 public constant BURNER_ROLE = keccak256("BURNER");
}

File 8 of 16 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 9 of 16 : 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;
    }
}

File 10 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 11 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 13 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 14 of 16 : ITOS.sol
//SPDX-License-Identifier: Unlicense
pragma solidity >0.8.0;

interface ITOS {
    function balanceOf(address account) external view returns (uint256);

    /// @dev Issue a token.
    /// @param to  who takes the issue
    /// @param amount the amount to issue
    function mint(address to, uint256 amount) external returns (bool);

    // @dev burn a token.
    /// @param from Whose tokens are burned
    /// @param amount the amount to burn
    function burn(address from, uint256 amount) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    /// @dev Authorizes the owner's token to be used by the spender as much as the value.
    /// @dev The signature must have the owner's signature.
    /// @param owner the token's owner
    /// @param spender the account that spend owner's token
    /// @param value the amount to be approve to spend
    /// @param deadline the deadline that valid the owner's signature
    /// @param v the owner's signature - v
    /// @param r the owner's signature - r
    /// @param s the owner's signature - s
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /// @dev verify the signature
    /// @param owner the token's owner
    /// @param spender the account that spend owner's token
    /// @param value the amount to be approve to spend
    /// @param deadline the deadline that valid the owner's signature
    /// @param _nounce the _nounce
    /// @param sigR the owner's signature - r
    /// @param sigS the owner's signature - s
    /// @param sigV the owner's signature - v
    function verify(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint256 _nounce,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) external view returns (bool);

    /// @dev the hash of Permit
    /// @param owner the token's owner
    /// @param spender the account that spend owner's token
    /// @param value the amount to be approve to spend
    /// @param deadline the deadline that valid the owner's signature
    /// @param _nounce the _nounce
    function hashPermit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint256 _nounce
    ) external view returns (bytes32);
}

File 15 of 16 : ISwapRouter.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
pragma abicoder v2;

import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol';

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3
interface ISwapRouter is IUniswapV3SwapCallback {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
}

File 16 of 16 : IUniswapV3SwapCallback.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Callback for IUniswapV3PoolActions#swap
/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface
interface IUniswapV3SwapCallback {
    /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
    /// @dev In the implementation you must pay the pool tokens owed for the swap.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
    /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
    /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call
    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_impl","type":"address"},{"internalType":"address","name":"_wton","type":"address"},{"internalType":"address","name":"_tos","type":"address"},{"internalType":"address","name":"_uniswapRouter","type":"address"},{"internalType":"address","name":"_autocoinageSnapshot","type":"address"},{"internalType":"address","name":"_layer2Registry","type":"address"},{"internalType":"address","name":"_seigManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autocoinageSnapshot","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"layer2Registry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migratedL2","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseProxy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seigManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_pause","type":"bool"}],"name":"setProxyPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tos","outputs":[{"internalType":"contract ITOS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wton","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b506040516200153538038062001535833981016040819052620000349162000383565b6200006160017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd62000417565b600080516020620014f5833981519152146200008d57634e487b7160e01b600052600160045260246000fd5b6001600160a01b038716620000f55760405162461bcd60e51b815260206004820152602360248201527f506f776572544f4e5377617070657250726f78793a206c6f676963206973207a60448201526265726f60e81b60648201526084015b60405180910390fd5b6200010087620001b5565b6200011b600080516020620015158339815191528062000261565b620001366000805160206200151583398151915233620002ac565b600080546001600160a01b0397881661010002610100600160a81b0319909116179055600180549587166001600160a01b0319968716179055600280549487169486169490941790935560038054928616928516929092179091556004805491851691841691909117905560058054919093169116179055506200043b565b620001cb81620002bc60201b62000a0f1760201c565b6200024e5760405162461bcd60e51b815260206004820152604660248201527f50726f7879426173653a2043616e6e6f742073657420612070726f787920696d60448201527f706c656d656e746174696f6e20746f2061206e6f6e2d636f6e7472616374206160648201526564647265737360d01b608482015260a401620000ec565b600080516020620014f583398151915255565b600082815260066020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b620002b88282620002c2565b5050565b3b151590565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff16620002b85760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620003223390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200037e57600080fd5b919050565b600080600080600080600060e0888a0312156200039e578283fd5b620003a98862000366565b9650620003b96020890162000366565b9550620003c96040890162000366565b9450620003d96060890162000366565b9350620003e96080890162000366565b9250620003f960a0890162000366565b91506200040960c0890162000366565b905092959891949750929550565b6000828210156200043657634e487b7160e01b81526011600452602481fd5b500390565b6110aa806200044b6000396000f3fe60806040526004361061015a5760003560e01c806370480275116100c15780638d62d9491161007a5780638d62d9491461043d57806391d1485414610462578063a1f5f50e14610482578063a217fddf146104a3578063cf2a239c146104b8578063d5391393146104d8578063d547741f1461050c576101a3565b8063704802751461037b578063735de9f71461039b57806375829def146103bb57806375b238fc146103db5780637cb00d25146103fd57806389f395de1461041d576101a3565b8063309d727311610113578063309d7273146102b457806336568abe146102ec5780633659cfe61461030c5780635c60da1b1461032c57806363a8fd89146103415780636fb7f5581461035b576101a3565b806301ffc9a7146101ad5780631785f53c146101e2578063248a9ca31461020257806324d7806c14610240578063282c51f3146102605780632f2ff15d14610294576101a3565b366101a35760405162461bcd60e51b815260206004820152601460248201527331b0b73737ba103932b1b2b4bb329022ba3432b960611b60448201526064015b60405180910390fd5b6101ab61052c565b005b3480156101b957600080fd5b506101cd6101c8366004610eb4565b6105dd565b60405190151581526020015b60405180910390f35b3480156101ee57600080fd5b506101ab6101fd366004610e37565b610614565b34801561020e57600080fd5b5061023261021d366004610e71565b60009081526006602052604090206001015490565b6040519081526020016101d9565b34801561024c57600080fd5b506101cd61025b366004610e37565b610654565b34801561026c57600080fd5b506102327f9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c881565b3480156102a057600080fd5b506101ab6102af366004610e89565b61066e565b3480156102c057600080fd5b506003546102d4906001600160a01b031681565b6040516001600160a01b0390911681526020016101d9565b3480156102f857600080fd5b506101ab610307366004610e89565b610694565b34801561031857600080fd5b506101ab610327366004610e37565b610712565b34801561033857600080fd5b506102d4610842565b34801561034d57600080fd5b506000546101cd9060ff1681565b34801561036757600080fd5b506005546102d4906001600160a01b031681565b34801561038757600080fd5b506101ab610396366004610e37565b610851565b3480156103a757600080fd5b506002546102d4906001600160a01b031681565b3480156103c757600080fd5b506101ab6103d6366004610e37565b61088e565b3480156103e757600080fd5b5061023260008051602061105583398151915281565b34801561040957600080fd5b506101ab610418366004610e51565b610986565b34801561042957600080fd5b506001546102d4906001600160a01b031681565b34801561044957600080fd5b506000546102d49061010090046001600160a01b031681565b34801561046e57600080fd5b506101cd61047d366004610e89565b6109be565b34801561048e57600080fd5b506005546101cd90600160a01b900460ff1681565b3480156104af57600080fd5b50610232600081565b3480156104c457600080fd5b506004546102d4906001600160a01b031681565b3480156104e457600080fd5b506102327ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b34801561051857600080fd5b506101ab610527366004610e89565b6109e9565b6000610536610a15565b90506001600160a01b03811615801590610553575060005460ff16155b6105b45760405162461bcd60e51b815260206004820152602c60248201527f506f776572544f4e5377617070657250726f78793a20696d706c204f5220707260448201526b6f78792069732066616c736560a01b606482015260840161019a565b3660008037600080366000845af43d6000803e8080156105d3573d6000f35b3d6000fd5b505050565b60006001600160e01b03198216637965db0b60e01b148061060e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b61061d33610654565b6106395760405162461bcd60e51b815260040161019a90610f7e565b61065160008051602061105583398151915282610694565b50565b600061060e600080516020611055833981519152836109be565b60008281526006602052604090206001015461068a8133610a3a565b6105d88383610a9e565b6001600160a01b03811633146107045760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161019a565b61070e8282610b24565b5050565b61071b33610654565b6107375760405162461bcd60e51b815260040161019a90610f7e565b6001600160a01b0381166107995760405162461bcd60e51b815260206004820152602360248201527f506f776572544f4e5377617070657250726f78793a20696e707574206973207a60448201526265726f60e81b606482015260840161019a565b806001600160a01b03166107ab610a15565b6001600160a01b031614156108025760405162461bcd60e51b815260206004820152601a60248201527f506f776572544f4e5377617070657250726f78793a2073616d65000000000000604482015260640161019a565b61080b81610b8b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600061084c610a15565b905090565b61085a33610654565b6108765760405162461bcd60e51b815260040161019a90610f7e565b6106516000805160206110558339815191528261066e565b61089733610654565b6108b35760405162461bcd60e51b815260040161019a90610f7e565b6001600160a01b0381166109045760405162461bcd60e51b815260206004820152601860248201527741636365737369626c653a207a65726f206164647265737360401b604482015260640161019a565b336001600160a01b03821614156109565760405162461bcd60e51b815260206004820152601660248201527520b1b1b2b9b9b4b136329d1039b0b6b29030b236b4b760511b604482015260640161019a565b61096e6000805160206110558339815191528261066e565b61065160008051602061105583398151915233610694565b61098f33610654565b6109ab5760405162461bcd60e51b815260040161019a90610f7e565b6000805460ff1916911515919091179055565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600082815260066020526040902060010154610a058133610a3a565b6105d88383610b24565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b610a4482826109be565b61070e57610a5c816001600160a01b03166014610c32565b610a67836020610c32565b604051602001610a78929190610edc565b60408051601f198184030181529082905262461bcd60e51b825261019a91600401610f4b565b610aa882826109be565b61070e5760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610ae03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610b2e82826109be565b1561070e5760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b803b610c0e5760405162461bcd60e51b815260206004820152604660248201527f50726f7879426173653a2043616e6e6f742073657420612070726f787920696d60448201527f706c656d656e746174696f6e20746f2061206e6f6e2d636f6e7472616374206160648201526564647265737360d01b608482015260a40161019a565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b60606000610c41836002610fd8565b610c4c906002610fc0565b67ffffffffffffffff811115610c7257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610c9c576020820181803683370190505b509050600360fc1b81600081518110610cc557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610d0257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610d26846002610fd8565b610d31906001610fc0565b90505b6001811115610dc5576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610d7357634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610d9757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610dbe81611027565b9050610d34565b508315610e145760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161019a565b9392505050565b80356001600160a01b0381168114610e3257600080fd5b919050565b600060208284031215610e48578081fd5b610e1482610e1b565b600060208284031215610e62578081fd5b81358015158114610e14578182fd5b600060208284031215610e82578081fd5b5035919050565b60008060408385031215610e9b578081fd5b82359150610eab60208401610e1b565b90509250929050565b600060208284031215610ec5578081fd5b81356001600160e01b031981168114610e14578182fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351610f0e816017850160208801610ff7565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610f3f816028840160208801610ff7565b01602801949350505050565b6020815260008251806020840152610f6a816040850160208701610ff7565b601f01601f19169190910160400192915050565b60208082526022908201527f41636365737369626c653a2043616c6c6572206973206e6f7420616e2061646d60408201526134b760f11b606082015260800190565b60008219821115610fd357610fd361103e565b500190565b6000816000190483118215151615610ff257610ff261103e565b500290565b60005b83811015611012578181015183820152602001610ffa565b83811115611021576000848401525b50505050565b6000816110365761103661103e565b506000190190565b634e487b7160e01b600052601160045260246000fdfedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a264697066735822122024a802d0bb4ef1babcebcd7527530cc5ca79d5eb7dff4f4a5f3f39e2003e7e7764736f6c63430008040033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4200000000000000000000000003140e1e254a4840c4983b20267a5c391e3fdb19000000000000000000000000c4a11aaf6ea915ed7ac194161d2fc9384f15bff2000000000000000000000000409c4d8cd5d2924b9bc5509230d16a61289c8153000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156400000000000000000000000085ca9f611c363065252ea9462c90743922767b550000000000000000000000000b3e174a2170083e770d5d4cf56774d221b7063e000000000000000000000000710936500ac59e8551331871cbad3d33d5e0d909

Deployed Bytecode

0x60806040526004361061015a5760003560e01c806370480275116100c15780638d62d9491161007a5780638d62d9491461043d57806391d1485414610462578063a1f5f50e14610482578063a217fddf146104a3578063cf2a239c146104b8578063d5391393146104d8578063d547741f1461050c576101a3565b8063704802751461037b578063735de9f71461039b57806375829def146103bb57806375b238fc146103db5780637cb00d25146103fd57806389f395de1461041d576101a3565b8063309d727311610113578063309d7273146102b457806336568abe146102ec5780633659cfe61461030c5780635c60da1b1461032c57806363a8fd89146103415780636fb7f5581461035b576101a3565b806301ffc9a7146101ad5780631785f53c146101e2578063248a9ca31461020257806324d7806c14610240578063282c51f3146102605780632f2ff15d14610294576101a3565b366101a35760405162461bcd60e51b815260206004820152601460248201527331b0b73737ba103932b1b2b4bb329022ba3432b960611b60448201526064015b60405180910390fd5b6101ab61052c565b005b3480156101b957600080fd5b506101cd6101c8366004610eb4565b6105dd565b60405190151581526020015b60405180910390f35b3480156101ee57600080fd5b506101ab6101fd366004610e37565b610614565b34801561020e57600080fd5b5061023261021d366004610e71565b60009081526006602052604090206001015490565b6040519081526020016101d9565b34801561024c57600080fd5b506101cd61025b366004610e37565b610654565b34801561026c57600080fd5b506102327f9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c881565b3480156102a057600080fd5b506101ab6102af366004610e89565b61066e565b3480156102c057600080fd5b506003546102d4906001600160a01b031681565b6040516001600160a01b0390911681526020016101d9565b3480156102f857600080fd5b506101ab610307366004610e89565b610694565b34801561031857600080fd5b506101ab610327366004610e37565b610712565b34801561033857600080fd5b506102d4610842565b34801561034d57600080fd5b506000546101cd9060ff1681565b34801561036757600080fd5b506005546102d4906001600160a01b031681565b34801561038757600080fd5b506101ab610396366004610e37565b610851565b3480156103a757600080fd5b506002546102d4906001600160a01b031681565b3480156103c757600080fd5b506101ab6103d6366004610e37565b61088e565b3480156103e757600080fd5b5061023260008051602061105583398151915281565b34801561040957600080fd5b506101ab610418366004610e51565b610986565b34801561042957600080fd5b506001546102d4906001600160a01b031681565b34801561044957600080fd5b506000546102d49061010090046001600160a01b031681565b34801561046e57600080fd5b506101cd61047d366004610e89565b6109be565b34801561048e57600080fd5b506005546101cd90600160a01b900460ff1681565b3480156104af57600080fd5b50610232600081565b3480156104c457600080fd5b506004546102d4906001600160a01b031681565b3480156104e457600080fd5b506102327ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b34801561051857600080fd5b506101ab610527366004610e89565b6109e9565b6000610536610a15565b90506001600160a01b03811615801590610553575060005460ff16155b6105b45760405162461bcd60e51b815260206004820152602c60248201527f506f776572544f4e5377617070657250726f78793a20696d706c204f5220707260448201526b6f78792069732066616c736560a01b606482015260840161019a565b3660008037600080366000845af43d6000803e8080156105d3573d6000f35b3d6000fd5b505050565b60006001600160e01b03198216637965db0b60e01b148061060e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b61061d33610654565b6106395760405162461bcd60e51b815260040161019a90610f7e565b61065160008051602061105583398151915282610694565b50565b600061060e600080516020611055833981519152836109be565b60008281526006602052604090206001015461068a8133610a3a565b6105d88383610a9e565b6001600160a01b03811633146107045760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161019a565b61070e8282610b24565b5050565b61071b33610654565b6107375760405162461bcd60e51b815260040161019a90610f7e565b6001600160a01b0381166107995760405162461bcd60e51b815260206004820152602360248201527f506f776572544f4e5377617070657250726f78793a20696e707574206973207a60448201526265726f60e81b606482015260840161019a565b806001600160a01b03166107ab610a15565b6001600160a01b031614156108025760405162461bcd60e51b815260206004820152601a60248201527f506f776572544f4e5377617070657250726f78793a2073616d65000000000000604482015260640161019a565b61080b81610b8b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600061084c610a15565b905090565b61085a33610654565b6108765760405162461bcd60e51b815260040161019a90610f7e565b6106516000805160206110558339815191528261066e565b61089733610654565b6108b35760405162461bcd60e51b815260040161019a90610f7e565b6001600160a01b0381166109045760405162461bcd60e51b815260206004820152601860248201527741636365737369626c653a207a65726f206164647265737360401b604482015260640161019a565b336001600160a01b03821614156109565760405162461bcd60e51b815260206004820152601660248201527520b1b1b2b9b9b4b136329d1039b0b6b29030b236b4b760511b604482015260640161019a565b61096e6000805160206110558339815191528261066e565b61065160008051602061105583398151915233610694565b61098f33610654565b6109ab5760405162461bcd60e51b815260040161019a90610f7e565b6000805460ff1916911515919091179055565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600082815260066020526040902060010154610a058133610a3a565b6105d88383610b24565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b610a4482826109be565b61070e57610a5c816001600160a01b03166014610c32565b610a67836020610c32565b604051602001610a78929190610edc565b60408051601f198184030181529082905262461bcd60e51b825261019a91600401610f4b565b610aa882826109be565b61070e5760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610ae03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610b2e82826109be565b1561070e5760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b803b610c0e5760405162461bcd60e51b815260206004820152604660248201527f50726f7879426173653a2043616e6e6f742073657420612070726f787920696d60448201527f706c656d656e746174696f6e20746f2061206e6f6e2d636f6e7472616374206160648201526564647265737360d01b608482015260a40161019a565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b60606000610c41836002610fd8565b610c4c906002610fc0565b67ffffffffffffffff811115610c7257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610c9c576020820181803683370190505b509050600360fc1b81600081518110610cc557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610d0257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610d26846002610fd8565b610d31906001610fc0565b90505b6001811115610dc5576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610d7357634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610d9757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610dbe81611027565b9050610d34565b508315610e145760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161019a565b9392505050565b80356001600160a01b0381168114610e3257600080fd5b919050565b600060208284031215610e48578081fd5b610e1482610e1b565b600060208284031215610e62578081fd5b81358015158114610e14578182fd5b600060208284031215610e82578081fd5b5035919050565b60008060408385031215610e9b578081fd5b82359150610eab60208401610e1b565b90509250929050565b600060208284031215610ec5578081fd5b81356001600160e01b031981168114610e14578182fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351610f0e816017850160208801610ff7565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610f3f816028840160208801610ff7565b01602801949350505050565b6020815260008251806020840152610f6a816040850160208701610ff7565b601f01601f19169190910160400192915050565b60208082526022908201527f41636365737369626c653a2043616c6c6572206973206e6f7420616e2061646d60408201526134b760f11b606082015260800190565b60008219821115610fd357610fd361103e565b500190565b6000816000190483118215151615610ff257610ff261103e565b500290565b60005b83811015611012578181015183820152602001610ffa565b83811115611021576000848401525b50505050565b6000816110365761103661103e565b506000190190565b634e487b7160e01b600052601160045260246000fdfedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a264697066735822122024a802d0bb4ef1babcebcd7527530cc5ca79d5eb7dff4f4a5f3f39e2003e7e7764736f6c63430008040033

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

00000000000000000000000003140e1e254a4840c4983b20267a5c391e3fdb19000000000000000000000000c4a11aaf6ea915ed7ac194161d2fc9384f15bff2000000000000000000000000409c4d8cd5d2924b9bc5509230d16a61289c8153000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156400000000000000000000000085ca9f611c363065252ea9462c90743922767b550000000000000000000000000b3e174a2170083e770d5d4cf56774d221b7063e000000000000000000000000710936500ac59e8551331871cbad3d33d5e0d909

-----Decoded View---------------
Arg [0] : _impl (address): 0x03140e1e254a4840C4983B20267A5c391e3Fdb19
Arg [1] : _wton (address): 0xc4A11aaf6ea915Ed7Ac194161d2fC9384F15bff2
Arg [2] : _tos (address): 0x409c4D8cd5d2924b9bc5509230d16a61289c8153
Arg [3] : _uniswapRouter (address): 0xE592427A0AEce92De3Edee1F18E0157C05861564
Arg [4] : _autocoinageSnapshot (address): 0x85Ca9f611C363065252EA9462c90743922767b55
Arg [5] : _layer2Registry (address): 0x0b3E174A2170083e770D5d4Cf56774D221b7063e
Arg [6] : _seigManager (address): 0x710936500aC59e8551331871Cbad3D33d5e0D909

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000003140e1e254a4840c4983b20267a5c391e3fdb19
Arg [1] : 000000000000000000000000c4a11aaf6ea915ed7ac194161d2fc9384f15bff2
Arg [2] : 000000000000000000000000409c4d8cd5d2924b9bc5509230d16a61289c8153
Arg [3] : 000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564
Arg [4] : 00000000000000000000000085ca9f611c363065252ea9462c90743922767b55
Arg [5] : 0000000000000000000000000b3e174a2170083e770d5d4cf56774d221b7063e
Arg [6] : 000000000000000000000000710936500ac59e8551331871cbad3d33d5e0d909


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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