Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xD49374D1D6d2b2D793035A0116F2b0D19230DE26
Balance 0 ETH
Nonce 1
Code Size 11538 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

11538 bytes
0x60806040526004361061026e5760003560e01c80637a41865b11610153578063c3c8cd80116100cb578063d9e664601161007f578063e8078d9411610064578063e8078d94146107a2578063ef422a18146107b7578063ffb54a99146107d757600080fd5b8063d9e664601461073c578063dd62ed3e1461075c57600080fd5b8063d13f9344116100b0578063d13f9344146106d4578063d543dbeb146106e9578063d94439231461070957600080fd5b8063c3c8cd80146106aa578063c9567bf9146106bf57600080fd5b80638da5cb5b11610122578063a9059cbb11610107578063a9059cbb14610634578063a985ceef14610654578063bd3900c01461068a57600080fd5b80638da5cb5b146105d057806395d89b41146105ee57600080fd5b80637a41865b146105405780637d1db4a51461056d57806381dcc266146105835780638c97ca76146105b057600080fd5b806341cb87fc116101e65780636ddd1713116101b557806370a082311161019a57806370a08231146104db578063715018a6146104fb578063768dc7101461051057600080fd5b80636ddd1713146104915780636fc3eaec146104c657600080fd5b806341cb87fc1461041c5780634a7348121461043c5780635932ead1146104515780636690864e1461047157600080fd5b806318160ddd1161023d5780631bc8b18f116102225780631bc8b18f146103b357806323b872dd146103e0578063313ce5671461040057600080fd5b806318160ddd1461035f57806319a8ac9e1461037b57600080fd5b806306fdde031461027a578063095ea7b3146102d25780630c9be46d146103025780631283f1ca1461032457600080fd5b3661027557005b600080fd5b34801561028657600080fd5b5060408051808201909152600d81527f42697368752046696e616e63650000000000000000000000000000000000000060208201525b6040516102c99190612a6f565b60405180910390f35b3480156102de57600080fd5b506102f26102ed3660046129c2565b610809565b60405190151581526020016102c9565b34801561030e57600080fd5b5061032261031d3660046128e0565b610820565b005b34801561033057600080fd5b5061035161033f3660046128e0565b600d6020526000908152604090205481565b6040519081526020016102c9565b34801561036b57600080fd5b50683635c9adc5dea00000610351565b34801561038757600080fd5b5060125461039b906001600160a01b031681565b6040516001600160a01b0390911681526020016102c9565b3480156103bf57600080fd5b506103516103ce3660046128e0565b600f6020526000908152604090205481565b3480156103ec57600080fd5b506102f26103fb366004612953565b6108b9565b34801561040c57600080fd5b50604051600981526020016102c9565b34801561042857600080fd5b506103226104373660046128e0565b610922565b34801561044857600080fd5b506103226109b6565b34801561045d57600080fd5b5061032261046c3660046129ee565b610a3d565b34801561047d57600080fd5b5061032261048c3660046128e0565b610ae5565b34801561049d57600080fd5b506016546102f29077010000000000000000000000000000000000000000000000900460ff1681565b3480156104d257600080fd5b50610322610b79565b3480156104e757600080fd5b506103516104f63660046128e0565b610be0565b34801561050757600080fd5b50610322610c02565b34801561051c57600080fd5b506102f261052b3660046128e0565b60056020526000908152604090205460ff1681565b34801561054c57600080fd5b5061035161055b3660046128e0565b600e6020526000908152604090205481565b34801561057957600080fd5b5061035160175481565b34801561058f57600080fd5b5061035161059e3660046128e0565b60106020526000908152604090205481565b3480156105bc57600080fd5b5060115461039b906001600160a01b031681565b3480156105dc57600080fd5b506000546001600160a01b031661039b565b3480156105fa57600080fd5b5060408051808201909152600781527f426973687546690000000000000000000000000000000000000000000000000060208201526102bc565b34801561064057600080fd5b506102f261064f3660046129c2565b610cbe565b34801561066057600080fd5b506016546102f2907801000000000000000000000000000000000000000000000000900460ff1681565b34801561069657600080fd5b5060145461039b906001600160a01b031681565b3480156106b657600080fd5b50610322610ccb565b3480156106cb57600080fd5b50610322610d3b565b3480156106e057600080fd5b50610322610dfe565b3480156106f557600080fd5b50610322610704366004612a28565b610e6e565b34801561071557600080fd5b506016546102f2907501000000000000000000000000000000000000000000900460ff1681565b34801561074857600080fd5b5060135461039b906001600160a01b031681565b34801561076857600080fd5b5061035161077736600461291a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156107ae57600080fd5b50610322610f71565b3480156107c357600080fd5b506103226107d2366004612994565b6113c7565b3480156107e357600080fd5b506016546102f29074010000000000000000000000000000000000000000900460ff1681565b600061081633848461146a565b5060015b92915050565b6000546001600160a01b0316331461087f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b601280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60006108c68484846115c2565b610918843361091385604051806060016040528060288152602001612cb5602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611e1b565b61146a565b5060019392505050565b6000546001600160a01b0316331461097c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b601380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a105760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b600854158015610a205750600954155b15610a2757565b600060088190556009819055600a819055600b55565b6000546001600160a01b03163314610a975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b601680549115157801000000000000000000000000000000000000000000000000027fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000546001600160a01b03163314610b3f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b601180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610bd35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b47610bdd81611e55565b50565b6001600160a01b03811660009081526002602052604081205461081a90611eda565b6000546001600160a01b03163314610c5c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60006108163384846115c2565b6000546001600160a01b03163314610d255760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b6000610d3030610be0565b9050610bdd81611f71565b6000546001600160a01b03163314610d955760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b6016547501000000000000000000000000000000000000000000900460ff16610dbd57600080fd5b601680547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b6000546001600160a01b03163314610e585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b600260088190556009556001600a819055600b55565b6000546001600160a01b03163314610ec85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b60008111610f185760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610876565b610f366064610f30683635c9adc5dea0000084612175565b90612210565b60178190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6000546001600160a01b03163314610fcb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b601354601580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0390921691821790556110183082683635c9adc5dea0000061146a565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561105157600080fd5b505afa158015611065573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108991906128fd565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156110d157600080fd5b505afa1580156110e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110991906128fd565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561116957600080fd5b505af115801561117d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a191906128fd565b601680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039283161790556015541663f305d71947306111e981610be0565b6000806111fe6000546001600160a01b031690565b60405160e088901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561127957600080fd5b505af115801561128d573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112b29190612a41565b5050601680547fffffffffffffff0000ff00ffffffffffffffffffffffffffffffffffffffffff81167801010001000000000000000000000000000000000000000000179091556729a2241af62c00006017556015546040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0391821660048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201529116915063095ea7b390604401602060405180830381600087803b15801561138b57600080fd5b505af115801561139f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c39190612a0b565b5050565b6000546001600160a01b031633146114215760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610876565b6001600160a01b0391909116600090815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6001600160a01b0383166114e55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610876565b6001600160a01b0382166115615760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610876565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661163e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610876565b6001600160a01b0382166116ba5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610876565b600081116117305760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d75737420626520677265617465722060448201527f7468616e207a65726f00000000000000000000000000000000000000000000006064820152608401610876565b600080546001600160a01b0385811691161480159061175d57506000546001600160a01b03848116911614155b15611da8576001600160a01b0384166000908152600c602052604090205460ff161580156117a457506001600160a01b0383166000908152600c602052604090205460ff16155b6117f05760405162461bcd60e51b815260206004820152600e60248201527f596f7520617265206120626f74210000000000000000000000000000000000006044820152606401610876565b6016546001600160a01b03858116911614801561181b57506015546001600160a01b03848116911614155b801561184057506001600160a01b03831660009081526005602052604090205460ff16155b801561186a57506016547801000000000000000000000000000000000000000000000000900460ff165b156119e05760165474010000000000000000000000000000000000000000900460ff166118d95760405162461bcd60e51b815260206004820152601460248201527f54726164696e67206973206e6f74206f70656e210000000000000000000000006044820152606401610876565b6017548211156119515760405162461bcd60e51b815260206004820152602160248201527f416d6f756e74206c6172676572207468616e206d617820747820616d6f756e7460448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610876565b6001600160a01b0383166000908152600d602052604090205442116119b85760405162461bcd60e51b815260206004820152601660248201527f5761697420666f722062757920636f6f6c646f776e21000000000000000000006044820152606401610876565b6119c342601e612b53565b6001600160a01b0384166000908152600d60205260409020555060015b601654760100000000000000000000000000000000000000000000900460ff16158015611a1a57506016546001600160a01b038481169116145b8015611a3457506015546001600160a01b03858116911614155b8015611a5d575060165477010000000000000000000000000000000000000000000000900460ff165b15611d2c57601654611a8b90606490610f3090600390611a85906001600160a01b0316610be0565b90612175565b8211158015611a9c57506017548211155b611b0e5760405162461bcd60e51b815260206004820152602a60248201527f536c697070616765206973206f76657220322e3925206f72206f766572204d6160448201527f785478416d6f756e7421000000000000000000000000000000000000000000006064820152608401610876565b6001600160a01b0384166000908152600e60205260409020544211611b755760405162461bcd60e51b815260206004820152601760248201527f5761697420666f722073656c6c20636f6f6c646f776e210000000000000000006044820152606401610876565b6001600160a01b0384166000908152600f60205260409020544290611b9d9062015180612b53565b1015611bbd576001600160a01b0384166000908152601060205260408120555b6001600160a01b038416600090815260106020526040902054611c21576001600160a01b0384166000908152600f602052604090204290819055611c0390610e10612b53565b6001600160a01b0385166000908152600e6020526040902055611cdc565b6001600160a01b03841660009081526010602052604090205460011415611c4e57611c0342611c20612b53565b6001600160a01b03841660009081526010602052604090205460021415611c7b57611c0342615460612b53565b6001600160a01b03841660009081526010602052604090205460031415611cdc576001600160a01b0384166000908152600f6020526040902054611cc29062015180612b53565b6001600160a01b0385166000908152600e60205260409020555b6001600160a01b038416600090815260106020526040902054611cfe90612252565b6001600160a01b0384166000908152601060205260408120805491611d2283612bfa565b9190505550600190505b6016546001600160a01b03848116911614611da8576001600160a01b0384166000908152600e60205260409020544211611da85760405162461bcd60e51b815260206004820152601760248201527f5761697420666f722073656c6c20636f6f6c646f776e210000000000000000006044820152606401610876565b6001600160a01b03841660009081526005602052604090205460ff1680611de757506001600160a01b03831660009081526005602052604090205460ff165b15611df0575060005b611dfc84848484612292565b611e15600260088190556009556001600a819055600b55565b50505050565b60008184841115611e3f5760405162461bcd60e51b81526004016108769190612a6f565b506000611e4c8486612be3565b95945050505050565b6011546001600160a01b03166108fc611e6f836002612210565b6040518115909202916000818181858888f19350505050158015611e97573d6000803e3d6000fd5b506012546001600160a01b03166108fc611eb2836002612210565b6040518115909202916000818181858888f193505050501580156113c3573d6000803e3d6000fd5b6000600654821115611f545760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201527f65666c656374696f6e73000000000000000000000000000000000000000000006064820152608401610876565b6000611f5e6122c8565b9050611f6a8382612210565b9392505050565b601680547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff167601000000000000000000000000000000000000000000001790556040805160028082526060820183526000926020830190803683370190505090503081600081518110611fe757611fe7612c62565b6001600160a01b03928316602091820292909201810191909152601554604080517fad5c46480000000000000000000000000000000000000000000000000000000081529051919093169263ad5c4648926004808301939192829003018186803b15801561205457600080fd5b505afa158015612068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208c91906128fd565b8160018151811061209f5761209f612c62565b6001600160a01b0392831660209182029290920101526015546120c5913091168461146a565b6015546040517f791ac9470000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063791ac94790612117908590600090869030904290600401612ae2565b600060405180830381600087803b15801561213157600080fd5b505af1158015612145573d6000803e3d6000fd5b5050601680547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff16905550505050565b6000826121845750600061081a565b60006121908385612ba6565b90508261219d8583612b6b565b14611f6a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60448201527f77000000000000000000000000000000000000000000000000000000000000006064820152608401610876565b6000611f6a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506122eb565b8061225f57600360085550565b806001141561227057600660085550565b806002141561228157601160085550565b8060031415610bdd57601860085550565b8061229f5761229f610a10565b6122aa848484612319565b80611e1557611e15600260088190556009556001600a819055600b55565b60008060006122d5612645565b90925090506122e48282612210565b9250505090565b6000818361230c5760405162461bcd60e51b81526004016108769190612a6f565b506000611e4c8486612b6b565b60006123356064610f306008548561217590919063ffffffff16565b905060006123536064610f306009548661217590919063ffffffff16565b9050600061237160c8610f30600a548761217590919063ffffffff16565b9050600061238f60c8610f30600b548861217590919063ffffffff16565b905060006123ab826123a5858188818c8c612687565b90612687565b905060006123b76122c8565b905060006123c58883612175565b905060006123d38884612175565b905060006123e18885612175565b905060006123ef8886612175565b905060006123fd8887612175565b90506000612413826123a5858188818c8c612687565b90506124218f8f88846126c9565b61242a8b61273d565b6124338a61279d565b61243c896127fd565b612446858d61285d565b8d6001600160a01b03168f6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8a60405161248b91815260200190565b60405180910390a3601160009054906101000a90046001600160a01b03166001600160a01b03168f6001600160a01b03167ff66369c8f94bab922b04533b82ce846253a410ac2636fafe651dedc8133509d78d6040516124ed91815260200190565b60405180910390a3601260009054906101000a90046001600160a01b03166001600160a01b03168f6001600160a01b03167fca1677f804f862431f2dc8ef278f931a3d6b9da45ed59f98fbbdc93871e2084b8c60405161254f91815260200190565b60405180910390a38e6001600160a01b03167fc7d6f89597428d360a5f3fe92fcd36ac14e8c050d0c693437d7f0f73ef2585df8d6040516125ca91906040808252601e908201527f4665652073706c6974206265747765656e20616c6c20686f6c646572732100006060820152602081019190915260800190565b60405180910390a2601460009054906101000a90046001600160a01b03166001600160a01b03168f6001600160a01b03167fbac40739b0d4ca32fa2d82fc91630465ba3eddd1598da6fca393b26fb63b94538b60405161262c91815260200190565b60405180910390a3505050505050505050505050505050565b6006546000908190683635c9adc5dea000006126618282612210565b82101561267e57505060065492683635c9adc5dea0000092509050565b90939092509050565b6000611f6a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e1b565b6001600160a01b0384166000908152600260205260409020546126ec9083612687565b6001600160a01b03808616600090815260026020526040808220939093559085168152205461271b9082612881565b6001600160a01b03909316600090815260026020526040902092909255505050565b60006127476122c8565b905060006127558383612175565b6011546001600160a01b031660009081526002602052604090205490915061277d9082612881565b6011546001600160a01b0316600090815260026020526040902055505050565b60006127a76122c8565b905060006127b58383612175565b6012546001600160a01b03166000908152600260205260409020549091506127dd9082612881565b6012546001600160a01b0316600090815260026020526040902055505050565b60006128076122c8565b905060006128158383612175565b6014546001600160a01b031660009081526002602052604090205490915061283d9082612881565b6014546001600160a01b0316600090815260026020526040902055505050565b60065461286a9083612687565b60065560075461287a9082612881565b6007555050565b60008061288e8385612b53565b905083811015611f6a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610876565b6000602082840312156128f257600080fd5b8135611f6a81612c91565b60006020828403121561290f57600080fd5b8151611f6a81612c91565b6000806040838503121561292d57600080fd5b823561293881612c91565b9150602083013561294881612c91565b809150509250929050565b60008060006060848603121561296857600080fd5b833561297381612c91565b9250602084013561298381612c91565b929592945050506040919091013590565b600080604083850312156129a757600080fd5b82356129b281612c91565b9150602083013561294881612ca6565b600080604083850312156129d557600080fd5b82356129e081612c91565b946020939093013593505050565b600060208284031215612a0057600080fd5b8135611f6a81612ca6565b600060208284031215612a1d57600080fd5b8151611f6a81612ca6565b600060208284031215612a3a57600080fd5b5035919050565b600080600060608486031215612a5657600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b81811015612a9c57858101830151858201604001528201612a80565b81811115612aae576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015612b325784516001600160a01b031683529383019391830191600101612b0d565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115612b6657612b66612c33565b500190565b600082612ba1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612bde57612bde612c33565b500290565b600082821015612bf557612bf5612c33565b500390565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612c2c57612c2c612c33565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6001600160a01b0381168114610bdd57600080fd5b8015158114610bdd57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e352f4c06f5cee08f31932663330a2085438a422c0685ef0b82f6f4ee2e29c0f64736f6c63430008060033

