Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
DMEX_Fee_Contract
Compiler Version
v0.6.4+commit.1dca32f3
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-11-18 */ /** *Submitted for verification at Etherscan.io on 2020-07-21 */ pragma solidity ^0.6.0; interface DMEX { function availableBalanceOf(address token, address user) external view returns (uint256); function withdraw(address token, uint256 amount) external returns (bool success); } interface UniswapV2ExchangeInterface { function WETH() external pure returns (address); function swapExactTokensForTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } /* Interface for ERC20 Tokens */ interface DMEXTokenInterface { function burn(uint256 _value) external returns (bool success); } // The DMEX Fee Contract contract DMEX_Fee_Contract { address DMEX_CONTRACT = address(0x2101e480e22C953b37b9D0FE6551C1354Fe705E6); address DMEX_TOKEN = address(0x6263e260fF6597180c9538c69aF8284EDeaCEC80); address TOKEN_ETH = address(0x0000000000000000000000000000000000000000); address TOKEN_DAI = address(0x6B175474E89094C44Da98b954EedeAC495271d0F); address TOKEN_BTC = address(0x5228a22e72ccC52d415EcFd199F99D0665E7733b); address uniswapRouter = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address payable FEE_ACCOUNT; address owner; uint256 fee_account_share = 618e15; uint256 uniswap_share = 382e15; event Log(uint8 indexed errorId, uint value); function extractFees() public { uint256 fee_share; uint256 us_share; // extract eth uint256 eth_balance = DMEX(DMEX_CONTRACT).availableBalanceOf(TOKEN_ETH, address(this)); DMEX(DMEX_CONTRACT).withdraw(TOKEN_ETH, eth_balance); fee_share = eth_balance * fee_account_share / 1e18; us_share = eth_balance - fee_share; emit Log(1, eth_balance); emit Log(2, fee_share); emit Log(3, us_share); // require(FEE_ACCOUNT.send(fee_share), "Error: eth send failed"); // // swap eth for DMEX Token // address[] memory path = new address[](2); // path[0] = UniswapV2ExchangeInterface(uniswapRouter).WETH(); // path[1] = DMEX_TOKEN; // uint[] memory amounts = UniswapV2ExchangeInterface(uniswapRouter).swapExactETHForTokens.value(us_share)(1, path, address(this), 2**256 - 1); // uint token_bought = amounts[1]; // DMEXTokenInterface(DMEX_TOKEN).burn(token_bought); } constructor( address payable initialFeeAccount ) public { owner = msg.sender; FEE_ACCOUNT = initialFeeAccount; } /** Safe Math **/ // Safe Multiply Function - prevents integer overflow function safeMul(uint a, uint b) internal pure returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } // Safe Subtraction Function - prevents integer overflow function safeSub(uint a, uint b) internal pure returns (uint) { assert(b <= a); return a - b; } // Safe Addition Function - prevents integer overflow function safeAdd(uint a, uint b) internal pure returns (uint) { uint c = a + b; assert(c>=a && c>=b); return c; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address payable","name":"initialFeeAccount","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"errorId","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Log","type":"event"},{"inputs":[],"name":"extractFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052732101e480e22c953b37b9d0fe6551c1354fe705e66000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550736263e260ff6597180c9538c69af8284edeacec80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550736b175474e89094c44da98b954eedeac495271d0f600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550735228a22e72ccc52d415ecfd199f99d0665e7733b600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550737a250d5630b4cf539739df2c5dacb4c659f2488d600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555067089393b9c731000060085567054d22f9e033000060095534801561021257600080fd5b506040516106513803806106518339818101604052602081101561023557600080fd5b810190808051906020019092919050505033600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610379806102d86000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639d554eac14610030575b600080fd5b61003861003a565b005b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632a7575ee600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561013357600080fd5b505afa158015610147573d6000803e3d6000fd5b505050506040513d602081101561015d57600080fd5b810190808051906020019092919050505090506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3fef3a3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561023a57600080fd5b505af115801561024e573d6000803e3d6000fd5b505050506040513d602081101561026457600080fd5b810190808051906020019092919050505050670de0b6b3a764000060085482028161028b57fe5b049250828103915060017fde2ac27ecc5b6e9bce2ae63077452a19594fe9611c58e4fb72c2fdf3413228f3826040518082815260200191505060405180910390a260027fde2ac27ecc5b6e9bce2ae63077452a19594fe9611c58e4fb72c2fdf3413228f3846040518082815260200191505060405180910390a260037fde2ac27ecc5b6e9bce2ae63077452a19594fe9611c58e4fb72c2fdf3413228f3836040518082815260200191505060405180910390a250505056fea26469706673582212206efb80652cc39f69f00e9f74e95e04f5417051f5bc47818193f4b25c8550515764736f6c6343000604003300000000000000000000000095445852148540acb6fcb9e39856d15f1c416381
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80639d554eac14610030575b600080fd5b61003861003a565b005b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632a7575ee600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561013357600080fd5b505afa158015610147573d6000803e3d6000fd5b505050506040513d602081101561015d57600080fd5b810190808051906020019092919050505090506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3fef3a3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561023a57600080fd5b505af115801561024e573d6000803e3d6000fd5b505050506040513d602081101561026457600080fd5b810190808051906020019092919050505050670de0b6b3a764000060085482028161028b57fe5b049250828103915060017fde2ac27ecc5b6e9bce2ae63077452a19594fe9611c58e4fb72c2fdf3413228f3826040518082815260200191505060405180910390a260027fde2ac27ecc5b6e9bce2ae63077452a19594fe9611c58e4fb72c2fdf3413228f3846040518082815260200191505060405180910390a260037fde2ac27ecc5b6e9bce2ae63077452a19594fe9611c58e4fb72c2fdf3413228f3836040518082815260200191505060405180910390a250505056fea26469706673582212206efb80652cc39f69f00e9f74e95e04f5417051f5bc47818193f4b25c8550515764736f6c63430006040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000095445852148540acb6fcb9e39856d15f1c416381
-----Decoded View---------------
Arg [0] : initialFeeAccount (address): 0x95445852148540acB6FcB9e39856D15F1C416381
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000095445852148540acb6fcb9e39856d15f1c416381
Deployed Bytecode Sourcemap
1057:2574:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1057:2574:0;;;;;;;;;;;;;;;;12:1:-1;9;2:12;1773:1047:0;;;:::i;:::-;;;1814:17;1843:16;1896:19;1923:13;;;;;;;;;;;1918:38;;;1957:9;;;;;;;;;;;1976:4;1918:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1918:64:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1918:64:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;1918:64:0;;;;;;;;;;;;;;;;1896:86;;1998:13;;;;;;;;;;;1993:28;;;2022:9;;;;;;;;;;;2033:11;1993:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1993:52:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1993:52:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;1993:52:0;;;;;;;;;;;;;;;;;2104:4;2084:17;;2070:11;:31;:38;;;;;;2058:50;;2144:9;2130:11;:23;2119:34;;2183:1;2179:19;2186:11;2179:19;;;;;;;;;;;;;;;;;;2218:1;2214:17;2221:9;2214:17;;;;;;;;;;;;;;;;;;2251:1;2247:16;2254:8;2247:16;;;;;;;;;;;;;;;;;;1773:1047;;;:::o
Swarm Source
ipfs://6efb80652cc39f69f00e9f74e95e04f5417051f5bc47818193f4b25c85505157
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.