Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xd2287a52287dd64AE2c690D74322E2e345dC8F69
Balance 0 ETH
Nonce 1
Code Size 12785 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

12785 bytes
0x60806040526004361061014f5760003560e01c80638da5cb5b116100b6578063d444c8e81161006f578063d444c8e8146104b1578063dd62ed3e146104ee578063dd8065c91461052b578063e6037ec314610554578063ec28438a14610591578063f2fde38b146105ba57610156565b80638da5cb5b1461038f57806395d89b41146103ba5780639d51d9b7146103e5578063a457c2d71461040e578063a5cfae9d1461044b578063a9059cbb1461047457610156565b8063313ce56711610108578063313ce5671461027f57806339221770146102aa57806339509351146102d55780635af0cdbc1461031257806370a082311461033b578063715018a61461037857610156565b806302bfc6841461015b57806306fdde0314610186578063095ea7b3146101b157806318160ddd146101ee57806323b872dd146102195780632d6c98171461025657610156565b3661015657005b600080fd5b34801561016757600080fd5b506101706105e3565b60405161017d91906128d9565b60405180910390f35b34801561019257600080fd5b5061019b6105ed565b6040516101a89190612657565b60405180910390f35b3480156101bd57600080fd5b506101d860048036038101906101d3919061225c565b61067f565b6040516101e5919061263c565b60405180910390f35b3480156101fa57600080fd5b5061020361069d565b60405161021091906128d9565b60405180910390f35b34801561022557600080fd5b50610240600480360381019061023b91906121d1565b6106a7565b60405161024d919061263c565b60405180910390f35b34801561026257600080fd5b5061027d60048036038101906102789190612220565b6107a3565b005b34801561028b57600080fd5b50610294610a1f565b6040516102a191906128f4565b60405180910390f35b3480156102b657600080fd5b506102bf610a28565b6040516102cc91906128d9565b60405180910390f35b3480156102e157600080fd5b506102fc60048036038101906102f7919061225c565b610a32565b604051610309919061263c565b60405180910390f35b34801561031e57600080fd5b506103396004803603810190610334919061225c565b610ade565b005b34801561034757600080fd5b50610362600480360381019061035d919061216c565b610d75565b60405161036f91906128d9565b60405180910390f35b34801561038457600080fd5b5061038d610dbd565b005b34801561039b57600080fd5b506103a4610e45565b6040516103b191906125f8565b60405180910390f35b3480156103c657600080fd5b506103cf610e6f565b6040516103dc9190612657565b60405180910390f35b3480156103f157600080fd5b5061040c600480360381019061040791906122c1565b610f01565b005b34801561041a57600080fd5b506104356004803603810190610430919061225c565b610f87565b604051610442919061263c565b60405180910390f35b34801561045757600080fd5b50610472600480360381019061046d919061225c565b611072565b005b34801561048057600080fd5b5061049b6004803603810190610496919061225c565b611309565b6040516104a8919061263c565b60405180910390f35b3480156104bd57600080fd5b506104d860048036038101906104d3919061216c565b611403565b6040516104e5919061263c565b60405180910390f35b3480156104fa57600080fd5b5061051560048036038101906105109190612195565b611459565b60405161052291906128d9565b60405180910390f35b34801561053757600080fd5b50610552600480360381019061054d9190612220565b6114e0565b005b34801561056057600080fd5b5061057b6004803603810190610576919061216c565b61175c565b604051610588919061263c565b60405180910390f35b34801561059d57600080fd5b506105b860048036038101906105b391906122c1565b6117b2565b005b3480156105c657600080fd5b506105e160048036038101906105dc919061216c565b611838565b005b6000601b54905090565b6060600380546105fc90612af2565b80601f016020809104026020016040519081016040528092919081815260200182805461062890612af2565b80156106755780601f1061064a57610100808354040283529160200191610675565b820191906000526020600020905b81548152906001019060200180831161065857829003601f168201915b5050505050905090565b600061069361068c611972565b848461197a565b6001905092915050565b6000600254905090565b60006014548210806106bf57506106be8484611b45565b5b806106d057506106cf8484611bf0565b5b61070f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610706906127b9565b60405180910390fd5b60155461072d8361071f86610d75565b611c9b90919063ffffffff16565b108061073f575061073e8484611b45565b5b80610750575061074f8484611bf0565b5b61078f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078690612779565b60405180910390fd5b61079a848484611cb1565b90509392505050565b6107ab611972565b73ffffffffffffffffffffffffffffffffffffffff166107c9610e45565b73ffffffffffffffffffffffffffffffffffffffff161461081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690612839565b60405180910390fd5b801561092757601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a9906126b9565b60405180910390fd5b601b60008154809291906108c590612b24565b91905055506001601960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610a1b565b601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166109b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109aa90612699565b60405180910390fd5b601b60008154809291906109c690612ac8565b9190505550601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff02191690555b5050565b60006012905090565b6000601c54905090565b6000610ad4610a3f611972565b848460016000610a4d611972565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610acf919061292b565b61197a565b6001905092915050565b610ae6611972565b73ffffffffffffffffffffffffffffffffffffffff16610b04610e45565b73ffffffffffffffffffffffffffffffffffffffff1614610b5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5190612839565b60405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610bea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be190612759565b60405180910390fd5b601254610c0282600d54611c9b90919063ffffffff16565b1115610c43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3a90612819565b60405180910390fd5b6000610c6e601754610c60600b544261195c90919063ffffffff16565b61194690919063ffffffff16565b905081610c86600d548361195c90919063ffffffff16565b1015610cc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cbe90612799565b60405180910390fd5b610cdc82600d54611c9b90919063ffffffff16565b600d819055503073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b8152600401610d1d929190612613565b602060405180830381600087803b158015610d3757600080fd5b505af1158015610d4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6f9190612298565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610dc5611972565b73ffffffffffffffffffffffffffffffffffffffff16610de3610e45565b73ffffffffffffffffffffffffffffffffffffffff1614610e39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3090612839565b60405180910390fd5b610e436000611da9565b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054610e7e90612af2565b80601f0160208091040260200160405190810160405280929190818152602001828054610eaa90612af2565b8015610ef75780601f10610ecc57610100808354040283529160200191610ef7565b820191906000526020600020905b815481529060010190602001808311610eda57829003601f168201915b5050505050905090565b610f09611972565b73ffffffffffffffffffffffffffffffffffffffff16610f27610e45565b73ffffffffffffffffffffffffffffffffffffffff1614610f7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7490612839565b60405180910390fd5b8060158190555050565b60008060016000610f96611972565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611053576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104a906128b9565b60405180910390fd5b61106761105e611972565b8585840361197a565b600191505092915050565b61107a611972565b73ffffffffffffffffffffffffffffffffffffffff16611098610e45565b73ffffffffffffffffffffffffffffffffffffffff16146110ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e590612839565b60405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461117e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611175906127d9565b60405180910390fd5b60115461119682600c54611c9b90919063ffffffff16565b11156111d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ce90612819565b60405180910390fd5b60006112026018546111f4600b544261195c90919063ffffffff16565b61194690919063ffffffff16565b90508161121a600c548361195c90919063ffffffff16565b101561125b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125290612799565b60405180910390fd5b61127082600c54611c9b90919063ffffffff16565b600c819055503073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b81526004016112b1929190612613565b602060405180830381600087803b1580156112cb57600080fd5b505af11580156112df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113039190612298565b50505050565b600060145482108061132157506113203384611b45565b5b8061133257506113313384611bf0565b5b611371576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611368906127b9565b60405180910390fd5b60155461138f8361138186610d75565b611c9b90919063ffffffff16565b10806113a157506113a03384611b45565b5b806113b257506113b13384611bf0565b5b6113f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e890612779565b60405180910390fd5b6113fb8383611e6f565b905092915050565b6000601a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6114e8611972565b73ffffffffffffffffffffffffffffffffffffffff16611506610e45565b73ffffffffffffffffffffffffffffffffffffffff161461155c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155390612839565b60405180910390fd5b801561166457601a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156115ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e690612719565b60405180910390fd5b601c600081548092919061160290612b24565b91905055506001601a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611758565b601a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166116f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e790612899565b60405180910390fd5b601c600081548092919061170390612ac8565b9190505550601a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff02191690555b5050565b6000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6117ba611972565b73ffffffffffffffffffffffffffffffffffffffff166117d8610e45565b73ffffffffffffffffffffffffffffffffffffffff161461182e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182590612839565b60405180910390fd5b8060148190555050565b611840611972565b73ffffffffffffffffffffffffffffffffffffffff1661185e610e45565b73ffffffffffffffffffffffffffffffffffffffff16146118b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ab90612839565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611924576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191b906126d9565b60405180910390fd5b61192d81611da9565b50565b6000818361193e9190612981565b905092915050565b6000818361195491906129b2565b905092915050565b6000818361196a9190612a0c565b905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156119ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e190612879565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a51906126f9565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611b3891906128d9565b60405180910390a3505050565b6000601a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611be85750601a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b905092915050565b6000601960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c935750601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b905092915050565b60008183611ca9919061292b565b905092915050565b6000611cbe848484611e8d565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000611d09611972565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611d89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d80906127f9565b60405180910390fd5b611d9d85611d95611972565b85840361197a565b60019150509392505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000611e83611e7c611972565b8484611e8d565b6001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611efd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef490612859565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6490612679565b60405180910390fd5b611f7883838361210e565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611ffe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ff590612739565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612091919061292b565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516120f591906128d9565b60405180910390a3612108848484612113565b50505050565b505050565b505050565b60008135905061212781613176565b92915050565b60008135905061213c8161318d565b92915050565b6000815190506121518161318d565b92915050565b600081359050612166816131a4565b92915050565b60006020828403121561217e57600080fd5b600061218c84828501612118565b91505092915050565b600080604083850312156121a857600080fd5b60006121b685828601612118565b92505060206121c785828601612118565b9150509250929050565b6000806000606084860312156121e657600080fd5b60006121f486828701612118565b935050602061220586828701612118565b925050604061221686828701612157565b9150509250925092565b6000806040838503121561223357600080fd5b600061224185828601612118565b92505060206122528582860161212d565b9150509250929050565b6000806040838503121561226f57600080fd5b600061227d85828601612118565b925050602061228e85828601612157565b9150509250929050565b6000602082840312156122aa57600080fd5b60006122b884828501612142565b91505092915050565b6000602082840312156122d357600080fd5b60006122e184828501612157565b91505092915050565b6122f381612a40565b82525050565b61230281612a52565b82525050565b60006123138261290f565b61231d818561291a565b935061232d818560208601612a95565b61233681612bfa565b840191505092915050565b600061234e60238361291a565b915061235982612c0b565b604082019050919050565b6000612371602f8361291a565b915061237c82612c5a565b604082019050919050565b6000612394602e8361291a565b915061239f82612ca9565b604082019050919050565b60006123b760268361291a565b91506123c282612cf8565b604082019050919050565b60006123da60228361291a565b91506123e582612d47565b604082019050919050565b60006123fd602d8361291a565b915061240882612d96565b604082019050919050565b600061242060268361291a565b915061242b82612de5565b604082019050919050565b600061244360118361291a565b915061244e82612e34565b602082019050919050565b600061246660288361291a565b915061247182612e5d565b604082019050919050565b600061248960228361291a565b915061249482612eac565b604082019050919050565b60006124ac60288361291a565b91506124b782612efb565b604082019050919050565b60006124cf60168361291a565b91506124da82612f4a565b602082019050919050565b60006124f260288361291a565b91506124fd82612f73565b604082019050919050565b600061251560248361291a565b915061252082612fc2565b604082019050919050565b600061253860208361291a565b915061254382613011565b602082019050919050565b600061255b60258361291a565b91506125668261303a565b604082019050919050565b600061257e60248361291a565b915061258982613089565b604082019050919050565b60006125a1602e8361291a565b91506125ac826130d8565b604082019050919050565b60006125c460258361291a565b91506125cf82613127565b604082019050919050565b6125e381612a7e565b82525050565b6125f281612a88565b82525050565b600060208201905061260d60008301846122ea565b92915050565b600060408201905061262860008301856122ea565b61263560208301846125da565b9392505050565b600060208201905061265160008301846122f9565b92915050565b600060208201905081810360008301526126718184612308565b905092915050565b6000602082019050818103600083015261269281612341565b9050919050565b600060208201905081810360008301526126b281612364565b9050919050565b600060208201905081810360008301526126d281612387565b9050919050565b600060208201905081810360008301526126f2816123aa565b9050919050565b60006020820190508181036000830152612712816123cd565b9050919050565b60006020820190508181036000830152612732816123f0565b9050919050565b6000602082019050818103600083015261275281612413565b9050919050565b6000602082019050818103600083015261277281612436565b9050919050565b6000602082019050818103600083015261279281612459565b9050919050565b600060208201905081810360008301526127b28161247c565b9050919050565b600060208201905081810360008301526127d28161249f565b9050919050565b600060208201905081810360008301526127f2816124c2565b9050919050565b60006020820190508181036000830152612812816124e5565b9050919050565b6000602082019050818103600083015261283281612508565b9050919050565b600060208201905081810360008301526128528161252b565b9050919050565b600060208201905081810360008301526128728161254e565b9050919050565b6000602082019050818103600083015261289281612571565b9050919050565b600060208201905081810360008301526128b281612594565b9050919050565b600060208201905081810360008301526128d2816125b7565b9050919050565b60006020820190506128ee60008301846125da565b92915050565b600060208201905061290960008301846125e9565b92915050565b600081519050919050565b600082825260208201905092915050565b600061293682612a7e565b915061294183612a7e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561297657612975612b6d565b5b828201905092915050565b600061298c82612a7e565b915061299783612a7e565b9250826129a7576129a6612b9c565b5b828204905092915050565b60006129bd82612a7e565b91506129c883612a7e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612a0157612a00612b6d565b5b828202905092915050565b6000612a1782612a7e565b9150612a2283612a7e565b925082821015612a3557612a34612b6d565b5b828203905092915050565b6000612a4b82612a5e565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015612ab3578082015181840152602081019050612a98565b83811115612ac2576000848401525b50505050565b6000612ad382612a7e565b91506000821415612ae757612ae6612b6d565b5b600182039050919050565b60006002820490506001821680612b0a57607f821691505b60208210811415612b1e57612b1d612bcb565b5b50919050565b6000612b2f82612a7e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612b6257612b61612b6d565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f546869732077616c6c657420646f6573206e6f742065786973747320696e206560008201527f786368616e67652077616c6c6574730000000000000000000000000000000000602082015250565b7f546869732077616c6c657420616c72656164792065786973747320696e20657860008201527f6368616e67652077616c6c657473000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f546869732077616c6c657420616c72656164792065786973747320696e20707260008201527f6f6a6563742077616c6c65747300000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f4f6e6c79207465616d2077616c6c657421000000000000000000000000000000600082015250565b7f526563697069656e74206163636f756e742062616c616e63652065786365656460008201527f73206c696d69742e000000000000000000000000000000000000000000000000602082015250565b7f4d757374206e6f742065786365656420617661696c61626c65207175616e746960008201527f7479000000000000000000000000000000000000000000000000000000000000602082015250565b7f5472616e7366657220616d6f756e74206578636565647320746865206d61785460008201527f78416d6f756e742e000000000000000000000000000000000000000000000000602082015250565b7f4f6e6c792061776172642044414f2077616c6c65742100000000000000000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f4d757374206265206c657373207468616e2074686520616d6f756e74206f666660008201527f6572656400000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f546869732077616c6c657420646f6573206e6f742065786973747320696e207060008201527f726f6a6563742077616c6c657473000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61317f81612a40565b811461318a57600080fd5b50565b61319681612a52565b81146131a157600080fd5b50565b6131ad81612a7e565b81146131b857600080fd5b5056fea26469706673582212200317f172f3e6573e7ad409376df45aa0418571f23a00858cbd421dc3b757314e64736f6c63430008040033

