Address Contract Partially Verified
Address
0xb51170e5b1804C80AA3477326590076003E61beD
Balance
0 ETH
Nonce
1
Code Size
14574 bytes
Creator
0x43B25DDb...8662 at tx 0x7761113f...d8f914
Indexed Transactions
0
Contract Bytecode
14574 bytes
0x608060405260043610610164575f3560e01c80637533d788116100d0578063a457c2d711610089578063d1deba1f11610063578063d1deba1f14610553578063d2fcb6d51461056f578063dd62ed3e14610597578063f2fde38b146105d357610164565b8063a457c2d7146104b1578063a9059cbb146104ed578063adc879e91461052957610164565b80637533d788146103a057806379cc6790146103dc5780638cef430d146104045780638da5cb5b146104205780638ee749121461044a57806395d89b411461048757610164565b8063313ce56711610122578063313ce5671461028457806339509351146102ae57806342966c68146102ea5780635b30d0811461031257806370a082311461034e578063715018a61461038a57610164565b80621d35671461016857806306fdde0314610190578063095ea7b3146101ba57806318160ddd146101f65780631c37a8221461022057806323b872dd14610248575b5f80fd5b348015610173575f80fd5b5061018e60048036038101906101899190611ea9565b6105fb565b005b34801561019b575f80fd5b506101a461082e565b6040516101b19190611fbf565b60405180910390f35b3480156101c5575f80fd5b506101e060048036038101906101db919061206c565b6108be565b6040516101ed91906120c4565b60405180910390f35b348015610201575f80fd5b5061020a6108e0565b60405161021791906120ec565b60405180910390f35b34801561022b575f80fd5b5061024660048036038101906102419190611ea9565b6108e9565b005b348015610253575f80fd5b5061026e60048036038101906102699190612105565b610969565b60405161027b91906120c4565b60405180910390f35b34801561028f575f80fd5b50610298610997565b6040516102a59190612170565b60405180910390f35b3480156102b9575f80fd5b506102d460048036038101906102cf919061206c565b61099f565b6040516102e191906120c4565b60405180910390f35b3480156102f5575f80fd5b50610310600480360381019061030b9190612189565b6109d5565b005b34801561031d575f80fd5b50610338600480360381019061033391906121b4565b6109e9565b60405161034591906120ec565b60405180910390f35b348015610359575f80fd5b50610374600480360381019061036f91906121f2565b610aec565b60405161038191906120ec565b60405180910390f35b348015610395575f80fd5b5061039e610b31565b005b3480156103ab575f80fd5b506103c660048036038101906103c1919061221d565b610b44565b6040516103d3919061229a565b60405180910390f35b3480156103e7575f80fd5b5061040260048036038101906103fd919061206c565b610bdf565b005b61041e600480360381019061041991906121b4565b610bff565b005b34801561042b575f80fd5b50610434610e84565b60405161044191906122c9565b60405180910390f35b348015610455575f80fd5b50610470600480360381019061046b91906122e2565b610eac565b60405161047e929190612366565b60405180910390f35b348015610492575f80fd5b5061049b610efa565b6040516104a89190611fbf565b60405180910390f35b3480156104bc575f80fd5b506104d760048036038101906104d2919061206c565b610f8a565b6040516104e491906120c4565b60405180910390f35b3480156104f8575f80fd5b50610513600480360381019061050e919061206c565b610fff565b60405161052091906120c4565b60405180910390f35b348015610534575f80fd5b5061053d611021565b60405161054a91906120ec565b60405180910390f35b61056d600480360381019061056891906123ea565b611027565b005b34801561057a575f80fd5b5061059560048036038101906105909190612534565b6111b7565b005b3480156105a2575f80fd5b506105bd60048036038101906105b891906125b2565b61129b565b6040516105ca91906120ec565b60405180910390f35b3480156105de575f80fd5b506105f960048036038101906105f491906121f2565b61131d565b005b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610653575f80fd5b60085f8561ffff1661ffff1681526020019081526020015f2080546106779061261d565b905083511480156106bb575060085f8561ffff1661ffff1681526020019081526020015f206040516106a991906126e9565b60405180910390208380519060200120145b6106fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f19061276f565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16631c37a822858585856040518563ffffffff1660e01b815260040161073994939291906127ab565b5f604051808303815f87803b158015610750575f80fd5b505af1925050508015610761575060015b61082757604051806040016040528082518152602001828051906020012081525060075f8661ffff1661ffff1681526020019081526020015f20846040516107a9919061282c565b90815260200160405180910390205f8467ffffffffffffffff1681526020019081526020015f205f820151815f0155602082015181600101559050507fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d8484848460405161081a94939291906127ab565b60405180910390a1610828565b5b50505050565b60606003805461083d9061261d565b80601f01602080910402602001604051908101604052809291908181526020018280546108699061261d565b80156108b45780601f1061088b576101008083540402835291602001916108b4565b820191905f5260205f20905b81548152906001019060200180831161089757829003601f168201915b5050505050905090565b5f806108c861139f565b90506108d58185856113a6565b600191505092915050565b5f600254905090565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094e906128b2565b60405180910390fd5b61096384848484611569565b50505050565b5f8061097361139f565b9050610980858285611595565b61098b858585611620565b60019150509392505050565b5f6012905090565b5f806109a961139f565b90506109ca8185856109bb858961129b565b6109c591906128fd565b6113a6565b600191505092915050565b6109e66109e061139f565b8261188c565b50565b5f8033836040516020016109fe929190612930565b60405160208183030381529060405290505f600190505f81600954604051602001610a2a9291906129ab565b60405160208183030381529060405290505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340a7bb108830875f876040518663ffffffff1660e01b8152600401610a9e9594939291906129d6565b6040805180830381865afa158015610ab8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610adc9190612a49565b5090508094505050505092915050565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610b39611a4f565b610b425f611acd565b565b6008602052805f5260405f205f915090508054610b609061261d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8c9061261d565b8015610bd75780601f10610bae57610100808354040283529160200191610bd7565b820191905f5260205f20905b815481529060010190602001808311610bba57829003601f168201915b505050505081565b610bf182610beb61139f565b83611595565b610bfb828261188c565b5050565b610c0982826109e9565b341015610c14575f80fd5b80610c1e33610aec565b1015610c28575f80fd5b610c32338261188c565b5f60085f8461ffff1661ffff1681526020019081526020015f208054610c579061261d565b905011610c99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9090612af7565b60405180910390fd5b5f3382604051602001610cad929190612930565b60405160208183030381529060405290505f600190505f81600954604051602001610cd99291906129ab565b60405160208183030381529060405290505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340a7bb108730875f876040518663ffffffff1660e01b8152600401610d4d9594939291906129d6565b6040805180830381865afa158015610d67573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d8b9190612a49565b50905080341015610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc890612bab565b60405180910390fd5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c5803100348860085f8b61ffff1661ffff1681526020019081526020015f2088335f896040518863ffffffff1660e01b8152600401610e4e96959493929190612c6a565b5f604051808303818588803b158015610e65575f80fd5b505af1158015610e77573d5f803e3d5ffd5b5050505050505050505050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6007602052825f5260405f2082805160208101820180518482526020830160208501208183528095505050505050602052805f5260405f205f925092505050805f0154908060010154905082565b606060048054610f099061261d565b80601f0160208091040260200160405190810160405280929190818152602001828054610f359061261d565b8015610f805780601f10610f5757610100808354040283529160200191610f80565b820191905f5260205f20905b815481529060010190602001808311610f6357829003601f168201915b5050505050905090565b5f80610f9461139f565b90505f610fa1828661129b565b905083811015610fe6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fdd90612d4e565b60405180910390fd5b610ff382868684036113a6565b60019250505092915050565b5f8061100961139f565b9050611016818585611620565b600191505092915050565b600a5481565b5f60075f8761ffff1661ffff1681526020019081526020015f208560405161104f919061282c565b90815260200160405180910390205f8567ffffffffffffffff1681526020019081526020015f2090505f801b8160010154036110c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b790612ddc565b60405180910390fd5b805f0154838390501480156110ef5750806001015483836040516110e5929190612e1e565b6040518091039020145b61112e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112590612e80565b60405180910390fd5b5f815f01819055505f801b81600101819055503073ffffffffffffffffffffffffffffffffffffffff16631c37a82287878787876040518663ffffffff1660e01b8152600401611182959493929190612eca565b5f604051808303815f87803b158015611199575f80fd5b505af11580156111ab573d5f803e3d5ffd5b50505050505050505050565b6111bf611a4f565b818190508484905014611207576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fe90612f8d565b60405180910390fd5b5f5b848490508110156112945782828281811061122757611226612fab565b5b90506020028101906112399190612fe4565b60085f88888681811061124f5761124e612fab565b5b9050602002016020810190611264919061221d565b61ffff1661ffff1681526020019081526020015f2091826112869291906131db565b508080600101915050611209565b5050505050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b611325611a4f565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611393576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138a90613318565b60405180910390fd5b61139c81611acd565b50565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140b906133a6565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611482576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147990613434565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161155c91906120ec565b60405180910390a3505050565b5f808280602001905181019061157f919061347c565b9150915061158d8282611b90565b505050505050565b5f6115a0848461129b565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461161a578181101561160c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160390613504565b60405180910390fd5b61161984848484036113a6565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361168e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168590613592565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036116fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f390613620565b60405180910390fd5b611707838383611cde565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561178a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611781906136ae565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550815f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161187391906120ec565b60405180910390a3611886848484611ce3565b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036118fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f19061373c565b60405180910390fd5b611905825f83611cde565b5f805f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015611988576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197f906137ca565b60405180910390fd5b8181035f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611a3791906120ec565b60405180910390a3611a4a835f84611ce3565b505050565b611a5761139f565b73ffffffffffffffffffffffffffffffffffffffff16611a75610e84565b73ffffffffffffffffffffffffffffffffffffffff1614611acb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ac290613832565b60405180910390fd5b565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611bfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf59061389a565b60405180910390fd5b611c095f8383611cde565b8060025f828254611c1a91906128fd565b92505081905550805f808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611cc791906120ec565b60405180910390a3611cda5f8383611ce3565b5050565b505050565b505050565b5f604051905090565b5f80fd5b5f80fd5b5f61ffff82169050919050565b611d0f81611cf9565b8114611d19575f80fd5b50565b5f81359050611d2a81611d06565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611d7e82611d38565b810181811067ffffffffffffffff82111715611d9d57611d9c611d48565b5b80604052505050565b5f611daf611ce8565b9050611dbb8282611d75565b919050565b5f67ffffffffffffffff821115611dda57611dd9611d48565b5b611de382611d38565b9050602081019050919050565b828183375f83830152505050565b5f611e10611e0b84611dc0565b611da6565b905082815260208101848484011115611e2c57611e2b611d34565b5b611e37848285611df0565b509392505050565b5f82601f830112611e5357611e52611d30565b5b8135611e63848260208601611dfe565b91505092915050565b5f67ffffffffffffffff82169050919050565b611e8881611e6c565b8114611e92575f80fd5b50565b5f81359050611ea381611e7f565b92915050565b5f805f8060808587031215611ec157611ec0611cf1565b5b5f611ece87828801611d1c565b945050602085013567ffffffffffffffff811115611eef57611eee611cf5565b5b611efb87828801611e3f565b9350506040611f0c87828801611e95565b925050606085013567ffffffffffffffff811115611f2d57611f2c611cf5565b5b611f3987828801611e3f565b91505092959194509250565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611f7c578082015181840152602081019050611f61565b5f8484015250505050565b5f611f9182611f45565b611f9b8185611f4f565b9350611fab818560208601611f5f565b611fb481611d38565b840191505092915050565b5f6020820190508181035f830152611fd78184611f87565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61200882611fdf565b9050919050565b61201881611ffe565b8114612022575f80fd5b50565b5f813590506120338161200f565b92915050565b5f819050919050565b61204b81612039565b8114612055575f80fd5b50565b5f8135905061206681612042565b92915050565b5f806040838503121561208257612081611cf1565b5b5f61208f85828601612025565b92505060206120a085828601612058565b9150509250929050565b5f8115159050919050565b6120be816120aa565b82525050565b5f6020820190506120d75f8301846120b5565b92915050565b6120e681612039565b82525050565b5f6020820190506120ff5f8301846120dd565b92915050565b5f805f6060848603121561211c5761211b611cf1565b5b5f61212986828701612025565b935050602061213a86828701612025565b925050604061214b86828701612058565b9150509250925092565b5f60ff82169050919050565b61216a81612155565b82525050565b5f6020820190506121835f830184612161565b92915050565b5f6020828403121561219e5761219d611cf1565b5b5f6121ab84828501612058565b91505092915050565b5f80604083850312156121ca576121c9611cf1565b5b5f6121d785828601611d1c565b92505060206121e885828601612058565b9150509250929050565b5f6020828403121561220757612206611cf1565b5b5f61221484828501612025565b91505092915050565b5f6020828403121561223257612231611cf1565b5b5f61223f84828501611d1c565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f61226c82612248565b6122768185612252565b9350612286818560208601611f5f565b61228f81611d38565b840191505092915050565b5f6020820190508181035f8301526122b28184612262565b905092915050565b6122c381611ffe565b82525050565b5f6020820190506122dc5f8301846122ba565b92915050565b5f805f606084860312156122f9576122f8611cf1565b5b5f61230686828701611d1c565b935050602084013567ffffffffffffffff81111561232757612326611cf5565b5b61233386828701611e3f565b925050604061234486828701612058565b9150509250925092565b5f819050919050565b6123608161234e565b82525050565b5f6040820190506123795f8301856120dd565b6123866020830184612357565b9392505050565b5f80fd5b5f80fd5b5f8083601f8401126123aa576123a9611d30565b5b8235905067ffffffffffffffff8111156123c7576123c661238d565b5b6020830191508360018202830111156123e3576123e2612391565b5b9250929050565b5f805f805f6080868803121561240357612402611cf1565b5b5f61241088828901611d1c565b955050602086013567ffffffffffffffff81111561243157612430611cf5565b5b61243d88828901611e3f565b945050604061244e88828901611e95565b935050606086013567ffffffffffffffff81111561246f5761246e611cf5565b5b61247b88828901612395565b92509250509295509295909350565b5f8083601f84011261249f5761249e611d30565b5b8235905067ffffffffffffffff8111156124bc576124bb61238d565b5b6020830191508360208202830111156124d8576124d7612391565b5b9250929050565b5f8083601f8401126124f4576124f3611d30565b5b8235905067ffffffffffffffff8111156125115761251061238d565b5b60208301915083602082028301111561252d5761252c612391565b5b9250929050565b5f805f806040858703121561254c5761254b611cf1565b5b5f85013567ffffffffffffffff81111561256957612568611cf5565b5b6125758782880161248a565b9450945050602085013567ffffffffffffffff81111561259857612597611cf5565b5b6125a4878288016124df565b925092505092959194509250565b5f80604083850312156125c8576125c7611cf1565b5b5f6125d585828601612025565b92505060206125e685828601612025565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061263457607f821691505b602082108103612647576126466125f0565b5b50919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f81546126758161261d565b61267f818661264d565b9450600182165f811461269957600181146126ae576126e0565b60ff19831686528115158202860193506126e0565b6126b785612657565b5f5b838110156126d8578154818901526001820191506020810190506126b9565b838801955050505b50505092915050565b5f6126f48284612669565b915081905092915050565b7f4e6f6e626c6f636b696e6752656365697665723a20696e76616c696420736f755f8201527f7263652073656e64696e6720636f6e7472616374000000000000000000000000602082015250565b5f612759603483611f4f565b9150612764826126ff565b604082019050919050565b5f6020820190508181035f8301526127868161274d565b9050919050565b61279681611cf9565b82525050565b6127a581611e6c565b82525050565b5f6080820190506127be5f83018761278d565b81810360208301526127d08186612262565b90506127df604083018561279c565b81810360608301526127f18184612262565b905095945050505050565b5f61280682612248565b612810818561264d565b9350612820818560208601611f5f565b80840191505092915050565b5f61283782846127fc565b915081905092915050565b7f4e6f6e626c6f636b696e6752656365697665723a2063616c6c6572206d7573745f8201527f206265204272696467652e000000000000000000000000000000000000000000602082015250565b5f61289c602b83611f4f565b91506128a782612842565b604082019050919050565b5f6020820190508181035f8301526128c981612890565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61290782612039565b915061291283612039565b925082820190508082111561292a576129296128d0565b5b92915050565b5f6040820190506129435f8301856122ba565b61295060208301846120dd565b9392505050565b5f8160f01b9050919050565b5f61296d82612957565b9050919050565b61298561298082611cf9565b612963565b82525050565b5f819050919050565b6129a56129a082612039565b61298b565b82525050565b5f6129b68285612974565b6002820191506129c68284612994565b6020820191508190509392505050565b5f60a0820190506129e95f83018861278d565b6129f660208301876122ba565b8181036040830152612a088186612262565b9050612a1760608301856120b5565b8181036080830152612a298184612262565b90509695505050505050565b5f81519050612a4381612042565b92915050565b5f8060408385031215612a5f57612a5e611cf1565b5b5f612a6c85828601612a35565b9250506020612a7d85828601612a35565b9150509250929050565b7f5468697320636861696e2069732063757272656e746c7920756e617661696c615f8201527f626c6520666f722074726176656c000000000000000000000000000000000000602082015250565b5f612ae1602e83611f4f565b9150612aec82612a87565b604082019050919050565b5f6020820190508181035f830152612b0e81612ad5565b9050919050565b7f4c443a206d73672e76616c7565206e6f7420656e6f75676820746f20636f76655f8201527f72206d6573736167654665652e2053656e642067617320666f72206d6573736160208201527f6765206665657300000000000000000000000000000000000000000000000000604082015250565b5f612b95604783611f4f565b9150612ba082612b15565b606082019050919050565b5f6020820190508181035f830152612bc281612b89565b9050919050565b5f8154612bd58161261d565b612bdf8186612252565b9450600182165f8114612bf95760018114612c0f57612c41565b60ff198316865281151560200286019350612c41565b612c1885612657565b5f5b83811015612c3957815481890152600182019150602081019050612c1a565b808801955050505b50505092915050565b5f612c5482611fdf565b9050919050565b612c6481612c4a565b82525050565b5f60c082019050612c7d5f83018961278d565b8181036020830152612c8f8188612bc9565b90508181036040830152612ca38187612262565b9050612cb26060830186612c5b565b612cbf60808301856122ba565b81810360a0830152612cd18184612262565b9050979650505050505050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f612d38602583611f4f565b9150612d4382612cde565b604082019050919050565b5f6020820190508181035f830152612d6581612d2c565b9050919050565b7f4e6f6e626c6f636b696e6752656365697665723a206e6f2073746f726564206d5f8201527f6573736167650000000000000000000000000000000000000000000000000000602082015250565b5f612dc6602683611f4f565b9150612dd182612d6c565b604082019050919050565b5f6020820190508181035f830152612df381612dba565b9050919050565b5f612e05838561264d565b9350612e12838584611df0565b82840190509392505050565b5f612e2a828486612dfa565b91508190509392505050565b7f4c617965725a65726f3a20696e76616c6964207061796c6f61640000000000005f82015250565b5f612e6a601a83611f4f565b9150612e7582612e36565b602082019050919050565b5f6020820190508181035f830152612e9781612e5e565b9050919050565b5f612ea98385612252565b9350612eb6838584611df0565b612ebf83611d38565b840190509392505050565b5f608082019050612edd5f83018861278d565b8181036020830152612eef8187612262565b9050612efe604083018661279c565b8181036060830152612f11818486612e9e565b90509695505050505050565b7f436861696e2049447320616e642072656d6f746573206c656e677468206d69735f8201527f6d61746368000000000000000000000000000000000000000000000000000000602082015250565b5f612f77602583611f4f565b9150612f8282612f1d565b604082019050919050565b5f6020820190508181035f830152612fa481612f6b565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80fd5b5f80fd5b5f80fd5b5f808335600160200384360303811261300057612fff612fd8565b5b80840192508235915067ffffffffffffffff82111561302257613021612fdc565b5b60208301925060018202360383131561303e5761303d612fe0565b5b509250929050565b5f82905092915050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261309a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261305f565b6130a4868361305f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6130df6130da6130d584612039565b6130bc565b612039565b9050919050565b5f819050919050565b6130f8836130c5565b61310c613104826130e6565b84845461306b565b825550505050565b5f90565b613120613114565b61312b8184846130ef565b505050565b5b8181101561314e576131435f82613118565b600181019050613131565b5050565b601f8211156131935761316481612657565b61316d84613050565b8101602085101561317c578190505b61319061318885613050565b830182613130565b50505b505050565b5f82821c905092915050565b5f6131b35f1984600802613198565b1980831691505092915050565b5f6131cb83836131a4565b9150826002028217905092915050565b6131e58383613046565b67ffffffffffffffff8111156131fe576131fd611d48565b5b613208825461261d565b613213828285613152565b5f601f831160018114613240575f841561322e578287013590505b61323885826131c0565b86555061329f565b601f19841661324e86612657565b5f5b8281101561327557848901358255600182019150602085019450602081019050613250565b86831015613292578489013561328e601f8916826131a4565b8355505b6001600288020188555050505b50505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f613302602683611f4f565b915061330d826132a8565b604082019050919050565b5f6020820190508181035f83015261332f816132f6565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f613390602483611f4f565b915061339b82613336565b604082019050919050565b5f6020820190508181035f8301526133bd81613384565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f61341e602283611f4f565b9150613429826133c4565b604082019050919050565b5f6020820190508181035f83015261344b81613412565b9050919050565b61345b81612c4a565b8114613465575f80fd5b50565b5f8151905061347681613452565b92915050565b5f806040838503121561349257613491611cf1565b5b5f61349f85828601613468565b92505060206134b085828601612a35565b9150509250929050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f6134ee601d83611f4f565b91506134f9826134ba565b602082019050919050565b5f6020820190508181035f83015261351b816134e2565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f61357c602583611f4f565b915061358782613522565b604082019050919050565b5f6020820190508181035f8301526135a981613570565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f61360a602383611f4f565b9150613615826135b0565b604082019050919050565b5f6020820190508181035f830152613637816135fe565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f613698602683611f4f565b91506136a38261363e565b604082019050919050565b5f6020820190508181035f8301526136c58161368c565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f206164647265735f8201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b5f613726602183611f4f565b9150613731826136cc565b604082019050919050565b5f6020820190508181035f8301526137538161371a565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e5f8201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b5f6137b4602283611f4f565b91506137bf8261375a565b604082019050919050565b5f6020820190508181035f8301526137e1816137a8565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61381c602083611f4f565b9150613827826137e8565b602082019050919050565b5f6020820190508181035f83015261384981613810565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f2061646472657373005f82015250565b5f613884601f83611f4f565b915061388f82613850565b602082019050919050565b5f6020820190508181035f8301526138b181613878565b905091905056fea2646970667358221220f399e00c6bd3120f277b7f687f8b61db71adf3c04a6471467dc2425b1554ff7564736f6c63430008160033
Verified Source Code Partial Match
Compiler: v0.8.22+commit.4fc1097e
EVM: shanghai
Optimization: No
LZDOGE.sol 772 lines
// Twitter: https://twitter.com/LzDoge
// Telegram: https://t.me/LzDoge
// 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/access/Ownable.sol
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling 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);
}
}
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v4.9.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/token/ERC20/ERC20.sol
// OpenZeppelin Contracts (last updated v4.9.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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* 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}.
*
* 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 default value returned by this function, unless
* it's 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;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_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;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_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;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_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/token/ERC20/extensions/ERC20Burnable.sol
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)
pragma solidity ^0.8.0;
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
_spendAllowance(account, _msgSender(), amount);
_burn(account, amount);
}
}
// File: lzDoge/erc20.sol
pragma solidity ^0.8.10;
pragma solidity >=0.5.0;
interface ILayerZeroUserApplicationConfig {
function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;
function setSendVersion(uint16 _version) external;
function setReceiveVersion(uint16 _version) external;
function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}
pragma solidity >=0.5.0;
interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;
function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;
function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);
function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);
function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);
function getChainId() external view returns (uint16);
function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;
function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);
function getSendLibraryAddress(address _userApplication) external view returns (address);
function getReceiveLibraryAddress(address _userApplication) external view returns (address);
function isSendingPayload() external view returns (bool);
function isReceivingPayload() external view returns (bool);
function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);
function getSendVersion(address _userApplication) external view returns (uint16);
function getReceiveVersion(address _userApplication) external view returns (uint16);
}
pragma solidity >=0.5.0;
interface ILayerZeroReceiver {
function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;
}
abstract contract NonblockingReceiver is Ownable, ILayerZeroReceiver {
ILayerZeroEndpoint internal endpoint;
struct FailedMessages {
uint payloadLength;
bytes32 payloadHash;
}
mapping(uint16 => mapping(bytes => mapping(uint => FailedMessages))) public failedMessages;
mapping(uint16 => bytes) public trustedRemoteLookup;
event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload);
function lzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) external override {
require(msg.sender == address(endpoint)); // boilerplate! lzReceive must be called by the endpoint for security
require(_srcAddress.length == trustedRemoteLookup[_srcChainId].length && keccak256(_srcAddress) == keccak256(trustedRemoteLookup[_srcChainId]),
"NonblockingReceiver: invalid source sending contract");
try this.onLzReceive(_srcChainId, _srcAddress, _nonce, _payload) {
} catch {
failedMessages[_srcChainId][_srcAddress][_nonce] = FailedMessages(_payload.length, keccak256(_payload));
emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload);
}
}
function onLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public {
require(msg.sender == address(this), "NonblockingReceiver: caller must be Bridge.");
_LzReceive( _srcChainId, _srcAddress, _nonce, _payload);
}
function _LzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) virtual internal;
function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _txParam) internal {
endpoint.send{value: msg.value}(_dstChainId, trustedRemoteLookup[_dstChainId], _payload, _refundAddress, _zroPaymentAddress, _txParam);
}
function retryMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes calldata _payload) external payable {
FailedMessages storage failedMsg = failedMessages[_srcChainId][_srcAddress][_nonce];
require(failedMsg.payloadHash != bytes32(0), "NonblockingReceiver: no stored message");
require(_payload.length == failedMsg.payloadLength && keccak256(_payload) == failedMsg.payloadHash, "LayerZero: invalid payload");
failedMsg.payloadLength = 0;
failedMsg.payloadHash = bytes32(0);
this.onLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
}
function setMultipleTrustedRemotes(uint16[] calldata _chainIds, bytes[] calldata _trustedRemotes) external onlyOwner {
require(_chainIds.length == _trustedRemotes.length, "Chain IDs and remotes length mismatch");
for (uint i = 0; i < _chainIds.length; i++) {
trustedRemoteLookup[_chainIds[i]] = _trustedRemotes[i];
}
}
}
contract LZDOGE is ERC20, ERC20Burnable, Ownable, NonblockingReceiver{
uint gasForDestinationLzReceive = 350000;
uint256 public chainID;
constructor(address _layerZeroEndpoint , uint256 _chainID) ERC20("LZ DOGE", "LZDOGE"){
endpoint = ILayerZeroEndpoint(_layerZeroEndpoint);
chainID = _chainID;
_mint(msg.sender , 117443484000000 * 10 ** decimals());
}
function estimateFeesView(uint16 _chainId , uint256 value) public view returns (uint) {
bytes memory payload = abi.encode(msg.sender , value);
uint16 version = 1;
bytes memory adapterParams = abi.encodePacked(version, gasForDestinationLzReceive);
(uint messageFee, ) = endpoint.estimateFees(_chainId, address(this), payload, false, adapterParams);
return messageFee;
}
function traverseOtherChains(uint16 _chainId , uint256 value) public payable {
require(msg.value >= estimateFeesView(_chainId , value));
require(balanceOf(msg.sender) >= value);
_burn(msg.sender , value);
require(trustedRemoteLookup[_chainId].length > 0, "This chain is currently unavailable for travel");
// abi.encode() the payload with the values to send
bytes memory payload = abi.encode(msg.sender , value);
// encode adapterParams to specify more gas for the destination
uint16 version = 1;
bytes memory adapterParams = abi.encodePacked(version, gasForDestinationLzReceive);
// get the fees we need to pay to LayerZero + Relayer to cover message delivery
// you will be refunded for extra gas paid
(uint messageFee, ) = endpoint.estimateFees(_chainId, address(this), payload, false, adapterParams);
require(msg.value >= messageFee, "LD: msg.value not enough to cover messageFee. Send gas for message fees");
endpoint.send{value: msg.value}(
_chainId, // destination chainId
trustedRemoteLookup[_chainId], // destination address of nft contract
payload, // abi.encoded()'ed bytes
payable(msg.sender), // refund address
address(0x0), // 'zroPaymentAddress' unused for this
adapterParams // txParameters
);
}
function _LzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) override internal {
// decode
(address toAddr , uint256 value) = abi.decode(_payload, (address , uint256));
// mint the tokens back into existence on destination chain
_mint(toAddr, value);
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
chainID 0xadc879e9 → uint256
decimals 0x313ce567 → uint8
estimateFeesView 0x5b30d081 → uint256
failedMessages 0x8ee74912 → uint256, bytes32
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
trustedRemoteLookup 0x7533d788 → bytes
Write Contract 14 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
burn 0x42966c68
uint256 amount
burnFrom 0x79cc6790
address account
uint256 amount
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
lzReceive 0x001d3567
uint16 _srcChainId
bytes _srcAddress
uint64 _nonce
bytes _payload
onLzReceive 0x1c37a822
uint16 _srcChainId
bytes _srcAddress
uint64 _nonce
bytes _payload
renounceOwnership 0x715018a6
No parameters
retryMessage 0xd1deba1f
uint16 _srcChainId
bytes _srcAddress
uint64 _nonce
bytes _payload
setMultipleTrustedRemotes 0xd2fcb6d5
uint16[] _chainIds
bytes[] _trustedRemotes
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
traverseOtherChains 0x8cef430d
uint16 _chainId
uint256 value
Recent Transactions
No transactions found for this address