ETH Price: $2,066.47 (+2.46%)
Gas: 0.15 Gwei

Contract

0x0088EBff4015C2c210cf0D2f1F3db732d756dce2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Tokens141441822022-02-05 5:50:101494 days ago1644040210IN
0x0088EBff...2d756dce2
0 ETH0.0080708984.35657029
Withdraw Tokens141441682022-02-05 5:47:081494 days ago1644040028IN
0x0088EBff...2d756dce2
0 ETH0.0080810284.52605165
Withdraw Tokens141441622022-02-05 5:43:451494 days ago1644039825IN
0x0088EBff...2d756dce2
0 ETH0.0068568971.75787641
Set Active State141339302022-02-03 15:57:521496 days ago1643903872IN
0x0088EBff...2d756dce2
0 ETH0.00322582134.62828012
Receive Tokens F...141193022022-02-01 9:19:491498 days ago1643707189IN
0x0088EBff...2d756dce2
0.00379454 ETH0.027655784.70692278
Receive Tokens F...141186192022-02-01 6:42:321498 days ago1643697752IN
0x0088EBff...2d756dce2
0.00383429 ETH0.03601332110.30960675
Receive Tokens F...140958912022-01-28 18:49:501501 days ago1643395790IN
0x0088EBff...2d756dce2
0.00402573 ETH0.05142781157.51872594
Receive Tokens F...140679382022-01-24 10:57:451506 days ago1643021865IN
0x0088EBff...2d756dce2
0.00423392 ETH0.05250317126.58229439
Receive Tokens F...140617372022-01-23 11:58:521507 days ago1642939132IN
0x0088EBff...2d756dce2
0.0039985 ETH0.0245030175.05325465
Receive Tokens F...140606572022-01-23 7:58:091507 days ago1642924689IN
0x0088EBff...2d756dce2
0.00400681 ETH0.0312329795.6672649
Receive Tokens F...140558012022-01-22 13:52:401508 days ago1642859560IN
0x0088EBff...2d756dce2
0.00401098 ETH0.0406491398.00285543
Receive Tokens F...140477042022-01-21 7:52:361509 days ago1642751556IN
0x0088EBff...2d756dce2
0.0037342 ETH0.0374478114.70343497
Receive Tokens F...140435122022-01-20 16:23:471510 days ago1642695827IN
0x0088EBff...2d756dce2
0.00353727 ETH0.0310998595.25953694
Receive Tokens F...140432432022-01-20 15:26:181510 days ago1642692378IN
0x0088EBff...2d756dce2
0.00353791 ETH0.021559366.03418675
Receive Tokens F...140413622022-01-20 8:36:441510 days ago1642667804IN
0x0088EBff...2d756dce2
0.00359288 ETH0.0232972271.35989996
Receive Tokens F...140371962022-01-19 17:04:501511 days ago1642611890IN
0x0088EBff...2d756dce2
0.00361292 ETH0.0320298298.10806316
Receive Tokens F...140369552022-01-19 16:12:171511 days ago1642608737IN
0x0088EBff...2d756dce2
0.00360096 ETH0.05094898156.05211011
Receive Tokens F...140358772022-01-19 12:02:161511 days ago1642593736IN
0x0088EBff...2d756dce2
0.00360705 ETH0.0229947270.43332903
Receive Tokens F...140337392022-01-19 4:06:071511 days ago1642565167IN
0x0088EBff...2d756dce2
0.00361285 ETH0.0411991299.32885145
Receive Tokens F...140315612022-01-18 19:56:241511 days ago1642535784IN
0x0088EBff...2d756dce2
0.00360234 ETH0.03675739112.58869723
Fund Send To Des...140299452022-01-18 14:07:121512 days ago1642514832IN
0x0088EBff...2d756dce2
0.002 ETH0.00770701141.9
Receive Tokens F...140299292022-01-18 14:02:061512 days ago1642514526IN
0x0088EBff...2d756dce2
0.00359217 ETH0.0342189382.5
Receive Tokens F...140298182022-01-18 13:39:251512 days ago1642513165IN
0x0088EBff...2d756dce2
0.00359861 ETH0.0316764397.02561271
Receive Tokens F...140213162022-01-17 6:12:501513 days ago1642399970IN
0x0088EBff...2d756dce2
0.00353405 ETH0.03848171117.87031408
Receive Tokens F...140211772022-01-17 5:42:251513 days ago1642398145IN
0x0088EBff...2d756dce2
0.00353742 ETH0.04190251128.34832215
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
-141193022022-02-01 9:19:491498 days ago1643707189
0x0088EBff...2d756dce2
0.002 ETH
-141193022022-02-01 9:19:491498 days ago1643707189
0x0088EBff...2d756dce2
0.00179454 ETH
-141186192022-02-01 6:42:321498 days ago1643697752
0x0088EBff...2d756dce2
0.002 ETH
-141186192022-02-01 6:42:321498 days ago1643697752
0x0088EBff...2d756dce2
0.00183429 ETH
-140958912022-01-28 18:49:501501 days ago1643395790
0x0088EBff...2d756dce2
0.002 ETH
-140958912022-01-28 18:49:501501 days ago1643395790
0x0088EBff...2d756dce2
0.00202573 ETH
-140679382022-01-24 10:57:451506 days ago1643021865
0x0088EBff...2d756dce2
0.002 ETH
-140679382022-01-24 10:57:451506 days ago1643021865
0x0088EBff...2d756dce2
0.00223392 ETH
-140617372022-01-23 11:58:521507 days ago1642939132
0x0088EBff...2d756dce2
0.002 ETH
-140617372022-01-23 11:58:521507 days ago1642939132
0x0088EBff...2d756dce2
0.0019985 ETH
-140606572022-01-23 7:58:091507 days ago1642924689
0x0088EBff...2d756dce2
0.002 ETH
-140606572022-01-23 7:58:091507 days ago1642924689
0x0088EBff...2d756dce2
0.00200681 ETH
-140558012022-01-22 13:52:401508 days ago1642859560
0x0088EBff...2d756dce2
0.002 ETH
-140558012022-01-22 13:52:401508 days ago1642859560
0x0088EBff...2d756dce2
0.00201098 ETH
-140477042022-01-21 7:52:361509 days ago1642751556
0x0088EBff...2d756dce2
0.002 ETH
-140477042022-01-21 7:52:361509 days ago1642751556
0x0088EBff...2d756dce2
0.0017342 ETH
-140435122022-01-20 16:23:471510 days ago1642695827
0x0088EBff...2d756dce2
0.002 ETH
-140435122022-01-20 16:23:471510 days ago1642695827
0x0088EBff...2d756dce2
0.00153727 ETH
-140432432022-01-20 15:26:181510 days ago1642692378
0x0088EBff...2d756dce2
0.002 ETH
-140432432022-01-20 15:26:181510 days ago1642692378
0x0088EBff...2d756dce2
0.00153791 ETH
-140413622022-01-20 8:36:441510 days ago1642667804
0x0088EBff...2d756dce2
0.002 ETH
-140413622022-01-20 8:36:441510 days ago1642667804
0x0088EBff...2d756dce2
0.00159288 ETH
-140371962022-01-19 17:04:501511 days ago1642611890
0x0088EBff...2d756dce2
0.002 ETH
-140371962022-01-19 17:04:501511 days ago1642611890
0x0088EBff...2d756dce2
0.00161292 ETH
-140369552022-01-19 16:12:171511 days ago1642608737
0x0088EBff...2d756dce2
0.002 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xBCD5e634...D4230230a
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
OKLGAtomicSwapInstance

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import '@openzeppelin/contracts/interfaces/IERC20.sol';
import './OKLGProduct.sol';

