Contract 0x8A04D08DE0a7cA534019cC49D3E0ca4B736440Fe 1

Contract Overview

Balance:
0 ETH
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe27ad004527d366783697cf5af508480562d012faf66f18c91ae731c29085220Listing131821192022-06-22 11:54:1295 days 18 hrs ago0x62fd1b3b4f6aaaed8f206547dccfe995ad0856f3 IN  0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe0 ETH0.00000840337 ETH
0xacdf8321d998e29a5e5658484467bac52ad94ccb5a056ca383c2820ddfc3474eListing131805592022-06-22 10:26:2495 days 19 hrs ago0x158ecd1e4d4e9a32dbda6fc9d9a462045496814b IN  0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe0 ETH0.000008153471 ETH
0x642977c2a9b529b12a8d90c3591121f7dc12a78fe8325e4a785b436746221694Listing131805252022-06-22 10:24:2395 days 19 hrs ago0x158ecd1e4d4e9a32dbda6fc9d9a462045496814b IN  0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe0 ETH0.000006378636 ETH
0x63b797b57f7a10ecb8d1b6d0e4224343c34cbdc3e963cb3e3368a60e4ed281a9Approve_token_as...130862632022-06-17 16:31:20100 days 13 hrs ago0x158ecd1e4d4e9a32dbda6fc9d9a462045496814b IN  0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe0 ETH0.000005587859 ETH
0x27937afca6c8bc3ecca0c2ffea8d0ed96c71ed3b0a950bb680aa39e4d5bb591b0x60206124130861142022-06-17 16:23:20100 days 13 hrs ago0x158ecd1e4d4e9a32dbda6fc9d9a462045496814b IN  Create: Vyper_contract0 ETH0.000179488458 ETH
[ Download CSV Export 
Latest 9 internal transactions
Parent Txn Hash Block From To Value
0xe27ad004527d366783697cf5af508480562d012faf66f18c91ae731c29085220131821192022-06-22 11:54:1295 days 18 hrs ago 0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe 0xe46cc7bd95c3020aa23421cdd3ff2e9ab32e940b0 ETH
0xe27ad004527d366783697cf5af508480562d012faf66f18c91ae731c29085220131821192022-06-22 11:54:1295 days 18 hrs ago 0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe 0xe46cc7bd95c3020aa23421cdd3ff2e9ab32e940b0 ETH
0xe27ad004527d366783697cf5af508480562d012faf66f18c91ae731c29085220131821192022-06-22 11:54:1295 days 18 hrs ago 0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe 0xe46cc7bd95c3020aa23421cdd3ff2e9ab32e940b0 ETH
0xe27ad004527d366783697cf5af508480562d012faf66f18c91ae731c29085220131821192022-06-22 11:54:1295 days 18 hrs ago 0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe 0xe46cc7bd95c3020aa23421cdd3ff2e9ab32e940b0 ETH
0xacdf8321d998e29a5e5658484467bac52ad94ccb5a056ca383c2820ddfc3474e131805592022-06-22 10:26:2495 days 19 hrs ago 0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe 0x7342a5347d80f781de6e0058e745ccc8ec6746070 ETH
0xacdf8321d998e29a5e5658484467bac52ad94ccb5a056ca383c2820ddfc3474e131805592022-06-22 10:26:2495 days 19 hrs ago 0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe 0x7342a5347d80f781de6e0058e745ccc8ec6746070 ETH
0xacdf8321d998e29a5e5658484467bac52ad94ccb5a056ca383c2820ddfc3474e131805592022-06-22 10:26:2495 days 19 hrs ago 0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe 0x7342a5347d80f781de6e0058e745ccc8ec6746070 ETH
0xacdf8321d998e29a5e5658484467bac52ad94ccb5a056ca383c2820ddfc3474e131805592022-06-22 10:26:2495 days 19 hrs ago 0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe 0x7342a5347d80f781de6e0058e745ccc8ec6746070 ETH
0x642977c2a9b529b12a8d90c3591121f7dc12a78fe8325e4a785b436746221694131805252022-06-22 10:24:2395 days 19 hrs ago 0x8a04d08de0a7ca534019cc49d3e0ca4b736440fe 0x7342a5347d80f781de6e0058e745ccc8ec6746070 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.3.1

Optimization Enabled:
N/A

Other Settings:
, MIT license

Contract Source Code (Vyper language format)

# @dev ERC-721 Exchange
# @author Amajid Sinar
# @version 0.3.1

from vyper.interfaces import ERC721 as IERC721
from vyper.interfaces import ERC20 as IERC20


struct PricingInfo:
    is_on_sale: bool
    payment_token: address
    listing_price: uint256

struct BidInfo:
    payment_token: address
    price_bid: uint256
    expire_time: uint256

struct PaymentAllocation:
    platform: uint256
    seller: uint256



DAY: constant(uint256) = 86400
QUARTER_HOUR: constant(uint256) = DAY / 24 / 4
DECIMAL: constant(uint256) = 3

minimum_expire_time: uint256 
approved_tokens_as_payment: HashMap[address, bool]
listing_information: HashMap[address, HashMap[uint256, PricingInfo]]
bid_information: HashMap[address, HashMap[uint256, HashMap[address, BidInfo]]]
admin: address
treasury: public(address)
platform_fee_in_terms_of_decimal: uint256



event Bidding:
    sender: indexed(address)
    nft_collection: indexed(address)
    token_id: uint256
    payment_token: indexed(address)
    bidding_price: uint256
    expire_time: uint256

event ChangeExpireTime:
    before: uint256
    after: uint256

event Listing:
    maker: indexed(address)
    nft_collection: indexed(address)
    token_id: uint256
    payment_token: address
    listing_price: uint256


event ApproveTokenAsPayment:
    token: indexed(address)
    is_approved: bool

event OrdersMatched:
    sender: indexed(address)
    receiver: indexed(address)
    nft_collection: indexed(address)
    token_id: uint256
    payment_token: address
    price_matched: uint256

event ChangePlatformFee:
    before: uint256
    after: uint256

event ChangeTreasuryAddress:
    before: address
    after: address

@external
def __init__(_treasury: address, _platform_fee_in_terms_of_decimal: uint256):
    self.admin = msg.sender
    self.minimum_expire_time = QUARTER_HOUR
    self.treasury = _treasury
    self.platform_fee_in_terms_of_decimal = _platform_fee_in_terms_of_decimal


@external
@view
def check_listed_items(nft_collection: address, token_id: uint256) -> PricingInfo:
    return self.listing_information[nft_collection][token_id]

@external
def change_minimum_expire_time(_expire_time: uint256):
    assert _expire_time > 0, "ArtpediaExchange: expire time must be greater than 0"
    assert msg.sender == self.admin, "ArtpediaExchange: caller is not the Admin"
    log ChangeExpireTime(self.minimum_expire_time, _expire_time)
    self.minimum_expire_time = _expire_time
    
@external
def change_treasury_address(_treasury: address):
    assert _treasury != ZERO_ADDRESS, "ArtpediaExchange: cannot change into ZERO_ADDRESS"
    assert _treasury != self.treasury, "ArtpediaExchange: new treasury address must be different than the old one"
    assert msg.sender == self.admin, "ArtpediaExchange: caller is not the Admin"
    log ChangeTreasuryAddress(self.treasury, _treasury)
    self.treasury = _treasury

@external
def change_platform_fee_in_terms_of_decimal(_platform_fee_in_terms_of_decimal: uint256):
    assert _platform_fee_in_terms_of_decimal >= 1, "ArtpediaExchange: platform fee must be greater than 1 (because of rounding)"
    assert msg.sender == self.admin, "ArtpediaExchange: caller is not the Admin"
    log ChangePlatformFee(self.platform_fee_in_terms_of_decimal, _platform_fee_in_terms_of_decimal)
    self.platform_fee_in_terms_of_decimal = _platform_fee_in_terms_of_decimal


@view
@internal
def _check_approved_tokens_as_payment(token: address) -> bool:
    return self.approved_tokens_as_payment[token]


@view
@external
def check_approved_tokens_as_payment(token: address) -> bool:
    return self._check_approved_tokens_as_payment(token)

@external
@view
def return_bade_items(_nft_collection: address, _token_id: uint256, user: address) -> BidInfo:
    return self.bid_information[_nft_collection][_token_id][user]

@internal
@view
def _calculate_token_allocation(_total_amount: uint256) -> PaymentAllocation:
    # platform_fee_in_percentage: uint256 = self.platform_fee_in_terms_of_decimal / DECIMAL
    platform_allocation: uint256 = _total_amount * self.platform_fee_in_terms_of_decimal / 10**DECIMAL / 100 
    seller_allocation: uint256 = _total_amount - platform_allocation
    # platform_allocation: uint256 = _total_amount - seller_allocation
    assert platform_allocation > 0 and seller_allocation > 0, 'ArtpediaExchange: listing/bidding fee is too small, consider using more than 49 wei'
    return PaymentAllocation(
        {
            platform: platform_allocation,
            seller: seller_allocation

        }
    )

@internal
def _is_approved_or_owner(
    _spender: address, _nft_collection: address, _token_id: uint256
) -> bool:
    owner: address = IERC721(_nft_collection).ownerOf(_token_id)
    is_owner: bool = owner == _spender
    is_approved: bool = IERC721(_nft_collection).getApproved(_token_id) == _spender
    is_operator: bool = IERC721(_nft_collection).isApprovedForAll(owner, _spender)

    return (is_owner or is_approved) or is_operator
    

@external
def listing(
    _nft_collection: address,
    _token_id: uint256,
    _payment_token: address,
    _listing_price: uint256,
):
    """
    @notice
        Create offer for ERC721 (NFT) by sender and propagated to the network. The sender must have the authorithy to give approval to the exchange.
    @param _nft_collection
        The address of the NFT collection
    @param _token_id
        The id of the NFT in the nft_collection
    @param _payment_token
        The address of ERC20 token requested as the payment
    @param _listing_price
        The price offered by the owner
    """
    assert (
        IERC721(_nft_collection).getApproved(_token_id) == self
    ), "ArtpediaExchange: exchange is not approved yet"
    assert (
        self.listing_information[_nft_collection][_token_id].is_on_sale == False
    ), "ArtpediaExchange: item already listed"
    assert (
        self._is_approved_or_owner(msg.sender, _nft_collection, _token_id) == True
    ), "ArtpediaExchange: listing caller is not owner nor approved(including operators)"
    self._calculate_token_allocation(_listing_price)
    assert self._check_approved_tokens_as_payment(
        _payment_token
    ), "ArtpediaExchange: not an approved ERC-20 on Artpedia"
    self.listing_information[_nft_collection][_token_id] = PricingInfo(
        {
            is_on_sale: True,
            payment_token: _payment_token,
            listing_price: _listing_price,
        }
    )
    #
    log Listing(msg.sender, _nft_collection, _token_id, _payment_token, _listing_price)


@internal
def _delisting(_nft_collection: address, _token_id: uint256, sender: address):
    """
    @dev Throws unless `msg.sender` is the current owner, an authorized admin for this NFT, or an approved address
    @notice
        Delist / cancel NFT from being sold in the exchange. The sender must be either the owner, approved, or operators.
        Will emit Listing event
    @param _nft_collection
        The address of the NFT collection
    @param _token_id
        The id of the NFT in the nft_collection

    """
    assert (
        self.listing_information[_nft_collection][_token_id].is_on_sale == True
    ), "ArtpediaExchange: item not listed"
    assert (
        self._is_approved_or_owner(sender, _nft_collection, _token_id) == True
    ), "ArtpediaExchange: cancel caller is not owner nor approved(including operators)"
    # TODO: remove approval from the exchange
    self.listing_information[_nft_collection][_token_id] = PricingInfo(
        {
            is_on_sale: False,
            payment_token: ZERO_ADDRESS,
            listing_price: 0,
        }
    )
    log Listing(sender, _nft_collection, _token_id, ZERO_ADDRESS, 0)




@external
@view
def calculate_token_allocation(_total_amount: uint256) -> PaymentAllocation:
    return self._calculate_token_allocation(_total_amount)


@internal
def _send_payment_to_entitled_parties(_payment_token: address, _total_amount: uint256, _from: address, _to: address):
    payment_allocation: PaymentAllocation = self._calculate_token_allocation(_total_amount)
    IERC20(_payment_token).transferFrom(_from, _to, payment_allocation.seller)
    IERC20(_payment_token).transferFrom(_from, self.treasury, payment_allocation.platform)



@external
def delisting(_nft_collection: address, _token_id: uint256):
    """
    @dev Throws unless `msg.sender` is the current owner, an authorized admin for this NFT, or an approved address
    @notice
        Delist / cancel NFT from being sold in the exchange. The sender must be either the owner, approved, or operators.
        Will emit Listing event
    @param _nft_collection
        The address of the NFT collection
    @param _token_id
        The id of the NFT in the nft_collection

    """
    self._delisting(_nft_collection, _token_id, msg.sender)


@external
def approve_token_as_payment(_erc_20_token: address, _is_approved: bool):
    """
    @dev Throws unless `msg.sender` is the admin of the exchange
    @notice
        Approve ERC20 token as the payment of the NFT
    @param _erc_20_token
        ERC20 token that is given approval
    @param _is_approved
        is the token approved or not, can be used for turning off approval

    """
    assert self.admin == msg.sender, "ArtpediaExchange: caller is not the Admin"
    assert (
        self.approved_tokens_as_payment[_erc_20_token] != _is_approved
    ), "ArtpediaExchange: ERC-20 token already has the same approval"
    self.approved_tokens_as_payment[_erc_20_token] = _is_approved
    log ApproveTokenAsPayment(_erc_20_token, _is_approved)

@external
@nonreentrant("transferFrom")
def buy(_nft_collection: address, _token_id: uint256):
    """
    @notice
        Buy ERC721 instantly / spot buy
    @param _nft_collection
        The address of the NFT collection
    @param _token_id
        The id of the NFT in the nft_collection
    """
    pricing_info: PricingInfo = self.listing_information[_nft_collection][_token_id]
    assert pricing_info.is_on_sale == True, "ArtpediaExchange: item not listed"
    assert IERC20(pricing_info.payment_token).balanceOf(msg.sender) >= pricing_info.listing_price, "ArtpediaExchange: buyer does not have enough ERC-20 Tokens"
    assert IERC20(pricing_info.payment_token).allowance(msg.sender, self) >= pricing_info.listing_price, "ArtpediaExchange: insufficient allowance"

    erc_721_owner: address = IERC721(_nft_collection).ownerOf(_token_id)
    
    assert erc_721_owner != msg.sender, "ArtpediaExchange: caller is ERC-721 owner"
    self._delisting(_nft_collection, _token_id, self)
    # Transfer NFT from seller into buyer
    IERC721(_nft_collection).safeTransferFrom(erc_721_owner, msg.sender, _token_id, b"")

    # Transfer ERC-20 from buyer into seller and treasury
    self._send_payment_to_entitled_parties(pricing_info.payment_token, pricing_info.listing_price, msg.sender, erc_721_owner)
    
    log OrdersMatched(msg.sender, erc_721_owner, _nft_collection, _token_id, pricing_info.payment_token, pricing_info.listing_price)
    

@external
def bid(_nft_collection: address, _token_id: uint256, _payment_token: address, _price_bid: uint256, _expire_time: uint256):
    """
    @notice
        Buy ERC-721 for unlisted item or item with different listing price(usually lower). 
        Override new bid by default. Can also bid using different ERC-20 from the listing ERC-20 tokens
    @param _nft_collection
        The address of the NFT collection
    @param _token_id
        The id of the NFT in the nft_collection
    """
    erc_721_owner: address = IERC721(_nft_collection).ownerOf(_token_id)
    assert erc_721_owner != msg.sender, "ArtpediaExchange: caller is ERC-721 owner"
    assert _payment_token != ZERO_ADDRESS, "ArtpediaExchange: cannot bid using zero address"

    self._calculate_token_allocation(_price_bid)
    assert self._check_approved_tokens_as_payment(
        _payment_token
    ), "ArtpediaExchange: not an approved ERC-20 on Artpedia"

    assert _expire_time >= self.minimum_expire_time, "ArtpediaExchange: expire time too low"
    
    assert IERC20(_payment_token).balanceOf(msg.sender) >= _price_bid, "ArtpediaExchange: buyer does not have enough ERC-20 Tokens"
    assert IERC20(_payment_token).allowance(msg.sender, self) >= _price_bid, "ArtpediaExchange: insufficient allowance"    
    self.bid_information[_nft_collection][_token_id][msg.sender] = BidInfo({
        payment_token: _payment_token,
        price_bid: _price_bid,
        expire_time: block.timestamp + _expire_time
    })
    
    log Bidding(msg.sender,_nft_collection, _token_id, _payment_token, _price_bid, block.timestamp+ _expire_time)


@external
@nonreentrant("transferFrom")
def accept_bid(_nft_collection: address, _token_id: uint256, _payment_token: address, _minimum_price: uint256, _taker: address):
    """
    @notice
        Accept bid from a taker. Throw error unless caller is not owner nor approved(including operators)
    @param _nft_collection
        The address of the NFT collection
    @param _token_id
        The id of the NFT in the NFT collection
    @param _payment_token
        The address of ERC20 token requested as the payment
    @param _minimum_price
        The price of the NFT to prevent frontrunning
    @param _taker
        Address of accepted bid
    
    """
    erc_721_owner: address = IERC721(_nft_collection).ownerOf(_token_id)
    assert (
        self._is_approved_or_owner(msg.sender, _nft_collection, _token_id) == True
    ), "ArtpediaExchange: caller is not owner nor approved(including operators)"
    bid_info: BidInfo = self.bid_information[_nft_collection][_token_id][_taker]

    assert bid_info.payment_token != ZERO_ADDRESS and bid_info.price_bid > 0, "ArtpediaExchange: accept non-existent bid"
    assert bid_info.expire_time > block.timestamp, "ArtpediaExchange: bid has expired"

    assert bid_info.payment_token == _payment_token and bid_info.price_bid >= _minimum_price, "ArtpediaExchange: bid frontrunning detected"
    if self.listing_information[_nft_collection][_token_id].is_on_sale == True:
        self._delisting(_nft_collection, _token_id, self)

    # Transfer NFT from seller into buyer
    IERC721(_nft_collection).safeTransferFrom(erc_721_owner, _taker, _token_id, b"")

    # Transfer ERC-20 from buyer into seller
    self._send_payment_to_entitled_parties(_payment_token, _minimum_price, _taker, erc_721_owner)
    
    log OrdersMatched(_taker, erc_721_owner, _nft_collection, _token_id, bid_info.payment_token, bid_info.price_bid)


@external
def cancel_bid(_nft_collection: address, _token_id: uint256):
    """
    @notice
        Cancel for existing bid. 
        Emit Bidding Event with 0 bid and 0 expire_time
        Throw error if bid is already cancelled, or sender is not owner nor approved
    @param _nft_collection
        The address of the NFT collection
    @param _token_id
        The id of the NFT in the nft_collection
    """

    bid_info: BidInfo = self.bid_information[_nft_collection][_token_id][msg.sender]
    assert bid_info.payment_token != ZERO_ADDRESS and bid_info.price_bid > 0, "ArtpediaExchange: no bid for this token_id"
    assert bid_info.expire_time > block.timestamp, "ArtpediaExchange: no bid for this token_id"

    self.bid_information[_nft_collection][_token_id][msg.sender] = BidInfo({
        payment_token: ZERO_ADDRESS,
        price_bid: 0,
        expire_time: 0
    })
    log Bidding(msg.sender,_nft_collection, _token_id, ZERO_ADDRESS, 0, 0)

Contract ABI

[{"name":"Bidding","inputs":[{"name":"sender","type":"address","indexed":true},{"name":"nft_collection","type":"address","indexed":true},{"name":"token_id","type":"uint256","indexed":false},{"name":"payment_token","type":"address","indexed":true},{"name":"bidding_price","type":"uint256","indexed":false},{"name":"expire_time","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"ChangeExpireTime","inputs":[{"name":"before","type":"uint256","indexed":false},{"name":"after","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Listing","inputs":[{"name":"maker","type":"address","indexed":true},{"name":"nft_collection","type":"address","indexed":true},{"name":"token_id","type":"uint256","indexed":false},{"name":"payment_token","type":"address","indexed":false},{"name":"listing_price","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApproveTokenAsPayment","inputs":[{"name":"token","type":"address","indexed":true},{"name":"is_approved","type":"bool","indexed":false}],"anonymous":false,"type":"event"},{"name":"OrdersMatched","inputs":[{"name":"sender","type":"address","indexed":true},{"name":"receiver","type":"address","indexed":true},{"name":"nft_collection","type":"address","indexed":true},{"name":"token_id","type":"uint256","indexed":false},{"name":"payment_token","type":"address","indexed":false},{"name":"price_matched","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"ChangePlatformFee","inputs":[{"name":"before","type":"uint256","indexed":false},{"name":"after","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"ChangeTreasuryAddress","inputs":[{"name":"before","type":"address","indexed":false},{"name":"after","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_treasury","type":"address"},{"name":"_platform_fee_in_terms_of_decimal","type":"uint256"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"check_listed_items","inputs":[{"name":"nft_collection","type":"address"},{"name":"token_id","type":"uint256"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"is_on_sale","type":"bool"},{"name":"payment_token","type":"address"},{"name":"listing_price","type":"uint256"}]}],"gas":7114},{"stateMutability":"nonpayable","type":"function","name":"change_minimum_expire_time","inputs":[{"name":"_expire_time","type":"uint256"}],"outputs":[],"gas":48459},{"stateMutability":"nonpayable","type":"function","name":"change_treasury_address","inputs":[{"name":"_treasury","type":"address"}],"outputs":[],"gas":54190},{"stateMutability":"nonpayable","type":"function","name":"change_platform_fee_in_terms_of_decimal","inputs":[{"name":"_platform_fee_in_terms_of_decimal","type":"uint256"}],"outputs":[],"gas":48538},{"stateMutability":"view","type":"function","name":"check_approved_tokens_as_payment","inputs":[{"name":"token","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":3241},{"stateMutability":"view","type":"function","name":"return_bade_items","inputs":[{"name":"_nft_collection","type":"address"},{"name":"_token_id","type":"uint256"},{"name":"user","type":"address"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"payment_token","type":"address"},{"name":"price_bid","type":"uint256"},{"name":"expire_time","type":"uint256"}]}],"gas":7530},{"stateMutability":"nonpayable","type":"function","name":"listing","inputs":[{"name":"_nft_collection","type":"address"},{"name":"_token_id","type":"uint256"},{"name":"_payment_token","type":"address"},{"name":"_listing_price","type":"uint256"}],"outputs":[],"gas":145528},{"stateMutability":"view","type":"function","name":"calculate_token_allocation","inputs":[{"name":"_total_amount","type":"uint256"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"platform","type":"uint256"},{"name":"seller","type":"uint256"}]}],"gas":7159},{"stateMutability":"nonpayable","type":"function","name":"delisting","inputs":[{"name":"_nft_collection","type":"address"},{"name":"_token_id","type":"uint256"}],"outputs":[],"gas":82588},{"stateMutability":"nonpayable","type":"function","name":"approve_token_as_payment","inputs":[{"name":"_erc_20_token","type":"address"},{"name":"_is_approved","type":"bool"}],"outputs":[],"gas":49725},{"stateMutability":"nonpayable","type":"function","name":"buy","inputs":[{"name":"_nft_collection","type":"address"},{"name":"_token_id","type":"uint256"}],"outputs":[],"gas":197034},{"stateMutability":"nonpayable","type":"function","name":"bid","inputs":[{"name":"_nft_collection","type":"address"},{"name":"_token_id","type":"uint256"},{"name":"_payment_token","type":"address"},{"name":"_price_bid","type":"uint256"},{"name":"_expire_time","type":"uint256"}],"outputs":[],"gas":150440},{"stateMutability":"nonpayable","type":"function","name":"accept_bid","inputs":[{"name":"_nft_collection","type":"address"},{"name":"_token_id","type":"uint256"},{"name":"_payment_token","type":"address"},{"name":"_minimum_price","type":"uint256"},{"name":"_taker","type":"address"}],"outputs":[],"gas":203190},{"stateMutability":"nonpayable","type":"function","name":"cancel_bid","inputs":[{"name":"_nft_collection","type":"address"},{"name":"_token_id","type":"uint256"}],"outputs":[],"gas":79447},{"stateMutability":"view","type":"function","name":"treasury","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2880}]

60206124df6080396080518060a01c6124da5760e0523360055561038460015560e051600655602060206124df016080396080516007556124c256600436101561000d57611f2a565b60046000601c3760005134612482576356fc5f748118610073576004358060a01c6124825760e052600360e05160a052608052604060802060243560a0526080526040608020805461010052600181015461012052600281015461014052506060610100f35b63675783db81186101f65760006004351161011d57603460e0527f417274706564696145786368616e67653a206578706972652074696d65206d75610100527f73742062652067726561746572207468616e20300000000000000000000000006101205260e05060e0518061010001818260206001820306601f82010390500336823750506308c379a060a052602060c05260e05160206001820306601f820103905060440160bcfd5b60055433146101bb57602960e0527f417274706564696145786368616e67653a2063616c6c6572206973206e6f7420610100527f7468652041646d696e00000000000000000000000000000000000000000000006101205260e05060e0518061010001818260206001820306601f82010390500336823750506308c379a060a052602060c05260e05160206001820306601f820103905060440160bcfd5b7f9c34e7340ec7c22d4b50e5b1d90600f7db32f820d08caf4452106f2b9397a55460015460e05260043561010052604060e0a1600435600155005b637c5524d6811861045c576004358060a01c6124825760e052600060e05114156102b3576031610100527f417274706564696145786368616e67653a2063616e6e6f74206368616e676520610120527f696e746f205a45524f5f414444524553530000000000000000000000000000006101405261010050610100518061012001818260206001820306601f82010390500336823750506308c379a060c052602060e0526101005160206001820306601f820103905060440160dcfd5b60065460e051141561037d576049610100527f417274706564696145786368616e67653a206e65772074726561737572792061610120527f646472657373206d75737420626520646966666572656e74207468616e207468610140527f65206f6c64206f6e6500000000000000000000000000000000000000000000006101605261010050610100518061012001818260206001820306601f82010390500336823750506308c379a060c052602060e0526101005160206001820306601f820103905060440160dcfd5b600554331461041f576029610100527f417274706564696145786368616e67653a2063616c6c6572206973206e6f7420610120527f7468652041646d696e00000000000000000000000000000000000000000000006101405261010050610100518061012001818260206001820306601f82010390500336823750506308c379a060c052602060e0526101005160206001820306601f820103905060440160dcfd5b7f47465c537ea298326e00f42330741364e0d50829f54dcb3f0f316dfba2977e156006546101005260e051610120526040610100a160e051600655005b63395a34b78118610605576001600435101561052c57604b60e0527f417274706564696145786368616e67653a20706c6174666f726d20666565206d610100527f7573742062652067726561746572207468616e2031202862656361757365206f610120527f6620726f756e64696e67290000000000000000000000000000000000000000006101405260e05060e0518061010001818260206001820306601f82010390500336823750506308c379a060a052602060c05260e05160206001820306601f820103905060440160bcfd5b60055433146105ca57602960e0527f417274706564696145786368616e67653a2063616c6c6572206973206e6f7420610100527f7468652041646d696e00000000000000000000000000000000000000000000006101205260e05060e0518061010001818260206001820306601f82010390500336823750506308c379a060a052602060c05260e05160206001820306601f820103905060440160bcfd5b7fbb4e0eb36e507712b75799bed269ecfb238490f505c83cf8ed7fe5bc03e5e1b260075460e05260043561010052604060e0a1600435600755005b63511467ab8118610640576004358060a01c61248257610100526101005160e052610631610120611f30565b61012051610140526020610140f35b63282e159a81186106b5576004358060a01c6124825760e0526044358060a01c6124825761010052600460e05160a052608052604060802060243560a05260805260406080206101005160a0526080526040608020805461012052600181015461014052600281015461016052506060610120f35b634129a6438118610aab576004358060a01c61248257610220526044358060a01c61248257610240523063081812fc61026052602435610280526020610260602461027c610220515afa61070e573d600060003e3d6000fd5b601f3d11156124825761026051146107bc57602e6102a0527f417274706564696145786368616e67653a2065786368616e6765206973206e6f6102c0527f7420617070726f766564207965740000000000000000000000000000000000006102e0526102a0506102a051806102c001818260206001820306601f82010390500336823750506308c379a0610260526020610280526102a05160206001820306601f820103905060440161027cfd5b60036102205160a052608052604060802060243560a0526080526040608020541561087d576025610260527f417274706564696145786368616e67653a206974656d20616c7265616479206c610280527f69737465640000000000000000000000000000000000000000000000000000006102a05261026050610260518061028001818260206001820306601f82010390500336823750506308c379a0610220526020610240526102605160206001820306601f820103905060440161023cfd5b60013360e05261022051610100526024356101205261089d610260612081565b610260511461096757604f610280527f417274706564696145786368616e67653a206c697374696e672063616c6c65726102a0527f206973206e6f74206f776e6572206e6f7220617070726f76656428696e636c756102c0527f64696e67206f70657261746f72732900000000000000000000000000000000006102e0526102805061028051806102a001818260206001820306601f82010390500336823750506308c379a0610240526020610260526102805160206001820306601f820103905060440161025cfd5b60643560e052610978610260611f46565b610260506102405160e05261098e610260611f30565b61026051610a32576034610280527f417274706564696145786368616e67653a206e6f7420616e20617070726f76656102a0527f64204552432d3230206f6e2041727470656469610000000000000000000000006102c0526102805061028051806102a001818260206001820306601f82010390500336823750506308c379a0610240526020610260526102805160206001820306601f820103905060440161025cfd5b60036102205160a052608052604060802060243560a05260805260406080206001815561024051600182015560643560028201555061022051337fc1ce8b8898da6d299bb8fddbdc0a62d736009005a5977787110fdbd27fabc8596024356102605261024051610280526064356102a0526060610260a3005b63210f7be78118610ae15760043560e052610ac76101c0611f46565b6101c0805161020052602081015161022052506040610200f35b634cc7d2b18118610b19576004358060a01c61248257610320526103205161022052602435610240523361026052610b17612194565b005b637b49b1978118610ce2576004358060a01c6124825760e0526024358060011c61248257610100523360055414610be4576029610120527f417274706564696145786368616e67653a2063616c6c6572206973206e6f7420610140527f7468652041646d696e00000000000000000000000000000000000000000000006101605261012050610120518061014001818260206001820306601f82010390500336823750506308c379a060e0526020610100526101205160206001820306601f820103905060440160fcfd5b61010051600260e05160a0526080526040608020541415610c9957603c610120527f417274706564696145786368616e67653a204552432d323020746f6b656e2061610140527f6c726561647920686173207468652073616d6520617070726f76616c000000006101605261012050610120518061014001818260206001820306601f82010390500336823750506308c379a060e0526020610100526101205160206001820306601f820103905060440160fcfd5b61010051600260e05160a05260805260406080205560e0517f61d11a1e118b9070c90b176c188f0d32c3e42ea61060ee051f99d258cef251f061010051610120526020610120a2005b63cce7ec1381186111e2576004358060a01c612482576103205260005461248257600160005560036103205160a052608052604060802060243560a05260805260406080208054610340526001810154610360526002810154610380525060016103405114610de75760216103a0527f417274706564696145786368616e67653a206974656d206e6f74206c697374656103c0527f64000000000000000000000000000000000000000000000000000000000000006103e0526103a0506103a051806103c001818260206001820306601f82010390500336823750506308c379a0610360526020610380526103a05160206001820306601f820103905060440161037cfd5b610380516370a082316103a052336103c05260206103a060246103bc610360515afa610e18573d600060003e3d6000fd5b601f3d1115612482576103a0511015610ec757603a6103e0527f417274706564696145786368616e67653a20627579657220646f6573206e6f74610400527f206861766520656e6f756768204552432d323020546f6b656e73000000000000610420526103e0506103e0518061040001818260206001820306601f82010390500336823750506308c379a06103a05260206103c0526103e05160206001820306601f82010390506044016103bcfd5b6103805163dd62ed3e6103a052336103c052306103e05260206103a060446103bc610360515afa610efd573d600060003e3d6000fd5b601f3d1115612482576103a0511015610fac576028610400527f417274706564696145786368616e67653a20696e73756666696369656e742061610420527f6c6c6f77616e63650000000000000000000000000000000000000000000000006104405261040050610400518061042001818260206001820306601f82010390500336823750506308c379a06103c05260206103e0526104005160206001820306601f82010390506044016103dcfd5b636352211e6103c0526024356103e05260206103c060246103dc610320515afa610fdb573d600060003e3d6000fd5b601f3d1115612482576103c0518060a01c612482576103a052336103a051141561109b5760296103c0527f417274706564696145786368616e67653a2063616c6c6572206973204552432d6103e0527f373231206f776e65720000000000000000000000000000000000000000000000610400526103c0506103c051806103e001818260206001820306601f82010390500336823750506308c379a06103805260206103a0526103c05160206001820306601f820103905060440161039cfd5b61032051610220526024356102405230610260526110b7612194565b63b88d4fde6103e0526104008060806103a0518252602082019150338252602082019150602435825260208201915080825260006103c0526103c0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f8201039050905090509050810150505050610320513b15612482576000600060a46103fc6000610320515af161116f573d600060003e3d6000fd5b610360516101c052610380516101e05233610200526103a051610220526111946123be565b610320516103a051337f6163e2adb0a1d3875c8f0607d462be9ce9f16c4086d3c7cd9e53a0897ee773246024356103c052610360516103e052610380516104005260606103c0a46000600055005b63d60a64938118611783576004358060a01c612482576101c0526044358060a01c612482576101e052636352211e61022052602435610240526020610220602461023c6101c0515afa61123a573d600060003e3d6000fd5b601f3d111561248257610220518060a01c6124825761020052336102005114156112fa576029610220527f417274706564696145786368616e67653a2063616c6c6572206973204552432d610240527f373231206f776e657200000000000000000000000000000000000000000000006102605261022050610220518061024001818260206001820306601f82010390500336823750506308c379a06101e0526020610200526102205160206001820306601f82010390506044016101fcfd5b60006101e05114156113a257602f610220527f417274706564696145786368616e67653a2063616e6e6f742062696420757369610240527f6e67207a65726f206164647265737300000000000000000000000000000000006102605261022050610220518061024001818260206001820306601f82010390500336823750506308c379a06101e0526020610200526102205160206001820306601f82010390506044016101fcfd5b60643560e0526113b3610220611f46565b610220506101e05160e0526113c9610220611f30565b6102205161146d576034610240527f417274706564696145786368616e67653a206e6f7420616e20617070726f7665610260527f64204552432d3230206f6e2041727470656469610000000000000000000000006102805261024050610240518061026001818260206001820306601f82010390500336823750506308c379a0610200526020610220526102405160206001820306601f820103905060440161021cfd5b6001546084351015611515576025610220527f417274706564696145786368616e67653a206578706972652074696d6520746f610240527f6f206c6f770000000000000000000000000000000000000000000000000000006102605261022050610220518061024001818260206001820306601f82010390500336823750506308c379a06101e0526020610200526102205160206001820306601f82010390506044016101fcfd5b6064356370a082316102205233610240526020610220602461023c6101e0515afa611545573d600060003e3d6000fd5b601f3d1115612482576102205110156115f457603a610260527f417274706564696145786368616e67653a20627579657220646f6573206e6f74610280527f206861766520656e6f756768204552432d323020546f6b656e730000000000006102a05261026050610260518061028001818260206001820306601f82010390500336823750506308c379a0610220526020610240526102605160206001820306601f820103905060440161023cfd5b60643563dd62ed3e61022052336102405230610260526020610220604461023c6101e0515afa611629573d600060003e3d6000fd5b601f3d1115612482576102205110156116d8576028610280527f417274706564696145786368616e67653a20696e73756666696369656e7420616102a0527f6c6c6f77616e63650000000000000000000000000000000000000000000000006102c0526102805061028051806102a001818260206001820306601f82010390500336823750506308c379a0610240526020610260526102805160206001820306601f820103905060440161025cfd5b60046101c05160a052608052604060802060243560a05260805260406080203360a05260805260406080206101e0518155606435600182015542608435818183011061248257808201905090506002820155506101e0516101c051337f8299eb47e374ebc9f3aa16e1a56ac5473e3ad338db9d0d145d9c5ea6421b21ef60243561022052606435610240524260843581818301106124825780820190509050610260526060610220a4005b63672694fe8118611cd5576004358060a01c61248257610320526044358060a01c61248257610340526084358060a01c6124825761036052600054612482576001600055636352211e6103a0526024356103c05260206103a060246103bc610320515afa6117f6573d600060003e3d6000fd5b601f3d1115612482576103a0518060a01c612482576103805260013360e05261032051610100526024356101205261182f6103a0612081565b6103a051146118f95760476103c0527f417274706564696145786368616e67653a2063616c6c6572206973206e6f74206103e0527f6f776e6572206e6f7220617070726f76656428696e636c7564696e67206f7065610400527f7261746f72732900000000000000000000000000000000000000000000000000610420526103c0506103c051806103e001818260206001820306601f82010390500336823750506308c379a06103805260206103a0526103c05160206001820306601f820103905060440161039cfd5b60046103205160a052608052604060802060243560a05260805260406080206103605160a052608052604060802080546103a05260018101546103c05260028101546103e0525060006103a051141561195357600061195b565b60006103c051115b6119fb576029610400527f417274706564696145786368616e67653a20616363657074206e6f6e2d657869610420527f7374656e742062696400000000000000000000000000000000000000000000006104405261040050610400518061042001818260206001820306601f82010390500336823750506308c379a06103c05260206103e0526104005160206001820306601f82010390506044016103dcfd5b426103e05111611aa1576021610400527f417274706564696145786368616e67653a206269642068617320657870697265610420527f64000000000000000000000000000000000000000000000000000000000000006104405261040050610400518061042001818260206001820306601f82010390500336823750506308c379a06103c05260206103e0526104005160206001820306601f82010390506044016103dcfd5b610340516103a05118611abc576064356103c0511015611abf565b60005b611b5f57602b610400527f417274706564696145786368616e67653a206269642066726f6e7472756e6e69610420527f6e672064657465637465640000000000000000000000000000000000000000006104405261040050610400518061042001818260206001820306601f82010390500336823750506308c379a06103c05260206103e0526104005160206001820306601f82010390506044016103dcfd5b600160036103205160a052608052604060802060243560a05260805260406080205418611ba2576103205161022052602435610240523061026052611ba2612194565b63b88d4fde610420526104408060806103805182526020820191506103605182526020820191506024358252602082019150808252600061040052610400818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f8201039050905090509050810150505050610320513b15612482576000600060a461043c6000610320515af1611c5d573d600060003e3d6000fd5b610340516101c0526064356101e05261036051610200526103805161022052611c846123be565b6103205161038051610360517f6163e2adb0a1d3875c8f0607d462be9ce9f16c4086d3c7cd9e53a0897ee77324602435610400526103a051610420526103c051610440526060610400a46000600055005b63af2210128118611f11576004358060a01c6124825760e052600460e05160a052608052604060802060243560a05260805260406080203360a0526080526040608020805461010052600181015461012052600281015461014052506000610100511415611d44576000611d4c565b600061012051115b611dec57602a610160527f417274706564696145786368616e67653a206e6f2062696420666f7220746869610180527f7320746f6b656e5f6964000000000000000000000000000000000000000000006101a05261016050610160518061018001818260206001820306601f82010390500336823750506308c379a0610120526020610140526101605160206001820306601f820103905060440161013cfd5b426101405111611e9257602a610160527f417274706564696145786368616e67653a206e6f2062696420666f7220746869610180527f7320746f6b656e5f6964000000000000000000000000000000000000000000006101a05261016050610160518061018001818260206001820306601f82010390500336823750506308c379a0610120526020610140526101605160206001820306601f820103905060440161013cfd5b600460e05160a052608052604060802060243560a05260805260406080203360a052608052604060802060008155600060018201556000600282015550600060e051337f8299eb47e374ebc9f3aa16e1a56ac5473e3ad338db9d0d145d9c5ea6421b21ef6024356101605260006101805260006101a0526060610160a4005b6361d027b38118611f285760065460e052602060e0f35b505b60006000fd5b600260e05160a052608052604060802054815250565b60e05160075480820282158284830414171561248257905090506103e8808204905090506064808204905090506101005260e0516101005180821061248257808203905090506101205260006101005111611fa2576000611faa565b600061012051115b61206f576053610140527f417274706564696145786368616e67653a206c697374696e672f62696464696e610160527f672066656520697320746f6f20736d616c6c2c20636f6e736964657220757369610180527f6e67206d6f7265207468616e20343920776569000000000000000000000000006101a05261014050610140518061016001818260206001820306601f82010390500336823750506308c379a0610100526020610120526101405160206001820306601f820103905060440161011cfd5b61010051815261012051602082015250565b636352211e6101605261012051610180526020610160602461017c610100515afa6120b1573d600060003e3d6000fd5b601f3d111561248257610160518060a01c612482576101405260e05161014051146101605260e05163081812fc6101a052610120516101c05260206101a060246101bc610100515afa612109573d600060003e3d6000fd5b601f3d1115612482576101a051146101805263e985e9c56101c052610140516101e05260e0516102005260206101c060446101dc610100515afa612152573d600060003e3d6000fd5b601f3d1115612482576101c0518060011c612482576101a0526101605161217c576101805161217f565b60015b61218c576101a05161218f565b60015b815250565b600160036102205160a05260805260406080206102405160a05260805260406080205414612258576021610280527f417274706564696145786368616e67653a206974656d206e6f74206c697374656102a0527f64000000000000000000000000000000000000000000000000000000000000006102c0526102805061028051806102a001818260206001820306601f82010390500336823750506308c379a0610240526020610260526102805160206001820306601f820103905060440161025cfd5b60016102605160e0526102205161010052610240516101205261227c610280612081565b610280511461234657604e6102a0527f417274706564696145786368616e67653a2063616e63656c2063616c6c6572206102c0527f6973206e6f74206f776e6572206e6f7220617070726f76656428696e636c75646102e0527f696e67206f70657261746f727329000000000000000000000000000000000000610300526102a0506102a051806102c001818260206001820306601f82010390500336823750506308c379a0610260526020610280526102a05160206001820306601f820103905060440161027cfd5b60036102205160a05260805260406080206102405160a05260805260406080206000815560006001820155600060028201555061022051610260517fc1ce8b8898da6d299bb8fddbdc0a62d736009005a5977787110fdbd27fabc859610240516102805260006102a05260006102c0526060610280a3565b6101e05160e0526123d0610280611f46565b610280805161024052602081015161026052506323b872dd61028052610200516102a052610220516102c052610260516102e0526020610280606461029c60006101c0515af1612425573d600060003e3d6000fd5b601f3d111561248257610280506323b872dd61028052610200516102a0526006546102c052610240516102e0526020610280606461029c60006101c0515af1612473573d600060003e3d6000fd5b601f3d11156124825761028050565b600080fd5b61003b6124c20361003b60003961003b6124c2036000f35b600080fd0000000000000000000000000e0e09c002d68035ecc1cf73a0893f8aa0ccb93700000000000000000000000000000000000000000000000000000000000007d0

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

0000000000000000000000000e0e09c002d68035ecc1cf73a0893f8aa0ccb93700000000000000000000000000000000000000000000000000000000000007d0

-----Decoded View---------------
Arg [0] : _treasury (address): 0x0e0e09c002d68035ecc1cf73a0893f8aa0ccb937
Arg [1] : _platform_fee_in_terms_of_decimal (uint256): 2000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000e0e09c002d68035ecc1cf73a0893f8aa0ccb937
Arg [1] : 00000000000000000000000000000000000000000000000000000000000007d0


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading