Forkchoice Ethereum Mainnet

Address Contract Partially Verified

Address 0xcD3608a617cdC1f51Fb6e8D27765aAE22D537F86
Balance 0 ETH
Nonce 1
Code Size 15677 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

15677 bytes
0x60806040526004361061021e5760003560e01c806382af6e8911610123578063ac5cad56116100ab578063dc1052e21161006f578063dc1052e2146107e0578063dd62ed3e14610809578063e799ffb114610846578063f2fde38b1461085d578063f6d7eade1461088657610225565b8063ac5cad56146106fd578063b62496f514610726578063b98b677f14610763578063c02466681461078c578063cc1776d3146107b557610225565b80638ea5220f116100f25780638ea5220f1461060457806395d89b411461062f578063a457c2d71461065a578063a7f7b36f14610697578063a9059cbb146106c057610225565b806382af6e891461055c57806386917524146105855780638cd09d50146105b05780638da5cb5b146105d957610225565b80634647283d116101a65780635d098b38116101755780635d098b381461048b5780636402511e146104b457806370a08231146104dd578063715018a61461051a57806375f0a8741461053157610225565b80634647283d146103e15780634f7041a51461040c5780634fbee1931461043757806351bc3c851461047457610225565b806323b872dd116101ed57806323b872dd146102e657806326991cc814610323578063313ce5671461034e57806339509351146103795780633d907840146103b657610225565b806306fdde031461022a578063095ea7b31461025557806318160ddd146102925780631f53ac02146102bd57610225565b3661022557005b600080fd5b34801561023657600080fd5b5061023f6108b1565b60405161024c9190612bca565b60405180910390f35b34801561026157600080fd5b5061027c60048036038101906102779190612c85565b610943565b6040516102899190612ce0565b60405180910390f35b34801561029e57600080fd5b506102a7610966565b6040516102b49190612d0a565b60405180910390f35b3480156102c957600080fd5b506102e460048036038101906102df9190612d63565b610970565b005b3480156102f257600080fd5b5061030d60048036038101906103089190612d90565b610b14565b60405161031a9190612ce0565b60405180910390f35b34801561032f57600080fd5b50610338610b43565b6040516103459190612df2565b60405180910390f35b34801561035a57600080fd5b50610363610b69565b6040516103709190612e29565b60405180910390f35b34801561038557600080fd5b506103a0600480360381019061039b9190612c85565b610b72565b6040516103ad9190612ce0565b60405180910390f35b3480156103c257600080fd5b506103cb610ba9565b6040516103d89190612d0a565b60405180910390f35b3480156103ed57600080fd5b506103f6610baf565b6040516104039190612d0a565b60405180910390f35b34801561041857600080fd5b50610421610bb5565b60405161042e9190612d0a565b60405180910390f35b34801561044357600080fd5b5061045e60048036038101906104599190612e44565b610bbb565b60405161046b9190612ce0565b60405180910390f35b34801561048057600080fd5b50610489610c11565b005b34801561049757600080fd5b506104b260048036038101906104ad9190612d63565b610f7d565b005b3480156104c057600080fd5b506104db60048036038101906104d69190612e71565b611121565b005b3480156104e957600080fd5b5061050460048036038101906104ff9190612e44565b611133565b6040516105119190612d0a565b60405180910390f35b34801561052657600080fd5b5061052f61117c565b005b34801561053d57600080fd5b50610546611190565b6040516105539190612ead565b60405180910390f35b34801561056857600080fd5b50610583600480360381019061057e9190612ec8565b6111b6565b005b34801561059157600080fd5b5061059a61121e565b6040516105a79190612d0a565b60405180910390f35b3480156105bc57600080fd5b506105d760048036038101906105d29190612e71565b611224565b005b3480156105e557600080fd5b506105ee61127b565b6040516105fb9190612df2565b60405180910390f35b34801561061057600080fd5b506106196112a4565b6040516106269190612ead565b60405180910390f35b34801561063b57600080fd5b506106446112ca565b6040516106519190612bca565b60405180910390f35b34801561066657600080fd5b50610681600480360381019061067c9190612c85565b61135c565b60405161068e9190612ce0565b60405180910390f35b3480156106a357600080fd5b506106be60048036038101906106b99190612f34565b6113d3565b005b3480156106cc57600080fd5b506106e760048036038101906106e29190612c85565b61150f565b6040516106f49190612ce0565b60405180910390f35b34801561070957600080fd5b50610724600480360381019061071f9190612e44565b611532565b005b34801561073257600080fd5b5061074d60048036038101906107489190612e44565b611635565b60405161075a9190612ce0565b60405180910390f35b34801561076f57600080fd5b5061078a60048036038101906107859190612e44565b611655565b005b34801561079857600080fd5b506107b360048036038101906107ae9190612f34565b611bb8565b005b3480156107c157600080fd5b506107ca611cfc565b6040516107d79190612d0a565b60405180910390f35b3480156107ec57600080fd5b5061080760048036038101906108029190612e71565b611d02565b005b34801561081557600080fd5b50610830600480360381019061082b9190612f74565b611d59565b60405161083d9190612d0a565b60405180910390f35b34801561085257600080fd5b5061085b611de0565b005b34801561086957600080fd5b50610884600480360381019061087f9190612e44565b611e31565b005b34801561089257600080fd5b5061089b611eb5565b6040516108a89190613013565b60405180910390f35b6060600480546108c09061305d565b80601f01602080910402602001604051908101604052809291908181526020018280546108ec9061305d565b80156109395780601f1061090e57610100808354040283529160200191610939565b820191906000526020600020905b81548152906001019060200180831161091c57829003601f168201915b5050505050905090565b60008061094e611edb565b905061095b818585611ee3565b600191505092915050565b6000600354905090565b6109786120ae565b600160116000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905515610a2457610a23600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000611bb8565b5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600060116000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905515610b1157610b10600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166001611bb8565b5b50565b600080610b1f611edb565b9050610b2c85828561212c565b610b378585856121b8565b60019150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006012905090565b600080610b7d611edb565b9050610b9e818585610b8f8589611d59565b610b9991906130be565b611ee3565b600191505092915050565b60095481565b600a5481565b60075481565b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b610c196120ae565b6000610c2430611133565b90506000600267ffffffffffffffff811115610c4357610c42613114565b5b604051908082528060200260200182016040528015610c715781602001602082028036833780820191505090505b5090503081600081518110610c8957610c88613143565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d549190613187565b81600181518110610d6857610d67613143565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401610e069594939291906132ad565b600060405180830381600087803b158015610e2057600080fd5b505af1925050508015610e31575060015b610e70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6790613353565b60405180910390fd5b6000600a541115610f045760006064600a5447610e8d9190613373565b610e9791906133fc565b9050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610f01573d6000803e3d6000fd5b50505b60006009541115610f7957600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610f77573d6000803e3d6000fd5b505b5050565b610f856120ae565b600160116000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790551561103157611030600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000611bb8565b5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600060116000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790551561111e5761111d600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166001611bb8565b5b50565b6111296120ae565b80600b8190555050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6111846120ae565b61118e6000612445565b565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6111be6120ae565b8160098190555080600a81905550606481836111da91906130be565b1461121a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121190613479565b60405180910390fd5b5050565b600b5481565b61122c6120ae565b806008819055506107d0811115611278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126f906134e5565b60405180910390fd5b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600580546112d99061305d565b80601f01602080910402602001604051908101604052809291908181526020018280546113059061305d565b80156113525780601f1061132757610100808354040283529160200191611352565b820191906000526020600020905b81548152906001019060200180831161133557829003601f168201915b5050505050905090565b600080611367611edb565b905060006113758286611d59565b9050838110156113ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b190613577565b60405180910390fd5b6113c78286868403611ee3565b60019250505092915050565b6113db6120ae565b801515601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561146e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146590613609565b60405180910390fd5b80601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab60405160405180910390a35050565b60008061151a611edb565b90506115278185856121b8565b600191505092915050565b61153a6120ae565b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016115909190612df2565b602060405180830381865afa1580156115ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d1919061363e565b6040518363ffffffff1660e01b81526004016115ee92919061366b565b6020604051808303816000875af115801561160d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163191906136a9565b5050565b60106020528060005260406000206000915054906101000a900460ff1681565b61165d6120ae565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156116ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e590613748565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561179e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c29190613187565b73ffffffffffffffffffffffffffffffffffffffff1663e6a4390530600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561184b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186f9190613187565b6040518363ffffffff1660e01b815260040161188c929190613768565b602060405180830381865afa1580156118a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118cd9190613187565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611aa557600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611971573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119959190613187565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a429190613187565b6040518363ffffffff1660e01b8152600401611a5f929190613768565b6020604051808303816000875af1158015611a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa29190613187565b90505b60011515601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514158015611b335750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b15611b4457611b438160016113d3565b5b611b7330600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600019611ee3565b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b611bc06120ae565b801515601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415611c53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4a90613803565b60405180910390fd5b80601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df782604051611cf09190612ce0565b60405180910390a25050565b60085481565b611d0a6120ae565b806007819055506107d0811115611d56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4d9061386f565b60405180910390fd5b50565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611de86120ae565b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611e2e573d6000803e3d6000fd5b50565b611e396120ae565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611ea9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ea090613901565b60405180910390fd5b611eb281612445565b50565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611f53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4a90613993565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611fc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fba90613a25565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516120a19190612d0a565b60405180910390a3505050565b6120b6611edb565b73ffffffffffffffffffffffffffffffffffffffff166120d461127b565b73ffffffffffffffffffffffffffffffffffffffff161461212a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161212190613a91565b60405180910390fd5b565b60006121388484611d59565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146121b257818110156121a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219b90613afd565b60405180910390fd5b6121b18484848403611ee3565b5b50505050565b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561225c5750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561243557601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806123025750601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561243457600b5461231330611133565b11801561232d5750601260009054906101000a900460ff16155b80156123825750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156123905761238f612509565b5b6000601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166123eb576007546123ef565b6008545b9050600061271082846124029190613373565b61240c91906133fc565b90506000811115612431576124228530836128a3565b808361242e9190613b1d565b92505b50505b5b6124408383836128a3565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001601260006101000a81548160ff021916908315150217905550600061252f30611133565b90506000600267ffffffffffffffff81111561254e5761254d613114565b5b60405190808252806020026020018201604052801561257c5781602001602082028036833780820191505090505b509050308160008151811061259457612593613143565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561263b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265f9190613187565b8160018151811061267357612672613143565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016127119594939291906132ad565b600060405180830381600087803b15801561272b57600080fd5b505af192505050801561273c575060015b61277b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161277290613353565b60405180910390fd5b6000600a54111561280f5760006064600a54476127989190613373565b6127a291906133fc565b9050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561280c573d6000803e3d6000fd5b50505b6000600954111561288457600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015612882573d6000803e3d6000fd5b505b50506000601260006101000a81548160ff021916908315150217905550565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612913576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161290a90613bc3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161297a90613c55565b60405180910390fd5b61298e838383612b27565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612a15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a0c90613ce7565b60405180910390fd5b818103600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612aaa91906130be565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612b0e9190612d0a565b60405180910390a3612b21848484612b2c565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612b6b578082015181840152602081019050612b50565b83811115612b7a576000848401525b50505050565b6000601f19601f8301169050919050565b6000612b9c82612b31565b612ba68185612b3c565b9350612bb6818560208601612b4d565b612bbf81612b80565b840191505092915050565b60006020820190508181036000830152612be48184612b91565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612c1c82612bf1565b9050919050565b612c2c81612c11565b8114612c3757600080fd5b50565b600081359050612c4981612c23565b92915050565b6000819050919050565b612c6281612c4f565b8114612c6d57600080fd5b50565b600081359050612c7f81612c59565b92915050565b60008060408385031215612c9c57612c9b612bec565b5b6000612caa85828601612c3a565b9250506020612cbb85828601612c70565b9150509250929050565b60008115159050919050565b612cda81612cc5565b82525050565b6000602082019050612cf56000830184612cd1565b92915050565b612d0481612c4f565b82525050565b6000602082019050612d1f6000830184612cfb565b92915050565b6000612d3082612bf1565b9050919050565b612d4081612d25565b8114612d4b57600080fd5b50565b600081359050612d5d81612d37565b92915050565b600060208284031215612d7957612d78612bec565b5b6000612d8784828501612d4e565b91505092915050565b600080600060608486031215612da957612da8612bec565b5b6000612db786828701612c3a565b9350506020612dc886828701612c3a565b9250506040612dd986828701612c70565b9150509250925092565b612dec81612c11565b82525050565b6000602082019050612e076000830184612de3565b92915050565b600060ff82169050919050565b612e2381612e0d565b82525050565b6000602082019050612e3e6000830184612e1a565b92915050565b600060208284031215612e5a57612e59612bec565b5b6000612e6884828501612c3a565b91505092915050565b600060208284031215612e8757612e86612bec565b5b6000612e9584828501612c70565b91505092915050565b612ea781612d25565b82525050565b6000602082019050612ec26000830184612e9e565b92915050565b60008060408385031215612edf57612ede612bec565b5b6000612eed85828601612c70565b9250506020612efe85828601612c70565b9150509250929050565b612f1181612cc5565b8114612f1c57600080fd5b50565b600081359050612f2e81612f08565b92915050565b60008060408385031215612f4b57612f4a612bec565b5b6000612f5985828601612c3a565b9250506020612f6a85828601612f1f565b9150509250929050565b60008060408385031215612f8b57612f8a612bec565b5b6000612f9985828601612c3a565b9250506020612faa85828601612c3a565b9150509250929050565b6000819050919050565b6000612fd9612fd4612fcf84612bf1565b612fb4565b612bf1565b9050919050565b6000612feb82612fbe565b9050919050565b6000612ffd82612fe0565b9050919050565b61300d81612ff2565b82525050565b60006020820190506130286000830184613004565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061307557607f821691505b602082108114156130895761308861302e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006130c982612c4f565b91506130d483612c4f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131095761310861308f565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008151905061318181612c23565b92915050565b60006020828403121561319d5761319c612bec565b5b60006131ab84828501613172565b91505092915050565b6000819050919050565b60006131d96131d46131cf846131b4565b612fb4565b612c4f565b9050919050565b6131e9816131be565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61322481612c11565b82525050565b6000613236838361321b565b60208301905092915050565b6000602082019050919050565b600061325a826131ef565b61326481856131fa565b935061326f8361320b565b8060005b838110156132a0578151613287888261322a565b975061329283613242565b925050600181019050613273565b5085935050505092915050565b600060a0820190506132c26000830188612cfb565b6132cf60208301876131e0565b81810360408301526132e1818661324f565b90506132f06060830185612de3565b6132fd6080830184612cfb565b9695505050505050565b7f4661696c656420746f207377617020746f206574680000000000000000000000600082015250565b600061333d601583612b3c565b915061334882613307565b602082019050919050565b6000602082019050818103600083015261336c81613330565b9050919050565b600061337e82612c4f565b915061338983612c4f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133c2576133c161308f565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061340782612c4f565b915061341283612c4f565b925082613422576134216133cd565b5b828204905092915050565b7f53706c697420636f6d62696e6174696f6e206d75737420657175616c20313030600082015250565b6000613463602083612b3c565b915061346e8261342d565b602082019050919050565b6000602082019050818103600083015261349281613456565b9050919050565b7f546f74616c4665652063616e6e6f742065786365656420323030300000000000600082015250565b60006134cf601b83612b3c565b91506134da82613499565b602082019050919050565b600060208201905081810360008301526134fe816134c2565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000613561602583612b3c565b915061356c82613505565b604082019050919050565b6000602082019050818103600083015261359081613554565b9050919050565b7f4175746f6d61746564206d61726b6574206d616b65722070616972206973206160008201527f6c72656164792073657420746f20746861742076616c75650000000000000000602082015250565b60006135f3603883612b3c565b91506135fe82613597565b604082019050919050565b60006020820190508181036000830152613622816135e6565b9050919050565b60008151905061363881612c59565b92915050565b60006020828403121561365457613653612bec565b5b600061366284828501613629565b91505092915050565b60006040820190506136806000830185612de3565b61368d6020830184612cfb565b9392505050565b6000815190506136a381612f08565b92915050565b6000602082840312156136bf576136be612bec565b5b60006136cd84828501613694565b91505092915050565b7f54686520726f7574657220616c7265616479206861732074686174206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613732602383612b3c565b915061373d826136d6565b604082019050919050565b6000602082019050818103600083015261376181613725565b9050919050565b600060408201905061377d6000830185612de3565b61378a6020830184612de3565b9392505050565b7f4163636f756e7420697320616c7265616479207468652076616c7565206f662060008201527f276578636c756465642700000000000000000000000000000000000000000000602082015250565b60006137ed602a83612b3c565b91506137f882613791565b604082019050919050565b6000602082019050818103600083015261381c816137e0565b9050919050565b7f43616e6e6f742065786365656420323030300000000000000000000000000000600082015250565b6000613859601283612b3c565b915061386482613823565b602082019050919050565b600060208201905081810360008301526138888161384c565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006138eb602683612b3c565b91506138f68261388f565b604082019050919050565b6000602082019050818103600083015261391a816138de565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061397d602483612b3c565b915061398882613921565b604082019050919050565b600060208201905081810360008301526139ac81613970565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613a0f602283612b3c565b9150613a1a826139b3565b604082019050919050565b60006020820190508181036000830152613a3e81613a02565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613a7b602083612b3c565b9150613a8682613a45565b602082019050919050565b60006020820190508181036000830152613aaa81613a6e565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000613ae7601d83612b3c565b9150613af282613ab1565b602082019050919050565b60006020820190508181036000830152613b1681613ada565b9050919050565b6000613b2882612c4f565b9150613b3383612c4f565b925082821015613b4657613b4561308f565b5b828203905092915050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613bad602583612b3c565b9150613bb882613b51565b604082019050919050565b60006020820190508181036000830152613bdc81613ba0565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613c3f602383612b3c565b9150613c4a82613be3565b604082019050919050565b60006020820190508181036000830152613c6e81613c32565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000613cd1602683612b3c565b9150613cdc82613c75565b604082019050919050565b60006020820190508181036000830152613d0081613cc4565b905091905056fea2646970667358221220c840199f0d5f626e10fdc016b4f20858c96f6504c7fea9166190cbf734f972e464736f6c634300080b0033

