ETH Price: $3,446.02 (-0.97%)
Gas: 3 Gwei

Contract

0x62Fb7d72465A31a24fE910E8b6c63408e4a0De19
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add Token194641032024-03-18 20:38:59126 days ago1710794339IN
0x62Fb7d72...8e4a0De19
0 ETH0.0072059140.59464832
Add Token145636502022-04-11 9:40:19833 days ago1649670019IN
0x62Fb7d72...8e4a0De19
0 ETH0.0093944253.71064664
Claim Ownership145636362022-04-11 9:35:26833 days ago1649669726IN
0x62Fb7d72...8e4a0De19
0 ETH0.000945133.41143788
Transfer Ownersh...145636152022-04-11 9:31:22833 days ago1649669482IN
0x62Fb7d72...8e4a0De19
0 ETH0.0011131624.09489806
Add Token142299302022-02-18 11:50:34885 days ago1645185034IN
0x62Fb7d72...8e4a0De19
0 ETH0.0134122277.82286259
Add Token142299182022-02-18 11:48:31885 days ago1645184911IN
0x62Fb7d72...8e4a0De19
0 ETH0.0164787497.03995474
Add Token136206912021-11-15 13:51:13980 days ago1636984273IN
0x62Fb7d72...8e4a0De19
0 ETH0.02559968153.14022106
Add Token133587942021-10-05 11:26:281021 days ago1633433188IN
0x62Fb7d72...8e4a0De19
0 ETH0.0142308286.44439583
Add Token133586192021-10-05 10:46:211021 days ago1633430781IN
0x62Fb7d72...8e4a0De19
0 ETH0.0126153988.76390219
Add Token133586102021-10-05 10:44:191021 days ago1633430659IN
0x62Fb7d72...8e4a0De19
0 ETH0.0147023192.18097098
Add Token133585762021-10-05 10:36:251021 days ago1633430185IN
0x62Fb7d72...8e4a0De19
0 ETH0.01663142105.98865752
Add Token133585632021-10-05 10:32:421021 days ago1633429962IN
0x62Fb7d72...8e4a0De19
0 ETH0.01872064107.27179305
Add Token133585422021-10-05 10:26:331021 days ago1633429593IN
0x62Fb7d72...8e4a0De19
0 ETH0.0158329892.07845901
Add Token133585292021-10-05 10:23:261021 days ago1633429406IN
0x62Fb7d72...8e4a0De19
0 ETH0.01704838100.66241901
Add Token133585192021-10-05 10:21:311021 days ago1633429291IN
0x62Fb7d72...8e4a0De19
0 ETH0.01949041105.97857872
0x60806040133572132021-10-05 5:40:321022 days ago1633412432IN
 Create: TokenManager
0 ETH0.0478606155

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenManager

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion, MIT license
File 1 of 12 : TokenManager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./access/Ownable.sol";

contract TokenManager is Ownable {
    event TokenAdded(address indexed _tokenAddress);
    event TokenRemoved(address indexed _tokenAddress);

    struct Token {
        address tokenAddress;
        string name;
        string symbol;
        uint256 decimals;
        address usdPriceContract;
        bool isStable;
    }

    address[] public tokenAddresses;
    mapping(address => Token) public tokens;

    function addToken(
        address _tokenAddress,
        string memory _name,
        string memory _symbol,
        uint256 _decimals,
        address _usdPriceContract,
        bool _isStable
    ) public onlyOwner {
        (bool found,) = indexOfToken(_tokenAddress);
        require(!found, 'Token already added');
        tokens[_tokenAddress] = Token(_tokenAddress, _name, _symbol, _decimals, _usdPriceContract, _isStable);
        tokenAddresses.push(_tokenAddress);
        emit TokenAdded(_tokenAddress);
    }

    function removeToken(
        address _tokenAddress
    ) public onlyOwner {
        (bool found, uint256 index) = indexOfToken(_tokenAddress);
        require(found, 'Erc20 token not found');
        if (tokenAddresses.length > 1) {
            tokenAddresses[index] = tokenAddresses[tokenAddresses.length - 1];
        }
        tokenAddresses.pop();
        delete tokens[_tokenAddress];
        emit TokenRemoved(_tokenAddress);
    }

    function indexOfToken(address _address) public view returns (bool found, uint256 index) {
        for (uint256 i = 0; i < tokenAddresses.length; i++) {
            if (tokenAddresses[i] == _address) {
                return (true, i);
            }
        }
        return (false, 0);
    }

    function getListTokenAddresses() public view returns (address[] memory)
    {
        return tokenAddresses;
    }

    function getLengthTokenAddresses() public view returns (uint256)
    {
        return tokenAddresses.length;
    }
}

File 2 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;
    address private _pendingOwner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

    function transferOwnership(address newOwner) external onlyOwner {
        _pendingOwner = newOwner;
    }

    function claimOwnership() external onlyPendingOwner {
        _owner = _pendingOwner;
        _pendingOwner = address(0);
        emit OwnershipTransferred(_owner, _pendingOwner);
    }
}

File 3 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 4 of 12 : LaborXContract.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./interfaces/AggregatorV3Interface.sol";
import "./utils/ECDSA.sol";
import './access/Ownable.sol';
import './utils/SafeERC20.sol';
import './interfaces/IERC20.sol';
import './interfaces/IWETH.sol';
import "./TokenManager.sol";

