Verified contractPartial
Forwarder
Address0x9a4f993d46e16c187a66aa396da842e8f78a91ca
- Balance
0 ETH
- Transactions
10
- Compiler
solc 0.4.19
- Same code
1,025 more contracts
Details
- Compiler
- solc 0.4.19+commit.c4cbbb05
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 7,779,175
- Creation transaction
- 0xbafb29f518…7f438ac016
- Main copy (most transactions)
- 0xfdbc4936…fcc58e8b
Forwarder.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
pragma solidity ^0.4.14;
contract ERC20Interface {
function transfer(address _to, uint256 _value) returns (bool success);
function balanceOf(address _owner) constant returns (uint256 balance);
}
contract Forwarder {
address public parentAddress;
event ForwarderDeposited(address from, uint value, bytes data);
function Forwarder() {
parentAddress = msg.sender;
}
modifier onlyParent {
if (msg.sender != parentAddress) {
revert();
}
_;
}
function() payable {
parentAddress.transfer(msg.value);
ForwarderDeposited(msg.sender, msg.value, msg.data);
}
function flushTokens(address tokenContractAddress) onlyParent {
ERC20Interface instance = ERC20Interface(tokenContractAddress);
var forwarderAddress = address(this);
var forwarderBalance = instance.balanceOf(forwarderAddress);
if (forwarderBalance == 0) {
return;
}
if (!instance.transfer(parentAddress, forwarderBalance)) {
revert();
}
}
function flush() {
parentAddress.transfer(this.balance);
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.