ETH Price: $2,039.01 (+1.50%)
Gas: 0.13 Gwei

Contract

0x3CCC98DC63Fd9BEBf7ad69Dcb8fc2FE734B985C7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw156814262022-10-05 10:52:231272 days ago1664967143IN
0x3CCC98DC...734B985C7
0 ETH0.000212455.6580064

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
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

Contract Source Code Verified (Exact Match)

Contract Name:
Buyer

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "./helpers/FlashLoanReceiverBase.sol";
import "./interfaces/IWETH.sol";

//"0xe7acab24000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000005a00000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f000000000000000000000000000012f95747e78c6044a7cbb4670195103a660cfa4700000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000004e00000000000000000000000006ea4ea5c3cd5c1f77f9d2114659cbacaea97edb7000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c0000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000630875ce0000000000000000000000000000000000000000000000000000000063314fc90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a3476171f965b0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006012c8cf97bead5deae237070f9587f8e7a266d00000000000000000000000000000000000000000000000000000000001eb8aa0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a8e4b1a3d8000000000000000000000000000000000000000000000000000008a8e4b1a3d80000000000000000000000000006ea4ea5c3cd5c1f77f9d2114659cbacaea97edb70000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000038d7ea4c6800000000000000000000000000000000000000000000000000000038d7ea4c680000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000000000000000000000000000000000000000000041e56d886229514f8b2acd190c5fc3cef291a9b888271950a5038fd1420b4d72a06d88e3a9aed12c0b290c50c3d3962551637b5cd66107da6baba364b7ff928ff91b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";

contract Buyer is FlashLoanReceiverBase, Ownable, ERC721Holder, ERC165 {
    address public constant SEAPORT =
        0x00000000006c3852cbEf3e08E8dF289169EdE581;
    address public constant OPENSEA_CONDUIT =
        0x1E0049783F008A0085193E00003D00cd54003c71;
    address public immutable marketplace;
    uint256 public feePerTenThousand;
    IWETH weth;
    address seller;
    bytes transactionData;

    event FlashloanGranted(address seller, address provider, uint256 amount);

    constructor(address marketplace_, address wethApprovalSeeker_, uint feePerTenThousand_, ILendingPoolAddressesProvider provider, IWETH weth_)
        FlashLoanReceiverBase(provider)
    {
        weth = weth_;
        marketplace = marketplace_;
        feePerTenThousand = feePerTenThousand_;
        weth.approve(wethApprovalSeeker_, 10e10 ether);
    }

    event Received(address, uint256);

    receive() external payable {
        emit Received(msg.sender, msg.value);
    }

    function executeOperation(
        address[] calldata assets,
        uint256[] calldata amounts,
        uint256[] calldata premiums,
        address initiator,
        bytes calldata params
    ) external override returns (bool) {
        emit FlashloanGranted(seller, initiator, amounts[0]);
        //
        // This contract now has the funds requested.
        // Your logic goes here.
        //

        // At the end of your logic above, this contract owes
        // the flashloaned amounts + premiums.
        // Therefore ensure your contract has enough to repay
        // these amounts.

        // buy the nft from marketplace
        // weth.transfer(seller, amounts[0] - marketplaceFees);

        // purchase nft from marketplace
        (bool success, ) = marketplace.call(transactionData);
        require(success, "marketplace transaction failed");

        uint256 marketplaceFees = (amounts[0] * feePerTenThousand) / 10000;

        // after buying the nft from marketplace get the amount from the seller using pre approved manner
        weth.transferFrom(seller, address(this), amounts[0] - marketplaceFees);

        // Approve the LendingPool contract allowance to *pull* the owed amount
        for (uint256 i = 0; i < assets.length; i++) {
            uint256 amountOwing = amounts[i] + premiums[i];
            IERC20(assets[i]).approve(address(LENDING_POOL), amountOwing);
        }

        return true;
    }

    function myFlashLoanCall(
        address seller_,
        bytes calldata transactionData_,
        uint256 amount
    ) public {
        seller = seller_;
        transactionData = transactionData_;
        address receiverAddress = address(this);

        address[] memory assets = new address[](1);
        assets[0] = address(weth);

        uint256[] memory amounts = new uint256[](1);
        amounts[0] = amount;

        // 0 = no debt, 1 = stable, 2 = variable
        uint256[] memory modes = new uint256[](1);
        modes[0] = 0;

        address onBehalfOf = address(this);
        bytes memory params = "";
        uint16 referralCode = 0;

        LENDING_POOL.flashLoan(
            receiverAddress,
            assets,
            amounts,
            modes,
            onBehalfOf,
            params,
            referralCode
        );
    }

    function withdraw() public onlyOwner {
        uint256 balance = weth.balanceOf(address(this));
        weth.transfer(msg.sender, balance);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            super.supportsInterface(interfaceId) ||
            interfaceId == type(IERC721Receiver).interfaceId;
    }
}

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