Verified Source Code Partial Match

Compiler: v0.8.11+commit.d7f03943 EVM: london Optimization: No
MainToken.sol 859 lines
// safu 


/////    $$$$$$\  $$\   $$\ $$$$$$\ $$$$$$$\  $$\    $$\  $$$$$$\  $$$$$$$\  $$$$$$$$\ $$$$$$$\  
//      $$  __$$\ $$ |  $$ |\_$$  _|$$  __$$\ $$ |   $$ |$$  __$$\ $$  __$$\ $$  _____|$$  __$$\ 
//      $$ /  \__|$$ |  $$ |  $$ |  $$ |  $$ |$$ |   $$ |$$ /  $$ |$$ |  $$ |$$ |      $$ |  $$ |
//      \$$$$$$\  $$$$$$$$ |  $$ |  $$$$$$$\ |\$$\  $$  |$$$$$$$$ |$$ |  $$ |$$$$$\    $$$$$$$  |
//       \____$$\ $$  __$$ |  $$ |  $$  __$$\  \$$\$$  / $$  __$$ |$$ |  $$ |$$  __|   $$  __$$< 
//      $$\   $$ |$$ |  $$ |  $$ |  $$ |  $$ |  \$$$  /  $$ |  $$ |$$ |  $$ |$$ |      $$ |  $$ |
//      \$$$$$$  |$$ |  $$ |$$$$$$\ $$$$$$$  |   \$  /   $$ |  $$ |$$$$$$$  |$$$$$$$$\ $$ |  $$ |
//       \______/ \__|  \__|\______|\_______/     \_/    \__|  \__|\_______/ \________|\__|  \__|
                                                                                               