Verified Source Code Partial Match

Compiler: v0.8.4+commit.c7e474f2 EVM: istanbul Optimization: No
BabyWhale.sol 1091 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// File: @openzeppelin/contracts/utils/Context.sol
/**
 * @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/utils/math/SafeMath.sol
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b)
        internal
        pure
        returns (bool, uint256)
    {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b)
        internal
        pure
        returns (bool, uint256)
    {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b)
        internal
        pure
        returns (bool, uint256)
    {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b)
        internal
        pure
        returns (bool, uint256)
    {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b)
        internal
        pure
        returns (bool, uint256)
    {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
/**
 * @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: node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol
/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * 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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount)
        public
        virtual
        override
        returns (bool)
    {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount)
        public
        virtual
        override
        returns (bool)
    {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(
            currentAllowance >= amount,
            "ERC20: transfer amount exceeds allowance"
        );
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - 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)
    {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][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)
    {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(
            currentAllowance >= subtractedValue,
            "ERC20: decreased allowance below zero"
        );
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * 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:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(
            senderBalance >= amount,
            "ERC20: transfer amount exceeds balance"
        );
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

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

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

        _totalSupply += 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 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

/**
 * @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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

contract BabyWhale is ERC20, Ownable {
    using SafeMath for uint256;
    address private commentProgramWallet;
    address private decentralizedWallet;
    address private airdropWallet;
    address private awardDAOWallet;
    address private teamWallet;

    uint256 private deploymentTime;
    uint256 private releasedAwardDaoAmt;
    uint256 private releasedTeamAmt;

    uint256 private _totalSupply = 1000000000000 * 10**18;
    uint256 private _commentProgramSupply = _totalSupply.div(100).mul(40);
    uint256 private _airdropSupply = _totalSupply.div(100).mul(5);
    uint256 private _awardDAOSupply = _totalSupply.div(100).mul(10);
    uint256 private _teamSupply = _totalSupply.div(100).mul(5);
    uint256 private _decentralizedSupply =
        _totalSupply
            .sub(_commentProgramSupply)
            .sub(_airdropSupply)
            .sub(_awardDAOSupply)
            .sub(_teamSupply);

    uint256 private _maxTxAmount = _totalSupply.div(1000);
    uint256 private _maxBalance = _totalSupply.div(1000);

    //Time to release all is ~ 1 year ~ 365 day ~ 31556926s
    uint256 private _totalSecondOneYear = 31556926;
    uint256 private _amountUnlockAwardDaoWalletPerSecond =
        _awardDAOSupply.div(_totalSecondOneYear);
    uint256 private _amountUnlockTeamWalletPerSecond =
        _teamSupply.div(_totalSecondOneYear);

    mapping(address => bool) private _exchangeWallets;
    mapping(address => bool) private _projectWallets;

    uint256 private _exchangeWalletCount;
    uint256 private _projectWalletCount;

    constructor(
        string memory name,
        string memory symbol,
        address[] memory projectWallets
    ) ERC20(name, symbol) {
        deploymentTime = block.timestamp;

        commentProgramWallet = projectWallets[0];
        decentralizedWallet = projectWallets[1];
        airdropWallet = projectWallets[2];
        awardDAOWallet = projectWallets[3];
        teamWallet = projectWallets[4];

        _exchangeWalletCount = 0;
        _projectWalletCount = projectWallets.length;

        _projectWallets[commentProgramWallet] = true;
        _projectWallets[decentralizedWallet] = true;
        _projectWallets[airdropWallet] = true;
        _projectWallets[awardDAOWallet] = true;
        _projectWallets[teamWallet] = true;

        _mint(commentProgramWallet, _commentProgramSupply);
        _mint(decentralizedWallet, _decentralizedSupply);
        _mint(airdropWallet, _airdropSupply);
        _mint(address(this), _awardDAOSupply);
        _mint(address(this), _teamSupply);
    }

    receive() external payable {}

    function withdrawAwarDAOFund(address account, uint256 amount)
        external
        onlyOwner
    {
        require(account == awardDAOWallet, "Only award DAO wallet!");

        require(
            releasedAwardDaoAmt.add(amount) <= _awardDAOSupply,
            "Must be less than the amount offered"
        );

        uint256 totalUnlockAwardDAOWalletAmt = block
            .timestamp
            .sub(deploymentTime)
            .mul(_amountUnlockTeamWalletPerSecond);
        require(
            totalUnlockAwardDAOWalletAmt.sub(releasedAwardDaoAmt) >= amount,
            "Must not exceed available quantity"
        );

        releasedAwardDaoAmt = releasedAwardDaoAmt.add(amount);
        IERC20(address(this)).transfer(account, amount);
    }

    function withdrawTeamFund(address account, uint256 amount)
        external
        onlyOwner
    {
        require(account == teamWallet, "Only team wallet!");

        require(
            releasedTeamAmt.add(amount) <= _teamSupply,
            "Must be less than the amount offered"
        );

        uint256 totalUnlockTeamWalletAmt = block
            .timestamp
            .sub(deploymentTime)
            .mul(_amountUnlockAwardDaoWalletPerSecond);
        require(
            totalUnlockTeamWalletAmt.sub(releasedTeamAmt) >= amount,
            "Must not exceed available quantity"
        );

        releasedTeamAmt = releasedTeamAmt.add(amount);
        IERC20(address(this)).transfer(account, amount);
    }

    function updateExchangeWallets(address wallet, bool isCreate)
        external
        onlyOwner
    {
        if (isCreate) {
            require(
                !_exchangeWallets[wallet],
                "This wallet already exists in exchange wallets"
            );
            _exchangeWalletCount++;
            _exchangeWallets[wallet] = true;
        } else {
            require(
                _exchangeWallets[wallet],
                "This wallet does not exists in exchange wallets"
            );
            _exchangeWalletCount--;
            delete _exchangeWallets[wallet];
        }
    }

    function getExchangeWalletCount() external view returns (uint256) {
        return _exchangeWalletCount;
    }

    function isExchangeWallets(address wallet) external view returns (bool) {
        return _exchangeWallets[wallet];
    }

    function isExchangeWallets(address sender, address recipient)
        internal
        view
        returns (bool)
    {
        return _exchangeWallets[sender] || _exchangeWallets[recipient];
    }

    function updateProjectWallet(address wallet, bool isCreate)
        external
        onlyOwner
    {
        if (isCreate) {
            require(
                !_projectWallets[wallet],
                "This wallet already exists in project wallets"
            );
            _projectWalletCount++;
            _projectWallets[wallet] = true;
        } else {
            require(
                _projectWallets[wallet],
                "This wallet does not exists in project wallets"
            );
            _projectWalletCount--;
            delete _projectWallets[wallet];
        }
    }

    function getProjectWalletCount() external view returns (uint256) {
        return _projectWalletCount;
    }

    function isProjectWallets(address wallet) external view returns (bool) {
        return _projectWallets[wallet];
    }

    function isProjectWallets(address sender, address recipient)
        internal
        view
        returns (bool)
    {
        return _projectWallets[sender] || _projectWallets[recipient];
    }

    function setMaxBalance(uint256 maxBalance) external onlyOwner {
        _maxBalance = maxBalance;
    }

    function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner {
        _maxTxAmount = maxTxAmount;
    }

    function transfer(address recipient, uint256 amount)
        public
        virtual
        override
        returns (bool)
    {
        require(
            amount < _maxTxAmount ||
                isProjectWallets(msg.sender, recipient) ||
                isExchangeWallets(msg.sender, recipient),
            "Transfer amount exceeds the maxTxAmount."
        );
        require(
            balanceOf(recipient).add(amount) < _maxBalance ||
                isProjectWallets(msg.sender, recipient) ||
                isExchangeWallets(msg.sender, recipient),
            "Recipient account balance exceeds limit."
        );
        return super.transfer(recipient, amount);
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        require(
            amount < _maxTxAmount ||
                isProjectWallets(sender, recipient) ||
                isExchangeWallets(sender, recipient),
            "Transfer amount exceeds the maxTxAmount."
        );
        require(
            balanceOf(recipient).add(amount) < _maxBalance ||
                isProjectWallets(sender, recipient) ||
                isExchangeWallets(sender, recipient),
            "Recipient account balance exceeds limit."
        );
        return super.transferFrom(sender, recipient, amount);
    }
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
getExchangeWalletCount 0x02bfc684 → uint256
getProjectWalletCount 0x39221770 → uint256
isExchangeWallets 0xe6037ec3 → bool
isProjectWallets 0xd444c8e8 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 13 functions

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

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
setMaxBalance 0x9d51d9b7
uint256 maxBalance
setMaxTxAmount 0xec28438a
uint256 maxTxAmount
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateExchangeWallets 0x2d6c9817
address wallet
bool isCreate
updateProjectWallet 0xdd8065c9
address wallet
bool isCreate
withdrawAwarDAOFund 0xa5cfae9d
address account
uint256 amount
withdrawTeamFund 0x5af0cdbc
address account
uint256 amount

Recent Transactions

No transactions found for this address