Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xA562912e1328eEA987E04c2650EfB5703757850C
Balance 0.027470 ETH
Nonce 1
Code Size 7401 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

7401 bytes
0x6080604052600436106101c65760003560e01c80636edc4388116100f7578063a9059cbb11610095578063ecfbe70c11610064578063ecfbe70c14610509578063f25f4b5614610529578063f2fde38b14610549578063ffb54a991461056957600080fd5b8063a9059cbb1461046d578063b62f6e041461048d578063ce40fc15146104a3578063dd62ed3e146104c357600080fd5b80638da5cb5b116100d15780638da5cb5b1461040e57806395d89b411461042c57806396e1c7d11461044157806398118cb41461045757600080fd5b80636edc4388146103a357806370a08231146103c3578063715018a6146103f957600080fd5b806323b872dd116101645780634cf1115d1161013e5780634cf1115d1461032d5780635e7f2dc11461034357806361231f7714610363578063690d83201461038357600080fd5b806323b872dd146102d1578063313ce567146102f157806349bd5a5e1461030d57600080fd5b806318160ddd116101a057806318160ddd1461026557806318886657146102845780631eed1ac81461029a5780632333f9f1146102b157600080fd5b806306fdde03146101d2578063095ea7b3146101fd5780631694505e1461022d57600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101e7610588565b6040516101f491906117da565b60405180910390f35b34801561020957600080fd5b5061021d61021836600461183d565b61061a565b60405190151581526020016101f4565b34801561023957600080fd5b5060065461024d906001600160a01b031681565b6040516001600160a01b0390911681526020016101f4565b34801561027157600080fd5b506002545b6040519081526020016101f4565b34801561029057600080fd5b5061027660095481565b3480156102a657600080fd5b506102af610634565b005b3480156102bd57600080fd5b506102af6102cc366004611877565b6106d5565b3480156102dd57600080fd5b5061021d6102ec3660046118b0565b61073c565b3480156102fd57600080fd5b50604051601281526020016101f4565b34801561031957600080fd5b5060075461024d906001600160a01b031681565b34801561033957600080fd5b50610276600d5481565b34801561034f57600080fd5b506102af61035e36600461193d565b610760565b34801561036f57600080fd5b506102af61037e3660046119a9565b610843565b34801561038f57600080fd5b506102af61039e3660046119cb565b610906565b3480156103af57600080fd5b506102af6103be3660046119ef565b610a35565b3480156103cf57600080fd5b506102766103de3660046119cb565b6001600160a01b031660009081526020819052604090205490565b34801561040557600080fd5b506102af610a78565b34801561041a57600080fd5b506005546001600160a01b031661024d565b34801561043857600080fd5b506101e7610a8c565b34801561044d57600080fd5b50610276600a5481565b34801561046357600080fd5b50610276600c5481565b34801561047957600080fd5b5061021d61048836600461183d565b610a9b565b34801561049957600080fd5b5061027660085481565b3480156104af57600080fd5b506102af6104be3660046119ef565b610aa9565b3480156104cf57600080fd5b506102766104de366004611a08565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561051557600080fd5b506102af610524366004611a08565b610b92565b34801561053557600080fd5b5060105461024d906001600160a01b031681565b34801561055557600080fd5b506102af6105643660046119cb565b610d06565b34801561057557600080fd5b50600b5461021d90610100900460ff1681565b60606003805461059790611a36565b80601f01602080910402602001604051908101604052809291908181526020018280546105c390611a36565b80156106105780601f106105e557610100808354040283529160200191610610565b820191906000526020600020905b8154815290600101906020018083116105f357829003601f168201915b5050505050905090565b600033610628818585610d44565b60019150505b92915050565b61063c610d56565b600b54610100900460ff16156106905760405162461bcd60e51b81526020600482015260146024820152732a3930b234b7339030b63932b0b23c9037b832b760611b60448201526064015b60405180910390fd5b600b805461ff001916610100179055604051600181527f44025b4c6266facf728a25ba1ed858c89e2215e03094486152577b87636ea7ab9060200160405180910390a1565b6106dd610d56565b6001600160a01b038216600081815260116020908152604091829020805460ff191685151590811790915591519182527fb662f3bfb1735e6cf86c62e0de5e8ded221db1f328a15d104be3fd29977cf23e910160405180910390a25050565b60003361074a858285610d83565b610755858585610e01565b506001949350505050565b610768610d56565b60005b838110156107ff5782828281811061078557610785611a70565b905060200201602081019061079a9190611a86565b601160008787858181106107b0576107b0611a70565b90506020020160208101906107c591906119cb565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806107f781611ab9565b91505061076b565b507fec332beaa25122e2aaf782a4144424379d8b725b55f4656dc18bf72b40508199848484846040516108359493929190611ad2565b60405180910390a150505050565b61084b610d56565b60006108578284611b62565b905060006064600a5461086a9190611b75565b9050808211156108bc5760405162461bcd60e51b815260206004820152601760248201527f596f752063616e206f6e6c79206c6f77657220666565730000000000000000006044820152606401610687565b600d849055600c8390556108d1826064611b97565b600a8190556040519081527f35ad15e7f5e4a16b548e8916bd02c51847dde8d106f334b4edaaacf140e43c9190602001610835565b61090e610d56565b600047116109535760405162461bcd60e51b81526020600482015260126024820152714e6f2045544820746f20776974686472617760701b6044820152606401610687565b60405147906000906001600160a01b0384169083908381818185875af1925050503d80600081146109a0576040519150601f19603f3d011682016040523d82523d6000602084013e6109a5565b606091505b50509050806109ed5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b6044820152606401610687565b826001600160a01b03167f94b2de810873337ed265c5f8cf98c9cffefa06b8607f9a2f1fbaebdfbcfbef1c83604051610a2891815260200190565b60405180910390a2505050565b610a3d610d56565b60098190556040518181527fee131fa00e37f4b10e0ad1bffe4a204cdc5e73b4c9bfab1e2de9ae163dde1edc9060200160405180910390a150565b610a80610d56565b610a8a600061113e565b565b60606004805461059790611a36565b600033610628818585610e01565b610ab1610d56565b6000610abc60025490565b90506000610acc61271083611b75565b905060006103e8610ade846005611b97565b610ae89190611b75565b9050818410158015610afa5750808411155b610b5d5760405162461bcd60e51b815260206004820152602e60248201527f536e4c205468726573686f6c64206d7573742062652077697468696e2074686560448201526d20616c6c6f7765642072616e676560901b6064820152608401610687565b60088490556040518481527fd9865007332e13f0dcab58b7d2a784fb5276e18f0c72e90c1a404e88a562898190602001610835565b610b9a610d56565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c059190611bae565b905060008111610c575760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f75676820746f6b656e7320696e20636f6e74726163740000006044820152606401610687565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af1158015610ca6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cca9190611bc7565b50816001600160a01b03167f7e2c99819371db0a6fc6f4269fe872496e44f502df19ba3eae594b7a1598746082604051610a2891815260200190565b610d0e610d56565b6001600160a01b038116610d3857604051631e4fbdf760e01b815260006004820152602401610687565b610d418161113e565b50565b610d518383836001611190565b505050565b6005546001600160a01b03163314610a8a5760405163118cdaa760e01b8152336004820152602401610687565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610dfb5781811015610dec57604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610687565b610dfb84848484036000611190565b50505050565b60008111610e605760405162461bcd60e51b815260206004820152602660248201527f5472616e7366657220616d6f756e74206d75737420626520677265617465722060448201526507468616e20360d41b6064820152608401610687565b6001600160a01b03831660009081526011602052604090205460ff161580610ea157506001600160a01b03821660009081526011602052604090205460ff16155b15610eee57600b54610100900460ff16610eee5760405162461bcd60e51b815260206004820152600e60248201526d151c98591a5b99c810db1bdcd95960921b6044820152606401610687565b6007546000906001600160a01b038581169116148015610f1c57506006546001600160a01b03848116911614155b8015610f4157506001600160a01b03831660009081526011602052604090205460ff16155b15610fc457612710600954610f5560025490565b610f5f9190611b97565b610f699190611b75565b821115610fc45760405162461bcd60e51b815260206004820152602360248201527f416d6f756e742065786365656473206d617820707572636861736520616d6f75604482015262373a1760e91b6064820152608401610687565b6001600160a01b03841660009081526011602052604090205460ff16158061100557506001600160a01b03831660009081526011602052604090205460ff16155b801561101a57506001600160a01b0384163014155b15611083576007546001600160a01b038581169116148061104857506007546001600160a01b038481169116145b801561105657506000600a54115b1561108357612710600a548361106c9190611b97565b6110769190611b75565b9050611083843083611265565b600b5460ff161580156110a357506007546001600160a01b038481169116145b80156110c857506001600160a01b03841660009081526011602052604090205460ff16155b1561112a5730600090815260208190526040902054600854811061112857600060056008546110f79190611b75565b6008546111049190611b62565b905080821061111b57611116816112c4565b611126565b6111266008546112c4565b505b505b610dfb84846111398486611be4565b611265565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0384166111ba5760405163e602df0560e01b815260006004820152602401610687565b6001600160a01b0383166111e457604051634a1406b160e11b815260006004820152602401610687565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015610dfb57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161125791815260200190565b60405180910390a350505050565b6001600160a01b03831661128f57604051634b637e8f60e11b815260006004820152602401610687565b6001600160a01b0382166112b95760405163ec442f0560e01b815260006004820152602401610687565b610d51838383611481565b600b5460ff16156113175760405162461bcd60e51b815260206004820152601d60248201527f43757272656e746c7920696e207377617020616e64206c6971756966790000006044820152606401610687565b600b805460ff19166001179055600a54479060009061133890606490611b75565b9050600081600d548561134b9190611b97565b6113559190611b75565b9050600082600c54866113689190611b97565b6113729190611b75565b90506000611381600283611b75565b9050600061138f8284611be4565b9050600061139d8386611b62565b90506113a8816115ab565b60006113b48847611be4565b90506000896113c38884611b97565b6113cd9190611b75565b905060006113db8284611be4565b90506113e78582611705565b6010546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015611421573d6000803e3d6000fd5b506040805185815260208101879052908101829052606081018390527fada09296b37f942dad4a0318731be5f9df8af6bf0364ffc08234b0a7d84218619060800160405180910390a15050600b805460ff19169055505050505050505050565b6001600160a01b0383166114ac5780600260008282546114a19190611b62565b9091555061151e9050565b6001600160a01b038316600090815260208190526040902054818110156114ff5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610687565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661153a57600280548290039055611559565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161159e91815260200190565b60405180910390a3505050565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106115e0576115e0611a70565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611639573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165d9190611bf7565b8160018151811061167057611670611a70565b6001600160a01b0392831660209182029290920101526006546116969130911684610d44565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac947906116cf908590600090869030904290600401611c14565b600060405180830381600087803b1580156116e957600080fd5b505af11580156116fd573d6000803e3d6000fd5b505050505050565b60065461171d9030906001600160a01b031684610d44565b6006546001600160a01b031663f305d7198230856000806117466005546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af11580156117ae573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906117d39190611c85565b5050505050565b600060208083528351808285015260005b81811015611807578581018301518582016040015282016117eb565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114610d4157600080fd5b6000806040838503121561185057600080fd5b823561185b81611828565b946020939093013593505050565b8015158114610d4157600080fd5b6000806040838503121561188a57600080fd5b823561189581611828565b915060208301356118a581611869565b809150509250929050565b6000806000606084860312156118c557600080fd5b83356118d081611828565b925060208401356118e081611828565b929592945050506040919091013590565b60008083601f84011261190357600080fd5b50813567ffffffffffffffff81111561191b57600080fd5b6020830191508360208260051b850101111561193657600080fd5b9250929050565b6000806000806040858703121561195357600080fd5b843567ffffffffffffffff8082111561196b57600080fd5b611977888389016118f1565b9096509450602087013591508082111561199057600080fd5b5061199d878288016118f1565b95989497509550505050565b600080604083850312156119bc57600080fd5b50508035926020909101359150565b6000602082840312156119dd57600080fd5b81356119e881611828565b9392505050565b600060208284031215611a0157600080fd5b5035919050565b60008060408385031215611a1b57600080fd5b8235611a2681611828565b915060208301356118a581611828565b600181811c90821680611a4a57607f821691505b602082108103611a6a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611a9857600080fd5b81356119e881611869565b634e487b7160e01b600052601160045260246000fd5b600060018201611acb57611acb611aa3565b5060010190565b6040808252810184905260008560608301825b87811015611b15578235611af881611828565b6001600160a01b0316825260209283019290910190600101611ae5565b5083810360208581019190915285825291508590820160005b86811015611b55578235611b4181611869565b151582529183019190830190600101611b2e565b5098975050505050505050565b8082018082111561062e5761062e611aa3565b600082611b9257634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761062e5761062e611aa3565b600060208284031215611bc057600080fd5b5051919050565b600060208284031215611bd957600080fd5b81516119e881611869565b8181038181111561062e5761062e611aa3565b600060208284031215611c0957600080fd5b81516119e881611828565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c645784516001600160a01b031683529383019391830191600101611c3f565b50506001600160a01b03969096166060850152505050608001529392505050565b600080600060608486031215611c9a57600080fd5b835192506020840151915060408401519050925092509256fea2646970667358221220133b7b7eea4143565a2f11f05bcceea1e6b5206c50e295e7a04cc2415d0310c064736f6c63430008140033

