ETH Price: $3,328.40 (+2.97%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw ETH178155352023-07-31 20:59:23549 days ago1690837163IN
0xB452feCF...b0E624613
0 ETH0.0018668237.42401305
Withdraw ETH178153482023-07-31 20:21:59550 days ago1690834919IN
0xB452feCF...b0E624613
0 ETH0.001657333.23979812
Withdraw Remaini...178153372023-07-31 20:19:47550 days ago1690834787IN
0xB452feCF...b0E624613
0 ETH0.0013185833.0149606
Withdraw ETH178153002023-07-31 20:12:11550 days ago1690834331IN
0xB452feCF...b0E624613
0 ETH0.0016055532.24079181
Purchase Tickets172620752023-05-15 1:56:35627 days ago1684115795IN
0xB452feCF...b0E624613
0.12 ETH0.0067218755.02468709
Purchase Tickets172619882023-05-15 1:39:11627 days ago1684114751IN
0xB452feCF...b0E624613
0.12 ETH0.0046049543.83128461
Purchase Tickets172238472023-05-09 15:41:35633 days ago1683646895IN
0xB452feCF...b0E624613
0.03 ETH0.01719766140.81212015
Purchase Tickets172185012023-05-08 21:40:23633 days ago1683582023IN
0xB452feCF...b0E624613
0.06 ETH0.01310983107.34154685
Purchase Tickets172184172023-05-08 21:23:23633 days ago1683581003IN
0xB452feCF...b0E624613
1 ETH0.0103498384.75134424
Purchase Tickets172182622023-05-08 20:51:59634 days ago1683579119IN
0xB452feCF...b0E624613
1 ETH0.0090081485.75595106
Purchase Tickets172134132023-05-08 4:31:23634 days ago1683520283IN
0xB452feCF...b0E624613
1 ETH0.0106648987.31407756
Purchase Tickets172108322023-05-07 19:48:11635 days ago1683488891IN
0xB452feCF...b0E624613
1 ETH0.01462805119.744099
Purchase Tickets172024932023-05-06 15:37:35636 days ago1683387455IN
0xB452feCF...b0E624613
1 ETH0.01940413158.85626075
Purchase Tickets172005882023-05-06 9:13:11636 days ago1683364391IN
0xB452feCF...b0E624613
1 ETH0.01286834105.36421616
Purchase Tickets171979232023-05-06 0:13:11636 days ago1683331991IN
0xB452feCF...b0E624613
1 ETH0.01637373134.05273454
Purchase Tickets171499902023-04-29 6:31:23643 days ago1682749883IN
0xB452feCF...b0E624613
0.03 ETH0.0042357334.68018009
Purchase Tickets171493662023-04-29 4:25:59643 days ago1682742359IN
0xB452feCF...b0E624613
0.06 ETH0.0043069135.25949642
Set Authorized171469662023-04-28 20:20:47644 days ago1682713247IN
0xB452feCF...b0E624613
0 ETH0.0018443739.75202867
Purchase Tickets171349592023-04-27 3:50:35645 days ago1682567435IN
0xB452feCF...b0E624613
0.03 ETH0.0041207333.73535292
Create Event171315892023-04-26 16:27:23646 days ago1682526443IN
0xB452feCF...b0E624613
0 ETH0.0029770443.4872048
Purchase Tickets170346512023-04-12 21:43:35659 days ago1681335815IN
0xB452feCF...b0E624613
0.03 ETH0.0027657122.64433541
Purchase Tickets170345922023-04-12 21:31:47659 days ago1681335107IN
0xB452feCF...b0E624613
0.15 ETH0.0030802125.2203703
Purchase Tickets169853652023-04-05 21:59:35666 days ago1680731975IN
0xB452feCF...b0E624613
0.03 ETH0.003701130.30410334
Purchase Tickets169753702023-04-04 11:56:23668 days ago1680609383IN
0xB452feCF...b0E624613
0.03 ETH0.002797422.90160511
Purchase Tickets169727612023-04-04 2:59:47668 days ago1680577187IN
0xB452feCF...b0E624613
0.03 ETH0.0029748324.35751811
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
178153372023-07-31 20:19:47550 days ago1690834787
0xB452feCF...b0E624613
8.83 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TicketsHelper

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : TicketsHelper.sol
// SPDX-License-Identifier: GPL-3.0
// solhint-disable-next-line
pragma solidity 0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interface/IBapTickets.sol";

/// @title Bulls and Apes Project - Tickets Helper
/// @author BAP Dev Team
/// @notice Helper contract to interact with BAP Tickets contract
contract TicketsHelper is Ownable {
    /// @notice Contract address for BAP Tickets
    IBapTickets public bapTickets;

    /// @notice signer address
    address public secret;

    /// @notice Mapping for addresses allowed to use this contract
    mapping(address => bool) public isAuthorized;
    /// @notice Mapping for used signatures
    mapping(bytes => bool) public isSignatureUsed;
    /// @notice Mapping for users, event id and amount of tickets purchased
    mapping(address => mapping(uint256 => uint256)) public ticketsPurchased;

    /// @notice Deploys the contract
    /// @param _bapTickets BAP Tickets contract address

    constructor(address _bapTickets, address _secret) {
        bapTickets = IBapTickets(_bapTickets);
        secret = _secret;

        isAuthorized[msg.sender] = true;
    }

    modifier onlyAuthorized() {
        require(isAuthorized[msg.sender], "Not Authorized");
        _;
    }

    /// @notice fallback function
    receive() external payable {}

    /// @notice Call createEvent function on BAP Tickets contract
    /// @param _maxSupply Maximum supply of tickets
    function createEvent(uint256 _maxSupply) external onlyAuthorized {
        bapTickets.createEvent(_maxSupply, 0, 0, 0, 0);
    }

    /// @notice Call airdrop function on BAP Tickets contract
    /// @param eventId Event Id
    /// @param account Address to send the tickets
    /// @param amount Quantity of tickets to mint
    function airdrop(
        uint256 eventId,
        address account,
        uint256 amount
    ) external onlyAuthorized {
        bapTickets.airdrop(eventId, account, amount);
    }

    ///@notice Purchase tickets for an event
    ///@param eventId Event Id
    ///@param amount Quantity of tickets to purchase
    ///@param price Price of the tickets
    ///@param timeOut Time out for the purchase
    ///@param maxPerWallet Maximum amount of tickets per wallet
    ///@param recipient Address to receive the tickets
    ///@param signature Signature to verify the purchase
    function purchaseTickets(
        uint256 eventId,
        uint256 amount,
        uint256 price,
        uint256 timeOut,
        uint256 maxPerWallet,
        address recipient,
        bytes memory signature
    ) external payable {
        require(
            !isSignatureUsed[signature],
            "purchaseTickets: Signature already used"
        );
        require(
            ticketsPurchased[recipient][eventId] + amount <= maxPerWallet,
            "purchaseTickets: Max per wallet reached"
        );
        require(block.timestamp <= timeOut, "purchaseTickets: Time out");
        require(msg.value >= price, "purchaseTickets: Invalid ETH amount");
        require(
            _verifyHashSignature(
                keccak256(
                    abi.encode(eventId, amount, price, timeOut, maxPerWallet, recipient)
                ),
                signature
            ),
            "purchaseTickets: Invalid signature"
        );

        isSignatureUsed[signature] = true;

        ticketsPurchased[recipient][eventId] += amount;

        if(msg.value > price){
            (bool success, ) = recipient.call{value: msg.value - price}("");
            require(success, "purchaseTickets: Unable to send refund eth");
        }

        bapTickets.airdrop(eventId, recipient, amount);
    }

    // Ownable

    /// @notice authorise a new address to use this contract
    /// @param operator Address to be set
    /// @param status Can use this contract or not
    /// @dev Only contract owner can call this function
    function setAuthorized(address operator, bool status) external onlyOwner {
        isAuthorized[operator] = status;
    }

    /// @notice Change the address for signer
    /// @param _newAddress New address to be set
    /// @dev Can only be called by the contract owner
    function setSecret(address _newAddress) external onlyOwner {
        secret = _newAddress;
    }

    /// @notice Transfer ownership from external contracts owned by this contract
    /// @param _contract Address of the external contract
    /// @param _newOwner New owner
    /// @dev Only contract owner can call this function
    function transferOwnershipExternalContract(
        address _contract,
        address _newOwner
    ) external onlyOwner {
        Ownable(_contract).transferOwnership(_newOwner);
    }

    /// @notice Change the address for Tickets Contract
    /// @param _newAddress New address to be set
    /// @dev Can only be called by the contract owner
    function setTicketsContract(address _newAddress) external onlyOwner {
        bapTickets = IBapTickets(_newAddress);
    }    

    /// @notice Call withdrawETH function on BAP Tickets contract
    /// @param _address Address to send the ETH
    /// @param amount Quantity of ETH to send
    function withdrawETH(
        address _address,
        uint256 amount
    ) external onlyOwner {
        bapTickets.withdrawETH(_address, amount);
    }

    function withdrawRemainingETH(address _address, uint256 amount)
        external
        onlyOwner
    {
        require(amount <= address(this).balance, "Insufficient funds");
        (bool success, ) = _address.call{value: amount}("");

        require(success, "Unable to send eth");
    }

    function _verifyHashSignature(
        bytes32 freshHash,
        bytes memory signature
    ) internal view returns (bool) {
        bytes32 hash = keccak256(
            abi.encodePacked("\x19Ethereum Signed Message:\n32", freshHash)
        );

        bytes32 r;
        bytes32 s;
        uint8 v;

        if (signature.length != 65) {
            return false;
        }
        assembly {
            r := mload(add(signature, 32))
            s := mload(add(signature, 64))
            v := byte(0, mload(add(signature, 96)))
        }

        if (v < 27) {
            v += 27;
        }

        address signer = address(0);
        if (v == 27 || v == 28) {
            // solium-disable-next-line arg-overflow
            signer = ecrecover(hash, v, r, s);
        }
        return secret == signer;
    }
}

File 2 of 4 : IBapTickets.sol
// SPDX-License-Identifier: GPL-3.0
// solhint-disable-next-line
pragma solidity 0.8.12;

interface IBapTickets {
    function withdrawETH(address _address, uint256 amount) external;

    function airdrop(uint256 eventId, address account, uint256 amount) external;

    function createEvent(
        uint256 _maxSupply,
        uint8 _maxPerTx,
        uint8 _maxPerWallet,
        uint256 _ticketPrice,
        uint8 _status // 0: sale close, 1: public sale - everybody can buy, no checks, 2: only gods owner - only god owners can buy (you're currently checking), 3: only signature - only users with a valid signature
    ) external;
}

File 3 of 4 : Context.sol
// 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;
    }
}

