Contract 0x6e907f8a52222f5891d6fbfdac358a010fcc36e2

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x954d0344d470debabcdde38d62fa4a93c35d7f36b5d5aca42f6536c57f8150b4Redeem(pending)2022-12-09 1:48:0142 mins ago0xe37f7f523e8b72fb06c4d8ccf9631a74a8fcd414 IN 0x6e907f8a52222f5891d6fbfdac358a010fcc36e20 BTT(Pending)
0x4a1dea67b1aa9c36e21a1091fa3788f216a00f70ee98583d590589495f544bfeRedeem137380722022-11-03 19:22:1735 days 7 hrs ago0x803e4ecd339eeb63b58eb3d91f85822b9664c73d IN  0x6e907f8a52222f5891d6fbfdac358a010fcc36e20 BTT25.56411
0x596fd24cc6deed4a2455d3dbae0aed1cdb7ca9a6c7f6f6fd87cec4e5410b4512Redeem136790112022-11-02 9:32:0336 days 16 hrs ago0xfac55168086cfe3284b5874ae2738a68ee6710d2 IN  0x6e907f8a52222f5891d6fbfdac358a010fcc36e20 BTT25.553202
0x349c8706b55a776d7a8bec13a0c5d72084a7463f56ce1b4623690f71f481fccdRevoke Role136789482022-11-02 9:29:5336 days 17 hrs ago0xf6fd1ff727ec6a678a35b993e85efe529aea7403 IN  0x6e907f8a52222f5891d6fbfdac358a010fcc36e20 BTT5.2704
0x9969964d1d2a09848e838f8b0a774f7915401753ac42552201941ca484735b54Grant Role136789282022-11-02 9:29:1336 days 17 hrs ago0xf6fd1ff727ec6a678a35b993e85efe529aea7403 IN  0x6e907f8a52222f5891d6fbfdac358a010fcc36e20 BTT15.4866
0xc90800f0313b1bf590f70f387ae59f1f4183189e4bf23245689df47cf1753a4fRedeem136789062022-11-02 9:28:2536 days 17 hrs ago0x7a70f91600490245b7d7e3f460587a1fd7f44eb2 IN  0x6e907f8a52222f5891d6fbfdac358a010fcc36e20 BTT25.549566
0x140545e9db22e8246b7354e3a1597def648f6cbbb025a82f98f73040f698580a0x60806040136786172022-11-02 9:18:3136 days 17 hrs ago0xf6fd1ff727ec6a678a35b993e85efe529aea7403 IN  Create: UPRedeemer0 BTT648.3894
[ Download CSV Export 
Latest 6 internal transactions
Parent Txn Hash Block From To Value
0x4a1dea67b1aa9c36e21a1091fa3788f216a00f70ee98583d590589495f544bfe137380722022-11-03 19:22:1735 days 7 hrs ago 0x6e907f8a52222f5891d6fbfdac358a010fcc36e20x803e4ecd339eeb63b58eb3d91f85822b9664c73d382,844,549.392894519992733347 BTT
0x4a1dea67b1aa9c36e21a1091fa3788f216a00f70ee98583d590589495f544bfe137380722022-11-03 19:22:1735 days 7 hrs ago 0x7d5a89c57bef19a9c893a600a5f2d58ffb81a633 0x6e907f8a52222f5891d6fbfdac358a010fcc36e2382,844,549.392894519992733347 BTT
0x596fd24cc6deed4a2455d3dbae0aed1cdb7ca9a6c7f6f6fd87cec4e5410b4512136790112022-11-02 9:32:0336 days 16 hrs ago 0x6e907f8a52222f5891d6fbfdac358a010fcc36e20xfac55168086cfe3284b5874ae2738a68ee6710d27.80000000410880538 BTT
0x596fd24cc6deed4a2455d3dbae0aed1cdb7ca9a6c7f6f6fd87cec4e5410b4512136790112022-11-02 9:32:0336 days 16 hrs ago 0x7d5a89c57bef19a9c893a600a5f2d58ffb81a633 0x6e907f8a52222f5891d6fbfdac358a010fcc36e27.80000000410880538 BTT
0xc90800f0313b1bf590f70f387ae59f1f4183189e4bf23245689df47cf1753a4f136789062022-11-02 9:28:2536 days 17 hrs ago 0x6e907f8a52222f5891d6fbfdac358a010fcc36e20x7a70f91600490245b7d7e3f460587a1fd7f44eb20.101188858584081114 BTT
0xc90800f0313b1bf590f70f387ae59f1f4183189e4bf23245689df47cf1753a4f136789062022-11-02 9:28:2536 days 17 hrs ago 0x7d5a89c57bef19a9c893a600a5f2d58ffb81a633 0x6e907f8a52222f5891d6fbfdac358a010fcc36e20.101188858584081114 BTT
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UPRedeemer

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at bttcscan.com on 2022-11-02
*/

// File: @openzeppelin/contracts/utils/introspection/IERC165.sol


// 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: @openzeppelin/contracts/utils/introspection/ERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;


/**
 * @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: @openzeppelin/contracts/utils/Strings.sol


// 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: @openzeppelin/contracts/access/IAccessControl.sol


// 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: @openzeppelin/contracts/utils/Context.sol


// 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: @openzeppelin/contracts/security/Pausable.sol


// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;


/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// File: @openzeppelin/contracts/access/AccessControl.sol


// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;





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

    /**
     * @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 virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @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 virtual {
        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 virtual 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: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

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

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

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

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

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

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

// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;


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

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

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

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;




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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

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

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

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

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

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

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

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

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

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// File: contracts/UP.sol



pragma solidity ^0.8.4;



contract UP is ERC20, AccessControl {
  bytes32 public constant MINT_ROLE = keccak256("MINT_ROLE");
  bytes32 public constant LEGACY_MINT_ROLE = keccak256("LEGACY_MINT_ROLE");
  address public UP_CONTROLLER = address(0);

  event SetUPController(address _setter, address _newController);

  modifier onlyMint() {
    require(hasRole(MINT_ROLE, msg.sender), "UP: ONLY_MINT");
    _;
  }

  modifier onlyAdmin() {
    require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "UP: ONLY_ADMIN");
    _;
  }

  constructor() ERC20("UPbttc", "UPbttc") {
    _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
  }

  /// @notice UPv1 legacy
  receive() external payable {}

  function burn(uint256 amount) public {
    _burn(_msgSender(), amount);
  }

  function burnFrom(address account, uint256 amount) public {
    _spendAllowance(account, _msgSender(), amount);
    _burn(account, amount);
  }

  /// @notice Retrocompatible function with v1
  function justBurn(uint256 amount) external {
    burn(amount);
  }

  /// @notice Mints token and have logic for supporting legacy mint logic
  function mint(address to, uint256 amount) public payable onlyMint returns (bool) {
    /// LEGACY_MINT_ROLE retrocompatible with UPv1
    if (hasRole(LEGACY_MINT_ROLE, msg.sender) && UP_CONTROLLER != address(0)) {
      (bool success, ) = UP_CONTROLLER.call{value: msg.value}(
        abi.encodeWithSignature(("mintUP(address)"), to)
      );
      require(success, "UP: LEGACY_MINT_FAILED");
    } else {
      _mint(to, amount);
    }
    /// Legacy UPv1 return
    return true;
  }

  /// @notice Sets a controller address that will receive the funds from LEGACY_MINT_ROLE
  function setController(address newController) public onlyAdmin {
    UP_CONTROLLER = newController;
    emit SetUPController(msg.sender, newController);
  }

  function withdrawFunds() public {
    require(UP_CONTROLLER != address(0));
    (bool success, ) = UP_CONTROLLER.call{value: address(this).balance}("");
    require(success);
  }
}

// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;



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

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

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

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

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

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

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

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

// File: contracts/Helpers/Safe.sol



pragma solidity ^0.8.4;


abstract contract Safe {
  using SafeERC20 for IERC20;

  address target;

  constructor(address _target) {
    target = _target;
  }

  function _withdrawFunds() internal returns (bool) {
    (bool sent, ) = address(target).call{value: address(this).balance}("");
    require(sent, "Safe: Failed to send Ether");
    return sent;
  }

  function _withdrawFundsERC20(address tokenAddress) internal returns (bool) {
    IERC20 token = IERC20(tokenAddress);
    token.safeTransfer(target, token.balanceOf(address(this)));
    return true;
  }
}

// File: contracts/UPController.sol



pragma solidity ^0.8.4;





/// @title UP Controller
/// @author dxffffff & A Fistful of Stray Cat Hair
/// @notice This controller back up the UP token and has the logic for borrowing tokens.

contract UPController is AccessControl, Safe, Pausable {
  bytes32 public constant REBALANCER_ROLE = keccak256("REBALANCER_ROLE");
  bytes32 public constant REDEEMER_ROLE = keccak256("REDEEMER_ROLE");

  address payable public UP_TOKEN = payable(address(0));
  uint256 public nativeBorrowed = 0;
  uint256 public upBorrowed = 0;

  event SyntheticMint(address _from, uint256 _amount, uint256 _newUpBorrowed);
  event BorrowNative(address _from, uint256 _amount, uint256 _newNativeBorrowed);
  event Repay(uint256 _nativeAmount, uint256 _upAmount);
  event Redeem(uint256 _upAmount, uint256 _redeemAmount);

  modifier onlyRebalancer() {
    require(hasRole(REBALANCER_ROLE, msg.sender), "UPController: ONLY_REBALANCER");
    _;
  }

  modifier onlyAdmin() {
    require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "UPController: ONLY_ADMIN");
    _;
  }

  modifier onlyRedeemer() {
    require(hasRole(REDEEMER_ROLE, msg.sender), "UPController: ONLY_REDEEMER");
    _;
  }

  constructor(address _UP, address _fundsTarget) Safe(_fundsTarget) {
    require(_UP != address(0), "UPController: Invalid UP address");
    UP_TOKEN = payable(_UP);
    _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
  }

  receive() external payable {}

  /// @notice Returns price of UP token based on its reserves
  function getVirtualPrice() public view returns (uint256) {
    if (getNativeBalance() == 0) return 0;
    return ((getNativeBalance() * 1e18) / actualTotalSupply());
  }

  /// @notice Returns price of UP token based on its reserves minus amount sent to the contract
  function getVirtualPrice(uint256 sentValue) public view returns (uint256) {
    if (getNativeBalance() == 0) return 0;
    uint256 nativeBalance = getNativeBalance() - sentValue;
    return ((nativeBalance * 1e18) / actualTotalSupply());
  }

  /// @notice Computed the actual native balances of the contract
  function getNativeBalance() public view returns (uint256) {
    return address(this).balance + nativeBorrowed;
  }

  /// @notice Computed total supply of UP token
  function actualTotalSupply() public view returns (uint256) {
    return UP(UP_TOKEN).totalSupply() - upBorrowed;
  }

  /// @notice Borrows native token from the back up reserves
  function borrowNative(uint256 _borrowAmount, address _to) public onlyRebalancer whenNotPaused {
    require(address(this).balance >= _borrowAmount, "UPController: NOT_ENOUGH_BALANCE");
    (bool success, ) = _to.call{value: _borrowAmount}("");
    nativeBorrowed += _borrowAmount;
    require(success, "UPController: BORROW_NATIVE_FAILED");
    emit BorrowNative(_to, _borrowAmount, nativeBorrowed);
  }

  /// @notice Borrows UP token minting it
  function borrowUP(uint256 _borrowAmount, address _to) public onlyRebalancer whenNotPaused {
    upBorrowed += _borrowAmount;
    UP(UP_TOKEN).mint(_to, _borrowAmount);
    emit SyntheticMint(msg.sender, _borrowAmount, upBorrowed);
  }

  function mintSyntheticUP(uint256 _mintAmount, address _to) public onlyRebalancer whenNotPaused {
    borrowUP(_mintAmount, _to);
  }

  /// @notice Mints UP based on virtual price - UPv1 logic
  function mintUP(address to) external payable whenNotPaused {
    require(msg.sender == UP_TOKEN, "UPController: NON_UP_CONTRACT");
    uint256 mintAmount = (msg.value * 1e18) / getVirtualPrice(msg.value);
    UP(UP_TOKEN).mint(to, mintAmount);
  }

  /// @notice Allows to return back borrowed amounts to the controller
  function repay(uint256 upAmount) public payable onlyRebalancer whenNotPaused {
    UP(UP_TOKEN).burnFrom(msg.sender, upAmount);
    upBorrowed -= upAmount <= upBorrowed ? upAmount : upBorrowed;
    nativeBorrowed -= msg.value <= nativeBorrowed ? msg.value : nativeBorrowed;
    emit Repay(msg.value, upAmount);
  }

  /// @notice Swaps UP token by native token
  function redeem(uint256 upAmount) public onlyRedeemer whenNotPaused {
    require(upAmount > 0, "UPController: AMOUNT_EQ_0");
    uint256 redeemAmount = (getVirtualPrice() * upAmount) / 1e18;
    UP(UP_TOKEN).burnFrom(msg.sender, upAmount);
    (bool success, ) = msg.sender.call{value: redeemAmount}("");
    require(success, "UPController: REDEEM_FAILED");
    emit Redeem(upAmount, redeemAmount);
  }

  function pause() public onlyAdmin {
    _pause();
  }

  function unpause() public onlyAdmin {
    _unpause();
  }

  function withdrawFunds() public onlyAdmin returns (bool) {
    return _withdrawFunds();
  }

  function withdrawFundsERC20(address tokenAddress) public onlyAdmin returns (bool) {
    return _withdrawFundsERC20(tokenAddress);
  }
}

// File: contracts/UPRedeemer.sol


pragma solidity ^0.8.4;






/// @title UPWhitelistedMint
/// @author clostao
/// @notice This contract allows to redeem UP in exchange to the corresponding backed value
contract UPRedeemer is AccessControl, Safe, Pausable {
  UP public UP_TOKEN;
  UPController public UP_CONTROLLER;
  bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");

  event UpdateUPController(address upController);
  event Redeem(address from, uint256 upAmount, uint256 redeemAmount);

  constructor(
    address _UP_TOKEN,
    address _UP_CONTROLLER,
    address _safeTargetAddress
  ) Safe(_safeTargetAddress) {
    require(_UP_TOKEN != address(0), "UPRedeemer: INVALID_UP_ADDRESS");
    require(_UP_CONTROLLER != address(0), "UPRedeemer: INVALID_UP_CONTROLLER_ADDRESS");
    _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
    UP_TOKEN = UP(payable(_UP_TOKEN));
    UP_CONTROLLER = UPController(payable(_UP_CONTROLLER));
  }

  /// @notice Allows any user to redeem the native tokens backing UP
  function redeem(uint256 upAmount) public whenNotPaused {
    UP_TOKEN.transferFrom(msg.sender, address(this), upAmount);
    UP_TOKEN.approve(address(UP_CONTROLLER), upAmount);

    uint256 prevBalance = address(this).balance;
    UP_CONTROLLER.redeem(upAmount);
    uint256 postBalance = address(this).balance;

    require(postBalance > prevBalance, "UPRedeemer: NOT_ENOUGH_UP_REDEEMED");
    uint256 redeemAmount = postBalance - prevBalance;
    (bool success, ) = msg.sender.call{value: redeemAmount}("");
    require(success, "UPRedeemer: FAIL_SENDING_NATIVE");
    emit Redeem(msg.sender, upAmount, redeemAmount);
  }

  function updateUPController(address _UP_CONTROLLER) public onlyRole(OWNER_ROLE) {
    UP_CONTROLLER = UPController(payable(_UP_CONTROLLER));
    emit UpdateUPController(_UP_CONTROLLER);
  }

  function pause() public onlyRole(OWNER_ROLE) {
    _pause();
  }

  function unpause() public onlyRole(OWNER_ROLE) {
    _unpause();
  }

  function withdrawFunds() public onlyRole(OWNER_ROLE) returns (bool) {
    return _withdrawFunds();
  }

  function withdrawFundsERC20(address tokenAddress) public onlyRole(OWNER_ROLE) returns (bool) {
    return _withdrawFundsERC20(tokenAddress);
  }

  receive() external payable {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_UP_TOKEN","type":"address"},{"internalType":"address","name":"_UP_CONTROLLER","type":"address"},{"internalType":"address","name":"_safeTargetAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"upAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redeemAmount","type":"uint256"}],"name":"Redeem","type":"event"},{"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"upController","type":"address"}],"name":"UpdateUPController","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OWNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UP_CONTROLLER","outputs":[{"internalType":"contract UPController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UP_TOKEN","outputs":[{"internalType":"contract UP","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upAmount","type":"uint256"}],"name":"redeem","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":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_UP_CONTROLLER","type":"address"}],"name":"updateUPController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"withdrawFundsERC20","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620029c6380380620029c68339818101604052810190620000379190620003ab565b8080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506000600160146101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141562000108576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000ff9062000477565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156200017b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001729062000455565b60405180910390fd5b620001906000801b336200021b60201b60201c565b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505062000575565b6200022d82826200023160201b60201c565b5050565b6200024382826200032260201b60201c565b6200031e57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620002c36200038c60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b600081519050620003a5816200055b565b92915050565b600080600060608486031215620003c757620003c6620004de565b5b6000620003d78682870162000394565b9350506020620003ea8682870162000394565b9250506040620003fd8682870162000394565b9150509250925092565b60006200041660298362000499565b91506200042382620004e3565b604082019050919050565b60006200043d601e8362000499565b91506200044a8262000532565b602082019050919050565b60006020820190508181036000830152620004708162000407565b9050919050565b6000602082019050818103600083015262000492816200042e565b9050919050565b600082825260208201905092915050565b6000620004b782620004be565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b7f555052656465656d65723a20494e56414c49445f55505f434f4e54524f4c4c4560008201527f525f414444524553530000000000000000000000000000000000000000000000602082015250565b7f555052656465656d65723a20494e56414c49445f55505f414444524553530000600082015250565b6200056681620004aa565b81146200057257600080fd5b50565b61244180620005856000396000f3fe6080604052600436106101025760003560e01c80635df3937311610095578063a217fddf11610064578063a217fddf1461031a578063a4125eb714610345578063d547741f14610382578063db006a75146103ab578063e58378bb146103d457610109565b80635df3937314610270578063780931171461029b5780638456cb59146102c657806391d14854146102dd57610109565b80632f2ff15d116100d15780632f2ff15d146101dc57806336568abe146102055780633f4ba83a1461022e5780635c975abb1461024557610109565b806301ffc9a71461010e578063040fb7b41461014b57806324600fc314610174578063248a9ca31461019f57610109565b3661010957005b600080fd5b34801561011a57600080fd5b50610135600480360381019061013091906117e6565b6103ff565b6040516101429190611c41565b60405180910390f35b34801561015757600080fd5b50610172600480360381019061016d919061171f565b610479565b005b34801561018057600080fd5b5061018961051f565b6040516101969190611c41565b60405180910390f35b3480156101ab57600080fd5b506101c660048036038101906101c19190611779565b610559565b6040516101d39190611c5c565b60405180910390f35b3480156101e857600080fd5b5061020360048036038101906101fe91906117a6565b610578565b005b34801561021157600080fd5b5061022c600480360381019061022791906117a6565b610599565b005b34801561023a57600080fd5b5061024361061c565b005b34801561025157600080fd5b5061025a610651565b6040516102679190611c41565b60405180910390f35b34801561027c57600080fd5b50610285610668565b6040516102929190611c77565b60405180910390f35b3480156102a757600080fd5b506102b061068e565b6040516102bd9190611c92565b60405180910390f35b3480156102d257600080fd5b506102db6106b4565b005b3480156102e957600080fd5b5061030460048036038101906102ff91906117a6565b6106e9565b6040516103119190611c41565b60405180910390f35b34801561032657600080fd5b5061032f610753565b60405161033c9190611c5c565b60405180910390f35b34801561035157600080fd5b5061036c6004803603810190610367919061171f565b61075a565b6040516103799190611c41565b60405180910390f35b34801561038e57600080fd5b506103a960048036038101906103a491906117a6565b610797565b005b3480156103b757600080fd5b506103d260048036038101906103cd9190611813565b6107b8565b005b3480156103e057600080fd5b506103e9610b5b565b6040516103f69190611c5c565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610472575061047182610b7f565b5b9050919050565b7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e6104a381610be9565b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fb682e7a4f803dfeae6b916c9ceceb840993d39faa07a97d24133ad3c2eab30f2826040516105139190611b8f565b60405180910390a15050565b60007fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e61054b81610be9565b610553610bfd565b91505090565b6000806000838152602001908152602001600020600101549050919050565b61058182610559565b61058a81610be9565b6105948383610cd3565b505050565b6105a1610db3565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461060e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060590611def565b60405180910390fd5b6106188282610dbb565b5050565b7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e61064681610be9565b61064e610e9c565b50565b6000600160149054906101000a900460ff16905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e6106de81610be9565b6106e6610f3e565b50565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b81565b60007fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e61078681610be9565b61078f83610fe0565b915050919050565b6107a082610559565b6107a981610be9565b6107b38383610dbb565b505050565b6107c0610651565b15610800576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f790611d4f565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b815260040161085f93929190611baa565b602060405180830381600087803b15801561087957600080fd5b505af115801561088d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b1919061174c565b50600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401610931929190611be1565b602060405180830381600087803b15801561094b57600080fd5b505af115801561095f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610983919061174c565b506000479050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db006a75836040518263ffffffff1660e01b81526004016109e49190611e0f565b600060405180830381600087803b1580156109fe57600080fd5b505af1158015610a12573d6000803e3d6000fd5b505050506000479050818111610a5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5490611d6f565b60405180910390fd5b60008282610a6b9190611f17565b905060003373ffffffffffffffffffffffffffffffffffffffff1682604051610a9390611b40565b60006040518083038185875af1925050503d8060008114610ad0576040519150601f19603f3d011682016040523d82523d6000602084013e610ad5565b606091505b5050905080610b19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1090611dcf565b60405180910390fd5b7fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929338684604051610b4c93929190611c0a565b60405180910390a15050505050565b7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e81565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610bfa81610bf5610db3565b6110c5565b50565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1647604051610c4690611b40565b60006040518083038185875af1925050503d8060008114610c83576040519150601f19603f3d011682016040523d82523d6000602084013e610c88565b606091505b5050905080610ccc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc390611d2f565b60405180910390fd5b8091505090565b610cdd82826106e9565b610daf57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610d54610db3565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b610dc582826106e9565b15610e9857600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610e3d610db3565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b610ea4610651565b610ee3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eda90611cef565b60405180910390fd5b6000600160146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610f27610db3565b604051610f349190611b8f565b60405180910390a1565b610f46610651565b15610f86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7d90611d4f565b60405180910390fd5b60018060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fc9610db3565b604051610fd69190611b8f565b60405180910390a1565b6000808290506110bb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016110459190611b8f565b60206040518083038186803b15801561105d57600080fd5b505afa158015611071573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110959190611840565b8373ffffffffffffffffffffffffffffffffffffffff166111629092919063ffffffff16565b6001915050919050565b6110cf82826106e9565b61115e576110f48173ffffffffffffffffffffffffffffffffffffffff1660146111e8565b6111028360001c60206111e8565b604051602001611113929190611b55565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111559190611cad565b60405180910390fd5b5050565b6111e38363a9059cbb60e01b8484604051602401611181929190611be1565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611424565b505050565b6060600060028360026111fb9190611ebd565b6112059190611e67565b67ffffffffffffffff81111561121e5761121d6120cc565b5b6040519080825280601f01601f1916602001820160405280156112505781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106112885761128761209d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106112ec576112eb61209d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261132c9190611ebd565b6113369190611e67565b90505b60018111156113d6577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106113785761137761209d565b5b1a60f81b82828151811061138f5761138e61209d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806113cf90612044565b9050611339565b506000841461141a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141190611ccf565b60405180910390fd5b8091505092915050565b6000611486826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114eb9092919063ffffffff16565b90506000815111156114e657808060200190518101906114a6919061174c565b6114e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114dc90611daf565b60405180910390fd5b5b505050565b60606114fa8484600085611503565b90509392505050565b606082471015611548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153f90611d0f565b60405180910390fd5b61155185611617565b611590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158790611d8f565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516115b99190611b29565b60006040518083038185875af1925050503d80600081146115f6576040519150601f19603f3d011682016040523d82523d6000602084013e6115fb565b606091505b509150915061160b82828661163a565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561164a5782905061169a565b60008351111561165d5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116919190611cad565b60405180910390fd5b9392505050565b6000813590506116b081612398565b92915050565b6000815190506116c5816123af565b92915050565b6000813590506116da816123c6565b92915050565b6000813590506116ef816123dd565b92915050565b600081359050611704816123f4565b92915050565b600081519050611719816123f4565b92915050565b600060208284031215611735576117346120fb565b5b6000611743848285016116a1565b91505092915050565b600060208284031215611762576117616120fb565b5b6000611770848285016116b6565b91505092915050565b60006020828403121561178f5761178e6120fb565b5b600061179d848285016116cb565b91505092915050565b600080604083850312156117bd576117bc6120fb565b5b60006117cb858286016116cb565b92505060206117dc858286016116a1565b9150509250929050565b6000602082840312156117fc576117fb6120fb565b5b600061180a848285016116e0565b91505092915050565b600060208284031215611829576118286120fb565b5b6000611837848285016116f5565b91505092915050565b600060208284031215611856576118556120fb565b5b60006118648482850161170a565b91505092915050565b61187681611f4b565b82525050565b61188581611f5d565b82525050565b61189481611f69565b82525050565b60006118a582611e2a565b6118af8185611e40565b93506118bf818560208601612011565b80840191505092915050565b6118d481611fc9565b82525050565b6118e381611fdb565b82525050565b60006118f482611e35565b6118fe8185611e4b565b935061190e818560208601612011565b61191781612100565b840191505092915050565b600061192d82611e35565b6119378185611e5c565b9350611947818560208601612011565b80840191505092915050565b6000611960602083611e4b565b915061196b82612111565b602082019050919050565b6000611983601483611e4b565b915061198e8261213a565b602082019050919050565b60006119a6602683611e4b565b91506119b182612163565b604082019050919050565b60006119c9601a83611e4b565b91506119d4826121b2565b602082019050919050565b60006119ec601083611e4b565b91506119f7826121db565b602082019050919050565b6000611a0f602283611e4b565b9150611a1a82612204565b604082019050919050565b6000611a32600083611e40565b9150611a3d82612253565b600082019050919050565b6000611a55601d83611e4b565b9150611a6082612256565b602082019050919050565b6000611a78601783611e5c565b9150611a838261227f565b601782019050919050565b6000611a9b602a83611e4b565b9150611aa6826122a8565b604082019050919050565b6000611abe601f83611e4b565b9150611ac9826122f7565b602082019050919050565b6000611ae1601183611e5c565b9150611aec82612320565b601182019050919050565b6000611b04602f83611e4b565b9150611b0f82612349565b604082019050919050565b611b2381611fbf565b82525050565b6000611b35828461189a565b915081905092915050565b6000611b4b82611a25565b9150819050919050565b6000611b6082611a6b565b9150611b6c8285611922565b9150611b7782611ad4565b9150611b838284611922565b91508190509392505050565b6000602082019050611ba4600083018461186d565b92915050565b6000606082019050611bbf600083018661186d565b611bcc602083018561186d565b611bd96040830184611b1a565b949350505050565b6000604082019050611bf6600083018561186d565b611c036020830184611b1a565b9392505050565b6000606082019050611c1f600083018661186d565b611c2c6020830185611b1a565b611c396040830184611b1a565b949350505050565b6000602082019050611c56600083018461187c565b92915050565b6000602082019050611c71600083018461188b565b92915050565b6000602082019050611c8c60008301846118cb565b92915050565b6000602082019050611ca760008301846118da565b92915050565b60006020820190508181036000830152611cc781846118e9565b905092915050565b60006020820190508181036000830152611ce881611953565b9050919050565b60006020820190508181036000830152611d0881611976565b9050919050565b60006020820190508181036000830152611d2881611999565b9050919050565b60006020820190508181036000830152611d48816119bc565b9050919050565b60006020820190508181036000830152611d68816119df565b9050919050565b60006020820190508181036000830152611d8881611a02565b9050919050565b60006020820190508181036000830152611da881611a48565b9050919050565b60006020820190508181036000830152611dc881611a8e565b9050919050565b60006020820190508181036000830152611de881611ab1565b9050919050565b60006020820190508181036000830152611e0881611af7565b9050919050565b6000602082019050611e246000830184611b1a565b92915050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000611e7282611fbf565b9150611e7d83611fbf565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611eb257611eb161206e565b5b828201905092915050565b6000611ec882611fbf565b9150611ed383611fbf565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611f0c57611f0b61206e565b5b828202905092915050565b6000611f2282611fbf565b9150611f2d83611fbf565b925082821015611f4057611f3f61206e565b5b828203905092915050565b6000611f5682611f9f565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000611fd482611fed565b9050919050565b6000611fe682611fed565b9050919050565b6000611ff882611fff565b9050919050565b600061200a82611f9f565b9050919050565b60005b8381101561202f578082015181840152602081019050612014565b8381111561203e576000848401525b50505050565b600061204f82611fbf565b915060008214156120635761206261206e565b5b600182039050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f536166653a204661696c656420746f2073656e64204574686572000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f555052656465656d65723a204e4f545f454e4f5547485f55505f52454445454d60008201527f4544000000000000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f555052656465656d65723a204641494c5f53454e44494e475f4e415449564500600082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6123a181611f4b565b81146123ac57600080fd5b50565b6123b881611f5d565b81146123c357600080fd5b50565b6123cf81611f69565b81146123da57600080fd5b50565b6123e681611f73565b81146123f157600080fd5b50565b6123fd81611fbf565b811461240857600080fd5b5056fea2646970667358221220e1901873e38658bacbb8460752ef1037e0e9184639c158d18b199226f473b7d664736f6c634300080700330000000000000000000000005dd380cbdcfeccc8a987ff46e3b9d479e0497a180000000000000000000000007d5a89c57bef19a9c893a600a5f2d58ffb81a633000000000000000000000000c814444deca35e56c59b51c858c26213d6977f90

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

0000000000000000000000005dd380cbdcfeccc8a987ff46e3b9d479e0497a180000000000000000000000007d5a89c57bef19a9c893a600a5f2d58ffb81a633000000000000000000000000c814444deca35e56c59b51c858c26213d6977f90

-----Decoded View---------------
Arg [0] : _UP_TOKEN (address): 0x5dd380cbdcfeccc8a987ff46e3b9d479e0497a18
Arg [1] : _UP_CONTROLLER (address): 0x7d5a89c57bef19a9c893a600a5f2d58ffb81a633
Arg [2] : _safeTargetAddress (address): 0xc814444deca35e56c59b51c858c26213d6977f90

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000005dd380cbdcfeccc8a987ff46e3b9d479e0497a18
Arg [1] : 0000000000000000000000007d5a89c57bef19a9c893a600a5f2d58ffb81a633
Arg [2] : 000000000000000000000000c814444deca35e56c59b51c858c26213d6977f90


Deployed ByteCode Sourcemap

55232:2113:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12899:204;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;56705:192;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;57051:104;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;14735:131;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;15128:147;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;16176:218;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;56975:70;;;;;;;;;;;;;:::i;:::-;;9136:86;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;55313:33;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;55290:18;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;56903:66;;;;;;;;;;;;;:::i;:::-;;13195:147;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;12300:49;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;57161:146;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;15520:149;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;56063:636;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;55351:60;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;12899:204;12984:4;13023:32;13008:47;;;:11;:47;;;;:87;;;;13059:36;13083:11;13059:23;:36::i;:::-;13008:87;13001:94;;12899:204;;;:::o;56705:192::-;55388:23;12791:16;12802:4;12791:10;:16::i;:::-;56829:14:::1;56792:13;;:53;;;;;;;;;;;;;;;;;;56857:34;56876:14;56857:34;;;;;;:::i;:::-;;;;;;;;56705:192:::0;;:::o;57051:104::-;57113:4;55388:23;12791:16;12802:4;12791:10;:16::i;:::-;57133::::1;:14;:16::i;:::-;57126:23;;57051:104:::0;;:::o;14735:131::-;14809:7;14836:6;:12;14843:4;14836:12;;;;;;;;;;;:22;;;14829:29;;14735:131;;;:::o;15128:147::-;15211:18;15224:4;15211:12;:18::i;:::-;12791:16;12802:4;12791:10;:16::i;:::-;15242:25:::1;15253:4;15259:7;15242:10;:25::i;:::-;15128:147:::0;;;:::o;16176:218::-;16283:12;:10;:12::i;:::-;16272:23;;:7;:23;;;16264:83;;;;;;;;;;;;:::i;:::-;;;;;;;;;16360:26;16372:4;16378:7;16360:11;:26::i;:::-;16176:218;;:::o;56975:70::-;55388:23;12791:16;12802:4;12791:10;:16::i;:::-;57029:10:::1;:8;:10::i;:::-;56975:70:::0;:::o;9136:86::-;9183:4;9207:7;;;;;;;;;;;9200:14;;9136:86;:::o;55313:33::-;;;;;;;;;;;;;:::o;55290:18::-;;;;;;;;;;;;;:::o;56903:66::-;55388:23;12791:16;12802:4;12791:10;:16::i;:::-;56955:8:::1;:6;:8::i;:::-;56903:66:::0;:::o;13195:147::-;13281:4;13305:6;:12;13312:4;13305:12;;;;;;;;;;;:20;;:29;13326:7;13305:29;;;;;;;;;;;;;;;;;;;;;;;;;13298:36;;13195:147;;;;:::o;12300:49::-;12345:4;12300:49;;;:::o;57161:146::-;57248:4;55388:23;12791:16;12802:4;12791:10;:16::i;:::-;57268:33:::1;57288:12;57268:19;:33::i;:::-;57261:40;;57161:146:::0;;;;:::o;15520:149::-;15604:18;15617:4;15604:12;:18::i;:::-;12791:16;12802:4;12791:10;:16::i;:::-;15635:26:::1;15647:4;15653:7;15635:11;:26::i;:::-;15520:149:::0;;;:::o;56063:636::-;9462:8;:6;:8::i;:::-;9461:9;9453:38;;;;;;;;;;;;:::i;:::-;;;;;;;;;56125:8:::1;;;;;;;;;;;:21;;;56147:10;56167:4;56174:8;56125:58;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;56190:8;;;;;;;;;;;:16;;;56215:13;;;;;;;;;;;56231:8;56190:50;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;56249:19;56271:21;56249:43;;56299:13;;;;;;;;;;;:20;;;56320:8;56299:30;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;56336:19;56358:21;56336:43;;56410:11;56396;:25;56388:72;;;;;;;;;;;;:::i;:::-;;;;;;;;;56467:20;56504:11;56490;:25;;;;:::i;:::-;56467:48;;56523:12;56541:10;:15;;56564:12;56541:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56522:59;;;56596:7;56588:51;;;;;;;;;;;;:::i;:::-;;;;;;;;;56651:42;56658:10;56670:8;56680:12;56651:42;;;;;;;;:::i;:::-;;;;;;;;56118:581;;;;56063:636:::0;:::o;55351:60::-;55388:23;55351:60;:::o;1782:157::-;1867:4;1906:25;1891:40;;;:11;:40;;;;1884:47;;1782:157;;;:::o;13646:105::-;13713:30;13724:4;13730:12;:10;:12::i;:::-;13713:10;:30::i;:::-;13646:105;:::o;49683:201::-;49727:4;49741:9;49764:6;;;;;;;;;;;49756:20;;49784:21;49756:54;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49740:70;;;49825:4;49817:43;;;;;;;;;;;;:::i;:::-;;;;;;;;;49874:4;49867:11;;;49683:201;:::o;17677:238::-;17761:22;17769:4;17775:7;17761;:22::i;:::-;17756:152;;17832:4;17800:6;:12;17807:4;17800:12;;;;;;;;;;;:20;;:29;17821:7;17800:29;;;;;;;;;;;;;;;;:36;;;;;;;;;;;;;;;;;;17883:12;:10;:12::i;:::-;17856:40;;17874:7;17856:40;;17868:4;17856:40;;;;;;;;;;17756:152;17677:238;;:::o;7790:98::-;7843:7;7870:10;7863:17;;7790:98;:::o;18047:239::-;18131:22;18139:4;18145:7;18131;:22::i;:::-;18127:152;;;18202:5;18170:6;:12;18177:4;18170:12;;;;;;;;;;;:20;;:29;18191:7;18170:29;;;;;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;18254:12;:10;:12::i;:::-;18227:40;;18245:7;18227:40;;18239:4;18227:40;;;;;;;;;;18127:152;18047:239;;:::o;10195:120::-;9739:8;:6;:8::i;:::-;9731:41;;;;;;;;;;;;:::i;:::-;;;;;;;;;10264:5:::1;10254:7;;:15;;;;;;;;;;;;;;;;;;10285:22;10294:12;:10;:12::i;:::-;10285:22;;;;;;:::i;:::-;;;;;;;;10195:120::o:0;9936:118::-;9462:8;:6;:8::i;:::-;9461:9;9453:38;;;;;;;;;;;;:::i;:::-;;;;;;;;;10006:4:::1;9996:7:::0;::::1;:14;;;;;;;;;;;;;;;;;;10026:20;10033:12;:10;:12::i;:::-;10026:20;;;;;;:::i;:::-;;;;;;;;9936:118::o:0;49890:206::-;49959:4;49972:12;49994;49972:35;;50014:58;50033:6;;;;;;;;;;;50041:5;:15;;;50065:4;50041:30;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;50014:5;:18;;;;:58;;;;;:::i;:::-;50086:4;50079:11;;;49890:206;;;:::o;14041:505::-;14130:22;14138:4;14144:7;14130;:22::i;:::-;14125:414;;14318:41;14346:7;14318:41;;14356:2;14318:19;:41::i;:::-;14432:38;14460:4;14452:13;;14467:2;14432:19;:38::i;:::-;14223:270;;;;;;;;;:::i;:::-;;;;;;;;;;;;;14169:358;;;;;;;;;;;:::i;:::-;;;;;;;;14125:414;14041:505;;:::o;46169:211::-;46286:86;46306:5;46336:23;;;46361:2;46365:5;46313:58;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46286:19;:86::i;:::-;46169:211;;;:::o;3612:451::-;3687:13;3713:19;3758:1;3749:6;3745:1;:10;;;;:::i;:::-;:14;;;;:::i;:::-;3735:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3713:47;;3771:15;:6;3778:1;3771:9;;;;;;;;:::i;:::-;;;;;:15;;;;;;;;;;;3797;:6;3804:1;3797:9;;;;;;;;:::i;:::-;;;;;:15;;;;;;;;;;;3828:9;3853:1;3844:6;3840:1;:10;;;;:::i;:::-;:14;;;;:::i;:::-;3828:26;;3823:135;3860:1;3856;:5;3823:135;;;3895:12;3916:3;3908:5;:11;3895:25;;;;;;;:::i;:::-;;;;;3883:6;3890:1;3883:9;;;;;;;;:::i;:::-;;;;;:37;;;;;;;;;;;3945:1;3935:11;;;;;3863:3;;;;:::i;:::-;;;3823:135;;;;3985:1;3976:5;:10;3968:55;;;;;;;;;;;;:::i;:::-;;;;;;;;;4048:6;4034:21;;;3612:451;;;;:::o;48742:716::-;49166:23;49192:69;49220:4;49192:69;;;;;;;;;;;;;;;;;49200:5;49192:27;;;;:69;;;;;:::i;:::-;49166:95;;49296:1;49276:10;:17;:21;49272:179;;;49373:10;49362:30;;;;;;;;;;;;:::i;:::-;49354:85;;;;;;;;;;;;:::i;:::-;;;;;;;;;49272:179;48812:646;48742:716;;:::o;22271:229::-;22408:12;22440:52;22462:6;22470:4;22476:1;22479:12;22440:21;:52::i;:::-;22433:59;;22271:229;;;;;:::o;23391:510::-;23561:12;23619:5;23594:21;:30;;23586:81;;;;;;;;;;;;:::i;:::-;;;;;;;;;23686:18;23697:6;23686:10;:18::i;:::-;23678:60;;;;;;;;;;;;:::i;:::-;;;;;;;;;23752:12;23766:23;23793:6;:11;;23812:5;23819:4;23793:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23751:73;;;;23842:51;23859:7;23868:10;23880:12;23842:16;:51::i;:::-;23835:58;;;;23391:510;;;;;;:::o;19526:326::-;19586:4;19843:1;19821:7;:19;;;:23;19814:30;;19526:326;;;:::o;26077:712::-;26227:12;26256:7;26252:530;;;26287:10;26280:17;;;;26252:530;26421:1;26401:10;:17;:21;26397:374;;;26599:10;26593:17;26660:15;26647:10;26643:2;26639:19;26632:44;26397:374;26742:12;26735:20;;;;;;;;;;;:::i;:::-;;;;;;;;26077:712;;;;;;:::o;7:139:1:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;7:139;;;;:::o;152:137::-;206:5;237:6;231:13;222:22;;253:30;277:5;253:30;:::i;:::-;152:137;;;;:::o;295:139::-;341:5;379:6;366:20;357:29;;395:33;422:5;395:33;:::i;:::-;295:139;;;;:::o;440:137::-;485:5;523:6;510:20;501:29;;539:32;565:5;539:32;:::i;:::-;440:137;;;;:::o;583:139::-;629:5;667:6;654:20;645:29;;683:33;710:5;683:33;:::i;:::-;583:139;;;;:::o;728:143::-;785:5;816:6;810:13;801:22;;832:33;859:5;832:33;:::i;:::-;728:143;;;;:::o;877:329::-;936:6;985:2;973:9;964:7;960:23;956:32;953:119;;;991:79;;:::i;:::-;953:119;1111:1;1136:53;1181:7;1172:6;1161:9;1157:22;1136:53;:::i;:::-;1126:63;;1082:117;877:329;;;;:::o;1212:345::-;1279:6;1328:2;1316:9;1307:7;1303:23;1299:32;1296:119;;;1334:79;;:::i;:::-;1296:119;1454:1;1479:61;1532:7;1523:6;1512:9;1508:22;1479:61;:::i;:::-;1469:71;;1425:125;1212:345;;;;:::o;1563:329::-;1622:6;1671:2;1659:9;1650:7;1646:23;1642:32;1639:119;;;1677:79;;:::i;:::-;1639:119;1797:1;1822:53;1867:7;1858:6;1847:9;1843:22;1822:53;:::i;:::-;1812:63;;1768:117;1563:329;;;;:::o;1898:474::-;1966:6;1974;2023:2;2011:9;2002:7;1998:23;1994:32;1991:119;;;2029:79;;:::i;:::-;1991:119;2149:1;2174:53;2219:7;2210:6;2199:9;2195:22;2174:53;:::i;:::-;2164:63;;2120:117;2276:2;2302:53;2347:7;2338:6;2327:9;2323:22;2302:53;:::i;:::-;2292:63;;2247:118;1898:474;;;;;:::o;2378:327::-;2436:6;2485:2;2473:9;2464:7;2460:23;2456:32;2453:119;;;2491:79;;:::i;:::-;2453:119;2611:1;2636:52;2680:7;2671:6;2660:9;2656:22;2636:52;:::i;:::-;2626:62;;2582:116;2378:327;;;;:::o;2711:329::-;2770:6;2819:2;2807:9;2798:7;2794:23;2790:32;2787:119;;;2825:79;;:::i;:::-;2787:119;2945:1;2970:53;3015:7;3006:6;2995:9;2991:22;2970:53;:::i;:::-;2960:63;;2916:117;2711:329;;;;:::o;3046:351::-;3116:6;3165:2;3153:9;3144:7;3140:23;3136:32;3133:119;;;3171:79;;:::i;:::-;3133:119;3291:1;3316:64;3372:7;3363:6;3352:9;3348:22;3316:64;:::i;:::-;3306:74;;3262:128;3046:351;;;;:::o;3403:118::-;3490:24;3508:5;3490:24;:::i;:::-;3485:3;3478:37;3403:118;;:::o;3527:109::-;3608:21;3623:5;3608:21;:::i;:::-;3603:3;3596:34;3527:109;;:::o;3642:118::-;3729:24;3747:5;3729:24;:::i;:::-;3724:3;3717:37;3642:118;;:::o;3766:373::-;3870:3;3898:38;3930:5;3898:38;:::i;:::-;3952:88;4033:6;4028:3;3952:88;:::i;:::-;3945:95;;4049:52;4094:6;4089:3;4082:4;4075:5;4071:16;4049:52;:::i;:::-;4126:6;4121:3;4117:16;4110:23;;3874:265;3766:373;;;;:::o;4145:189::-;4261:66;4321:5;4261:66;:::i;:::-;4256:3;4249:79;4145:189;;:::o;4340:169::-;4446:56;4496:5;4446:56;:::i;:::-;4441:3;4434:69;4340:169;;:::o;4515:364::-;4603:3;4631:39;4664:5;4631:39;:::i;:::-;4686:71;4750:6;4745:3;4686:71;:::i;:::-;4679:78;;4766:52;4811:6;4806:3;4799:4;4792:5;4788:16;4766:52;:::i;:::-;4843:29;4865:6;4843:29;:::i;:::-;4838:3;4834:39;4827:46;;4607:272;4515:364;;;;:::o;4885:377::-;4991:3;5019:39;5052:5;5019:39;:::i;:::-;5074:89;5156:6;5151:3;5074:89;:::i;:::-;5067:96;;5172:52;5217:6;5212:3;5205:4;5198:5;5194:16;5172:52;:::i;:::-;5249:6;5244:3;5240:16;5233:23;;4995:267;4885:377;;;;:::o;5268:366::-;5410:3;5431:67;5495:2;5490:3;5431:67;:::i;:::-;5424:74;;5507:93;5596:3;5507:93;:::i;:::-;5625:2;5620:3;5616:12;5609:19;;5268:366;;;:::o;5640:::-;5782:3;5803:67;5867:2;5862:3;5803:67;:::i;:::-;5796:74;;5879:93;5968:3;5879:93;:::i;:::-;5997:2;5992:3;5988:12;5981:19;;5640:366;;;:::o;6012:::-;6154:3;6175:67;6239:2;6234:3;6175:67;:::i;:::-;6168:74;;6251:93;6340:3;6251:93;:::i;:::-;6369:2;6364:3;6360:12;6353:19;;6012:366;;;:::o;6384:::-;6526:3;6547:67;6611:2;6606:3;6547:67;:::i;:::-;6540:74;;6623:93;6712:3;6623:93;:::i;:::-;6741:2;6736:3;6732:12;6725:19;;6384:366;;;:::o;6756:::-;6898:3;6919:67;6983:2;6978:3;6919:67;:::i;:::-;6912:74;;6995:93;7084:3;6995:93;:::i;:::-;7113:2;7108:3;7104:12;7097:19;;6756:366;;;:::o;7128:::-;7270:3;7291:67;7355:2;7350:3;7291:67;:::i;:::-;7284:74;;7367:93;7456:3;7367:93;:::i;:::-;7485:2;7480:3;7476:12;7469:19;;7128:366;;;:::o;7500:398::-;7659:3;7680:83;7761:1;7756:3;7680:83;:::i;:::-;7673:90;;7772:93;7861:3;7772:93;:::i;:::-;7890:1;7885:3;7881:11;7874:18;;7500:398;;;:::o;7904:366::-;8046:3;8067:67;8131:2;8126:3;8067:67;:::i;:::-;8060:74;;8143:93;8232:3;8143:93;:::i;:::-;8261:2;8256:3;8252:12;8245:19;;7904:366;;;:::o;8276:402::-;8436:3;8457:85;8539:2;8534:3;8457:85;:::i;:::-;8450:92;;8551:93;8640:3;8551:93;:::i;:::-;8669:2;8664:3;8660:12;8653:19;;8276:402;;;:::o;8684:366::-;8826:3;8847:67;8911:2;8906:3;8847:67;:::i;:::-;8840:74;;8923:93;9012:3;8923:93;:::i;:::-;9041:2;9036:3;9032:12;9025:19;;8684:366;;;:::o;9056:::-;9198:3;9219:67;9283:2;9278:3;9219:67;:::i;:::-;9212:74;;9295:93;9384:3;9295:93;:::i;:::-;9413:2;9408:3;9404:12;9397:19;;9056:366;;;:::o;9428:402::-;9588:3;9609:85;9691:2;9686:3;9609:85;:::i;:::-;9602:92;;9703:93;9792:3;9703:93;:::i;:::-;9821:2;9816:3;9812:12;9805:19;;9428:402;;;:::o;9836:366::-;9978:3;9999:67;10063:2;10058:3;9999:67;:::i;:::-;9992:74;;10075:93;10164:3;10075:93;:::i;:::-;10193:2;10188:3;10184:12;10177:19;;9836:366;;;:::o;10208:118::-;10295:24;10313:5;10295:24;:::i;:::-;10290:3;10283:37;10208:118;;:::o;10332:271::-;10462:3;10484:93;10573:3;10564:6;10484:93;:::i;:::-;10477:100;;10594:3;10587:10;;10332:271;;;;:::o;10609:379::-;10793:3;10815:147;10958:3;10815:147;:::i;:::-;10808:154;;10979:3;10972:10;;10609:379;;;:::o;10994:967::-;11376:3;11398:148;11542:3;11398:148;:::i;:::-;11391:155;;11563:95;11654:3;11645:6;11563:95;:::i;:::-;11556:102;;11675:148;11819:3;11675:148;:::i;:::-;11668:155;;11840:95;11931:3;11922:6;11840:95;:::i;:::-;11833:102;;11952:3;11945:10;;10994:967;;;;;:::o;11967:222::-;12060:4;12098:2;12087:9;12083:18;12075:26;;12111:71;12179:1;12168:9;12164:17;12155:6;12111:71;:::i;:::-;11967:222;;;;:::o;12195:442::-;12344:4;12382:2;12371:9;12367:18;12359:26;;12395:71;12463:1;12452:9;12448:17;12439:6;12395:71;:::i;:::-;12476:72;12544:2;12533:9;12529:18;12520:6;12476:72;:::i;:::-;12558;12626:2;12615:9;12611:18;12602:6;12558:72;:::i;:::-;12195:442;;;;;;:::o;12643:332::-;12764:4;12802:2;12791:9;12787:18;12779:26;;12815:71;12883:1;12872:9;12868:17;12859:6;12815:71;:::i;:::-;12896:72;12964:2;12953:9;12949:18;12940:6;12896:72;:::i;:::-;12643:332;;;;;:::o;12981:442::-;13130:4;13168:2;13157:9;13153:18;13145:26;;13181:71;13249:1;13238:9;13234:17;13225:6;13181:71;:::i;:::-;13262:72;13330:2;13319:9;13315:18;13306:6;13262:72;:::i;:::-;13344;13412:2;13401:9;13397:18;13388:6;13344:72;:::i;:::-;12981:442;;;;;;:::o;13429:210::-;13516:4;13554:2;13543:9;13539:18;13531:26;;13567:65;13629:1;13618:9;13614:17;13605:6;13567:65;:::i;:::-;13429:210;;;;:::o;13645:222::-;13738:4;13776:2;13765:9;13761:18;13753:26;;13789:71;13857:1;13846:9;13842:17;13833:6;13789:71;:::i;:::-;13645:222;;;;:::o;13873:280::-;13995:4;14033:2;14022:9;14018:18;14010:26;;14046:100;14143:1;14132:9;14128:17;14119:6;14046:100;:::i;:::-;13873:280;;;;:::o;14159:260::-;14271:4;14309:2;14298:9;14294:18;14286:26;;14322:90;14409:1;14398:9;14394:17;14385:6;14322:90;:::i;:::-;14159:260;;;;:::o;14425:313::-;14538:4;14576:2;14565:9;14561:18;14553:26;;14625:9;14619:4;14615:20;14611:1;14600:9;14596:17;14589:47;14653:78;14726:4;14717:6;14653:78;:::i;:::-;14645:86;;14425:313;;;;:::o;14744:419::-;14910:4;14948:2;14937:9;14933:18;14925:26;;14997:9;14991:4;14987:20;14983:1;14972:9;14968:17;14961:47;15025:131;15151:4;15025:131;:::i;:::-;15017:139;;14744:419;;;:::o;15169:::-;15335:4;15373:2;15362:9;15358:18;15350:26;;15422:9;15416:4;15412:20;15408:1;15397:9;15393:17;15386:47;15450:131;15576:4;15450:131;:::i;:::-;15442:139;;15169:419;;;:::o;15594:::-;15760:4;15798:2;15787:9;15783:18;15775:26;;15847:9;15841:4;15837:20;15833:1;15822:9;15818:17;15811:47;15875:131;16001:4;15875:131;:::i;:::-;15867:139;;15594:419;;;:::o;16019:::-;16185:4;16223:2;16212:9;16208:18;16200:26;;16272:9;16266:4;16262:20;16258:1;16247:9;16243:17;16236:47;16300:131;16426:4;16300:131;:::i;:::-;16292:139;;16019:419;;;:::o;16444:::-;16610:4;16648:2;16637:9;16633:18;16625:26;;16697:9;16691:4;16687:20;16683:1;16672:9;16668:17;16661:47;16725:131;16851:4;16725:131;:::i;:::-;16717:139;;16444:419;;;:::o;16869:::-;17035:4;17073:2;17062:9;17058:18;17050:26;;17122:9;17116:4;17112:20;17108:1;17097:9;17093:17;17086:47;17150:131;17276:4;17150:131;:::i;:::-;17142:139;;16869:419;;;:::o;17294:::-;17460:4;17498:2;17487:9;17483:18;17475:26;;17547:9;17541:4;17537:20;17533:1;17522:9;17518:17;17511:47;17575:131;17701:4;17575:131;:::i;:::-;17567:139;;17294:419;;;:::o;17719:::-;17885:4;17923:2;17912:9;17908:18;17900:26;;17972:9;17966:4;17962:20;17958:1;17947:9;17943:17;17936:47;18000:131;18126:4;18000:131;:::i;:::-;17992:139;;17719:419;;;:::o;18144:::-;18310:4;18348:2;18337:9;18333:18;18325:26;;18397:9;18391:4;18387:20;18383:1;18372:9;18368:17;18361:47;18425:131;18551:4;18425:131;:::i;:::-;18417:139;;18144:419;;;:::o;18569:::-;18735:4;18773:2;18762:9;18758:18;18750:26;;18822:9;18816:4;18812:20;18808:1;18797:9;18793:17;18786:47;18850:131;18976:4;18850:131;:::i;:::-;18842:139;;18569:419;;;:::o;18994:222::-;19087:4;19125:2;19114:9;19110:18;19102:26;;19138:71;19206:1;19195:9;19191:17;19182:6;19138:71;:::i;:::-;18994:222;;;;:::o;19303:98::-;19354:6;19388:5;19382:12;19372:22;;19303:98;;;:::o;19407:99::-;19459:6;19493:5;19487:12;19477:22;;19407:99;;;:::o;19512:147::-;19613:11;19650:3;19635:18;;19512:147;;;;:::o;19665:169::-;19749:11;19783:6;19778:3;19771:19;19823:4;19818:3;19814:14;19799:29;;19665:169;;;;:::o;19840:148::-;19942:11;19979:3;19964:18;;19840:148;;;;:::o;19994:305::-;20034:3;20053:20;20071:1;20053:20;:::i;:::-;20048:25;;20087:20;20105:1;20087:20;:::i;:::-;20082:25;;20241:1;20173:66;20169:74;20166:1;20163:81;20160:107;;;20247:18;;:::i;:::-;20160:107;20291:1;20288;20284:9;20277:16;;19994:305;;;;:::o;20305:348::-;20345:7;20368:20;20386:1;20368:20;:::i;:::-;20363:25;;20402:20;20420:1;20402:20;:::i;:::-;20397:25;;20590:1;20522:66;20518:74;20515:1;20512:81;20507:1;20500:9;20493:17;20489:105;20486:131;;;20597:18;;:::i;:::-;20486:131;20645:1;20642;20638:9;20627:20;;20305:348;;;;:::o;20659:191::-;20699:4;20719:20;20737:1;20719:20;:::i;:::-;20714:25;;20753:20;20771:1;20753:20;:::i;:::-;20748:25;;20792:1;20789;20786:8;20783:34;;;20797:18;;:::i;:::-;20783:34;20842:1;20839;20835:9;20827:17;;20659:191;;;;:::o;20856:96::-;20893:7;20922:24;20940:5;20922:24;:::i;:::-;20911:35;;20856:96;;;:::o;20958:90::-;20992:7;21035:5;21028:13;21021:21;21010:32;;20958:90;;;:::o;21054:77::-;21091:7;21120:5;21109:16;;21054:77;;;:::o;21137:149::-;21173:7;21213:66;21206:5;21202:78;21191:89;;21137:149;;;:::o;21292:126::-;21329:7;21369:42;21362:5;21358:54;21347:65;;21292:126;;;:::o;21424:77::-;21461:7;21490:5;21479:16;;21424:77;;;:::o;21507:163::-;21586:9;21619:45;21658:5;21619:45;:::i;:::-;21606:58;;21507:163;;;:::o;21676:153::-;21745:9;21778:45;21817:5;21778:45;:::i;:::-;21765:58;;21676:153;;;:::o;21835:134::-;21893:9;21926:37;21957:5;21926:37;:::i;:::-;21913:50;;21835:134;;;:::o;21975:113::-;22025:9;22058:24;22076:5;22058:24;:::i;:::-;22045:37;;21975:113;;;:::o;22094:307::-;22162:1;22172:113;22186:6;22183:1;22180:13;22172:113;;;22271:1;22266:3;22262:11;22256:18;22252:1;22247:3;22243:11;22236:39;22208:2;22205:1;22201:10;22196:15;;22172:113;;;22303:6;22300:1;22297:13;22294:101;;;22383:1;22374:6;22369:3;22365:16;22358:27;22294:101;22143:258;22094:307;;;:::o;22407:171::-;22446:3;22469:24;22487:5;22469:24;:::i;:::-;22460:33;;22515:4;22508:5;22505:15;22502:41;;;22523:18;;:::i;:::-;22502:41;22570:1;22563:5;22559:13;22552:20;;22407:171;;;:::o;22584:180::-;22632:77;22629:1;22622:88;22729:4;22726:1;22719:15;22753:4;22750:1;22743:15;22770:180;22818:77;22815:1;22808:88;22915:4;22912:1;22905:15;22939:4;22936:1;22929:15;22956:180;23004:77;23001:1;22994:88;23101:4;23098:1;23091:15;23125:4;23122:1;23115:15;23265:117;23374:1;23371;23364:12;23388:102;23429:6;23480:2;23476:7;23471:2;23464:5;23460:14;23456:28;23446:38;;23388:102;;;:::o;23496:182::-;23636:34;23632:1;23624:6;23620:14;23613:58;23496:182;:::o;23684:170::-;23824:22;23820:1;23812:6;23808:14;23801:46;23684:170;:::o;23860:225::-;24000:34;23996:1;23988:6;23984:14;23977:58;24069:8;24064:2;24056:6;24052:15;24045:33;23860:225;:::o;24091:176::-;24231:28;24227:1;24219:6;24215:14;24208:52;24091:176;:::o;24273:166::-;24413:18;24409:1;24401:6;24397:14;24390:42;24273:166;:::o;24445:221::-;24585:34;24581:1;24573:6;24569:14;24562:58;24654:4;24649:2;24641:6;24637:15;24630:29;24445:221;:::o;24672:114::-;;:::o;24792:179::-;24932:31;24928:1;24920:6;24916:14;24909:55;24792:179;:::o;24977:173::-;25117:25;25113:1;25105:6;25101:14;25094:49;24977:173;:::o;25156:229::-;25296:34;25292:1;25284:6;25280:14;25273:58;25365:12;25360:2;25352:6;25348:15;25341:37;25156:229;:::o;25391:181::-;25531:33;25527:1;25519:6;25515:14;25508:57;25391:181;:::o;25578:167::-;25718:19;25714:1;25706:6;25702:14;25695:43;25578:167;:::o;25751:234::-;25891:34;25887:1;25879:6;25875:14;25868:58;25960:17;25955:2;25947:6;25943:15;25936:42;25751:234;:::o;25991:122::-;26064:24;26082:5;26064:24;:::i;:::-;26057:5;26054:35;26044:63;;26103:1;26100;26093:12;26044:63;25991:122;:::o;26119:116::-;26189:21;26204:5;26189:21;:::i;:::-;26182:5;26179:32;26169:60;;26225:1;26222;26215:12;26169:60;26119:116;:::o;26241:122::-;26314:24;26332:5;26314:24;:::i;:::-;26307:5;26304:35;26294:63;;26353:1;26350;26343:12;26294:63;26241:122;:::o;26369:120::-;26441:23;26458:5;26441:23;:::i;:::-;26434:5;26431:34;26421:62;;26479:1;26476;26469:12;26421:62;26369:120;:::o;26495:122::-;26568:24;26586:5;26568:24;:::i;:::-;26561:5;26558:35;26548:63;;26607:1;26604;26597:12;26548:63;26495:122;:::o

Swarm Source

ipfs://e1901873e38658bacbb8460752ef1037e0e9184639c158d18b199226f473b7d6
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.