ETH Price: $2,616.08 (-4.24%)

Transaction Decoder

Block:
15517706 at Sep-11-2022 11:49:02 PM +UTC
Transaction Fee:
0.015530213562607161 ETH $40.63
Gas Used:
2,145,363 Gas / 7.238967747 Gwei

Account State Difference:

  Address   Before After State Difference Code
0x57c7DF5E...8C8D0C302
0.05101719295178079 Eth
Nonce: 1
0.035486979389173629 Eth
Nonce: 2
0.015530213562607161
(F2Pool Old)
2,720.736256452452148717 Eth2,720.740547178452148717 Eth0.004290726
0xB7596d46...7Ae6a6bf6
0 Eth
Nonce: 0
0 Eth
Nonce: 1
From: 0 To: 71726801891386402430863432968834772561639961076322663207961473161116475055805148119812581588700842591951236776450334927570960526626080599063816034062054658498360245867165483274802806496189449787895952425753332497075747875579008417812189446875096637701133625409681479804218365325011462912125488887794548142037487408098274087850161597371152877318241650732129831941952055778637418587963413534520283499219058526971235283762597871945914766539019999343756218798437817088274425631230532139275887948550343928805613895616797887164283671636194119817811113258147653699664371654652618725950698943374299908961103791426339038024931366103729621477357631767218583233005172267751061405809838268471253826776122411699142753350905931070493176046459061351744912858314168930049447487777948014000627317713190370297051100309755567384554187388392846394638125841481602920322813584892024155369086606056726369920756185630838631071215975662472895059420105937010829613688507113196332126820287977515810191843921774871851443194595601641495151308241176421840751083291960779193390230407987607784669072365059134717016280316382564056469948664454231124896289682841010950653214081710868667764859268736777709490763014733501426416168291208478806895602403229868542977018402519211240713025030170678485083169561399193776896415952483436130586751443535925785559822603830217055241034573386427859538449508794629272412931747267916034702084278723042011646104381783281756104906967214517937265786520280463872145341080753086407317273488557531718946914308360337292297655067523512977906847772266606372831554949985062971174231819782103731250151540771077229839351589269821309695946824482027866008416822378727388633100670185918495292371790744449083623839061517633499702271859082616828275672208540473148560716431262436634760465386138049807399436744243589239646076392993853852042224836920577086988630772909887114231938254128603234113292338619231267662419952234909082914510755908936857118387814930134718289597533387428747952352849148376387898401692933347845865244320687433622609539423517780000159960100478641638372346644866749954733363372681821151469316470433779697005588001105984768239908134660698784184548068024449421226577709541819489607676788168586699090961892925829137110544868913505696540673144547836471907710370409255629344824142102811898050443540039135468843839636084648923355305446651830220903196938931430921763581973671137811583269734199451720858844736634555941135662869898327790304222980087499117814125475239238105100693235021264424707542053033393418671761675201001517033279741849528360740931565276989588529057888527252648480217517754837029403500241182607808497270129446100919892355375965519673140764969117184614870524553077060384943854539449627864441613650284698966394449435994281930926261859377451113708966699420190978104438386068831606110337586630747112355543499416359524378508589918354379794105723867789848821710328721128393000636132858778799835490174111776212457411506346020432305499322261043861097028450084503854442946843536730720285227704100296671037746055042891442271890569760083214290783064504012463941383988474906724455521870126440560732782206946085179080278828995253798493658913713540696421770058053792562700615408700491277462983950508289363083415931345361423102637194701672923009498256026557081878712186819421268812760411858556870235015868411063974005367744511420327995907015955201100910450064921276853302966873297829817058119144932234638145671239885729510473911539275352571050495463976369119412897056403693756808169010886014322233648042816408268760195472605780336636180736154964429805985618942095007208746689500343840498956255870351425822887504952486949158592792113521966845905903269662915682896838602693879386868324156865029635111620501644616745441816655857913076537250835163315995423853614181709180460779065908640139445291494972635047602307219040968617424738932321102704168635935202529223762172992133953747228501380245330407800002943877952357302999249058058706508795606603667888783834200178028030391702205658907173641215160822680555540040589998375167672086654543298010584285626397776548810013902691704740253633281700143126464690278835780830415183121488912137674712588405731057303949703181907329661266291018146208359150021387992144536937743078812230539744413020919153313863805805432251043050776936932412116196873940391255556144602438043051202669481315815563426485745529852715238204007458835814031632154297398474046822735488314274833128663625622696426897686235214592580227643619058568206702567526889874900408001261072458491717134998555414093364135769335058603696074283944012359967071699536759875729701777013093304241247361315389634556108515669634937356974764898161234259181710220944626417136543462508130887160390038565862558338213523432450044474892480328920006814808507774001018124947961237940621675747572885603856749943569763058911573841442513255091186312928518917073408317264069858322733557346511816506560763381196787081666846094881873330861613462862207476143475364830572229226436004439701289088167233807811781031943619809206355933849600562755507694859821794923657723346719068202574482734875855532999389711111872640944012197013371999574985509655653442199750709162680273635148752152643785448614866650109710408991552536353244815974029461247796094797174205290478591475410508079702685458510474575930395430897671450528715466784262657025991937217804811323501271265945561118795347358462589483632726615136521173823981189989811701673379374285817123850171865385764656193432045530936953611735290867893954836307263364092112408688086789482171613808692042644818104972392664590749580609780736793358629089970687064940032281111167380927392271808316723797920355050193357334619483774825701802804244459607770241270229490647535756825637926678405461941335537134988037724304637475375901583314841242290615545213073681820189261380830470001474848598430049008012408276166632184057422488784106354088704745290351554975299055092349572187081779742905512908501581895615880119761996514548971427934100314428549252443215901165320839940202739761737442780062513526404163780830103058127459662698360044733774502048388421232009902546837681521635117397368742819940337573639423772581365538470667977174465685578719155996537089336407624331338686921201631206875312546343496931811472958909883046082934969644775572138679487692950780228983099178616046033589941835828872486652557153559510807595506583524144790954675345716796286445431401614351583676052804279754995668056562258840781506881440968713552627383271741863678605590783791849580695045015180566549206215669300175973645341556302111295668949378612121860689330287621626341635779249164684641320423604418449947451378892619021621883076643458200731038490037310512002420052407742184995498333748145094687706255476906845028765997955106215696084706202294821466744770310932193777655024402017012145066461380382869273989376667587341640503756040458942648946859652069778959730879442140597680623510271575247440357483273455997576694785305917032064136617821215465230325608982069740328058749522592311643736518930795091908406432710794218167159548957850792183169047887622027485099004158571599166334624995585795963295024941180619771310675932716478888640830613853040883359159963810974245419597528907253950933682196202184428381580680390605882459629671726086771357429810724508714532213782859640763315467220380125892379591194816660587209656522673176357046248411696544295331915331750984372753311596958104559032382237410697208835771757055344767793836302350635767024071257967332260577501197267323908248435463112405697029114138226821972376460360036607414804017955013093863369280154768989503375014506961533907848502122870902173532921132366469600582501384259745218300759216400121869675218653918483050141004266110657986079578023235068486326592868706264527284005548909067707164581628432491433586440026310768284528444132866133197469723350869302721807142711895345839793558284494290990761227996569838320739777932517854309488012853427033499962673839113989212184283657933255908216220302863032633300999908072938402993915560024676605776407655401793345004825834485606042253465224849375775095678467027482097572222910920138363271831903659459049687063054711385916301094726652007839908925416657654048531452924186859555851723040530263526485860478246024657304956121012550043065289901927221006143153495141554571221352323221560487441228686494516140462884424217162972887578977393032096355973625845711601094713427143746876914283473578804276850072014662815628477360561762286844447028163317404429624964673707210657071739142963060687389941495103652715626577496596957215898540804476308943493273780106168215798753775091277883535443218825773983549070663684731349632036161092918738694104944812106808957365461466703301622593512526006408353710046762734738997190874848235000863193927726683619321222238310450925047937337927822227136854203485878926589868195974305138513837276070377545599508127843508995371844711525960533229405775287818344059100232322846247117013197964508503675659910906175918271277460984470126499866736480066619910763335422254395293611549871547062516242862012560676695789668369681404199441487381893607158909983993794378618444555568765223600274445827540923273789039589348324518851178168390976711461940115000053010009403920505126114683118997002742936499335805414666655519499628113421636343183393889148699052986474592398875830621417124817077624964637036268348237141285340520545154751647856594802457575160424535266701006830907196932741872331023246719624986542317345422466415137283498273916716613436833170672609000922507672478018150542823768572721105609764366332044346537942164636279612975703372685138361507403639333804087829181171553808320378246704750118996919404333572255217561771413904455573905224102027474591867424145938048385289692764928501883745568486829401876778839202732513352321739138518276372507454922553716897705754774694000313790073203831863716398522617446548408270765755624020843489501334671097447204527759498317668752855216286968706767965815000279019425831480395194850762505611851832605279224229082512740988952885753405130130294961132780665338765330662143867036420669587542051046458766502916195937009253649053959690458356954867649014949095713636207129689355741228302560457429179082961796130857441927957098351709609456694659736231110691413981021553685522932499943650317644494073886063355395848090345889145917865929022722224806442948974930814222800843028505939929358081982783459994095803182038262729405534470634526862385123961353226582485687265281755126296587195044049127166921829894069302161295124626839361719894167471620121045021784692652522568092269320451574988579957687107112985919009406016970903220864556610870258848359227136053009562629801429633611456804146528791099469371323714017762493134061456891102225656255058919087422933773017364008473983019389964782408067956065216666048536145574152188677533444034470205962096514825072337041680908806015968839448821854345770623170810002484622267100633765307430723305708380372655385113382162323047023697042418107774475960172024096735234598707031070157585508924599523653748413099630958799957006062606008682472220780187971289650647672760163985246863103750311402608667204111184083260566821668341874792540046894204941716508005619209252379300995978559651691403116367093994716373972406988492088523064036023877793036068761409142702078191091965796531897073676875759936568071105808295012954051330520979136911908555333509743378092406173425430320415245104988005499524151074977509965329973183731586349470299226715550500754128401033432750691971970925985913487771370581705174887905921458351564318435798605245973478466110990133071367485941066374765140577934847006816480363134747525391330625544580130093305567976245399776848817269587698594266053242631789091011880936471343995570312039362422731757679943069129971100607898251319130331771271879801368398371001862541877594018508425938932351705370349045782266237585495998237687368818998412969186791249715419732047774338141761500254764883713198955509595970024584885431095673759765515902493982270615404790393577284551087208411164883582551375080156685424998001596405074935418480461770687536196823143113774273001529426599792982662215095188409628200315399691246517545261958768301568484936270489217344714405827032187316234016037849526560321624503331084392342780259673640101054115538436414419542153484220878269018432639439344422850818521555384321131366925490459864682226246913252544137533767650388104960112794779253634296667238146488202362394531007240418154002294567199972211688910686439813102804413357886450109033559609941506378161956317356259669219914241592380346567138610509290810574914040955902221130112528366483458646681984844672948013573726122564133989638028058628897271726058263305046378517962959180324304808399170913084843784701420930897086013716106355710908035541769054771390943212782349214515220464041842785360507146267496016605145564497378472396916365579081604094949994263566043427396578504563155450066088046877394236971430344756740246803283799557179515284666817026212068140065295282172160913802137583342306744107627266738988580116477886028616087299701144064852099316437060924019257310224647284143149645342598828248534767537125824136213053554792781588725012925973721909676127013061160834521546677003176198105579994407583944108136526925888422512497538692988638330632093697570989825655481409975909289179267245917104349597390072614736171963327388804414560059505258781532241983282103822192634646222866405999080272297873134635941686071242498165170327946842368819599104060984707097278751007283553795570471857962278956925580394407379871746216737350768538953633025263044785873044143585249064490948593949728967739984623195540316330948868753929370458014434683075722213077256225179222837931877142348319360754871057625273335236539988319533013535419898830777169780610383956931643022039234739861584417973512446587902362114735360940332529330827676004237255856668112712331990581445313931877525339355049596622074567778563802000632430998309904170834078081760202809262822041179581092645409364966928901286686872470605448836473680075228888824699638520362988769882561130490565131386110912682158787401873681737233820217398325259655677294054422459346623231524793335215767563788178983372781671107349746967638738839785020407571639700095267739586195436079810243949284994934915108282035535197680919846414909820058373816248279027191889849777017444045589572030731658278820554751778997133865936715137606517284968605305421014857174508670338708412801220363512884889887509979124609551919549010114968726068995090433233691562362391133599766917836880860230277726580661397595644411632788721242962453872691131228880600549245409294274021478494704910050934243347521324948349263655594513546866222542579444312979848245467212802210176057155019637864308380331534540189034971885641508441849705139443980582062815618662705677976705984836197989400614272787820601630188446299108261943466083569819681887938853954550534603604667005063856259757816370793684660011192928907068553380315982583790382064314499816849461387881237166543838116747657339893804684714091679534873103928198752755626270741607878040445668306095606487378627356410853998405438974802204934930894361369720699280254958191703186657674438012472174588536530534459097286445073030274650497986981187177443774000486046464173220660314925162093044279728477625856829530308851351919174990373178991051400337998411327890480783689165213863965245340463916660099565539640572154704855534059066975331211501120260348670604778710528673957807498229096227928841781313952132691617914169602125780914937465564476795025634819016552372916662854951121431251240980749787127092753860833628812509339128426924585142312398726702392939260390466259166706795936482203482395529530394826779920381028462915034082465487699773884632398502790086060606919759407950227177288179068495785979872835704081049308595938581019470867901883729186475335813737915886231669924078218529683348460181314178300038590645790076387289282712414305845902268054118437407652035171539198604216636469548351666717899107444432755158025532425108718532409354931803675595176128287426078294065380294260483416772372766303699737283960244665488594722322487725916755959969907141031228082201964149503762075877308089623907964006536989056030995459106767172542982066106481153753195246653637281964222346602434731532318265832155642117400663214894211058633475650992226757845604858206941107027771603263067640230065900758789812696950934282184093966470759598568135654539773127249262151955591829312385605807491983119158565718571402374590972567944052344147249533505173479233312389596154859629597976726127096667926680899734160367828084274868649457749676355070563317114230636927426580985640901680621450579022016447760619545203756027927388341667855213758214576291970738043034183267705335651870677519869490953387232384022076306225727455302202933666800833533048911577220251671454387229839428394830149059710675302196821438311881807928249667734805641500284650426188381345033086355203677480025862812869573666272507808676166634013026136238422977417181266222923302373652114007477748078415998874820942633007857449210524709915436567495174912297864572083064781204008510774440424300301980846065211868186683687337962707124714924890379413880989434414189451613003873950895568198842713513779144125833560294702341401674318274421255509780908013496913621440236504242534684327359561510320376744182766462665388058393219429010332635824937475904382380931555157090860028581269014675343696589797757166991191643381778559557861340175520470531106842670377998552502438119632487887891709106546465845209199240982507588017432611167252562463874896420995545766697586783112130035962954176090514081291823590352513711959313308353646523543070850643766471051515393557028293017557414545144335662048416881121347800793925349950083018426874272246962112732510880278356229753570609036138117620505385904594291026554654930661973610949343453469425926946840016585151170636030530078771977812639482469664694006863203915115717757915564942763793195808054110062939529972173522112088984780649687335415755456064579506069035699485958450528613713734078095377875801336239595831926927824415560162861297829069755294076552280787266505991683710934130460762512557814038557523431478808691640441671687938566543051383487578079721223806763648866627388045947124622406914676878978307590667804288777588583653546491188097751746202548138418588271822494167524402779372492132435887120081691531122435674393628630331933479938379144657442892576299513215002510080079541245837603595718353049305264777591278199772587720203448783448352524617843000406102187481201898827915377567533964997609691812635369280326042133078060705334582515837059502428018653183195462005406400433990581554728550271540260257562077734318875621058749759104641034187800582701158252714328119152781294850937296322610279072090345914359139326687743148139800862092302547683810747869658356924085095675325810317157294010157234440371748969693544888461812554297613975384910512280712665355410964808479828718889621271354164275770635839994575417960905671952828532130571056280721214064241138228093251849837887390353369386735757146551003091494995481484352629253470120486237164570807576702587036953738134426173680334548271186348449683308374627918947237149201452242734198979049143818356547509930437016265373140416919491948929204104665463654346361147359992867185583638181215495300456841735327202856434290253489724022440441171954732993733846344396001524337443062515537216818693983392890138762316107453463312061545605682437145369335022260135626452655706466254109293556309995501362619218656004250136852955635355921514654098024223677349273613354919461280797403286337755783427544598343447384999824506621535792802288909598165121819607028888542938402083603777588795996144420483614124410101050273320028178023791151588346834816837040935749954581864607194815605287956356620436778326212634889400240710833041484363960774099855445338326146916987002810183599054864362022270726002837098536474147325751254024587242470691168611255052033035782278747303685954037750620689632054740640065410828297482223359756205863198387628874487247523814486792971816046222034195051442900473728723139369276442529693155357373864992945128877445108384424974440510356353026884695616377746045091559752735206218063624944093726491825721264886125261794368217004472552505962516093720071743400748423778188888430675456875451000026238437758063232849115717121398982698693093531926992889994800730595628977408167005075046532255431665606561584282092059514372147

