ETH Price: $2,145.58 (+3.89%)

Transaction Decoder

Block:
20335629 at Jul-18-2024 07:54:59 PM +UTC
Transaction Fee:
0.00030406002684444 ETH $0.65
Gas Used:
30,840 Gas / 9.859274541 Gwei

Emitted Events:

456 VersePayments.Payment( metadata=eyJhbGciOiJFUzI1NiIsImtpZCI6IjdhNjRlZmQ1LTJiNDctNGZjZi1hODcxLTExZmY5OTQ4YTdjOCJ9.ChczNDExLjgzNTAwMDAwMDAwMDAwMDAwMBIDVVNEGiQyYzkwZjMzOC1iMWE2LTQ1OWYtOWIxNS1lY2IxOTk5ZjM3ZDk.AtMszyDn8-yo5MqU89fTvQvQs5QnGF6K5FS7Y9QeeIWr90SZVBMq60vc8i1lD0cYlImHHAFpmYuDQP_wXHtQMQ, amount=14654870472927325, buyer=[Sender] 0x933d7d515b6cdc7763aff030bfc61aff143d6637 )

Account State Difference:

  Address   Before After State Difference Code
0x36845c0D...804c0d3Eb 172.435333732281154223 Eth172.449988602754081548 Eth0.014654870472927325
(Titan Builder)
5.27475412278196012 Eth5.27478312011613868 Eth0.00002899733417856
0x933D7D51...F143D6637
0.306395519039308976 Eth
Nonce: 47
0.291436588539537211 Eth
Nonce: 48
0.014958930499771765

Execution Trace

ETH 0.014654870472927325 VersePayments.pay( metadata=eyJhbGciOiJFUzI1NiIsImtpZCI6IjdhNjRlZmQ1LTJiNDctNGZjZi1hODcxLTExZmY5OTQ4YTdjOCJ9.ChczNDExLjgzNTAwMDAwMDAwMDAwMDAwMBIDVVNEGiQyYzkwZjMzOC1iMWE2LTQ1OWYtOWIxNS1lY2IxOTk5ZjM3ZDk.AtMszyDn8-yo5MqU89fTvQvQs5QnGF6K5FS7Y9QeeIWr90SZVBMq60vc8i1lD0cYlImHHAFpmYuDQP_wXHtQMQ )
{"Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n"},"Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},"PaymentsV3.sol":{"content":"pragma solidity 0.8.13;\n// SPDX-License-Identifier: MIT\n\nimport \"./Ownable.sol\";\n\n/**\n * @title Verse payments capturer\n * @author Verse\n * @notice This contract allows to capture ETH payments from private wallets that will be picked up by Verse platform.\n */\ninterface IVersePayments {\n    /**\n     * @dev Payment event is emitted when user pays to the contract, where `metadata` is used to identify the payment.\n     */\n    event Payment(string metadata, uint256 amount, address indexed buyer);\n\n    /**\n     * @dev Refund event is emited during refund, where `metadata` is used to identify the payment.\n     */\n    event Refund(string metadata);\n\n    /**\n     * @notice Pay method collects user payment for the item, where `metadata` is used to identify the payment and emits {Payment} event.\n     */\n    function pay(string calldata metadata) external payable;\n\n    /**\n     * @dev Refund method transfers user ETH and emits {Refund} event.\n     */\n    function refund(\n        string calldata metadata,\n        uint256 amount,\n        address buyer\n    ) external;\n\n    /**\n     * @dev Withdraw method transfers all collected ETH to the treasury wallet.\n     */\n    function withdraw() external;\n\n    /**\n     * @dev Withdraw method transfers `amount` of collected ETH to the treasury wallet.\n     */\n    function withdrawAmount(uint256 amount) external;\n}\n\n/**\n * @title Verse payments capturer\n * @author Verse\n * @notice This contract allows to capture ETH payments from private wallets that will be picked up by Verse platform.\n */\ncontract VersePayments is Ownable, IVersePayments {\n    address treasury;\n    address refundsManager;\n\n    constructor(address treasury_, address refundsManager_) {\n        treasury = treasury_;\n        refundsManager = refundsManager_;\n    }\n\n    /**\n     * @notice Pay method collects user payment for the item, where `metadata` is used to identify the payment and emits {Payment} event.\n     */\n    function pay(string calldata metadata) public payable {\n        emit Payment(metadata, msg.value, msg.sender);\n    }\n\n    /**\n     * @dev Refund method transfers user ETH and emits {Refund} event.\n     */\n    function refund(\n        string calldata metadata,\n        uint256 amount,\n        address buyer\n    ) public onlyRefundsManager {\n        (bool sent, ) = buyer.call{value: amount}(\"\");\n        require(sent, \"Failed to send Ether\");\n        emit Refund(metadata);\n    }\n\n    /**\n     * @dev Withdraw method transfers all collected ETH to the treasury wallet.\n     */\n    function withdraw() public onlyOwner {\n        uint256 balance = address(this).balance;\n        (bool sent, ) = treasury.call{value: balance}(\"\");\n        require(sent, \"Failed to send Ether\");\n    }\n\n    /**\n     * @dev Withdraw method transfers `amount` of collected ETH to the treasury wallet.\n     */\n    function withdrawAmount(uint256 amount) public onlyOwner {\n        (bool sent, ) = treasury.call{value: amount}(\"\");\n        require(sent, \"Failed to send Ether\");\n    }\n\n    /**\n     * @dev modifier to only\n     */\n    modifier onlyRefundsManager() {\n        require(msg.sender == refundsManager);\n        _;\n    }\n\n    /**\n     * @dev Sets new refunds manager for the contract.\n     */\n    function setRefundsManager(address refundsManager_) public onlyOwner {\n        refundsManager = refundsManager_;\n    }\n\n    /**\n     * @dev contractBalance returns balance\n     */\n    function contractBalance() public view returns (uint256) {\n        return address(this).balance;\n    }\n\n    /**\n     * @dev allows smart contract to accept direct payments\n     */\n    fallback() external payable {}\n\n    /**\n     * @dev allows smart contract to accept direct payments\n     */\n    receive() external payable {}\n}\n"}}