More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xb52221f5...c6c91CF89 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
TaxCollector
Compiler Version
v0.5.10+commit.5a6ea5b1
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-10-24 */ pragma solidity ^0.5.10; contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner()); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract IERC223ReceivingContract { /// @dev Standard ERC223 function that will handle incoming token transfers. /// @param _from Token sender address. /// @param _value Amount of tokens. /// @param _data Transaction metadata. function tokenFallback(address _from, uint _value, bytes memory _data) public; } contract IDetherToken { function mintingFinished() view public returns(bool); function name() view public returns(string memory); function approve(address _spender, uint256 _value) public returns(bool); function totalSupply() view public returns(uint256); function transferFrom(address _from, address _to, uint256 _value) public returns(bool); function decimals() view public returns(uint8); function mint(address _to, uint256 _amount) public returns(bool); function decreaseApproval(address _spender, uint256 _subtractedValue) public returns(bool); function balanceOf(address _owner) view public returns(uint256 balance); function finishMinting() public returns(bool); function owner() view public returns(address); function symbol() view public returns(string memory); function transfer(address _to, uint256 _value) public returns(bool); function transfer(address _to, uint256 _value, bytes memory _data) public returns(bool); function increaseApproval(address _spender, uint256 _addedValue) public returns(bool); function allowance(address _owner, address _spender) view public returns(uint256); function transferOwnership(address newOwner) public; } contract TaxCollector is IERC223ReceivingContract, Ownable { // Address where collected taxes are sent to address public taxRecipient; bool public unchangeable; IDetherToken public dth; // Daily tax rate (there are no floats in solidity) event ReceivedTaxes(address indexed tokenFrom, uint taxes, address indexed from); constructor (address _dth, address _taxRecipient) public { dth = IDetherToken(_dth); taxRecipient = _taxRecipient; } function unchangeableRecipient() onlyOwner external { unchangeable = true; } function changeRecipient(address _newRecipient) external onlyOwner { require(!unchangeable, 'Impossible to change the recipient'); taxRecipient = _newRecipient; } function collect() public { uint balance = dth.balanceOf(address(this)); dth.transfer(taxRecipient, balance); } function tokenFallback(address _from, uint _value, bytes memory _data) public { emit ReceivedTaxes(msg.sender, _value, _from); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":true,"inputs":[],"name":"dth","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unchangeableRecipient","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"unchangeable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"taxRecipient","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newRecipient","type":"address"}],"name":"changeRecipient","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"tokenFallback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"collect","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_dth","type":"address"},{"name":"_taxRecipient","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tokenFrom","type":"address"},{"indexed":false,"name":"taxes","type":"uint256"},{"indexed":true,"name":"from","type":"address"}],"name":"ReceivedTaxes","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80638da5cb5b116100715780638da5cb5b146101785780638f32d59b146101c257806392c2bcb4146101e4578063c0ee0b8a14610228578063e52253811461030d578063f2fde38b14610317576100a9565b806301e57a37146100ae5780630a438506146100f85780634caacd7514610102578063715018a614610124578063737ea06e1461012e575b600080fd5b6100b661035b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610100610381565b005b61010a6103ae565b604051808215151515815260200191505060405180910390f35b61012c6103c1565b005b610136610491565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101806104b7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101ca6104e0565b604051808215151515815260200191505060405180910390f35b610226600480360360208110156101fa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610537565b005b61030b6004803603606081101561023e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561028557600080fd5b82018360208201111561029757600080fd5b803590602001918460018302840111640100000000831117156102b957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506105f2565b005b61031561065c565b005b6103596004803603602081101561032d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610844565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6103896104e0565b61039257600080fd5b60018060146101000a81548160ff021916908315150217905550565b600160149054906101000a900460ff1681565b6103c96104e0565b6103d257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b61053f6104e0565b61054857600080fd5b600160149054906101000a900460ff16156105ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061095a6022913960400191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff0ebe2c179d608bf15836cc8ed5ca1d42c2bc2b05f40b3dcb68b2f2b455e48b9846040518082815260200191505060405180910390a3505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156106fd57600080fd5b505afa158015610711573d6000803e3d6000fd5b505050506040513d602081101561072757600080fd5b81019080805190602001909291905050509050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561080557600080fd5b505af1158015610819573d6000803e3d6000fd5b505050506040513d602081101561082f57600080fd5b81019080805190602001909291905050505050565b61084c6104e0565b61085557600080fd5b61085e81610861565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561089b57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fe496d706f737369626c6520746f206368616e67652074686520726563697069656e74a265627a7a7230582088a585b0220115db2ee9076c2772d1d197b5ed99a81826a4486e6ae52efe805664736f6c634300050a0032
Deployed Bytecode Sourcemap
3562:1146:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3562:1146:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3745:23;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;4068:109;;;:::i;:::-;;3714:24;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1202:140;;;:::i;:::-;;3680:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;489:79;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;824:92;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;4185:205;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4185:205:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;4552:153;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4552:153:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;4552:153:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4552:153:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4552:153:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;4552:153:0;;;;;;;;;;;;;;;:::i;:::-;;4398:146;;;:::i;:::-;;1519:109;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1519:109:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;3745:23;;;;;;;;;;;;;:::o;4068:109::-;701:9;:7;:9::i;:::-;693:18;;;;;;4165:4;4150:12;;:19;;;;;;;;;;;;;;;;;;4068:109::o;3714:24::-;;;;;;;;;;;;;:::o;1202:140::-;701:9;:7;:9::i;:::-;693:18;;;;;;1301:1;1264:40;;1285:6;;;;;;;;;;;1264:40;;;;;;;;;;;;1332:1;1315:6;;:19;;;;;;;;;;;;;;;;;;1202:140::o;3680:27::-;;;;;;;;;;;;;:::o;489:79::-;527:7;554:6;;;;;;;;;;;547:13;;489:79;:::o;824:92::-;864:4;902:6;;;;;;;;;;;888:20;;:10;:20;;;881:27;;824:92;:::o;4185:205::-;701:9;:7;:9::i;:::-;693:18;;;;;;4292:12;;;;;;;;;;;4291:13;4283:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4369:13;4354:12;;:28;;;;;;;;;;;;;;;;;;4185:205;:::o;4552:153::-;4691:5;4657:40;;4671:10;4657:40;;;4683:6;4657:40;;;;;;;;;;;;;;;;;;4552:153;;;:::o;4398:146::-;4447:12;4462:3;;;;;;;;;;;:13;;;4484:4;4462:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4462:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4462:28:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4462:28:0;;;;;;;;;;;;;;;;4447:43;;4501:3;;;;;;;;;;;:12;;;4514;;;;;;;;;;;4528:7;4501:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4501:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4501:35:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4501:35:0;;;;;;;;;;;;;;;;;4398:146;:::o;1519:109::-;701:9;:7;:9::i;:::-;693:18;;;;;;1592:28;1611:8;1592:18;:28::i;:::-;1519:109;:::o;1778:187::-;1872:1;1852:22;;:8;:22;;;;1844:31;;;;;;1920:8;1891:38;;1912:6;;;;;;;;;;;1891:38;;;;;;;;;;;;1949:8;1940:6;;:17;;;;;;;;;;;;;;;;;;1778:187;:::o
Swarm Source
bzzr://88a585b0220115db2ee9076c2772d1d197b5ed99a81826a4486e6ae52efe8056
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.