Execution Trace

IlluminatiPass.60008080( )
/**
 *Submitted for verification at Etherscan.io on 2022-07-11
*/

// SPDX-License-Identifier: MIT
// 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);
}

// OpenZeppelin Contracts v4.4.1 (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`, 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId)
        external
        view
        returns (address operator);

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

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

// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

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

// 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;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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);
            }
        }
    }
}

// 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;
    }
}

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

// OpenZeppelin Contracts v4.4.1 (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 tokenId);

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

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..).
 *
 * Assumes the number of issuable tokens (collection size) is capped and fits in a uint128.
 *
 * Does not support burning tokens to address(0).
 */
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 private currentIndex = 0;

  uint256 internal immutable collectionSize;
  uint256 internal immutable maxBatchSize;

  // 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) private _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;

  /**
   * @dev
   * `maxBatchSize` refers to how much a minter can mint at a time.
   * `collectionSize_` refers to how many tokens are in the collection.
   */
  constructor(
    string memory name_,
    string memory symbol_,
    uint256 maxBatchSize_,
    uint256 collectionSize_
  ) {
    require(
      collectionSize_ > 0,
      "ERC721A: collection must have a nonzero supply"
    );
    require(maxBatchSize_ > 0, "ERC721A: max batch size must be nonzero");
    _name = name_;
    _symbol = symbol_;
    maxBatchSize = maxBatchSize_;
    collectionSize = collectionSize_;
  }

  /**
   * @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(collectionSize). 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 = 0;
    address currOwnershipAddr = address(0);
    for (uint256 i = 0; 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);
  }

  function ownershipOf(uint256 tokenId)
    internal
    view
    returns (TokenOwnership memory)
  {
    require(_exists(tokenId), "ERC721A: owner query for nonexistent token");

    uint256 lowestTokenToCheck;
    if (tokenId >= maxBatchSize) {
      lowestTokenToCheck = tokenId - maxBatchSize + 1;
    }

    for (uint256 curr = tokenId; curr >= lowestTokenToCheck; 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(), ".json"))
        : "";
  }

  /**
   * @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 override {
    _transfer(from, to, tokenId);
  }

  /**
   * @dev See {IERC721-safeTransferFrom}.
   */
  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId
  ) public 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 Mints `quantity` tokens and transfers them to `to`.
   *
   * Requirements:
   *
   * - there must be `quantity` tokens remaining unminted in the total collection.
   * - `to` cannot be the zero address.
   * - `quantity` cannot be larger than the max batch size.
   *
   * Emits a {Transfer} event.
   */
  function _safeMint(
    address to,
    uint256 quantity,
    bytes memory _data
  ) internal {
    uint256 startTokenId = currentIndex;
    require(to != address(0), "ERC721A: mint to the zero address");
    // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
    require(!_exists(startTokenId), "ERC721A: token already minted");
    require(quantity <= maxBatchSize, "ERC721A: quantity to mint too high");

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

    AddressData memory addressData = _addressData[to];
    _addressData[to] = AddressData(
      addressData.balance + uint128(quantity),
      addressData.numberMinted + uint128(quantity)
    );
    _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));

    uint256 updatedIndex = startTokenId;

    for (uint256 i = 0; i < quantity; i++) {
      emit Transfer(address(0), to, updatedIndex);
      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);

    _addressData[from].balance -= 1;
    _addressData[to].balance += 1;
    _ownerships[tokenId] = TokenOwnership(to, 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] = TokenOwnership(
          prevOwnership.addr,
          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);
  }

  uint256 public nextOwnerToExplicitlySet = 0;

  /**
   * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
   */
  function _setOwnersExplicit(uint256 quantity) internal {
    uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
    require(quantity > 0, "quantity must be nonzero");
    uint256 endIndex = oldNextOwnerToSet + quantity - 1;
    if (endIndex > collectionSize - 1) {
      endIndex = collectionSize - 1;
    }
    // We know if the last one in the group exists, all in the group exist, due to serial ordering.
    require(_exists(endIndex), "not enough minted yet for this cleanup");
    for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) {
      if (_ownerships[i].addr == address(0)) {
        TokenOwnership memory ownership = ownershipOf(i);
        _ownerships[i] = TokenOwnership(
          ownership.addr,
          ownership.startTimestamp
        );
      }
    }
    nextOwnerToExplicitlySet = endIndex + 1;
  }

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

