Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x3dB1b40007FE3910AE8096B5E3DdE1E4fA839f56
Balance 0 ETH
Nonce 1
Code Size 8920 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

8920 bytes
0x6080604052600436106102295760003560e01c80638a8c523c11610123578063c16dd4a4116100ab578063e16830a81161006f578063e16830a814610719578063ef8700e514610739578063f2fde38b1461074f578063f5b3c3bf1461076f578063f887ea401461079f57600080fd5b8063c16dd4a414610605578063c18bc19514610625578063d212a69a14610645578063d3f6a157146106b3578063dd62ed3e146106d357600080fd5b8063992c58e4116100f2578063992c58e414610565578063a457c2d714610585578063a9059cbb146105a5578063b8863115146105c5578063c0246668146105e557600080fd5b80638a8c523c146104ed5780638da5cb5b1461050257806395d89b411461052057806396880b171461053557600080fd5b8063313ce567116101b15780636ddd1713116101755780636ddd17131461044e57806370a082311461046d578063715018a6146104a3578063751039fc146104b85780637571336a146104cd57600080fd5b8063313ce5671461036d578063395093511461038957806349bd5a5e146103a95780634fbee193146103f5578063555467a11461042e57600080fd5b806318160ddd116101f857806318160ddd146102e25780631a8145bb146103015780631c6e8a75146103175780631f3fed8f1461033757806323b872dd1461034d57600080fd5b806306fdde0314610235578063095ea7b31461026057806310d5de531461029057806311a582c3146102c057600080fd5b3661023057005b600080fd5b34801561024157600080fd5b5061024a6107d3565b6040516102579190611e59565b60405180910390f35b34801561026c57600080fd5b5061028061027b366004611ec6565b610865565b6040519015158152602001610257565b34801561029c57600080fd5b506102806102ab366004611ef2565b601a6020526000908152604090205460ff1681565b3480156102cc57600080fd5b506102e06102db366004611f0f565b61087c565b005b3480156102ee57600080fd5b506002545b604051908152602001610257565b34801561030d57600080fd5b506102f360165481565b34801561032357600080fd5b506102e0610332366004611f41565b6108fb565b34801561034357600080fd5b506102f360155481565b34801561035957600080fd5b50610280610368366004611f5c565b61093f565b34801561037957600080fd5b5060405160128152602001610257565b34801561039557600080fd5b506102806103a4366004611ec6565b6109a8565b3480156103b557600080fd5b506103dd7f00000000000000000000000031c649c37abbcb6a6563107370ef3f04123f383181565b6040516001600160a01b039091168152602001610257565b34801561040157600080fd5b50610280610410366004611ef2565b6001600160a01b031660009081526019602052604090205460ff1690565b34801561043a57600080fd5b50610280610449366004611f9d565b6109de565b34801561045a57600080fd5b50600c5461028090610100900460ff1681565b34801561047957600080fd5b506102f3610488366004611ef2565b6001600160a01b031660009081526020819052604090205490565b3480156104af57600080fd5b506102e0610a19565b3480156104c457600080fd5b506102e0610a8d565b3480156104d957600080fd5b506102e06104e8366004611fb6565b610ad0565b3480156104f957600080fd5b506102e0610b25565b34801561050e57600080fd5b506005546001600160a01b03166103dd565b34801561052c57600080fd5b5061024a610b6e565b34801561054157600080fd5b50610280610550366004611ef2565b601b6020526000908152604090205460ff1681565b34801561057157600080fd5b506102e0610580366004611feb565b610b7d565b34801561059157600080fd5b506102806105a0366004611ec6565b610ca3565b3480156105b157600080fd5b506102806105c0366004611ec6565b610cf2565b3480156105d157600080fd5b50600c546102809062010000900460ff1681565b3480156105f157600080fd5b506102e0610600366004611fb6565b610cff565b34801561061157600080fd5b506102e0610620366004611fb6565b610d54565b34801561063157600080fd5b506102e0610640366004611f9d565b610e3e565b34801561065157600080fd5b50600d54600e54600f54601054601154601254601354601454610678979695949392919088565b604080519889526020890197909752958701949094526060860192909252608085015260a084015260c083015260e082015261010001610257565b3480156106bf57600080fd5b506102e06106ce36600461202e565b610e8f565b3480156106df57600080fd5b506102f36106ee36600461202e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561072557600080fd5b506102e0610734366004611fb6565b610ee7565b34801561074557600080fd5b506102f360175481565b34801561075b57600080fd5b506102e061076a366004611ef2565b610f3c565b34801561077b57600080fd5b5061028061078a366004611ef2565b601c6020526000908152604090205460ff1681565b3480156107ab57600080fd5b506103dd7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6060600380546107e290612067565b80601f016020809104026020016040519081016040528092919081815260200182805461080e90612067565b801561085b5780601f106108305761010080835404028352916020019161085b565b820191906000526020600020905b81548152906001019060200180831161083e57829003601f168201915b5050505050905090565b600061087233848461108d565b5060015b92915050565b6005546001600160a01b031633146108af5760405162461bcd60e51b81526004016108a6906120a2565b60405180910390fd5b6103e8826108bc60025490565b6108c691906120ed565b6108d0919061210c565b6008556103e8816108e060025490565b6108ea91906120ed565b6108f4919061210c565b6009555050565b6005546001600160a01b031633146109255760405162461bcd60e51b81526004016108a6906120a2565b600c80549115156101000261ff0019909216919091179055565b600061094c8484846110ef565b61099e84336109998560405180606001604052806028815260200161227b602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190611748565b61108d565b5060019392505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916108729185906109999086611027565b6005546000906001600160a01b03163314610a0b5760405162461bcd60e51b81526004016108a6906120a2565b50600b81905560015b919050565b6005546001600160a01b03163314610a435760405162461bcd60e51b81526004016108a6906120a2565b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b6005546001600160a01b03163314610ab75760405162461bcd60e51b81526004016108a6906120a2565b610ac36103e88061087c565b610ace6103e8610e3e565b565b6005546001600160a01b03163314610afa5760405162461bcd60e51b81526004016108a6906120a2565b6001600160a01b03919091166000908152601a60205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610b4f5760405162461bcd60e51b81526004016108a6906120a2565b600c805461ffff1916610101179055610b6943600061212e565b601855565b6060600480546107e290612067565b6005546001600160a01b03163314610ba75760405162461bcd60e51b81526004016108a6906120a2565b600e8690556010859055600f84905583610bc1868861212e565b610bcb919061212e565b600d5560128390556014829055601381905580610be8838561212e565b610bf2919061212e565b601155600d5460461015610c485760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420373025206f72206c65737300000060448201526064016108a6565b60115460461015610c9b5760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420373025206f72206c65737300000060448201526064016108a6565b505050505050565b6000610872338461099985604051806060016040528060258152602001612230602591393360009081526001602090815260408083206001600160a01b038d1684529091529020549190611748565b60006108723384846110ef565b6005546001600160a01b03163314610d295760405162461bcd60e51b81526004016108a6906120a2565b6001600160a01b03919091166000908152601960205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610d7e5760405162461bcd60e51b81526004016108a6906120a2565b7f00000000000000000000000031c649c37abbcb6a6563107370ef3f04123f38316001600160a01b0316826001600160a01b03161415610e135760405162461bcd60e51b815260206004820152602a60248201527f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d2060448201526936b0b935b2ba2830b4b960b11b60648201526084016108a6565b6001600160a01b03919091166000908152601c60205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610e685760405162461bcd60e51b81526004016108a6906120a2565b6103e881610e7560025490565b610e7f91906120ed565b610e89919061210c565b600a5550565b6005546001600160a01b03163314610eb95760405162461bcd60e51b81526004016108a6906120a2565b600780546001600160a01b039384166001600160a01b03199182161790915560068054929093169116179055565b6005546001600160a01b03163314610f115760405162461bcd60e51b81526004016108a6906120a2565b6001600160a01b03919091166000908152601b60205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610f665760405162461bcd60e51b81526004016108a6906120a2565b6001600160a01b038116610fcb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108a6565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b600080611034838561212e565b9050838110156110865760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016108a6565b9392505050565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b806111055761110083836000611782565b505050565b6005546001600160a01b0384811691161480159061113157506005546001600160a01b03838116911614155b80156111465750600c5462010000900460ff16155b156113d557600c5460ff166111d9576001600160a01b03831660009081526019602052604090205460ff168061119457506001600160a01b03821660009081526019602052604090205460ff165b6111d95760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b60448201526064016108a6565b6001600160a01b0383166000908152601c602052604090205460ff16801561121a57506001600160a01b0382166000908152601a602052604090205460ff16155b156112945760085481111561128f5760405162461bcd60e51b815260206004820152603560248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201527436b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760591b60648201526084016108a6565b61134b565b6001600160a01b0382166000908152601c602052604090205460ff1680156112d557506001600160a01b0383166000908152601a602052604090205460ff16155b1561134b5760095481111561134b5760405162461bcd60e51b815260206004820152603660248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152751036b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760511b60648201526084016108a6565b6001600160a01b0382166000908152601b602052604090205460ff166113d557600a546001600160a01b038316600090815260208190526040902054611391908361212e565b11156113d55760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016108a6565b30600090815260208190526040902054600b54811080159081906114005750600c54610100900460ff165b80156114155750600c5462010000900460ff16155b801561143957506001600160a01b0384166000908152601c602052604090205460ff165b801561145e57506001600160a01b03851660009081526019602052604090205460ff16155b801561148357506001600160a01b03841660009081526019602052604090205460ff16155b156114ae57600c805462ff00001916620100001790556114a161183f565b600c805462ff0000191690555b600c546001600160a01b03861660009081526019602052604090205460ff620100009092048216159116806114fb57506001600160a01b03851660009081526019602052604090205460ff165b15611504575060005b801561173d57600060185443101561158f5761152c6064611526876063611a72565b90611af1565b9050606361153b82605e6120ed565b611545919061210c565b60156000828254611556919061212e565b90915550606390506115698260056120ed565b611573919061210c565b60176000828254611584919061212e565b9091555061171e9050565b6001600160a01b0386166000908152601c602052604090205460ff1680156115b8575060115415155b15611646576011546115d290606490611526908890611a72565b601154601454919250906115e690836120ed565b6115f0919061210c565b60166000828254611601919061212e565b909155505060115460125461161690836120ed565b611620919061210c565b60156000828254611631919061212e565b909155505060115460135461156990836120ed565b6001600160a01b0387166000908152601c602052604090205460ff16801561166f5750600d5415155b1561171e57600d5461168990606490611526908890611a72565b600d546010549192509061169d90836120ed565b6116a7919061210c565b601660008282546116b8919061212e565b9091555050600d54600e546116cd90836120ed565b6116d7919061210c565b601560008282546116e8919061212e565b9091555050600d54600f546116fd90836120ed565b611707919061210c565b60176000828254611718919061212e565b90915550505b801561172f5761172f873083611782565b6117398186612146565b9450505b610c9b868686611782565b6000818484111561176c5760405162461bcd60e51b81526004016108a69190611e59565b5060006117798486612146565b95945050505050565b6117bf81604051806060016040528060268152602001612255602691396001600160a01b0386166000908152602081905260409020549190611748565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546117ee9082611027565b6001600160a01b038381166000818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91016110e2565b3060009081526020819052604081205490506000601754601554601654611866919061212e565b611870919061212e565b9050600082158061187f575081155b1561188957505050565b600b546118979060146120ed565b8311156118af57600b546118ac9060146120ed565b92505b6000600283601654866118c291906120ed565b6118cc919061210c565b6118d6919061210c565b905060006118e48583611b33565b9050476118f082611b75565b60006118fc4783611b33565b905060006119198761152660155485611a7290919063ffffffff16565b905060006119368861152660175486611a7290919063ffffffff16565b90506000611944828461212e565b61194e9085612146565b6000601681905560158190556017559050861580159061196e5750600081115b156119b75761197d8782611d3c565b60408051878152602081018390527f28fc98272ce761178794ad6768050fea1648e07f1e2ffe15afd3a290f8381486910160405180910390a15b6006546001600160a01b03166119cd8447612146565b604051600081818185875af1925050503d8060008114611a09576040519150601f19603f3d011682016040523d82523d6000602084013e611a0e565b606091505b50506007546040519199506001600160a01b0316904790600081818185875af1925050503d8060008114611a5e576040519150601f19603f3d011682016040523d82523d6000602084013e611a63565b606091505b50505050505050505050505050565b600082611a8157506000610876565b6000611a8d83856120ed565b905082611a9a858361210c565b146110865760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016108a6565b600061108683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e2b565b600061108683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611748565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110611baa57611baa61215d565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2357600080fd5b505afa158015611c37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c5b9190612173565b81600181518110611c6e57611c6e61215d565b60200260200101906001600160a01b031690816001600160a01b031681525050611cb9307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d8461108d565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac94790611d0e908590600090869030904290600401612190565b600060405180830381600087803b158015611d2857600080fd5b505af1158015610c9b573d6000803e3d6000fd5b611d67307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d8461108d565b60405163f305d71960e01b8152306004820181905260248201849052600060448301819052606483015260848201524260a48201527f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b03169063f305d71990839060c4016060604051808303818588803b158015611deb57600080fd5b505af1158015611dff573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611e249190612201565b5050505050565b60008183611e4c5760405162461bcd60e51b81526004016108a69190611e59565b506000611779848661210c565b600060208083528351808285015260005b81811015611e8657858101830151858201604001528201611e6a565b81811115611e98576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114611ec357600080fd5b50565b60008060408385031215611ed957600080fd5b8235611ee481611eae565b946020939093013593505050565b600060208284031215611f0457600080fd5b813561108681611eae565b60008060408385031215611f2257600080fd5b50508035926020909101359150565b80358015158114610a1457600080fd5b600060208284031215611f5357600080fd5b61108682611f31565b600080600060608486031215611f7157600080fd5b8335611f7c81611eae565b92506020840135611f8c81611eae565b929592945050506040919091013590565b600060208284031215611faf57600080fd5b5035919050565b60008060408385031215611fc957600080fd5b8235611fd481611eae565b9150611fe260208401611f31565b90509250929050565b60008060008060008060c0878903121561200457600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b6000806040838503121561204157600080fd5b823561204c81611eae565b9150602083013561205c81611eae565b809150509250929050565b600181811c9082168061207b57607f821691505b6020821081141561209c57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612107576121076120d7565b500290565b60008261212957634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612141576121416120d7565b500190565b600082821015612158576121586120d7565b500390565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561218557600080fd5b815161108681611eae565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156121e05784516001600160a01b0316835293830193918301916001016121bb565b50506001600160a01b03969096166060850152505050608001529392505050565b60008060006060848603121561221657600080fd5b835192506020840151915060408401519050925092509256fe45524332303a206465637265617365642063616e6e6f742062652062656c6f77207a65726f45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b001ab441424ad144a96639b131a7799b67d4afbc2156cf18a94881dd13401fc64736f6c63430008090033

