Transaction Hash:
Block:
13735335 at Dec-03-2021 07:14:57 PM +UTC
Transaction Fee:
0.00200243602736784 ETH
$3.76
Gas Used:
22,860 Gas / 87.595626744 Gwei
Emitted Events:
87 |
KingdomPay.Take( code=607544744102595100, value=9000000000000000 )
|
Account State Difference:
Address | Before | After | State Difference | ||
---|---|---|---|---|---|
0xA1775DE5...356605f83 | 22.990216593131840328 Eth | 22.999216593131840328 Eth | 0.009 | ||
0xc365c331...C4058C8E1
Miner
| (Binance Pool) | 3,361.811354448369328761 Eth | 3,361.811388738369328761 Eth | 0.00003429 | |
0xcE90Df11...442E6eecf |
0.01312725 Eth
Nonce: 0
|
0.00212481397263216 Eth
Nonce: 1
| 0.01100243602736784 |
Execution Trace
ETH 0.009
KingdomPay.take( code=607544744102595100 )
pragma solidity ^0.5.12; // import "./ownership/Ownable.sol"; contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } 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 () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _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 onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = 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 onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract KingdomPay is Ownable { event Buy(uint256 code, uint256 value); event Take(uint256 code, uint256 value); address payable private receiver; constructor() public { } function () payable external {} function take(uint256 code) public payable { emit Take(code, msg.value); } function buy(uint256 code) public payable { emit Buy(code, msg.value); } function setReceiver(address payable r) public onlyOwner{ receiver = r; } function withdraw() public { require(_msgSender() == receiver || _msgSender() == owner(), "Incorrect address"); receiver.transfer(address(this).balance); } }