// 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;

    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(), "You are not the owner");
        _;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(
            newOwner != address(0),
            "Ownable: new owner is the zero address"
        );
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}


pragma solidity ^0.8.0;

contract IlluminatiPass is ERC721A, Ownable {
    uint256 public NFT_PRICE = 0 ether;
    uint256 public MAX_SUPPLY = 2500;
    uint256 public MAX_MINTS = 300;
    string public baseURI = "";
    string public baseExtension = ".json";
     bool public paused = true;   
    
    constructor() ERC721A("Illuminati Pass", "ILMT", MAX_MINTS, MAX_SUPPLY) {  
        _safeMint(_msgSender(), 1);
    }
    

    function MintFree(uint256 numTokens) public payable {
        require(!paused, "Paused");
        require(numTokens >= 1 || numTokens <= 2);
        _safeMint(msg.sender, numTokens);
    }

    function AdminMint(uint256 numTokens) public payable onlyOwner {
        _safeMint(msg.sender, numTokens);
    }


    function pause(bool _state) public onlyOwner {
        paused = _state;
    }

    function setBaseURI(string memory newBaseURI) public onlyOwner {
        baseURI = newBaseURI;
    }
    function tokenURI(uint256 _tokenId)
        public
        view
        override
        returns (string memory)
    {
        require(_exists(_tokenId), "That token doesn't exist");
        return
            bytes(baseURI).length > 0
                ? string(
                    abi.encodePacked(
                        baseURI,
                        Strings.toString(_tokenId),
                        baseExtension
                    )
                )
                : "";
    }

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