Verified Source Code Partial Match

Compiler: v0.8.6+commit.11564f7e EVM: berlin Optimization: Yes (10000 runs)
BishuFinance.sol 497 lines
/*
 .----------------.  .----------------.  .----------------.  .----------------.  .----------------.  .----------------.  .----------------. 
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |
| |   ______     | || |     _____    | || |    _______   | || |  ____  ____  | || | _____  _____ | || |  _________   | || |     _____    | |
| |  |_   _ \    | || |    |_   _|   | || |   /  ___  |  | || | |_   ||   _| | || ||_   _||_   _|| || | |_   ___  |  | || |    |_   _|   | |
| |    | |_) |   | || |      | |     | || |  |  (__ \_|  | || |   | |__| |   | || |  | |    | |  | || |   | |_  \_|  | || |      | |     | |
| |    |  __'.   | || |      | |     | || |   '.___`-.   | || |   |  __  |   | || |  | '    ' |  | || |   |  _|      | || |      | |     | |
| |   _| |__) |  | || |     _| |_    | || |  |`\____) |  | || |  _| |  | |_  | || |   \ `--' /   | || |  _| |_       | || |     _| |_    | |
| |  |_______/   | || |    |_____|   | || |  |_______.'  | || | |____||____| | || |    `.__.'    | || | |_____|      | || |    |_____|   | |
| |              | || |              | || |              | || |              | || |              | || |              | || |              | |
| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |
 '----------------'  '----------------'  '----------------'  '----------------'  '----------------'  '----------------'  '----------------' 
*/
/* SPDX-License-Identifier: Unlicensed */
pragma solidity ^0.8.6;

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

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Team(address indexed from, address indexed to, uint256 value);
    event Charity(address indexed from, address indexed to, uint256 value);
    event Burn(address indexed from, address indexed to, uint256 value);
    event DistributedFee(address indexed from, string msg, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

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

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

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

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

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

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        return c;
    }
}

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

    constructor() {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    function owner() public view returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }
}

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