File 4 of 4 : Ownable.sol
// 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);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_bapTickets","type":"address"},{"internalType":"address","name":"_secret","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"eventId","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bapTickets","outputs":[{"internalType":"contract IBapTickets","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"createEvent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"isSignatureUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eventId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"timeOut","type":"uint256"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"purchaseTickets","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secret","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setAuthorized","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAddress","type":"address"}],"name":"setSecret","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAddress","type":"address"}],"name":"setTicketsContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ticketsPurchased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnershipExternalContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawRemainingETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b5060405161124738038061124783398101604081905261002f916100f2565b61003833610086565b600180546001600160a01b039384166001600160a01b03199182161782556002805493909416921691909117909155336000908152600360205260409020805460ff19169091179055610125565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100ed57600080fd5b919050565b6000806040838503121561010557600080fd5b61010e836100d6565b915061011c602084016100d6565b90509250929050565b611113806101346000396000f3fe6080604052600436106101015760003560e01c80637bbf8df911610095578063d1efd30d11610064578063d1efd30d146102e3578063e9a7484c14610303578063ef13c7a414610323578063f2fde38b14610343578063fe9fbb801461036357600080fd5b80637bbf8df9146102725780638da5cb5b14610292578063977d996d146102b0578063b815fb54146102d057600080fd5b80634546a632116100d15780634546a632146101e55780634782f7791461021d578063711bf9b21461023d578063715018a61461025d57600080fd5b8062c1e5cf1461010d5780631150f0f31461015857806324330982146101a35780632cc6d167146101c557600080fd5b3661010857005b600080fd5b34801561011957600080fd5b50610145610128366004610dd1565b600560209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561016457600080fd5b50610193610173366004610e9e565b805160208183018101805160048252928201919093012091525460ff1681565b604051901515815260200161014f565b3480156101af57600080fd5b506101c36101be366004610edb565b610393565b005b3480156101d157600080fd5b506101c36101e0366004610f0e565b6103fb565b3480156101f157600080fd5b50600154610205906001600160a01b031681565b6040516001600160a01b03909116815260200161014f565b34801561022957600080fd5b506101c3610238366004610dd1565b610425565b34801561024957600080fd5b506101c3610258366004610f30565b610466565b34801561026957600080fd5b506101c3610499565b34801561027e57600080fd5b506101c361028d366004610dd1565b6104ad565b34801561029e57600080fd5b506000546001600160a01b0316610205565b3480156102bc57600080fd5b506101c36102cb366004610f6c565b61059c565b6101c36102de366004610f85565b610669565b3480156102ef57600080fd5b50600254610205906001600160a01b031681565b34801561030f57600080fd5b506101c361031e366004610f0e565b610a75565b34801561032f57600080fd5b506101c361033e366004611003565b610a9f565b34801561034f57600080fd5b506101c361035e366004610f0e565b610b61565b34801561036f57600080fd5b5061019361037e366004610f0e565b60036020526000908152604090205460ff1681565b61039b610bda565b60405163f2fde38b60e01b81526001600160a01b03828116600483015283169063f2fde38b906024015b600060405180830381600087803b1580156103df57600080fd5b505af11580156103f3573d6000803e3d6000fd5b505050505050565b610403610bda565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61042d610bda565b600154604051634782f77960e01b81526001600160a01b0384811660048301526024820184905290911690634782f779906044016103c5565b61046e610bda565b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b6104a1610bda565b6104ab6000610c34565b565b6104b5610bda565b478111156104ff5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b60448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461054c576040519150601f19603f3d011682016040523d82523d6000602084013e610551565b606091505b50509050806105975760405162461bcd60e51b81526020600482015260126024820152710aadcc2c4d8ca40e8de40e6cadcc840cae8d60731b60448201526064016104f6565b505050565b3360009081526003602052604090205460ff166105ec5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b60448201526064016104f6565b600154604051631b6e929560e11b815260048101839052600060248201819052604482018190526064820181905260848201526001600160a01b03909116906336dd252a9060a401600060405180830381600087803b15801561064e57600080fd5b505af1158015610662573d6000803e3d6000fd5b5050505050565b6004816040516106799190611038565b9081526040519081900360200190205460ff16156106e95760405162461bcd60e51b815260206004820152602760248201527f70757263686173655469636b6574733a205369676e617475726520616c726561604482015266191e481d5cd95960ca1b60648201526084016104f6565b6001600160a01b03821660009081526005602090815260408083208a8452909152902054839061071a908890611089565b11156107785760405162461bcd60e51b815260206004820152602760248201527f70757263686173655469636b6574733a204d6178207065722077616c6c6574206044820152661c995858da195960ca1b60648201526084016104f6565b834211156107c85760405162461bcd60e51b815260206004820152601960248201527f70757263686173655469636b6574733a2054696d65206f75740000000000000060448201526064016104f6565b843410156108245760405162461bcd60e51b815260206004820152602360248201527f70757263686173655469636b6574733a20496e76616c69642045544820616d6f6044820152621d5b9d60ea1b60648201526084016104f6565b6040805160208101899052908101879052606081018690526080810185905260a081018490526001600160a01b03831660c082015261087c9060e0016040516020818303038152906040528051906020012082610c84565b6108d35760405162461bcd60e51b815260206004820152602260248201527f70757263686173655469636b6574733a20496e76616c6964207369676e617475604482015261726560f01b60648201526084016104f6565b60016004826040516108e59190611038565b9081526040805160209281900383019020805460ff1916931515939093179092556001600160a01b0384166000908152600582528281208a82529091529081208054889290610935908490611089565b9091555050348510156109ff5760006001600160a01b03831661095887346110a1565b604051600081818185875af1925050503d8060008114610994576040519150601f19603f3d011682016040523d82523d6000602084013e610999565b606091505b50509050806109fd5760405162461bcd60e51b815260206004820152602a60248201527f70757263686173655469636b6574733a20556e61626c6520746f2073656e64206044820152690e4cacceadcc840cae8d60b31b60648201526084016104f6565b505b600154604051633bc4f1e960e21b8152600481018990526001600160a01b038481166024830152604482018990529091169063ef13c7a490606401600060405180830381600087803b158015610a5457600080fd5b505af1158015610a68573d6000803e3d6000fd5b5050505050505050505050565b610a7d610bda565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526003602052604090205460ff16610aef5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b60448201526064016104f6565b600154604051633bc4f1e960e21b8152600481018590526001600160a01b038481166024830152604482018490529091169063ef13c7a490606401600060405180830381600087803b158015610b4457600080fd5b505af1158015610b58573d6000803e3d6000fd5b50505050505050565b610b69610bda565b6001600160a01b038116610bce5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104f6565b610bd781610c34565b50565b6000546001600160a01b031633146104ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104f6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390526000908190605c0160405160208183030381529060405280519060200120905060008060008551604114610cef576000945050505050610daf565b50505060208301516040840151606085015160001a601b811015610d1b57610d18601b826110b8565b90505b60008160ff16601b1480610d3257508160ff16601c145b15610d975760408051600081526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa158015610d8a573d6000803e3d6000fd5b5050506020604051035190505b6002546001600160a01b039081169116149450505050505b92915050565b80356001600160a01b0381168114610dcc57600080fd5b919050565b60008060408385031215610de457600080fd5b610ded83610db5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610e2257600080fd5b813567ffffffffffffffff80821115610e3d57610e3d610dfb565b604051601f8301601f19908116603f01168101908282118183101715610e6557610e65610dfb565b81604052838152866020858801011115610e7e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215610eb057600080fd5b813567ffffffffffffffff811115610ec757600080fd5b610ed384828501610e11565b949350505050565b60008060408385031215610eee57600080fd5b610ef783610db5565b9150610f0560208401610db5565b90509250929050565b600060208284031215610f2057600080fd5b610f2982610db5565b9392505050565b60008060408385031215610f4357600080fd5b610f4c83610db5565b915060208301358015158114610f6157600080fd5b809150509250929050565b600060208284031215610f7e57600080fd5b5035919050565b600080600080600080600060e0888a031215610fa057600080fd5b8735965060208801359550604088013594506060880135935060808801359250610fcc60a08901610db5565b915060c088013567ffffffffffffffff811115610fe857600080fd5b610ff48a828b01610e11565b91505092959891949750929550565b60008060006060848603121561101857600080fd5b8335925061102860208501610db5565b9150604084013590509250925092565b6000825160005b81811015611059576020818601810151858301520161103f565b81811115611068576000828501525b509190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561109c5761109c611073565b500190565b6000828210156110b3576110b3611073565b500390565b600060ff821660ff84168060ff038211156110d5576110d5611073565b01939250505056fea26469706673582212205167e9a56671cd4747c30cc5f1516f358af2ee5429cfc4c38d4e6000ba64d5db64736f6c634300080c0033000000000000000000000000a417e5aacc260e710e66800cc7d02a9e2fcf27e5000000000000000000000000c8033181079b4a920cf5a3fd1a9f15fccc8c610f