pragma solidity ^0.8.0;

import "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 5 of 17 : FlashLoanReceiverBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import "../interfaces/IFlashLoanReceiver.sol";
import "../interfaces/ILendingPoolAddressProvider.sol";
import "../interfaces/ILendingPool.sol";

abstract contract FlashLoanReceiverBase is IFlashLoanReceiver {
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    ILendingPoolAddressesProvider public immutable ADDRESSES_PROVIDER;
    ILendingPool public immutable LENDING_POOL;

    constructor(ILendingPoolAddressesProvider provider) {
        ADDRESSES_PROVIDER = provider;
        LENDING_POOL = ILendingPool(provider.getLendingPool());
    }
}

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

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

interface IWETH is IERC20 {
    function deposit() external payable;

    function withdraw(uint256 amount) external;
}

File 7 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// 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;
    }
}

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

pragma solidity ^0.8.0;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/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'
        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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

File 13 of 17 : IFlashLoanReceiver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8;

interface IFlashLoanReceiver {
    function executeOperation(
        address[] calldata assets,
        uint256[] calldata amounts,
        uint256[] calldata premiums,
        address initiator,
        bytes calldata params
    ) external returns (bool);
}

File 14 of 17 : ILendingPoolAddressProvider.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8;

interface ILendingPoolAddressesProvider {
    function getLendingPool() external view returns (address);
}

File 15 of 17 : ILendingPool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8;

