Skip to content
Verified contractPartial

Forwarder

Address0x24fcc4e03af992ab9e7017f7af5ae941693be124
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.4.24

 

Same code

1 more contract

 

Details

Compiler
solc 0.4.24+commit.e67f0147
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: no, runtime code: yes
Verified on Sourcify
Created in block
6,863,260
Creation transaction
0x131f990b5e…58f1f7c83e

Forwarder.sol

// Submitted by EthereumHistory (ethereumhistory.com)
pragma solidity ^0.4.24;

contract Ownable {
    address public owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

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

    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    function transferOwnership(address _newOwner) public onlyOwner {
        _transferOwnership(_newOwner);
    }

    function _transferOwnership(address _newOwner) internal {
        require(_newOwner != address(0));
        emit OwnershipTransferred(owner, _newOwner);
        owner = _newOwner;
    }
}

contract ERC20Basic {
    function transfer(address _to, uint256 _value) public returns (bool);
}

contract Forwarder is Ownable {
    event Deposit(address indexed to, address indexed from, uint256 value);

    function () public payable {
        if (owner.call.value(msg.value)()) {
            emit Deposit(msg.sender, owner, msg.value);
        } else {
            revert();
        }
    }

    function transferToOwner(address _token, uint256 _amount) public onlyOwner {
        require(ERC20Basic(_token).transfer(owner, _amount));
    }

    function contractCall(address _target, bytes _data) public payable onlyOwner {
        require(_target.call.value(msg.value)(_data));
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.