Contract

0xC66F655e656E13E4e791e3557754CD83669419E4

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Custom ...10437982024-12-21 14:57:514 days ago1734793071IN
0xC66F655e...3669419E4
0 S0.000065511.1
Withdraw Custom ...10184442024-12-21 10:51:194 days ago1734778279IN
0xC66F655e...3669419E4
0 S0.000065441.1
Withdraw Custom ...10165152024-12-21 10:30:154 days ago1734777015IN
0xC66F655e...3669419E4
0 S0.000065421.1

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SonicLOCKV3

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at SonicScan.org on 2024-12-20
*/

//SPDX-License-Identifier: MIT
 pragma solidity ^0.8.28;

interface SonicIERC20 {
    
    function decimals() external view returns (uint);
    function totalSupply() external view returns (uint);
    function balanceOf(address account) external view returns (uint);
    function transfer(address recipient, uint amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint);
    function approve(address spender, uint amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint amount) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint value);
    event Approval(address indexed owner, address indexed spender, uint value);
}   
contract SonicLOCKV3 {

  string private _name; 
   event TokensLocked(address indexed sender, uint256 amount);
     address public owner;
      SonicIERC20 customtoken;
     bool public transfersAllowed;
    constructor() {
        _name = "Sonic LOCK V3";
        owner = msg.sender;
        transfersAllowed = true;
    }     
 
     modifier isOwner() {
        require(msg.sender == owner, "Only owner can do this!");
        _;
    }
     function name() public view virtual returns (string memory) {
        return _name;
    }
    function withdrawCustomToken(address _address) public isOwner {
        customtoken = SonicIERC20(_address);
        require(customtoken.balanceOf(address(this)) > 0, "There is nothing to withdraw!");
        
        bool sent = customtoken.transfer(owner, customtoken.balanceOf(address(this)));
        require(sent, "We failed to send tokens");
    }

    function lockTokens(address _address, uint256 amount) external payable {
        customtoken = SonicIERC20(_address); 
        require(amount > 0, "Amount must be greater than zero");
        require(customtoken.balanceOf(address(msg.sender)) > 0, "There is nothing to withdraw!");
        bool sent = customtoken.transferFrom(msg.sender, address(this), amount);
        require(sent, "We failed to send tokens");
        emit TokensLocked(msg.sender, amount);
    }


 }

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensLocked","type":"event"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"lockTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transfersAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"withdrawCustomToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561000f575f5ffd5b5060408051808201909152600d81526c536f6e6963204c4f434b20563360981b60208201525f906100409082610103565b50600180546001600160a01b031916331790556002805460ff60a01b1916600160a01b1790556101bd565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061009357607f821691505b6020821081036100b157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156100fe57805f5260205f20601f840160051c810160208510156100dc5750805b601f840160051c820191505b818110156100fb575f81556001016100e8565b50505b505050565b81516001600160401b0381111561011c5761011c61006b565b6101308161012a845461007f565b846100b7565b6020601f821160018114610162575f831561014b5750848201515b5f19600385901b1c1916600184901b1784556100fb565b5f84815260208120601f198516915b828110156101915787850151825560209485019460019092019101610171565b50848210156101ae57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b610754806101ca5f395ff3fe608060405260043610610049575f3560e01c806306fdde031461004d5780635ac3cb3d146100775780638da5cb5b14610098578063b0660c3d146100cf578063b1c25586146100ff575b5f5ffd5b348015610058575f5ffd5b50610061610112565b60405161006e9190610618565b60405180910390f35b348015610082575f5ffd5b50610096610091366004610668565b6101a1565b005b3480156100a3575f5ffd5b506001546100b7906001600160a01b031681565b6040516001600160a01b03909116815260200161006e565b3480156100da575f5ffd5b506002546100ef90600160a01b900460ff1681565b604051901515815260200161006e565b61009661010d366004610688565b6103fd565b60605f8054610120906106b0565b80601f016020809104026020016040519081016040528092919081815260200182805461014c906106b0565b80156101975780601f1061016e57610100808354040283529160200191610197565b820191905f5260205f20905b81548152906001019060200180831161017a57829003601f168201915b5050505050905090565b6001546001600160a01b031633146102005760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79206f776e65722063616e20646f20746869732100000000000000000060448201526064015b60405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040516370a0823160e01b81523060048201525f91906370a0823190602401602060405180830381865afa158015610258573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061027c91906106e8565b116102c95760405162461bcd60e51b815260206004820152601d60248201527f5468657265206973206e6f7468696e6720746f2077697468647261772100000060448201526064016101f7565b6002546001546040516370a0823160e01b81523060048201525f926001600160a01b039081169263a9059cbb9291169083906370a0823190602401602060405180830381865afa15801561031f573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034391906106e8565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af115801561038b573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103af91906106ff565b9050806103f95760405162461bcd60e51b81526020600482015260186024820152775765206661696c656420746f2073656e6420746f6b656e7360401b60448201526064016101f7565b5050565b600280546001600160a01b0319166001600160a01b038416179055806104655760405162461bcd60e51b815260206004820181905260248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f60448201526064016101f7565b6002546040516370a0823160e01b81523360048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa1580156104ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104cf91906106e8565b1161051c5760405162461bcd60e51b815260206004820152601d60248201527f5468657265206973206e6f7468696e6720746f2077697468647261772100000060448201526064016101f7565b6002546040516323b872dd60e01b8152336004820152306024820152604481018390525f916001600160a01b0316906323b872dd906064016020604051808303815f875af1158015610570573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059491906106ff565b9050806105de5760405162461bcd60e51b81526020600482015260186024820152775765206661696c656420746f2073656e6420746f6b656e7360401b60448201526064016101f7565b60405182815233907fac87f20a77d28ee8bbb58ec87ea8fa968b3393efae1a368fd50b767c2847391c9060200160405180910390a2505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b0381168114610663575f5ffd5b919050565b5f60208284031215610678575f5ffd5b6106818261064d565b9392505050565b5f5f60408385031215610699575f5ffd5b6106a28361064d565b946020939093013593505050565b600181811c908216806106c457607f821691505b6020821081036106e257634e487b7160e01b5f52602260045260245ffd5b50919050565b5f602082840312156106f8575f5ffd5b5051919050565b5f6020828403121561070f575f5ffd5b81518015158114610681575f5ffdfea2646970667358221220bb0e634515f0155c5c5d112d15109454d5d7a61e6ca1aadf76cf51d59f2a7a1464736f6c634300081c0033