// safu



// SPDX-License-Identifier: UNLICENSED

// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @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 symbol of the token.
     */
    function symbol() external view returns (string memory);

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

// File: @openzeppelin/contracts/utils/Context.sol


// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol


// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;




/**
 * @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.zeppelin.solutions/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;

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * 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) public 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
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

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

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        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 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 virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(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);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// File: @openzeppelin/contracts/access/Ownable.sol


// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;


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


pragma solidity ^0.8.0;

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

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
}

interface IFactory {
    function createPair(address tokenA, address tokenB) external returns (address pair);
    function getPair(address tokenA, address tokenB) external view returns (address pair);
}

contract MainToken is Ownable, ERC20 {
       
    IRouter public Router;
    
    uint256 public buyTax;
    uint256 public sellTax;
    uint256 public devSplit;
    uint256 public marketingSplit;
    uint256 public swapAtAmount;

    address payable public devWallet;
    address payable public  marketingWallet;
    address public swapPair;
    address dead = 0x000000000000000000000000000000000000dEaD;

    mapping (address => bool) public automatedMarketMakerPairs;
    mapping (address => bool) private _isExcludedFromFees;
    
    
    constructor(
        string memory _name, 
        string memory _symbol,
        uint256 _buyTax,
        uint256 _sellTax,
        uint256 _devSplit,
        uint256 _marketingSplit,
        address _router,
        address _MarketingWallet, 
        address _devWallet, 
        uint256 initialSupply, 
        address realOwner
        )  ERC20(_name, _symbol) {

        marketingWallet = payable(_MarketingWallet);
        devWallet = payable(_devWallet);

        setBuyTax(_buyTax);
        setSellTax(_sellTax);
        setTaxSplit(_devSplit, _marketingSplit);

       excludeFromFees(realOwner, true);
       excludeFromFees(address(this), true);
       _mint(realOwner, initialSupply * (10**18));
       swapAtAmount = totalSupply() * 10 / 1000000;  // .01% 
       updateSwapRouter(_router);
       transferOwnership(realOwner);
    }
   
     event ExcludeFromFees(address indexed account, bool isExcluded);
     event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);

    function setBuyTax(uint256 _newBuyTax) public onlyOwner {
      buyTax = _newBuyTax;
      require(_newBuyTax <= 2000, "Cannot exceed 2000");
    }
    
    function setSellTax(uint256 _newSellTax) public onlyOwner {
      sellTax = _newSellTax;
      require(_newSellTax <= 2000, "TotalFee cannot exceed 2000");
    }
    function setTaxSplit(uint256 _devSplit, uint256 _marketingSplit) public onlyOwner {
        devSplit = _devSplit;
        marketingSplit = _marketingSplit;
        require(_devSplit + _marketingSplit == 100, "Split combination must equal 100");
    }

    function setMarketingWallet(address payable newMarketingWallet) public onlyOwner {
         if (_isExcludedFromFees[marketingWallet] = true)
            excludeFromFees(marketingWallet, false);

        marketingWallet = newMarketingWallet;

         if (_isExcludedFromFees[marketingWallet] = false)
            excludeFromFees(marketingWallet, true);
    }

    function setDevWallet(address payable newDevWallet) public onlyOwner {
         if (_isExcludedFromFees[devWallet] = true)
            excludeFromFees(devWallet, false);

        devWallet = newDevWallet;

         if (_isExcludedFromFees[devWallet] = false)
            excludeFromFees(devWallet, true);
    }

    function excludeFromFees(address account, bool excluded) public onlyOwner {
        require(_isExcludedFromFees[account] != excluded, "Account is already the value of 'excluded'");
        _isExcludedFromFees[account] = excluded;

        emit ExcludeFromFees(account, excluded);
    }
    
    function _setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
        require(automatedMarketMakerPairs[pair] != value, "Automated market maker pair is already set to that value");
        automatedMarketMakerPairs[pair] = value;
        emit SetAutomatedMarketMakerPair(pair, value);
    }
   
    function updateSwapRouter(address newAddress) public onlyOwner {
        require(newAddress != address(Router), "The router already has that address");
        Router = IRouter(newAddress);
        address bnbPair = IFactory(Router.factory())
            .getPair(address(this), Router.WETH());

        if(bnbPair == address(0))
            bnbPair = IFactory(Router.factory()).createPair(address(this), Router.WETH());

        if (automatedMarketMakerPairs[bnbPair] != true && bnbPair != address(0) ){
            _setAutomatedMarketMakerPair(bnbPair, true);
        }
          _approve(address(this), address(Router), ~uint256(0));
            
        swapPair = bnbPair;
    }
    
    function isExcludedFromFees(address account) public view returns(bool) {
        return _isExcludedFromFees[account];
    }

    function setSwapAtAmount(uint256 _newSwapAtAmount) external onlyOwner {
        swapAtAmount = _newSwapAtAmount;
    }

    bool private inSwapAndLiquify;
    modifier lockTheSwap {
        inSwapAndLiquify = true;
        _;
        inSwapAndLiquify = false;
    }
    
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal override {
          
        // if any account belongs to _isExcludedFromFee account then remove the fee
        if(!_isExcludedFromFees[from] && !_isExcludedFromFees[to]) {
            if(automatedMarketMakerPairs[to] || automatedMarketMakerPairs[from]) {
                if (balanceOf(address(this)) > swapAtAmount && !inSwapAndLiquify && automatedMarketMakerPairs[to]) SwapFees();
                uint256 currentFee = automatedMarketMakerPairs[to] ? sellTax : buyTax;
                uint256 extraFee =(amount * currentFee)/10000;
                if (extraFee > 0) {
                    super._transfer(from, address(this), extraFee);
                    amount = amount - extraFee;
                }   
            }     
        }
      super._transfer(from, to, amount);     
   }

    function SwapFees() private lockTheSwap {
        uint256 toSwap = balanceOf(address(this));
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = Router.WETH();

        try Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            toSwap,
            0,
            path,
            address(this),
            block.timestamp
        ) {} catch { revert("Failed to swap to eth");}

  
        if(marketingSplit > 0) {
            uint256 mAmount = (address(this).balance * marketingSplit) / 100;
            payable(marketingWallet).transfer(mAmount);
        }
        if(devSplit > 0) payable(devWallet).transfer(address(this).balance);
                    
    }

    function manualSwap() external onlyOwner {
    
        uint256 toSwap = balanceOf(address(this));
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = Router.WETH();

        try Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            toSwap,
            0,
            path,
            address(this),
            block.timestamp
        ) {} catch { revert("Failed to swap to eth");}

  
        if(marketingSplit > 0) {
            uint256 mAmount = (address(this).balance * marketingSplit) / 100;
            payable(marketingWallet).transfer(mAmount);
        }
        if(devSplit > 0) payable(devWallet).transfer(address(this).balance);
    }

        function withdawlBNB() external onlyOwner {
            payable(msg.sender).transfer(address(this).balance);
        }

        function withdrawlToken(address _tokenAddress) external onlyOwner {
            ERC20(_tokenAddress).transfer(msg.sender, ERC20(_tokenAddress).balanceOf(address(this)));
        }   
 

    // to receive Eth From Router when Swapping
    receive() external payable {}
    
}

Read Contract

Router 0xf6d7eade → address
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
buyTax 0x4f7041a5 → uint256
decimals 0x313ce567 → uint8
devSplit 0x3d907840 → uint256
devWallet 0x8ea5220f → address
isExcludedFromFees 0x4fbee193 → bool
marketingSplit 0x4647283d → uint256
marketingWallet 0x75f0a874 → address
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellTax 0xcc1776d3 → uint256
swapAtAmount 0x86917524 → uint256
swapPair 0x26991cc8 → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 19 functions

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

_setAutomatedMarketMakerPair 0xa7f7b36f
address pair
bool value
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFees 0xc0246668
address account
bool excluded
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
manualSwap 0x51bc3c85
No parameters
renounceOwnership 0x715018a6
No parameters
setBuyTax 0xdc1052e2
uint256 _newBuyTax
setDevWallet 0x1f53ac02
address newDevWallet
setMarketingWallet 0x5d098b38
address newMarketingWallet
setSellTax 0x8cd09d50
uint256 _newSellTax
setSwapAtAmount 0x6402511e
uint256 _newSwapAtAmount
setTaxSplit 0x82af6e89
uint256 _devSplit
uint256 _marketingSplit
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateSwapRouter 0xb98b677f
address newAddress
withdawlBNB 0xe799ffb1
No parameters
withdrawlToken 0xac5cad56
address _tokenAddress

Recent Transactions

No transactions found for this address