interface IERC20Decimals is IERC20 {
  function decimals() external view returns (uint8);
}

/**
 * @title OKLGAtomicSwapInstance
 * @dev This is the main contract that supports holding metadata for OKLG atomic inter and intrachain swapping
 */
contract OKLGAtomicSwapInstance is OKLGProduct {
  IERC20Decimals private _token;

  address public tokenOwner;
  address payable public oracleAddress;
  uint256 public maxSwapAmount;
  uint8 public targetTokenDecimals;
  uint256 public minimumGasForOperation = 2 * 10**15; // 2 finney (0.002 ETH)
  bool public isActive = true;

  struct Swap {
    bytes32 id;
    uint256 origTimestamp;
    uint256 currentTimestamp;
    bool isOutbound;
    bool isComplete;
    bool isRefunded;
    bool isSendGasFunded;
    address swapAddress;
    uint256 amount;
  }

  mapping(bytes32 => Swap) public swaps;
  mapping(address => Swap) public lastUserSwap;

  event ReceiveTokensFromSource(
    bytes32 indexed id,
    uint256 origTimestamp,
    address sender,
    uint256 amount
  );

  event SendTokensToDestination(
    bytes32 indexed id,
    address receiver,
    uint256 amount
  );

  event RefundTokensToSource(
    bytes32 indexed id,
    address sender,
    uint256 amount
  );

  event TokenOwnerUpdated(address previousOwner, address newOwner);

  constructor(
    address _costToken,
    address _spendAddress,
    address _oracleAddress,
    address _tokenOwner,
    address _tokenAddy,
    uint8 _targetTokenDecimals,
    uint256 _maxSwapAmount
  ) OKLGProduct(uint8(7), _costToken, _spendAddress) {
    oracleAddress = payable(_oracleAddress);
    tokenOwner = _tokenOwner;
    maxSwapAmount = _maxSwapAmount;
    targetTokenDecimals = _targetTokenDecimals;
    _token = IERC20Decimals(_tokenAddy);
  }

  function getSwapTokenAddress() external view returns (address) {
    return address(_token);
  }

  function setActiveState(bool _isActive) external {
    require(
      msg.sender == owner() || msg.sender == tokenOwner,
      'setActiveState user must be contract creator'
    );
    isActive = _isActive;
  }

  function setOracleAddress(address _oracleAddress) external onlyOwner {
    oracleAddress = payable(_oracleAddress);
    transferOwnership(oracleAddress);
  }

  function setTargetTokenDecimals(uint8 _decimals) external onlyOwner {
    targetTokenDecimals = _decimals;
  }

  function setTokenOwner(address newOwner) external {
    require(
      msg.sender == tokenOwner,
      'user must be current token owner to change it'
    );
    address previousOwner = tokenOwner;
    tokenOwner = newOwner;
    emit TokenOwnerUpdated(previousOwner, newOwner);
  }

  function withdrawTokens(uint256 _amount) external {
    require(
      msg.sender == tokenOwner,
      'withdrawTokens user must be token owner'
    );
    _token.transfer(msg.sender, _amount);
  }

  function setSwapCompletionStatus(bytes32 _id, bool _isComplete)
    external
    onlyOwner
  {
    swaps[_id].isComplete = _isComplete;
  }

  function setMinimumGasForOperation(uint256 _amountGas) external onlyOwner {
    minimumGasForOperation = _amountGas;
  }

  function receiveTokensFromSource(uint256 _amount)
    external
    payable
    returns (bytes32, uint256)
  {
    require(isActive, 'this atomic swap instance is not active');
    require(
      msg.value >= minimumGasForOperation,
      'you must also send enough gas to cover the target transaction'
    );
    require(
      maxSwapAmount == 0 || _amount <= maxSwapAmount,
      'trying to send more than maxSwapAmount'
    );

    _payForService(minimumGasForOperation);

    if (minimumGasForOperation > 0) {
      oracleAddress.call{ value: minimumGasForOperation }('');
    }
    _token.transferFrom(msg.sender, address(this), _amount);

    uint256 _ts = block.timestamp;
    bytes32 _id = sha256(abi.encodePacked(msg.sender, _ts, _amount));
    swaps[_id] = Swap({
      id: _id,
      origTimestamp: _ts,
      currentTimestamp: _ts,
      isOutbound: false,
      isComplete: false,
      isRefunded: false,
      isSendGasFunded: false,
      swapAddress: msg.sender,
      amount: _amount
    });
    lastUserSwap[msg.sender] = swaps[_id];
    emit ReceiveTokensFromSource(_id, _ts, msg.sender, _amount);
    return (_id, _ts);
  }

  function unsetLastUserSwap(address _addy) external onlyOwner {
    delete lastUserSwap[_addy];
  }

  // msg.sender must be the user who originally created the swap.
  // Otherwise, the unique identifier will not match from the originally
  // sending txn.
  //
  // NOTE: We're aware this function can be spoofed by creating a sha256 hash of msg.sender's address
  // and _origTimestamp, but it's important to note refundTokensFromSource and sendTokensToDestination
  // can only be executed by the owner/oracle. Therefore validation should be done by the oracle before
  // executing those and the only possibility of a vulnerability is if someone has compromised the oracle account.
  function fundSendToDestinationGas(
    bytes32 _id,
    uint256 _origTimestamp,
    uint256 _amount
  ) external payable {
    require(
      msg.value >= minimumGasForOperation,
      'you must send enough gas to cover the send transaction'
    );
    require(
      _id == sha256(abi.encodePacked(msg.sender, _origTimestamp, _amount)),
      "we don't recognize this swap"
    );
    if (minimumGasForOperation > 0) {
      oracleAddress.call{ value: minimumGasForOperation }('');
    }
    swaps[_id] = Swap({
      id: _id,
      origTimestamp: _origTimestamp,
      currentTimestamp: block.timestamp,
      isOutbound: true,
      isComplete: false,
      isRefunded: false,
      isSendGasFunded: true,
      swapAddress: msg.sender,
      amount: _amount
    });
  }

  // This must be called AFTER fundSendToDestinationGas has been executed
  // for this txn to fund this send operation
  function refundTokensFromSource(bytes32 _id) external {
    require(isActive, 'this atomic swap instance is not active');

    Swap storage swap = swaps[_id];

    _confirmSwapExistsGasFundedAndSenderValid(swap);
    swap.isRefunded = true;
    _token.transfer(swap.swapAddress, swap.amount);
    emit RefundTokensToSource(_id, swap.swapAddress, swap.amount);
  }

  // This must be called AFTER fundSendToDestinationGas has been executed
  // for this txn to fund this send operation
  function sendTokensToDestination(bytes32 _id) external returns (bytes32) {
    require(isActive, 'this atomic swap instance is not active');

    Swap storage swap = swaps[_id];

    _confirmSwapExistsGasFundedAndSenderValid(swap);

    // handle if this token and target chain token in bridge have different decimals
    // current decimals = 9 -- 100 tokens == 100000000000
    // target decimals = 18 -- 100 tokens == 100000000000000000000
    // to get current amount to transfer, need to multiply by ratio of 10^currentDecimals / 10^targetDecimals
    uint256 _swapAmount = swap.amount;
    if (targetTokenDecimals > 0) {
      _swapAmount =
        (_swapAmount * 10**_token.decimals()) /
        10**targetTokenDecimals;
    }
    _token.transfer(swap.swapAddress, _swapAmount);

    swap.currentTimestamp = block.timestamp;
    swap.isComplete = true;
    emit SendTokensToDestination(_id, swap.swapAddress, _swapAmount);
    return _id;
  }

  function _confirmSwapExistsGasFundedAndSenderValid(Swap memory swap)
    private
    view
    onlyOwner
  {
    // functions that call this should only be called by the current owner
    // or oracle address as they will do the appropriate validation beforehand
    // to confirm the receiving swap is valid before sending tokens to the user.
    require(
      swap.origTimestamp > 0 && swap.amount > 0,
      'swap does not exist yet.'
    );
    // We're just validating here that the swap has not been
    // completed and gas has been funded before moving forward.
    require(
      !swap.isComplete && !swap.isRefunded && swap.isSendGasFunded,
      'swap has already been completed, refunded, or gas has not been funded'
    );
  }
}

