Verified contractPartial
Forwarder
Address0x3066f405facb13e27b4d41dfd4b74e7d2eed2299
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.4.24
- Same code
1,011 more contracts
Details
- Compiler
- solc 0.4.24+commit.e67f0147
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 7,527,154
- Creation transaction
- 0xa929a3b055…c0661ebd36
- Main copy (most transactions)
- 0xc899fe53…7d79777e
Forwarder.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
pragma solidity ^0.4.22;
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);
constructor() public {
parentAddress = msg.sender;
}
modifier onlyParent {
if (msg.sender != parentAddress) {
revert();
}
_;
}
function() payable {
parentAddress.transfer(msg.value);
emit 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": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.