Sonic Blaze Testnet

Contract

0xe8C98B1606203DDa861D85Ac731c722BcBc0fe63

Overview

S Balance

Sonic Blaze LogoSonic Blaze LogoSonic Blaze Logo0 S

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Create Payroll C...181535662025-02-05 17:30:005 days ago1738776600IN
0xe8C98B16...BcBc0fe63
0 S0.00296491.1
Create Payroll C...181529992025-02-05 17:26:355 days ago1738776395IN
0xe8C98B16...BcBc0fe63
0 S0.002170051.1
Create Payroll C...181527852025-02-05 17:25:195 days ago1738776319IN
0xe8C98B16...BcBc0fe63
0 S0.002170051.1
Create Payroll C...181510942025-02-05 17:15:225 days ago1738775722IN
0xe8C98B16...BcBc0fe63
0 S0.000243291.1
Create Payroll C...181509042025-02-05 17:14:155 days ago1738775655IN
0xe8C98B16...BcBc0fe63
0 S0.000243291.1
Create Payroll C...181506162025-02-05 17:12:335 days ago1738775553IN
0xe8C98B16...BcBc0fe63
0 S0.000243291.1
Create Payroll C...181502172025-02-05 17:10:155 days ago1738775415IN
0xe8C98B16...BcBc0fe63
0 S0.000243291.1
Approve Employer181492752025-02-05 17:04:335 days ago1738775073IN
0xe8C98B16...BcBc0fe63
0 S0.00026741.1
Create Payroll C...180868552025-02-05 11:00:595 days ago1738753259IN
0xe8C98B16...BcBc0fe63
0 S0.000243291.1
Create Payroll C...180828002025-02-05 10:37:255 days ago1738751845IN
0xe8C98B16...BcBc0fe63
0 S0.000243291.1

Latest 7 internal transactions

Parent Transaction Hash Block From To
181535662025-02-05 17:30:005 days ago1738776600
0xe8C98B16...BcBc0fe63
0 S
181535662025-02-05 17:30:005 days ago1738776600
0xe8C98B16...BcBc0fe63
0 S
181535662025-02-05 17:30:005 days ago1738776600
0xe8C98B16...BcBc0fe63
0 S
181535662025-02-05 17:30:005 days ago1738776600
0xe8C98B16...BcBc0fe63
0 S
181535662025-02-05 17:30:005 days ago1738776600
0xe8C98B16...BcBc0fe63
 Contract Creation0 S
181529992025-02-05 17:26:355 days ago1738776395
0xe8C98B16...BcBc0fe63
 Contract Creation0 S
181527852025-02-05 17:25:195 days ago1738776319
0xe8C98B16...BcBc0fe63
 Contract Creation0 S
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PayrollFactory

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : PayrollFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {PayrollManagement} from "./PayrollManagement.sol";

contract PayrollFactory is AccessControl {
    // Custom errors
    error PayrollExists(); // Thrown when a payroll contract already exists for an employer
    error InvalidAddress(); // Thrown when an invalid address is provided
    error PayrollNotFound(); // Thrown when no payroll contract is found for an employer
    error NotApprovedEmployer(); // Thrown when an employer is not approved by the admin
    error InvalidPayrollContract(); // Thrown when an invalid payroll contract address is provided

    // Roles
    bytes32 public constant FACTORY_ADMIN = keccak256("FACTORY_ADMIN"); // Role for factory admin

    // State variables
    mapping(address => address) public employerToPayrollContract; // employer => payroll contract address
    mapping(address => bool) public isPayrollContract; // contract address => whether it is a payroll contract
    mapping(address => bool) public approvedEmployers; // employer => whether they are approved by the admin
    address public immutable usdcToken; // USDC token address

    // Events
    event PayrollContractCreated(
        address indexed employer, 
        address indexed payrollContract
    ); // Emitted when a new payroll contract is created
    event EmployerApproved(address indexed employer); // Emitted when an employer is approved by the admin
    event AIAgentRoleGranted(address indexed payrollContract, address indexed aiAgent); // Emitted when AI_AGENT_ROLE is granted
    event PayrollContractPaused(address indexed payrollContract); // Emitted when a payroll contract is paused
    event PayrollContractUnpaused(address indexed payrollContract); // Emitted when a payroll contract is unpaused

    /**
     * @dev Constructor to initialize the factory.
     * @param _usdcToken Address of the USDC token contract.
     */
    constructor(address _usdcToken) {
        if (_usdcToken == address(0)) revert InvalidAddress(); // Ensure USDC token address is valid

        // Grant roles to the deployer
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(FACTORY_ADMIN, msg.sender);

        usdcToken = _usdcToken; // Initialize USDC token address
    }

    /**
     * @dev Approves an employer to deploy their payroll contract.
     * @param _employer Address of the employer to approve.
     */
    function approveEmployer(address _employer) external onlyRole(FACTORY_ADMIN) {
        if (_employer == address(0)) revert InvalidAddress(); // Ensure employer address is valid
        approvedEmployers[_employer] = true; // Approve the employer
        emit EmployerApproved(_employer); // Emit event
    }

    /**
    * @dev Deploys a new PayrollManagement contract for an employer.
    * @return address The address of the deployed payroll contract.
    */
    function createPayrollContract() external returns (address) {
        // Checks
        if (!approvedEmployers[msg.sender]) revert NotApprovedEmployer();
        if (employerToPayrollContract[msg.sender] != address(0)) revert PayrollExists();

        // Effects
        PayrollManagement payrollContract = new PayrollManagement(usdcToken);
        address payrollAddress = address(payrollContract);
        
        employerToPayrollContract[msg.sender] = payrollAddress;
        isPayrollContract[payrollAddress] = true;

        // Events
        emit PayrollContractCreated(msg.sender, payrollAddress);

        // Interactions
        payrollContract.grantRole(payrollContract.ADMIN_ROLE(), address(this));
        payrollContract.grantRole(payrollContract.EMPLOYER_ROLE(), msg.sender);

        return payrollAddress;
    }


    /**
    * @dev Grants the AI_AGENT_ROLE to an address in a specific payroll contract.
    * @param _payrollContract Address of the payroll contract.
    * @param _aiAgent Address of the AI agent.
    */
    function grantAIAgentRole(address _payrollContract, address _aiAgent) external onlyRole(FACTORY_ADMIN) {
        // Checks
        if (_payrollContract == address(0) || _aiAgent == address(0)) revert InvalidAddress();
        if (!isPayrollContract[_payrollContract]) revert InvalidPayrollContract();

        // Events
        emit AIAgentRoleGranted(_payrollContract, _aiAgent);

        // Interactions
        PayrollManagement payrollContract = PayrollManagement(_payrollContract);
        payrollContract.grantRole(payrollContract.AI_AGENT_ROLE(), _aiAgent);
    }

    /**
     * @dev Retrieves the payroll contract address for a given employer.
     * @param _employer Address of the employer.
     * @return address The address of the payroll contract.
     */
    function getPayrollContract(address _employer) external view returns (address) {
        if (_employer == address(0)) revert InvalidAddress(); // Validate employer address
        address payrollAddress = employerToPayrollContract[_employer];
        if (payrollAddress == address(0)) revert PayrollNotFound(); // Ensure payroll contract exists
        return payrollAddress;
    }

    /**
     * @dev Checks if an address is a valid payroll contract.
     * @param _contract Address to verify.
     * @return bool True if the address is a valid payroll contract.
     */
    function isValidPayrollContract(address _contract) external view returns (bool) {
        return isPayrollContract[_contract]; // Return whether the address is a payroll contract
    }

    
    /**
    * @dev Pauses a payroll contract (only callable by the factory admin).
    * @param _payrollContract Address of the payroll contract to pause.
    */
    function pausePayrollContract(address _payrollContract) external onlyRole(FACTORY_ADMIN) {
        // Checks
        if (_payrollContract == address(0)) revert InvalidAddress();
        if (!isPayrollContract[_payrollContract]) revert InvalidPayrollContract();

        // Events
        emit PayrollContractPaused(_payrollContract);

        // Interactions
        PayrollManagement payrollContract = PayrollManagement(_payrollContract);
        payrollContract.pause();
    }

    /**
    * @dev Unpauses a payroll contract (only callable by the factory admin).
    * @param _payrollContract Address of the payroll contract to unpause.
    */
    function unpausePayrollContract(address _payrollContract) external onlyRole(FACTORY_ADMIN) {
        // Checks
        if (_payrollContract == address(0)) revert InvalidAddress();
        if (!isPayrollContract[_payrollContract]) revert InvalidPayrollContract();

        // Events
        emit PayrollContractUnpaused(_payrollContract);

        // Interactions
        PayrollManagement payrollContract = PayrollManagement(_payrollContract);
        payrollContract.unpause();
    }

    /**
     * @dev Retrieves the list of employees for a given employer.
     * @param _employer Address of the employer.
     * @return uint256[] Array of employee IDs.
     */
    function getEmployerEmployees(address _employer) external view returns (uint256[] memory) {
        if (_employer == address(0)) revert InvalidAddress(); // Validate employer address
        address payrollContract = employerToPayrollContract[_employer];
        if (payrollContract == address(0)) revert PayrollNotFound(); // Ensure payroll contract exists
        return PayrollManagement(payrollContract).getEmployerEmployees(_employer);
    }

    /**
    * @dev Retrieves details of a specific employee for a given employer.
    * @param _employer Address of the employer.
    * @param _employeeId ID of the employee.
    * @return employeeId Employee ID.
    * @return walletAddress Employee wallet address.
    * @return salary Employee salary.
    * @return joiningDate Employee joining date.
    * @return isActive Whether the employee is active.
    */
    function getEmployeeDetails(address _employer, uint256 _employeeId)
        external
        view
        returns (
            uint256 employeeId,
            address walletAddress,
            uint256 salary,
            uint256 joiningDate,
            bool isActive
        )
    {
        if (_employer == address(0)) revert InvalidAddress();
        address payrollContract = employerToPayrollContract[_employer];
        if (payrollContract == address(0)) revert PayrollNotFound();
        
        (employeeId, walletAddress, salary, joiningDate, isActive) = 
            PayrollManagement(payrollContract).getEmployeeDetails(_employer, _employeeId);
    }


    /**
     * @dev Retrieves the balance of a given employer.
     * @param _employer Address of the employer.
     * @return uint256 Employer's balance.
     */
    function getEmployerBalance(address _employer) external view returns (uint256) {
        if (_employer == address(0)) revert InvalidAddress(); // Validate employer address
        address payrollContract = employerToPayrollContract[_employer];
        if (payrollContract == address(0)) revert PayrollNotFound(); // Ensure payroll contract exists
        return PayrollManagement(payrollContract).getEmployerBalance(_employer);
    }
}

File 2 of 13 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * 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}:
 *
 * ```solidity
 * 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. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    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 returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @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 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.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual 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.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual 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 `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @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 Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 3 of 13 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC-165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @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.
     */
    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. This account bears the admin role (for the granted role).
     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
     */
    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 `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

File 4 of 13 : IERC1363.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 5 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 6 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

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

File 7 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 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 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

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

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

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

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

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

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

File 9 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

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

File 10 of 13 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC-165 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);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 11 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * 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[ERC 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 12 of 13 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @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 {
    bool private _paused;

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

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

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

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @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 13 of 13 : PayrollManagement.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

contract PayrollManagement is AccessControl, Pausable {
    using SafeERC20 for IERC20;

    // Custom errors
    error InvalidAddress(); // Thrown when an invalid address is provided
    error EmployeeAlreadyExists(); // Thrown when an employee already exists
    error EmployeeNotFound(); // Thrown when an employee is not found
    error UnauthorizedAccess(); // Thrown when unauthorized access is attempted
    error InvalidPayrollCycle(); // Thrown when an invalid payroll cycle is provided
    error InsufficientBalance(); // Thrown when there are insufficient funds
    error TransferFailed(); // Thrown when a token transfer fails
    error PayrollAlreadyProcessed(); // Thrown when payroll is already processed
    error ZeroAmount(); // Thrown when a zero amount is provided

    // Roles
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); // Role for admin
    bytes32 public constant EMPLOYER_ROLE = keccak256("EMPLOYER_ROLE"); // Role for employer
    bytes32 public constant AI_AGENT_ROLE = keccak256("AI_AGENT_ROLE"); // Role for AI agent

    // Immutable USDC token contract
    IERC20 public immutable usdcToken;

    // Structs
    struct Employee {
        uint256 employeeId; // Unique ID for the employee
        address walletAddress; // Employee's wallet address
        uint256 salary; // Monthly salary in USDC (6 decimals)
        uint256 joiningDate; // Date when the employee joined
        bool isActive; // Whether the employee is active
    }

    struct PayrollCycle {
        uint256 cycleId; // Unique ID for the payroll cycle
        uint256 startDate; // Start date of the payroll cycle
        uint256 endDate; // End date of the payroll cycle
        bool isProcessed; // Whether the payroll cycle has been processed
    }

    // State variables
    mapping(address => mapping(uint256 => Employee)) public employeesByEmployer; // employer => employeeId => Employee
    mapping(address => uint256[]) public employerEmployees; // employer => employeeIds[]
    mapping(address => mapping(uint256 => PayrollCycle[])) public employeePayrollCycles; // employer => employeeId => PayrollCycle[]
    mapping(address => uint256) public employeeCounter; // employer => counter for employee IDs
    mapping(address => uint256) public employerBalances; // employer => deposited funds

    // Events
    event EmployeeAdded(address indexed employer, uint256 indexed employeeId, address walletAddress); // Emitted when an employee is added
    event EmployeeUpdated(address indexed employer, uint256 indexed employeeId); // Emitted when an employee is updated
    event EmployeeDeactivated(address indexed employer, uint256 indexed employeeId); // Emitted when an employee is deactivated
    event PayrollCycleCreated(address indexed employer, uint256 indexed employeeId, uint256 cycleId, uint256 startDate, uint256 endDate); // Emitted when a payroll cycle is created
    event SalaryPaid(address indexed employer, uint256 indexed employeeId, uint256 amount); // Emitted when salary is paid
    event FundsAdded(address indexed employer, uint256 amount); // Emitted when funds are added

    // Constructor
    constructor(address _usdcToken) {
        if (_usdcToken == address(0)) revert InvalidAddress(); // Ensure USDC token address is valid
        usdcToken = IERC20(_usdcToken); // Initialize USDC token
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); // Grant admin role to the deployer
    }

    // Modifiers
    modifier onlyEmployerOf(uint256 _employeeId) {
        if (employeesByEmployer[msg.sender][_employeeId].walletAddress == address(0)) 
            revert EmployeeNotFound(); // Ensure the employee exists under the employer
        _;
    }

    // Functions

    /**
     * @dev Adds a new employee for the employer.
     * @param _walletAddress The wallet address of the employee.
     * @param _salary The monthly salary of the employee in USDC.
     * @return The ID of the newly added employee.
     */
    function addEmployee(
        address _walletAddress,
        uint256 _salary
    ) external onlyRole(EMPLOYER_ROLE) returns (uint256) {
        if (_walletAddress == address(0)) revert InvalidAddress(); // Ensure wallet address is valid
        
        uint256 newEmployeeId = ++employeeCounter[msg.sender]; // Increment employee counter
        
        // Create a new employee
        Employee storage newEmployee = employeesByEmployer[msg.sender][newEmployeeId];
        newEmployee.employeeId = newEmployeeId;
        newEmployee.walletAddress = _walletAddress;
        newEmployee.salary = _salary;
        newEmployee.joiningDate = block.timestamp;
        newEmployee.isActive = true;

        // Add employee ID to the employer's list
        employerEmployees[msg.sender].push(newEmployeeId);
        
        emit EmployeeAdded(msg.sender, newEmployeeId, _walletAddress); // Emit event
        return newEmployeeId;
    }

    /**
     * @dev Creates a new payroll cycle for an employee.
     * @param _employeeId The ID of the employee.
     * @param _startDate The start date of the payroll cycle.
     * @param _endDate The end date of the payroll cycle.
     */
    function createPayrollCycle(
    uint256 _employeeId,
    uint256 _startDate,
    uint256 _endDate
    ) external onlyRole(EMPLOYER_ROLE) onlyEmployerOf(_employeeId) {
        // Check if employee is active
        Employee storage employee = employeesByEmployer[msg.sender][_employeeId];
        if (!employee.isActive) revert EmployeeNotFound();

        // Validate cycle dates
        if (_startDate >= _endDate) revert InvalidPayrollCycle();

        PayrollCycle[] storage cycles = employeePayrollCycles[msg.sender][_employeeId];
        uint256 cycleId = cycles.length;

        // Add the new payroll cycle
        cycles.push(PayrollCycle({
            cycleId: cycleId,
            startDate: _startDate,
            endDate: _endDate,
            isProcessed: false
        }));

        emit PayrollCycleCreated(msg.sender, _employeeId, cycleId, _startDate, _endDate);
    }


    /**
     * @dev Processes payroll for an employee in a specific cycle.
     * @param _employeeId The ID of the employee.
     * @param _cycleId The ID of the payroll cycle.
     */
    function processPayroll(
        uint256 _employeeId, 
        uint256 _cycleId
    ) external onlyRole(EMPLOYER_ROLE) onlyEmployerOf(_employeeId) whenNotPaused {
        Employee storage employee = employeesByEmployer[msg.sender][_employeeId];
        if (!employee.isActive) revert EmployeeNotFound(); // Ensure employee is active

        PayrollCycle storage cycle = employeePayrollCycles[msg.sender][_employeeId][_cycleId];
        if (cycle.isProcessed) revert PayrollAlreadyProcessed(); // Ensure payroll is not already processed
        if (block.timestamp < cycle.startDate || block.timestamp > cycle.endDate) 
            revert InvalidPayrollCycle(); // Ensure current time is within the payroll cycle

        uint256 salaryAmount = employee.salary;
        if (employerBalances[msg.sender] < salaryAmount) 
            revert InsufficientBalance(); // Ensure sufficient balance

        // Mark payroll as processed and deduct salary from employer's balance
        cycle.isProcessed = true;
        employerBalances[msg.sender] -= salaryAmount;
        
        // Transfer salary to employee
        usdcToken.safeTransfer(employee.walletAddress, salaryAmount);

        emit SalaryPaid(msg.sender, _employeeId, salaryAmount); // Emit event
    }

    /**
    * @dev Adds funds to the employer's balance.
    * @param _amount The amount of USDC to add.
    */
    function addFunds(uint256 _amount) external onlyRole(EMPLOYER_ROLE) {
        if (_amount == 0) revert ZeroAmount(); // Ensure amount is not zero
        
        // Check if contract has sufficient allowance
        uint256 allowance = usdcToken.allowance(msg.sender, address(this));
        if (allowance < _amount) revert("Insufficient allowance");
        
        // Transfer USDC to contract
        usdcToken.safeTransferFrom(msg.sender, address(this), _amount);
        
        // Update employer's balance
        employerBalances[msg.sender] += _amount;
        
        emit FundsAdded(msg.sender, _amount);
    }
    /**
     * @dev Deactivates an employee.
     * @param _employeeId The ID of the employee.
     */
    function deactivateEmployee(uint256 _employeeId) 
        external 
        onlyRole(EMPLOYER_ROLE) 
        onlyEmployerOf(_employeeId) 
    {
        employeesByEmployer[msg.sender][_employeeId].isActive = false; // Deactivate employee
        emit EmployeeDeactivated(msg.sender, _employeeId); // Emit event
    }

    /**
     * @dev Pauses the contract (admin only).
     */
    function pause() external onlyRole(ADMIN_ROLE) {
        _pause();
    }
    
    /**
     * @dev Unpauses the contract (admin only).
     */
    function unpause() external onlyRole(ADMIN_ROLE) {
        _unpause();
    }

    /**
     * @dev Allows the AI agent to process payroll.
     * @param _employer Address of the employer.
     * @param _employeeId The ID of the employee.
     * @param _cycleId The ID of the payroll cycle.
     */
    function processPayrollAsAI(
        address _employer,
        uint256 _employeeId, 
        uint256 _cycleId
    ) external onlyRole(AI_AGENT_ROLE) whenNotPaused {
        Employee storage employee = employeesByEmployer[_employer][_employeeId];
        if (!employee.isActive) revert EmployeeNotFound(); // Ensure employee is active

        PayrollCycle storage cycle = employeePayrollCycles[_employer][_employeeId][_cycleId];
        if (cycle.isProcessed) revert PayrollAlreadyProcessed(); // Ensure payroll is not already processed
        if (block.timestamp < cycle.startDate || block.timestamp > cycle.endDate) 
            revert InvalidPayrollCycle(); // Ensure current time is within the payroll cycle

        uint256 salaryAmount = employee.salary;
        if (employerBalances[_employer] < salaryAmount) 
            revert InsufficientBalance(); // Ensure sufficient balance

        // Mark payroll as processed and deduct salary from employer's balance
        cycle.isProcessed = true;
        employerBalances[_employer] -= salaryAmount;
        
        // Transfer salary to employee
        usdcToken.safeTransfer(employee.walletAddress, salaryAmount);

        emit SalaryPaid(_employer, _employeeId, salaryAmount); // Emit event
    }

    /**
     * @dev Returns the employer's current balance stored in the contract.
     * @param _employer The address of the employer.
     * @return The employer's USDC balance.
     */
    function getEmployerBalance(address _employer) external view returns (uint256) {
        return employerBalances[_employer];
    }

    /**
     * @dev Returns the list of employee IDs for a given employer.
     * @param _employer The address of the employer.
     * @return An array of employee IDs.
     */
    function getEmployerEmployees(address _employer) external view returns (uint256[] memory) {
        return employerEmployees[_employer];
    }

    /**
     * @dev Returns detailed information for a given employee.
     * @param _employer The address of the employer.
     * @param _employeeId The ID of the employee.
     * @return employeeId The employee's ID.
     * @return walletAddress The employee's wallet address.
     * @return salary The employee's salary in USDC.
     * @return joiningDate The timestamp when the employee joined.
     * @return isActive Whether the employee is currently active.
     */
    function getEmployeeDetails(address _employer, uint256 _employeeId)
        external
        view
        returns (
            uint256 employeeId,
            address walletAddress,
            uint256 salary,
            uint256 joiningDate,
            bool isActive
        )
    {
        Employee memory emp = employeesByEmployer[_employer][_employeeId];
        return (emp.employeeId, emp.walletAddress, emp.salary, emp.joiningDate, emp.isActive);
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_usdcToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidPayrollContract","type":"error"},{"inputs":[],"name":"NotApprovedEmployer","type":"error"},{"inputs":[],"name":"PayrollExists","type":"error"},{"inputs":[],"name":"PayrollNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payrollContract","type":"address"},{"indexed":true,"internalType":"address","name":"aiAgent","type":"address"}],"name":"AIAgentRoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"employer","type":"address"}],"name":"EmployerApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"employer","type":"address"},{"indexed":true,"internalType":"address","name":"payrollContract","type":"address"}],"name":"PayrollContractCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payrollContract","type":"address"}],"name":"PayrollContractPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payrollContract","type":"address"}],"name":"PayrollContractUnpaused","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"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FACTORY_ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_employer","type":"address"}],"name":"approveEmployer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedEmployers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"createPayrollContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"employerToPayrollContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_employer","type":"address"},{"internalType":"uint256","name":"_employeeId","type":"uint256"}],"name":"getEmployeeDetails","outputs":[{"internalType":"uint256","name":"employeeId","type":"uint256"},{"internalType":"address","name":"walletAddress","type":"address"},{"internalType":"uint256","name":"salary","type":"uint256"},{"internalType":"uint256","name":"joiningDate","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_employer","type":"address"}],"name":"getEmployerBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_employer","type":"address"}],"name":"getEmployerEmployees","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_employer","type":"address"}],"name":"getPayrollContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_payrollContract","type":"address"},{"internalType":"address","name":"_aiAgent","type":"address"}],"name":"grantAIAgentRole","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"","type":"address"}],"name":"isPayrollContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"isValidPayrollContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_payrollContract","type":"address"}],"name":"pausePayrollContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","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":[{"internalType":"address","name":"_payrollContract","type":"address"}],"name":"unpausePayrollContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdcToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b506040516156bb3803806156bb833981810160405281019061003291906102e9565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610098576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100ab6000801b3361011760201b60201c565b506100dc7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f63361011760201b60201c565b508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505050610316565b6000610129838361021460201b60201c565b61020957600160008085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506101a661027e60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001905061020e565b600090505b92915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102b68261028b565b9050919050565b6102c6816102ab565b81146102d157600080fd5b50565b6000815190506102e3816102bd565b92915050565b6000602082840312156102ff576102fe610286565b5b600061030d848285016102d4565b91505092915050565b608051615383610338600039600081816106d30152610f2501526153836000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806391d14854116100b8578063d80effca1161007c578063d80effca146103c1578063e751b5b4146103f1578063ec2557461461040f578063ed332bf01461042b578063f26d55f71461045f578063fd9139a31461047b57610142565b806391d14854146102f7578063a217fddf14610327578063c9ac5d1f14610345578063cd3dc1b814610375578063d547741f146103a557610142565b80632e9db8d71161010a5780632e9db8d7146101ff5780632f2ff15d1461022f57806336568abe1461024b57806371a4a62e14610267578063754e884e146102975780637aeccdfe146102c757610142565b806301ffc9a71461014757806308d0eb341461017757806311eac85514610193578063248a9ca3146101b157806328a854e6146101e1575b600080fd5b610161600480360381019061015c9190611ceb565b610497565b60405161016e9190611d33565b60405180910390f35b610191600480360381019061018c9190611dac565b610511565b005b61019b6106d1565b6040516101a89190611de8565b60405180910390f35b6101cb60048036038101906101c69190611e39565b6106f5565b6040516101d89190611e75565b60405180910390f35b6101e9610714565b6040516101f69190611e75565b60405180910390f35b61021960048036038101906102149190611dac565b610738565b6040516102269190611ea9565b60405180910390f35b61024960048036038101906102449190611ec4565b6108eb565b005b61026560048036038101906102609190611ec4565b61090d565b005b610281600480360381019061027c9190611dac565b610988565b60405161028e9190611d33565b60405180910390f35b6102b160048036038101906102ac9190611dac565b6109de565b6040516102be9190611d33565b60405180910390f35b6102e160048036038101906102dc9190611dac565b6109fe565b6040516102ee9190611de8565b60405180910390f35b610311600480360381019061030c9190611ec4565b610a31565b60405161031e9190611d33565b60405180910390f35b61032f610a9b565b60405161033c9190611e75565b60405180910390f35b61035f600480360381019061035a9190611dac565b610aa2565b60405161036c9190611fc2565b60405180910390f35b61038f600480360381019061038a9190611dac565b610c5b565b60405161039c9190611de8565b60405180910390f35b6103bf60048036038101906103ba9190611ec4565b610d95565b005b6103db60048036038101906103d69190611dac565b610db7565b6040516103e89190611d33565b60405180910390f35b6103f9610dd7565b6040516104069190611de8565b60405180910390f35b61042960048036038101906104249190611dac565b61126c565b005b61044560048036038101906104409190612010565b61139b565b604051610456959493929190612050565b60405180910390f35b610479600480360381019061047491906120a3565b61156d565b005b61049560048036038101906104909190611dac565b6117f8565b005b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061050a5750610509826119b8565b5b9050919050565b7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f661053b81611a22565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036105a1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610624576040517fb3b752eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f8386b23e7b5e56defef4896578831a4c8858978cfc3daa72ca9930769e021cb160405160405180910390a260008290508073ffffffffffffffffffffffffffffffffffffffff16638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156106b457600080fd5b505af11580156106c8573d6000803e3d6000fd5b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000838152602001908152602001600020600101549050919050565b7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f681565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361079f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610869576040517fefdccc2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16632e9db8d7846040518263ffffffff1660e01b81526004016108a29190611de8565b602060405180830381865afa1580156108bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e391906120f8565b915050919050565b6108f4826106f5565b6108fd81611a22565b6109078383611a36565b50505050565b610915611b27565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610979576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109838282611b2f565b505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b81565b6060600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b0a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610bd4576040517fefdccc2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1663c9ac5d1f846040518263ffffffff1660e01b8152600401610c0d9190611de8565b600060405180830381865afa158015610c2a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610c53919061227e565b915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610cc2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d8c576040517fefdccc2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b610d9e826106f5565b610da781611a22565b610db18383611b2f565b50505050565b60036020528060005260406000206000915054906101000a900460ff1681565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610e5c576040517fcf11a12100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f21576040517fe483a08700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f0000000000000000000000000000000000000000000000000000000000000000604051610f5090611c72565b610f5a9190611de8565b604051809103906000f080158015610f76573d6000803e3d6000fd5b509050600081905080600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe6b90854f2f854b3d6bd3a78791efaf8f5c4b16e72adee672b2495d5171ea97f60405160405180910390a38173ffffffffffffffffffffffffffffffffffffffff16632f2ff15d8373ffffffffffffffffffffffffffffffffffffffff166375b238fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611115573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113991906122dc565b306040518363ffffffff1660e01b8152600401611157929190612309565b600060405180830381600087803b15801561117157600080fd5b505af1158015611185573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff16632f2ff15d8373ffffffffffffffffffffffffffffffffffffffff16632426bb386040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121491906122dc565b336040518363ffffffff1660e01b8152600401611232929190612309565b600060405180830381600087803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b50505050809250505090565b7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f661129681611a22565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036112fc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f0d884eb0b7cbf3f44571b21ba60ea7df041f15b92935f82ff78c00e1ea376c6560405160405180910390a25050565b60008060008060008073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1603611408576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036114d2576040517fefdccc2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1663ed332bf089896040518363ffffffff1660e01b815260040161150d929190612332565b60a060405180830381865afa15801561152a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154e919061239c565b809650819750829850839950849a505050505050509295509295909350565b7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f661159781611a22565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806115fe5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15611635576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166116b8576040517fb3b752eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167feabd3b45e0004ece10559102bfc26fdbd57a4201accc3bc1de60627362f5489d60405160405180910390a360008390508073ffffffffffffffffffffffffffffffffffffffff16632f2ff15d8273ffffffffffffffffffffffffffffffffffffffff166325b8e7eb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561177e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a291906122dc565b856040518363ffffffff1660e01b81526004016117c0929190612309565b600060405180830381600087803b1580156117da57600080fd5b505af11580156117ee573d6000803e3d6000fd5b5050505050505050565b7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f661182281611a22565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611888576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661190b576040517fb3b752eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167fad335d75fc1702677f623fbb30a0148eea2fda954bfcaf97a05353d72b641f1a60405160405180910390a260008290508073ffffffffffffffffffffffffffffffffffffffff16633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561199b57600080fd5b505af11580156119af573d6000803e3d6000fd5b50505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611a3381611a2e611b27565b611c21565b50565b6000611a428383610a31565b611b1c57600160008085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611ab9611b27565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050611b21565b600090505b92915050565b600033905090565b6000611b3b8383610a31565b15611c1657600080600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611bb3611b27565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050611c1b565b600090505b92915050565b611c2b8282610a31565b611c6e5780826040517fe2517d3f000000000000000000000000000000000000000000000000000000008152600401611c65929190612417565b60405180910390fd5b5050565b612f0d8061244183390190565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611cc881611c93565b8114611cd357600080fd5b50565b600081359050611ce581611cbf565b92915050565b600060208284031215611d0157611d00611c89565b5b6000611d0f84828501611cd6565b91505092915050565b60008115159050919050565b611d2d81611d18565b82525050565b6000602082019050611d486000830184611d24565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d7982611d4e565b9050919050565b611d8981611d6e565b8114611d9457600080fd5b50565b600081359050611da681611d80565b92915050565b600060208284031215611dc257611dc1611c89565b5b6000611dd084828501611d97565b91505092915050565b611de281611d6e565b82525050565b6000602082019050611dfd6000830184611dd9565b92915050565b6000819050919050565b611e1681611e03565b8114611e2157600080fd5b50565b600081359050611e3381611e0d565b92915050565b600060208284031215611e4f57611e4e611c89565b5b6000611e5d84828501611e24565b91505092915050565b611e6f81611e03565b82525050565b6000602082019050611e8a6000830184611e66565b92915050565b6000819050919050565b611ea381611e90565b82525050565b6000602082019050611ebe6000830184611e9a565b92915050565b60008060408385031215611edb57611eda611c89565b5b6000611ee985828601611e24565b9250506020611efa85828601611d97565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611f3981611e90565b82525050565b6000611f4b8383611f30565b60208301905092915050565b6000602082019050919050565b6000611f6f82611f04565b611f798185611f0f565b9350611f8483611f20565b8060005b83811015611fb5578151611f9c8882611f3f565b9750611fa783611f57565b925050600181019050611f88565b5085935050505092915050565b60006020820190508181036000830152611fdc8184611f64565b905092915050565b611fed81611e90565b8114611ff857600080fd5b50565b60008135905061200a81611fe4565b92915050565b6000806040838503121561202757612026611c89565b5b600061203585828601611d97565b925050602061204685828601611ffb565b9150509250929050565b600060a0820190506120656000830188611e9a565b6120726020830187611dd9565b61207f6040830186611e9a565b61208c6060830185611e9a565b6120996080830184611d24565b9695505050505050565b600080604083850312156120ba576120b9611c89565b5b60006120c885828601611d97565b92505060206120d985828601611d97565b9150509250929050565b6000815190506120f281611fe4565b92915050565b60006020828403121561210e5761210d611c89565b5b600061211c848285016120e3565b91505092915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6121738261212a565b810181811067ffffffffffffffff821117156121925761219161213b565b5b80604052505050565b60006121a5611c7f565b90506121b1828261216a565b919050565b600067ffffffffffffffff8211156121d1576121d061213b565b5b602082029050602081019050919050565b600080fd5b60006121fa6121f5846121b6565b61219b565b9050808382526020820190506020840283018581111561221d5761221c6121e2565b5b835b81811015612246578061223288826120e3565b84526020840193505060208101905061221f565b5050509392505050565b600082601f83011261226557612264612125565b5b81516122758482602086016121e7565b91505092915050565b60006020828403121561229457612293611c89565b5b600082015167ffffffffffffffff8111156122b2576122b1611c8e565b5b6122be84828501612250565b91505092915050565b6000815190506122d681611e0d565b92915050565b6000602082840312156122f2576122f1611c89565b5b6000612300848285016122c7565b91505092915050565b600060408201905061231e6000830185611e66565b61232b6020830184611dd9565b9392505050565b60006040820190506123476000830185611dd9565b6123546020830184611e9a565b9392505050565b60008151905061236a81611d80565b92915050565b61237981611d18565b811461238457600080fd5b50565b60008151905061239681612370565b92915050565b600080600080600060a086880312156123b8576123b7611c89565b5b60006123c6888289016120e3565b95505060206123d78882890161235b565b94505060406123e8888289016120e3565b93505060606123f9888289016120e3565b925050608061240a88828901612387565b9150509295509295909350565b600060408201905061242c6000830185611dd9565b6124396020830184611e66565b939250505056fe60a060405234801561001057600080fd5b50604051612f0d380380612f0d833981810160405281019061003291906102d3565b6000600160006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036100b3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506100fa6000801b3361010160201b60201c565b5050610300565b600061011383836101fe60201b60201c565b6101f357600160008085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061019061026860201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4600190506101f8565b600090505b92915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102a082610275565b9050919050565b6102b081610295565b81146102bb57600080fd5b50565b6000815190506102cd816102a7565b92915050565b6000602082840312156102e9576102e8610270565b5b60006102f7848285016102be565b91505092915050565b608051612bd66103376000396000818161063801528181610aeb015281816110e0015281816111c70152611ada0152612bd66000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806375b238fc116100f9578063c9ac5d1f11610097578063ed332bf011610071578063ed332bf014610520578063f3f265de14610554578063f91575f014610570578063fa85b26a1461058c576101c4565b8063c9ac5d1f146104a4578063d547741f146104d4578063e7fd9a13146104f0576101c4565b806391d14854116100d357806391d148541461041e578063a217fddf1461044e578063ad76d7661461046c578063be99970514610488576101c4565b806375b238fc146103c65780638456cb59146103e457806385e06e08146103ee576101c4565b80632f2ff15d1161016657806340804deb1161014057806340804deb14610325578063509f2868146103415780635c975abb146103745780636f4e5f3f14610392576101c4565b80632f2ff15d146102e357806336568abe146102ff5780633f4ba83a1461031b576101c4565b8063248a9ca3116101a2578063248a9ca31461023557806325b8e7eb146102655780632e9db8d7146102835780632f2909f3146102b3576101c4565b806301ffc9a7146101c957806311eac855146101f95780632426bb3814610217575b600080fd5b6101e360048036038101906101de9190612360565b6105bc565b6040516101f091906123a8565b60405180910390f35b610201610636565b60405161020e9190612442565b60405180910390f35b61021f61065a565b60405161022c9190612476565b60405180910390f35b61024f600480360381019061024a91906124bd565b61067e565b60405161025c9190612476565b60405180910390f35b61026d61069d565b60405161027a9190612476565b60405180910390f35b61029d60048036038101906102989190612528565b6106c1565b6040516102aa919061256e565b60405180910390f35b6102cd60048036038101906102c89190612528565b61070a565b6040516102da919061256e565b60405180910390f35b6102fd60048036038101906102f89190612589565b610722565b005b61031960048036038101906103149190612589565b610744565b005b6103236107bf565b005b61033f600480360381019061033a91906125f5565b6107f4565b005b61035b600480360381019061035691906125f5565b610b87565b60405161036b9493929190612648565b60405180910390f35b61037c610bee565b60405161038991906123a8565b60405180910390f35b6103ac60048036038101906103a7919061268d565b610c05565b6040516103bd9594939291906126dc565b60405180910390f35b6103ce610c75565b6040516103db9190612476565b60405180910390f35b6103ec610c99565b005b61040860048036038101906104039190612528565b610cce565b604051610415919061256e565b60405180910390f35b61043860048036038101906104339190612589565b610ce6565b60405161044591906123a8565b60405180910390f35b610456610d50565b6040516104639190612476565b60405180910390f35b6104866004803603810190610481919061272f565b610d57565b005b6104a2600480360381019061049d9190612782565b611078565b005b6104be60048036038101906104b99190612528565b6112b5565b6040516104cb919061286d565b60405180910390f35b6104ee60048036038101906104e99190612589565b61134c565b005b61050a6004803603810190610505919061268d565b61136e565b604051610517919061256e565b60405180910390f35b61053a6004803603810190610535919061268d565b6115e6565b60405161054b9594939291906126dc565b60405180910390f35b61056e6004803603810190610569919061288f565b611709565b005b61058a60048036038101906105859190612782565b611b76565b005b6105a660048036038101906105a1919061268d565b611d2f565b6040516105b3919061256e565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061062f575061062e82611d60565b5b9050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c83581565b6000806000838152602001908152602001600020600101549050919050565b7ffaa623ff490ff9197b5ad863cd7f72b33e2e131994d09bd7260d7cd680faad7981565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60066020528060005260406000206000915090505481565b61072b8261067e565b61073481611dca565b61073e8383611dde565b50505050565b61074c611ecf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107b0576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107ba8282611ed7565b505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107e981611dca565b6107f1611fc9565b50565b7ffaa623ff490ff9197b5ad863cd7f72b33e2e131994d09bd7260d7cd680faad7961081e81611dca565b61082661202c565b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002090508060040160009054906101000a900460ff166108c2576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008681526020019081526020016000208481548110610926576109256128cf565b5b906000526020600020906004020190508060030160009054906101000a900460ff161561097f576040517fea041f1e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600101544210806109945750806002015442115b156109cb576040517f4fe2f5b900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008260020154905080600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610a4d576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018260030160006101000a81548160ff02191690831515021790555080600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ab9919061292d565b92505081905550610b2f8360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661206d9092919063ffffffff16565b858773ffffffffffffffffffffffffffffffffffffffff167fe6784566ea810f71a9cd63f82925ef440935e26c9e28e52a099a00ff7af3bec883604051610b76919061256e565b60405180910390a350505050505050565b60046020528260005260406000206020528160005260406000208181548110610baf57600080fd5b906000526020600020906004020160009250925050508060000154908060010154908060020154908060030160009054906101000a900460ff16905084565b6000600160009054906101000a900460ff16905090565b6002602052816000526040600020602052806000526040600020600091509150508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040160009054906101000a900460ff16905085565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610cc381611dca565b610ccb6120ec565b50565b60056020528060005260406000206000915090505481565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b81565b7ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c835610d8181611dca565b83600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610e5b576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600087815260200190815260200160002090508060040160009054906101000a900460ff16610ef7576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838510610f30576040517f4fe2f5b900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000888152602001908152602001600020905060008180549050905081604051806080016040528083815260200189815260200188815260200160001515815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055505050873373ffffffffffffffffffffffffffffffffffffffff167fd153b8ef43cb85b04d95d02215fc9f3a7f1cb8aad9e916299ac8cf0f3c69d323838a8a60405161106693929190612961565b60405180910390a35050505050505050565b7ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c8356110a281611dca565b600082036110dc576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b8152600401611139929190612998565b602060405180830381865afa158015611156573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117a91906129d6565b9050828110156111bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b690612a60565b60405180910390fd5b61120c3330857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661214e909392919063ffffffff16565b82600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461125b9190612a80565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167f8fe10ae416f22f5e5220b0018a6c1d4ff534d6aa3a471f2a20cb7747fe63e5b9846040516112a8919061256e565b60405180910390a2505050565b6060600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561134057602002820191906000526020600020905b81548152602001906001019080831161132c575b50505050509050919050565b6113558261067e565b61135e81611dca565b6113688383611ed7565b50505050565b60007ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c83561139a81611dca565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611400576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815461144e90612ab4565b91905081905590506000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000209050818160000181905550858160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084816002018190555042816003018190555060018160040160006101000a81548160ff021916908315150217905550600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020829080600181540180825580915050600190039060005260206000200160009091909190915055813373ffffffffffffffffffffffffffffffffffffffff167f660a2dcf876162ac968b6610cd2548fdb0e619e8296ef931e2ca1392e7fe1a4a886040516115d29190612afc565b60405180910390a381935050505092915050565b600080600080600080600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008881526020019081526020016000206040518060a0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff16151515158152505090508060000151816020015182604001518360600151846080015195509550955095509550509295509295909350565b7ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c83561173381611dca565b82600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361180d576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61181561202c565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086815260200190815260200160002090508060040160009054906101000a900460ff166118b1576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008781526020019081526020016000208581548110611915576119146128cf565b5b906000526020600020906004020190508060030160009054906101000a900460ff161561196e576040517fea041f1e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600101544210806119835750806002015442115b156119ba576040517f4fe2f5b900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008260020154905080600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611a3c576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018260030160006101000a81548160ff02191690831515021790555080600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611aa8919061292d565b92505081905550611b1e8360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661206d9092919063ffffffff16565b863373ffffffffffffffffffffffffffffffffffffffff167fe6784566ea810f71a9cd63f82925ef440935e26c9e28e52a099a00ff7af3bec883604051611b65919061256e565b60405180910390a350505050505050565b7ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c835611ba081611dca565b81600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611c7a576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060040160006101000a81548160ff021916908315150217905550823373ffffffffffffffffffffffffffffffffffffffff167ffab1e92dfdb794e4d1cafcbe46c62e8043dae2bb9d7b99d1ecf78ee5e03755aa60405160405180910390a3505050565b60036020528160005260406000208181548110611d4b57600080fd5b90600052602060002001600091509150505481565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611ddb81611dd6611ecf565b6121d0565b50565b6000611dea8383610ce6565b611ec457600160008085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611e61611ecf565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050611ec9565b600090505b92915050565b600033905090565b6000611ee38383610ce6565b15611fbe57600080600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f5b611ecf565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050611fc3565b600090505b92915050565b611fd1612221565b6000600160006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612015611ecf565b6040516120229190612afc565b60405180910390a1565b612034610bee565b1561206b576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6120e7838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016120a0929190612b17565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612261565b505050565b6120f461202c565b60018060006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612137611ecf565b6040516121449190612afc565b60405180910390a1565b6121ca848573ffffffffffffffffffffffffffffffffffffffff166323b872dd86868660405160240161218393929190612b40565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612261565b50505050565b6121da8282610ce6565b61221d5780826040517fe2517d3f000000000000000000000000000000000000000000000000000000008152600401612214929190612b77565b60405180910390fd5b5050565b612229610bee565b61225f576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b600080602060008451602086016000885af180612284576040513d6000823e3d81fd5b3d92506000519150506000821461229f5760018114156122bb565b60008473ffffffffffffffffffffffffffffffffffffffff163b145b156122fd57836040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016122f49190612afc565b60405180910390fd5b50505050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61233d81612308565b811461234857600080fd5b50565b60008135905061235a81612334565b92915050565b60006020828403121561237657612375612303565b5b60006123848482850161234b565b91505092915050565b60008115159050919050565b6123a28161238d565b82525050565b60006020820190506123bd6000830184612399565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006124086124036123fe846123c3565b6123e3565b6123c3565b9050919050565b600061241a826123ed565b9050919050565b600061242c8261240f565b9050919050565b61243c81612421565b82525050565b60006020820190506124576000830184612433565b92915050565b6000819050919050565b6124708161245d565b82525050565b600060208201905061248b6000830184612467565b92915050565b61249a8161245d565b81146124a557600080fd5b50565b6000813590506124b781612491565b92915050565b6000602082840312156124d3576124d2612303565b5b60006124e1848285016124a8565b91505092915050565b60006124f5826123c3565b9050919050565b612505816124ea565b811461251057600080fd5b50565b600081359050612522816124fc565b92915050565b60006020828403121561253e5761253d612303565b5b600061254c84828501612513565b91505092915050565b6000819050919050565b61256881612555565b82525050565b6000602082019050612583600083018461255f565b92915050565b600080604083850312156125a05761259f612303565b5b60006125ae858286016124a8565b92505060206125bf85828601612513565b9150509250929050565b6125d281612555565b81146125dd57600080fd5b50565b6000813590506125ef816125c9565b92915050565b60008060006060848603121561260e5761260d612303565b5b600061261c86828701612513565b935050602061262d868287016125e0565b925050604061263e868287016125e0565b9150509250925092565b600060808201905061265d600083018761255f565b61266a602083018661255f565b612677604083018561255f565b6126846060830184612399565b95945050505050565b600080604083850312156126a4576126a3612303565b5b60006126b285828601612513565b92505060206126c3858286016125e0565b9150509250929050565b6126d6816124ea565b82525050565b600060a0820190506126f1600083018861255f565b6126fe60208301876126cd565b61270b604083018661255f565b612718606083018561255f565b6127256080830184612399565b9695505050505050565b60008060006060848603121561274857612747612303565b5b6000612756868287016125e0565b9350506020612767868287016125e0565b9250506040612778868287016125e0565b9150509250925092565b60006020828403121561279857612797612303565b5b60006127a6848285016125e0565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6127e481612555565b82525050565b60006127f683836127db565b60208301905092915050565b6000602082019050919050565b600061281a826127af565b61282481856127ba565b935061282f836127cb565b8060005b8381101561286057815161284788826127ea565b975061285283612802565b925050600181019050612833565b5085935050505092915050565b60006020820190508181036000830152612887818461280f565b905092915050565b600080604083850312156128a6576128a5612303565b5b60006128b4858286016125e0565b92505060206128c5858286016125e0565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061293882612555565b915061294383612555565b925082820390508181111561295b5761295a6128fe565b5b92915050565b6000606082019050612976600083018661255f565b612983602083018561255f565b612990604083018461255f565b949350505050565b60006040820190506129ad60008301856126cd565b6129ba60208301846126cd565b9392505050565b6000815190506129d0816125c9565b92915050565b6000602082840312156129ec576129eb612303565b5b60006129fa848285016129c1565b91505092915050565b600082825260208201905092915050565b7f496e73756666696369656e7420616c6c6f77616e636500000000000000000000600082015250565b6000612a4a601683612a03565b9150612a5582612a14565b602082019050919050565b60006020820190508181036000830152612a7981612a3d565b9050919050565b6000612a8b82612555565b9150612a9683612555565b9250828201905080821115612aae57612aad6128fe565b5b92915050565b6000612abf82612555565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612af157612af06128fe565b5b600182019050919050565b6000602082019050612b1160008301846126cd565b92915050565b6000604082019050612b2c60008301856126cd565b612b39602083018461255f565b9392505050565b6000606082019050612b5560008301866126cd565b612b6260208301856126cd565b612b6f604083018461255f565b949350505050565b6000604082019050612b8c60008301856126cd565b612b996020830184612467565b939250505056fea2646970667358221220017baa2da2c160aae47bc4d62e8e5298e081e1fa1a9fd97fc134fdea6c95759464736f6c634300081c0033a2646970667358221220cb1da5a3bc851ea19ef15831f2df8ce96a34688850b459a4b8d54c589aca827f64736f6c634300081c003300000000000000000000000019f025ba859fbfa4768fcc4faf6db4a3f7e51652

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101425760003560e01c806391d14854116100b8578063d80effca1161007c578063d80effca146103c1578063e751b5b4146103f1578063ec2557461461040f578063ed332bf01461042b578063f26d55f71461045f578063fd9139a31461047b57610142565b806391d14854146102f7578063a217fddf14610327578063c9ac5d1f14610345578063cd3dc1b814610375578063d547741f146103a557610142565b80632e9db8d71161010a5780632e9db8d7146101ff5780632f2ff15d1461022f57806336568abe1461024b57806371a4a62e14610267578063754e884e146102975780637aeccdfe146102c757610142565b806301ffc9a71461014757806308d0eb341461017757806311eac85514610193578063248a9ca3146101b157806328a854e6146101e1575b600080fd5b610161600480360381019061015c9190611ceb565b610497565b60405161016e9190611d33565b60405180910390f35b610191600480360381019061018c9190611dac565b610511565b005b61019b6106d1565b6040516101a89190611de8565b60405180910390f35b6101cb60048036038101906101c69190611e39565b6106f5565b6040516101d89190611e75565b60405180910390f35b6101e9610714565b6040516101f69190611e75565b60405180910390f35b61021960048036038101906102149190611dac565b610738565b6040516102269190611ea9565b60405180910390f35b61024960048036038101906102449190611ec4565b6108eb565b005b61026560048036038101906102609190611ec4565b61090d565b005b610281600480360381019061027c9190611dac565b610988565b60405161028e9190611d33565b60405180910390f35b6102b160048036038101906102ac9190611dac565b6109de565b6040516102be9190611d33565b60405180910390f35b6102e160048036038101906102dc9190611dac565b6109fe565b6040516102ee9190611de8565b60405180910390f35b610311600480360381019061030c9190611ec4565b610a31565b60405161031e9190611d33565b60405180910390f35b61032f610a9b565b60405161033c9190611e75565b60405180910390f35b61035f600480360381019061035a9190611dac565b610aa2565b60405161036c9190611fc2565b60405180910390f35b61038f600480360381019061038a9190611dac565b610c5b565b60405161039c9190611de8565b60405180910390f35b6103bf60048036038101906103ba9190611ec4565b610d95565b005b6103db60048036038101906103d69190611dac565b610db7565b6040516103e89190611d33565b60405180910390f35b6103f9610dd7565b6040516104069190611de8565b60405180910390f35b61042960048036038101906104249190611dac565b61126c565b005b61044560048036038101906104409190612010565b61139b565b604051610456959493929190612050565b60405180910390f35b610479600480360381019061047491906120a3565b61156d565b005b61049560048036038101906104909190611dac565b6117f8565b005b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061050a5750610509826119b8565b5b9050919050565b7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f661053b81611a22565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036105a1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610624576040517fb3b752eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f8386b23e7b5e56defef4896578831a4c8858978cfc3daa72ca9930769e021cb160405160405180910390a260008290508073ffffffffffffffffffffffffffffffffffffffff16638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156106b457600080fd5b505af11580156106c8573d6000803e3d6000fd5b50505050505050565b7f00000000000000000000000019f025ba859fbfa4768fcc4faf6db4a3f7e5165281565b6000806000838152602001908152602001600020600101549050919050565b7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f681565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361079f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610869576040517fefdccc2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16632e9db8d7846040518263ffffffff1660e01b81526004016108a29190611de8565b602060405180830381865afa1580156108bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e391906120f8565b915050919050565b6108f4826106f5565b6108fd81611a22565b6109078383611a36565b50505050565b610915611b27565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610979576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109838282611b2f565b505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b81565b6060600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b0a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610bd4576040517fefdccc2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1663c9ac5d1f846040518263ffffffff1660e01b8152600401610c0d9190611de8565b600060405180830381865afa158015610c2a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610c53919061227e565b915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610cc2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d8c576040517fefdccc2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b610d9e826106f5565b610da781611a22565b610db18383611b2f565b50505050565b60036020528060005260406000206000915054906101000a900460ff1681565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610e5c576040517fcf11a12100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f21576040517fe483a08700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f00000000000000000000000019f025ba859fbfa4768fcc4faf6db4a3f7e51652604051610f5090611c72565b610f5a9190611de8565b604051809103906000f080158015610f76573d6000803e3d6000fd5b509050600081905080600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe6b90854f2f854b3d6bd3a78791efaf8f5c4b16e72adee672b2495d5171ea97f60405160405180910390a38173ffffffffffffffffffffffffffffffffffffffff16632f2ff15d8373ffffffffffffffffffffffffffffffffffffffff166375b238fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611115573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113991906122dc565b306040518363ffffffff1660e01b8152600401611157929190612309565b600060405180830381600087803b15801561117157600080fd5b505af1158015611185573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff16632f2ff15d8373ffffffffffffffffffffffffffffffffffffffff16632426bb386040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121491906122dc565b336040518363ffffffff1660e01b8152600401611232929190612309565b600060405180830381600087803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b50505050809250505090565b7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f661129681611a22565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036112fc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f0d884eb0b7cbf3f44571b21ba60ea7df041f15b92935f82ff78c00e1ea376c6560405160405180910390a25050565b60008060008060008073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1603611408576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036114d2576040517fefdccc2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1663ed332bf089896040518363ffffffff1660e01b815260040161150d929190612332565b60a060405180830381865afa15801561152a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154e919061239c565b809650819750829850839950849a505050505050509295509295909350565b7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f661159781611a22565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806115fe5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15611635576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166116b8576040517fb3b752eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167feabd3b45e0004ece10559102bfc26fdbd57a4201accc3bc1de60627362f5489d60405160405180910390a360008390508073ffffffffffffffffffffffffffffffffffffffff16632f2ff15d8273ffffffffffffffffffffffffffffffffffffffff166325b8e7eb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561177e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a291906122dc565b856040518363ffffffff1660e01b81526004016117c0929190612309565b600060405180830381600087803b1580156117da57600080fd5b505af11580156117ee573d6000803e3d6000fd5b5050505050505050565b7f334e4ff29b2b33ea01e68e72a933a3c413941d8539341b73a9bd86a2ae4d12f661182281611a22565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611888576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661190b576040517fb3b752eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167fad335d75fc1702677f623fbb30a0148eea2fda954bfcaf97a05353d72b641f1a60405160405180910390a260008290508073ffffffffffffffffffffffffffffffffffffffff16633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561199b57600080fd5b505af11580156119af573d6000803e3d6000fd5b50505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611a3381611a2e611b27565b611c21565b50565b6000611a428383610a31565b611b1c57600160008085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611ab9611b27565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050611b21565b600090505b92915050565b600033905090565b6000611b3b8383610a31565b15611c1657600080600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611bb3611b27565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050611c1b565b600090505b92915050565b611c2b8282610a31565b611c6e5780826040517fe2517d3f000000000000000000000000000000000000000000000000000000008152600401611c65929190612417565b60405180910390fd5b5050565b612f0d8061244183390190565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611cc881611c93565b8114611cd357600080fd5b50565b600081359050611ce581611cbf565b92915050565b600060208284031215611d0157611d00611c89565b5b6000611d0f84828501611cd6565b91505092915050565b60008115159050919050565b611d2d81611d18565b82525050565b6000602082019050611d486000830184611d24565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d7982611d4e565b9050919050565b611d8981611d6e565b8114611d9457600080fd5b50565b600081359050611da681611d80565b92915050565b600060208284031215611dc257611dc1611c89565b5b6000611dd084828501611d97565b91505092915050565b611de281611d6e565b82525050565b6000602082019050611dfd6000830184611dd9565b92915050565b6000819050919050565b611e1681611e03565b8114611e2157600080fd5b50565b600081359050611e3381611e0d565b92915050565b600060208284031215611e4f57611e4e611c89565b5b6000611e5d84828501611e24565b91505092915050565b611e6f81611e03565b82525050565b6000602082019050611e8a6000830184611e66565b92915050565b6000819050919050565b611ea381611e90565b82525050565b6000602082019050611ebe6000830184611e9a565b92915050565b60008060408385031215611edb57611eda611c89565b5b6000611ee985828601611e24565b9250506020611efa85828601611d97565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611f3981611e90565b82525050565b6000611f4b8383611f30565b60208301905092915050565b6000602082019050919050565b6000611f6f82611f04565b611f798185611f0f565b9350611f8483611f20565b8060005b83811015611fb5578151611f9c8882611f3f565b9750611fa783611f57565b925050600181019050611f88565b5085935050505092915050565b60006020820190508181036000830152611fdc8184611f64565b905092915050565b611fed81611e90565b8114611ff857600080fd5b50565b60008135905061200a81611fe4565b92915050565b6000806040838503121561202757612026611c89565b5b600061203585828601611d97565b925050602061204685828601611ffb565b9150509250929050565b600060a0820190506120656000830188611e9a565b6120726020830187611dd9565b61207f6040830186611e9a565b61208c6060830185611e9a565b6120996080830184611d24565b9695505050505050565b600080604083850312156120ba576120b9611c89565b5b60006120c885828601611d97565b92505060206120d985828601611d97565b9150509250929050565b6000815190506120f281611fe4565b92915050565b60006020828403121561210e5761210d611c89565b5b600061211c848285016120e3565b91505092915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6121738261212a565b810181811067ffffffffffffffff821117156121925761219161213b565b5b80604052505050565b60006121a5611c7f565b90506121b1828261216a565b919050565b600067ffffffffffffffff8211156121d1576121d061213b565b5b602082029050602081019050919050565b600080fd5b60006121fa6121f5846121b6565b61219b565b9050808382526020820190506020840283018581111561221d5761221c6121e2565b5b835b81811015612246578061223288826120e3565b84526020840193505060208101905061221f565b5050509392505050565b600082601f83011261226557612264612125565b5b81516122758482602086016121e7565b91505092915050565b60006020828403121561229457612293611c89565b5b600082015167ffffffffffffffff8111156122b2576122b1611c8e565b5b6122be84828501612250565b91505092915050565b6000815190506122d681611e0d565b92915050565b6000602082840312156122f2576122f1611c89565b5b6000612300848285016122c7565b91505092915050565b600060408201905061231e6000830185611e66565b61232b6020830184611dd9565b9392505050565b60006040820190506123476000830185611dd9565b6123546020830184611e9a565b9392505050565b60008151905061236a81611d80565b92915050565b61237981611d18565b811461238457600080fd5b50565b60008151905061239681612370565b92915050565b600080600080600060a086880312156123b8576123b7611c89565b5b60006123c6888289016120e3565b95505060206123d78882890161235b565b94505060406123e8888289016120e3565b93505060606123f9888289016120e3565b925050608061240a88828901612387565b9150509295509295909350565b600060408201905061242c6000830185611dd9565b6124396020830184611e66565b939250505056fe60a060405234801561001057600080fd5b50604051612f0d380380612f0d833981810160405281019061003291906102d3565b6000600160006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036100b3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506100fa6000801b3361010160201b60201c565b5050610300565b600061011383836101fe60201b60201c565b6101f357600160008085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061019061026860201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4600190506101f8565b600090505b92915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102a082610275565b9050919050565b6102b081610295565b81146102bb57600080fd5b50565b6000815190506102cd816102a7565b92915050565b6000602082840312156102e9576102e8610270565b5b60006102f7848285016102be565b91505092915050565b608051612bd66103376000396000818161063801528181610aeb015281816110e0015281816111c70152611ada0152612bd66000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806375b238fc116100f9578063c9ac5d1f11610097578063ed332bf011610071578063ed332bf014610520578063f3f265de14610554578063f91575f014610570578063fa85b26a1461058c576101c4565b8063c9ac5d1f146104a4578063d547741f146104d4578063e7fd9a13146104f0576101c4565b806391d14854116100d357806391d148541461041e578063a217fddf1461044e578063ad76d7661461046c578063be99970514610488576101c4565b806375b238fc146103c65780638456cb59146103e457806385e06e08146103ee576101c4565b80632f2ff15d1161016657806340804deb1161014057806340804deb14610325578063509f2868146103415780635c975abb146103745780636f4e5f3f14610392576101c4565b80632f2ff15d146102e357806336568abe146102ff5780633f4ba83a1461031b576101c4565b8063248a9ca3116101a2578063248a9ca31461023557806325b8e7eb146102655780632e9db8d7146102835780632f2909f3146102b3576101c4565b806301ffc9a7146101c957806311eac855146101f95780632426bb3814610217575b600080fd5b6101e360048036038101906101de9190612360565b6105bc565b6040516101f091906123a8565b60405180910390f35b610201610636565b60405161020e9190612442565b60405180910390f35b61021f61065a565b60405161022c9190612476565b60405180910390f35b61024f600480360381019061024a91906124bd565b61067e565b60405161025c9190612476565b60405180910390f35b61026d61069d565b60405161027a9190612476565b60405180910390f35b61029d60048036038101906102989190612528565b6106c1565b6040516102aa919061256e565b60405180910390f35b6102cd60048036038101906102c89190612528565b61070a565b6040516102da919061256e565b60405180910390f35b6102fd60048036038101906102f89190612589565b610722565b005b61031960048036038101906103149190612589565b610744565b005b6103236107bf565b005b61033f600480360381019061033a91906125f5565b6107f4565b005b61035b600480360381019061035691906125f5565b610b87565b60405161036b9493929190612648565b60405180910390f35b61037c610bee565b60405161038991906123a8565b60405180910390f35b6103ac60048036038101906103a7919061268d565b610c05565b6040516103bd9594939291906126dc565b60405180910390f35b6103ce610c75565b6040516103db9190612476565b60405180910390f35b6103ec610c99565b005b61040860048036038101906104039190612528565b610cce565b604051610415919061256e565b60405180910390f35b61043860048036038101906104339190612589565b610ce6565b60405161044591906123a8565b60405180910390f35b610456610d50565b6040516104639190612476565b60405180910390f35b6104866004803603810190610481919061272f565b610d57565b005b6104a2600480360381019061049d9190612782565b611078565b005b6104be60048036038101906104b99190612528565b6112b5565b6040516104cb919061286d565b60405180910390f35b6104ee60048036038101906104e99190612589565b61134c565b005b61050a6004803603810190610505919061268d565b61136e565b604051610517919061256e565b60405180910390f35b61053a6004803603810190610535919061268d565b6115e6565b60405161054b9594939291906126dc565b60405180910390f35b61056e6004803603810190610569919061288f565b611709565b005b61058a60048036038101906105859190612782565b611b76565b005b6105a660048036038101906105a1919061268d565b611d2f565b6040516105b3919061256e565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061062f575061062e82611d60565b5b9050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c83581565b6000806000838152602001908152602001600020600101549050919050565b7ffaa623ff490ff9197b5ad863cd7f72b33e2e131994d09bd7260d7cd680faad7981565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60066020528060005260406000206000915090505481565b61072b8261067e565b61073481611dca565b61073e8383611dde565b50505050565b61074c611ecf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107b0576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107ba8282611ed7565b505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107e981611dca565b6107f1611fc9565b50565b7ffaa623ff490ff9197b5ad863cd7f72b33e2e131994d09bd7260d7cd680faad7961081e81611dca565b61082661202c565b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002090508060040160009054906101000a900460ff166108c2576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008681526020019081526020016000208481548110610926576109256128cf565b5b906000526020600020906004020190508060030160009054906101000a900460ff161561097f576040517fea041f1e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600101544210806109945750806002015442115b156109cb576040517f4fe2f5b900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008260020154905080600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610a4d576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018260030160006101000a81548160ff02191690831515021790555080600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ab9919061292d565b92505081905550610b2f8360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661206d9092919063ffffffff16565b858773ffffffffffffffffffffffffffffffffffffffff167fe6784566ea810f71a9cd63f82925ef440935e26c9e28e52a099a00ff7af3bec883604051610b76919061256e565b60405180910390a350505050505050565b60046020528260005260406000206020528160005260406000208181548110610baf57600080fd5b906000526020600020906004020160009250925050508060000154908060010154908060020154908060030160009054906101000a900460ff16905084565b6000600160009054906101000a900460ff16905090565b6002602052816000526040600020602052806000526040600020600091509150508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040160009054906101000a900460ff16905085565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610cc381611dca565b610ccb6120ec565b50565b60056020528060005260406000206000915090505481565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b81565b7ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c835610d8181611dca565b83600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610e5b576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600087815260200190815260200160002090508060040160009054906101000a900460ff16610ef7576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838510610f30576040517f4fe2f5b900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000888152602001908152602001600020905060008180549050905081604051806080016040528083815260200189815260200188815260200160001515815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055505050873373ffffffffffffffffffffffffffffffffffffffff167fd153b8ef43cb85b04d95d02215fc9f3a7f1cb8aad9e916299ac8cf0f3c69d323838a8a60405161106693929190612961565b60405180910390a35050505050505050565b7ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c8356110a281611dca565b600082036110dc576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b8152600401611139929190612998565b602060405180830381865afa158015611156573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117a91906129d6565b9050828110156111bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b690612a60565b60405180910390fd5b61120c3330857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661214e909392919063ffffffff16565b82600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461125b9190612a80565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167f8fe10ae416f22f5e5220b0018a6c1d4ff534d6aa3a471f2a20cb7747fe63e5b9846040516112a8919061256e565b60405180910390a2505050565b6060600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561134057602002820191906000526020600020905b81548152602001906001019080831161132c575b50505050509050919050565b6113558261067e565b61135e81611dca565b6113688383611ed7565b50505050565b60007ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c83561139a81611dca565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611400576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815461144e90612ab4565b91905081905590506000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000209050818160000181905550858160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084816002018190555042816003018190555060018160040160006101000a81548160ff021916908315150217905550600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020829080600181540180825580915050600190039060005260206000200160009091909190915055813373ffffffffffffffffffffffffffffffffffffffff167f660a2dcf876162ac968b6610cd2548fdb0e619e8296ef931e2ca1392e7fe1a4a886040516115d29190612afc565b60405180910390a381935050505092915050565b600080600080600080600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008881526020019081526020016000206040518060a0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff16151515158152505090508060000151816020015182604001518360600151846080015195509550955095509550509295509295909350565b7ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c83561173381611dca565b82600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361180d576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61181561202c565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086815260200190815260200160002090508060040160009054906101000a900460ff166118b1576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008781526020019081526020016000208581548110611915576119146128cf565b5b906000526020600020906004020190508060030160009054906101000a900460ff161561196e576040517fea041f1e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600101544210806119835750806002015442115b156119ba576040517f4fe2f5b900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008260020154905080600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611a3c576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018260030160006101000a81548160ff02191690831515021790555080600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611aa8919061292d565b92505081905550611b1e8360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661206d9092919063ffffffff16565b863373ffffffffffffffffffffffffffffffffffffffff167fe6784566ea810f71a9cd63f82925ef440935e26c9e28e52a099a00ff7af3bec883604051611b65919061256e565b60405180910390a350505050505050565b7ffc7c36207174f786648d2e624616a4b40e15fd7f0268b4e36af5057f0c43c835611ba081611dca565b81600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611c7a576040517fbae1574e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060040160006101000a81548160ff021916908315150217905550823373ffffffffffffffffffffffffffffffffffffffff167ffab1e92dfdb794e4d1cafcbe46c62e8043dae2bb9d7b99d1ecf78ee5e03755aa60405160405180910390a3505050565b60036020528160005260406000208181548110611d4b57600080fd5b90600052602060002001600091509150505481565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611ddb81611dd6611ecf565b6121d0565b50565b6000611dea8383610ce6565b611ec457600160008085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611e61611ecf565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050611ec9565b600090505b92915050565b600033905090565b6000611ee38383610ce6565b15611fbe57600080600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f5b611ecf565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050611fc3565b600090505b92915050565b611fd1612221565b6000600160006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612015611ecf565b6040516120229190612afc565b60405180910390a1565b612034610bee565b1561206b576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6120e7838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016120a0929190612b17565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612261565b505050565b6120f461202c565b60018060006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612137611ecf565b6040516121449190612afc565b60405180910390a1565b6121ca848573ffffffffffffffffffffffffffffffffffffffff166323b872dd86868660405160240161218393929190612b40565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612261565b50505050565b6121da8282610ce6565b61221d5780826040517fe2517d3f000000000000000000000000000000000000000000000000000000008152600401612214929190612b77565b60405180910390fd5b5050565b612229610bee565b61225f576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b600080602060008451602086016000885af180612284576040513d6000823e3d81fd5b3d92506000519150506000821461229f5760018114156122bb565b60008473ffffffffffffffffffffffffffffffffffffffff163b145b156122fd57836040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016122f49190612afc565b60405180910390fd5b50505050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61233d81612308565b811461234857600080fd5b50565b60008135905061235a81612334565b92915050565b60006020828403121561237657612375612303565b5b60006123848482850161234b565b91505092915050565b60008115159050919050565b6123a28161238d565b82525050565b60006020820190506123bd6000830184612399565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006124086124036123fe846123c3565b6123e3565b6123c3565b9050919050565b600061241a826123ed565b9050919050565b600061242c8261240f565b9050919050565b61243c81612421565b82525050565b60006020820190506124576000830184612433565b92915050565b6000819050919050565b6124708161245d565b82525050565b600060208201905061248b6000830184612467565b92915050565b61249a8161245d565b81146124a557600080fd5b50565b6000813590506124b781612491565b92915050565b6000602082840312156124d3576124d2612303565b5b60006124e1848285016124a8565b91505092915050565b60006124f5826123c3565b9050919050565b612505816124ea565b811461251057600080fd5b50565b600081359050612522816124fc565b92915050565b60006020828403121561253e5761253d612303565b5b600061254c84828501612513565b91505092915050565b6000819050919050565b61256881612555565b82525050565b6000602082019050612583600083018461255f565b92915050565b600080604083850312156125a05761259f612303565b5b60006125ae858286016124a8565b92505060206125bf85828601612513565b9150509250929050565b6125d281612555565b81146125dd57600080fd5b50565b6000813590506125ef816125c9565b92915050565b60008060006060848603121561260e5761260d612303565b5b600061261c86828701612513565b935050602061262d868287016125e0565b925050604061263e868287016125e0565b9150509250925092565b600060808201905061265d600083018761255f565b61266a602083018661255f565b612677604083018561255f565b6126846060830184612399565b95945050505050565b600080604083850312156126a4576126a3612303565b5b60006126b285828601612513565b92505060206126c3858286016125e0565b9150509250929050565b6126d6816124ea565b82525050565b600060a0820190506126f1600083018861255f565b6126fe60208301876126cd565b61270b604083018661255f565b612718606083018561255f565b6127256080830184612399565b9695505050505050565b60008060006060848603121561274857612747612303565b5b6000612756868287016125e0565b9350506020612767868287016125e0565b9250506040612778868287016125e0565b9150509250925092565b60006020828403121561279857612797612303565b5b60006127a6848285016125e0565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6127e481612555565b82525050565b60006127f683836127db565b60208301905092915050565b6000602082019050919050565b600061281a826127af565b61282481856127ba565b935061282f836127cb565b8060005b8381101561286057815161284788826127ea565b975061285283612802565b925050600181019050612833565b5085935050505092915050565b60006020820190508181036000830152612887818461280f565b905092915050565b600080604083850312156128a6576128a5612303565b5b60006128b4858286016125e0565b92505060206128c5858286016125e0565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061293882612555565b915061294383612555565b925082820390508181111561295b5761295a6128fe565b5b92915050565b6000606082019050612976600083018661255f565b612983602083018561255f565b612990604083018461255f565b949350505050565b60006040820190506129ad60008301856126cd565b6129ba60208301846126cd565b9392505050565b6000815190506129d0816125c9565b92915050565b6000602082840312156129ec576129eb612303565b5b60006129fa848285016129c1565b91505092915050565b600082825260208201905092915050565b7f496e73756666696369656e7420616c6c6f77616e636500000000000000000000600082015250565b6000612a4a601683612a03565b9150612a5582612a14565b602082019050919050565b60006020820190508181036000830152612a7981612a3d565b9050919050565b6000612a8b82612555565b9150612a9683612555565b9250828201905080821115612aae57612aad6128fe565b5b92915050565b6000612abf82612555565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612af157612af06128fe565b5b600182019050919050565b6000602082019050612b1160008301846126cd565b92915050565b6000604082019050612b2c60008301856126cd565b612b39602083018461255f565b9392505050565b6000606082019050612b5560008301866126cd565b612b6260208301856126cd565b612b6f604083018461255f565b949350505050565b6000604082019050612b8c60008301856126cd565b612b996020830184612467565b939250505056fea2646970667358221220017baa2da2c160aae47bc4d62e8e5298e081e1fa1a9fd97fc134fdea6c95759464736f6c634300081c0033a2646970667358221220cb1da5a3bc851ea19ef15831f2df8ce96a34688850b459a4b8d54c589aca827f64736f6c634300081c0033

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

00000000000000000000000019f025ba859fbfa4768fcc4faf6db4a3f7e51652

-----Decoded View---------------
Arg [0] : _usdcToken (address): 0x19F025Ba859Fbfa4768fCc4FaF6db4A3f7E51652

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000019f025ba859fbfa4768fcc4faf6db4a3f7e51652


Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

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

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