contract LaborXContract is Ownable {
    using SafeERC20 for IERC20;
    using ECDSA for bytes32;

    enum State {NULL, CREATED, BLOCKED, PAYED_TO_FREELANCER, RETURNED_FUNDS_TO_CUSTOMER, DISTRIBUTED_FUNDS_BY_ARBITER}

    event ContractCreated(bytes32 indexed contractId, address token, uint256 amount, address disputer, uint256 deadline);
    event ContractBlocked(bytes32 indexed contractId);
    event PayedToFreelancer(bytes32 indexed contractId, uint256 freelancerFee, uint256 freelancerAmount);
    event RefundedToCustomer(bytes32 indexed contractId, uint256 customerPayAmount);
    event DistributedForPartials(bytes32 indexed contractId, uint256 freelancerFee, uint256 customerPayAmount, uint256 freelancerPayAmount);
    event ServiceFeesChanged(uint256 customerFee, uint256 freelancerFee);

    uint256 public constant FEE_PRECISION = 1000;

    bool private initialized;
    uint256 public customerFee = 0;
    uint256 public freelancerFee = 100;
    uint256 public extraDuration = 172800;
    uint256 public precision = 10000000000;
    uint256 public priceOutdateDelay = 14400;
    uint256 public priceOutdateDelayStable = 172800;
    bool public convertAvailable = true;

    address public weth;
    address public tokenManager;
    address public serviceFeesRecipient;
    address public disputer;

    struct Contract {
        bytes32 contractId;
        address customer;
        address freelancer;
        address disputer;
        address token;
        uint256 amount;
        uint256 customerFee;
        uint256 deadline;
        uint256 percentToBaseConvert;
        State state;
    }

    struct ServiceFeeAccum {
        address token;
        uint256 amount;
    }

    mapping(bytes32 => Contract) public contracts;
    mapping(address => uint256) public serviceFeesAccum;

    function init(address _weth, address _tokenManager, address _disputer, address _serviceFeesRecipient) external onlyOwner {
        require(!initialized, "Initialized");
        weth = _weth;
        tokenManager = _tokenManager;
        disputer = _disputer;
        serviceFeesRecipient = _serviceFeesRecipient;
        initialized = true;
    }

    function createContract(
        bytes32 _contractId,
        address _freelancer,
        address _disputer,
        address _token,
        uint256 _amount,
        uint64 _duration,
        uint256 _percentToBaseConvert
    ) external payable {
        require(contracts[_contractId].state == State.NULL, "Contract already exist");
        (bool found,) = TokenManager(tokenManager).indexOfToken(_token);
        require(found, "Only allowed currency");
        require((_percentToBaseConvert >= 0 && _percentToBaseConvert <= 1000), "Percent to base convert goes beyond the limits from 0 to 1000");
        require(_duration > 0, "Duration must be greater than zero");
        uint256 _deadline = _duration + block.timestamp;
        uint256 feeAmount = customerFee * _amount / FEE_PRECISION;
        uint256 amountWithFee = _amount + feeAmount;
        if (_token == weth) {
            require(msg.value == amountWithFee, 'Incorrect passed msg.value');
            IWETH(weth).deposit{value : amountWithFee}();
        } else {
            IERC20(_token).safeTransferFrom(_msgSender(), address(this), amountWithFee);
        }
        Contract storage jobContract = contracts[_contractId];
        jobContract.state = State.CREATED;
        jobContract.customer = _msgSender();
        jobContract.freelancer = _freelancer;
        if (_disputer != address(0)) jobContract.disputer = _disputer;
        jobContract.token = _token;
        jobContract.amount = _amount;
        if (customerFee != 0) jobContract.customerFee = customerFee;
        jobContract.deadline = _deadline;
        if (_percentToBaseConvert != 0) jobContract.percentToBaseConvert = _percentToBaseConvert;
        emit ContractCreated(_contractId, _token, _amount, _disputer, _deadline);
    }

    function blockContract(bytes32 _contractId) external onlyCreatedState(_contractId) {
        require(
            ((contracts[_contractId].disputer == address(0) && _msgSender() == disputer) || _msgSender() == contracts[_contractId].disputer) ||
            _msgSender() == contracts[_contractId].freelancer,
            "Only disputer or freelancer can block contract"
        );
        contracts[_contractId].state = State.BLOCKED;
        emit ContractBlocked(_contractId);
    }

    function payToFreelancer(
        bytes32 _contractId
    ) external onlyCustomer(_contractId) onlyCreatedState(_contractId) {
        uint256 freelancerFeeAmount = freelancerFee * contracts[_contractId].amount / FEE_PRECISION;
        uint256 customerFeeAmount = contracts[_contractId].customerFee * contracts[_contractId].amount / FEE_PRECISION;
        uint256 freelancerAmount = contracts[_contractId].amount - freelancerFeeAmount;
        contracts[_contractId].state = State.PAYED_TO_FREELANCER;
        if (contracts[_contractId].token == weth) {
            IWETH(weth).withdraw(freelancerAmount);
            payable(contracts[_contractId].freelancer).transfer(freelancerAmount);
        } else {
            if (contracts[_contractId].percentToBaseConvert > 0) {
                uint256 freelancerAmountToBase = freelancerAmount * contracts[_contractId].percentToBaseConvert / FEE_PRECISION;
                bool success = _payInBase(contracts[_contractId].freelancer, contracts[_contractId].token, freelancerAmountToBase);
                if (success) {
                    IERC20(contracts[_contractId].token).safeTransfer(contracts[_contractId].freelancer, freelancerAmount - freelancerAmountToBase);
                } else {
                    IERC20(contracts[_contractId].token).safeTransfer(contracts[_contractId].freelancer, freelancerAmount);
                }
            } else {
                IERC20(contracts[_contractId].token).safeTransfer(contracts[_contractId].freelancer, freelancerAmount);
            }
        }
        serviceFeesAccum[contracts[_contractId].token] += freelancerFeeAmount + customerFeeAmount;
        emit PayedToFreelancer(_contractId, freelancerFee, freelancerAmount);
    }

    function refundToCustomerByFreelancer(
        bytes32 _contractId
    ) external onlyFreelancer(_contractId) onlyCreatedState(_contractId) {
        uint256 customerFeeAmount = contracts[_contractId].customerFee * contracts[_contractId].amount / FEE_PRECISION;
        uint256 customerAmount = contracts[_contractId].amount + customerFeeAmount;
        contracts[_contractId].state = State.RETURNED_FUNDS_TO_CUSTOMER;
        if (contracts[_contractId].token == weth) {
            IWETH(weth).withdraw(customerAmount);
            payable(contracts[_contractId].customer).transfer(customerAmount);
        } else {
            IERC20(contracts[_contractId].token).safeTransfer(
                contracts[_contractId].customer,
                customerAmount
            );
        }
        emit RefundedToCustomer(_contractId, customerAmount);
    }

    function refundToCustomerByCustomer(
        bytes32 _contractId
    ) external onlyCustomer(_contractId) onlyCreatedState(_contractId) {
        require(contracts[_contractId].deadline + extraDuration < block.timestamp, "You cannot refund the funds, deadline plus extra hours");
        uint256 customerFeeAmount = contracts[_contractId].customerFee * contracts[_contractId].amount / FEE_PRECISION;
        uint256 customerAmount = contracts[_contractId].amount + customerFeeAmount;
        contracts[_contractId].state = State.RETURNED_FUNDS_TO_CUSTOMER;
        if (contracts[_contractId].token == weth) {
            IWETH(weth).withdraw(customerAmount);
            payable(contracts[_contractId].customer).transfer(customerAmount);
        } else {
            IERC20(contracts[_contractId].token).safeTransfer(
                contracts[_contractId].customer,
                customerAmount
            );
        }
        emit RefundedToCustomer(_contractId, customerAmount);
    }

    function refundToCustomerWithFreelancerSignature(
        bytes32 _contractId,
        bytes memory signature
    ) public onlyCustomer(_contractId) onlyCreatedState(_contractId) {
        address signerAddress = _contractId.toEthSignedMessageHash().recover(signature);
        require(signerAddress == contracts[_contractId].freelancer, "Freelancer signature is incorrect");
        uint256 customerFeeAmount = contracts[_contractId].customerFee * contracts[_contractId].amount / FEE_PRECISION;
        uint256 customerAmount = contracts[_contractId].amount + customerFeeAmount;
        contracts[_contractId].state = State.RETURNED_FUNDS_TO_CUSTOMER;
        if (contracts[_contractId].token == weth) {
            IWETH(weth).withdraw(customerAmount);
            payable(contracts[_contractId].customer).transfer(customerAmount);
        } else {
            IERC20(contracts[_contractId].token).safeTransfer(
                contracts[_contractId].customer,
                customerAmount
            );
        }
        emit RefundedToCustomer(_contractId, customerAmount);
    }

    function distributionForPartials(
        bytes32 _contractId,
        uint256 _customerAmount
    ) external onlyDisputer(_contractId) onlyBlockedState(_contractId) {
        require(contracts[_contractId].amount >= _customerAmount, "High value of the customer amount");
        uint256 customerBeginFee = contracts[_contractId].amount * contracts[_contractId].customerFee / FEE_PRECISION;
        uint256 freelancerAmount = contracts[_contractId].amount - _customerAmount;
        uint256 freelancerFeeAmount = freelancerAmount * freelancerFee / FEE_PRECISION;
        uint256 freelancerPayAmount = freelancerAmount - freelancerFeeAmount;
        uint256 customerFeeAmount = freelancerAmount * precision * customerBeginFee / contracts[_contractId].amount / precision;
        uint256 customerPayAmount = _customerAmount + (customerBeginFee - customerFeeAmount);
        contracts[_contractId].state = State.DISTRIBUTED_FUNDS_BY_ARBITER;
        if (contracts[_contractId].token == weth) {
            IWETH(weth).withdraw(customerPayAmount + freelancerPayAmount);
            if (customerPayAmount != 0) {
                payable(contracts[_contractId].customer).transfer(customerPayAmount);
            }
            if (freelancerPayAmount != 0) {
                payable(contracts[_contractId].freelancer).transfer(freelancerPayAmount);
            }
        } else {
            if (customerPayAmount != 0) {
                IERC20(contracts[_contractId].token).safeTransfer(contracts[_contractId].customer, customerPayAmount);
            }
            if (freelancerPayAmount != 0) {
                IERC20(contracts[_contractId].token).safeTransfer(contracts[_contractId].freelancer, freelancerPayAmount);
            }
        }
        serviceFeesAccum[contracts[_contractId].token] += customerFeeAmount + freelancerFeeAmount;
        emit DistributedForPartials(_contractId, freelancerFee, customerPayAmount, freelancerPayAmount);
    }

    function withdrawServiceFee(address token) external onlyServiceFeesRecipient {
        require(serviceFeesRecipient != address(0), "Not specified service fee address");
        require(serviceFeesAccum[token] > 0, "You have no accumulated commissions");
        uint256 amount = serviceFeesAccum[token];
        serviceFeesAccum[token] = 0;
        if (token == weth) {
            IWETH(weth).withdraw(amount);
            payable(serviceFeesRecipient).transfer(amount);
        } else {
            IERC20(token).safeTransfer(serviceFeesRecipient, amount);
        }
    }

    function withdrawServiceFees() external onlyServiceFeesRecipient {
        address[] memory addresses = TokenManager(tokenManager).getListTokenAddresses();
        for (uint256 i = 0; i < addresses.length; i++) {
            if (serviceFeesAccum[addresses[i]] > 0) {
                uint256 amount = serviceFeesAccum[addresses[i]];
                serviceFeesAccum[addresses[i]] = 0;
                if (addresses[i] == weth) {
                    IWETH(weth).withdraw(amount);
                    payable(serviceFeesRecipient).transfer(amount);
                } else {
                    IERC20(addresses[i]).safeTransfer(serviceFeesRecipient, amount);
                }
            }
        }
    }

    function checkAbilityConvertToBase(address fromToken, uint256 amount) public view returns (bool success, uint256 amountInBase) {
        if (!convertAvailable) return (false, 0);
        if (address(0) == weth) return (false, 1);
        if (fromToken == weth) return (false, 2);
        (bool found,) = TokenManager(tokenManager).indexOfToken(weth);
        if (!found) return (false, 3);
        (,,,,address priceContractToUSD, bool isStable) = TokenManager(tokenManager).tokens(fromToken);
        if (priceContractToUSD == address(0)) return (false, 4);
        (,int256 answerToUSD,,uint256 updatedAtToUSD,) = AggregatorV3Interface(priceContractToUSD).latestRoundData();
        if ((updatedAtToUSD + (isStable ? priceOutdateDelayStable : priceOutdateDelay )) < block.timestamp) return (false, 5);
        if (answerToUSD <= 0) return (false, 6);
        (,,,,address priceContractToBase,) = TokenManager(tokenManager).tokens(weth);
        (,int256 answerToBase,,uint256 updatedAtToBase,) = AggregatorV3Interface(priceContractToBase).latestRoundData();
        if ((updatedAtToBase + priceOutdateDelay) < block.timestamp) return (false, 7);
        if (answerToBase <= 0) return (false, 8);
        uint256 amountInUSD = amount * uint(answerToUSD) / (10 ** AggregatorV3Interface(priceContractToUSD).decimals());
        amountInBase = amountInUSD * (10 ** 18) / uint(answerToBase);
        if (amountInBase > serviceFeesAccum[weth]) return (false, 9);
        return (true, amountInBase);
    }

    function addToServiceFeeAccumBase() external payable onlyServiceFeesRecipient {
        IWETH(weth).deposit{value : msg.value}();
        serviceFeesAccum[weth] += msg.value;
    }

    function setPrecision(uint256 _precision) external onlyOwner {
        precision = _precision;
    }

    function setServiceFeesRecipient(address _address) external onlyOwner {
        serviceFeesRecipient = _address;
    }

    function setDisputer(address _address) external onlyOwner {
        disputer = _address;
    }

    function setTokenManager(address _address) external onlyOwner {
        tokenManager = _address;
    }

    function setServiceFees(uint256 _customerFee, uint256 _freelancerFee) external onlyOwner {
        customerFee = _customerFee;
        freelancerFee = _freelancerFee;
        emit ServiceFeesChanged(customerFee, freelancerFee);
    }

    function setExtraDuration(uint256 _extraDuration) external onlyOwner {
        extraDuration = _extraDuration;
    }

    function setPriceOutdateDelay(uint256 _priceOutdateDelay, uint256 _priceOutdateDelayStable) external onlyOwner {
        priceOutdateDelay = _priceOutdateDelay;
        priceOutdateDelayStable = _priceOutdateDelayStable;
    }

    function setConvertAvailable(bool _convertAvailable) external onlyOwner {
        convertAvailable = _convertAvailable;
    }

    function _payInBase(address to, address fromToken, uint256 amount) internal returns (bool) {
        (bool success, uint256 amountInBase) = checkAbilityConvertToBase(fromToken, amount);
        if (!success) return false;
        IWETH(weth).withdraw(amountInBase);
        payable(to).transfer(amountInBase);
        serviceFeesAccum[weth] -= amountInBase;
        serviceFeesAccum[fromToken] += amount;
        return true;
    }

    receive() external payable {
        assert(msg.sender == weth);
    }

    // -------- Getters ----------
    function getAccumulatedFees() public view returns (ServiceFeeAccum[] memory _fees) {
        uint256 length = TokenManager(tokenManager).getLengthTokenAddresses();
        ServiceFeeAccum[] memory fees = new ServiceFeeAccum[](length);
        for (uint256 i = 0; i < length; i++) {
            address token = TokenManager(tokenManager).tokenAddresses(i);
            fees[i].token = token;
            fees[i].amount = serviceFeesAccum[token];
        }
        return fees;
    }

    function getServiceFees() public view returns (uint256 _customerFee, uint256 _freelancerFee) {
        _customerFee = customerFee;
        _freelancerFee = freelancerFee;
    }

    // -------- Modifiers ----------
    modifier onlyCreatedState (bytes32 _contractId) {
        require(contracts[_contractId].state == State.CREATED, "Contract allowed only created state");
        _;
    }

    modifier onlyBlockedState (bytes32 _contractId) {
        require(contracts[_contractId].state == State.BLOCKED, "Contract allowed only blocked state");
        _;
    }

    modifier onlyServiceFeesRecipient () {
        require(_msgSender() == serviceFeesRecipient, "Only service fees recipient can call this function");
        _;
    }

    modifier onlyFreelancer (bytes32 _contractId) {
        require(_msgSender() == contracts[_contractId].freelancer, "Only freelancer can call this function");
        _;
    }

    modifier onlyCustomer (bytes32 _contractId) {
        require(_msgSender() == contracts[_contractId].customer, "Only customer can call this function");
        _;
    }

    modifier onlyTxSender (bytes32 _contractId) {
        require(msg.sender == tx.origin, "Only tx sender can call this function");
        _;
    }

    modifier onlyDisputer (bytes32 _contractId) {
        require((contracts[_contractId].disputer == address(0) && _msgSender() == disputer) || _msgSender() == contracts[_contractId].disputer, "Only disputer can call this function");
        _;
    }
}