Verified Source Code Partial Match

Compiler: v0.8.20+commit.a1b79de6 EVM: istanbul Optimization: Yes (200 runs)
Drops.sol 281 lines
//SPDX-Liscence-Identifier: MIT

/*⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀.⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⠛⠛⠛⠛⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ 

Drops is the native token to the first locked liquidity marketplace.

https://drops.site
https://t.me/dropserc
https://x.com/dropserc

*/

pragma solidity 0.8.20;

import "./Ownable.sol";
import "./ERC20.sol";
import "./IERC20.sol";
import "./IUniswapV2Factory.sol";
import "./IUniswapV2Router02.sol";

contract Drops is ERC20, Ownable {

    IUniswapV2Router02 public uniswapV2Router;
    address public uniswapV2Pair;

    uint public swapAndLiqThreshold = 2e4 ether; //20,000 tokens -> 0.2% TS
    uint public purchaseLimit;
    uint public buySellTax;

    bool private inSwapAndLiquify;
    bool public tradingOpen;

    uint256 public liquidityFee;
    uint256 public ethFee;

    uint256 private tokensForLiquidity;
    uint256 private tokensForETH;

    address public feeWallet;

    // mappings
    mapping (address => bool) private _isExcludedFromLimit;

    event ExcludeFromLimitation(address indexed account, bool isExcluded);
    event BatchExcludeFromLimitation(address[] account, bool[] isExcluded);
    event SwapAndLiquified(uint256 tokensSwapped, uint256 tokensForLiquidity, uint256 ethForLiquidity, uint256 ethForMarketing);
    event TaxUpdated(uint taxPercent);
    event PurchaseLimitUpdated(uint limitPercent);
    event SwapAndLiqThresholdSet(uint256 amount);
    event ETHWithdrawn(address indexed to, uint256 amount);
    event ERC20Withdrawn(address indexed to, uint256 amount);
    event TradingStatusUpdated(bool status);

    modifier lockTheSwap {
        require(!inSwapAndLiquify, "Currently in swap and liquify");
        inSwapAndLiquify = true;
        _;
        inSwapAndLiquify = false;
    }

    constructor(
        address _router, 
        uint256 _buySellTax,
        uint256 __ethFeeInPercent,
        uint256 __liquidityFeeInPercent, 
        uint256 __purchaseLimit, 
        address _feeWallet) ERC20(
            "Drops", 
            "DROPS") Ownable(msg.sender) {
        _mint(_msgSender(), 1e7 ether);

        feeWallet = payable(_feeWallet);
        address uniswapRouter = _router; // Uniswap router address for BSC
        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(uniswapRouter);
        IUniswapV2Factory _uniswapFactory = IUniswapV2Factory(_uniswapV2Router.factory());

        ethFee = __ethFeeInPercent;
        liquidityFee = __liquidityFeeInPercent;

        address _uniswapV2Pair = _uniswapFactory.createPair(
            address(this), 
            _uniswapV2Router.WETH());

        uniswapV2Router = _uniswapV2Router;
        uniswapV2Pair = _uniswapV2Pair;
        buySellTax = _buySellTax;
        purchaseLimit = __purchaseLimit;

        excludeFromLimitation(uniswapV2Pair, true);
        excludeFromLimitation(address(uniswapRouter), true);
        excludeFromLimitation(_msgSender(), true);
        excludeFromLimitation(address(this), true);
    }

    receive() external payable {}

    function swapAndLiquify(uint256 toSwapLiquidity) private lockTheSwap {

        uint256 initialBalance = address(this).balance;
        uint256 totalFee = buySellTax / 100;
        uint256 forETH = toSwapLiquidity * ethFee / totalFee;
        uint256 forLiquidity = toSwapLiquidity * liquidityFee / totalFee;
        uint256 tokensToSellForLiq = forLiquidity / 2;
        uint256 tokensToAddLiq = forLiquidity - tokensToSellForLiq;
        uint256 toSwap = forETH+tokensToSellForLiq;
        swapTokensForETH(toSwap);
        uint256 updatedBalance = address(this).balance - initialBalance;
        uint256 ethForMarketing = updatedBalance * forETH / toSwapLiquidity;
        uint256 ethForLiquidity = updatedBalance - ethForMarketing;
        addLiquidity(tokensToAddLiq, ethForLiquidity);
        payable(feeWallet).transfer(ethForMarketing);
        emit SwapAndLiquified(toSwap, tokensToAddLiq, ethForLiquidity, ethForMarketing);
    }

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

        // add the liquidity
        uniswapV2Router.addLiquidityETH{value: ethAmount}(
            address(this),
            tokenAmount,
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            owner(),
            block.timestamp
        );
    }

    function swapTokensForETH(uint256 tokenAmount) private {
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = uniswapV2Router.WETH();

        _approve(
            address(this), 
            address(uniswapV2Router), 
            tokenAmount);

        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0,
            path,
            address(this),
            block.timestamp
        );
    }

    // Custom transfer function with buy and sell fees and burn functionality
    function _transfer(
        address from, 
        address to, 
        uint256 amount) internal override {
        require(amount > 0, "Transfer amount must be greater than 0");
        if(!_isExcludedFromLimit[from] || !_isExcludedFromLimit[to]) {
            require(tradingOpen, "Trading Closed");
        }

        uint256 taxAmount = 0;

        // Max Purchase Limitation
        if (from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromLimit[to]) {

            require(amount <= totalSupply() * purchaseLimit / 1e4, "Amount exceeds max purchase amount.");
        }

        if((!_isExcludedFromLimit[from] || !_isExcludedFromLimit[to]) && from != address(this)){
            // Buy & Sell Tax (Add or Remove Liquidity Included)
            if((from == uniswapV2Pair || to == uniswapV2Pair) && buySellTax > 0){
                taxAmount = amount * buySellTax / 1e4;
                super._transfer(from, address(this), taxAmount);
            }
        }

        if (!inSwapAndLiquify && to == uniswapV2Pair && !_isExcludedFromLimit[from]) {
            uint256 balance = balanceOf(address(this));
            if(balance >= swapAndLiqThreshold) {
                uint256 maxSwapAndLiq = swapAndLiqThreshold + (swapAndLiqThreshold / 5); //Additional 1.2*swapAndLiqThreshold
                if(balance >= maxSwapAndLiq){
                    swapAndLiquify(maxSwapAndLiq);
                }
                else {
                    swapAndLiquify(swapAndLiqThreshold);
                }
            }
        }

        super._transfer(from, to, (amount-taxAmount));
    }

    function setSellBuyTax(
        uint forMarketingInPercentage, 
        uint forLiquidityInPercentage) external onlyOwner {
        
        uint256 taxInPercentage = forMarketingInPercentage + forLiquidityInPercentage;
        uint256 currentTaxInPercentage = buySellTax / 100;
        require(taxInPercentage <= currentTaxInPercentage, "You can only lower fees");

        

        ethFee = forMarketingInPercentage;
        liquidityFee = forLiquidityInPercentage;

        buySellTax = taxInPercentage * 100;
        
        emit TaxUpdated(buySellTax);
    }

    function setTradingOpen() external onlyOwner {
        require(!tradingOpen, "Trading already open");
        tradingOpen = true;
        emit TradingStatusUpdated(true);
    }

    function setPurchaseLimit(uint _limit) external onlyOwner {
        purchaseLimit = _limit;
        emit PurchaseLimitUpdated(_limit);
    }

    function setSwapAndLiqThreshold(uint256 amount) public onlyOwner {
        uint256 currentTotalSupply = totalSupply();
        uint256 minSwapAndLiqThreshold = currentTotalSupply / 10000; // 0.01% of the current total token supply
        uint256 maxSwapAndLiqThreshold = currentTotalSupply * 5 / 1000; // 0.5% of the current total token supply

        require(amount >= minSwapAndLiqThreshold && amount <= maxSwapAndLiqThreshold, "SnL Threshold must be within the allowed range");
        swapAndLiqThreshold = amount;
        emit SwapAndLiqThresholdSet(amount);
    }

    function excludeFromLimitation(
        address account, 
        bool excluded) public onlyOwner {
        _isExcludedFromLimit[account] = excluded;
        emit ExcludeFromLimitation(account, excluded);
    }

    function batchExcludeFromLimitation(
        address[] calldata account, 
        bool[] calldata excluded) public onlyOwner {
        for(uint i = 0 ; i < account.length ; i ++) {
            _isExcludedFromLimit[account[i]] = excluded[i];
        }
        emit BatchExcludeFromLimitation(account, excluded);
    }

    function withdrawETH(address payable _to) external onlyOwner {
        require(address(this).balance > 0, "No ETH to withdraw");
        uint256 amount = address(this).balance;
        (bool sent, ) = _to.call{value: amount}("");
        require(sent, "Failed to send Ether");
        emit ETHWithdrawn(_to, amount);
    }

    function withdrawERC20Token(
        address token, 
        address to) public onlyOwner {
        uint256 balance = IERC20(address(token)).balanceOf(address(this));
        require(balance > 0, "Not enough tokens in contract");
        IERC20(address(token)).transfer(to, balance);
        emit ERC20Withdrawn(to, balance);
    }
}
ERC20.sol 316 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./IERC20Metadata.sol";
import {Context} from "./Context.sol";
import {IERC20Errors} from "./draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC-20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the ERC may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * 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 returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual 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 default value returned by this function, unless
     * it's 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 returns (uint8) {
        return 18;
    }

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the ERC. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` 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.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     * ```
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

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

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

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

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "./Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
IERC20Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC-20 standard.
 */
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);
}
draft-IERC6093.sol 161 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC-721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC-1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
IUniswapV2Factory.sol 17 lines
pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}
IUniswapV2Router01.sol 95 lines
pragma solidity >=0.6.2;

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);
}
IUniswapV2Router02.sol 44 lines
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

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;
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buySellTax 0x96e1c7d1 → uint256
decimals 0x313ce567 → uint8
ethFee 0x4cf1115d → uint256
feeWallet 0xf25f4b56 → address
liquidityFee 0x98118cb4 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
purchaseLimit 0x18886657 → uint256
swapAndLiqThreshold 0xb62f6e04 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
tradingOpen 0xffb54a99 → bool
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address

Write Contract 13 functions

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

approve 0x095ea7b3
address spender
uint256 value
returns: bool
batchExcludeFromLimitation 0x5e7f2dc1
address[] account
bool[] excluded
excludeFromLimitation 0x2333f9f1
address account
bool excluded
renounceOwnership 0x715018a6
No parameters
setPurchaseLimit 0x6edc4388
uint256 _limit
setSellBuyTax 0x61231f77
uint256 forMarketingInPercentage
uint256 forLiquidityInPercentage
setSwapAndLiqThreshold 0xce40fc15
uint256 amount
setTradingOpen 0x1eed1ac8
No parameters
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
withdrawERC20Token 0xecfbe70c
address token
address to
withdrawETH 0x690d8320
address _to

Recent Transactions

No transactions found for this address