Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0.0001 ETH
Eth Value
$0.34 (@ $3,390.44/ETH)More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
WithdrawContract
Compiler Version
v0.8.24+commit.e11b9ed9
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-02-23 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); } contract WithdrawContract { address public admin; constructor() payable { admin = msg.sender; } function withdrawEther() external payable { uint256 contractBalance = address(this).balance; require(contractBalance > 0, "Contract has no Ether balance"); payable(admin).transfer(contractBalance); } function withdrawTokens(address tokenAddress) external payable { require(tokenAddress != address(0), "Invalid token address"); IERC20 token = IERC20(tokenAddress); uint256 tokenBalance = token.balanceOf(address(this)); require(tokenBalance > 0, "Contract has no tokens"); bool success = token.transfer(admin, tokenBalance); require(success, "Token transfer failed"); } receive() external payable {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawEther","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052335f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106fe806100505f395ff3fe608060405260043610610037575f3560e01c806349df728c146100425780637362377b1461005e578063f851a440146100685761003e565b3661003e57005b5f80fd5b61005c600480360381019061005791906103d1565b610092565b005b6100666102a4565b005b348015610073575f80fd5b5061007c610350565b604051610089919061040b565b60405180910390f35b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610100576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f79061047e565b60405180910390fd5b5f8190505f8173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161013e919061040b565b602060405180830381865afa158015610159573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061017d91906104cf565b90505f81116101c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101b890610544565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b815260040161021c929190610571565b6020604051808303815f875af1158015610238573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061025c91906105cd565b90508061029e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029590610642565b60405180910390fd5b50505050565b5f4790505f81116102ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e1906106aa565b60405180910390fd5b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f1935050505015801561034c573d5f803e3d5ffd5b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6103a082610377565b9050919050565b6103b081610396565b81146103ba575f80fd5b50565b5f813590506103cb816103a7565b92915050565b5f602082840312156103e6576103e5610373565b5b5f6103f3848285016103bd565b91505092915050565b61040581610396565b82525050565b5f60208201905061041e5f8301846103fc565b92915050565b5f82825260208201905092915050565b7f496e76616c696420746f6b656e206164647265737300000000000000000000005f82015250565b5f610468601583610424565b915061047382610434565b602082019050919050565b5f6020820190508181035f8301526104958161045c565b9050919050565b5f819050919050565b6104ae8161049c565b81146104b8575f80fd5b50565b5f815190506104c9816104a5565b92915050565b5f602082840312156104e4576104e3610373565b5b5f6104f1848285016104bb565b91505092915050565b7f436f6e747261637420686173206e6f20746f6b656e73000000000000000000005f82015250565b5f61052e601683610424565b9150610539826104fa565b602082019050919050565b5f6020820190508181035f83015261055b81610522565b9050919050565b61056b8161049c565b82525050565b5f6040820190506105845f8301856103fc565b6105916020830184610562565b9392505050565b5f8115159050919050565b6105ac81610598565b81146105b6575f80fd5b50565b5f815190506105c7816105a3565b92915050565b5f602082840312156105e2576105e1610373565b5b5f6105ef848285016105b9565b91505092915050565b7f546f6b656e207472616e73666572206661696c656400000000000000000000005f82015250565b5f61062c601583610424565b9150610637826105f8565b602082019050919050565b5f6020820190508181035f83015261065981610620565b9050919050565b7f436f6e747261637420686173206e6f2045746865722062616c616e63650000005f82015250565b5f610694601d83610424565b915061069f82610660565b602082019050919050565b5f6020820190508181035f8301526106c181610688565b905091905056fea2646970667358221220183d63d17d9532d8537e224cfd21712998e76439d55c9b892f789d277554573964736f6c63430008180033
Deployed Bytecode
0x608060405260043610610037575f3560e01c806349df728c146100425780637362377b1461005e578063f851a440146100685761003e565b3661003e57005b5f80fd5b61005c600480360381019061005791906103d1565b610092565b005b6100666102a4565b005b348015610073575f80fd5b5061007c610350565b604051610089919061040b565b60405180910390f35b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610100576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f79061047e565b60405180910390fd5b5f8190505f8173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161013e919061040b565b602060405180830381865afa158015610159573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061017d91906104cf565b90505f81116101c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101b890610544565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b815260040161021c929190610571565b6020604051808303815f875af1158015610238573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061025c91906105cd565b90508061029e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029590610642565b60405180910390fd5b50505050565b5f4790505f81116102ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e1906106aa565b60405180910390fd5b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f1935050505015801561034c573d5f803e3d5ffd5b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6103a082610377565b9050919050565b6103b081610396565b81146103ba575f80fd5b50565b5f813590506103cb816103a7565b92915050565b5f602082840312156103e6576103e5610373565b5b5f6103f3848285016103bd565b91505092915050565b61040581610396565b82525050565b5f60208201905061041e5f8301846103fc565b92915050565b5f82825260208201905092915050565b7f496e76616c696420746f6b656e206164647265737300000000000000000000005f82015250565b5f610468601583610424565b915061047382610434565b602082019050919050565b5f6020820190508181035f8301526104958161045c565b9050919050565b5f819050919050565b6104ae8161049c565b81146104b8575f80fd5b50565b5f815190506104c9816104a5565b92915050565b5f602082840312156104e4576104e3610373565b5b5f6104f1848285016104bb565b91505092915050565b7f436f6e747261637420686173206e6f20746f6b656e73000000000000000000005f82015250565b5f61052e601683610424565b9150610539826104fa565b602082019050919050565b5f6020820190508181035f83015261055b81610522565b9050919050565b61056b8161049c565b82525050565b5f6040820190506105845f8301856103fc565b6105916020830184610562565b9392505050565b5f8115159050919050565b6105ac81610598565b81146105b6575f80fd5b50565b5f815190506105c7816105a3565b92915050565b5f602082840312156105e2576105e1610373565b5b5f6105ef848285016105b9565b91505092915050565b7f546f6b656e207472616e73666572206661696c656400000000000000000000005f82015250565b5f61062c601583610424565b9150610637826105f8565b602082019050919050565b5f6020820190508181035f83015261065981610620565b9050919050565b7f436f6e747261637420686173206e6f2045746865722062616c616e63650000005f82015250565b5f610694601d83610424565b915061069f82610660565b602082019050919050565b5f6020820190508181035f8301526106c181610688565b905091905056fea2646970667358221220183d63d17d9532d8537e224cfd21712998e76439d55c9b892f789d277554573964736f6c63430008180033
Deployed Bytecode Sourcemap
2526:773:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:392;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2642:210;;;:::i;:::-;;2558:20;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2857:392;2957:1;2933:26;;:12;:26;;;2925:60;;;;;;;;;;;;:::i;:::-;;;;;;;;;2992:12;3014;2992:35;;3032:20;3055:5;:15;;;3079:4;3055:30;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3032:53;;3113:1;3098:12;:16;3090:51;;;;;;;;;;;;:::i;:::-;;;;;;;;;3148:12;3163:5;:14;;;3178:5;;;;;;;;;;3185:12;3163:35;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3148:50;;3211:7;3203:41;;;;;;;;;;;;:::i;:::-;;;;;;;;;2920:329;;;2857:392;:::o;2642:210::-;2689:23;2715:21;2689:47;;2767:1;2749:15;:19;2741:61;;;;;;;;;;;;:::i;:::-;;;;;;;;;2815:5;;;;;;;;;;2807:23;;:40;2831:15;2807:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2684:168;2642:210::o;2558:20::-;;;;;;;;;;;;:::o;88:117:1:-;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:122::-;641:24;659:5;641:24;:::i;:::-;634:5;631:35;621:63;;680:1;677;670:12;621:63;568:122;:::o;696:139::-;742:5;780:6;767:20;758:29;;796:33;823:5;796:33;:::i;:::-;696:139;;;;:::o;841:329::-;900:6;949:2;937:9;928:7;924:23;920:32;917:119;;;955:79;;:::i;:::-;917:119;1075:1;1100:53;1145:7;1136:6;1125:9;1121:22;1100:53;:::i;:::-;1090:63;;1046:117;841:329;;;;:::o;1176:118::-;1263:24;1281:5;1263:24;:::i;:::-;1258:3;1251:37;1176:118;;:::o;1300:222::-;1393:4;1431:2;1420:9;1416:18;1408:26;;1444:71;1512:1;1501:9;1497:17;1488:6;1444:71;:::i;:::-;1300:222;;;;:::o;1528:169::-;1612:11;1646:6;1641:3;1634:19;1686:4;1681:3;1677:14;1662:29;;1528:169;;;;:::o;1703:171::-;1843:23;1839:1;1831:6;1827:14;1820:47;1703:171;:::o;1880:366::-;2022:3;2043:67;2107:2;2102:3;2043:67;:::i;:::-;2036:74;;2119:93;2208:3;2119:93;:::i;:::-;2237:2;2232:3;2228:12;2221:19;;1880:366;;;:::o;2252:419::-;2418:4;2456:2;2445:9;2441:18;2433:26;;2505:9;2499:4;2495:20;2491:1;2480:9;2476:17;2469:47;2533:131;2659:4;2533:131;:::i;:::-;2525:139;;2252:419;;;:::o;2677:77::-;2714:7;2743:5;2732:16;;2677:77;;;:::o;2760:122::-;2833:24;2851:5;2833:24;:::i;:::-;2826:5;2823:35;2813:63;;2872:1;2869;2862:12;2813:63;2760:122;:::o;2888:143::-;2945:5;2976:6;2970:13;2961:22;;2992:33;3019:5;2992:33;:::i;:::-;2888:143;;;;:::o;3037:351::-;3107:6;3156:2;3144:9;3135:7;3131:23;3127:32;3124:119;;;3162:79;;:::i;:::-;3124:119;3282:1;3307:64;3363:7;3354:6;3343:9;3339:22;3307:64;:::i;:::-;3297:74;;3253:128;3037:351;;;;:::o;3394:172::-;3534:24;3530:1;3522:6;3518:14;3511:48;3394:172;:::o;3572:366::-;3714:3;3735:67;3799:2;3794:3;3735:67;:::i;:::-;3728:74;;3811:93;3900:3;3811:93;:::i;:::-;3929:2;3924:3;3920:12;3913:19;;3572:366;;;:::o;3944:419::-;4110:4;4148:2;4137:9;4133:18;4125:26;;4197:9;4191:4;4187:20;4183:1;4172:9;4168:17;4161:47;4225:131;4351:4;4225:131;:::i;:::-;4217:139;;3944:419;;;:::o;4369:118::-;4456:24;4474:5;4456:24;:::i;:::-;4451:3;4444:37;4369:118;;:::o;4493:332::-;4614:4;4652:2;4641:9;4637:18;4629:26;;4665:71;4733:1;4722:9;4718:17;4709:6;4665:71;:::i;:::-;4746:72;4814:2;4803:9;4799:18;4790:6;4746:72;:::i;:::-;4493:332;;;;;:::o;4831:90::-;4865:7;4908:5;4901:13;4894:21;4883:32;;4831:90;;;:::o;4927:116::-;4997:21;5012:5;4997:21;:::i;:::-;4990:5;4987:32;4977:60;;5033:1;5030;5023:12;4977:60;4927:116;:::o;5049:137::-;5103:5;5134:6;5128:13;5119:22;;5150:30;5174:5;5150:30;:::i;:::-;5049:137;;;;:::o;5192:345::-;5259:6;5308:2;5296:9;5287:7;5283:23;5279:32;5276:119;;;5314:79;;:::i;:::-;5276:119;5434:1;5459:61;5512:7;5503:6;5492:9;5488:22;5459:61;:::i;:::-;5449:71;;5405:125;5192:345;;;;:::o;5543:171::-;5683:23;5679:1;5671:6;5667:14;5660:47;5543:171;:::o;5720:366::-;5862:3;5883:67;5947:2;5942:3;5883:67;:::i;:::-;5876:74;;5959:93;6048:3;5959:93;:::i;:::-;6077:2;6072:3;6068:12;6061:19;;5720:366;;;:::o;6092:419::-;6258:4;6296:2;6285:9;6281:18;6273:26;;6345:9;6339:4;6335:20;6331:1;6320:9;6316:17;6309:47;6373:131;6499:4;6373:131;:::i;:::-;6365:139;;6092:419;;;:::o;6517:179::-;6657:31;6653:1;6645:6;6641:14;6634:55;6517:179;:::o;6702:366::-;6844:3;6865:67;6929:2;6924:3;6865:67;:::i;:::-;6858:74;;6941:93;7030:3;6941:93;:::i;:::-;7059:2;7054:3;7050:12;7043:19;;6702:366;;;:::o;7074:419::-;7240:4;7278:2;7267:9;7263:18;7255:26;;7327:9;7321:4;7317:20;7313:1;7302:9;7298:17;7291:47;7355:131;7481:4;7355:131;:::i;:::-;7347:139;;7074:419;;;:::o
Swarm Source
ipfs://183d63d17d9532d8537e224cfd21712998e76439d55c9b892f789d2775545739
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $3,390.44 | 0.0001 | $0.339044 |
Loading...
Loading
[ Download: CSV Export ]
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.