interface IUniswapV2Router02 {
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
    function factory() external pure returns (address);
    function WETH() external pure returns (address);
    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
}

contract BishuFinance is Context, IERC20, Ownable {
    using SafeMath for uint256;
    string private constant _name = unicode"Bishu Finance";
    string private constant _symbol = "BishuFi";
    uint8 private constant _decimals = 9;
    mapping(address => uint256) private _rOwned;
    mapping(address => uint256) private _tOwned;
    mapping(address => mapping(address => uint256)) private _allowances;
    mapping(address => bool) public _isExcludedFromFee;
    uint256 private constant MAX = ~uint256(0);
    uint256 private constant _tTotal = 1000000000000 * 10**9;
    uint256 private _rTotal = (MAX - (MAX % _tTotal));
    uint256 private _tFeeTotal;
    uint256 private _taxFee = 2;
    uint256 private _teamFee = 2;
    // 0.5% fee will be calculated later, number 1 is set because variable cannot store floating point
    uint256 private _charityFee = 1;
    // 0.5% fee will be calculated later, number 1 is set because variable cannot store floating point
    uint256 private _burnFee = 1;
    mapping(address => bool) private bots;
    mapping(address => uint256) public buycooldown;
    mapping(address => uint256) public sellcooldown;
    mapping(address => uint256) public firstsell;
    mapping(address => uint256) public sellnumber;
    // made public for transparency
    address payable public _teamAddress;
    address payable public _charityAddress;
    address public _routerAddress;
    address payable public _burnAddress = payable(0x000000000000000000000000000000000000dEaD);
    //
    IUniswapV2Router02 private uniswapV2Router;
    address private uniswapV2Pair;
    bool public tradingOpen = false;
    bool public liquidityAdded = false;
    bool private inSwap = false;
    bool public swapEnabled = false;
    bool public cooldownEnabled = false;
    uint256 public _maxTxAmount = _tTotal;
    event MaxTxAmountUpdated(uint256 _maxTxAmount);
    modifier lockTheSwap {
        inSwap = true;
        _;
        inSwap = false;
    }
    constructor(address payable addr1, address payable addr2, address addr3) {
        _teamAddress = addr1;
        _charityAddress = addr2;
        _routerAddress = addr3;
        _rOwned[_msgSender()] = _rTotal;
        _isExcludedFromFee[owner()] = true;
        _isExcludedFromFee[address(this)] = true;
        _isExcludedFromFee[_teamAddress] = true;
        _isExcludedFromFee[_charityAddress] = true;
        _isExcludedFromFee[_burnAddress] = true;
        emit Transfer(address(0), _msgSender(), _tTotal);
    }

    function name() public pure returns (string memory) {
        return _name;
    }

    function symbol() public pure returns (string memory) {
        return _symbol;
    }

    function decimals() public pure returns (uint8) {
        return _decimals;
    }

    function totalSupply() public pure override returns (uint256) {
        return _tTotal;
    }

    function balanceOf(address account) public view override returns (uint256) {
        return tokenFromReflection(_rOwned[account]);
    }

    function transfer(address recipient, uint256 amount) public override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(address owner, address spender) public view override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) public override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,"ERC20: transfer amount exceeds allowance"));
        return true;
    }

    function setCooldownEnabled(bool onoff) external onlyOwner() {
        cooldownEnabled = onoff;
    }    

    function setIsExcludedFromFee(address _address,bool _isExcluded) external onlyOwner() {
        _isExcludedFromFee[_address] = _isExcluded;
    }    

    function setTeamAddress(address payable _address) external onlyOwner() {
        _teamAddress = _address;
    }

    function setCharityAddress(address payable _address) external onlyOwner() {
        _charityAddress = _address;
    }

    function setRouterAddress(address _address) external onlyOwner() {
        _routerAddress = _address;
    }

    function tokenFromReflection(uint256 rAmount) private view returns (uint256) {
        require(rAmount <= _rTotal,"Amount must be less than total reflections");
        uint256 currentRate = _getRate();
        return rAmount.div(currentRate);
    }

    function removeAllFee() private {
        if (_taxFee == 0 && _teamFee == 0) return;
        _taxFee = 0;
        _teamFee = 0;
        _charityFee = 0;
        _burnFee = 0;
    }

    function restoreAllFee() private {
        _taxFee = 2;
        _teamFee = 2;
        // 0.5% fee will be calculated later, number 1 is set because variable cannot store floating point
        _charityFee = 1;
        // 0.5% fee will be calculated later, number 1 is set because variable cannot store floating point
        _burnFee = 1;
    }

    function setRemoveAllFee() external onlyOwner {
        if (_taxFee == 0 && _teamFee == 0) return;
        _taxFee = 0;
        _teamFee = 0;
        _charityFee = 0;
        _burnFee = 0;
    }

    function setRestoreAllFee() external onlyOwner {
        _taxFee = 2;
        _teamFee = 2;
        // 0.5% fee will be calculated later, number 1 is set because variable cannot store floating point
        _charityFee = 1;
        // 0.5% fee will be calculated later, number 1 is set because variable cannot store floating point
        _burnFee = 1;
    }
    
    function setFee(uint256 multiplier) private {
        if (multiplier == 0) {
            uint256 tfeeWhole = 3;
            _taxFee = tfeeWhole;
        }
        else if (multiplier == 1) {
            uint256 tfeeWhole = 6;
            _taxFee = tfeeWhole;

        }
        else if (multiplier == 2) {
            uint256 tfeeWhole = 17;
            _taxFee = tfeeWhole;

        }
        else if (multiplier == 3) {
            uint256 tfeeWhole = 24;
            _taxFee = tfeeWhole;

        }
    }

    function _approve(address owner, address spender, uint256 amount) private {
        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);
    }

    function _transfer(address from, address to, uint256 amount) private {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");
        require(amount > 0, "Transfer amount must be greater than zero");
        bool takeFee = false;

        if (from != owner() && to != owner()) {
            require(!bots[from] && !bots[to], "You are a bot!");
            
            // cooldown buy handler
            if (from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled) {
                require(tradingOpen, "Trading is not open!");
                require(amount <= _maxTxAmount, "Amount larger than max tx amount!");
                require(buycooldown[to] < block.timestamp, "Wait for buy cooldown!");
                buycooldown[to] = block.timestamp + (30 seconds);
                takeFee = true;
            }

            // sell handler
            if (!inSwap && to == uniswapV2Pair && from != address(uniswapV2Router) && swapEnabled) {
                require(amount <= balanceOf(uniswapV2Pair).mul(3).div(100) && amount <= _maxTxAmount, "Slippage is over 2.9% or over MaxTxAmount!");
                require(sellcooldown[from] < block.timestamp, "Wait for sell cooldown!");
                if(firstsell[from] + (1 days) < block.timestamp){
                    sellnumber[from] = 0;
                }
                if (sellnumber[from] == 0) {
                    firstsell[from] = block.timestamp;
                    sellcooldown[from] = block.timestamp + (1 hours);
                }
                else if (sellnumber[from] == 1) {
                    sellcooldown[from] = block.timestamp + (2 hours);
                }
                else if (sellnumber[from] == 2) {
                    sellcooldown[from] = block.timestamp + (6 hours);
                }
                else if (sellnumber[from] == 3) {
                    sellcooldown[from] = firstsell[from] + (1 days);
                }
                setFee(sellnumber[from]);
                sellnumber[from]++;
                takeFee = true;
            }

            // block transfer if sell cooldown
            if (to != uniswapV2Pair) {
               require(sellcooldown[from] < block.timestamp, "Wait for sell cooldown!"); 
            }
        }
        
        if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
            takeFee = false;
        }

        _tokenTransfer(from, to, amount, takeFee);
        restoreAllFee();
    }

    function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
        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);
    }

    function sendETHToFee(uint256 amount) private {
        _teamAddress.transfer(amount.div(2));
        _charityAddress.transfer(amount.div(2));
    }
    
    function openTrading() public onlyOwner {
        require(liquidityAdded);
        tradingOpen = true;
    }

    function addLiquidity() external onlyOwner() {
        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(_routerAddress);
        uniswapV2Router = _uniswapV2Router;
        _approve(address(this), address(uniswapV2Router), _tTotal);
        uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
        uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
        swapEnabled = true;
        cooldownEnabled = true;
        liquidityAdded = true;
        _maxTxAmount = 3000000000 * 10**9;
        IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type(uint256).max);
    }

    function manualswap() external onlyOwner {
        uint256 contractBalance = balanceOf(address(this));
        swapTokensForEth(contractBalance);
    }

    function manualsend() external onlyOwner {
        uint256 contractETHBalance = address(this).balance;
        sendETHToFee(contractETHBalance);
    }

    function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private {
        if (!takeFee) removeAllFee();
        _transferStandard(sender, recipient, amount);
        if (!takeFee) restoreAllFee();
    }

    function _transferStandard(address sender, address recipient, uint256 tAmount) private {
        // moved fuction above to reduce stack
        // _getValues //
            // _getTValues
            uint256 tFee = tAmount.mul(_taxFee).div(100);
            uint256 tTeam = tAmount.mul(_teamFee).div(100);
            // 0.5% fee by dividing by 200
            uint256 tCharity = tAmount.mul(_charityFee).div(200);
            uint256 tBurn = tAmount.mul(_burnFee).div(200);
            //
            uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam).sub(tCharity).sub(tBurn);
            // _getRValues
            uint256 currentRate = _getRate();
            uint256 rAmount = tAmount.mul(currentRate);
            uint256 rFee = tFee.mul(currentRate);
            uint256 rTeam = tTeam.mul(currentRate);
            uint256 rCharity = tCharity.mul(currentRate);
            uint256 rBurn = tBurn.mul(currentRate);
            uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam).sub(rCharity).sub(rBurn);
        //
        _calculateReflectTransfer(sender,recipient,rAmount,rTransferAmount);
        _takeTeam(tTeam);
        _takeCharity(tCharity);
        _takeBurn(tBurn);
        _reflectFee(rFee, tFee);
        emit Transfer(sender, recipient, tTransferAmount);
        emit Team(sender, _teamAddress, tTeam);
        emit Charity(sender, _charityAddress, tCharity);
        emit DistributedFee(sender, "Fee split between all holders!", tFee);
        emit Burn(sender, _burnAddress, tBurn);
    }

    function _takeTeam(uint256 tTeam) private {
        uint256 currentRate = _getRate();
        uint256 rTeam = tTeam.mul(currentRate);
        _rOwned[_teamAddress] = _rOwned[_teamAddress].add(rTeam);
    }
    // added charity
    function _takeCharity(uint256 tCharity) private {
        uint256 currentRate = _getRate();
        uint256 rCharity = tCharity.mul(currentRate);
        _rOwned[_charityAddress] = _rOwned[_charityAddress].add(rCharity);
    }
    // added burn
    function _takeBurn(uint256 tBurn) private {
        uint256 currentRate = _getRate();
        uint256 rBurn = tBurn.mul(currentRate);
        _rOwned[_burnAddress] = _rOwned[_burnAddress].add(rBurn);
    }

    function _reflectFee(uint256 rFee, uint256 tFee) private {
        _rTotal = _rTotal.sub(rFee);
        _tFeeTotal = _tFeeTotal.add(tFee);
    }

    // added to reduce stack
    function _calculateReflectTransfer(address sender, address recipient, uint256 rAmount, uint256 rTransferAmount) private {
        
       _rOwned[sender] = _rOwned[sender].sub(rAmount);
       _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); 
    }

    // allow contract to receive deposits
    receive() external payable {}

    function _getRate() private view returns (uint256) {
        (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
        return rSupply.div(tSupply);
    }

    function _getCurrentSupply() private view returns (uint256, uint256) {
        uint256 rSupply = _rTotal;
        uint256 tSupply = _tTotal;
        if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
        return (rSupply, tSupply);
    }

    function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() {
        require(maxTxPercent > 0, "Amount must be greater than 0");
        _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2);
        emit MaxTxAmountUpdated(_maxTxAmount);
    }
}

