Address Contract Partially Verified
Address
0x26864ffBA97238eD4757F2Cf2eeD93ef17cea75c
Balance
0 ETH
Nonce
1
Code Size
11102 bytes
Creator
0x84ABe186...9334 at tx 0x852a789f...a6339a
Last Active
Indexed Transactions
3 (24,308,232 → 24,314,006)
Gas Used (indexed)
141,669
Contract Bytecode
11102 bytes
0x60806040526004361061016a5760003560e01c806375f0a874116100d1578063a9059cbb1161008a578063bb85c6d111610064578063bb85c6d11461058b578063dd62ed3e146105c8578063f2fde38b14610605578063f345bd851461062e57610171565b8063a9059cbb146104e6578063aa4bde2814610523578063af8af6901461054e57610171565b806375f0a874146103c057806381bfdcca146103eb5780638c0b5e22146104285780638da5cb5b1461045357806395d89b411461047e578063a457c2d7146104a957610171565b80633950935111610123578063395093511461029c57806349bd5a5e146102d9578063527ffabd14610304578063677daa571461032f57806370a082311461036c578063715018a6146103a957610171565b806306fdde0314610176578063095ea7b3146101a15780631694505e146101de57806318160ddd1461020957806323b872dd14610234578063313ce5671461027157610171565b3661017157005b600080fd5b34801561018257600080fd5b5061018b610659565b6040516101989190611c41565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c39190611cfc565b6106eb565b6040516101d59190611d57565b60405180910390f35b3480156101ea57600080fd5b506101f361070e565b6040516102009190611dd1565b60405180910390f35b34801561021557600080fd5b5061021e610732565b60405161022b9190611dfb565b60405180910390f35b34801561024057600080fd5b5061025b60048036038101906102569190611e16565b61073c565b6040516102689190611d57565b60405180910390f35b34801561027d57600080fd5b5061028661076b565b6040516102939190611e85565b60405180910390f35b3480156102a857600080fd5b506102c360048036038101906102be9190611cfc565b610782565b6040516102d09190611d57565b60405180910390f35b3480156102e557600080fd5b506102ee6107b9565b6040516102fb9190611eaf565b60405180910390f35b34801561031057600080fd5b506103196107dd565b6040516103269190611dfb565b60405180910390f35b34801561033b57600080fd5b5061035660048036038101906103519190611eca565b6107e3565b6040516103639190611d57565b60405180910390f35b34801561037857600080fd5b50610393600480360381019061038e9190611ef7565b6107fd565b6040516103a09190611dfb565b60405180910390f35b3480156103b557600080fd5b506103be610845565b005b3480156103cc57600080fd5b506103d5610859565b6040516103e29190611eaf565b60405180910390f35b3480156103f757600080fd5b50610412600480360381019061040d9190611eca565b61087f565b60405161041f9190611d57565b60405180910390f35b34801561043457600080fd5b5061043d610899565b60405161044a9190611dfb565b60405180910390f35b34801561045f57600080fd5b5061046861089f565b6040516104759190611eaf565b60405180910390f35b34801561048a57600080fd5b506104936108c9565b6040516104a09190611c41565b60405180910390f35b3480156104b557600080fd5b506104d060048036038101906104cb9190611cfc565b61095b565b6040516104dd9190611d57565b60405180910390f35b3480156104f257600080fd5b5061050d60048036038101906105089190611cfc565b6109d2565b60405161051a9190611d57565b60405180910390f35b34801561052f57600080fd5b506105386109f5565b6040516105459190611dfb565b60405180910390f35b34801561055a57600080fd5b5061057560048036038101906105709190611f24565b6109fb565b6040516105829190611d57565b60405180910390f35b34801561059757600080fd5b506105b260048036038101906105ad9190611ef7565b610a6c565b6040516105bf9190611d57565b60405180910390f35b3480156105d457600080fd5b506105ef60048036038101906105ea9190611f64565b610ac0565b6040516105fc9190611dfb565b60405180910390f35b34801561061157600080fd5b5061062c60048036038101906106279190611ef7565b610b47565b005b34801561063a57600080fd5b50610643610bca565b6040516106509190611dfb565b60405180910390f35b60606003805461066890611fd3565b80601f016020809104026020016040519081016040528092919081815260200182805461069490611fd3565b80156106e15780601f106106b6576101008083540402835291602001916106e1565b820191906000526020600020905b8154815290600101906020018083116106c457829003601f168201915b5050505050905090565b6000806106f6610bd0565b9050610703818585610bd8565b600191505092915050565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6000600254905090565b600080610747610bd0565b9050610754858285610da1565b61075f858585610e2d565b60019150509392505050565b6000600860009054906101000a900460ff16905090565b60008061078d610bd0565b90506107ae81858561079f8589610ac0565b6107a99190612033565b610bd8565b600191505092915050565b7f000000000000000000000000494299ceda3fbc948a45a1bcf5dc6be5a12f437881565b600b5481565b60006107ed6113b5565b81600c8190555060019050919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61084d6113b5565b6108576000611433565b565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006108896113b5565b81600d8190555060019050919050565b600c5481565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546108d890611fd3565b80601f016020809104026020016040519081016040528092919081815260200182805461090490611fd3565b80156109515780601f1061092657610100808354040283529160200191610951565b820191906000526020600020905b81548152906001019060200180831161093457829003601f168201915b5050505050905090565b600080610966610bd0565b905060006109748286610ac0565b9050838110156109b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b0906120d9565b60405180910390fd5b6109c68286868403610bd8565b60019250505092915050565b6000806109dd610bd0565b90506109ea818585610e2d565b600191505092915050565b600d5481565b6000610a056113b5565b60648284610a139190612033565b1115610a54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4b9061216b565b60405180910390fd5b82600a8190555081600b819055506001905092915050565b6000610a766113b5565b81600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610b4f6113b5565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610bbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb5906121fd565b60405180910390fd5b610bc781611433565b50565b600a5481565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3e9061228f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610cb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cad90612321565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610d949190611dfb565b60405180910390a3505050565b6000610dad8484610ac0565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610e275781811015610e19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e109061238d565b60405180910390fd5b610e268484848403610bd8565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610e9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e939061241f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610f0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f02906124b1565b60405180910390fd5b80610f15846107fd565b1015610f56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4d90612543565b60405180910390fd5b7f000000000000000000000000494299ceda3fbc948a45a1bcf5dc6be5a12f437873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610ffb57507f000000000000000000000000494299ceda3fbc948a45a1bcf5dc6be5a12f437873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80156110145750601360009054906101000a900460ff16155b156113a4577f000000000000000000000000494299ceda3fbc948a45a1bcf5dc6be5a12f437873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461116b576000600f5461107a306107fd565b6110849190612563565b9050601154811061109b5761109a6011546114f9565b5b601254600f5410611169576110b16012546115ba565b601254600f60008282546110c59190612563565b925050819055506000600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050905080611167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115e906125e3565b60405180910390fd5b505b505b6000601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061120e5750601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561121b57819050611393565b600c54821115611260576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125790612675565b60405180910390fd5b7f000000000000000000000000494299ceda3fbc948a45a1bcf5dc6be5a12f437873ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361130c57600d546112bf846107fd565b836112ca9190612033565b111561130b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130290612707565b60405180910390fd5b5b60006064600b548461131e9190612727565b6113289190612798565b905060006064600a548561133c9190612727565b6113469190612798565b905080826113549190612033565b8461135f9190612563565b925081600f60008282546113739190612033565b925050819055506113908630838561138b9190612033565b61183a565b50505b61139e84848361183a565b506113b0565b6113af83838361183a565b5b505050565b6113bd610bd0565b73ffffffffffffffffffffffffffffffffffffffff166113db61089f565b73ffffffffffffffffffffffffffffffffffffffff1614611431576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142890612815565b60405180910390fd5b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001601360006101000a81548160ff02191690831515021790555060006002826115239190612798565b9050600081836115339190612563565b90506000479050611543836115ba565b600081476115519190612563565b905061155d8382611a9a565b7f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb56184828560405161159093929190612835565b60405180910390a1505050506000601360006101000a81548160ff02191690831515021790555050565b6001601360006101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156115f2576115f161286c565b5b6040519080825280602002602001820160405280156116205781602001602082028036833780820191505090505b50905030816000815181106116385761163761289b565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061170191906128df565b816001815181106117155761171461289b565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061177a307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84610bd8565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663791ac947836000843061012c426117c99190612033565b6040518663ffffffff1660e01b81526004016117e9959493929190612a05565b600060405180830381600087803b15801561180357600080fd5b505af1158015611817573d6000803e3d6000fd5b50505050506000601360006101000a81548160ff02191690831515021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036118a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118a09061241f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611918576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190f906124b1565b60405180910390fd5b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561199e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199590612543565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611a8c9190611dfb565b60405180910390a350505050565b6001601360006101000a81548160ff021916908315150217905550611ae0307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84610bd8565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663f305d719823085600080611b2a61089f565b426040518863ffffffff1660e01b8152600401611b4c96959493929190612a5f565b60606040518083038185885af1158015611b6a573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611b8f9190612ad5565b5050506000601360006101000a81548160ff0219169083151502179055505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611beb578082015181840152602081019050611bd0565b60008484015250505050565b6000601f19601f8301169050919050565b6000611c1382611bb1565b611c1d8185611bbc565b9350611c2d818560208601611bcd565b611c3681611bf7565b840191505092915050565b60006020820190508181036000830152611c5b8184611c08565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611c9382611c68565b9050919050565b611ca381611c88565b8114611cae57600080fd5b50565b600081359050611cc081611c9a565b92915050565b6000819050919050565b611cd981611cc6565b8114611ce457600080fd5b50565b600081359050611cf681611cd0565b92915050565b60008060408385031215611d1357611d12611c63565b5b6000611d2185828601611cb1565b9250506020611d3285828601611ce7565b9150509250929050565b60008115159050919050565b611d5181611d3c565b82525050565b6000602082019050611d6c6000830184611d48565b92915050565b6000819050919050565b6000611d97611d92611d8d84611c68565b611d72565b611c68565b9050919050565b6000611da982611d7c565b9050919050565b6000611dbb82611d9e565b9050919050565b611dcb81611db0565b82525050565b6000602082019050611de66000830184611dc2565b92915050565b611df581611cc6565b82525050565b6000602082019050611e106000830184611dec565b92915050565b600080600060608486031215611e2f57611e2e611c63565b5b6000611e3d86828701611cb1565b9350506020611e4e86828701611cb1565b9250506040611e5f86828701611ce7565b9150509250925092565b600060ff82169050919050565b611e7f81611e69565b82525050565b6000602082019050611e9a6000830184611e76565b92915050565b611ea981611c88565b82525050565b6000602082019050611ec46000830184611ea0565b92915050565b600060208284031215611ee057611edf611c63565b5b6000611eee84828501611ce7565b91505092915050565b600060208284031215611f0d57611f0c611c63565b5b6000611f1b84828501611cb1565b91505092915050565b60008060408385031215611f3b57611f3a611c63565b5b6000611f4985828601611ce7565b9250506020611f5a85828601611ce7565b9150509250929050565b60008060408385031215611f7b57611f7a611c63565b5b6000611f8985828601611cb1565b9250506020611f9a85828601611cb1565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611feb57607f821691505b602082108103611ffe57611ffd611fa4565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061203e82611cc6565b915061204983611cc6565b925082820190508082111561206157612060612004565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b60006120c3602583611bbc565b91506120ce82612067565b604082019050919050565b600060208201905081810360008301526120f2816120b6565b9050919050565b7f45524332303a20746f74616c20746178206d757374206e6f742062652067726560008201527f61746572207468616e2031303000000000000000000000000000000000000000602082015250565b6000612155602d83611bbc565b9150612160826120f9565b604082019050919050565b6000602082019050818103600083015261218481612148565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006121e7602683611bbc565b91506121f28261218b565b604082019050919050565b60006020820190508181036000830152612216816121da565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612279602483611bbc565b91506122848261221d565b604082019050919050565b600060208201905081810360008301526122a88161226c565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b600061230b602283611bbc565b9150612316826122af565b604082019050919050565b6000602082019050818103600083015261233a816122fe565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000612377601d83611bbc565b915061238282612341565b602082019050919050565b600060208201905081810360008301526123a68161236a565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612409602583611bbc565b9150612414826123ad565b604082019050919050565b60006020820190508181036000830152612438816123fc565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061249b602383611bbc565b91506124a68261243f565b604082019050919050565b600060208201905081810360008301526124ca8161248e565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b600061252d602683611bbc565b9150612538826124d1565b604082019050919050565b6000602082019050818103600083015261255c81612520565b9050919050565b600061256e82611cc6565b915061257983611cc6565b925082820390508181111561259157612590612004565b5b92915050565b7f4661696c656420746f2073656e64204554480000000000000000000000000000600082015250565b60006125cd601283611bbc565b91506125d882612597565b602082019050919050565b600060208201905081810360008301526125fc816125c0565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473207460008201527f6865206d6178207472616e73616374696f6e20616d6f756e7400000000000000602082015250565b600061265f603983611bbc565b915061266a82612603565b604082019050919050565b6000602082019050818103600083015261268e81612652565b9050919050565b7f45524332303a2062616c616e636520616d6f756e74206578636565646564206d60008201527f61782077616c6c657420616d6f756e74206c696d697400000000000000000000602082015250565b60006126f1603683611bbc565b91506126fc82612695565b604082019050919050565b60006020820190508181036000830152612720816126e4565b9050919050565b600061273282611cc6565b915061273d83611cc6565b925082820261274b81611cc6565b9150828204841483151761276257612761612004565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006127a382611cc6565b91506127ae83611cc6565b9250826127be576127bd612769565b5b828204905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006127ff602083611bbc565b915061280a826127c9565b602082019050919050565b6000602082019050818103600083015261282e816127f2565b9050919050565b600060608201905061284a6000830186611dec565b6128576020830185611dec565b6128646040830184611dec565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000815190506128d981611c9a565b92915050565b6000602082840312156128f5576128f4611c63565b5b6000612903848285016128ca565b91505092915050565b6000819050919050565b600061293161292c6129278461290c565b611d72565b611cc6565b9050919050565b61294181612916565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61297c81611c88565b82525050565b600061298e8383612973565b60208301905092915050565b6000602082019050919050565b60006129b282612947565b6129bc8185612952565b93506129c783612963565b8060005b838110156129f85781516129df8882612982565b97506129ea8361299a565b9250506001810190506129cb565b5085935050505092915050565b600060a082019050612a1a6000830188611dec565b612a276020830187612938565b8181036040830152612a3981866129a7565b9050612a486060830185611ea0565b612a556080830184611dec565b9695505050505050565b600060c082019050612a746000830189611ea0565b612a816020830188611dec565b612a8e6040830187612938565b612a9b6060830186612938565b612aa86080830185611ea0565b612ab560a0830184611dec565b979650505050505050565b600081519050612acf81611cd0565b92915050565b600080600060608486031215612aee57612aed611c63565b5b6000612afc86828701612ac0565b9350506020612b0d86828701612ac0565b9250506040612b1e86828701612ac0565b915050925092509256fea26469706673582212203e3d392d29c961f9d01d77cc2ed35cca14ea0afe55afc4934fdd9d9e8381d19064736f6c63430008110033
Verified Source Code Partial Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: No
DULUMI.sol 1174 lines
// DULUMI $DLM will bring you to the moon if you can seriously hold for long term!
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function setFeeTo(address) external;
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
function allPairs(uint256) external view returns (address pair);
function setFeeToSetter(address) external;
}
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(
address indexed sender,
uint256 amount0,
uint256 amount1,
address indexed to
);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (
uint112 reserve0,
uint112 reserve1,
uint32 blockTimestampLast
);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to)
external
returns (uint256 amount0, uint256 amount1);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
/**
* @dev Returns the 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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
}
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
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 {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() external view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() external view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account)
public
view
virtual
override
returns (uint256)
{
return _balances[account];
}
/**
* @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() external view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount)
external
virtual
override
returns (bool)
{
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount)
external
virtual
override
returns (bool)
{
address owner = _msgSender();
_approve(owner, 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}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
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)
external
virtual
returns (bool)
{
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
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)
external
virtual
returns (bool)
{
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += 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");
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= 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 Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(
currentAllowance >= amount,
"ERC20: insufficient allowance"
);
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
uint256 fromBalance = _balances[from];
require(
fromBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
}
}
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract DULUMI is ERC20, Ownable {
// TOKENOMICS START ==========================================================>
string private _name = "DULUMI";
string private _symbol = "DLM";
uint8 private _decimals = 18;
uint256 private _supply = 10000000;
uint256 public taxForLiquidity = 1;
uint256 public taxForMarketing = 2;
uint256 public maxTxAmount = 150000 * 10**_decimals;
uint256 public maxWalletAmount = 150000 * 10**_decimals;
address public marketingWallet = 0xB2Ef6a4c925a0153c92092539B4542C2eadC0aad;
// TOKENOMICS END ============================================================>
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
uint256 private _marketingReserves = 0;
mapping(address => bool) private _isExcludedFromFee;
uint256 private _numTokensSellToAddToLiquidity = 25000 * 10**_decimals;
uint256 private _numTokensSellToAddToETH = 10000 * 10**_decimals;
bool inSwapAndLiquify;
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap() {
inSwapAndLiquify = true;
_;
inSwapAndLiquify = false;
}
/**
* @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() ERC20(_name, _symbol) {
_mint(msg.sender, (_supply * 10**_decimals));
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
);
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
uniswapV2Router = _uniswapV2Router;
_isExcludedFromFee[address(uniswapV2Router)] = true;
_isExcludedFromFee[msg.sender] = true;
_isExcludedFromFee[marketingWallet] = true;
}
/**
* @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 override returns (uint8) {
return _decimals;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
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(
balanceOf(from) >= amount,
"ERC20: transfer amount exceeds balance"
);
if (
(from == uniswapV2Pair || to == uniswapV2Pair) && !inSwapAndLiquify
) {
if (from != uniswapV2Pair) {
uint256 contractLiquidityBalance = balanceOf(address(this)) -
_marketingReserves;
if (
contractLiquidityBalance >= _numTokensSellToAddToLiquidity
) {
_swapAndLiquify(_numTokensSellToAddToLiquidity);
}
if ((_marketingReserves) >= _numTokensSellToAddToETH) {
_swapTokensForEth(_numTokensSellToAddToETH);
_marketingReserves -= _numTokensSellToAddToETH;
bool sent = payable(marketingWallet).send(
address(this).balance
);
require(sent, "Failed to send ETH");
}
}
uint256 transferAmount;
if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
transferAmount = amount;
} else {
require(
amount <= maxTxAmount,
"ERC20: transfer amount exceeds the max transaction amount"
);
if (from == uniswapV2Pair) {
require(
(amount + balanceOf(to)) <= maxWalletAmount,
"ERC20: balance amount exceeded max wallet amount limit"
);
}
uint256 marketingShare = ((amount * taxForMarketing) / 100);
uint256 liquidityShare = ((amount * taxForLiquidity) / 100);
transferAmount = amount - (marketingShare + liquidityShare);
_marketingReserves += marketingShare;
super._transfer(
from,
address(this),
(marketingShare + liquidityShare)
);
}
super._transfer(from, to, transferAmount);
} else {
super._transfer(from, to, amount);
}
}
function _swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
uint256 half = (contractTokenBalance / 2);
uint256 otherHalf = (contractTokenBalance - half);
uint256 initialBalance = address(this).balance;
_swapTokensForEth(half);
uint256 newBalance = (address(this).balance - initialBalance);
_addLiquidity(otherHalf, newBalance);
emit SwapAndLiquify(half, newBalance, otherHalf);
}
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 + 300)
);
}
function _addLiquidity(uint256 tokenAmount, uint256 ethAmount)
private
lockTheSwap
{
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0,
0,
owner(),
block.timestamp
);
}
function changeTaxForLiquidityAndMarketing(
uint256 _taxForLiquidity,
uint256 _taxForMarketing
) public onlyOwner returns (bool) {
require(
(_taxForLiquidity + _taxForMarketing) <= 100,
"ERC20: total tax must not be greater than 100"
);
taxForLiquidity = _taxForLiquidity;
taxForMarketing = _taxForMarketing;
return true;
}
function changeMarketingWallet(address newWallet)
public
onlyOwner
returns (bool)
{
marketingWallet = newWallet;
return true;
}
function changeMaxTxAmount(uint256 _maxTxAmount)
public
onlyOwner
returns (bool)
{
maxTxAmount = _maxTxAmount;
return true;
}
function changeMaxWalletAmount(uint256 _maxWalletAmount)
public
onlyOwner
returns (bool)
{
maxWalletAmount = _maxWalletAmount;
return true;
}
receive() external payable {}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
marketingWallet 0x75f0a874 → address
maxTxAmount 0x8c0b5e22 → uint256
maxWalletAmount 0xaa4bde28 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
taxForLiquidity 0xf345bd85 → uint256
taxForMarketing 0x527ffabd → uint256
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 11 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
changeMarketingWallet 0xbb85c6d1
address newWallet
returns: bool
changeMaxTxAmount 0x677daa57
uint256 _maxTxAmount
returns: bool
changeMaxWalletAmount 0x81bfdcca
uint256 _maxWalletAmount
returns: bool
changeTaxForLiquidityAndMarketing 0xaf8af690
uint256 _taxForLiquidity
uint256 _taxForMarketing
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Top Interactions
| Address | Txns | Sent | Received |
|---|---|---|---|
| 0xb6007a21...b0Be | 1 | 1 | |
| 0x42AD5aAA...4456 | 1 | 1 | |
| 0xf8EfD62b...6B2A | 1 | 1 |
Recent Transactions
|
| Hash | Block | Age | From/To | Value | |
|---|---|---|---|---|---|
| 0xd2bb8afc...d93c6b | 24,314,006 | IN | 0x42AD5aAA...4456 | 0 ETH | |
| 0x85229e45...ccbf00 | 24,314,006 | IN | 0xf8EfD62b...6B2A | 0 ETH | |
| 0x8fab5a1d...126af3 | 24,308,232 | IN | 0xb6007a21...b0Be | 0 ETH |