File 5 of 12 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {

    function decimals()
    external
    view
    returns (
        uint8
    );

    function description()
    external
    view
    returns (
        string memory
    );

    function version()
    external
    view
    returns (
        uint256
    );

    // getRoundData and latestRoundData should both raise "No data present"
    // if they do not have data to report, instead of returning unset values
    // which could be misinterpreted as actual reported values.
    function getRoundData(
        uint80 _roundId
    )
    external
    view
    returns (
        uint80 roundId,
        int256 answer,
        uint256 startedAt,
        uint256 updatedAt,
        uint80 answeredInRound
    );

    function latestRoundData()
    external
    view
    returns (
        uint80 roundId,
        int256 answer,
        uint256 startedAt,
        uint256 updatedAt,
        uint80 answeredInRound
    );

}

File 6 of 12 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Divide the signature in r, s and v variables
        bytes32 r;
        bytes32 s;
        uint8 v;

        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            // solhint-disable-next-line no-inline-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
        } else if (signature.length == 64) {
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            // solhint-disable-next-line no-inline-assembly
            assembly {
                let vs := mload(add(signature, 0x40))
                r := mload(add(signature, 0x20))
                s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
                v := add(shr(255, vs), 27)
            }
        } else {
            revert("ECDSA: invalid signature length");
        }

        return recover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value");
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 7 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../interfaces/IERC20.sol";
import "./Address.sol";

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

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

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

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

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

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

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

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