Verified Source Code Partial Match

Compiler: v0.8.9+commit.e5eed63a EVM: london Optimization: Yes (200 runs)
ShibariumDogPark.sol 1007 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

/*
    █▀   █░█   █   █▄▄   ▄▀█   █▀█   █   █░█   █▀▄▀█
    ▄█   █▀█   █   █▄█   █▀█   █▀▄   █   █▄█   █░▀░█

    █▀▄   █▀█   █▀▀     █▀█   ▄▀█   █▀█   █▄▀
    █▄▀   █▄█   █▄█     █▀▀   █▀█   █▀▄   █░█

    ※ https://www.shibariumdogpark.com/
    ※ https://t.me/ShibariumDogPark
    ※ https://medium.com/@shibariumdogpark
    ※ https://twitter.com/Shibarium_PARK
*/

interface IUniswapV2Factory {
    function createPair(address tokenA, address tokenB) external returns(address pair);
}

interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns(uint256);

    /**
    * @dev Returns the amount of tokens owned by `account`.
    */
    function balanceOf(address account) external view returns(uint256);

    /**
    * @dev Moves `amount` tokens from the caller's account to `recipient`.
    *
    * Returns a boolean value indicating whether the operation succeeded.
    *
    * Emits a {Transfer} event.
    */
    function transfer(address recipient, uint256 amount) 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 `amount` 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 amount) external returns(bool);

    /**
    * @dev Moves `amount` tokens from `sender` to `recipient` using the
    * allowance mechanism. `amount` is then deducted from the caller's
    * allowance.
    *
    * Returns a boolean value indicating whether the operation succeeded.
    *
    * Emits a {Transfer} event.
    */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns(bool);

        /**
        * @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);
}

interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns(string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns(string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns(uint8);
}

abstract contract Context {
    function _msgSender() internal view virtual returns(address) {
        return msg.sender;
    }

}

contract ERC20 is Context, IERC20, IERC20Metadata {
    using SafeMath for uint256;

        mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;
 
    uint256 private _totalSupply;
 
    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns(string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns(string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns(uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns(uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns(uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns(bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns(uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns(bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns(bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns(bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns(bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased cannot be below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        
        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    
    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    
}
 
library SafeMath {
   
    function add(uint256 a, uint256 b) internal pure returns(uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

   
    function sub(uint256 a, uint256 b) internal pure returns(uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

   
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns(uint256) {
    
        if (a == 0) {
            return 0;
        }
 
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

 
    function div(uint256 a, uint256 b) internal pure returns(uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

  
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    
}
 
contract Ownable is Context {
    address private _owner;
 
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns(address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}
 
library SafeMathInt {
    int256 private constant MIN_INT256 = int256(1) << 255;
    int256 private constant MAX_INT256 = ~(int256(1) << 255);

    /**
     * @dev Multiplies two int256 variables and fails on overflow.
     */
    function mul(int256 a, int256 b) internal pure returns(int256) {
        int256 c = a * b;

        // Detect overflow when multiplying MIN_INT256 with -1
        require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
        require((b == 0) || (c / b == a));
        return c;
    }

    /**
     * @dev Division of two int256 variables and fails on overflow.
     */
    function div(int256 a, int256 b) internal pure returns(int256) {
        // Prevent overflow when dividing MIN_INT256 by -1
        require(b != -1 || a != MIN_INT256);

        // Solidity already throws when dividing by 0.
        return a / b;
    }

    /**
     * @dev Subtracts two int256 variables and fails on overflow.
     */
    function sub(int256 a, int256 b) internal pure returns(int256) {
        int256 c = a - b;
        require((b >= 0 && c <= a) || (b < 0 && c > a));
        return c;
    }

    /**
     * @dev Adds two int256 variables and fails on overflow.
     */
    function add(int256 a, int256 b) internal pure returns(int256) {
        int256 c = a + b;
        require((b >= 0 && c >= a) || (b < 0 && c < a));
        return c;
    }

    /**
     * @dev Converts to absolute value, and fails on overflow.
     */
    function abs(int256 a) internal pure returns(int256) {
        require(a != MIN_INT256);
        return a < 0 ? -a : a;
    }


    function toUint256Safe(int256 a) internal pure returns(uint256) {
        require(a >= 0);
        return uint256(a);
    }
}
 
