Verified contractPartial
Forwarder
Address0x2de48d70519b86a97a32e144caa95f0e5d49145c
- Balance
0 ETH
- Transactions
10
- Compiler
solc 0.4.24
- Same code
2,642 more contracts
Details
- Compiler
- solc 0.4.24+commit.e67f0147
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 8,468,994
- Creation transaction
- 0xc554e1f352…888425fc38
- Main copy (most transactions)
- 0x5ad70f9a…faf872e5
Forwarder.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
pragma solidity ^0.4.24;
contract ERC20Interface {
function transfer(address _to, uint256 _value) public returns (bool success);
function balanceOf(address _owner) public view returns (uint256 balance);
}
contract DepositNotifier {
function deposit(address from, address to, uint256 value) public;
}
contract Forwarder {
address parentAddress;
address collector;
address notifier;
constructor(address _collector) public {
parentAddress = msg.sender;
collector = _collector;
notifier = parentAddress;
}
modifier onlyParent {
require(msg.sender == parentAddress, "sender is not parent");
_;
}
function () public payable {
collector.transfer(msg.value);
DepositNotifier(notifier).deposit(msg.sender, address(this), msg.value);
}
function flushTokens(address tokenContractAddress) public onlyParent {
ERC20Interface instance = ERC20Interface(tokenContractAddress);
address forwarderAddress = address(this);
uint256 forwarderBalance = instance.balanceOf(forwarderAddress);
require(forwarderBalance != 0, "Token Balance is Zero");
require(instance.transfer(parentAddress, forwarderBalance), "transfer failed !!!");
}
function flush() public onlyParent {
parentAddress.transfer(address(this).balance);
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.