Deployed Bytecode

0x6080604052600436106101015760003560e01c80637bbf8df911610095578063d1efd30d11610064578063d1efd30d146102e3578063e9a7484c14610303578063ef13c7a414610323578063f2fde38b14610343578063fe9fbb801461036357600080fd5b80637bbf8df9146102725780638da5cb5b14610292578063977d996d146102b0578063b815fb54146102d057600080fd5b80634546a632116100d15780634546a632146101e55780634782f7791461021d578063711bf9b21461023d578063715018a61461025d57600080fd5b8062c1e5cf1461010d5780631150f0f31461015857806324330982146101a35780632cc6d167146101c557600080fd5b3661010857005b600080fd5b34801561011957600080fd5b50610145610128366004610dd1565b600560209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561016457600080fd5b50610193610173366004610e9e565b805160208183018101805160048252928201919093012091525460ff1681565b604051901515815260200161014f565b3480156101af57600080fd5b506101c36101be366004610edb565b610393565b005b3480156101d157600080fd5b506101c36101e0366004610f0e565b6103fb565b3480156101f157600080fd5b50600154610205906001600160a01b031681565b6040516001600160a01b03909116815260200161014f565b34801561022957600080fd5b506101c3610238366004610dd1565b610425565b34801561024957600080fd5b506101c3610258366004610f30565b610466565b34801561026957600080fd5b506101c3610499565b34801561027e57600080fd5b506101c361028d366004610dd1565b6104ad565b34801561029e57600080fd5b506000546001600160a01b0316610205565b3480156102bc57600080fd5b506101c36102cb366004610f6c565b61059c565b6101c36102de366004610f85565b610669565b3480156102ef57600080fd5b50600254610205906001600160a01b031681565b34801561030f57600080fd5b506101c361031e366004610f0e565b610a75565b34801561032f57600080fd5b506101c361033e366004611003565b610a9f565b34801561034f57600080fd5b506101c361035e366004610f0e565b610b61565b34801561036f57600080fd5b5061019361037e366004610f0e565b60036020526000908152604090205460ff1681565b61039b610bda565b60405163f2fde38b60e01b81526001600160a01b03828116600483015283169063f2fde38b906024015b600060405180830381600087803b1580156103df57600080fd5b505af11580156103f3573d6000803e3d6000fd5b505050505050565b610403610bda565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61042d610bda565b600154604051634782f77960e01b81526001600160a01b0384811660048301526024820184905290911690634782f779906044016103c5565b61046e610bda565b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b6104a1610bda565b6104ab6000610c34565b565b6104b5610bda565b478111156104ff5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b60448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461054c576040519150601f19603f3d011682016040523d82523d6000602084013e610551565b606091505b50509050806105975760405162461bcd60e51b81526020600482015260126024820152710aadcc2c4d8ca40e8de40e6cadcc840cae8d60731b60448201526064016104f6565b505050565b3360009081526003602052604090205460ff166105ec5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b60448201526064016104f6565b600154604051631b6e929560e11b815260048101839052600060248201819052604482018190526064820181905260848201526001600160a01b03909116906336dd252a9060a401600060405180830381600087803b15801561064e57600080fd5b505af1158015610662573d6000803e3d6000fd5b5050505050565b6004816040516106799190611038565b9081526040519081900360200190205460ff16156106e95760405162461bcd60e51b815260206004820152602760248201527f70757263686173655469636b6574733a205369676e617475726520616c726561604482015266191e481d5cd95960ca1b60648201526084016104f6565b6001600160a01b03821660009081526005602090815260408083208a8452909152902054839061071a908890611089565b11156107785760405162461bcd60e51b815260206004820152602760248201527f70757263686173655469636b6574733a204d6178207065722077616c6c6574206044820152661c995858da195960ca1b60648201526084016104f6565b834211156107c85760405162461bcd60e51b815260206004820152601960248201527f70757263686173655469636b6574733a2054696d65206f75740000000000000060448201526064016104f6565b843410156108245760405162461bcd60e51b815260206004820152602360248201527f70757263686173655469636b6574733a20496e76616c69642045544820616d6f6044820152621d5b9d60ea1b60648201526084016104f6565b6040805160208101899052908101879052606081018690526080810185905260a081018490526001600160a01b03831660c082015261087c9060e0016040516020818303038152906040528051906020012082610c84565b6108d35760405162461bcd60e51b815260206004820152602260248201527f70757263686173655469636b6574733a20496e76616c6964207369676e617475604482015261726560f01b60648201526084016104f6565b60016004826040516108e59190611038565b9081526040805160209281900383019020805460ff1916931515939093179092556001600160a01b0384166000908152600582528281208a82529091529081208054889290610935908490611089565b9091555050348510156109ff5760006001600160a01b03831661095887346110a1565b604051600081818185875af1925050503d8060008114610994576040519150601f19603f3d011682016040523d82523d6000602084013e610999565b606091505b50509050806109fd5760405162461bcd60e51b815260206004820152602a60248201527f70757263686173655469636b6574733a20556e61626c6520746f2073656e64206044820152690e4cacceadcc840cae8d60b31b60648201526084016104f6565b505b600154604051633bc4f1e960e21b8152600481018990526001600160a01b038481166024830152604482018990529091169063ef13c7a490606401600060405180830381600087803b158015610a5457600080fd5b505af1158015610a68573d6000803e3d6000fd5b5050505050505050505050565b610a7d610bda565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526003602052604090205460ff16610aef5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b60448201526064016104f6565b600154604051633bc4f1e960e21b8152600481018590526001600160a01b038481166024830152604482018490529091169063ef13c7a490606401600060405180830381600087803b158015610b4457600080fd5b505af1158015610b58573d6000803e3d6000fd5b50505050505050565b610b69610bda565b6001600160a01b038116610bce5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104f6565b610bd781610c34565b50565b6000546001600160a01b031633146104ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104f6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390526000908190605c0160405160208183030381529060405280519060200120905060008060008551604114610cef576000945050505050610daf565b50505060208301516040840151606085015160001a601b811015610d1b57610d18601b826110b8565b90505b60008160ff16601b1480610d3257508160ff16601c145b15610d975760408051600081526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa158015610d8a573d6000803e3d6000fd5b5050506020604051035190505b6002546001600160a01b039081169116149450505050505b92915050565b80356001600160a01b0381168114610dcc57600080fd5b919050565b60008060408385031215610de457600080fd5b610ded83610db5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610e2257600080fd5b813567ffffffffffffffff80821115610e3d57610e3d610dfb565b604051601f8301601f19908116603f01168101908282118183101715610e6557610e65610dfb565b81604052838152866020858801011115610e7e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215610eb057600080fd5b813567ffffffffffffffff811115610ec757600080fd5b610ed384828501610e11565b949350505050565b60008060408385031215610eee57600080fd5b610ef783610db5565b9150610f0560208401610db5565b90509250929050565b600060208284031215610f2057600080fd5b610f2982610db5565b9392505050565b60008060408385031215610f4357600080fd5b610f4c83610db5565b915060208301358015158114610f6157600080fd5b809150509250929050565b600060208284031215610f7e57600080fd5b5035919050565b600080600080600080600060e0888a031215610fa057600080fd5b8735965060208801359550604088013594506060880135935060808801359250610fcc60a08901610db5565b915060c088013567ffffffffffffffff811115610fe857600080fd5b610ff48a828b01610e11565b91505092959891949750929550565b60008060006060848603121561101857600080fd5b8335925061102860208501610db5565b9150604084013590509250925092565b6000825160005b81811015611059576020818601810151858301520161103f565b81811115611068576000828501525b509190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561109c5761109c611073565b500190565b6000828210156110b3576110b3611073565b500390565b600060ff821660ff84168060ff038211156110d5576110d5611073565b01939250505056fea26469706673582212205167e9a56671cd4747c30cc5f1516f358af2ee5429cfc4c38d4e6000ba64d5db64736f6c634300080c0033

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

000000000000000000000000a417e5aacc260e710e66800cc7d02a9e2fcf27e5000000000000000000000000c8033181079b4a920cf5a3fd1a9f15fccc8c610f

-----Decoded View---------------
Arg [0] : _bapTickets (address): 0xa417E5aaCc260E710e66800cC7d02a9E2FCf27e5
Arg [1] : _secret (address): 0xc8033181079b4a920cf5A3Fd1A9f15fCCC8C610F

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000a417e5aacc260e710e66800cc7d02a9e2fcf27e5
Arg [1] : 000000000000000000000000c8033181079b4a920cf5a3fd1a9f15fccc8c610f


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.