ETH Price: $3,336.72 (-3.70%)
Gas: 2 Gwei

Contract

0x1e98D63372Da482ea2621E2dA295907A8781D6b6
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw200236002024-06-05 5:41:1149 days ago1717566071IN
0x1e98D633...A8781D6b6
0 ETH0.000250848.1875214
Deposit200235802024-06-05 5:37:1149 days ago1717565831IN
0x1e98D633...A8781D6b6
3.0610592 ETH0.000418079.57233667
Withdraw197090342024-04-22 6:04:4793 days ago1713765887IN
0x1e98D633...A8781D6b6
0 ETH0.00020316.62944951
Deposit197090332024-04-22 6:04:3593 days ago1713765875IN
0x1e98D633...A8781D6b6
50.9522206 ETH0.000284546.51512031
0x60806040197087792024-04-22 5:13:3593 days ago1713762815IN
 Contract Creation
0 ETH0.002826416

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
200236002024-06-05 5:41:1149 days ago1717566071
0x1e98D633...A8781D6b6
3.0610592 ETH
197090342024-04-22 6:04:4793 days ago1713765887
0x1e98D633...A8781D6b6
50.9522206 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x56D6C740...A81950Dac
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
SWAP

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2024-02-23
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
 
contract SWAP {
    address public owner;
    mapping(address => uint256) public balances;

    constructor() { 
        owner = msg.sender;
    }  

    modifier onlyOwner() {
        require(msg.sender == owner, "Only owner can call this function");
        _;
    }

    function getContractBalance() public view returns (uint256) {
        return address(this).balance;
    }
 
    function deposit() public payable {
        require(msg.value > 0, "Please send some ether");
        balances[msg.sender] += msg.value;
    }

    function withdraw() public payable onlyOwner {
        uint256 contractBalance = address(this).balance;
        require(contractBalance > 0, "Contract has no balance");
        (bool success, ) = payable(owner).call{value: contractBalance}(""); 
        require(success, "Transfer failed");
    }  
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getContractBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]

Deployed Bytecode

0x60806040526004361061004a5760003560e01c806327e235e31461004f5780633ccfd60b1461008c5780636f9fb98a146100965780638da5cb5b146100c1578063d0e30db0146100ec575b600080fd5b34801561005b57600080fd5b50610076600480360381019061007191906103df565b6100f6565b6040516100839190610425565b60405180910390f35b61009461010e565b005b3480156100a257600080fd5b506100ab6102b5565b6040516100b89190610425565b60405180910390f35b3480156100cd57600080fd5b506100d66102bd565b6040516100e3919061044f565b60405180910390f35b6100f46102e1565b005b60016020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461019c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610193906104ed565b60405180910390fd5b6000479050600081116101e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101db90610559565b60405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260405161022b906105aa565b60006040518083038185875af1925050503d8060008114610268576040519150601f19603f3d011682016040523d82523d6000602084013e61026d565b606091505b50509050806102b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a89061060b565b60405180910390fd5b5050565b600047905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003411610324576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031b90610677565b60405180910390fd5b34600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461037391906106c6565b92505081905550565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103ac82610381565b9050919050565b6103bc816103a1565b81146103c757600080fd5b50565b6000813590506103d9816103b3565b92915050565b6000602082840312156103f5576103f461037c565b5b6000610403848285016103ca565b91505092915050565b6000819050919050565b61041f8161040c565b82525050565b600060208201905061043a6000830184610416565b92915050565b610449816103a1565b82525050565b60006020820190506104646000830184610440565b92915050565b600082825260208201905092915050565b7f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f60008201527f6e00000000000000000000000000000000000000000000000000000000000000602082015250565b60006104d760218361046a565b91506104e28261047b565b604082019050919050565b60006020820190508181036000830152610506816104ca565b9050919050565b7f436f6e747261637420686173206e6f2062616c616e6365000000000000000000600082015250565b600061054360178361046a565b915061054e8261050d565b602082019050919050565b6000602082019050818103600083015261057281610536565b9050919050565b600081905092915050565b50565b6000610594600083610579565b915061059f82610584565b600082019050919050565b60006105b582610587565b9150819050919050565b7f5472616e73666572206661696c65640000000000000000000000000000000000600082015250565b60006105f5600f8361046a565b9150610600826105bf565b602082019050919050565b60006020820190508181036000830152610624816105e8565b9050919050565b7f506c656173652073656e6420736f6d6520657468657200000000000000000000600082015250565b600061066160168361046a565b915061066c8261062b565b602082019050919050565b6000602082019050818103600083015261069081610654565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006106d18261040c565b91506106dc8361040c565b92508282019050808211156106f4576106f3610697565b5b9291505056fea264697066735822122013587d4a997256861fca50258e185aebee970f551af67d994894ea20cd3a085564736f6c63430008110033

Deployed Bytecode Sourcemap