Deployed Bytecode

0x608060405260043610610049575f3560e01c806306fdde031461004d5780635ac3cb3d146100775780638da5cb5b14610098578063b0660c3d146100cf578063b1c25586146100ff575b5f5ffd5b348015610058575f5ffd5b50610061610112565b60405161006e9190610618565b60405180910390f35b348015610082575f5ffd5b50610096610091366004610668565b6101a1565b005b3480156100a3575f5ffd5b506001546100b7906001600160a01b031681565b6040516001600160a01b03909116815260200161006e565b3480156100da575f5ffd5b506002546100ef90600160a01b900460ff1681565b604051901515815260200161006e565b61009661010d366004610688565b6103fd565b60605f8054610120906106b0565b80601f016020809104026020016040519081016040528092919081815260200182805461014c906106b0565b80156101975780601f1061016e57610100808354040283529160200191610197565b820191905f5260205f20905b81548152906001019060200180831161017a57829003601f168201915b5050505050905090565b6001546001600160a01b031633146102005760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79206f776e65722063616e20646f20746869732100000000000000000060448201526064015b60405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040516370a0823160e01b81523060048201525f91906370a0823190602401602060405180830381865afa158015610258573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061027c91906106e8565b116102c95760405162461bcd60e51b815260206004820152601d60248201527f5468657265206973206e6f7468696e6720746f2077697468647261772100000060448201526064016101f7565b6002546001546040516370a0823160e01b81523060048201525f926001600160a01b039081169263a9059cbb9291169083906370a0823190602401602060405180830381865afa15801561031f573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034391906106e8565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af115801561038b573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103af91906106ff565b9050806103f95760405162461bcd60e51b81526020600482015260186024820152775765206661696c656420746f2073656e6420746f6b656e7360401b60448201526064016101f7565b5050565b600280546001600160a01b0319166001600160a01b038416179055806104655760405162461bcd60e51b815260206004820181905260248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f60448201526064016101f7565b6002546040516370a0823160e01b81523360048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa1580156104ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104cf91906106e8565b1161051c5760405162461bcd60e51b815260206004820152601d60248201527f5468657265206973206e6f7468696e6720746f2077697468647261772100000060448201526064016101f7565b6002546040516323b872dd60e01b8152336004820152306024820152604481018390525f916001600160a01b0316906323b872dd906064016020604051808303815f875af1158015610570573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059491906106ff565b9050806105de5760405162461bcd60e51b81526020600482015260186024820152775765206661696c656420746f2073656e6420746f6b656e7360401b60448201526064016101f7565b60405182815233907fac87f20a77d28ee8bbb58ec87ea8fa968b3393efae1a368fd50b767c2847391c9060200160405180910390a2505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b0381168114610663575f5ffd5b919050565b5f60208284031215610678575f5ffd5b6106818261064d565b9392505050565b5f5f60408385031215610699575f5ffd5b6106a28361064d565b946020939093013593505050565b600181811c908216806106c457607f821691505b6020821081036106e257634e487b7160e01b5f52602260045260245ffd5b50919050565b5f602082840312156106f8575f5ffd5b5051919050565b5f6020828403121561070f575f5ffd5b81518015158114610681575f5ffdfea2646970667358221220bb0e634515f0155c5c5d112d15109454d5d7a61e6ca1aadf76cf51d59f2a7a1464736f6c634300081c0033