File 8 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 9 of 12 : IWETH.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint wad) external;
    function balanceOf(address user) external returns (uint);
}

File 10 of 12 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 12 : IUniswapV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IERC20.sol";

interface IUniRouter {
    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);
}

interface IUniswapV2Factory {
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function getPair(IERC20 tokenA, IERC20 tokenB)
        external
        view
        returns (IUniswapV2Exchange pair);
}

interface IUniswapV2Exchange {
    function totalSupply() external view returns (uint256);

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

    function getReserves()
        external
        view
        returns (
            uint112 _reserve0,
            uint112 _reserve1,
            uint32 _blockTimestampLast
        );

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to)
        external
        returns (uint256 amount0, uint256 amount1);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function transfer(address to, uint256 value) external returns (bool);
}

File 12 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./interfaces/IERC20.sol";
import "./utils/Context.sol";

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 public decimals;

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        _approve(sender, _msgSender(), currentAllowance - amount);

        return true;
    }

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

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

        return true;
    }

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

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        _balances[sender] = senderBalance - amount;
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);
    }

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

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

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

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

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"TokenAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"TokenRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_decimals","type":"uint256"},{"internalType":"address","name":"_usdPriceContract","type":"address"},{"internalType":"bool","name":"_isStable","type":"bool"}],"name":"addToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getLengthTokenAddresses","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getListTokenAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"indexOfToken","outputs":[{"internalType":"bool","name":"found","type":"bool"},{"internalType":"uint256","name":"index","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"removeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokens","outputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"address","name":"usdPriceContract","type":"address"},{"internalType":"bool","name":"isStable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b610e568061007d6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80638da5cb5b11610081578063e48603391161005b578063e48603391461016f578063e5df8b8414610194578063f2fde38b146101a7576100c9565b80638da5cb5b1461013f5780639309625614610154578063e30c397814610167576100c9565b80634e71e0c8116100b25780634e71e0c81461010d5780635fa7b584146101175780636f16dac21461012a576100c9565b80632335093c146100ce5780634ae21306146100f8575b600080fd5b6100e16100dc366004610a8e565b6101ba565b6040516100ef929190610c6e565b60405180910390f35b61010061023b565b6040516100ef9190610d7e565b610115610241565b005b610115610125366004610a8e565b6102e3565b6101326104db565b6040516100ef9190610c21565b61014761053d565b6040516100ef9190610bb5565b610115610162366004610aaf565b61054c565b61014761071d565b61018261017d366004610a8e565b61072c565b6040516100ef96959493929190610bc9565b6101476101a2366004610b52565b61088a565b6101156101b5366004610a8e565b6108b4565b60008060005b60025481101561022d57836001600160a01b0316600282815481106101f557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316141561021b57600192509050610236565b8061022581610dd9565b9150506101c0565b50600080915091505b915091565b60025490565b610249610915565b6001600160a01b031661025a61071d565b6001600160a01b0316146102895760405162461bcd60e51b815260040161028090610d21565b60405180910390fd5b60018054600080546001600160a01b038084166001600160a01b031992831617808455919093169093556040519092909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3565b6102eb610915565b6001600160a01b03166102fc61053d565b6001600160a01b0316146103225760405162461bcd60e51b815260040161028090610cb5565b60008061032e836101ba565b915091508161034f5760405162461bcd60e51b815260040161028090610c7e565b600254600110156103f1576002805461036a90600190610d87565b8154811061038857634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600280546001600160a01b0390921691839081106103c257634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b600280548061041057634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160a01b031990811690915593019093556001600160a01b038616815260039092526040822080549091168155906104626001830182610919565b610470600283016000610919565b50600060038201819055600490910180547fffffffffffffffffffffff0000000000000000000000000000000000000000001690556040516001600160a01b038516917f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd391a2505050565b6060600280548060200260200160405190810160405280929190818152602001828054801561053357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610515575b5050505050905090565b6000546001600160a01b031690565b610554610915565b6001600160a01b031661056561053d565b6001600160a01b03161461058b5760405162461bcd60e51b815260040161028090610cb5565b6000610596876101ba565b50905080156105b75760405162461bcd60e51b815260040161028090610cea565b6040805160c0810182526001600160a01b0389811680835260208084018b81528486018b9052606085018a9052888416608086015287151560a086015260009283526003825294909120835181546001600160a01b0319169316929092178255925180519293919261062f9260018501920190610958565b506040820151805161064b916002840191602090910190610958565b506060820151600382015560808201516004909101805460a0909301511515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff6001600160a01b039384166001600160a01b031995861617161790556002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace018054928b1692909316821790925560405190917f784c8f4dbf0ffedd6e72c76501c545a70f8b203b30a26ce542bf92ba87c248a491a250505050505050565b6001546001600160a01b031690565b600360205260009081526040902080546001820180546001600160a01b03909216929161075890610d9e565b80601f016020809104026020016040519081016040528092919081815260200182805461078490610d9e565b80156107d15780601f106107a6576101008083540402835291602001916107d1565b820191906000526020600020905b8154815290600101906020018083116107b457829003601f168201915b5050505050908060020180546107e690610d9e565b80601f016020809104026020016040519081016040528092919081815260200182805461081290610d9e565b801561085f5780601f106108345761010080835404028352916020019161085f565b820191906000526020600020905b81548152906001019060200180831161084257829003601f168201915b5050505060038301546004909301549192916001600160a01b0381169150600160a01b900460ff1686565b6002818154811061089a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6108bc610915565b6001600160a01b03166108cd61053d565b6001600160a01b0316146108f35760405162461bcd60e51b815260040161028090610cb5565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b50805461092590610d9e565b6000825580601f106109375750610955565b601f01602090049060005260206000209081019061095591906109dc565b50565b82805461096490610d9e565b90600052602060002090601f01602090048101928261098657600085556109cc565b82601f1061099f57805160ff19168380011785556109cc565b828001600101855582156109cc579182015b828111156109cc5782518255916020019190600101906109b1565b506109d89291506109dc565b5090565b5b808211156109d857600081556001016109dd565b80356001600160a01b0381168114610a0857600080fd5b919050565b600082601f830112610a1d578081fd5b813567ffffffffffffffff80821115610a3857610a38610e0a565b604051601f8301601f191681016020018281118282101715610a5c57610a5c610e0a565b604052828152848301602001861015610a73578384fd5b82602086016020830137918201602001929092529392505050565b600060208284031215610a9f578081fd5b610aa8826109f1565b9392505050565b60008060008060008060c08789031215610ac7578182fd5b610ad0876109f1565b9550602087013567ffffffffffffffff80821115610aec578384fd5b610af88a838b01610a0d565b96506040890135915080821115610b0d578384fd5b50610b1a89828a01610a0d565b94505060608701359250610b30608088016109f1565b915060a08701358015158114610b44578182fd5b809150509295509295509295565b600060208284031215610b63578081fd5b5035919050565b60008151808452815b81811015610b8f57602081850181015186830182015201610b73565b81811115610ba05782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b60006001600160a01b03808916835260c06020840152610bec60c0840189610b6a565b8381036040850152610bfe8189610b6a565b60608501979097525093909316608082015290151560a090910152509392505050565b6020808252825182820181905260009190848201906040850190845b81811015610c625783516001600160a01b031683529284019291840191600101610c3d565b50909695505050505050565b9115158252602082015260400190565b60208082526015908201527f457263323020746f6b656e206e6f7420666f756e640000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526013908201527f546f6b656e20616c726561647920616464656400000000000000000000000000604082015260600190565b60208082526028908201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652070656e646960408201527f6e67206f776e6572000000000000000000000000000000000000000000000000606082015260800190565b90815260200190565b600082821015610d9957610d99610df4565b500390565b600281046001821680610db257607f821691505b60208210811415610dd357634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415610ded57610ded610df4565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220b34a1a0fdfe7acfbc72826e9f687798a46b465b2177da1b79ba1987aa09c34c064736f6c63430008000033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100c95760003560e01c80638da5cb5b11610081578063e48603391161005b578063e48603391461016f578063e5df8b8414610194578063f2fde38b146101a7576100c9565b80638da5cb5b1461013f5780639309625614610154578063e30c397814610167576100c9565b80634e71e0c8116100b25780634e71e0c81461010d5780635fa7b584146101175780636f16dac21461012a576100c9565b80632335093c146100ce5780634ae21306146100f8575b600080fd5b6100e16100dc366004610a8e565b6101ba565b6040516100ef929190610c6e565b60405180910390f35b61010061023b565b6040516100ef9190610d7e565b610115610241565b005b610115610125366004610a8e565b6102e3565b6101326104db565b6040516100ef9190610c21565b61014761053d565b6040516100ef9190610bb5565b610115610162366004610aaf565b61054c565b61014761071d565b61018261017d366004610a8e565b61072c565b6040516100ef96959493929190610bc9565b6101476101a2366004610b52565b61088a565b6101156101b5366004610a8e565b6108b4565b60008060005b60025481101561022d57836001600160a01b0316600282815481106101f557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316141561021b57600192509050610236565b8061022581610dd9565b9150506101c0565b50600080915091505b915091565b60025490565b610249610915565b6001600160a01b031661025a61071d565b6001600160a01b0316146102895760405162461bcd60e51b815260040161028090610d21565b60405180910390fd5b60018054600080546001600160a01b038084166001600160a01b031992831617808455919093169093556040519092909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3565b6102eb610915565b6001600160a01b03166102fc61053d565b6001600160a01b0316146103225760405162461bcd60e51b815260040161028090610cb5565b60008061032e836101ba565b915091508161034f5760405162461bcd60e51b815260040161028090610c7e565b600254600110156103f1576002805461036a90600190610d87565b8154811061038857634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600280546001600160a01b0390921691839081106103c257634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b600280548061041057634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160a01b031990811690915593019093556001600160a01b038616815260039092526040822080549091168155906104626001830182610919565b610470600283016000610919565b50600060038201819055600490910180547fffffffffffffffffffffff0000000000000000000000000000000000000000001690556040516001600160a01b038516917f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd391a2505050565b6060600280548060200260200160405190810160405280929190818152602001828054801561053357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610515575b5050505050905090565b6000546001600160a01b031690565b610554610915565b6001600160a01b031661056561053d565b6001600160a01b03161461058b5760405162461bcd60e51b815260040161028090610cb5565b6000610596876101ba565b50905080156105b75760405162461bcd60e51b815260040161028090610cea565b6040805160c0810182526001600160a01b0389811680835260208084018b81528486018b9052606085018a9052888416608086015287151560a086015260009283526003825294909120835181546001600160a01b0319169316929092178255925180519293919261062f9260018501920190610958565b506040820151805161064b916002840191602090910190610958565b506060820151600382015560808201516004909101805460a0909301511515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff6001600160a01b039384166001600160a01b031995861617161790556002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace018054928b1692909316821790925560405190917f784c8f4dbf0ffedd6e72c76501c545a70f8b203b30a26ce542bf92ba87c248a491a250505050505050565b6001546001600160a01b031690565b600360205260009081526040902080546001820180546001600160a01b03909216929161075890610d9e565b80601f016020809104026020016040519081016040528092919081815260200182805461078490610d9e565b80156107d15780601f106107a6576101008083540402835291602001916107d1565b820191906000526020600020905b8154815290600101906020018083116107b457829003601f168201915b5050505050908060020180546107e690610d9e565b80601f016020809104026020016040519081016040528092919081815260200182805461081290610d9e565b801561085f5780601f106108345761010080835404028352916020019161085f565b820191906000526020600020905b81548152906001019060200180831161084257829003601f168201915b5050505060038301546004909301549192916001600160a01b0381169150600160a01b900460ff1686565b6002818154811061089a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6108bc610915565b6001600160a01b03166108cd61053d565b6001600160a01b0316146108f35760405162461bcd60e51b815260040161028090610cb5565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b50805461092590610d9e565b6000825580601f106109375750610955565b601f01602090049060005260206000209081019061095591906109dc565b50565b82805461096490610d9e565b90600052602060002090601f01602090048101928261098657600085556109cc565b82601f1061099f57805160ff19168380011785556109cc565b828001600101855582156109cc579182015b828111156109cc5782518255916020019190600101906109b1565b506109d89291506109dc565b5090565b5b808211156109d857600081556001016109dd565b80356001600160a01b0381168114610a0857600080fd5b919050565b600082601f830112610a1d578081fd5b813567ffffffffffffffff80821115610a3857610a38610e0a565b604051601f8301601f191681016020018281118282101715610a5c57610a5c610e0a565b604052828152848301602001861015610a73578384fd5b82602086016020830137918201602001929092529392505050565b600060208284031215610a9f578081fd5b610aa8826109f1565b9392505050565b60008060008060008060c08789031215610ac7578182fd5b610ad0876109f1565b9550602087013567ffffffffffffffff80821115610aec578384fd5b610af88a838b01610a0d565b96506040890135915080821115610b0d578384fd5b50610b1a89828a01610a0d565b94505060608701359250610b30608088016109f1565b915060a08701358015158114610b44578182fd5b809150509295509295509295565b600060208284031215610b63578081fd5b5035919050565b60008151808452815b81811015610b8f57602081850181015186830182015201610b73565b81811115610ba05782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b60006001600160a01b03808916835260c06020840152610bec60c0840189610b6a565b8381036040850152610bfe8189610b6a565b60608501979097525093909316608082015290151560a090910152509392505050565b6020808252825182820181905260009190848201906040850190845b81811015610c625783516001600160a01b031683529284019291840191600101610c3d565b50909695505050505050565b9115158252602082015260400190565b60208082526015908201527f457263323020746f6b656e206e6f7420666f756e640000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526013908201527f546f6b656e20616c726561647920616464656400000000000000000000000000604082015260600190565b60208082526028908201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652070656e646960408201527f6e67206f776e6572000000000000000000000000000000000000000000000000606082015260800190565b90815260200190565b600082821015610d9957610d99610df4565b500390565b600281046001821680610db257607f821691505b60208210811415610dd357634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415610ded57610ded610df4565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220b34a1a0fdfe7acfbc72826e9f687798a46b465b2177da1b79ba1987aa09c34c064736f6c63430008000033

Deployed Bytecode Sourcemap

90:1918:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1475:291;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;1892:114;;;:::i;:::-;;;;;;;:::i;1901:185:3:-;;;:::i;:::-;;1031:438:2;;;;;;:::i;:::-;;:::i;1772:114::-;;;:::i;:::-;;;;;;;:::i;1104:77:3:-;;;:::i;:::-;;;;;;;:::i;504:521:2:-;;;;;;:::i;:::-;;:::i;1255:91:3:-;;;:::i;458:39:2:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;;:::i;421:31::-;;;;;;:::i;:::-;;:::i;1790:105:3:-;;;;;;:::i;:::-;;:::i;1475:291:2:-;1536:10;1548:13;1578:9;1573:160;1597:14;:21;1593:25;;1573:160;;;1664:8;-1:-1:-1;;;;;1643:29:2;:14;1658:1;1643:17;;;;;;-1:-1:-1;;;1643:17:2;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1643:17:2;:29;1639:84;;;1700:4;;-1:-1:-1;1706:1:2;-1:-1:-1;1692:16:2;;1639:84;1620:3;;;;:::i;:::-;;;;1573:160;;;;1750:5;1757:1;1742:17;;;;1475:291;;;;:::o;1892:114::-;1978:14;:21;1892:114;:::o;1901:185:3:-;1709:12;:10;:12::i;:::-;-1:-1:-1;;;;;1691:30:3;:14;:12;:14::i;:::-;-1:-1:-1;;;;;1691:30:3;;1683:83;;;;-1:-1:-1;;;1683:83:3;;;;;;;:::i;:::-;;;;;;;;;1972:13:::1;::::0;;::::1;1963:22:::0;;-1:-1:-1;;;;;1972:13:3;;::::1;-1:-1:-1::0;;;;;;1963:22:3;;::::1;;::::0;;;1995:26;;;::::1;::::0;;;2036:43:::1;::::0;1972:13;;2057:6;;::::1;::::0;2036:43:::1;::::0;1972:13;;2036:43:::1;1901:185::o:0;1031:438:2:-;1484:12:3;:10;:12::i;:::-;-1:-1:-1;;;;;1473:23:3;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1473:23:3;;1465:68;;;;-1:-1:-1;;;1465:68:3;;;;;;;:::i;:::-;1117:10:2::1;1129:13:::0;1146:27:::1;1159:13;1146:12;:27::i;:::-;1116:57;;;;1191:5;1183:39;;;;-1:-1:-1::0;;;1183:39:2::1;;;;;;;:::i;:::-;1236:14;:21:::0;1260:1:::1;-1:-1:-1::0;1232:121:2::1;;;1301:14;1316:21:::0;;:25:::1;::::0;1340:1:::1;::::0;1316:25:::1;:::i;:::-;1301:41;;;;;;-1:-1:-1::0;;;1301:41:2::1;;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;1277:14:::1;:21:::0;;-1:-1:-1;;;;;1301:41:2;;::::1;::::0;1292:5;;1277:21;::::1;;;-1:-1:-1::0;;;1277:21:2::1;;;;;;;;;;;;;;;;;:65;;;;;-1:-1:-1::0;;;;;1277:65:2::1;;;;;-1:-1:-1::0;;;;;1277:65:2::1;;;;;;1232:121;1362:14;:20;;;;;-1:-1:-1::0;;;1362:20:2::1;;;;;;;;;;::::0;;;::::1;::::0;;;;;-1:-1:-1;;1362:20:2;;;;;-1:-1:-1;;;;;;1362:20:2;;::::1;::::0;;;;;;;;-1:-1:-1;;;;;1399:21:2;::::1;::::0;;:6:::1;:21:::0;;;;;;1392:28;;;;::::1;::::0;;1399:21;1392:28:::1;1362:20;1392:28:::0;::::1;1362:20:::0;1392:28:::1;:::i;:::-;;;::::0;::::1;;;:::i;:::-;-1:-1:-1::0;1392:28:2::1;;::::0;::::1;::::0;;;::::1;::::0;;::::1;::::0;;;;;;1435:27:::1;::::0;-1:-1:-1;;;;;1435:27:2;::::1;::::0;::::1;::::0;::::1;1543:1:3;;1031:438:2::0;:::o;1772:114::-;1826:16;1865:14;1858:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1858:21:2;;;;;;;;;;;;;;;;;;;;;;;1772:114;:::o;1104:77:3:-;1142:7;1168:6;-1:-1:-1;;;;;1168:6:3;1104:77;:::o;504:521:2:-;1484:12:3;:10;:12::i;:::-;-1:-1:-1;;;;;1473:23:3;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1473:23:3;;1465:68;;;;-1:-1:-1;;;1465:68:3;;;;;;;:::i;:::-;733:10:2::1;748:27;761:13;748:12;:27::i;:::-;732:43;;;794:5;793:6;785:38;;;;-1:-1:-1::0;;;785:38:2::1;;;;;;;:::i;:::-;857:77;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;857:77:2;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;;;;;;;;;;;;;;;;::::1;::::0;;;;;::::1;;::::0;;;;-1:-1:-1;833:21:2;;;:6:::1;:21:::0;;;;;;:101;;;;-1:-1:-1;;;;;;833:101:2::1;::::0;::::1;::::0;;;::::1;::::0;;;;;;857:77;;833:21;;:101:::1;::::0;-1:-1:-1;833:101:2;::::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;833:101:2::1;::::0;::::1;::::0;;;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;833:101:2::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;;-1:-1:-1::0;;;833:101:2::1;::::0;-1:-1:-1;;;;;833:101:2;;::::1;-1:-1:-1::0;;;;;;833:101:2;;::::1;;;;::::0;;944:14:::1;:34:::0;;833:101;944:34;::::1;::::0;;833:101:::1;944:34:::0;;;;::::1;::::0;;;;::::1;::::0;;;::::1;::::0;::::1;::::0;;;993:25:::1;::::0;944:34;;993:25:::1;::::0;::::1;1543:1:3;504:521:2::0;;;;;;:::o;1255:91:3:-;1326:13;;-1:-1:-1;;;;;1326:13:3;1255:91;:::o;458:39:2:-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;458:39:2;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;458:39:2;;;;;;;;;;;;-1:-1:-1;;;;;458:39:2;;;-1:-1:-1;;;;458:39:2;;;;;:::o;421:31::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;421:31:2;;-1:-1:-1;421:31:2;:::o;1790:105:3:-;1484:12;:10;:12::i;:::-;-1:-1:-1;;;;;1473:23:3;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1473:23:3;;1465:68;;;;-1:-1:-1;;;1465:68:3;;;;;;;:::i;:::-;1864:13:::1;:24:::0;;-1:-1:-1;;;;;;1864:24:3::1;-1:-1:-1::0;;;;;1864:24:3;;;::::1;::::0;;;::::1;::::0;;1790:105::o;586:96:9:-;665:10;586:96;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:198:12;84:20;;-1:-1:-1;;;;;133:54:12;;123:65;;113:2;;202:1;199;192:12;113:2;65:147;;;:::o;217:713::-;;315:3;308:4;300:6;296:17;292:27;282:2;;337:5;330;323:20;282:2;377:6;364:20;403:18;440:2;436;433:10;430:2;;;446:18;;:::i;:::-;495:2;489:9;564:2;545:13;;-1:-1:-1;;541:27:12;529:40;;571:4;525:51;591:18;;;611:22;;;588:46;585:2;;;637:18;;:::i;:::-;673:2;666:22;697:18;;;734:15;;;751:4;730:26;727:35;-1:-1:-1;724:2:12;;;779:5;772;765:20;724:2;847;840:4;832:6;828:17;821:4;813:6;809:17;796:54;870:15;;;887:4;866:26;859:41;;;;874:6;272:658;-1:-1:-1;;;272:658:12:o;935:198::-;;1047:2;1035:9;1026:7;1022:23;1018:32;1015:2;;;1068:6;1060;1053:22;1015:2;1096:31;1117:9;1096:31;:::i;:::-;1086:41;1005:128;-1:-1:-1;;;1005:128:12:o;1138:971::-;;;;;;;1352:3;1340:9;1331:7;1327:23;1323:33;1320:2;;;1374:6;1366;1359:22;1320:2;1402:31;1423:9;1402:31;:::i;:::-;1392:41;;1484:2;1473:9;1469:18;1456:32;1507:18;1548:2;1540:6;1537:14;1534:2;;;1569:6;1561;1554:22;1534:2;1597:52;1641:7;1632:6;1621:9;1617:22;1597:52;:::i;:::-;1587:62;;1702:2;1691:9;1687:18;1674:32;1658:48;;1731:2;1721:8;1718:16;1715:2;;;1752:6;1744;1737:22;1715:2;;1780:54;1826:7;1815:8;1804:9;1800:24;1780:54;:::i;:::-;1770:64;;;1881:2;1870:9;1866:18;1853:32;1843:42;;1904:41;1940:3;1929:9;1925:19;1904:41;:::i;:::-;1894:51;;1995:3;1984:9;1980:19;1967:33;2043:5;2036:13;2029:21;2022:5;2019:32;2009:2;;2070:6;2062;2055:22;2009:2;2098:5;2088:15;;;1310:799;;;;;;;;:::o;2114:190::-;;2226:2;2214:9;2205:7;2201:23;2197:32;2194:2;;;2247:6;2239;2232:22;2194:2;-1:-1:-1;2275:23:12;;2184:120;-1:-1:-1;2184:120:12:o;2309:478::-;;2391:5;2385:12;2418:6;2413:3;2406:19;2443:3;2455:162;2469:6;2466:1;2463:13;2455:162;;;2531:4;2587:13;;;2583:22;;2577:29;2559:11;;;2555:20;;2548:59;2484:12;2455:162;;;2635:6;2632:1;2629:13;2626:2;;;2701:3;2694:4;2685:6;2680:3;2676:16;2672:27;2665:40;2626:2;-1:-1:-1;2769:2:12;2748:15;-1:-1:-1;;2744:29:12;2735:39;;;;2776:4;2731:50;;2361:426;-1:-1:-1;;2361:426:12:o;2792:226::-;-1:-1:-1;;;;;2956:55:12;;;;2938:74;;2926:2;2911:18;;2893:125::o;3023:764::-;;-1:-1:-1;;;;;3399:2:12;3391:6;3387:15;3376:9;3369:34;3439:3;3434:2;3423:9;3419:18;3412:31;3466:48;3509:3;3498:9;3494:19;3486:6;3466:48;:::i;:::-;3562:9;3554:6;3550:22;3545:2;3534:9;3530:18;3523:50;3590:35;3618:6;3610;3590:35;:::i;:::-;3656:2;3641:18;;3634:34;;;;-1:-1:-1;3705:15:12;;;;3699:3;3684:19;;3677:44;3765:14;;3758:22;3752:3;3737:19;;;3730:51;-1:-1:-1;3582:43:12;3298:489;-1:-1:-1;;;3298:489:12:o;3792:684::-;3963:2;4015:21;;;4085:13;;3988:18;;;4107:22;;;3792:684;;3963:2;4186:15;;;;4160:2;4145:18;;;3792:684;4232:218;4246:6;4243:1;4240:13;4232:218;;;4311:13;;-1:-1:-1;;;;;4307:62:12;4295:75;;4425:15;;;;4390:12;;;;4268:1;4261:9;4232:218;;;-1:-1:-1;4467:3:12;;3943:533;-1:-1:-1;;;;;;3943:533:12:o;4481:258::-;4674:14;;4667:22;4649:41;;4721:2;4706:18;;4699:34;4637:2;4622:18;;4604:135::o;4744:345::-;4946:2;4928:21;;;4985:2;4965:18;;;4958:30;5024:23;5019:2;5004:18;;4997:51;5080:2;5065:18;;4918:171::o;5094:356::-;5296:2;5278:21;;;5315:18;;;5308:30;5374:34;5369:2;5354:18;;5347:62;5441:2;5426:18;;5268:182::o;5455:343::-;5657:2;5639:21;;;5696:2;5676:18;;;5669:30;5735:21;5730:2;5715:18;;5708:49;5789:2;5774:18;;5629:169::o;5803:404::-;6005:2;5987:21;;;6044:2;6024:18;;;6017:30;6083:34;6078:2;6063:18;;6056:62;6154:10;6149:2;6134:18;;6127:38;6197:3;6182:19;;5977:230::o;6212:177::-;6358:25;;;6346:2;6331:18;;6313:76::o;6394:125::-;;6462:1;6459;6456:8;6453:2;;;6467:18;;:::i;:::-;-1:-1:-1;6504:9:12;;6443:76::o;6524:437::-;6609:1;6599:12;;6656:1;6646:12;;;6667:2;;6721:4;6713:6;6709:17;6699:27;;6667:2;6774;6766:6;6763:14;6743:18;6740:38;6737:2;;;-1:-1:-1;;;6808:1:12;6801:88;6912:4;6909:1;6902:15;6940:4;6937:1;6930:15;6737:2;;6579:382;;;:::o;6966:135::-;;-1:-1:-1;;7026:17:12;;7023:2;;;7046:18;;:::i;:::-;-1:-1:-1;7093:1:12;7082:13;;7013:88::o;7106:184::-;-1:-1:-1;;;7155:1:12;7148:88;7255:4;7252:1;7245:15;7279:4;7276:1;7269:15;7295:184;-1:-1:-1;;;7344:1:12;7337:88;7444:4;7441:1;7434:15;7468:4;7465:1;7458:15

Swarm Source

ipfs://b34a1a0fdfe7acfbc72826e9f687798a46b465b2177da1b79ba1987aa09c34c0

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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