Transaction Hash:
Block:
18414295 at Oct-23-2023 04:55:23 PM +UTC
Transaction Fee:
0.00115315928117856 ETH
$2.61
Gas Used:
30,840 Gas / 37.391675784 Gwei
Emitted Events:
292 |
VersePayments.Payment( metadata=eyJhbGciOiJFUzI1NiIsImtpZCI6IjdhNjRlZmQ1LTJiNDctNGZjZi1hODcxLTExZmY5OTQ4YTdjOCJ9.ChcxNjg2LjY4NTAwMDAwMDAwMDAwMDAwMBIDVVNEGiQzODA5YWI2MS01N2Q4LTRjYTMtYTA0Zi1hYWI4YjNkMzY0NWU.yuH0XoqHBlTsiQguXmbJ5Yy_v9L_aPwvUSWYZMgwJRCht7Hc-KGz2SMgzrh3gu1G-hwhrp-isWgr_cu-h7YJQg, amount=385086723365655117, buyer=[Sender] 0xf5e4111b970972cc7c74a4e9e168309a3a320640 )
|
Account State Difference:
Address | Before | After | State Difference | ||
---|---|---|---|---|---|
0x36845c0D...804c0d3Eb | 40.472026947276715332 Eth | 40.857113670642370449 Eth | 0.385086723365655117 | ||
0x95222290...5CC4BAfe5
Miner
| (beaverbuild) | 6.733283927977705694 Eth | 6.733287011977705694 Eth | 0.000003084 | |
0xF5e4111b...A3A320640 |
0.547260137888659384 Eth
Nonce: 70
|
0.161020255241825707 Eth
Nonce: 71
| 0.386239882646833677 |
Execution Trace
ETH 0.385086723365655117
VersePayments.pay( metadata=eyJhbGciOiJFUzI1NiIsImtpZCI6IjdhNjRlZmQ1LTJiNDctNGZjZi1hODcxLTExZmY5OTQ4YTdjOCJ9.ChcxNjg2LjY4NTAwMDAwMDAwMDAwMDAwMBIDVVNEGiQzODA5YWI2MS01N2Q4LTRjYTMtYTA0Zi1hYWI4YjNkMzY0NWU.yuH0XoqHBlTsiQguXmbJ5Yy_v9L_aPwvUSWYZMgwJRCht7Hc-KGz2SMgzrh3gu1G-hwhrp-isWgr_cu-h7YJQg )
{"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"}}