Read Contract

_burnAddress 0xbd3900c0 → address
_charityAddress 0x19a8ac9e → address
_isExcludedFromFee 0x768dc710 → bool
_maxTxAmount 0x7d1db4a5 → uint256
_routerAddress 0xd9e66460 → address
_teamAddress 0x8c97ca76 → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buycooldown 0x1283f1ca → uint256
cooldownEnabled 0xa985ceef → bool
decimals 0x313ce567 → uint8
firstsell 0x1bc8b18f → uint256
liquidityAdded 0xd9443923 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellcooldown 0x7a41865b → uint256
sellnumber 0x81dcc266 → uint256
swapEnabled 0x6ddd1713 → bool
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
tradingOpen 0xffb54a99 → bool

Write Contract 16 functions

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

addLiquidity 0xe8078d94
No parameters
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
manualsend 0x6fc3eaec
No parameters
manualswap 0xc3c8cd80
No parameters
openTrading 0xc9567bf9
No parameters
renounceOwnership 0x715018a6
No parameters
setCharityAddress 0x0c9be46d
address _address
setCooldownEnabled 0x5932ead1
bool onoff
setIsExcludedFromFee 0xef422a18
address _address
bool _isExcluded
setMaxTxPercent 0xd543dbeb
uint256 maxTxPercent
setRemoveAllFee 0x4a734812
No parameters
setRestoreAllFee 0xd13f9344
No parameters
setRouterAddress 0x41cb87fc
address _address
setTeamAddress 0x6690864e
address _address
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool

Recent Transactions

No transactions found for this address