library SafeMathUint {
    function toInt256Safe(uint256 a) internal pure returns(int256) {
    int256 b = int256(a);
        require(b >= 0);
        return b;
    }
}

interface IUniswapV2Router01 {
    function factory() external pure returns(address);
    function WETH() external pure returns(address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns(uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns(uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns(uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns(uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns(uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns(uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns(uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        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 swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
    external
    returns(uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    returns(uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
    external
    payable
    returns(uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns(uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns(uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns(uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns(uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns(uint[] memory amounts);
}

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns(uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns(uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}
 
contract ShibariumDogPark is ERC20, Ownable {
    using SafeMath for uint256;

    IUniswapV2Router02 public immutable router;
    address public immutable uniswapV2Pair;

    // addresses
    address private developmentWallet;
    address private marketingWallet;

    // limits 
    uint256 private maxBuyAmount;
    uint256 private maxSellAmount;   
    uint256 private maxWalletAmount;
 
    uint256 private thresholdSwapAmount;

    // status flags
    bool private isTrading = false;
    bool public swapEnabled = false;
    bool public isSwapping;

    struct Fees {
        uint256 buyTotalFees;
        uint256 buyMarketingFee;
        uint256 buyDevelopmentFee;
        uint256 buyLiquidityFee;

        uint256 sellTotalFees;
        uint256 sellMarketingFee;
        uint256 sellDevelopmentFee;
        uint256 sellLiquidityFee;
    }  

    Fees public _fees = Fees({
        buyTotalFees: 0,
        buyMarketingFee: 0,
        buyDevelopmentFee:0,
        buyLiquidityFee: 0,

        sellTotalFees: 0,
        sellMarketingFee: 0,
        sellDevelopmentFee:0,
        sellLiquidityFee: 0
    });

    uint256 public tokensForMarketing;
    uint256 public tokensForLiquidity;
    uint256 public tokensForDevelopment;
    uint256 private taxTill;

    // exclude from fees and max transaction amount
    mapping(address => bool) private _isExcludedFromFees;
    mapping(address => bool) public _isExcludedMaxTransactionAmount;
    mapping(address => bool) public _isExcludedMaxWalletAmount;

    // store addresses that a automatic market maker pairs. Any transfer *to* these addresses
    // could be subject to a maximum transfer amount
    mapping(address => bool) public marketPair;
 
  
    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived
    );

    constructor() ERC20("Shibarium Dog Park", "SDP") {
 
        router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);

        uniswapV2Pair = IUniswapV2Factory(router.factory()).createPair(address(this), router.WETH());

        _isExcludedMaxTransactionAmount[address(router)] = true;
        _isExcludedMaxTransactionAmount[address(uniswapV2Pair)] = true;        
        _isExcludedMaxTransactionAmount[owner()] = true;
        _isExcludedMaxTransactionAmount[address(this)] = true;
        _isExcludedMaxTransactionAmount[address(0xdead)] = true;

        _isExcludedFromFees[owner()] = true;
        _isExcludedFromFees[address(this)] = true;

        _isExcludedMaxWalletAmount[owner()] = true;
        _isExcludedMaxWalletAmount[address(0xdead)] = true;
        _isExcludedMaxWalletAmount[address(this)] = true;
        _isExcludedMaxWalletAmount[address(uniswapV2Pair)] = true;

        marketPair[address(uniswapV2Pair)] = true;

        approve(address(router), type(uint256).max);

        uint256 totalSupply = 1e9 * 1e18;
        maxBuyAmount = totalSupply * 1 / 100; // 1% maxBuyAmount
        maxSellAmount = totalSupply * 1 / 100; // 1% maxSellAmount
        maxWalletAmount = totalSupply * 1 / 100; // 1% maxWallet
        thresholdSwapAmount = totalSupply * 1 / 1000; 

        _fees.buyMarketingFee = 70;
        _fees.buyLiquidityFee = 0;
        _fees.buyDevelopmentFee = 0;
        _fees.buyTotalFees = _fees.buyMarketingFee + _fees.buyLiquidityFee + _fees.buyDevelopmentFee;

        _fees.sellMarketingFee = 70;
        _fees.sellLiquidityFee = 0;
        _fees.sellDevelopmentFee = 0;
        _fees.sellTotalFees = _fees.sellMarketingFee + _fees.sellLiquidityFee + _fees.sellDevelopmentFee;

        marketingWallet = address(0x9e4ffabbbd9A5E448Cbfc47DF612150092E059e7);
        developmentWallet = address(0x9e4ffabbbd9A5E448Cbfc47DF612150092E059e7);

        // exclude from paying fees or having max transaction amount

        /*
            _mint is an internal function in ERC20.sol that is only called here,
            and CANNOT be called ever again
        */
        _mint(msg.sender, totalSupply);
    }

    receive() external payable {

    }

    // once enabled, can never be turned off
    function enableTrading() external onlyOwner {
        isTrading = true;
        swapEnabled = true;
        taxTill = block.number + 0;
    }

    // change the minimum amount of tokens to sell from fees
    function updateThresholdSwapAmount(uint256 newAmount) external onlyOwner returns(bool){
        thresholdSwapAmount = newAmount;
        return true;
    }

    function updateMaxTxnAmount(uint256 newMaxBuy, uint256 newMaxSell) public onlyOwner {
        maxBuyAmount = (totalSupply() * newMaxBuy) / 1000;
        maxSellAmount = (totalSupply() * newMaxSell) / 1000;
    }

    function updateMaxWalletAmount(uint256 newPercentage) public onlyOwner {
        maxWalletAmount = (totalSupply() * newPercentage) / 1000;
    }

    // only use to disable contract sales if absolutely necessary (emergency use only)
    function toggleSwapEnabled(bool enabled) external onlyOwner(){
        swapEnabled = enabled;
    }

    function updateFees(uint256 _marketingFeeBuy, uint256 _liquidityFeeBuy,uint256 _developmentFeeBuy,uint256 _marketingFeeSell, uint256 _liquidityFeeSell,uint256 _developmentFeeSell) external onlyOwner{
        _fees.buyMarketingFee = _marketingFeeBuy;
        _fees.buyLiquidityFee = _liquidityFeeBuy;
        _fees.buyDevelopmentFee = _developmentFeeBuy;
        _fees.buyTotalFees = _fees.buyMarketingFee + _fees.buyLiquidityFee + _fees.buyDevelopmentFee;

        _fees.sellMarketingFee = _marketingFeeSell;
        _fees.sellLiquidityFee = _liquidityFeeSell;
        _fees.sellDevelopmentFee = _developmentFeeSell;
        _fees.sellTotalFees = _fees.sellMarketingFee + _fees.sellLiquidityFee + _fees.sellDevelopmentFee;
        require(_fees.buyTotalFees <= 70, "Must keep fees at 70% or less");   
        require(_fees.sellTotalFees <= 70, "Must keep fees at 70% or less");
    }
    
    function excludeFromFees(address account, bool excluded) public onlyOwner {
        _isExcludedFromFees[account] = excluded;
    }
    function excludeFromWalletLimit(address account, bool excluded) public onlyOwner {
        _isExcludedMaxWalletAmount[account] = excluded;
    }
    function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
        _isExcludedMaxTransactionAmount[updAds] = isEx;
    }

    function removeLimits() external onlyOwner {
        updateMaxTxnAmount(1000,1000);
        updateMaxWalletAmount(1000);
    }

    function setMarketPair(address pair, bool value) public onlyOwner {
        require(pair != uniswapV2Pair, "The pair cannot be removed from marketPair");
        marketPair[pair] = value;
    }

    function setWallets(address _marketingWallet,address _developmentWallet) external onlyOwner{
        marketingWallet = _marketingWallet;
        developmentWallet = _developmentWallet;
    }

    function isExcludedFromFees(address account) public view returns(bool) {
        return _isExcludedFromFees[account];
    }

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal override {
        
        if (amount == 0) {
            super._transfer(sender, recipient, 0);
            return;
        }

        if (
            sender != owner() &&
            recipient != owner() &&
            !isSwapping
        ) {

            if (!isTrading) {
                require(_isExcludedFromFees[sender] || _isExcludedFromFees[recipient], "Trading is not active.");
            }
            if (marketPair[sender] && !_isExcludedMaxTransactionAmount[recipient]) {
                require(amount <= maxBuyAmount, "Buy transfer amount exceeds the maxTransactionAmount.");
            } 
            else if (marketPair[recipient] && !_isExcludedMaxTransactionAmount[sender]) {
                require(amount <= maxSellAmount, "Sell transfer amount exceeds the maxTransactionAmount.");
            }

            if (!_isExcludedMaxWalletAmount[recipient]) {
                require(amount + balanceOf(recipient) <= maxWalletAmount, "Max wallet exceeded");
            }

        }
 
        uint256 contractTokenBalance = balanceOf(address(this));
 
        bool canSwap = contractTokenBalance >= thresholdSwapAmount;

        if (
            canSwap &&
            swapEnabled &&
            !isSwapping &&
            marketPair[recipient] &&
            !_isExcludedFromFees[sender] &&
            !_isExcludedFromFees[recipient]
        ) {
            isSwapping = true;
            swapBack();
            isSwapping = false;
        }
 
        bool takeFee = !isSwapping;

        // if any account belongs to _isExcludedFromFee account then remove the fee
        if (_isExcludedFromFees[sender] || _isExcludedFromFees[recipient]) {
            takeFee = false;
        }
 
        
        // only take fees on buys/sells, do not take on wallet transfers
        if (takeFee) {
            uint256 fees = 0;
            if(block.number < taxTill) {
                fees = amount.mul(99).div(100);
                tokensForMarketing += (fees * 94) / 99;
                tokensForDevelopment += (fees * 5) / 99;
            } else if (marketPair[recipient] && _fees.sellTotalFees > 0) {
                fees = amount.mul(_fees.sellTotalFees).div(100);
                tokensForLiquidity += fees * _fees.sellLiquidityFee / _fees.sellTotalFees;
                tokensForMarketing += fees * _fees.sellMarketingFee / _fees.sellTotalFees;
                tokensForDevelopment += fees * _fees.sellDevelopmentFee / _fees.sellTotalFees;
            }
            // on buy
            else if (marketPair[sender] && _fees.buyTotalFees > 0) {
                fees = amount.mul(_fees.buyTotalFees).div(100);
                tokensForLiquidity += fees * _fees.buyLiquidityFee / _fees.buyTotalFees;
                tokensForMarketing += fees * _fees.buyMarketingFee / _fees.buyTotalFees;
                tokensForDevelopment += fees * _fees.buyDevelopmentFee / _fees.buyTotalFees;
            }

            if (fees > 0) {
                super._transfer(sender, address(this), fees);
            }

            amount -= fees;

        }

        super._transfer(sender, recipient, amount);
    }

    function swapTokensForEth(uint256 tAmount) private {

        // generate the uniswap pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = router.WETH();

        _approve(address(this), address(router), tAmount);

        // make the swap
        router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );

    }

    function addLiquidity(uint256 tAmount, uint256 ethAmount) private {
        // approve token transfer to cover all possible scenarios
        _approve(address(this), address(router), tAmount);

        // add the liquidity
        router.addLiquidityETH{ value: ethAmount } (address(this), tAmount, 0, 0 , address(this), block.timestamp);
    }

    function swapBack() private {
        uint256 contractTokenBalance = balanceOf(address(this));
        uint256 toSwap = tokensForLiquidity + tokensForMarketing + tokensForDevelopment;
        bool success;

        if (contractTokenBalance == 0 || toSwap == 0) { return; }

        if (contractTokenBalance > thresholdSwapAmount * 20) {
            contractTokenBalance = thresholdSwapAmount * 20;
        }

        // Halve the amount of liquidity tokens
        uint256 liquidityTokens = contractTokenBalance * tokensForLiquidity / toSwap / 2;
        uint256 amountToSwapForETH = contractTokenBalance.sub(liquidityTokens);
 
        uint256 initialETHBalance = address(this).balance;

        swapTokensForEth(amountToSwapForETH); 
 
        uint256 newBalance = address(this).balance.sub(initialETHBalance);
 
        uint256 ethForMarketing = newBalance.mul(tokensForMarketing).div(toSwap);
        uint256 ethForDevelopment = newBalance.mul(tokensForDevelopment).div(toSwap);
        uint256 ethForLiquidity = newBalance - (ethForMarketing + ethForDevelopment);


        tokensForLiquidity = 0;
        tokensForMarketing = 0;
        tokensForDevelopment = 0;


        if (liquidityTokens > 0 && ethForLiquidity > 0) {
            addLiquidity(liquidityTokens, ethForLiquidity);
            emit SwapAndLiquify(amountToSwapForETH, ethForLiquidity);
        }

        (success,) = address(developmentWallet).call{ value: (address(this).balance - ethForMarketing) } ("");
        (success,) = address(marketingWallet).call{ value: address(this).balance } ("");
    }

}

Read Contract

_fees 0xd212a69a → uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
_isExcludedMaxWalletAmount 0x96880b17 → bool
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
isExcludedFromFees 0x4fbee193 → bool
isSwapping 0xb8863115 → bool
marketPair 0xf5b3c3bf → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
router 0xf887ea40 → address
swapEnabled 0x6ddd1713 → bool
symbol 0x95d89b41 → string
tokensForDevelopment 0xef8700e5 → uint256
tokensForLiquidity 0x1a8145bb → uint256
tokensForMarketing 0x1f3fed8f → uint256
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address

Write Contract 19 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
enableTrading 0x8a8c523c
No parameters
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
excludeFromWalletLimit 0xe16830a8
address account
bool excluded
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
removeLimits 0x751039fc
No parameters
renounceOwnership 0x715018a6
No parameters
setMarketPair 0xc16dd4a4
address pair
bool value
setWallets 0xd3f6a157
address _marketingWallet
address _developmentWallet
toggleSwapEnabled 0x1c6e8a75
bool enabled
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateFees 0x992c58e4
uint256 _marketingFeeBuy
uint256 _liquidityFeeBuy
uint256 _developmentFeeBuy
uint256 _marketingFeeSell
uint256 _liquidityFeeSell
uint256 _developmentFeeSell
updateMaxTxnAmount 0x11a582c3
uint256 newMaxBuy
uint256 newMaxSell
updateMaxWalletAmount 0xc18bc195
uint256 newPercentage
updateThresholdSwapAmount 0x555467a1
uint256 newAmount
returns: bool

Recent Transactions

No transactions found for this address