Address Contract Partially Verified
Address
0x7204f17Bc6F18C20e31B56BD0489e57141d410aD
Balance
0 ETH
Nonce
1
Code Size
11089 bytes
Creator
0x9fbDd48C...3346 at tx 0xb854c6c9...b5b7cf
Indexed Transactions
0
Contract Bytecode
11089 bytes
0x6080604052600436106103855760003560e01c8063924de9b7116101d1578063c876d0b911610102578063e2f45605116100a0578063f8b45b051161006f578063f8b45b0514610a1e578063f94f8f0e14610a34578063fe575a8714610a54578063fe72b27a14610a8457600080fd5b8063e2f45605146109bc578063f11a24d3146109d2578063f2fde38b146109e8578063f637434214610a0857600080fd5b8063d257b34f116100dc578063d257b34f14610920578063d3f9140814610940578063d85ba06314610960578063dd62ed3e1461097657600080fd5b8063c876d0b9146108db578063c8c8ebe4146108f5578063c9567bf91461090b57600080fd5b8063a4c82a001161016f578063b7f0af4611610149578063b7f0af461461085c578063bbc0c7421461087c578063c02466681461089b578063c17b5b8c146108bb57600080fd5b8063a4c82a00146107f6578063a9059cbb1461080c578063b62496f51461082c57600080fd5b80639ec22c0e116101ab5780639ec22c0e146107945780639fccce32146107aa578063a0d82dc5146107c0578063a457c2d7146107d657600080fd5b8063924de9b71461074957806395d89b41146107695780639c3b4fdc1461077e57600080fd5b80632f18dd91116102b65780636ddd1713116102545780637bce5a04116102235780637bce5a04146106df5780638095d564146106f55780638da5cb5b14610715578063921369131461073357600080fd5b80636ddd17131461065457806370a0823114610674578063715018a6146106aa5780637571336a146106bf57600080fd5b806349bd5a5e1161029057806349bd5a5e146105b85780634a62bb65146105ec5780634fbee193146106065780636a486a8e1461063e57600080fd5b80632f18dd9114610567578063313ce5671461057c578063395093511461059857600080fd5b8063199ffc721161032357806323b872dd116102fd57806323b872dd1461050157806327c8f835146105215780632c3e486c146105375780632e82f1a01461054d57600080fd5b8063199ffc72146104bf5780631a8145bb146104d55780631f3fed8f146104eb57600080fd5b806311a582c31161035f57806311a582c31461041c5780631694505e1461043e57806318160ddd1461048a578063184c16c5146104a957600080fd5b806306fdde0314610391578063095ea7b3146103bc57806310d5de53146103ec57600080fd5b3661038c57005b600080fd5b34801561039d57600080fd5b506103a6610aa4565b6040516103b39190612661565b60405180910390f35b3480156103c857600080fd5b506103dc6103d73660046126c7565b610b36565b60405190151581526020016103b3565b3480156103f857600080fd5b506103dc6104073660046126f3565b60216020526000908152604090205460ff1681565b34801561042857600080fd5b5061043c610437366004612710565b610b4d565b005b34801561044a57600080fd5b506104727f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b0390911681526020016103b3565b34801561049657600080fd5b506002545b6040519081526020016103b3565b3480156104b557600080fd5b5061049b600f5481565b3480156104cb57600080fd5b5061049b600b5481565b3480156104e157600080fd5b5061049b601e5481565b3480156104f757600080fd5b5061049b601d5481565b34801561050d57600080fd5b506103dc61051c366004612732565b610cb3565b34801561052d57600080fd5b5061047261dead81565b34801561054357600080fd5b5061049b600d5481565b34801561055957600080fd5b50600c546103dc9060ff1681565b34801561057357600080fd5b506103dc610d1c565b34801561058857600080fd5b50604051601281526020016103b3565b3480156105a457600080fd5b506103dc6105b33660046126c7565b610d65565b3480156105c457600080fd5b506104727f000000000000000000000000c9127d4d1c17d74e0db33d7c70e255058c3d883181565b3480156105f857600080fd5b506011546103dc9060ff1681565b34801561061257600080fd5b506103dc6106213660046126f3565b6001600160a01b0316600090815260208052604090205460ff1690565b34801561064a57600080fd5b5061049b60195481565b34801561066057600080fd5b506011546103dc9062010000900460ff1681565b34801561068057600080fd5b5061049b61068f3660046126f3565b6001600160a01b031660009081526020819052604090205490565b3480156106b657600080fd5b5061043c610d9b565b3480156106cb57600080fd5b5061043c6106da366004612783565b610e0f565b3480156106eb57600080fd5b5061049b60165481565b34801561070157600080fd5b5061043c6107103660046127b8565b610e64565b34801561072157600080fd5b506005546001600160a01b0316610472565b34801561073f57600080fd5b5061049b601a5481565b34801561075557600080fd5b5061043c6107643660046127e4565b610f0c565b34801561077557600080fd5b506103a6610f52565b34801561078a57600080fd5b5061049b60185481565b3480156107a057600080fd5b5061049b60105481565b3480156107b657600080fd5b5061049b601f5481565b3480156107cc57600080fd5b5061049b601c5481565b3480156107e257600080fd5b506103dc6107f13660046126c7565b610f61565b34801561080257600080fd5b5061049b600e5481565b34801561081857600080fd5b506103dc6108273660046126c7565b610fb0565b34801561083857600080fd5b506103dc6108473660046126f3565b60226020526000908152604090205460ff1681565b34801561086857600080fd5b5061043c6108773660046126f3565b610fbd565b34801561088857600080fd5b506011546103dc90610100900460ff1681565b3480156108a757600080fd5b5061043c6108b6366004612783565b611009565b3480156108c757600080fd5b5061043c6108d63660046127b8565b61105d565b3480156108e757600080fd5b506014546103dc9060ff1681565b34801561090157600080fd5b5061049b60085481565b34801561091757600080fd5b5061043c611100565b34801561092c57600080fd5b506103dc61093b3660046127ff565b611141565b34801561094c57600080fd5b5061043c61095b3660046126f3565b611206565b34801561096c57600080fd5b5061049b60155481565b34801561098257600080fd5b5061049b610991366004612818565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156109c857600080fd5b5061049b60095481565b3480156109de57600080fd5b5061049b60175481565b3480156109f457600080fd5b5061043c610a033660046126f3565b611252565b348015610a1457600080fd5b5061049b601b5481565b348015610a2a57600080fd5b5061049b600a5481565b348015610a4057600080fd5b5061043c610a4f366004612783565b61133d565b348015610a6057600080fd5b506103dc610a6f3660046126f3565b60136020526000908152604090205460ff1681565b348015610a9057600080fd5b506103dc610a9f3660046127ff565b6113e8565b606060038054610ab390612851565b80601f0160208091040260200160405190810160405280929190818152602001828054610adf90612851565b8015610b2c5780601f10610b0157610100808354040283529160200191610b2c565b820191906000526020600020905b815481529060010190602001808311610b0f57829003601f168201915b5050505050905090565b6000610b4333848461163a565b5060015b92915050565b6005546001600160a01b03163314610b805760405162461bcd60e51b8152600401610b779061288b565b60405180910390fd5b6001821015610be75760405162461bcd60e51b815260206004820152602d60248201527f43616e6e6f7420736574206d61785472616e73616374696f6e416d6f756e742060448201526c6c6f776572207468616e20312560981b6064820152608401610b77565b670de0b6b3a7640000606483610bfc60025490565b610c0691906128d6565b610c1091906128ed565b610c1a91906128ed565b6008556001811015610c795760405162461bcd60e51b815260206004820152602260248201527f43616e6e6f7420736574206d617857616c6c6574206c6f776572207468616e20604482015261312560f01b6064820152608401610b77565b670de0b6b3a7640000606482610c8e60025490565b610c9891906128d6565b610ca291906128ed565b610cac91906128ed565b600a555050565b6000610cc084848461175f565b610d128433610d0d85604051806060016040528060288152602001612acf602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190612021565b61163a565b5060019392505050565b6005546000906001600160a01b03163314610d495760405162461bcd60e51b8152600401610b779061288b565b506011805460ff19908116909155601480549091169055600190565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610b43918590610d0d908661205b565b6005546001600160a01b03163314610dc55760405162461bcd60e51b8152600401610b779061288b565b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b6005546001600160a01b03163314610e395760405162461bcd60e51b8152600401610b779061288b565b6001600160a01b03919091166000908152602160205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610e8e5760405162461bcd60e51b8152600401610b779061288b565b60168390556017829055601881905580610ea8838561290f565b610eb2919061290f565b601581905560281015610f075760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420323025206f72206c6573730000006044820152606401610b77565b505050565b6005546001600160a01b03163314610f365760405162461bcd60e51b8152600401610b779061288b565b60118054911515620100000262ff000019909216919091179055565b606060048054610ab390612851565b6000610b433384610d0d85604051806060016040528060258152602001612af7602591393360009081526001602090815260408083206001600160a01b038d1684529091529020549190612021565b6000610b4333848461175f565b6005546001600160a01b03163314610fe75760405162461bcd60e51b8152600401610b779061288b565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146110335760405162461bcd60e51b8152600401610b779061288b565b6001600160a01b039190911660009081526020805260409020805460ff1916911515919091179055565b6005546001600160a01b031633146110875760405162461bcd60e51b8152600401610b779061288b565b601a839055601b829055601c819055806110a1838561290f565b6110ab919061290f565b601981905560281015610f075760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420323525206f72206c6573730000006044820152606401610b77565b6005546001600160a01b0316331461112a5760405162461bcd60e51b8152600401610b779061288b565b6011805462ffff0019166201010017905542600e55565b6005546000906001600160a01b0316331461116e5760405162461bcd60e51b8152600401610b779061288b565b60018211156111da5760405162461bcd60e51b815260206004820152603260248201527f5377617020616d6f756e742063616e6e6f74206265206869676865722074686160448201527137101892903a37ba30b61039bab838363c9760711b6064820152608401610b77565b6064826111e660025490565b6111f091906128d6565b6111fa91906128ed565b6009555060015b919050565b6005546001600160a01b031633146112305760405162461bcd60e51b8152600401610b779061288b565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b0316331461127c5760405162461bcd60e51b8152600401610b779061288b565b6001600160a01b0381166112e15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b77565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146113675760405162461bcd60e51b8152600401610b779061288b565b6001600160a01b0382166113bd5760405162461bcd60e51b815260206004820152601760248201527f416464726573732073686f756c64206e6f7420626520300000000000000000006044820152606401610b77565b6001600160a01b03919091166000908152601360205260409020805460ff1916911515919091179055565b6005546000906001600160a01b031633146114155760405162461bcd60e51b8152600401610b779061288b565b600f54601054611425919061290f565b42116114735760405162461bcd60e51b815260206004820181905260248201527f4d757374207761697420666f7220636f6f6c646f776e20746f2066696e6973686044820152606401610b77565b6103e88211156114d85760405162461bcd60e51b815260206004820152602a60248201527f4d6179206e6f74206e756b65206d6f7265207468616e20313025206f6620746f60448201526906b656e7320696e204c560b41b6064820152608401610b77565b426010556040516370a0823160e01b81526001600160a01b037f000000000000000000000000c9127d4d1c17d74e0db33d7c70e255058c3d883116600482015260009030906370a0823190602401602060405180830381865afa158015611543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115679190612922565b9050600061271061157885846128d6565b61158291906128ed565b905080156115b7576115b77f000000000000000000000000c9127d4d1c17d74e0db33d7c70e255058c3d883161dead836120c1565b60007f000000000000000000000000c9127d4d1c17d74e0db33d7c70e255058c3d88319050806001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561161757600080fd5b505af115801561162b573d6000803e3d6000fd5b50600198975050505050505050565b6001600160a01b03831661169c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610b77565b6001600160a01b0382166116fd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610b77565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166117855760405162461bcd60e51b8152600401610b779061293b565b6001600160a01b0382166117ab5760405162461bcd60e51b8152600401610b7790612980565b6001600160a01b03831660009081526013602052604090205460ff161580156117ed57506001600160a01b03821660009081526013602052604090205460ff16155b6118275760405162461bcd60e51b815260206004820152600b60248201526a109b1858dadb1a5cdd195960aa1b6044820152606401610b77565b8060000361183b57610f07838360006120c1565b60115460ff1615611cf6576005546001600160a01b0384811691161480159061187257506005546001600160a01b03838116911614155b801561188657506001600160a01b03821615155b801561189d57506001600160a01b03821661dead14155b80156118b35750600554600160a01b900460ff16155b15611cf657601154610100900460ff16611949576001600160a01b038316600090815260208052604090205460ff168061190457506001600160a01b038216600090815260208052604090205460ff165b6119495760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b6044820152606401610b77565b60145460ff1615611a90576005546001600160a01b038381169116148015906119a457507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316826001600160a01b031614155b80156119e257507f000000000000000000000000c9127d4d1c17d74e0db33d7c70e255058c3d88316001600160a01b0316826001600160a01b031614155b15611a9057326000908152601260205260409020544311611a7d5760405162461bcd60e51b815260206004820152604960248201527f5f7472616e736665723a3a205472616e736665722044656c617920656e61626c60448201527f65642e20204f6e6c79206f6e652070757263686173652070657220626c6f636b6064820152681030b63637bbb2b21760b91b608482015260a401610b77565b3260009081526012602052604090204390555b6001600160a01b03831660009081526022602052604090205460ff168015611ad157506001600160a01b03821660009081526021602052604090205460ff16155b15611bb557600854811115611b465760405162461bcd60e51b815260206004820152603560248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201527436b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760591b6064820152608401610b77565b600a546001600160a01b038316600090815260208190526040902054611b6c908361290f565b1115611bb05760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b6044820152606401610b77565b611cf6565b6001600160a01b03821660009081526022602052604090205460ff168015611bf657506001600160a01b03831660009081526021602052604090205460ff16155b15611c6c57600854811115611bb05760405162461bcd60e51b815260206004820152603660248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152751036b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760511b6064820152608401610b77565b6001600160a01b03821660009081526021602052604090205460ff16611cf657600a546001600160a01b038316600090815260208190526040902054611cb2908361290f565b1115611cf65760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b6044820152606401610b77565b3060009081526020819052604090205460095481108015908190611d22575060115462010000900460ff165b8015611d385750600554600160a01b900460ff16155b8015611d5d57506001600160a01b03851660009081526022602052604090205460ff16155b8015611d8157506001600160a01b038516600090815260208052604090205460ff16155b8015611da557506001600160a01b038416600090815260208052604090205460ff16155b15611dd3576005805460ff60a01b1916600160a01b179055611dc56121ca565b6005805460ff60a01b191690555b6005546001600160a01b038616600090815260208052604090205460ff600160a01b909204821615911680611e1f57506001600160a01b038516600090815260208052604090205460ff165b15611e28575060005b6000811561200d576001600160a01b03861660009081526022602052604090205460ff168015611e5a57506000601954115b15611f1257606460195486611e6f91906128d6565b611e7991906128ed565b9050601954601b5482611e8c91906128d6565b611e9691906128ed565b601e6000828254611ea7919061290f565b9091555050601954601c54611ebc90836128d6565b611ec691906128ed565b601f6000828254611ed7919061290f565b9091555050601954601a54611eec90836128d6565b611ef691906128ed565b601d6000828254611f07919061290f565b90915550611fef9050565b6001600160a01b03871660009081526022602052604090205460ff168015611f3c57506000601554115b15611fef57606460155486611f5191906128d6565b611f5b91906128ed565b905060155460175482611f6e91906128d6565b611f7891906128ed565b601e6000828254611f89919061290f565b9091555050601554601854611f9e90836128d6565b611fa891906128ed565b601f6000828254611fb9919061290f565b9091555050601554601654611fce90836128d6565b611fd891906128ed565b601d6000828254611fe9919061290f565b90915550505b8015612000576120008730836120c1565b61200a81866129c3565b94505b6120188787876120c1565b50505050505050565b600081848411156120455760405162461bcd60e51b8152600401610b779190612661565b50600061205284866129c3565b95945050505050565b600080612068838561290f565b9050838110156120ba5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610b77565b9392505050565b6001600160a01b0383166120e75760405162461bcd60e51b8152600401610b779061293b565b6001600160a01b03821661210d5760405162461bcd60e51b8152600401610b7790612980565b61214a81604051806060016040528060268152602001612aa9602691396001600160a01b0386166000908152602081905260409020549190612021565b6001600160a01b038085166000908152602081905260408082209390935590841681522054612179908261205b565b6001600160a01b038381166000818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611752565b3060009081526020819052604081205490506000601f54601d54601e546121f1919061290f565b6121fb919061290f565b9050600082158061220a575081155b1561221457505050565b6009546122229060146128d6565b83111561223a576009546122379060146128d6565b92505b6000600283601e548661224d91906128d6565b61225791906128ed565b61226191906128ed565b9050600061226f82866129c3565b90504761227b826123c0565b600061228782476129c3565b9050600086601d548361229a91906128d6565b6122a491906128ed565b9050600087601f54846122b791906128d6565b6122c191906128ed565b90506000816122d084866129c3565b6122da91906129c3565b6000601e819055601d819055601f8190556007546040519293506001600160a01b031691849181818185875af1925050503d8060008114612337576040519150601f19603f3d011682016040523d82523d6000602084013e61233c565b606091505b509098505086158015906123505750600081115b1561235f5761235f8782612580565b6006546040516001600160a01b03909116904790600081818185875af1925050503d80600081146123ac576040519150601f19603f3d011682016040523d82523d6000602084013e6123b1565b606091505b50505050505050505050505050565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106123f5576123f56129d6565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612473573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249791906129ec565b816001815181106124aa576124aa6129d6565b60200260200101906001600160a01b031690816001600160a01b0316815250506124f5307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d8461163a565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac9479061254a908590600090869030904290600401612a09565b600060405180830381600087803b15801561256457600080fd5b505af1158015612578573d6000803e3d6000fd5b505050505050565b6125ab307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d8461163a565b60405163f305d71960e01b815230600482015260248101839052600060448201819052606482015261dead60848201524260a48201527f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b03169063f305d71990839060c40160606040518083038185885af1158015612635573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061265a9190612a7a565b5050505050565b600060208083528351808285015260005b8181101561268e57858101830151858201604001528201612672565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b03811681146126c457600080fd5b50565b600080604083850312156126da57600080fd5b82356126e5816126af565b946020939093013593505050565b60006020828403121561270557600080fd5b81356120ba816126af565b6000806040838503121561272357600080fd5b50508035926020909101359150565b60008060006060848603121561274757600080fd5b8335612752816126af565b92506020840135612762816126af565b929592945050506040919091013590565b8035801515811461120157600080fd5b6000806040838503121561279657600080fd5b82356127a1816126af565b91506127af60208401612773565b90509250929050565b6000806000606084860312156127cd57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156127f657600080fd5b6120ba82612773565b60006020828403121561281157600080fd5b5035919050565b6000806040838503121561282b57600080fd5b8235612836816126af565b91506020830135612846816126af565b809150509250929050565b600181811c9082168061286557607f821691505b60208210810361288557634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610b4757610b476128c0565b60008261290a57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610b4757610b476128c0565b60006020828403121561293457600080fd5b5051919050565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b81810381811115610b4757610b476128c0565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156129fe57600080fd5b81516120ba816126af565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015612a595784516001600160a01b031683529383019391830191600101612a34565b50506001600160a01b03969096166060850152505050608001529392505050565b600080600060608486031215612a8f57600080fd5b835192506020840151915060408401519050925092509256fe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fcc3d6d0c24d6767fc1a87cb763b16a891e3380c6e7f608d37f071f6f216c10064736f6c63430008130033
Verified Source Code Partial Match
Compiler: v0.8.19+commit.7dd6d404
EVM: paris
Optimization: Yes (200 runs)
BEAST.sol 1074 lines
// SPDX-License-Identifier: MIT
pragma solidity = 0.8.19;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
interface IUniswapV2Pair {
event Sync(uint112 reserve0, uint112 reserve1);
function sync() external;
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
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);
}
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 allowance 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 {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_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");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), 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 {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be 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;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
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 addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract BEAST is ERC20, Ownable {
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address private marketingWallet;
address private devWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
uint256 public percentForLPBurn = 25; // 25 = .25%
bool public lpBurnEnabled = false;
uint256 public lpBurnFrequency = 3600 seconds;
uint256 public lastLpBurnTime;
uint256 public manualBurnFrequency = 30 minutes;
uint256 public lastManualLpBurnTime;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
mapping (address => bool) public isBlacklisted;
bool public transferDelayEnabled = true;
uint256 public buyTotalFees;
uint256 public buyMarketingFee;
uint256 public buyLiquidityFee;
uint256 public buyDevFee;
uint256 public sellTotalFees;
uint256 public sellMarketingFee;
uint256 public sellLiquidityFee;
uint256 public sellDevFee;
uint256 public tokensForMarketing;
uint256 public tokensForLiquidity;
uint256 public tokensForDev;
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) public _isExcludedMaxTransactionAmount;
// 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 automatedMarketMakerPairs;
constructor() ERC20("Beast", "BEAST") {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
excludeFromMaxTransaction(address(_uniswapV2Router), true);
uniswapV2Router = _uniswapV2Router;
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
excludeFromMaxTransaction(address(uniswapV2Pair), true);
_setAutomatedMarketMakerPair(address(uniswapV2Pair), true);
uint256 _buyMarketingFee = 0;
uint256 _buyLiquidityFee = 0;
uint256 _buyDevFee = 25;
uint256 _sellMarketingFee = 0;
uint256 _sellLiquidityFee = 0;
uint256 _sellDevFee = 25;
uint256 totalSupply = 1000000000000 * 1e18;
maxTransactionAmount = totalSupply * 2 / 100;
maxWallet = totalSupply * 2 / 100;
swapTokensAtAmount = totalSupply * 5 / 1000;
buyMarketingFee = _buyMarketingFee;
buyLiquidityFee = _buyLiquidityFee;
buyDevFee = _buyDevFee;
buyTotalFees = buyMarketingFee + buyLiquidityFee + buyDevFee;
sellMarketingFee = _sellMarketingFee;
sellLiquidityFee = _sellLiquidityFee;
sellDevFee = _sellDevFee;
sellTotalFees = sellMarketingFee + sellLiquidityFee + sellDevFee;
marketingWallet = address(owner()); // set as marketing wallet
devWallet = address(owner()); // set as dev wallet
// exclude from paying fees or having max transaction amount
excludeFromFees(owner(), true);
excludeFromFees(address(this), true);
excludeFromFees(address(0xdead), true);
excludeFromMaxTransaction(owner(), true);
excludeFromMaxTransaction(address(this), true);
excludeFromMaxTransaction(address(0xdead), true);
_mint(msg.sender, totalSupply);
}
receive() external payable {
}
// once enabled, can never be turned off
function openTrading() external onlyOwner {
tradingActive = true;
swapEnabled = true;
lastLpBurnTime = block.timestamp;
}
// remove limits after token is stable
function removealllimits() external onlyOwner returns (bool){
limitsInEffect = false;
transferDelayEnabled = false;
return true;
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool){
require(newAmount <= 1, "Swap amount cannot be higher than 1% total supply.");
swapTokensAtAmount = totalSupply() * newAmount / 100;
return true;
}
function updateMaxTxnAmount(uint256 txNum, uint256 walNum) external onlyOwner {
require(txNum >= 1, "Cannot set maxTransactionAmount lower than 1%");
maxTransactionAmount = (totalSupply() * txNum / 100)/1e18;
require(walNum >= 1, "Cannot set maxWallet lower than 1%");
maxWallet = (totalSupply() * walNum / 100)/1e18;
}
function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
_isExcludedMaxTransactionAmount[updAds] = isEx;
}
// only use to disable contract sales if absolutely necessary (emergency use only)
function updateSwapEnabled(bool enabled) external onlyOwner(){
swapEnabled = enabled;
}
function updateBuyFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _devFee) external onlyOwner {
buyMarketingFee = _marketingFee;
buyLiquidityFee = _liquidityFee;
buyDevFee = _devFee;
buyTotalFees = buyMarketingFee + buyLiquidityFee + buyDevFee;
require(buyTotalFees <= 40, "Must keep fees at 20% or less");
}
function updateSellFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _devFee) external onlyOwner {
sellMarketingFee = _marketingFee;
sellLiquidityFee = _liquidityFee;
sellDevFee = _devFee;
sellTotalFees = sellMarketingFee + sellLiquidityFee + sellDevFee;
require(sellTotalFees <= 40, "Must keep fees at 25% or less");
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
_isExcludedFromFees[account] = excluded;
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
automatedMarketMakerPairs[pair] = value;
}
function updateallMarketingWallets(address newMarketingWallet) external onlyOwner {
marketingWallet = newMarketingWallet;
}
function updateallDevWallets(address newWallet) external onlyOwner {
devWallet = newWallet;
}
function isExcludedFromFees(address account) public view returns(bool) {
return _isExcludedFromFees[account];
}
function updateall_bots(address _address, bool status) external onlyOwner {
require(_address != address(0),"Address should not be 0");
isBlacklisted[_address] = status;
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(!isBlacklisted[from] && !isBlacklisted[to],"Blacklisted");
if(amount == 0) {
super._transfer(from, to, 0);
return;
}
if(limitsInEffect){
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!swapping
){
if(!tradingActive){
require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active.");
}
// at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.
if (transferDelayEnabled){
if (to != owner() && to != address(uniswapV2Router) && to != address(uniswapV2Pair)){
require(_holderLastTransferTimestamp[tx.origin] < block.number, "_transfer:: Transfer Delay enabled. Only one purchase per block allowed.");
_holderLastTransferTimestamp[tx.origin] = block.number;
}
}
//when buy
if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]) {
require(amount <= maxTransactionAmount, "Buy transfer amount exceeds the maxTransactionAmount.");
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
}
//when sell
else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) {
require(amount <= maxTransactionAmount, "Sell transfer amount exceeds the maxTransactionAmount.");
}
else if(!_isExcludedMaxTransactionAmount[to]){
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if(
canSwap &&
swapEnabled &&
!swapping &&
!automatedMarketMakerPairs[from] &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
swapping = true;
swapBack();
swapping = false;
}
bool takeFee = !swapping;
// if any account belongs to _isExcludedFromFee account then remove the fee
if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
// only take fees on buys/sells, do not take on wallet transfers
if(takeFee){
// on sell
if (automatedMarketMakerPairs[to] && sellTotalFees > 0){
fees = amount * sellTotalFees/100;
tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees;
tokensForDev += fees * sellDevFee / sellTotalFees;
tokensForMarketing += fees * sellMarketingFee / sellTotalFees;
}
// on buy
else if(automatedMarketMakerPairs[from] && buyTotalFees > 0) {
fees = amount * buyTotalFees/100;
tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees;
tokensForDev += fees * buyDevFee / buyTotalFees;
tokensForMarketing += fees * buyMarketingFee / buyTotalFees;
}
if(fees > 0){
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
// make the swap
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of ETH
path,
address(this),
block.timestamp
);
}
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
deadAddress,
block.timestamp
);
}
function swapBack() private {
uint256 contractBalance = balanceOf(address(this));
uint256 totalTokensToSwap = tokensForLiquidity + tokensForMarketing + tokensForDev;
bool success;
if(contractBalance == 0 || totalTokensToSwap == 0) {return;}
if(contractBalance > swapTokensAtAmount * 20){
contractBalance = swapTokensAtAmount * 20;
}
// Halve the amount of liquidity tokens
uint256 liquidityTokens = contractBalance * tokensForLiquidity / totalTokensToSwap / 2;
uint256 amountToSwapForETH = contractBalance - liquidityTokens;
uint256 initialETHBalance = address(this).balance;
swapTokensForEth(amountToSwapForETH);
uint256 ethBalance = address(this).balance - initialETHBalance;
uint256 ethForMarketing = ethBalance * tokensForMarketing/totalTokensToSwap;
uint256 ethForDev = ethBalance * tokensForDev/totalTokensToSwap;
uint256 ethForLiquidity = ethBalance - ethForMarketing - ethForDev;
tokensForLiquidity = 0;
tokensForMarketing = 0;
tokensForDev = 0;
(success,) = address(devWallet).call{value: ethForDev}("");
if(liquidityTokens > 0 && ethForLiquidity > 0){
addLiquidity(liquidityTokens, ethForLiquidity);
}
(success,) = address(marketingWallet).call{value: address(this).balance}("");
}
function manualBurnLiquidityPairTokens(uint256 percent) external onlyOwner returns (bool){
require(block.timestamp > lastManualLpBurnTime + manualBurnFrequency , "Must wait for cooldown to finish");
require(percent <= 1000, "May not nuke more than 10% of tokens in LP");
lastManualLpBurnTime = block.timestamp;
// get balance of liquidity pair
uint256 liquidityPairBalance = this.balanceOf(uniswapV2Pair);
// calculate amount to burn
uint256 amountToBurn = liquidityPairBalance * percent/10000;
// pull tokens from pancakePair liquidity and move to dead address permanently
if (amountToBurn > 0){
super._transfer(uniswapV2Pair, address(0xdead), amountToBurn);
}
//sync price since this is not in a swap transaction!
IUniswapV2Pair pair = IUniswapV2Pair(uniswapV2Pair);
pair.sync();
return true;
}
}
Read Contract
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
buyDevFee 0x9c3b4fdc → uint256
buyLiquidityFee 0xf11a24d3 → uint256
buyMarketingFee 0x7bce5a04 → uint256
buyTotalFees 0xd85ba063 → uint256
deadAddress 0x27c8f835 → address
decimals 0x313ce567 → uint8
isBlacklisted 0xfe575a87 → bool
isExcludedFromFees 0x4fbee193 → bool
lastLpBurnTime 0xa4c82a00 → uint256
lastManualLpBurnTime 0x9ec22c0e → uint256
limitsInEffect 0x4a62bb65 → bool
lpBurnEnabled 0x2e82f1a0 → bool
lpBurnFrequency 0x2c3e486c → uint256
manualBurnFrequency 0x184c16c5 → uint256
maxTransactionAmount 0xc8c8ebe4 → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
percentForLPBurn 0x199ffc72 → uint256
sellDevFee 0xa0d82dc5 → uint256
sellLiquidityFee 0xf6374342 → uint256
sellMarketingFee 0x92136913 → uint256
sellTotalFees 0x6a486a8e → uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
tokensForDev 0x9fccce32 → uint256
tokensForLiquidity 0x1a8145bb → uint256
tokensForMarketing 0x1f3fed8f → uint256
totalSupply 0x18160ddd → uint256
tradingActive 0xbbc0c742 → bool
transferDelayEnabled 0xc876d0b9 → bool
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 20 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
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
manualBurnLiquidityPairTokens 0xfe72b27a
uint256 percent
returns: bool
openTrading 0xc9567bf9
No parameters
removealllimits 0x2f18dd91
No parameters
returns: bool
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateBuyFees 0x8095d564
uint256 _marketingFee
uint256 _liquidityFee
uint256 _devFee
updateMaxTxnAmount 0x11a582c3
uint256 txNum
uint256 walNum
updateSellFees 0xc17b5b8c
uint256 _marketingFee
uint256 _liquidityFee
uint256 _devFee
updateSwapEnabled 0x924de9b7
bool enabled
updateSwapTokensAtAmount 0xd257b34f
uint256 newAmount
returns: bool
updateallDevWallets 0xb7f0af46
address newWallet
updateallMarketingWallets 0xd3f91408
address newMarketingWallet
updateall_bots 0xf94f8f0e
address _address
bool status
Recent Transactions
No transactions found for this address