Deployed Bytecode Sourcemap

783:1407:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1245:91;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1342:359;;;;;;;;;;-1:-1:-1;1342:359:0;;;;;:::i;:::-;;:::i;:::-;;904:20;;;;;;;;;;-1:-1:-1;904:20:0;;;;-1:-1:-1;;;;;904:20:0;;;;;;-1:-1:-1;;;;;970:32:1;;;952:51;;940:2;925:18;904:20:0;806:203:1;964:28:0;;;;;;;;;;-1:-1:-1;964:28:0;;;;-1:-1:-1;;;964:28:0;;;;;;;;;1179:14:1;;1172:22;1154:41;;1142:2;1127:18;964:28:0;1014:187:1;1709:473:0;;;;;;:::i;:::-;;:::i;1245:91::-;1290:13;1323:5;1316:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1245:91;:::o;1342:359::-;1185:5;;-1:-1:-1;;;;;1185:5:0;1171:10;:19;1163:55;;;;-1:-1:-1;;;1163:55:0;;2052:2:1;1163:55:0;;;2034:21:1;2091:2;2071:18;;;2064:30;2130:25;2110:18;;;2103:53;2173:18;;1163:55:0;;;;;;;;;1415:11:::1;:35:::0;;-1:-1:-1;;;;;;1415:35:0::1;-1:-1:-1::0;;;;;1415:35:0;::::1;::::0;;::::1;::::0;;;1469:36:::1;::::0;-1:-1:-1;;;1469:36:0;;1499:4:::1;1469:36;::::0;::::1;952:51:1::0;-1:-1:-1;;1415:35:0;1469:21:::1;::::0;925:18:1;;1469:36:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40;1461:82;;;::::0;-1:-1:-1;;;1461:82:0;;2593:2:1;1461:82:0::1;::::0;::::1;2575:21:1::0;2632:2;2612:18;;;2605:30;2671:31;2651:18;;;2644:59;2720:18;;1461:82:0::1;2391:353:1::0;1461:82:0::1;1576:11;::::0;;1597:5;1604:36:::1;::::0;-1:-1:-1;;;1604:36:0;;1634:4:::1;1604:36;::::0;::::1;952:51:1::0;1564:9:0::1;::::0;-1:-1:-1;;;;;1576:11:0;;::::1;::::0;:20:::1;::::0;1597:5;::::1;::::0;1576:11;;1604:21:::1;::::0;925:18:1;;1604:36:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1576:65;::::0;-1:-1:-1;;;;;;1576:65:0::1;::::0;;;;;;-1:-1:-1;;;;;2941:32:1;;;1576:65:0::1;::::0;::::1;2923:51:1::0;2990:18;;;2983:34;2896:18;;1576:65:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1564:77;;1660:4;1652:41;;;::::0;-1:-1:-1;;;1652:41:0;;3512:2:1;1652:41:0::1;::::0;::::1;3494:21:1::0;3551:2;3531:18;;;3524:30;-1:-1:-1;;;3570:18:1;;;3563:54;3634:18;;1652:41:0::1;3310:348:1::0;1652:41:0::1;1404:297;1342:359:::0;:::o;1709:473::-;1791:11;:35;;-1:-1:-1;;;;;;1791:35:0;-1:-1:-1;;;;;1791:35:0;;;;;1846:10;1838:55;;;;-1:-1:-1;;;1838:55:0;;3865:2:1;1838:55:0;;;3847:21:1;;;3884:18;;;3877:30;3943:34;3923:18;;;3916:62;3995:18;;1838:55:0;3663:356:1;1838:55:0;1912:11;;:42;;-1:-1:-1;;;1912:42:0;;1942:10;1912:42;;;952:51:1;1957:1:0;;-1:-1:-1;;;;;1912:11:0;;:21;;925:18:1;;1912:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:46;1904:88;;;;-1:-1:-1;;;1904:88:0;;2593:2:1;1904:88:0;;;2575:21:1;2632:2;2612:18;;;2605:30;2671:31;2651:18;;;2644:59;2720:18;;1904:88:0;2391:353:1;1904:88:0;2015:11;;:59;;-1:-1:-1;;;2015:59:0;;2040:10;2015:59;;;4226:51:1;2060:4:0;4293:18:1;;;4286:60;4362:18;;;4355:34;;;2003:9:0;;-1:-1:-1;;;;;2015:11:0;;:24;;4199:18:1;;2015:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2003:71;;2093:4;2085:41;;;;-1:-1:-1;;;2085:41:0;;3512:2:1;2085:41:0;;;3494:21:1;3551:2;3531:18;;;3524:30;-1:-1:-1;;;3570:18:1;;;3563:54;3634:18;;2085:41:0;3310:348:1;2085:41:0;2142:32;;4546:25:1;;;2155:10:0;;2142:32;;4534:2:1;4519:18;2142:32:0;;;;;;;1780:402;1709:473;;:::o;14:418:1:-;163:2;152:9;145:21;126:4;195:6;189:13;238:6;233:2;222:9;218:18;211:34;297:6;292:2;284:6;280:15;275:2;264:9;260:18;254:50;353:1;348:2;339:6;328:9;324:22;320:31;313:42;423:2;416;412:7;407:2;399:6;395:15;391:29;380:9;376:45;372:54;364:62;;;14:418;;;;:::o;437:173::-;505:20;;-1:-1:-1;;;;;554:31:1;;544:42;;534:70;;600:1;597;590:12;534:70;437:173;;;:::o;615:186::-;674:6;727:2;715:9;706:7;702:23;698:32;695:52;;;743:1;740;733:12;695:52;766:29;785:9;766:29;:::i;:::-;756:39;615:186;-1:-1:-1;;;615:186:1:o;1206:254::-;1274:6;1282;1335:2;1323:9;1314:7;1310:23;1306:32;1303:52;;;1351:1;1348;1341:12;1303:52;1374:29;1393:9;1374:29;:::i;:::-;1364:39;1450:2;1435:18;;;;1422:32;;-1:-1:-1;;;1206:254:1:o;1465:380::-;1544:1;1540:12;;;;1587;;;1608:61;;1662:4;1654:6;1650:17;1640:27;;1608:61;1715:2;1707:6;1704:14;1684:18;1681:38;1678:161;;1761:10;1756:3;1752:20;1749:1;1742:31;1796:4;1793:1;1786:15;1824:4;1821:1;1814:15;1678:161;;1465:380;;;:::o;2202:184::-;2272:6;2325:2;2313:9;2304:7;2300:23;2296:32;2293:52;;;2341:1;2338;2331:12;2293:52;-1:-1:-1;2364:16:1;;2202:184;-1:-1:-1;2202:184:1:o;3028:277::-;3095:6;3148:2;3136:9;3127:7;3123:23;3119:32;3116:52;;;3164:1;3161;3154:12;3116:52;3196:9;3190:16;3249:5;3242:13;3235:21;3228:5;3225:32;3215:60;;3271:1;3268;3261:12

Swarm Source

ipfs://bb0e634515f0155c5c5d112d15109454d5d7a61e6ca1aadf76cf51d59f2a7a14

Block Transaction 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
[ 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.