62:862:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;110:43;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;618:301;;;:::i;:::-;;349:107;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;83:20;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;465:145;;;:::i;:::-;;110:43;;;;;;;;;;;;;;;;;:::o;618:301::-;278:5;;;;;;;;;;264:19;;:10;:19;;;256:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;674:23:::1;700:21;674:47;;758:1;740:15;:19;732:55;;;;;;;;;;;;:::i;:::-;;;;;;;;;799:12;825:5:::0;::::1;;;;;;;;;;817:19;;844:15;817:47;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;798:66;;;884:7;876:35;;;;;;;;;;;;:::i;:::-;;;;;;;;;663:256;;618:301::o:0;349:107::-;400:7;427:21;420:28;;349:107;:::o;83:20::-;;;;;;;;;;;;:::o;465:145::-;530:1;518:9;:13;510:48;;;;;;;;;;;;:::i;:::-;;;;;;;;;593:9;569:8;:20;578:10;569:20;;;;;;;;;;;;;;;;:33;;;;;;;:::i;:::-;;;;;;;;465:145::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:77::-;1213:7;1242:5;1231:16;;1176:77;;;:::o;1259:118::-;1346:24;1364:5;1346:24;:::i;:::-;1341:3;1334:37;1259:118;;:::o;1383:222::-;1476:4;1514:2;1503:9;1499:18;1491:26;;1527:71;1595:1;1584:9;1580:17;1571:6;1527:71;:::i;:::-;1383:222;;;;:::o;1611:118::-;1698:24;1716:5;1698:24;:::i;:::-;1693:3;1686:37;1611:118;;:::o;1735:222::-;1828:4;1866:2;1855:9;1851:18;1843:26;;1879:71;1947:1;1936:9;1932:17;1923:6;1879:71;:::i;:::-;1735:222;;;;:::o;1963:169::-;2047:11;2081:6;2076:3;2069:19;2121:4;2116:3;2112:14;2097:29;;1963:169;;;;:::o;2138:220::-;2278:34;2274:1;2266:6;2262:14;2255:58;2347:3;2342:2;2334:6;2330:15;2323:28;2138:220;:::o;2364:366::-;2506:3;2527:67;2591:2;2586:3;2527:67;:::i;:::-;2520:74;;2603:93;2692:3;2603:93;:::i;:::-;2721:2;2716:3;2712:12;2705:19;;2364:366;;;:::o;2736:419::-;2902:4;2940:2;2929:9;2925:18;2917:26;;2989:9;2983:4;2979:20;2975:1;2964:9;2960:17;2953:47;3017:131;3143:4;3017:131;:::i;:::-;3009:139;;2736:419;;;:::o;3161:173::-;3301:25;3297:1;3289:6;3285:14;3278:49;3161:173;:::o;3340:366::-;3482:3;3503:67;3567:2;3562:3;3503:67;:::i;:::-;3496:74;;3579:93;3668:3;3579:93;:::i;:::-;3697:2;3692:3;3688:12;3681:19;;3340:366;;;:::o;3712:419::-;3878:4;3916:2;3905:9;3901:18;3893:26;;3965:9;3959:4;3955:20;3951:1;3940:9;3936:17;3929:47;3993:131;4119:4;3993:131;:::i;:::-;3985:139;;3712:419;;;:::o;4137:147::-;4238:11;4275:3;4260:18;;4137:147;;;;:::o;4290:114::-;;:::o;4410:398::-;4569:3;4590:83;4671:1;4666:3;4590:83;:::i;:::-;4583:90;;4682:93;4771:3;4682:93;:::i;:::-;4800:1;4795:3;4791:11;4784:18;;4410:398;;;:::o;4814:379::-;4998:3;5020:147;5163:3;5020:147;:::i;:::-;5013:154;;5184:3;5177:10;;4814:379;;;:::o;5199:165::-;5339:17;5335:1;5327:6;5323:14;5316:41;5199:165;:::o;5370:366::-;5512:3;5533:67;5597:2;5592:3;5533:67;:::i;:::-;5526:74;;5609:93;5698:3;5609:93;:::i;:::-;5727:2;5722:3;5718:12;5711:19;;5370:366;;;:::o;5742:419::-;5908:4;5946:2;5935:9;5931:18;5923:26;;5995:9;5989:4;5985:20;5981:1;5970:9;5966:17;5959:47;6023:131;6149:4;6023:131;:::i;:::-;6015:139;;5742:419;;;:::o;6167:172::-;6307:24;6303:1;6295:6;6291:14;6284:48;6167:172;:::o;6345:366::-;6487:3;6508:67;6572:2;6567:3;6508:67;:::i;:::-;6501:74;;6584:93;6673:3;6584:93;:::i;:::-;6702:2;6697:3;6693:12;6686:19;;6345:366;;;:::o;6717:419::-;6883:4;6921:2;6910:9;6906:18;6898:26;;6970:9;6964:4;6960:20;6956:1;6945:9;6941:17;6934:47;6998:131;7124:4;6998:131;:::i;:::-;6990:139;;6717:419;;;:::o;7142:180::-;7190:77;7187:1;7180:88;7287:4;7284:1;7277:15;7311:4;7308:1;7301:15;7328:191;7368:3;7387:20;7405:1;7387:20;:::i;:::-;7382:25;;7421:20;7439:1;7421:20;:::i;:::-;7416:25;;7464:1;7461;7457:9;7450:16;;7485:3;7482:1;7479:10;7476:36;;;7492:18;;:::i;:::-;7476:36;7328:191;;;;:::o

Swarm Source

ipfs://13587d4a997256861fca50258e185aebee970f551af67d994894ea20cd3a0855

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.