Skip to content
Verified contractPartial

MKReceiver

Address0x1510d8d3ac633ec4111b422f17cfb2ffbb4d6148
Balance

0.0018 ETH

 

Transactions

1

 

Compiler

solc 0.5.12

 

Same code

139 more contracts

 

Details

Compiler
solc 0.5.12+commit.7709ece9
Language
solidity
Optimization
Yes, 200 runs
EVM version
petersburg
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
9,211,580
Creation transaction
0x32d810a30f…deb1747501
Main copy (most transactions)
0x7aaaaa21…e9904ecb

MKReceiver.sol

pragma solidity ^0.5.4;

contract Owned {

    // The owner
    address public owner;

    event OwnerChanged(address indexed _newOwner);

    /**
     * @dev Throws if the sender is not the owner.
     */
    modifier onlyOwner {
        require(msg.sender == owner, "Must be owner");
        _;
    }

    constructor() public {
        owner = msg.sender;
    }

    /**
     * @dev Lets the owner transfer ownership of the contract to a new owner.
     * @param _newOwner The new owner.
     */
    function changeOwner(address _newOwner) external onlyOwner {
        require(_newOwner != address(0), "Address must not be null");
        owner = _newOwner;
        emit OwnerChanged(_newOwner);
    }
}


contract MKReceiver {

    event Received(uint indexed value, address indexed sender, bytes data);

    address public ownedAddr;

    constructor (address _addr) public{
        ownedAddr = _addr;
    }
    
    function() external payable {
        if(msg.value > 0) {
            emit Received(msg.value, msg.sender, msg.data);
        }
    }
    
    function execute(address destination, uint value, bytes memory data) public {
        
        address addr = Owned(ownedAddr).owner();
        require(addr == msg.sender); 
        
        destination.call.value(value)(data);
    }

}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "petersburg",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.