interface ILendingPool {
    function flashLoan(
        address receiverAddress,
        address[] calldata assets,
        uint256[] calldata amounts,
        uint256[] calldata modes,
        address onBehalfOf,
        bytes calldata params,
        uint16 referralCode
    ) external;
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"marketplace_","type":"address"},{"internalType":"address","name":"wethApprovalSeeker_","type":"address"},{"internalType":"uint256","name":"feePerTenThousand_","type":"uint256"},{"internalType":"contract ILendingPoolAddressesProvider","name":"provider","type":"address"},{"internalType":"contract IWETH","name":"weth_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"address","name":"provider","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FlashloanGranted","type":"event"},{"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":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Received","type":"event"},{"inputs":[],"name":"ADDRESSES_PROVIDER","outputs":[{"internalType":"contract ILendingPoolAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LENDING_POOL","outputs":[{"internalType":"contract ILendingPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPENSEA_CONDUIT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEAPORT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"premiums","type":"uint256[]"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"executeOperation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feePerTenThousand","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketplace","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"seller_","type":"address"},{"internalType":"bytes","name":"transactionData_","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"myFlashLoanCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e06040523480156200001157600080fd5b5060405162001579380380620015798339810160408190526200003491620001e3565b81806001600160a01b03166080816001600160a01b031681525050806001600160a01b0316630261bf8b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200008e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b4919062000257565b6001600160a01b031660a05250620000cc336200017a565b600280546001600160a01b0319166001600160a01b0383811691821790925586821660c052600185905560405163095ea7b360e01b815291861660048301526c01431e0fae6d7217caa000000060248301529063095ea7b3906044016020604051808303816000875af115801562000148573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016e91906200027e565b505050505050620002a2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620001e057600080fd5b50565b600080600080600060a08688031215620001fc57600080fd5b85516200020981620001ca565b60208701519095506200021c81620001ca565b6040870151606088015191955093506200023681620001ca565b60808701519092506200024981620001ca565b809150509295509295909350565b6000602082840312156200026a57600080fd5b81516200027781620001ca565b9392505050565b6000602082840312156200029157600080fd5b815180151581146200027757600080fd5b60805160a05160c051611292620002e7600039600081816102f501526107520152600081816103290152818161051a01526109b20152600061016c01526112926000f3fe6080604052600436106100e15760003560e01c80634749ed391161007f578063920f5c8411610059578063920f5c84146102c3578063abc8c7af146102e3578063b4dcfc7714610317578063f2fde38b1461034b57600080fd5b80634749ed3914610268578063715018a6146102905780638da5cb5b146102a557600080fd5b8063150b7a02116100bb578063150b7a02146101ca578063220021d11461020e578063387b6629146102305780633ccfd60b1461025357600080fd5b806301ffc9a7146101255780630542975c1461015a5780630cf83101146101a657600080fd5b3661012057604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b34801561013157600080fd5b50610145610140366004610c38565b61036b565b60405190151581526020015b60405180910390f35b34801561016657600080fd5b5061018e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610151565b3480156101b257600080fd5b506101bc60015481565b604051908152602001610151565b3480156101d657600080fd5b506101f56101e5366004610c9b565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610151565b34801561021a57600080fd5b5061022e610229366004610dc0565b6103bb565b005b34801561023c57600080fd5b5061018e6e6c3852cbef3e08e8df289169ede58181565b34801561025f57600080fd5b5061022e61059a565b34801561027457600080fd5b5061018e731e0049783f008a0085193e00003d00cd54003c7181565b34801561029c57600080fd5b5061022e6106bb565b3480156102b157600080fd5b506000546001600160a01b031661018e565b3480156102cf57600080fd5b506101456102de366004610e5f565b6106cf565b3480156102ef57600080fd5b5061018e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561032357600080fd5b5061018e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561035757600080fd5b5061022e610366366004610f39565b610a58565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614806103b557506001600160e01b03198216630a85bd0160e11b145b92915050565b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386161790556103ef60048484610b9f565b5060408051600180825281830190925230916000919060208083019080368337505060025482519293506001600160a01b03169183915060009061043557610435610f54565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061048657610486610f54565b60209081029190910101526040805160018082528183019092526000918160200160208202803683370190505090506000816000815181106104ca576104ca610f54565b602090810291909101810191909152604080519182018152600080835290517fab9c4b5d000000000000000000000000000000000000000000000000000000008152309291906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ab9c4b5d9061055b908a908a908a908a908a908a908a90600401610ff2565b600060405180830381600087803b15801561057557600080fd5b505af1158015610589573d6000803e3d6000fd5b505050505050505050505050505050565b6105a2610ae8565b6002546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610604573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062891906110ad565b6002546040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018390529192506001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b791906110c6565b5050565b6106c3610ae8565b6106cd6000610b42565b565b6003546000907f7d0bd320b2a7a414c50df4099c3ef8e3b23a17f501a929d54cceb80ef956d2c1906001600160a01b0316858a8a858161071157610711610f54565b90506020020135604051610746939291906001600160a01b039384168152919092166020820152604081019190915260600190565b60405180910390a160007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660046040516107899190611122565b6000604051808303816000865af19150503d80600081146107c6576040519150601f19603f3d011682016040523d82523d6000602084013e6107cb565b606091505b50509050806108215760405162461bcd60e51b815260206004820152601e60248201527f6d61726b6574706c616365207472616e73616374696f6e206661696c6564000060448201526064015b60405180910390fd5b60006127106001548b8b600081811061083c5761083c610f54565b9050602002013561084d91906111d3565b61085791906111f2565b6002546003549192506001600160a01b03908116916323b872dd911630848e8e60008161088657610886610f54565b905060200201356108979190611214565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af11580156108eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090f91906110c6565b5060005b8b811015610a4557600089898381811061092f5761092f610f54565b905060200201358c8c8481811061094857610948610f54565b90506020020135610959919061122b565b90508d8d8381811061096d5761096d610f54565b90506020020160208101906109829190610f39565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260248201849052919091169063095ea7b3906044016020604051808303816000875af1158015610a0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3091906110c6565b50508080610a3d90611243565b915050610913565b5060019c9b505050505050505050505050565b610a60610ae8565b6001600160a01b038116610adc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610818565b610ae581610b42565b50565b6000546001600160a01b031633146106cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610818565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054610bab906110e8565b90600052602060002090601f016020900481019282610bcd5760008555610c13565b82601f10610be65782800160ff19823516178555610c13565b82800160010185558215610c13579182015b82811115610c13578235825591602001919060010190610bf8565b50610c1f929150610c23565b5090565b5b80821115610c1f5760008155600101610c24565b600060208284031215610c4a57600080fd5b81356001600160e01b031981168114610c6257600080fd5b9392505050565b80356001600160a01b0381168114610c8057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610cb157600080fd5b610cba85610c69565b9350610cc860208601610c69565b925060408501359150606085013567ffffffffffffffff80821115610cec57600080fd5b818701915087601f830112610d0057600080fd5b813581811115610d1257610d12610c85565b604051601f8201601f19908116603f01168101908382118183101715610d3a57610d3a610c85565b816040528281528a6020848701011115610d5357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008083601f840112610d8957600080fd5b50813567ffffffffffffffff811115610da157600080fd5b602083019150836020828501011115610db957600080fd5b9250929050565b60008060008060608587031215610dd657600080fd5b610ddf85610c69565b9350602085013567ffffffffffffffff811115610dfb57600080fd5b610e0787828801610d77565b9598909750949560400135949350505050565b60008083601f840112610e2c57600080fd5b50813567ffffffffffffffff811115610e4457600080fd5b6020830191508360208260051b8501011115610db957600080fd5b600080600080600080600080600060a08a8c031215610e7d57600080fd5b893567ffffffffffffffff80821115610e9557600080fd5b610ea18d838e01610e1a565b909b50995060208c0135915080821115610eba57600080fd5b610ec68d838e01610e1a565b909950975060408c0135915080821115610edf57600080fd5b610eeb8d838e01610e1a565b9097509550859150610eff60608d01610c69565b945060808c0135915080821115610f1557600080fd5b50610f228c828d01610d77565b915080935050809150509295985092959850929598565b600060208284031215610f4b57600080fd5b610c6282610c69565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b83811015610f9a57815187529582019590820190600101610f7e565b509495945050505050565b6000815180845260005b81811015610fcb57602081850181015186830182015201610faf565b81811115610fdd576000602083870101525b50601f01601f19169290920160200192915050565b600060e082016001600160a01b03808b168452602060e081860152828b5180855261010087019150828d01945060005b81811015611040578551851683529483019491830191600101611022565b50508581036040870152611054818c610f6a565b9350505050828103606084015261106b8188610f6a565b6001600160a01b0387166080850152905082810360a084015261108e8186610fa5565b9150506110a160c083018461ffff169052565b98975050505050505050565b6000602082840312156110bf57600080fd5b5051919050565b6000602082840312156110d857600080fd5b81518015158114610c6257600080fd5b600181811c908216806110fc57607f821691505b60208210810361111c57634e487b7160e01b600052602260045260246000fd5b50919050565b600080835481600182811c91508083168061113e57607f831692505b6020808410820361115d57634e487b7160e01b86526022600452602486fd5b8180156111715760018114611182576111af565b60ff198616895284890196506111af565b60008a81526020902060005b868110156111a75781548b82015290850190830161118e565b505084890196505b509498975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156111ed576111ed6111bd565b500290565b60008261120f57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611226576112266111bd565b500390565b6000821982111561123e5761123e6111bd565b500190565b600060018201611255576112556111bd565b506001019056fea26469706673582212202e76beacc7c98b5e42651c95bf029f758581084c5b5534f899ac8c675a45bf9164736f6c634300080d003300000000000000000000000059728544b08ab483533076417fbbb2fd0b17ce3a00000000000000000000000059728544b08ab483533076417fbbb2fd0b17ce3a00000000000000000000000000000000000000000000000000000000000000c8000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c5000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x6080604052600436106100e15760003560e01c80634749ed391161007f578063920f5c8411610059578063920f5c84146102c3578063abc8c7af146102e3578063b4dcfc7714610317578063f2fde38b1461034b57600080fd5b80634749ed3914610268578063715018a6146102905780638da5cb5b146102a557600080fd5b8063150b7a02116100bb578063150b7a02146101ca578063220021d11461020e578063387b6629146102305780633ccfd60b1461025357600080fd5b806301ffc9a7146101255780630542975c1461015a5780630cf83101146101a657600080fd5b3661012057604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b34801561013157600080fd5b50610145610140366004610c38565b61036b565b60405190151581526020015b60405180910390f35b34801561016657600080fd5b5061018e7f000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c581565b6040516001600160a01b039091168152602001610151565b3480156101b257600080fd5b506101bc60015481565b604051908152602001610151565b3480156101d657600080fd5b506101f56101e5366004610c9b565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610151565b34801561021a57600080fd5b5061022e610229366004610dc0565b6103bb565b005b34801561023c57600080fd5b5061018e6e6c3852cbef3e08e8df289169ede58181565b34801561025f57600080fd5b5061022e61059a565b34801561027457600080fd5b5061018e731e0049783f008a0085193e00003d00cd54003c7181565b34801561029c57600080fd5b5061022e6106bb565b3480156102b157600080fd5b506000546001600160a01b031661018e565b3480156102cf57600080fd5b506101456102de366004610e5f565b6106cf565b3480156102ef57600080fd5b5061018e7f00000000000000000000000059728544b08ab483533076417fbbb2fd0b17ce3a81565b34801561032357600080fd5b5061018e7f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a981565b34801561035757600080fd5b5061022e610366366004610f39565b610a58565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614806103b557506001600160e01b03198216630a85bd0160e11b145b92915050565b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386161790556103ef60048484610b9f565b5060408051600180825281830190925230916000919060208083019080368337505060025482519293506001600160a01b03169183915060009061043557610435610f54565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061048657610486610f54565b60209081029190910101526040805160018082528183019092526000918160200160208202803683370190505090506000816000815181106104ca576104ca610f54565b602090810291909101810191909152604080519182018152600080835290517fab9c4b5d000000000000000000000000000000000000000000000000000000008152309291906001600160a01b037f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9169063ab9c4b5d9061055b908a908a908a908a908a908a908a90600401610ff2565b600060405180830381600087803b15801561057557600080fd5b505af1158015610589573d6000803e3d6000fd5b505050505050505050505050505050565b6105a2610ae8565b6002546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610604573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062891906110ad565b6002546040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018390529192506001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b791906110c6565b5050565b6106c3610ae8565b6106cd6000610b42565b565b6003546000907f7d0bd320b2a7a414c50df4099c3ef8e3b23a17f501a929d54cceb80ef956d2c1906001600160a01b0316858a8a858161071157610711610f54565b90506020020135604051610746939291906001600160a01b039384168152919092166020820152604081019190915260600190565b60405180910390a160007f00000000000000000000000059728544b08ab483533076417fbbb2fd0b17ce3a6001600160a01b031660046040516107899190611122565b6000604051808303816000865af19150503d80600081146107c6576040519150601f19603f3d011682016040523d82523d6000602084013e6107cb565b606091505b50509050806108215760405162461bcd60e51b815260206004820152601e60248201527f6d61726b6574706c616365207472616e73616374696f6e206661696c6564000060448201526064015b60405180910390fd5b60006127106001548b8b600081811061083c5761083c610f54565b9050602002013561084d91906111d3565b61085791906111f2565b6002546003549192506001600160a01b03908116916323b872dd911630848e8e60008161088657610886610f54565b905060200201356108979190611214565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af11580156108eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090f91906110c6565b5060005b8b811015610a4557600089898381811061092f5761092f610f54565b905060200201358c8c8481811061094857610948610f54565b90506020020135610959919061122b565b90508d8d8381811061096d5761096d610f54565b90506020020160208101906109829190610f39565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a98116600483015260248201849052919091169063095ea7b3906044016020604051808303816000875af1158015610a0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3091906110c6565b50508080610a3d90611243565b915050610913565b5060019c9b505050505050505050505050565b610a60610ae8565b6001600160a01b038116610adc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610818565b610ae581610b42565b50565b6000546001600160a01b031633146106cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610818565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054610bab906110e8565b90600052602060002090601f016020900481019282610bcd5760008555610c13565b82601f10610be65782800160ff19823516178555610c13565b82800160010185558215610c13579182015b82811115610c13578235825591602001919060010190610bf8565b50610c1f929150610c23565b5090565b5b80821115610c1f5760008155600101610c24565b600060208284031215610c4a57600080fd5b81356001600160e01b031981168114610c6257600080fd5b9392505050565b80356001600160a01b0381168114610c8057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610cb157600080fd5b610cba85610c69565b9350610cc860208601610c69565b925060408501359150606085013567ffffffffffffffff80821115610cec57600080fd5b818701915087601f830112610d0057600080fd5b813581811115610d1257610d12610c85565b604051601f8201601f19908116603f01168101908382118183101715610d3a57610d3a610c85565b816040528281528a6020848701011115610d5357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008083601f840112610d8957600080fd5b50813567ffffffffffffffff811115610da157600080fd5b602083019150836020828501011115610db957600080fd5b9250929050565b60008060008060608587031215610dd657600080fd5b610ddf85610c69565b9350602085013567ffffffffffffffff811115610dfb57600080fd5b610e0787828801610d77565b9598909750949560400135949350505050565b60008083601f840112610e2c57600080fd5b50813567ffffffffffffffff811115610e4457600080fd5b6020830191508360208260051b8501011115610db957600080fd5b600080600080600080600080600060a08a8c031215610e7d57600080fd5b893567ffffffffffffffff80821115610e9557600080fd5b610ea18d838e01610e1a565b909b50995060208c0135915080821115610eba57600080fd5b610ec68d838e01610e1a565b909950975060408c0135915080821115610edf57600080fd5b610eeb8d838e01610e1a565b9097509550859150610eff60608d01610c69565b945060808c0135915080821115610f1557600080fd5b50610f228c828d01610d77565b915080935050809150509295985092959850929598565b600060208284031215610f4b57600080fd5b610c6282610c69565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b83811015610f9a57815187529582019590820190600101610f7e565b509495945050505050565b6000815180845260005b81811015610fcb57602081850181015186830182015201610faf565b81811115610fdd576000602083870101525b50601f01601f19169290920160200192915050565b600060e082016001600160a01b03808b168452602060e081860152828b5180855261010087019150828d01945060005b81811015611040578551851683529483019491830191600101611022565b50508581036040870152611054818c610f6a565b9350505050828103606084015261106b8188610f6a565b6001600160a01b0387166080850152905082810360a084015261108e8186610fa5565b9150506110a160c083018461ffff169052565b98975050505050505050565b6000602082840312156110bf57600080fd5b5051919050565b6000602082840312156110d857600080fd5b81518015158114610c6257600080fd5b600181811c908216806110fc57607f821691505b60208210810361111c57634e487b7160e01b600052602260045260246000fd5b50919050565b600080835481600182811c91508083168061113e57607f831692505b6020808410820361115d57634e487b7160e01b86526022600452602486fd5b8180156111715760018114611182576111af565b60ff198616895284890196506111af565b60008a81526020902060005b868110156111a75781548b82015290850190830161118e565b505084890196505b509498975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156111ed576111ed6111bd565b500290565b60008261120f57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611226576112266111bd565b500390565b6000821982111561123e5761123e6111bd565b500190565b600060018201611255576112556111bd565b506001019056fea26469706673582212202e76beacc7c98b5e42651c95bf029f758581084c5b5534f899ac8c675a45bf9164736f6c634300080d0033

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

00000000000000000000000059728544b08ab483533076417fbbb2fd0b17ce3a00000000000000000000000059728544b08ab483533076417fbbb2fd0b17ce3a00000000000000000000000000000000000000000000000000000000000000c8000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c5000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : marketplace_ (address): 0x59728544B08AB483533076417FbBB2fD0B17CE3a
Arg [1] : wethApprovalSeeker_ (address): 0x59728544B08AB483533076417FbBB2fD0B17CE3a
Arg [2] : feePerTenThousand_ (uint256): 200
Arg [3] : provider (address): 0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5
Arg [4] : weth_ (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000059728544b08ab483533076417fbbb2fd0b17ce3a
Arg [1] : 00000000000000000000000059728544b08ab483533076417fbbb2fd0b17ce3a
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [3] : 000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c5
Arg [4] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


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