File 2 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import '@openzeppelin/contracts/interfaces/IERC20.sol';
import './interfaces/IOKLGSpend.sol';
import './OKLGWithdrawable.sol';

/**
 * @title OKLGProduct
 * @dev Contract that every product developed in the OKLG ecosystem should implement
 */
contract OKLGProduct is OKLGWithdrawable {
  IERC20 private _token; // OKLG
  IOKLGSpend private _spend;

  uint8 public productID;

  constructor(
    uint8 _productID,
    address _tokenAddy,
    address _spendAddy
  ) {
    productID = _productID;
    _token = IERC20(_tokenAddy);
    _spend = IOKLGSpend(_spendAddy);
  }

  function setTokenAddy(address _tokenAddy) external onlyOwner {
    _token = IERC20(_tokenAddy);
  }

  function setSpendAddy(address _spendAddy) external onlyOwner {
    _spend = IOKLGSpend(_spendAddy);
  }

  function setProductID(uint8 _newId) external onlyOwner {
    productID = _newId;
  }

  function getTokenAddress() public view returns (address) {
    return address(_token);
  }

  function getSpendAddress() public view returns (address) {
    return address(_spend);
  }

  function _payForService(uint256 _weiToRemoveFromSpend) internal {
    _spend.spendOnProduct{ value: msg.value - _weiToRemoveFromSpend }(
      msg.sender,
      productID
    );
  }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/**
 * @title IOKLGSpend
 * @dev Logic for spending OKLG on products in the product ecosystem.
 */
interface IOKLGSpend {
  function spendOnProduct(address _payor, uint8 _product) external payable;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/interfaces/IERC20.sol';

/**
 * @title OKLGWithdrawable
 * @dev Supports being able to get tokens or ETH out of a contract with ease
 */
contract OKLGWithdrawable is Ownable {
  function withdrawTokens(address _tokenAddy, uint256 _amount)
    external
    onlyOwner
  {
    IERC20 _token = IERC20(_tokenAddy);
    _amount = _amount > 0 ? _amount : _token.balanceOf(address(this));
    require(_amount > 0, 'make sure there is a balance available to withdraw');
    _token.transfer(owner(), _amount);
  }

  function withdrawETH() external onlyOwner {
    payable(owner()).call{ value: address(this).balance }('');
  }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_costToken","type":"address"},{"internalType":"address","name":"_spendAddress","type":"address"},{"internalType":"address","name":"_oracleAddress","type":"address"},{"internalType":"address","name":"_tokenOwner","type":"address"},{"internalType":"address","name":"_tokenAddy","type":"address"},{"internalType":"uint8","name":"_targetTokenDecimals","type":"uint8"},{"internalType":"uint256","name":"_maxSwapAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"origTimestamp","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReceiveTokensFromSource","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RefundTokensToSource","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SendTokensToDestination","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"TokenOwnerUpdated","type":"event"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"uint256","name":"_origTimestamp","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"fundSendToDestinationGas","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getSpendAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSwapTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastUserSwap","outputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint256","name":"origTimestamp","type":"uint256"},{"internalType":"uint256","name":"currentTimestamp","type":"uint256"},{"internalType":"bool","name":"isOutbound","type":"bool"},{"internalType":"bool","name":"isComplete","type":"bool"},{"internalType":"bool","name":"isRefunded","type":"bool"},{"internalType":"bool","name":"isSendGasFunded","type":"bool"},{"internalType":"address","name":"swapAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSwapAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumGasForOperation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"productID","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"receiveTokensFromSource","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"refundTokensFromSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"sendTokensToDestination","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setActiveState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountGas","type":"uint256"}],"name":"setMinimumGasForOperation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oracleAddress","type":"address"}],"name":"setOracleAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_newId","type":"uint8"}],"name":"setProductID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_spendAddy","type":"address"}],"name":"setSpendAddy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"bool","name":"_isComplete","type":"bool"}],"name":"setSwapCompletionStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_decimals","type":"uint8"}],"name":"setTargetTokenDecimals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddy","type":"address"}],"name":"setTokenAddy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setTokenOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"swaps","outputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint256","name":"origTimestamp","type":"uint256"},{"internalType":"uint256","name":"currentTimestamp","type":"uint256"},{"internalType":"bool","name":"isOutbound","type":"bool"},{"internalType":"bool","name":"isComplete","type":"bool"},{"internalType":"bool","name":"isRefunded","type":"bool"},{"internalType":"bool","name":"isSendGasFunded","type":"bool"},{"internalType":"address","name":"swapAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"targetTokenDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addy","type":"address"}],"name":"unsetLastUserSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddy","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x608060405266071afd498d00006008556009805460ff191660011790553480156200002957600080fd5b50604051620022e2380380620022e28339810160408190526200004c916200015b565b600787876200005b33620000ee565b60028054600180546001600160a01b03199081166001600160a01b03968716179091556001600160a81b0319909116600160a01b60ff9687160282161792841692909217905560058054821698831698909817909755600480548816968216969096179095556006919091556007805460ff19169290911691909117905560038054909316911617905550620001ee9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200015657600080fd5b919050565b600080600080600080600060e0888a03121562000176578283fd5b62000181886200013e565b965062000191602089016200013e565b9550620001a1604089016200013e565b9450620001b1606089016200013e565b9350620001c1608089016200013e565b925060a088015160ff81168114620001d7578283fd5b8092505060c0880151905092959891949750929550565b6120e480620001fe6000396000f3fe6080604052600436106101e35760003560e01c80639e9f695d11610102578063cd41ced011610095578063eba760d611610064578063eba760d614610671578063ed8f584b1461068f578063f2fde38b146106b7578063f9fb452f146106d757600080fd5b8063cd41ced0146105a3578063dc3aaab5146105c3578063e086e5ec146105e1578063eb84e7f2146105f657600080fd5b8063a89ae4ba116100d1578063a89ae4ba14610521578063ad70127814610541578063bfe22a011461056d578063cce987d41461058d57600080fd5b80639e9f695d146104a1578063a06bbf08146104c1578063a1734e60146104e1578063a3e676101461050157600080fd5b80634c69c00f1161017a5780638a2e386e116101495780638a2e386e1461038e5780638d17359e146103a15780638da5cb5b146103b7578063933a59db146103d557600080fd5b80634c69c00f14610319578063565e6d1c14610339578063715018a6146103595780637c0bf7bb1461036e57600080fd5b806318e02bd9116101b657806318e02bd91461028f57806322f3e2d4146102af578063315a095d146102d95780634bc10ccb146102f957600080fd5b806306b091f9146101e85780631028e4921461020a57806310fe9ae81461023d578063113d4e1e1461026f575b600080fd5b3480156101f457600080fd5b50610208610203366004611d86565b6106f8565b005b34801561021657600080fd5b5061022a610225366004611de7565b6108c3565b6040519081526020015b60405180910390f35b34801561024957600080fd5b506001546001600160a01b03165b6040516001600160a01b039091168152602001610234565b34801561027b57600080fd5b5061020861028a366004611d65565b610b50565b34801561029b57600080fd5b506102086102aa366004611d65565b610bba565b3480156102bb57600080fd5b506009546102c99060ff1681565b6040519015158152602001610234565b3480156102e557600080fd5b506102086102f4366004611de7565b610c8b565b34801561030557600080fd5b50610208610314366004611d65565b610d7d565b34801561032557600080fd5b50610208610334366004611d65565b610dc9565b34801561034557600080fd5b50610208610354366004611e17565b610e1d565b34801561036557600080fd5b50610208610e71565b34801561037a57600080fd5b50610208610389366004611d65565b610ea7565b61020861039c366004611e46565b610ef3565b3480156103ad57600080fd5b5061022a60085481565b3480156103c357600080fd5b506000546001600160a01b0316610257565b3480156103e157600080fd5b506104506103f0366004611d65565b600b602052600090815260409020805460018201546002830154600384015460049094015492939192909160ff808216926101008304821692620100008104831692630100000082041691600160201b9091046001600160a01b03169089565b60408051998a5260208a01989098529688019590955292151560608701529015156080860152151560a0850152151560c08401526001600160a01b031660e083015261010082015261012001610234565b3480156104ad57600080fd5b506102086104bc366004611e71565b611192565b3480156104cd57600080fd5b506102086104dc366004611e71565b6111dc565b3480156104ed57600080fd5b506102086104fc366004611de7565b61121c565b34801561050d57600080fd5b50600454610257906001600160a01b031681565b34801561052d57600080fd5b50600554610257906001600160a01b031681565b34801561054d57600080fd5b5060075461055b9060ff1681565b60405160ff9091168152602001610234565b34801561057957600080fd5b50610208610588366004611daf565b6113df565b34801561059957600080fd5b5061022a60065481565b3480156105af57600080fd5b506102086105be366004611de7565b611476565b3480156105cf57600080fd5b506002546001600160a01b0316610257565b3480156105ed57600080fd5b506102086114a5565b34801561060257600080fd5b50610450610611366004611de7565b600a602052600090815260409020805460018201546002830154600384015460049094015492939192909160ff808216926101008304821692620100008104831692630100000082041691600160201b9091046001600160a01b03169089565b34801561067d57600080fd5b506003546001600160a01b0316610257565b6106a261069d366004611de7565b61152a565b60408051928352602083019190915201610234565b3480156106c357600080fd5b506102086106d2366004611d65565b611ab1565b3480156106e357600080fd5b5060025461055b90600160a01b900460ff1681565b6000546001600160a01b0316331461072b5760405162461bcd60e51b815260040161072290611ee2565b60405180910390fd5b81816107ad576040516370a0823160e01b81523060048201526001600160a01b038216906370a082319060240160206040518083038186803b15801561077057600080fd5b505afa158015610784573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a89190611dff565b6107af565b815b91506000821161081c5760405162461bcd60e51b815260206004820152603260248201527f6d616b65207375726520746865726520697320612062616c616e636520617661604482015271696c61626c6520746f20776974686472617760701b6064820152608401610722565b806001600160a01b031663a9059cbb61083d6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101859052604401602060405180830381600087803b15801561088557600080fd5b505af1158015610899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bd9190611dcb565b50505050565b60095460009060ff166108e85760405162461bcd60e51b815260040161072290611f17565b6000828152600a602090815260409182902082516101208101845281548152600182015492810192909252600281015492820192909252600382015460ff808216151560608401526101008083048216151560808501526201000083048216151560a085015263010000008304909116151560c0840152600160201b9091046001600160a01b031660e083015260048301549082015261098790611b49565b600481015460075460ff1615610a50576007546109a89060ff16600a611fc1565b600360009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156109f657600080fd5b505afa158015610a0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2e9190611e8d565b610a3990600a611fc1565b610a43908361206e565b610a4d9190611f5e565b90505b600380549083015460405163a9059cbb60e01b81526001600160a01b03600160201b909204821660048201526024810184905291169063a9059cbb90604401602060405180830381600087803b158015610aa957600080fd5b505af1158015610abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae19190611dcb565b5042600283015560038201805461010061ff0019909116179081905560408051600160201b9092046001600160a01b031682526020820183905285917f5426fb0d0815408493c5f4929e0ed09d2ed7e5bb76c81b768453c1257dae292d910160405180910390a2509192915050565b6000546001600160a01b03163314610b7a5760405162461bcd60e51b815260040161072290611ee2565b6001600160a01b03166000908152600b6020526040812081815560018101829055600281018290556003810180546001600160c01b031916905560040155565b6004546001600160a01b03163314610c2a5760405162461bcd60e51b815260206004820152602d60248201527f75736572206d7573742062652063757272656e7420746f6b656e206f776e657260448201526c081d1bc818da185b99d9481a5d609a1b6064820152608401610722565b600480546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f58c4666d1756c527d157a91550f4ca84593b1353eea2528168c1ff4be2113706910160405180910390a15050565b6004546001600160a01b03163314610cf55760405162461bcd60e51b815260206004820152602760248201527f7769746864726177546f6b656e732075736572206d75737420626520746f6b65604482015266371037bbb732b960c91b6064820152608401610722565b60035460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015610d4157600080fd5b505af1158015610d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d799190611dcb565b5050565b6000546001600160a01b03163314610da75760405162461bcd60e51b815260040161072290611ee2565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610df35760405162461bcd60e51b815260040161072290611ee2565b600580546001600160a01b0319166001600160a01b038316908117909155610e1a90611ab1565b50565b6000546001600160a01b03163314610e475760405162461bcd60e51b815260040161072290611ee2565b6000918252600a602052604090912060030180549115156101000261ff0019909216919091179055565b6000546001600160a01b03163314610e9b5760405162461bcd60e51b815260040161072290611ee2565b610ea56000611c79565b565b6000546001600160a01b03163314610ed15760405162461bcd60e51b815260040161072290611ee2565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600854341015610f645760405162461bcd60e51b815260206004820152603660248201527f796f75206d7573742073656e6420656e6f7567682067617320746f20636f766560448201527539103a34329039b2b732103a3930b739b0b1ba34b7b760511b6064820152608401610722565b6040516bffffffffffffffffffffffff193360601b166020820152603481018390526054810182905260029060740160408051601f1981840301815290829052610fad91611ea9565b602060405180830381855afa158015610fca573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610fed9190611dff565b831461103b5760405162461bcd60e51b815260206004820152601c60248201527f776520646f6e2774207265636f676e697a6520746869732073776170000000006044820152606401610722565b6008541561109a576005546008546040516001600160a01b0390921691600081818185875af1925050503d8060008114611091576040519150601f19603f3d011682016040523d82523d6000602084013e611096565b606091505b5050505b604080516101208101825284815260208082019485524282840190815260016060840181815260006080860181815260a0870182815260c088018581523360e08a01908152610100808b019c8d529d8552600a9098529890922096518755985192860192909255915160028501559051600384018054975192519551935161ffff1990981691151561ff001916919091179115159097021763ffff00001916620100009315159390930263ff00000019169290921763010000009215159290920291909117640100000000600160c01b031916600160201b6001600160a01b0390941693909302929092179092559051600490910155565b6000546001600160a01b031633146111bc5760405162461bcd60e51b815260040161072290611ee2565b6002805460ff909216600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146112065760405162461bcd60e51b815260040161072290611ee2565b6007805460ff191660ff92909216919091179055565b60095460ff1661123e5760405162461bcd60e51b815260040161072290611f17565b6000818152600a602090815260409182902082516101208101845281548152600182015492810192909252600281015492820192909252600382015460ff808216151560608401526101008083048216151560808501526201000083048216151560a085015263010000008304909116151560c0840152600160201b9091046001600160a01b031660e08301526004830154908201526112dd90611b49565b6003818101805462ff00001916620100001790819055905460048084015460405163a9059cbb60e01b81526001600160a01b03600160201b909504851692810192909252602482015291169063a9059cbb90604401602060405180830381600087803b15801561134c57600080fd5b505af1158015611360573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113849190611dcb565b506003810154600482015460408051600160201b9093046001600160a01b03168352602083019190915283917f6e4038e4e259d4582fb84bcdf48e58d406d9322900286ea8cde6e36f94bbc32c910160405180910390a25050565b6000546001600160a01b031633148061140257506004546001600160a01b031633145b6114635760405162461bcd60e51b815260206004820152602c60248201527f73657441637469766553746174652075736572206d75737420626520636f6e7460448201526b3930b1ba1031b932b0ba37b960a11b6064820152608401610722565b6009805460ff1916911515919091179055565b6000546001600160a01b031633146114a05760405162461bcd60e51b815260040161072290611ee2565b600855565b6000546001600160a01b031633146114cf5760405162461bcd60e51b815260040161072290611ee2565b6000546001600160a01b03166001600160a01b03164760405160006040518083038185875af1925050503d8060008114611525576040519150601f19603f3d011682016040523d82523d6000602084013e505050565b505050565b600954600090819060ff166115515760405162461bcd60e51b815260040161072290611f17565b6008543410156115c95760405162461bcd60e51b815260206004820152603d60248201527f796f75206d75737420616c736f2073656e6420656e6f7567682067617320746f60448201527f20636f7665722074686520746172676574207472616e73616374696f6e0000006064820152608401610722565b60065415806115da57506006548311155b6116355760405162461bcd60e51b815260206004820152602660248201527f747279696e6720746f2073656e64206d6f7265207468616e206d617853776170604482015265105b5bdd5b9d60d21b6064820152608401610722565b611640600854611cc9565b6008541561169f576005546008546040516001600160a01b0390921691600081818185875af1925050503d8060008114611696576040519150601f19603f3d011682016040523d82523d6000602084013e61169b565b606091505b5050505b6003546040516323b872dd60e01b8152336004820152306024820152604481018590526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156116f157600080fd5b505af1158015611705573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117299190611dcb565b506040516bffffffffffffffffffffffff193360601b1660208201524260348201819052605482018590529060009060029060740160408051601f198184030181529082905261177891611ea9565b602060405180830381855afa158015611795573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906117b89190611dff565b9050604051806101200160405280828152602001838152602001838152602001600015158152602001600015158152602001600015158152602001600015158152602001336001600160a01b0316815260200186815250600a600083815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548160ff02191690831515021790555060808201518160030160016101000a81548160ff02191690831515021790555060a08201518160030160026101000a81548160ff02191690831515021790555060c08201518160030160036101000a81548160ff02191690831515021790555060e08201518160030160046101000a8154816001600160a01b0302191690836001600160a01b031602179055506101008201518160040155905050600a6000828152602001908152602001600020600b6000336001600160a01b03166001600160a01b031681526020019081526020016000206000820154816000015560018201548160010155600282015481600201556003820160009054906101000a900460ff168160030160006101000a81548160ff0219169083151502179055506003820160019054906101000a900460ff168160030160016101000a81548160ff0219169083151502179055506003820160029054906101000a900460ff168160030160026101000a81548160ff0219169083151502179055506003820160039054906101000a900460ff168160030160036101000a81548160ff0219169083151502179055506003820160049054906101000a90046001600160a01b03168160030160046101000a8154816001600160a01b0302191690836001600160a01b0316021790555060048201548160040155905050807f5a60af76681c67fc86f84213cadca54f623d74c2e0b5b43dd1a92412e238dcef833388604051611aa0939291909283526001600160a01b03919091166020830152604082015260600190565b60405180910390a294909350915050565b6000546001600160a01b03163314611adb5760405162461bcd60e51b815260040161072290611ee2565b6001600160a01b038116611b405760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610722565b610e1a81611c79565b6000546001600160a01b03163314611b735760405162461bcd60e51b815260040161072290611ee2565b60008160200151118015611b8c57506000816101000151115b611bd85760405162461bcd60e51b815260206004820152601860248201527f7377617020646f6573206e6f74206578697374207965742e00000000000000006044820152606401610722565b8060800151158015611bec57508060a00151155b8015611bf957508060c001515b610e1a5760405162461bcd60e51b815260206004820152604560248201527f737761702068617320616c7265616479206265656e20636f6d706c657465642c60448201527f20726566756e6465642c206f722067617320686173206e6f74206265656e20666064820152641d5b99195960da1b608482015260a401610722565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6002546001600160a01b031663d9e30e55611ce4833461208d565b60025460405160e084901b6001600160e01b0319168152336004820152600160a01b90910460ff1660248201526044016000604051808303818588803b158015611d2d57600080fd5b505af1158015611d41573d6000803e3d6000fd5b505050505050565b80356001600160a01b0381168114611d6057600080fd5b919050565b600060208284031215611d76578081fd5b611d7f82611d49565b9392505050565b60008060408385031215611d98578081fd5b611da183611d49565b946020939093013593505050565b600060208284031215611dc0578081fd5b8135611d7f816120ba565b600060208284031215611ddc578081fd5b8151611d7f816120ba565b600060208284031215611df8578081fd5b5035919050565b600060208284031215611e10578081fd5b5051919050565b60008060408385031215611e29578182fd5b823591506020830135611e3b816120ba565b809150509250929050565b600080600060608486031215611e5a578081fd5b505081359360208301359350604090920135919050565b600060208284031215611e82578081fd5b8135611d7f816120c8565b600060208284031215611e9e578081fd5b8151611d7f816120c8565b60008251815b81811015611ec95760208186018101518583015201611eaf565b81811115611ed75782828501525b509190910192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526027908201527f746869732061746f6d6963207377617020696e7374616e6365206973206e6f746040820152662061637469766560c81b606082015260800190565b600082611f7957634e487b7160e01b81526012600452602481fd5b500490565b600181815b80851115611fb9578160001904821115611f9f57611f9f6120a4565b80851615611fac57918102915b93841c9390800290611f83565b509250929050565b6000611d7f60ff841683600082611fda57506001612068565b81611fe757506000612068565b8160018114611ffd576002811461200757612023565b6001915050612068565b60ff841115612018576120186120a4565b50506001821b612068565b5060208310610133831016604e8410600b8410161715612046575081810a612068565b6120508383611f7e565b8060001904821115612064576120646120a4565b0290505b92915050565b6000816000190483118215151615612088576120886120a4565b500290565b60008282101561209f5761209f6120a4565b500390565b634e487b7160e01b600052601160045260246000fd5b8015158114610e1a57600080fd5b60ff81168114610e1a57600080fdfea164736f6c6343000804000a0000000000000000000000005dbb9f64cd96e2dbbca58d14863d615b67b42f2e0000000000000000000000005bde378e0a0cebc941b03a579da0088dc1616faf0000000000000000000000001f1851f37b0d2428169d79d12eb2616037ad4f560000000000000000000000002ba87d728bd1dd73701d7efe37f9b07368c04a630000000000000000000000003f7aff0ef20aa2e646290dfa4e67611b2220c59700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101e35760003560e01c80639e9f695d11610102578063cd41ced011610095578063eba760d611610064578063eba760d614610671578063ed8f584b1461068f578063f2fde38b146106b7578063f9fb452f146106d757600080fd5b8063cd41ced0146105a3578063dc3aaab5146105c3578063e086e5ec146105e1578063eb84e7f2146105f657600080fd5b8063a89ae4ba116100d1578063a89ae4ba14610521578063ad70127814610541578063bfe22a011461056d578063cce987d41461058d57600080fd5b80639e9f695d146104a1578063a06bbf08146104c1578063a1734e60146104e1578063a3e676101461050157600080fd5b80634c69c00f1161017a5780638a2e386e116101495780638a2e386e1461038e5780638d17359e146103a15780638da5cb5b146103b7578063933a59db146103d557600080fd5b80634c69c00f14610319578063565e6d1c14610339578063715018a6146103595780637c0bf7bb1461036e57600080fd5b806318e02bd9116101b657806318e02bd91461028f57806322f3e2d4146102af578063315a095d146102d95780634bc10ccb146102f957600080fd5b806306b091f9146101e85780631028e4921461020a57806310fe9ae81461023d578063113d4e1e1461026f575b600080fd5b3480156101f457600080fd5b50610208610203366004611d86565b6106f8565b005b34801561021657600080fd5b5061022a610225366004611de7565b6108c3565b6040519081526020015b60405180910390f35b34801561024957600080fd5b506001546001600160a01b03165b6040516001600160a01b039091168152602001610234565b34801561027b57600080fd5b5061020861028a366004611d65565b610b50565b34801561029b57600080fd5b506102086102aa366004611d65565b610bba565b3480156102bb57600080fd5b506009546102c99060ff1681565b6040519015158152602001610234565b3480156102e557600080fd5b506102086102f4366004611de7565b610c8b565b34801561030557600080fd5b50610208610314366004611d65565b610d7d565b34801561032557600080fd5b50610208610334366004611d65565b610dc9565b34801561034557600080fd5b50610208610354366004611e17565b610e1d565b34801561036557600080fd5b50610208610e71565b34801561037a57600080fd5b50610208610389366004611d65565b610ea7565b61020861039c366004611e46565b610ef3565b3480156103ad57600080fd5b5061022a60085481565b3480156103c357600080fd5b506000546001600160a01b0316610257565b3480156103e157600080fd5b506104506103f0366004611d65565b600b602052600090815260409020805460018201546002830154600384015460049094015492939192909160ff808216926101008304821692620100008104831692630100000082041691600160201b9091046001600160a01b03169089565b60408051998a5260208a01989098529688019590955292151560608701529015156080860152151560a0850152151560c08401526001600160a01b031660e083015261010082015261012001610234565b3480156104ad57600080fd5b506102086104bc366004611e71565b611192565b3480156104cd57600080fd5b506102086104dc366004611e71565b6111dc565b3480156104ed57600080fd5b506102086104fc366004611de7565b61121c565b34801561050d57600080fd5b50600454610257906001600160a01b031681565b34801561052d57600080fd5b50600554610257906001600160a01b031681565b34801561054d57600080fd5b5060075461055b9060ff1681565b60405160ff9091168152602001610234565b34801561057957600080fd5b50610208610588366004611daf565b6113df565b34801561059957600080fd5b5061022a60065481565b3480156105af57600080fd5b506102086105be366004611de7565b611476565b3480156105cf57600080fd5b506002546001600160a01b0316610257565b3480156105ed57600080fd5b506102086114a5565b34801561060257600080fd5b50610450610611366004611de7565b600a602052600090815260409020805460018201546002830154600384015460049094015492939192909160ff808216926101008304821692620100008104831692630100000082041691600160201b9091046001600160a01b03169089565b34801561067d57600080fd5b506003546001600160a01b0316610257565b6106a261069d366004611de7565b61152a565b60408051928352602083019190915201610234565b3480156106c357600080fd5b506102086106d2366004611d65565b611ab1565b3480156106e357600080fd5b5060025461055b90600160a01b900460ff1681565b6000546001600160a01b0316331461072b5760405162461bcd60e51b815260040161072290611ee2565b60405180910390fd5b81816107ad576040516370a0823160e01b81523060048201526001600160a01b038216906370a082319060240160206040518083038186803b15801561077057600080fd5b505afa158015610784573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a89190611dff565b6107af565b815b91506000821161081c5760405162461bcd60e51b815260206004820152603260248201527f6d616b65207375726520746865726520697320612062616c616e636520617661604482015271696c61626c6520746f20776974686472617760701b6064820152608401610722565b806001600160a01b031663a9059cbb61083d6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101859052604401602060405180830381600087803b15801561088557600080fd5b505af1158015610899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bd9190611dcb565b50505050565b60095460009060ff166108e85760405162461bcd60e51b815260040161072290611f17565b6000828152600a602090815260409182902082516101208101845281548152600182015492810192909252600281015492820192909252600382015460ff808216151560608401526101008083048216151560808501526201000083048216151560a085015263010000008304909116151560c0840152600160201b9091046001600160a01b031660e083015260048301549082015261098790611b49565b600481015460075460ff1615610a50576007546109a89060ff16600a611fc1565b600360009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156109f657600080fd5b505afa158015610a0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2e9190611e8d565b610a3990600a611fc1565b610a43908361206e565b610a4d9190611f5e565b90505b600380549083015460405163a9059cbb60e01b81526001600160a01b03600160201b909204821660048201526024810184905291169063a9059cbb90604401602060405180830381600087803b158015610aa957600080fd5b505af1158015610abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae19190611dcb565b5042600283015560038201805461010061ff0019909116179081905560408051600160201b9092046001600160a01b031682526020820183905285917f5426fb0d0815408493c5f4929e0ed09d2ed7e5bb76c81b768453c1257dae292d910160405180910390a2509192915050565b6000546001600160a01b03163314610b7a5760405162461bcd60e51b815260040161072290611ee2565b6001600160a01b03166000908152600b6020526040812081815560018101829055600281018290556003810180546001600160c01b031916905560040155565b6004546001600160a01b03163314610c2a5760405162461bcd60e51b815260206004820152602d60248201527f75736572206d7573742062652063757272656e7420746f6b656e206f776e657260448201526c081d1bc818da185b99d9481a5d609a1b6064820152608401610722565b600480546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f58c4666d1756c527d157a91550f4ca84593b1353eea2528168c1ff4be2113706910160405180910390a15050565b6004546001600160a01b03163314610cf55760405162461bcd60e51b815260206004820152602760248201527f7769746864726177546f6b656e732075736572206d75737420626520746f6b65604482015266371037bbb732b960c91b6064820152608401610722565b60035460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015610d4157600080fd5b505af1158015610d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d799190611dcb565b5050565b6000546001600160a01b03163314610da75760405162461bcd60e51b815260040161072290611ee2565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610df35760405162461bcd60e51b815260040161072290611ee2565b600580546001600160a01b0319166001600160a01b038316908117909155610e1a90611ab1565b50565b6000546001600160a01b03163314610e475760405162461bcd60e51b815260040161072290611ee2565b6000918252600a602052604090912060030180549115156101000261ff0019909216919091179055565b6000546001600160a01b03163314610e9b5760405162461bcd60e51b815260040161072290611ee2565b610ea56000611c79565b565b6000546001600160a01b03163314610ed15760405162461bcd60e51b815260040161072290611ee2565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600854341015610f645760405162461bcd60e51b815260206004820152603660248201527f796f75206d7573742073656e6420656e6f7567682067617320746f20636f766560448201527539103a34329039b2b732103a3930b739b0b1ba34b7b760511b6064820152608401610722565b6040516bffffffffffffffffffffffff193360601b166020820152603481018390526054810182905260029060740160408051601f1981840301815290829052610fad91611ea9565b602060405180830381855afa158015610fca573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610fed9190611dff565b831461103b5760405162461bcd60e51b815260206004820152601c60248201527f776520646f6e2774207265636f676e697a6520746869732073776170000000006044820152606401610722565b6008541561109a576005546008546040516001600160a01b0390921691600081818185875af1925050503d8060008114611091576040519150601f19603f3d011682016040523d82523d6000602084013e611096565b606091505b5050505b604080516101208101825284815260208082019485524282840190815260016060840181815260006080860181815260a0870182815260c088018581523360e08a01908152610100808b019c8d529d8552600a9098529890922096518755985192860192909255915160028501559051600384018054975192519551935161ffff1990981691151561ff001916919091179115159097021763ffff00001916620100009315159390930263ff00000019169290921763010000009215159290920291909117640100000000600160c01b031916600160201b6001600160a01b0390941693909302929092179092559051600490910155565b6000546001600160a01b031633146111bc5760405162461bcd60e51b815260040161072290611ee2565b6002805460ff909216600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146112065760405162461bcd60e51b815260040161072290611ee2565b6007805460ff191660ff92909216919091179055565b60095460ff1661123e5760405162461bcd60e51b815260040161072290611f17565b6000818152600a602090815260409182902082516101208101845281548152600182015492810192909252600281015492820192909252600382015460ff808216151560608401526101008083048216151560808501526201000083048216151560a085015263010000008304909116151560c0840152600160201b9091046001600160a01b031660e08301526004830154908201526112dd90611b49565b6003818101805462ff00001916620100001790819055905460048084015460405163a9059cbb60e01b81526001600160a01b03600160201b909504851692810192909252602482015291169063a9059cbb90604401602060405180830381600087803b15801561134c57600080fd5b505af1158015611360573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113849190611dcb565b506003810154600482015460408051600160201b9093046001600160a01b03168352602083019190915283917f6e4038e4e259d4582fb84bcdf48e58d406d9322900286ea8cde6e36f94bbc32c910160405180910390a25050565b6000546001600160a01b031633148061140257506004546001600160a01b031633145b6114635760405162461bcd60e51b815260206004820152602c60248201527f73657441637469766553746174652075736572206d75737420626520636f6e7460448201526b3930b1ba1031b932b0ba37b960a11b6064820152608401610722565b6009805460ff1916911515919091179055565b6000546001600160a01b031633146114a05760405162461bcd60e51b815260040161072290611ee2565b600855565b6000546001600160a01b031633146114cf5760405162461bcd60e51b815260040161072290611ee2565b6000546001600160a01b03166001600160a01b03164760405160006040518083038185875af1925050503d8060008114611525576040519150601f19603f3d011682016040523d82523d6000602084013e505050565b505050565b600954600090819060ff166115515760405162461bcd60e51b815260040161072290611f17565b6008543410156115c95760405162461bcd60e51b815260206004820152603d60248201527f796f75206d75737420616c736f2073656e6420656e6f7567682067617320746f60448201527f20636f7665722074686520746172676574207472616e73616374696f6e0000006064820152608401610722565b60065415806115da57506006548311155b6116355760405162461bcd60e51b815260206004820152602660248201527f747279696e6720746f2073656e64206d6f7265207468616e206d617853776170604482015265105b5bdd5b9d60d21b6064820152608401610722565b611640600854611cc9565b6008541561169f576005546008546040516001600160a01b0390921691600081818185875af1925050503d8060008114611696576040519150601f19603f3d011682016040523d82523d6000602084013e61169b565b606091505b5050505b6003546040516323b872dd60e01b8152336004820152306024820152604481018590526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156116f157600080fd5b505af1158015611705573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117299190611dcb565b506040516bffffffffffffffffffffffff193360601b1660208201524260348201819052605482018590529060009060029060740160408051601f198184030181529082905261177891611ea9565b602060405180830381855afa158015611795573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906117b89190611dff565b9050604051806101200160405280828152602001838152602001838152602001600015158152602001600015158152602001600015158152602001600015158152602001336001600160a01b0316815260200186815250600a600083815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548160ff02191690831515021790555060808201518160030160016101000a81548160ff02191690831515021790555060a08201518160030160026101000a81548160ff02191690831515021790555060c08201518160030160036101000a81548160ff02191690831515021790555060e08201518160030160046101000a8154816001600160a01b0302191690836001600160a01b031602179055506101008201518160040155905050600a6000828152602001908152602001600020600b6000336001600160a01b03166001600160a01b031681526020019081526020016000206000820154816000015560018201548160010155600282015481600201556003820160009054906101000a900460ff168160030160006101000a81548160ff0219169083151502179055506003820160019054906101000a900460ff168160030160016101000a81548160ff0219169083151502179055506003820160029054906101000a900460ff168160030160026101000a81548160ff0219169083151502179055506003820160039054906101000a900460ff168160030160036101000a81548160ff0219169083151502179055506003820160049054906101000a90046001600160a01b03168160030160046101000a8154816001600160a01b0302191690836001600160a01b0316021790555060048201548160040155905050807f5a60af76681c67fc86f84213cadca54f623d74c2e0b5b43dd1a92412e238dcef833388604051611aa0939291909283526001600160a01b03919091166020830152604082015260600190565b60405180910390a294909350915050565b6000546001600160a01b03163314611adb5760405162461bcd60e51b815260040161072290611ee2565b6001600160a01b038116611b405760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610722565b610e1a81611c79565b6000546001600160a01b03163314611b735760405162461bcd60e51b815260040161072290611ee2565b60008160200151118015611b8c57506000816101000151115b611bd85760405162461bcd60e51b815260206004820152601860248201527f7377617020646f6573206e6f74206578697374207965742e00000000000000006044820152606401610722565b8060800151158015611bec57508060a00151155b8015611bf957508060c001515b610e1a5760405162461bcd60e51b815260206004820152604560248201527f737761702068617320616c7265616479206265656e20636f6d706c657465642c60448201527f20726566756e6465642c206f722067617320686173206e6f74206265656e20666064820152641d5b99195960da1b608482015260a401610722565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6002546001600160a01b031663d9e30e55611ce4833461208d565b60025460405160e084901b6001600160e01b0319168152336004820152600160a01b90910460ff1660248201526044016000604051808303818588803b158015611d2d57600080fd5b505af1158015611d41573d6000803e3d6000fd5b505050505050565b80356001600160a01b0381168114611d6057600080fd5b919050565b600060208284031215611d76578081fd5b611d7f82611d49565b9392505050565b60008060408385031215611d98578081fd5b611da183611d49565b946020939093013593505050565b600060208284031215611dc0578081fd5b8135611d7f816120ba565b600060208284031215611ddc578081fd5b8151611d7f816120ba565b600060208284031215611df8578081fd5b5035919050565b600060208284031215611e10578081fd5b5051919050565b60008060408385031215611e29578182fd5b823591506020830135611e3b816120ba565b809150509250929050565b600080600060608486031215611e5a578081fd5b505081359360208301359350604090920135919050565b600060208284031215611e82578081fd5b8135611d7f816120c8565b600060208284031215611e9e578081fd5b8151611d7f816120c8565b60008251815b81811015611ec95760208186018101518583015201611eaf565b81811115611ed75782828501525b509190910192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526027908201527f746869732061746f6d6963207377617020696e7374616e6365206973206e6f746040820152662061637469766560c81b606082015260800190565b600082611f7957634e487b7160e01b81526012600452602481fd5b500490565b600181815b80851115611fb9578160001904821115611f9f57611f9f6120a4565b80851615611fac57918102915b93841c9390800290611f83565b509250929050565b6000611d7f60ff841683600082611fda57506001612068565b81611fe757506000612068565b8160018114611ffd576002811461200757612023565b6001915050612068565b60ff841115612018576120186120a4565b50506001821b612068565b5060208310610133831016604e8410600b8410161715612046575081810a612068565b6120508383611f7e565b8060001904821115612064576120646120a4565b0290505b92915050565b6000816000190483118215151615612088576120886120a4565b500290565b60008282101561209f5761209f6120a4565b500390565b634e487b7160e01b600052601160045260246000fd5b8015158114610e1a57600080fd5b60ff81168114610e1a57600080fdfea164736f6c6343000804000a

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.