Verified contractPartial
Tank
Address0x299c3b9c0a2af3ff807f65a9a331b0e29a0a88cd
- Balance
2.623884 ETH
- Transactions
637
- Compiler
solc 0.4.24
- Same code
Only this contract
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
- 6,099,165
- Creation transaction
- 0x234f24261a…caeba2a2a8
Tank.sol
pragma solidity ^0.4.24;
contract owned {
constructor() public { owner = msg.sender; }
address owner;
modifier onlyOwner {
require(msg.sender == owner);
_;
}
}
contract ERC20 {
function balanceOf(address tokenOwner) public constant returns (uint256 balance);
function transfer(address to, uint256 tokens) public returns (bool success);
}
contract Tank is owned {
function () payable public {}
function withdrawEther(address toAddress, uint256 amount) public onlyOwner {
toAddress.transfer(amount);
}
function withdrawToken(address token, address toAddress, uint256 amount) public onlyOwner {
ERC20(token).transfer(toAddress, amount);
}
function withdrawInBatch(address[] tokenList, address[] toAddressList, uint256[] amountList) public onlyOwner {
require(tokenList.length == toAddressList.length);
require(toAddressList.length == amountList.length);
for (uint i = 0; i < toAddressList.length; i++) {
if (tokenList[i] == 0) {
toAddressList[i].transfer(amountList[i]);
} else {
ERC20(tokenList[i]).transfer(toAddressList[i], amountList[i]);
}
}
}
function withdrawEtherInBatch(address[] toAddressList, uint256[] amountList) public onlyOwner {
require(toAddressList.length == amountList.length);
for (uint i = 0; i < toAddressList.length; i++) {
toAddressList[i].transfer(amountList[i]);
}
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.