utils.adoc 446 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577
  1. :github-icon: pass:[<svg class="icon"><use href="#github-icon"/></svg>]
  2. :Math: pass:normal[xref:utils.adoc#Math[`Math`]]
  3. :SignedMath: pass:normal[xref:utils.adoc#SignedMath[`SignedMath`]]
  4. :SafeCast: pass:normal[xref:utils.adoc#SafeCast[`SafeCast`]]
  5. :ECDSA: pass:normal[xref:utils.adoc#ECDSA[`ECDSA`]]
  6. :MessageHashUtils: pass:normal[xref:utils.adoc#MessageHashUtils[`MessageHashUtils`]]
  7. :P256: pass:normal[xref:utils.adoc#P256[`P256`]]
  8. :RSA: pass:normal[xref:utils.adoc#RSA[`RSA`]]
  9. :SignatureChecker: pass:normal[xref:utils.adoc#SignatureChecker[`SignatureChecker`]]
  10. :Hashes: pass:normal[xref:utils.adoc#Hashes[`Hashes`]]
  11. :MerkleProof: pass:normal[xref:utils.adoc#MerkleProof[`MerkleProof`]]
  12. :EIP712: pass:normal[xref:utils.adoc#EIP712[`EIP712`]]
  13. :ReentrancyGuard: pass:normal[xref:utils.adoc#ReentrancyGuard[`ReentrancyGuard`]]
  14. :ReentrancyGuardTransient: pass:normal[xref:utils.adoc#ReentrancyGuardTransient[`ReentrancyGuardTransient`]]
  15. :ReentrancyGuard: pass:normal[xref:utils.adoc#ReentrancyGuard[`ReentrancyGuard`]]
  16. :Pausable: pass:normal[xref:utils.adoc#Pausable[`Pausable`]]
  17. :Nonces: pass:normal[xref:utils.adoc#Nonces[`Nonces`]]
  18. :NoncesKeyed: pass:normal[xref:utils.adoc#NoncesKeyed[`NoncesKeyed`]]
  19. :Nonces: pass:normal[xref:utils.adoc#Nonces[`Nonces`]]
  20. :ERC165: pass:normal[xref:utils.adoc#ERC165[`ERC165`]]
  21. :ERC165Checker: pass:normal[xref:utils.adoc#ERC165Checker[`ERC165Checker`]]
  22. :BitMaps: pass:normal[xref:utils.adoc#BitMaps[`BitMaps`]]
  23. :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
  24. :EnumerableSet: pass:normal[xref:utils.adoc#EnumerableSet[`EnumerableSet`]]
  25. :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
  26. :DoubleEndedQueue: pass:normal[xref:utils.adoc#DoubleEndedQueue[`DoubleEndedQueue`]]
  27. :CircularBuffer: pass:normal[xref:utils.adoc#CircularBuffer[`CircularBuffer`]]
  28. :Checkpoints: pass:normal[xref:utils.adoc#Checkpoints[`Checkpoints`]]
  29. :Heap: pass:normal[xref:utils.adoc#Heap[`Heap`]]
  30. :MerkleTree: pass:normal[xref:utils.adoc#MerkleTree[`MerkleTree`]]
  31. :Create2: pass:normal[xref:utils.adoc#Create2[`Create2`]]
  32. :Address: pass:normal[xref:utils.adoc#Address[`Address`]]
  33. :Arrays: pass:normal[xref:utils.adoc#Arrays[`Arrays`]]
  34. :Base64: pass:normal[xref:utils.adoc#Base64[`Base64`]]
  35. :Bytes: pass:normal[xref:utils.adoc#Bytes[`Bytes`]]
  36. :Strings: pass:normal[xref:utils.adoc#Strings[`Strings`]]
  37. :ShortString: pass:normal[xref:utils.adoc#ShortString[`ShortString`]]
  38. :SlotDerivation: pass:normal[xref:utils.adoc#SlotDerivation[`SlotDerivation`]]
  39. :StorageSlot: pass:normal[xref:utils.adoc#StorageSlot[`StorageSlot`]]
  40. :TransientSlot: pass:normal[xref:utils.adoc#TransientSlot[`TransientSlot`]]
  41. :Multicall: pass:normal[xref:utils.adoc#Multicall[`Multicall`]]
  42. :Context: pass:normal[xref:utils.adoc#Context[`Context`]]
  43. :Packing: pass:normal[xref:utils.adoc#Packing[`Packing`]]
  44. :Panic: pass:normal[xref:utils.adoc#Panic[`Panic`]]
  45. :Comparators: pass:normal[xref:utils.adoc#Comparators[`Comparators`]]
  46. :Heap: pass:normal[xref:utils.adoc#Heap[`Heap`]]
  47. :CAIP2: pass:normal[xref:utils.adoc#CAIP2[`CAIP2`]]
  48. :CAIP10: pass:normal[xref:utils.adoc#CAIP10[`CAIP10`]]
  49. :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
  50. :EnumerableSet: pass:normal[xref:utils.adoc#EnumerableSet[`EnumerableSet`]]
  51. :xref-Math-tryAdd-uint256-uint256-: xref:utils.adoc#Math-tryAdd-uint256-uint256-
  52. :xref-Math-trySub-uint256-uint256-: xref:utils.adoc#Math-trySub-uint256-uint256-
  53. :xref-Math-tryMul-uint256-uint256-: xref:utils.adoc#Math-tryMul-uint256-uint256-
  54. :xref-Math-tryDiv-uint256-uint256-: xref:utils.adoc#Math-tryDiv-uint256-uint256-
  55. :xref-Math-tryMod-uint256-uint256-: xref:utils.adoc#Math-tryMod-uint256-uint256-
  56. :xref-Math-ternary-bool-uint256-uint256-: xref:utils.adoc#Math-ternary-bool-uint256-uint256-
  57. :xref-Math-max-uint256-uint256-: xref:utils.adoc#Math-max-uint256-uint256-
  58. :xref-Math-min-uint256-uint256-: xref:utils.adoc#Math-min-uint256-uint256-
  59. :xref-Math-average-uint256-uint256-: xref:utils.adoc#Math-average-uint256-uint256-
  60. :xref-Math-ceilDiv-uint256-uint256-: xref:utils.adoc#Math-ceilDiv-uint256-uint256-
  61. :xref-Math-mulDiv-uint256-uint256-uint256-: xref:utils.adoc#Math-mulDiv-uint256-uint256-uint256-
  62. :xref-Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-
  63. :xref-Math-invMod-uint256-uint256-: xref:utils.adoc#Math-invMod-uint256-uint256-
  64. :xref-Math-invModPrime-uint256-uint256-: xref:utils.adoc#Math-invModPrime-uint256-uint256-
  65. :xref-Math-modExp-uint256-uint256-uint256-: xref:utils.adoc#Math-modExp-uint256-uint256-uint256-
  66. :xref-Math-tryModExp-uint256-uint256-uint256-: xref:utils.adoc#Math-tryModExp-uint256-uint256-uint256-
  67. :xref-Math-modExp-bytes-bytes-bytes-: xref:utils.adoc#Math-modExp-bytes-bytes-bytes-
  68. :xref-Math-tryModExp-bytes-bytes-bytes-: xref:utils.adoc#Math-tryModExp-bytes-bytes-bytes-
  69. :xref-Math-sqrt-uint256-: xref:utils.adoc#Math-sqrt-uint256-
  70. :xref-Math-sqrt-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-sqrt-uint256-enum-Math-Rounding-
  71. :xref-Math-log2-uint256-: xref:utils.adoc#Math-log2-uint256-
  72. :xref-Math-log2-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log2-uint256-enum-Math-Rounding-
  73. :xref-Math-log10-uint256-: xref:utils.adoc#Math-log10-uint256-
  74. :xref-Math-log10-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log10-uint256-enum-Math-Rounding-
  75. :xref-Math-log256-uint256-: xref:utils.adoc#Math-log256-uint256-
  76. :xref-Math-log256-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log256-uint256-enum-Math-Rounding-
  77. :xref-Math-unsignedRoundsUp-enum-Math-Rounding-: xref:utils.adoc#Math-unsignedRoundsUp-enum-Math-Rounding-
  78. :xref-SignedMath-ternary-bool-int256-int256-: xref:utils.adoc#SignedMath-ternary-bool-int256-int256-
  79. :xref-SignedMath-max-int256-int256-: xref:utils.adoc#SignedMath-max-int256-int256-
  80. :xref-SignedMath-min-int256-int256-: xref:utils.adoc#SignedMath-min-int256-int256-
  81. :xref-SignedMath-average-int256-int256-: xref:utils.adoc#SignedMath-average-int256-int256-
  82. :xref-SignedMath-abs-int256-: xref:utils.adoc#SignedMath-abs-int256-
  83. :xref-SafeCast-toUint248-uint256-: xref:utils.adoc#SafeCast-toUint248-uint256-
  84. :xref-SafeCast-toUint240-uint256-: xref:utils.adoc#SafeCast-toUint240-uint256-
  85. :xref-SafeCast-toUint232-uint256-: xref:utils.adoc#SafeCast-toUint232-uint256-
  86. :xref-SafeCast-toUint224-uint256-: xref:utils.adoc#SafeCast-toUint224-uint256-
  87. :xref-SafeCast-toUint216-uint256-: xref:utils.adoc#SafeCast-toUint216-uint256-
  88. :xref-SafeCast-toUint208-uint256-: xref:utils.adoc#SafeCast-toUint208-uint256-
  89. :xref-SafeCast-toUint200-uint256-: xref:utils.adoc#SafeCast-toUint200-uint256-
  90. :xref-SafeCast-toUint192-uint256-: xref:utils.adoc#SafeCast-toUint192-uint256-
  91. :xref-SafeCast-toUint184-uint256-: xref:utils.adoc#SafeCast-toUint184-uint256-
  92. :xref-SafeCast-toUint176-uint256-: xref:utils.adoc#SafeCast-toUint176-uint256-
  93. :xref-SafeCast-toUint168-uint256-: xref:utils.adoc#SafeCast-toUint168-uint256-
  94. :xref-SafeCast-toUint160-uint256-: xref:utils.adoc#SafeCast-toUint160-uint256-
  95. :xref-SafeCast-toUint152-uint256-: xref:utils.adoc#SafeCast-toUint152-uint256-
  96. :xref-SafeCast-toUint144-uint256-: xref:utils.adoc#SafeCast-toUint144-uint256-
  97. :xref-SafeCast-toUint136-uint256-: xref:utils.adoc#SafeCast-toUint136-uint256-
  98. :xref-SafeCast-toUint128-uint256-: xref:utils.adoc#SafeCast-toUint128-uint256-
  99. :xref-SafeCast-toUint120-uint256-: xref:utils.adoc#SafeCast-toUint120-uint256-
  100. :xref-SafeCast-toUint112-uint256-: xref:utils.adoc#SafeCast-toUint112-uint256-
  101. :xref-SafeCast-toUint104-uint256-: xref:utils.adoc#SafeCast-toUint104-uint256-
  102. :xref-SafeCast-toUint96-uint256-: xref:utils.adoc#SafeCast-toUint96-uint256-
  103. :xref-SafeCast-toUint88-uint256-: xref:utils.adoc#SafeCast-toUint88-uint256-
  104. :xref-SafeCast-toUint80-uint256-: xref:utils.adoc#SafeCast-toUint80-uint256-
  105. :xref-SafeCast-toUint72-uint256-: xref:utils.adoc#SafeCast-toUint72-uint256-
  106. :xref-SafeCast-toUint64-uint256-: xref:utils.adoc#SafeCast-toUint64-uint256-
  107. :xref-SafeCast-toUint56-uint256-: xref:utils.adoc#SafeCast-toUint56-uint256-
  108. :xref-SafeCast-toUint48-uint256-: xref:utils.adoc#SafeCast-toUint48-uint256-
  109. :xref-SafeCast-toUint40-uint256-: xref:utils.adoc#SafeCast-toUint40-uint256-
  110. :xref-SafeCast-toUint32-uint256-: xref:utils.adoc#SafeCast-toUint32-uint256-
  111. :xref-SafeCast-toUint24-uint256-: xref:utils.adoc#SafeCast-toUint24-uint256-
  112. :xref-SafeCast-toUint16-uint256-: xref:utils.adoc#SafeCast-toUint16-uint256-
  113. :xref-SafeCast-toUint8-uint256-: xref:utils.adoc#SafeCast-toUint8-uint256-
  114. :xref-SafeCast-toUint256-int256-: xref:utils.adoc#SafeCast-toUint256-int256-
  115. :xref-SafeCast-toInt248-int256-: xref:utils.adoc#SafeCast-toInt248-int256-
  116. :xref-SafeCast-toInt240-int256-: xref:utils.adoc#SafeCast-toInt240-int256-
  117. :xref-SafeCast-toInt232-int256-: xref:utils.adoc#SafeCast-toInt232-int256-
  118. :xref-SafeCast-toInt224-int256-: xref:utils.adoc#SafeCast-toInt224-int256-
  119. :xref-SafeCast-toInt216-int256-: xref:utils.adoc#SafeCast-toInt216-int256-
  120. :xref-SafeCast-toInt208-int256-: xref:utils.adoc#SafeCast-toInt208-int256-
  121. :xref-SafeCast-toInt200-int256-: xref:utils.adoc#SafeCast-toInt200-int256-
  122. :xref-SafeCast-toInt192-int256-: xref:utils.adoc#SafeCast-toInt192-int256-
  123. :xref-SafeCast-toInt184-int256-: xref:utils.adoc#SafeCast-toInt184-int256-
  124. :xref-SafeCast-toInt176-int256-: xref:utils.adoc#SafeCast-toInt176-int256-
  125. :xref-SafeCast-toInt168-int256-: xref:utils.adoc#SafeCast-toInt168-int256-
  126. :xref-SafeCast-toInt160-int256-: xref:utils.adoc#SafeCast-toInt160-int256-
  127. :xref-SafeCast-toInt152-int256-: xref:utils.adoc#SafeCast-toInt152-int256-
  128. :xref-SafeCast-toInt144-int256-: xref:utils.adoc#SafeCast-toInt144-int256-
  129. :xref-SafeCast-toInt136-int256-: xref:utils.adoc#SafeCast-toInt136-int256-
  130. :xref-SafeCast-toInt128-int256-: xref:utils.adoc#SafeCast-toInt128-int256-
  131. :xref-SafeCast-toInt120-int256-: xref:utils.adoc#SafeCast-toInt120-int256-
  132. :xref-SafeCast-toInt112-int256-: xref:utils.adoc#SafeCast-toInt112-int256-
  133. :xref-SafeCast-toInt104-int256-: xref:utils.adoc#SafeCast-toInt104-int256-
  134. :xref-SafeCast-toInt96-int256-: xref:utils.adoc#SafeCast-toInt96-int256-
  135. :xref-SafeCast-toInt88-int256-: xref:utils.adoc#SafeCast-toInt88-int256-
  136. :xref-SafeCast-toInt80-int256-: xref:utils.adoc#SafeCast-toInt80-int256-
  137. :xref-SafeCast-toInt72-int256-: xref:utils.adoc#SafeCast-toInt72-int256-
  138. :xref-SafeCast-toInt64-int256-: xref:utils.adoc#SafeCast-toInt64-int256-
  139. :xref-SafeCast-toInt56-int256-: xref:utils.adoc#SafeCast-toInt56-int256-
  140. :xref-SafeCast-toInt48-int256-: xref:utils.adoc#SafeCast-toInt48-int256-
  141. :xref-SafeCast-toInt40-int256-: xref:utils.adoc#SafeCast-toInt40-int256-
  142. :xref-SafeCast-toInt32-int256-: xref:utils.adoc#SafeCast-toInt32-int256-
  143. :xref-SafeCast-toInt24-int256-: xref:utils.adoc#SafeCast-toInt24-int256-
  144. :xref-SafeCast-toInt16-int256-: xref:utils.adoc#SafeCast-toInt16-int256-
  145. :xref-SafeCast-toInt8-int256-: xref:utils.adoc#SafeCast-toInt8-int256-
  146. :xref-SafeCast-toInt256-uint256-: xref:utils.adoc#SafeCast-toInt256-uint256-
  147. :xref-SafeCast-toUint-bool-: xref:utils.adoc#SafeCast-toUint-bool-
  148. :xref-SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-: xref:utils.adoc#SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-
  149. :xref-SafeCast-SafeCastOverflowedIntToUint-int256-: xref:utils.adoc#SafeCast-SafeCastOverflowedIntToUint-int256-
  150. :xref-SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-: xref:utils.adoc#SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-
  151. :xref-SafeCast-SafeCastOverflowedUintToInt-uint256-: xref:utils.adoc#SafeCast-SafeCastOverflowedUintToInt-uint256-
  152. :xref-ECDSA-tryRecover-bytes32-bytes-: xref:utils.adoc#ECDSA-tryRecover-bytes32-bytes-
  153. :xref-ECDSA-recover-bytes32-bytes-: xref:utils.adoc#ECDSA-recover-bytes32-bytes-
  154. :xref-ECDSA-tryRecover-bytes32-bytes32-bytes32-: xref:utils.adoc#ECDSA-tryRecover-bytes32-bytes32-bytes32-
  155. :xref-ECDSA-recover-bytes32-bytes32-bytes32-: xref:utils.adoc#ECDSA-recover-bytes32-bytes32-bytes32-
  156. :xref-ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-
  157. :xref-ECDSA-recover-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-
  158. :xref-ECDSA-ECDSAInvalidSignature--: xref:utils.adoc#ECDSA-ECDSAInvalidSignature--
  159. :xref-ECDSA-ECDSAInvalidSignatureLength-uint256-: xref:utils.adoc#ECDSA-ECDSAInvalidSignatureLength-uint256-
  160. :xref-ECDSA-ECDSAInvalidSignatureS-bytes32-: xref:utils.adoc#ECDSA-ECDSAInvalidSignatureS-bytes32-
  161. :MessageHashUtils-toEthSignedMessageHash: pass:normal[xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes-[`MessageHashUtils.toEthSignedMessageHash`]]
  162. :MessageHashUtils-toEthSignedMessageHash: pass:normal[xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes-[`MessageHashUtils.toEthSignedMessageHash`]]
  163. :ECDSA-tryRecover: pass:normal[xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`ECDSA.tryRecover`]]
  164. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  165. :ECDSA-tryRecover: pass:normal[xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`ECDSA.tryRecover`]]
  166. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  167. :xref-P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-: xref:utils.adoc#P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-
  168. :xref-P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-: xref:utils.adoc#P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-
  169. :xref-P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-: xref:utils.adoc#P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-
  170. :xref-P256-recovery-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#P256-recovery-bytes32-uint8-bytes32-bytes32-
  171. :xref-P256-isValidPublicKey-bytes32-bytes32-: xref:utils.adoc#P256-isValidPublicKey-bytes32-bytes32-
  172. :xref-P256-GX-uint256: xref:utils.adoc#P256-GX-uint256
  173. :xref-P256-GY-uint256: xref:utils.adoc#P256-GY-uint256
  174. :xref-P256-P-uint256: xref:utils.adoc#P256-P-uint256
  175. :xref-P256-N-uint256: xref:utils.adoc#P256-N-uint256
  176. :xref-P256-A-uint256: xref:utils.adoc#P256-A-uint256
  177. :xref-P256-B-uint256: xref:utils.adoc#P256-B-uint256
  178. :xref-RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-: xref:utils.adoc#RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-
  179. :xref-RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-: xref:utils.adoc#RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-
  180. :xref-EIP712-constructor-string-string-: xref:utils.adoc#EIP712-constructor-string-string-
  181. :xref-EIP712-_domainSeparatorV4--: xref:utils.adoc#EIP712-_domainSeparatorV4--
  182. :xref-EIP712-_hashTypedDataV4-bytes32-: xref:utils.adoc#EIP712-_hashTypedDataV4-bytes32-
  183. :xref-EIP712-eip712Domain--: xref:utils.adoc#EIP712-eip712Domain--
  184. :xref-EIP712-_EIP712Name--: xref:utils.adoc#EIP712-_EIP712Name--
  185. :xref-EIP712-_EIP712Version--: xref:utils.adoc#EIP712-_EIP712Version--
  186. :xref-IERC5267-EIP712DomainChanged--: xref:interfaces.adoc#IERC5267-EIP712DomainChanged--
  187. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  188. :ECDSA: pass:normal[xref:utils.adoc#ECDSA[`ECDSA`]]
  189. :xref-MessageHashUtils-toEthSignedMessageHash-bytes32-: xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes32-
  190. :xref-MessageHashUtils-toEthSignedMessageHash-bytes-: xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes-
  191. :xref-MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-: xref:utils.adoc#MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-
  192. :xref-MessageHashUtils-toTypedDataHash-bytes32-bytes32-: xref:utils.adoc#MessageHashUtils-toTypedDataHash-bytes32-bytes32-
  193. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  194. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  195. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  196. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  197. :xref-SignatureChecker-isValidSignatureNow-address-bytes32-bytes-: xref:utils.adoc#SignatureChecker-isValidSignatureNow-address-bytes32-bytes-
  198. :xref-SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-: xref:utils.adoc#SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-
  199. :xref-Hashes-commutativeKeccak256-bytes32-bytes32-: xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-
  200. :xref-MerkleProof-verify-bytes32---bytes32-bytes32-: xref:utils.adoc#MerkleProof-verify-bytes32---bytes32-bytes32-
  201. :xref-MerkleProof-processProof-bytes32---bytes32-: xref:utils.adoc#MerkleProof-processProof-bytes32---bytes32-
  202. :xref-MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--
  203. :xref-MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--
  204. :xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-: xref:utils.adoc#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-
  205. :xref-MerkleProof-processProofCalldata-bytes32---bytes32-: xref:utils.adoc#MerkleProof-processProofCalldata-bytes32---bytes32-
  206. :xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--
  207. :xref-MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--
  208. :xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---: xref:utils.adoc#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---
  209. :xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---: xref:utils.adoc#MerkleProof-processMultiProof-bytes32---bool---bytes32---
  210. :xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--
  211. :xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--
  212. :xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---: xref:utils.adoc#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---
  213. :xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---: xref:utils.adoc#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---
  214. :xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--
  215. :xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--
  216. :xref-MerkleProof-MerkleProofInvalidMultiproof--: xref:utils.adoc#MerkleProof-MerkleProofInvalidMultiproof--
  217. :ReentrancyGuardTransient: pass:normal[xref:utils.adoc#ReentrancyGuardTransient[`ReentrancyGuardTransient`]]
  218. :xref-ReentrancyGuard-nonReentrant--: xref:utils.adoc#ReentrancyGuard-nonReentrant--
  219. :xref-ReentrancyGuard-constructor--: xref:utils.adoc#ReentrancyGuard-constructor--
  220. :xref-ReentrancyGuard-_reentrancyGuardEntered--: xref:utils.adoc#ReentrancyGuard-_reentrancyGuardEntered--
  221. :xref-ReentrancyGuard-ReentrancyGuardReentrantCall--: xref:utils.adoc#ReentrancyGuard-ReentrancyGuardReentrantCall--
  222. :ReentrancyGuard: pass:normal[xref:utils.adoc#ReentrancyGuard[`ReentrancyGuard`]]
  223. :xref-ReentrancyGuardTransient-nonReentrant--: xref:utils.adoc#ReentrancyGuardTransient-nonReentrant--
  224. :xref-ReentrancyGuardTransient-_reentrancyGuardEntered--: xref:utils.adoc#ReentrancyGuardTransient-_reentrancyGuardEntered--
  225. :xref-ReentrancyGuardTransient-ReentrancyGuardReentrantCall--: xref:utils.adoc#ReentrancyGuardTransient-ReentrancyGuardReentrantCall--
  226. :xref-Pausable-whenNotPaused--: xref:utils.adoc#Pausable-whenNotPaused--
  227. :xref-Pausable-whenPaused--: xref:utils.adoc#Pausable-whenPaused--
  228. :xref-Pausable-constructor--: xref:utils.adoc#Pausable-constructor--
  229. :xref-Pausable-paused--: xref:utils.adoc#Pausable-paused--
  230. :xref-Pausable-_requireNotPaused--: xref:utils.adoc#Pausable-_requireNotPaused--
  231. :xref-Pausable-_requirePaused--: xref:utils.adoc#Pausable-_requirePaused--
  232. :xref-Pausable-_pause--: xref:utils.adoc#Pausable-_pause--
  233. :xref-Pausable-_unpause--: xref:utils.adoc#Pausable-_unpause--
  234. :xref-Pausable-Paused-address-: xref:utils.adoc#Pausable-Paused-address-
  235. :xref-Pausable-Unpaused-address-: xref:utils.adoc#Pausable-Unpaused-address-
  236. :xref-Pausable-EnforcedPause--: xref:utils.adoc#Pausable-EnforcedPause--
  237. :xref-Pausable-ExpectedPause--: xref:utils.adoc#Pausable-ExpectedPause--
  238. :xref-Nonces-nonces-address-: xref:utils.adoc#Nonces-nonces-address-
  239. :xref-Nonces-_useNonce-address-: xref:utils.adoc#Nonces-_useNonce-address-
  240. :xref-Nonces-_useCheckedNonce-address-uint256-: xref:utils.adoc#Nonces-_useCheckedNonce-address-uint256-
  241. :xref-Nonces-InvalidAccountNonce-address-uint256-: xref:utils.adoc#Nonces-InvalidAccountNonce-address-uint256-
  242. :Nonces: pass:normal[xref:utils.adoc#Nonces[`Nonces`]]
  243. :Nonces: pass:normal[xref:utils.adoc#Nonces[`Nonces`]]
  244. :Nonces: pass:normal[xref:utils.adoc#Nonces[`Nonces`]]
  245. :NoncesKeyed: pass:normal[xref:utils.adoc#NoncesKeyed[`NoncesKeyed`]]
  246. :xref-NoncesKeyed-nonces-address-uint192-: xref:utils.adoc#NoncesKeyed-nonces-address-uint192-
  247. :xref-NoncesKeyed-_useNonce-address-uint192-: xref:utils.adoc#NoncesKeyed-_useNonce-address-uint192-
  248. :xref-NoncesKeyed-_useCheckedNonce-address-uint256-: xref:utils.adoc#NoncesKeyed-_useCheckedNonce-address-uint256-
  249. :xref-NoncesKeyed-_useCheckedNonce-address-uint192-uint64-: xref:utils.adoc#NoncesKeyed-_useCheckedNonce-address-uint192-uint64-
  250. :xref-Nonces-nonces-address-: xref:utils.adoc#Nonces-nonces-address-
  251. :xref-Nonces-_useNonce-address-: xref:utils.adoc#Nonces-_useNonce-address-
  252. :xref-Nonces-InvalidAccountNonce-address-uint256-: xref:utils.adoc#Nonces-InvalidAccountNonce-address-uint256-
  253. :ERC165Checker: pass:normal[xref:utils.adoc#ERC165Checker[`ERC165Checker`]]
  254. :ERC165: pass:normal[xref:utils.adoc#ERC165[`ERC165`]]
  255. :xref-IERC165-supportsInterface-bytes4-: xref:utils.adoc#IERC165-supportsInterface-bytes4-
  256. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  257. :xref-ERC165-supportsInterface-bytes4-: xref:utils.adoc#ERC165-supportsInterface-bytes4-
  258. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  259. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  260. :xref-ERC165Checker-supportsERC165-address-: xref:utils.adoc#ERC165Checker-supportsERC165-address-
  261. :xref-ERC165Checker-supportsInterface-address-bytes4-: xref:utils.adoc#ERC165Checker-supportsInterface-address-bytes4-
  262. :xref-ERC165Checker-getSupportedInterfaces-address-bytes4---: xref:utils.adoc#ERC165Checker-getSupportedInterfaces-address-bytes4---
  263. :xref-ERC165Checker-supportsAllInterfaces-address-bytes4---: xref:utils.adoc#ERC165Checker-supportsAllInterfaces-address-bytes4---
  264. :xref-ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-: xref:utils.adoc#ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-
  265. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  266. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  267. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  268. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  269. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  270. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  271. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  272. :xref-BitMaps-get-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-get-struct-BitMaps-BitMap-uint256-
  273. :xref-BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-: xref:utils.adoc#BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-
  274. :xref-BitMaps-set-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-set-struct-BitMaps-BitMap-uint256-
  275. :xref-BitMaps-unset-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-unset-struct-BitMaps-BitMap-uint256-
  276. :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-
  277. :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  278. :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  279. :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-
  280. :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-
  281. :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  282. :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  283. :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-
  284. :xref-EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-
  285. :xref-EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-
  286. :xref-EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-
  287. :xref-EnumerableMap-length-struct-EnumerableMap-UintToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToUintMap-
  288. :xref-EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-
  289. :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-
  290. :xref-EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-
  291. :xref-EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-
  292. :xref-EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-
  293. :xref-EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-
  294. :xref-EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-
  295. :xref-EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-
  296. :xref-EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-
  297. :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-
  298. :xref-EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-
  299. :xref-EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-
  300. :xref-EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-
  301. :xref-EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-
  302. :xref-EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-
  303. :xref-EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-
  304. :xref-EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-
  305. :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-
  306. :xref-EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-
  307. :xref-EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-
  308. :xref-EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-
  309. :xref-EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-
  310. :xref-EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-
  311. :xref-EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-
  312. :xref-EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-
  313. :xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-
  314. :xref-EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-
  315. :xref-EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-
  316. :xref-EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-
  317. :xref-EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-
  318. :xref-EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-
  319. :xref-EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-
  320. :xref-EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-
  321. :xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-
  322. :xref-EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-
  323. :xref-EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-
  324. :xref-EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-
  325. :xref-EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-
  326. :xref-EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-
  327. :xref-EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-
  328. :xref-EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-
  329. :xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-
  330. :xref-EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-
  331. :xref-EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-
  332. :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-
  333. :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  334. :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  335. :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-
  336. :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-
  337. :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  338. :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  339. :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-
  340. :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-
  341. :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
  342. :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
  343. :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-
  344. :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-
  345. :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
  346. :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
  347. :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-
  348. :xref-EnumerableMap-EnumerableMapNonexistentKey-bytes32-: xref:utils.adoc#EnumerableMap-EnumerableMapNonexistentKey-bytes32-
  349. :xref-EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-
  350. :xref-EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-
  351. :xref-EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-
  352. :xref-EnumerableSet-length-struct-EnumerableSet-Bytes32Set-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-Bytes32Set-
  353. :xref-EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-
  354. :xref-EnumerableSet-values-struct-EnumerableSet-Bytes32Set-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-Bytes32Set-
  355. :xref-EnumerableSet-add-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-AddressSet-address-
  356. :xref-EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-
  357. :xref-EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-
  358. :xref-EnumerableSet-length-struct-EnumerableSet-AddressSet-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-AddressSet-
  359. :xref-EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-
  360. :xref-EnumerableSet-values-struct-EnumerableSet-AddressSet-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-AddressSet-
  361. :xref-EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-
  362. :xref-EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-
  363. :xref-EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-
  364. :xref-EnumerableSet-length-struct-EnumerableSet-UintSet-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-UintSet-
  365. :xref-EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-
  366. :xref-EnumerableSet-values-struct-EnumerableSet-UintSet-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-UintSet-
  367. :xref-DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-: xref:utils.adoc#DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-
  368. :xref-DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-
  369. :xref-DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-: xref:utils.adoc#DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-
  370. :xref-DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-
  371. :xref-DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-
  372. :xref-DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-
  373. :xref-DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-: xref:utils.adoc#DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-
  374. :xref-DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-
  375. :xref-DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-
  376. :xref-DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-
  377. :Panic-RESOURCE_ERROR: pass:normal[xref:utils.adoc#Panic-RESOURCE_ERROR-uint256[`Panic.RESOURCE_ERROR`]]
  378. :Panic-EMPTY_ARRAY_POP: pass:normal[xref:utils.adoc#Panic-EMPTY_ARRAY_POP-uint256[`Panic.EMPTY_ARRAY_POP`]]
  379. :Panic-RESOURCE_ERROR: pass:normal[xref:utils.adoc#Panic-RESOURCE_ERROR-uint256[`Panic.RESOURCE_ERROR`]]
  380. :Panic-EMPTY_ARRAY_POP: pass:normal[xref:utils.adoc#Panic-EMPTY_ARRAY_POP-uint256[`Panic.EMPTY_ARRAY_POP`]]
  381. :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
  382. :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
  383. :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
  384. :xref-CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-: xref:utils.adoc#CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-
  385. :xref-CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-: xref:utils.adoc#CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-
  386. :xref-CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-: xref:utils.adoc#CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-
  387. :xref-CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-: xref:utils.adoc#CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-
  388. :xref-CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-: xref:utils.adoc#CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-
  389. :xref-CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-: xref:utils.adoc#CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-
  390. :xref-CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-: xref:utils.adoc#CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-
  391. :xref-CircularBuffer-InvalidBufferSize--: xref:utils.adoc#CircularBuffer-InvalidBufferSize--
  392. :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
  393. :Votes: pass:normal[xref:governance.adoc#Votes[`Votes`]]
  394. :xref-Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-
  395. :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-
  396. :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-
  397. :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-
  398. :xref-Checkpoints-latest-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace224-
  399. :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-
  400. :xref-Checkpoints-length-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace224-
  401. :xref-Checkpoints-at-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-at-struct-Checkpoints-Trace224-uint32-
  402. :xref-Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-
  403. :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-
  404. :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-
  405. :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-
  406. :xref-Checkpoints-latest-struct-Checkpoints-Trace208-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace208-
  407. :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-
  408. :xref-Checkpoints-length-struct-Checkpoints-Trace208-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace208-
  409. :xref-Checkpoints-at-struct-Checkpoints-Trace208-uint32-: xref:utils.adoc#Checkpoints-at-struct-Checkpoints-Trace208-uint32-
  410. :xref-Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-
  411. :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-
  412. :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-
  413. :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-
  414. :xref-Checkpoints-latest-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace160-
  415. :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-
  416. :xref-Checkpoints-length-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace160-
  417. :xref-Checkpoints-at-struct-Checkpoints-Trace160-uint32-: xref:utils.adoc#Checkpoints-at-struct-Checkpoints-Trace160-uint32-
  418. :xref-Checkpoints-CheckpointUnorderedInsertion--: xref:utils.adoc#Checkpoints-CheckpointUnorderedInsertion--
  419. :xref-Heap-peek-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-peek-struct-Heap-Uint256Heap-
  420. :xref-Heap-pop-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-pop-struct-Heap-Uint256Heap-
  421. :xref-Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--: xref:utils.adoc#Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--
  422. :xref-Heap-insert-struct-Heap-Uint256Heap-uint256-: xref:utils.adoc#Heap-insert-struct-Heap-Uint256Heap-uint256-
  423. :xref-Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--: xref:utils.adoc#Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--
  424. :xref-Heap-replace-struct-Heap-Uint256Heap-uint256-: xref:utils.adoc#Heap-replace-struct-Heap-Uint256Heap-uint256-
  425. :xref-Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--: xref:utils.adoc#Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--
  426. :xref-Heap-length-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-length-struct-Heap-Uint256Heap-
  427. :xref-Heap-clear-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-clear-struct-Heap-Uint256Heap-
  428. :MerkleProof: pass:normal[xref:utils.adoc#MerkleProof[`MerkleProof`]]
  429. :Hashes-commutativeKeccak256: pass:normal[xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-[`Hashes.commutativeKeccak256`]]
  430. :MerkleProof: pass:normal[xref:utils.adoc#MerkleProof[`MerkleProof`]]
  431. :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-
  432. :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--
  433. :xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-: xref:utils.adoc#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-
  434. :xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--
  435. :xref-MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-: xref:utils.adoc#MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-
  436. :Hashes-commutativeKeccak256: pass:normal[xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-[`Hashes.commutativeKeccak256`]]
  437. :xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-: xref:utils.adoc#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-
  438. :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-
  439. :Hashes-commutativeKeccak256: pass:normal[xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-[`Hashes.commutativeKeccak256`]]
  440. :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-
  441. :xref-Create2-deploy-uint256-bytes32-bytes-: xref:utils.adoc#Create2-deploy-uint256-bytes32-bytes-
  442. :xref-Create2-computeAddress-bytes32-bytes32-: xref:utils.adoc#Create2-computeAddress-bytes32-bytes32-
  443. :xref-Create2-computeAddress-bytes32-bytes32-address-: xref:utils.adoc#Create2-computeAddress-bytes32-bytes32-address-
  444. :xref-Create2-Create2EmptyBytecode--: xref:utils.adoc#Create2-Create2EmptyBytecode--
  445. :xref-Address-sendValue-address-payable-uint256-: xref:utils.adoc#Address-sendValue-address-payable-uint256-
  446. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  447. :xref-Address-functionCallWithValue-address-bytes-uint256-: xref:utils.adoc#Address-functionCallWithValue-address-bytes-uint256-
  448. :xref-Address-functionStaticCall-address-bytes-: xref:utils.adoc#Address-functionStaticCall-address-bytes-
  449. :xref-Address-functionDelegateCall-address-bytes-: xref:utils.adoc#Address-functionDelegateCall-address-bytes-
  450. :xref-Address-verifyCallResultFromTarget-address-bool-bytes-: xref:utils.adoc#Address-verifyCallResultFromTarget-address-bool-bytes-
  451. :xref-Address-verifyCallResult-bool-bytes-: xref:utils.adoc#Address-verifyCallResult-bool-bytes-
  452. :xref-Address-AddressEmptyCode-address-: xref:utils.adoc#Address-AddressEmptyCode-address-
  453. :ReentrancyGuard: pass:normal[xref:utils.adoc#ReentrancyGuard[`ReentrancyGuard`]]
  454. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  455. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  456. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  457. :xref-Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--: xref:utils.adoc#Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--
  458. :xref-Arrays-sort-uint256---: xref:utils.adoc#Arrays-sort-uint256---
  459. :xref-Arrays-sort-address---function--address-address--pure-returns--bool--: xref:utils.adoc#Arrays-sort-address---function--address-address--pure-returns--bool--
  460. :xref-Arrays-sort-address---: xref:utils.adoc#Arrays-sort-address---
  461. :xref-Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--: xref:utils.adoc#Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--
  462. :xref-Arrays-sort-bytes32---: xref:utils.adoc#Arrays-sort-bytes32---
  463. :xref-Arrays-findUpperBound-uint256---uint256-: xref:utils.adoc#Arrays-findUpperBound-uint256---uint256-
  464. :xref-Arrays-lowerBound-uint256---uint256-: xref:utils.adoc#Arrays-lowerBound-uint256---uint256-
  465. :xref-Arrays-upperBound-uint256---uint256-: xref:utils.adoc#Arrays-upperBound-uint256---uint256-
  466. :xref-Arrays-lowerBoundMemory-uint256---uint256-: xref:utils.adoc#Arrays-lowerBoundMemory-uint256---uint256-
  467. :xref-Arrays-upperBoundMemory-uint256---uint256-: xref:utils.adoc#Arrays-upperBoundMemory-uint256---uint256-
  468. :xref-Arrays-unsafeAccess-address---uint256-: xref:utils.adoc#Arrays-unsafeAccess-address---uint256-
  469. :xref-Arrays-unsafeAccess-bytes32---uint256-: xref:utils.adoc#Arrays-unsafeAccess-bytes32---uint256-
  470. :xref-Arrays-unsafeAccess-uint256---uint256-: xref:utils.adoc#Arrays-unsafeAccess-uint256---uint256-
  471. :xref-Arrays-unsafeMemoryAccess-address---uint256-: xref:utils.adoc#Arrays-unsafeMemoryAccess-address---uint256-
  472. :xref-Arrays-unsafeMemoryAccess-bytes32---uint256-: xref:utils.adoc#Arrays-unsafeMemoryAccess-bytes32---uint256-
  473. :xref-Arrays-unsafeMemoryAccess-uint256---uint256-: xref:utils.adoc#Arrays-unsafeMemoryAccess-uint256---uint256-
  474. :xref-Arrays-unsafeSetLength-address---uint256-: xref:utils.adoc#Arrays-unsafeSetLength-address---uint256-
  475. :xref-Arrays-unsafeSetLength-bytes32---uint256-: xref:utils.adoc#Arrays-unsafeSetLength-bytes32---uint256-
  476. :xref-Arrays-unsafeSetLength-uint256---uint256-: xref:utils.adoc#Arrays-unsafeSetLength-uint256---uint256-
  477. :xref-Base64-encode-bytes-: xref:utils.adoc#Base64-encode-bytes-
  478. :xref-Base64-encodeURL-bytes-: xref:utils.adoc#Base64-encodeURL-bytes-
  479. :xref-Base64-_TABLE-string: xref:utils.adoc#Base64-_TABLE-string
  480. :xref-Base64-_TABLE_URL-string: xref:utils.adoc#Base64-_TABLE_URL-string
  481. :xref-Strings-toString-uint256-: xref:utils.adoc#Strings-toString-uint256-
  482. :xref-Strings-toStringSigned-int256-: xref:utils.adoc#Strings-toStringSigned-int256-
  483. :xref-Strings-toHexString-uint256-: xref:utils.adoc#Strings-toHexString-uint256-
  484. :xref-Strings-toHexString-uint256-uint256-: xref:utils.adoc#Strings-toHexString-uint256-uint256-
  485. :xref-Strings-toHexString-address-: xref:utils.adoc#Strings-toHexString-address-
  486. :xref-Strings-toChecksumHexString-address-: xref:utils.adoc#Strings-toChecksumHexString-address-
  487. :xref-Strings-equal-string-string-: xref:utils.adoc#Strings-equal-string-string-
  488. :xref-Strings-parseUint-string-: xref:utils.adoc#Strings-parseUint-string-
  489. :xref-Strings-parseUint-string-uint256-uint256-: xref:utils.adoc#Strings-parseUint-string-uint256-uint256-
  490. :xref-Strings-tryParseUint-string-: xref:utils.adoc#Strings-tryParseUint-string-
  491. :xref-Strings-tryParseUint-string-uint256-uint256-: xref:utils.adoc#Strings-tryParseUint-string-uint256-uint256-
  492. :xref-Strings-parseInt-string-: xref:utils.adoc#Strings-parseInt-string-
  493. :xref-Strings-parseInt-string-uint256-uint256-: xref:utils.adoc#Strings-parseInt-string-uint256-uint256-
  494. :xref-Strings-tryParseInt-string-: xref:utils.adoc#Strings-tryParseInt-string-
  495. :xref-Strings-tryParseInt-string-uint256-uint256-: xref:utils.adoc#Strings-tryParseInt-string-uint256-uint256-
  496. :xref-Strings-parseHexUint-string-: xref:utils.adoc#Strings-parseHexUint-string-
  497. :xref-Strings-parseHexUint-string-uint256-uint256-: xref:utils.adoc#Strings-parseHexUint-string-uint256-uint256-
  498. :xref-Strings-tryParseHexUint-string-: xref:utils.adoc#Strings-tryParseHexUint-string-
  499. :xref-Strings-tryParseHexUint-string-uint256-uint256-: xref:utils.adoc#Strings-tryParseHexUint-string-uint256-uint256-
  500. :xref-Strings-parseAddress-string-: xref:utils.adoc#Strings-parseAddress-string-
  501. :xref-Strings-parseAddress-string-uint256-uint256-: xref:utils.adoc#Strings-parseAddress-string-uint256-uint256-
  502. :xref-Strings-tryParseAddress-string-: xref:utils.adoc#Strings-tryParseAddress-string-
  503. :xref-Strings-tryParseAddress-string-uint256-uint256-: xref:utils.adoc#Strings-tryParseAddress-string-uint256-uint256-
  504. :xref-Strings-StringsInsufficientHexLength-uint256-uint256-: xref:utils.adoc#Strings-StringsInsufficientHexLength-uint256-uint256-
  505. :xref-Strings-StringsInvalidChar--: xref:utils.adoc#Strings-StringsInvalidChar--
  506. :xref-Strings-StringsInvalidAddressFormat--: xref:utils.adoc#Strings-StringsInvalidAddressFormat--
  507. :xref-ShortStrings-toShortString-string-: xref:utils.adoc#ShortStrings-toShortString-string-
  508. :xref-ShortStrings-toString-ShortString-: xref:utils.adoc#ShortStrings-toString-ShortString-
  509. :xref-ShortStrings-byteLength-ShortString-: xref:utils.adoc#ShortStrings-byteLength-ShortString-
  510. :xref-ShortStrings-toShortStringWithFallback-string-string-: xref:utils.adoc#ShortStrings-toShortStringWithFallback-string-string-
  511. :xref-ShortStrings-toStringWithFallback-ShortString-string-: xref:utils.adoc#ShortStrings-toStringWithFallback-ShortString-string-
  512. :xref-ShortStrings-byteLengthWithFallback-ShortString-string-: xref:utils.adoc#ShortStrings-byteLengthWithFallback-ShortString-string-
  513. :xref-ShortStrings-StringTooLong-string-: xref:utils.adoc#ShortStrings-StringTooLong-string-
  514. :xref-ShortStrings-InvalidShortString--: xref:utils.adoc#ShortStrings-InvalidShortString--
  515. :StorageSlot: pass:normal[xref:utils.adoc#StorageSlot[`StorageSlot`]]
  516. :xref-SlotDerivation-erc7201Slot-string-: xref:utils.adoc#SlotDerivation-erc7201Slot-string-
  517. :xref-SlotDerivation-offset-bytes32-uint256-: xref:utils.adoc#SlotDerivation-offset-bytes32-uint256-
  518. :xref-SlotDerivation-deriveArray-bytes32-: xref:utils.adoc#SlotDerivation-deriveArray-bytes32-
  519. :xref-SlotDerivation-deriveMapping-bytes32-address-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-address-
  520. :xref-SlotDerivation-deriveMapping-bytes32-bool-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-bool-
  521. :xref-SlotDerivation-deriveMapping-bytes32-bytes32-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-bytes32-
  522. :xref-SlotDerivation-deriveMapping-bytes32-uint256-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-uint256-
  523. :xref-SlotDerivation-deriveMapping-bytes32-int256-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-int256-
  524. :xref-SlotDerivation-deriveMapping-bytes32-string-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-string-
  525. :xref-SlotDerivation-deriveMapping-bytes32-bytes-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-bytes-
  526. :SlotDerivation: pass:normal[xref:utils.adoc#SlotDerivation[`SlotDerivation`]]
  527. :xref-StorageSlot-getAddressSlot-bytes32-: xref:utils.adoc#StorageSlot-getAddressSlot-bytes32-
  528. :xref-StorageSlot-getBooleanSlot-bytes32-: xref:utils.adoc#StorageSlot-getBooleanSlot-bytes32-
  529. :xref-StorageSlot-getBytes32Slot-bytes32-: xref:utils.adoc#StorageSlot-getBytes32Slot-bytes32-
  530. :xref-StorageSlot-getUint256Slot-bytes32-: xref:utils.adoc#StorageSlot-getUint256Slot-bytes32-
  531. :xref-StorageSlot-getInt256Slot-bytes32-: xref:utils.adoc#StorageSlot-getInt256Slot-bytes32-
  532. :xref-StorageSlot-getStringSlot-bytes32-: xref:utils.adoc#StorageSlot-getStringSlot-bytes32-
  533. :xref-StorageSlot-getStringSlot-string-: xref:utils.adoc#StorageSlot-getStringSlot-string-
  534. :xref-StorageSlot-getBytesSlot-bytes32-: xref:utils.adoc#StorageSlot-getBytesSlot-bytes32-
  535. :xref-StorageSlot-getBytesSlot-bytes-: xref:utils.adoc#StorageSlot-getBytesSlot-bytes-
  536. :SlotDerivation: pass:normal[xref:utils.adoc#SlotDerivation[`SlotDerivation`]]
  537. :xref-TransientSlot-asAddress-bytes32-: xref:utils.adoc#TransientSlot-asAddress-bytes32-
  538. :xref-TransientSlot-asBoolean-bytes32-: xref:utils.adoc#TransientSlot-asBoolean-bytes32-
  539. :xref-TransientSlot-asBytes32-bytes32-: xref:utils.adoc#TransientSlot-asBytes32-bytes32-
  540. :xref-TransientSlot-asUint256-bytes32-: xref:utils.adoc#TransientSlot-asUint256-bytes32-
  541. :xref-TransientSlot-asInt256-bytes32-: xref:utils.adoc#TransientSlot-asInt256-bytes32-
  542. :xref-TransientSlot-tload-TransientSlot-AddressSlot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-AddressSlot-
  543. :xref-TransientSlot-tstore-TransientSlot-AddressSlot-address-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-AddressSlot-address-
  544. :xref-TransientSlot-tload-TransientSlot-BooleanSlot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-BooleanSlot-
  545. :xref-TransientSlot-tstore-TransientSlot-BooleanSlot-bool-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-BooleanSlot-bool-
  546. :xref-TransientSlot-tload-TransientSlot-Bytes32Slot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-Bytes32Slot-
  547. :xref-TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-
  548. :xref-TransientSlot-tload-TransientSlot-Uint256Slot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-Uint256Slot-
  549. :xref-TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-
  550. :xref-TransientSlot-tload-TransientSlot-Int256Slot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-Int256Slot-
  551. :xref-TransientSlot-tstore-TransientSlot-Int256Slot-int256-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-Int256Slot-int256-
  552. :ERC2771Context: pass:normal[xref:metatx.adoc#ERC2771Context[`ERC2771Context`]]
  553. :xref-Multicall-multicall-bytes---: xref:utils.adoc#Multicall-multicall-bytes---
  554. :xref-Context-_msgSender--: xref:utils.adoc#Context-_msgSender--
  555. :xref-Context-_msgData--: xref:utils.adoc#Context-_msgData--
  556. :xref-Context-_contextSuffixLength--: xref:utils.adoc#Context-_contextSuffixLength--
  557. :xref-Packing-pack_1_1-bytes1-bytes1-: xref:utils.adoc#Packing-pack_1_1-bytes1-bytes1-
  558. :xref-Packing-pack_2_2-bytes2-bytes2-: xref:utils.adoc#Packing-pack_2_2-bytes2-bytes2-
  559. :xref-Packing-pack_2_4-bytes2-bytes4-: xref:utils.adoc#Packing-pack_2_4-bytes2-bytes4-
  560. :xref-Packing-pack_2_6-bytes2-bytes6-: xref:utils.adoc#Packing-pack_2_6-bytes2-bytes6-
  561. :xref-Packing-pack_2_8-bytes2-bytes8-: xref:utils.adoc#Packing-pack_2_8-bytes2-bytes8-
  562. :xref-Packing-pack_2_10-bytes2-bytes10-: xref:utils.adoc#Packing-pack_2_10-bytes2-bytes10-
  563. :xref-Packing-pack_2_20-bytes2-bytes20-: xref:utils.adoc#Packing-pack_2_20-bytes2-bytes20-
  564. :xref-Packing-pack_2_22-bytes2-bytes22-: xref:utils.adoc#Packing-pack_2_22-bytes2-bytes22-
  565. :xref-Packing-pack_4_2-bytes4-bytes2-: xref:utils.adoc#Packing-pack_4_2-bytes4-bytes2-
  566. :xref-Packing-pack_4_4-bytes4-bytes4-: xref:utils.adoc#Packing-pack_4_4-bytes4-bytes4-
  567. :xref-Packing-pack_4_6-bytes4-bytes6-: xref:utils.adoc#Packing-pack_4_6-bytes4-bytes6-
  568. :xref-Packing-pack_4_8-bytes4-bytes8-: xref:utils.adoc#Packing-pack_4_8-bytes4-bytes8-
  569. :xref-Packing-pack_4_12-bytes4-bytes12-: xref:utils.adoc#Packing-pack_4_12-bytes4-bytes12-
  570. :xref-Packing-pack_4_16-bytes4-bytes16-: xref:utils.adoc#Packing-pack_4_16-bytes4-bytes16-
  571. :xref-Packing-pack_4_20-bytes4-bytes20-: xref:utils.adoc#Packing-pack_4_20-bytes4-bytes20-
  572. :xref-Packing-pack_4_24-bytes4-bytes24-: xref:utils.adoc#Packing-pack_4_24-bytes4-bytes24-
  573. :xref-Packing-pack_4_28-bytes4-bytes28-: xref:utils.adoc#Packing-pack_4_28-bytes4-bytes28-
  574. :xref-Packing-pack_6_2-bytes6-bytes2-: xref:utils.adoc#Packing-pack_6_2-bytes6-bytes2-
  575. :xref-Packing-pack_6_4-bytes6-bytes4-: xref:utils.adoc#Packing-pack_6_4-bytes6-bytes4-
  576. :xref-Packing-pack_6_6-bytes6-bytes6-: xref:utils.adoc#Packing-pack_6_6-bytes6-bytes6-
  577. :xref-Packing-pack_6_10-bytes6-bytes10-: xref:utils.adoc#Packing-pack_6_10-bytes6-bytes10-
  578. :xref-Packing-pack_6_16-bytes6-bytes16-: xref:utils.adoc#Packing-pack_6_16-bytes6-bytes16-
  579. :xref-Packing-pack_6_22-bytes6-bytes22-: xref:utils.adoc#Packing-pack_6_22-bytes6-bytes22-
  580. :xref-Packing-pack_8_2-bytes8-bytes2-: xref:utils.adoc#Packing-pack_8_2-bytes8-bytes2-
  581. :xref-Packing-pack_8_4-bytes8-bytes4-: xref:utils.adoc#Packing-pack_8_4-bytes8-bytes4-
  582. :xref-Packing-pack_8_8-bytes8-bytes8-: xref:utils.adoc#Packing-pack_8_8-bytes8-bytes8-
  583. :xref-Packing-pack_8_12-bytes8-bytes12-: xref:utils.adoc#Packing-pack_8_12-bytes8-bytes12-
  584. :xref-Packing-pack_8_16-bytes8-bytes16-: xref:utils.adoc#Packing-pack_8_16-bytes8-bytes16-
  585. :xref-Packing-pack_8_20-bytes8-bytes20-: xref:utils.adoc#Packing-pack_8_20-bytes8-bytes20-
  586. :xref-Packing-pack_8_24-bytes8-bytes24-: xref:utils.adoc#Packing-pack_8_24-bytes8-bytes24-
  587. :xref-Packing-pack_10_2-bytes10-bytes2-: xref:utils.adoc#Packing-pack_10_2-bytes10-bytes2-
  588. :xref-Packing-pack_10_6-bytes10-bytes6-: xref:utils.adoc#Packing-pack_10_6-bytes10-bytes6-
  589. :xref-Packing-pack_10_10-bytes10-bytes10-: xref:utils.adoc#Packing-pack_10_10-bytes10-bytes10-
  590. :xref-Packing-pack_10_12-bytes10-bytes12-: xref:utils.adoc#Packing-pack_10_12-bytes10-bytes12-
  591. :xref-Packing-pack_10_22-bytes10-bytes22-: xref:utils.adoc#Packing-pack_10_22-bytes10-bytes22-
  592. :xref-Packing-pack_12_4-bytes12-bytes4-: xref:utils.adoc#Packing-pack_12_4-bytes12-bytes4-
  593. :xref-Packing-pack_12_8-bytes12-bytes8-: xref:utils.adoc#Packing-pack_12_8-bytes12-bytes8-
  594. :xref-Packing-pack_12_10-bytes12-bytes10-: xref:utils.adoc#Packing-pack_12_10-bytes12-bytes10-
  595. :xref-Packing-pack_12_12-bytes12-bytes12-: xref:utils.adoc#Packing-pack_12_12-bytes12-bytes12-
  596. :xref-Packing-pack_12_16-bytes12-bytes16-: xref:utils.adoc#Packing-pack_12_16-bytes12-bytes16-
  597. :xref-Packing-pack_12_20-bytes12-bytes20-: xref:utils.adoc#Packing-pack_12_20-bytes12-bytes20-
  598. :xref-Packing-pack_16_4-bytes16-bytes4-: xref:utils.adoc#Packing-pack_16_4-bytes16-bytes4-
  599. :xref-Packing-pack_16_6-bytes16-bytes6-: xref:utils.adoc#Packing-pack_16_6-bytes16-bytes6-
  600. :xref-Packing-pack_16_8-bytes16-bytes8-: xref:utils.adoc#Packing-pack_16_8-bytes16-bytes8-
  601. :xref-Packing-pack_16_12-bytes16-bytes12-: xref:utils.adoc#Packing-pack_16_12-bytes16-bytes12-
  602. :xref-Packing-pack_16_16-bytes16-bytes16-: xref:utils.adoc#Packing-pack_16_16-bytes16-bytes16-
  603. :xref-Packing-pack_20_2-bytes20-bytes2-: xref:utils.adoc#Packing-pack_20_2-bytes20-bytes2-
  604. :xref-Packing-pack_20_4-bytes20-bytes4-: xref:utils.adoc#Packing-pack_20_4-bytes20-bytes4-
  605. :xref-Packing-pack_20_8-bytes20-bytes8-: xref:utils.adoc#Packing-pack_20_8-bytes20-bytes8-
  606. :xref-Packing-pack_20_12-bytes20-bytes12-: xref:utils.adoc#Packing-pack_20_12-bytes20-bytes12-
  607. :xref-Packing-pack_22_2-bytes22-bytes2-: xref:utils.adoc#Packing-pack_22_2-bytes22-bytes2-
  608. :xref-Packing-pack_22_6-bytes22-bytes6-: xref:utils.adoc#Packing-pack_22_6-bytes22-bytes6-
  609. :xref-Packing-pack_22_10-bytes22-bytes10-: xref:utils.adoc#Packing-pack_22_10-bytes22-bytes10-
  610. :xref-Packing-pack_24_4-bytes24-bytes4-: xref:utils.adoc#Packing-pack_24_4-bytes24-bytes4-
  611. :xref-Packing-pack_24_8-bytes24-bytes8-: xref:utils.adoc#Packing-pack_24_8-bytes24-bytes8-
  612. :xref-Packing-pack_28_4-bytes28-bytes4-: xref:utils.adoc#Packing-pack_28_4-bytes28-bytes4-
  613. :xref-Packing-extract_2_1-bytes2-uint8-: xref:utils.adoc#Packing-extract_2_1-bytes2-uint8-
  614. :xref-Packing-replace_2_1-bytes2-bytes1-uint8-: xref:utils.adoc#Packing-replace_2_1-bytes2-bytes1-uint8-
  615. :xref-Packing-extract_4_1-bytes4-uint8-: xref:utils.adoc#Packing-extract_4_1-bytes4-uint8-
  616. :xref-Packing-replace_4_1-bytes4-bytes1-uint8-: xref:utils.adoc#Packing-replace_4_1-bytes4-bytes1-uint8-
  617. :xref-Packing-extract_4_2-bytes4-uint8-: xref:utils.adoc#Packing-extract_4_2-bytes4-uint8-
  618. :xref-Packing-replace_4_2-bytes4-bytes2-uint8-: xref:utils.adoc#Packing-replace_4_2-bytes4-bytes2-uint8-
  619. :xref-Packing-extract_6_1-bytes6-uint8-: xref:utils.adoc#Packing-extract_6_1-bytes6-uint8-
  620. :xref-Packing-replace_6_1-bytes6-bytes1-uint8-: xref:utils.adoc#Packing-replace_6_1-bytes6-bytes1-uint8-
  621. :xref-Packing-extract_6_2-bytes6-uint8-: xref:utils.adoc#Packing-extract_6_2-bytes6-uint8-
  622. :xref-Packing-replace_6_2-bytes6-bytes2-uint8-: xref:utils.adoc#Packing-replace_6_2-bytes6-bytes2-uint8-
  623. :xref-Packing-extract_6_4-bytes6-uint8-: xref:utils.adoc#Packing-extract_6_4-bytes6-uint8-
  624. :xref-Packing-replace_6_4-bytes6-bytes4-uint8-: xref:utils.adoc#Packing-replace_6_4-bytes6-bytes4-uint8-
  625. :xref-Packing-extract_8_1-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_1-bytes8-uint8-
  626. :xref-Packing-replace_8_1-bytes8-bytes1-uint8-: xref:utils.adoc#Packing-replace_8_1-bytes8-bytes1-uint8-
  627. :xref-Packing-extract_8_2-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_2-bytes8-uint8-
  628. :xref-Packing-replace_8_2-bytes8-bytes2-uint8-: xref:utils.adoc#Packing-replace_8_2-bytes8-bytes2-uint8-
  629. :xref-Packing-extract_8_4-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_4-bytes8-uint8-
  630. :xref-Packing-replace_8_4-bytes8-bytes4-uint8-: xref:utils.adoc#Packing-replace_8_4-bytes8-bytes4-uint8-
  631. :xref-Packing-extract_8_6-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_6-bytes8-uint8-
  632. :xref-Packing-replace_8_6-bytes8-bytes6-uint8-: xref:utils.adoc#Packing-replace_8_6-bytes8-bytes6-uint8-
  633. :xref-Packing-extract_10_1-bytes10-uint8-: xref:utils.adoc#Packing-extract_10_1-bytes10-uint8-
  634. :xref-Packing-replace_10_1-bytes10-bytes1-uint8-: xref:utils.adoc#Packing-replace_10_1-bytes10-bytes1-uint8-
  635. :xref-Packing-extract_10_2-bytes10-uint8-: xref:utils.adoc#Packing-extract_10_2-bytes10-uint8-
  636. :xref-Packing-replace_10_2-bytes10-bytes2-uint8-: xref:utils.adoc#Packing-replace_10_2-bytes10-bytes2-uint8-
  637. :xref-Packing-extract_10_4-bytes10-uint8-: xref:utils.adoc#Packing-extract_10_4-bytes10-uint8-
  638. :xref-Packing-replace_10_4-bytes10-bytes4-uint8-: xref:utils.adoc#Packing-replace_10_4-bytes10-bytes4-uint8-
  639. :xref-Packing-extract_10_6-bytes10-uint8-: xref:utils.adoc#Packing-extract_10_6-bytes10-uint8-
  640. :xref-Packing-replace_10_6-bytes10-bytes6-uint8-: xref:utils.adoc#Packing-replace_10_6-bytes10-bytes6-uint8-
  641. :xref-Packing-extract_10_8-bytes10-uint8-: xref:utils.adoc#Packing-extract_10_8-bytes10-uint8-
  642. :xref-Packing-replace_10_8-bytes10-bytes8-uint8-: xref:utils.adoc#Packing-replace_10_8-bytes10-bytes8-uint8-
  643. :xref-Packing-extract_12_1-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_1-bytes12-uint8-
  644. :xref-Packing-replace_12_1-bytes12-bytes1-uint8-: xref:utils.adoc#Packing-replace_12_1-bytes12-bytes1-uint8-
  645. :xref-Packing-extract_12_2-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_2-bytes12-uint8-
  646. :xref-Packing-replace_12_2-bytes12-bytes2-uint8-: xref:utils.adoc#Packing-replace_12_2-bytes12-bytes2-uint8-
  647. :xref-Packing-extract_12_4-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_4-bytes12-uint8-
  648. :xref-Packing-replace_12_4-bytes12-bytes4-uint8-: xref:utils.adoc#Packing-replace_12_4-bytes12-bytes4-uint8-
  649. :xref-Packing-extract_12_6-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_6-bytes12-uint8-
  650. :xref-Packing-replace_12_6-bytes12-bytes6-uint8-: xref:utils.adoc#Packing-replace_12_6-bytes12-bytes6-uint8-
  651. :xref-Packing-extract_12_8-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_8-bytes12-uint8-
  652. :xref-Packing-replace_12_8-bytes12-bytes8-uint8-: xref:utils.adoc#Packing-replace_12_8-bytes12-bytes8-uint8-
  653. :xref-Packing-extract_12_10-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_10-bytes12-uint8-
  654. :xref-Packing-replace_12_10-bytes12-bytes10-uint8-: xref:utils.adoc#Packing-replace_12_10-bytes12-bytes10-uint8-
  655. :xref-Packing-extract_16_1-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_1-bytes16-uint8-
  656. :xref-Packing-replace_16_1-bytes16-bytes1-uint8-: xref:utils.adoc#Packing-replace_16_1-bytes16-bytes1-uint8-
  657. :xref-Packing-extract_16_2-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_2-bytes16-uint8-
  658. :xref-Packing-replace_16_2-bytes16-bytes2-uint8-: xref:utils.adoc#Packing-replace_16_2-bytes16-bytes2-uint8-
  659. :xref-Packing-extract_16_4-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_4-bytes16-uint8-
  660. :xref-Packing-replace_16_4-bytes16-bytes4-uint8-: xref:utils.adoc#Packing-replace_16_4-bytes16-bytes4-uint8-
  661. :xref-Packing-extract_16_6-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_6-bytes16-uint8-
  662. :xref-Packing-replace_16_6-bytes16-bytes6-uint8-: xref:utils.adoc#Packing-replace_16_6-bytes16-bytes6-uint8-
  663. :xref-Packing-extract_16_8-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_8-bytes16-uint8-
  664. :xref-Packing-replace_16_8-bytes16-bytes8-uint8-: xref:utils.adoc#Packing-replace_16_8-bytes16-bytes8-uint8-
  665. :xref-Packing-extract_16_10-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_10-bytes16-uint8-
  666. :xref-Packing-replace_16_10-bytes16-bytes10-uint8-: xref:utils.adoc#Packing-replace_16_10-bytes16-bytes10-uint8-
  667. :xref-Packing-extract_16_12-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_12-bytes16-uint8-
  668. :xref-Packing-replace_16_12-bytes16-bytes12-uint8-: xref:utils.adoc#Packing-replace_16_12-bytes16-bytes12-uint8-
  669. :xref-Packing-extract_20_1-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_1-bytes20-uint8-
  670. :xref-Packing-replace_20_1-bytes20-bytes1-uint8-: xref:utils.adoc#Packing-replace_20_1-bytes20-bytes1-uint8-
  671. :xref-Packing-extract_20_2-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_2-bytes20-uint8-
  672. :xref-Packing-replace_20_2-bytes20-bytes2-uint8-: xref:utils.adoc#Packing-replace_20_2-bytes20-bytes2-uint8-
  673. :xref-Packing-extract_20_4-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_4-bytes20-uint8-
  674. :xref-Packing-replace_20_4-bytes20-bytes4-uint8-: xref:utils.adoc#Packing-replace_20_4-bytes20-bytes4-uint8-
  675. :xref-Packing-extract_20_6-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_6-bytes20-uint8-
  676. :xref-Packing-replace_20_6-bytes20-bytes6-uint8-: xref:utils.adoc#Packing-replace_20_6-bytes20-bytes6-uint8-
  677. :xref-Packing-extract_20_8-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_8-bytes20-uint8-
  678. :xref-Packing-replace_20_8-bytes20-bytes8-uint8-: xref:utils.adoc#Packing-replace_20_8-bytes20-bytes8-uint8-
  679. :xref-Packing-extract_20_10-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_10-bytes20-uint8-
  680. :xref-Packing-replace_20_10-bytes20-bytes10-uint8-: xref:utils.adoc#Packing-replace_20_10-bytes20-bytes10-uint8-
  681. :xref-Packing-extract_20_12-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_12-bytes20-uint8-
  682. :xref-Packing-replace_20_12-bytes20-bytes12-uint8-: xref:utils.adoc#Packing-replace_20_12-bytes20-bytes12-uint8-
  683. :xref-Packing-extract_20_16-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_16-bytes20-uint8-
  684. :xref-Packing-replace_20_16-bytes20-bytes16-uint8-: xref:utils.adoc#Packing-replace_20_16-bytes20-bytes16-uint8-
  685. :xref-Packing-extract_22_1-bytes22-uint8-: xref:utils.adoc#Packing-extract_22_1-bytes22-uint8-
  686. :xref-Packing-replace_22_1-bytes22-bytes1-uint8-: xref:utils.adoc#Packing-replace_22_1-bytes22-bytes1-uint8-
  687. :xref-Packing-extract_22_2-bytes22-uint8-: xref:utils.adoc#Packing-extract_22_2-bytes22-uint8-
  688. :xref-Packing-replace_22_2-bytes22-bytes2-uint8-: xref:utils.adoc#Packing-replace_22_2-bytes22-bytes2-uint8-
  689. :xref-Packing-extract_22_4-bytes22-uint8-: xref:utils.adoc#Packing-extract_22_4-bytes22-uint8-
  690. :xref-Packing-replace_22_4-bytes22-bytes4-uint8-: xref:utils.adoc#Packing-replace_22_4-bytes22-bytes4-uint8-
  691. :xref-Packing-extract_22_6-bytes22-uint8-: xref:utils.adoc#Packing-extract_22_6-bytes22-uint8-
  692. :xref-Packing-replace_22_6-bytes22-bytes6-uint8-: xref:utils.adoc#Packing-replace_22_6-bytes22-bytes6-uint8-
  693. :xref-Packing-extract_22_8-bytes22-uint8-: xref:utils.adoc#Packing-extract_22_8-bytes22-uint8-
  694. :xref-Packing-replace_22_8-bytes22-bytes8-uint8-: xref:utils.adoc#Packing-replace_22_8-bytes22-bytes8-uint8-
  695. :xref-Packing-extract_22_10-bytes22-uint8-: xref:utils.adoc#Packing-extract_22_10-bytes22-uint8-
  696. :xref-Packing-replace_22_10-bytes22-bytes10-uint8-: xref:utils.adoc#Packing-replace_22_10-bytes22-bytes10-uint8-
  697. :xref-Packing-extract_22_12-bytes22-uint8-: xref:utils.adoc#Packing-extract_22_12-bytes22-uint8-
  698. :xref-Packing-replace_22_12-bytes22-bytes12-uint8-: xref:utils.adoc#Packing-replace_22_12-bytes22-bytes12-uint8-
  699. :xref-Packing-extract_22_16-bytes22-uint8-: xref:utils.adoc#Packing-extract_22_16-bytes22-uint8-
  700. :xref-Packing-replace_22_16-bytes22-bytes16-uint8-: xref:utils.adoc#Packing-replace_22_16-bytes22-bytes16-uint8-
  701. :xref-Packing-extract_22_20-bytes22-uint8-: xref:utils.adoc#Packing-extract_22_20-bytes22-uint8-
  702. :xref-Packing-replace_22_20-bytes22-bytes20-uint8-: xref:utils.adoc#Packing-replace_22_20-bytes22-bytes20-uint8-
  703. :xref-Packing-extract_24_1-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_1-bytes24-uint8-
  704. :xref-Packing-replace_24_1-bytes24-bytes1-uint8-: xref:utils.adoc#Packing-replace_24_1-bytes24-bytes1-uint8-
  705. :xref-Packing-extract_24_2-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_2-bytes24-uint8-
  706. :xref-Packing-replace_24_2-bytes24-bytes2-uint8-: xref:utils.adoc#Packing-replace_24_2-bytes24-bytes2-uint8-
  707. :xref-Packing-extract_24_4-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_4-bytes24-uint8-
  708. :xref-Packing-replace_24_4-bytes24-bytes4-uint8-: xref:utils.adoc#Packing-replace_24_4-bytes24-bytes4-uint8-
  709. :xref-Packing-extract_24_6-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_6-bytes24-uint8-
  710. :xref-Packing-replace_24_6-bytes24-bytes6-uint8-: xref:utils.adoc#Packing-replace_24_6-bytes24-bytes6-uint8-
  711. :xref-Packing-extract_24_8-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_8-bytes24-uint8-
  712. :xref-Packing-replace_24_8-bytes24-bytes8-uint8-: xref:utils.adoc#Packing-replace_24_8-bytes24-bytes8-uint8-
  713. :xref-Packing-extract_24_10-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_10-bytes24-uint8-
  714. :xref-Packing-replace_24_10-bytes24-bytes10-uint8-: xref:utils.adoc#Packing-replace_24_10-bytes24-bytes10-uint8-
  715. :xref-Packing-extract_24_12-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_12-bytes24-uint8-
  716. :xref-Packing-replace_24_12-bytes24-bytes12-uint8-: xref:utils.adoc#Packing-replace_24_12-bytes24-bytes12-uint8-
  717. :xref-Packing-extract_24_16-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_16-bytes24-uint8-
  718. :xref-Packing-replace_24_16-bytes24-bytes16-uint8-: xref:utils.adoc#Packing-replace_24_16-bytes24-bytes16-uint8-
  719. :xref-Packing-extract_24_20-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_20-bytes24-uint8-
  720. :xref-Packing-replace_24_20-bytes24-bytes20-uint8-: xref:utils.adoc#Packing-replace_24_20-bytes24-bytes20-uint8-
  721. :xref-Packing-extract_24_22-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_22-bytes24-uint8-
  722. :xref-Packing-replace_24_22-bytes24-bytes22-uint8-: xref:utils.adoc#Packing-replace_24_22-bytes24-bytes22-uint8-
  723. :xref-Packing-extract_28_1-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_1-bytes28-uint8-
  724. :xref-Packing-replace_28_1-bytes28-bytes1-uint8-: xref:utils.adoc#Packing-replace_28_1-bytes28-bytes1-uint8-
  725. :xref-Packing-extract_28_2-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_2-bytes28-uint8-
  726. :xref-Packing-replace_28_2-bytes28-bytes2-uint8-: xref:utils.adoc#Packing-replace_28_2-bytes28-bytes2-uint8-
  727. :xref-Packing-extract_28_4-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_4-bytes28-uint8-
  728. :xref-Packing-replace_28_4-bytes28-bytes4-uint8-: xref:utils.adoc#Packing-replace_28_4-bytes28-bytes4-uint8-
  729. :xref-Packing-extract_28_6-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_6-bytes28-uint8-
  730. :xref-Packing-replace_28_6-bytes28-bytes6-uint8-: xref:utils.adoc#Packing-replace_28_6-bytes28-bytes6-uint8-
  731. :xref-Packing-extract_28_8-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_8-bytes28-uint8-
  732. :xref-Packing-replace_28_8-bytes28-bytes8-uint8-: xref:utils.adoc#Packing-replace_28_8-bytes28-bytes8-uint8-
  733. :xref-Packing-extract_28_10-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_10-bytes28-uint8-
  734. :xref-Packing-replace_28_10-bytes28-bytes10-uint8-: xref:utils.adoc#Packing-replace_28_10-bytes28-bytes10-uint8-
  735. :xref-Packing-extract_28_12-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_12-bytes28-uint8-
  736. :xref-Packing-replace_28_12-bytes28-bytes12-uint8-: xref:utils.adoc#Packing-replace_28_12-bytes28-bytes12-uint8-
  737. :xref-Packing-extract_28_16-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_16-bytes28-uint8-
  738. :xref-Packing-replace_28_16-bytes28-bytes16-uint8-: xref:utils.adoc#Packing-replace_28_16-bytes28-bytes16-uint8-
  739. :xref-Packing-extract_28_20-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_20-bytes28-uint8-
  740. :xref-Packing-replace_28_20-bytes28-bytes20-uint8-: xref:utils.adoc#Packing-replace_28_20-bytes28-bytes20-uint8-
  741. :xref-Packing-extract_28_22-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_22-bytes28-uint8-
  742. :xref-Packing-replace_28_22-bytes28-bytes22-uint8-: xref:utils.adoc#Packing-replace_28_22-bytes28-bytes22-uint8-
  743. :xref-Packing-extract_28_24-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_24-bytes28-uint8-
  744. :xref-Packing-replace_28_24-bytes28-bytes24-uint8-: xref:utils.adoc#Packing-replace_28_24-bytes28-bytes24-uint8-
  745. :xref-Packing-extract_32_1-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_1-bytes32-uint8-
  746. :xref-Packing-replace_32_1-bytes32-bytes1-uint8-: xref:utils.adoc#Packing-replace_32_1-bytes32-bytes1-uint8-
  747. :xref-Packing-extract_32_2-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_2-bytes32-uint8-
  748. :xref-Packing-replace_32_2-bytes32-bytes2-uint8-: xref:utils.adoc#Packing-replace_32_2-bytes32-bytes2-uint8-
  749. :xref-Packing-extract_32_4-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_4-bytes32-uint8-
  750. :xref-Packing-replace_32_4-bytes32-bytes4-uint8-: xref:utils.adoc#Packing-replace_32_4-bytes32-bytes4-uint8-
  751. :xref-Packing-extract_32_6-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_6-bytes32-uint8-
  752. :xref-Packing-replace_32_6-bytes32-bytes6-uint8-: xref:utils.adoc#Packing-replace_32_6-bytes32-bytes6-uint8-
  753. :xref-Packing-extract_32_8-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_8-bytes32-uint8-
  754. :xref-Packing-replace_32_8-bytes32-bytes8-uint8-: xref:utils.adoc#Packing-replace_32_8-bytes32-bytes8-uint8-
  755. :xref-Packing-extract_32_10-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_10-bytes32-uint8-
  756. :xref-Packing-replace_32_10-bytes32-bytes10-uint8-: xref:utils.adoc#Packing-replace_32_10-bytes32-bytes10-uint8-
  757. :xref-Packing-extract_32_12-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_12-bytes32-uint8-
  758. :xref-Packing-replace_32_12-bytes32-bytes12-uint8-: xref:utils.adoc#Packing-replace_32_12-bytes32-bytes12-uint8-
  759. :xref-Packing-extract_32_16-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_16-bytes32-uint8-
  760. :xref-Packing-replace_32_16-bytes32-bytes16-uint8-: xref:utils.adoc#Packing-replace_32_16-bytes32-bytes16-uint8-
  761. :xref-Packing-extract_32_20-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_20-bytes32-uint8-
  762. :xref-Packing-replace_32_20-bytes32-bytes20-uint8-: xref:utils.adoc#Packing-replace_32_20-bytes32-bytes20-uint8-
  763. :xref-Packing-extract_32_22-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_22-bytes32-uint8-
  764. :xref-Packing-replace_32_22-bytes32-bytes22-uint8-: xref:utils.adoc#Packing-replace_32_22-bytes32-bytes22-uint8-
  765. :xref-Packing-extract_32_24-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_24-bytes32-uint8-
  766. :xref-Packing-replace_32_24-bytes32-bytes24-uint8-: xref:utils.adoc#Packing-replace_32_24-bytes32-bytes24-uint8-
  767. :xref-Packing-extract_32_28-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_28-bytes32-uint8-
  768. :xref-Packing-replace_32_28-bytes32-bytes28-uint8-: xref:utils.adoc#Packing-replace_32_28-bytes32-bytes28-uint8-
  769. :xref-Packing-OutOfRangeAccess--: xref:utils.adoc#Packing-OutOfRangeAccess--
  770. :xref-Panic-panic-uint256-: xref:utils.adoc#Panic-panic-uint256-
  771. :xref-Panic-GENERIC-uint256: xref:utils.adoc#Panic-GENERIC-uint256
  772. :xref-Panic-ASSERT-uint256: xref:utils.adoc#Panic-ASSERT-uint256
  773. :xref-Panic-UNDER_OVERFLOW-uint256: xref:utils.adoc#Panic-UNDER_OVERFLOW-uint256
  774. :xref-Panic-DIVISION_BY_ZERO-uint256: xref:utils.adoc#Panic-DIVISION_BY_ZERO-uint256
  775. :xref-Panic-ENUM_CONVERSION_ERROR-uint256: xref:utils.adoc#Panic-ENUM_CONVERSION_ERROR-uint256
  776. :xref-Panic-STORAGE_ENCODING_ERROR-uint256: xref:utils.adoc#Panic-STORAGE_ENCODING_ERROR-uint256
  777. :xref-Panic-EMPTY_ARRAY_POP-uint256: xref:utils.adoc#Panic-EMPTY_ARRAY_POP-uint256
  778. :xref-Panic-ARRAY_OUT_OF_BOUNDS-uint256: xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256
  779. :xref-Panic-RESOURCE_ERROR-uint256: xref:utils.adoc#Panic-RESOURCE_ERROR-uint256
  780. :xref-Panic-INVALID_INTERNAL_FUNCTION-uint256: xref:utils.adoc#Panic-INVALID_INTERNAL_FUNCTION-uint256
  781. :xref-Comparators-lt-uint256-uint256-: xref:utils.adoc#Comparators-lt-uint256-uint256-
  782. :xref-Comparators-gt-uint256-uint256-: xref:utils.adoc#Comparators-gt-uint256-uint256-
  783. = Utilities
  784. [.readme-notice]
  785. NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils
  786. Miscellaneous contracts and libraries containing utility functions you can use to improve security, work with new data types, or safely use low-level primitives.
  787. * {Math}, {SignedMath}: Implementation of various arithmetic functions.
  788. * {SafeCast}: Checked downcasting functions to avoid silent truncation.
  789. * {ECDSA}, {MessageHashUtils}: Libraries for interacting with ECDSA signatures.
  790. * {P256}: Library for verifying and recovering public keys from secp256r1 signatures.
  791. * {RSA}: Library with RSA PKCS#1 v1.5 signature verification utilities.
  792. * {SignatureChecker}: A library helper to support regular ECDSA from EOAs as well as ERC-1271 signatures for smart contracts.
  793. * {Hashes}: Commonly used hash functions.
  794. * {MerkleProof}: Functions for verifying https://en.wikipedia.org/wiki/Merkle_tree[Merkle Tree] proofs.
  795. * {EIP712}: Contract with functions to allow processing signed typed structure data according to https://eips.ethereum.org/EIPS/eip-712[EIP-712].
  796. * {ReentrancyGuard}: A modifier that can prevent reentrancy during certain functions.
  797. * {ReentrancyGuardTransient}: Variant of {ReentrancyGuard} that uses transient storage (https://eips.ethereum.org/EIPS/eip-1153[EIP-1153]).
  798. * {Pausable}: A common emergency response mechanism that can pause functionality while a remediation is pending.
  799. * {Nonces}: Utility for tracking and verifying address nonces that only increment.
  800. * {NoncesKeyed}: Alternative to {Nonces}, that support key-ed nonces following https://eips.ethereum.org/EIPS/eip-4337#semi-abstracted-nonce-support[ERC-4337 speciciations].
  801. * {ERC165}, {ERC165Checker}: Utilities for inspecting interfaces supported by contracts.
  802. * {BitMaps}: A simple library to manage boolean value mapped to a numerical index in an efficient way.
  803. * {EnumerableMap}: A type like Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`], but with key-value _enumeration_: this will let you know how many entries a mapping has, and iterate over them (which is not possible with `mapping`).
  804. * {EnumerableSet}: Like {EnumerableMap}, but for https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets]. Can be used to store privileged accounts, issued IDs, etc.
  805. * {DoubleEndedQueue}: An implementation of a https://en.wikipedia.org/wiki/Double-ended_queue[double ended queue] whose values can be removed added or remove from both sides. Useful for FIFO and LIFO structures.
  806. * {CircularBuffer}: A data structure to store the last N values pushed to it.
  807. * {Checkpoints}: A data structure to store values mapped to a strictly increasing key. Can be used for storing and accessing values over time.
  808. * {Heap}: A library that implements a https://en.wikipedia.org/wiki/Binary_heap[binary heap] in storage.
  809. * {MerkleTree}: A library with https://wikipedia.org/wiki/Merkle_Tree[Merkle Tree] data structures and helper functions.
  810. * {Create2}: Wrapper around the https://blog.openzeppelin.com/getting-the-most-out-of-create2/[`CREATE2` EVM opcode] for safe use without having to deal with low-level assembly.
  811. * {Address}: Collection of functions for overloading Solidity's https://docs.soliditylang.org/en/latest/types.html#address[`address`] type.
  812. * {Arrays}: Collection of functions that operate on https://docs.soliditylang.org/en/latest/types.html#arrays[`arrays`].
  813. * {Base64}: On-chain base64 and base64URL encoding according to https://datatracker.ietf.org/doc/html/rfc4648[RFC-4648].
  814. * {Bytes}: Common operations on bytes objects.
  815. * {Strings}: Common operations for strings formatting.
  816. * {ShortString}: Library to encode (and decode) short strings into (or from) a single bytes32 slot for optimizing costs. Short strings are limited to 31 characters.
  817. * {SlotDerivation}: Methods for deriving storage slot from ERC-7201 namespaces as well as from constructions such as mapping and arrays.
  818. * {StorageSlot}: Methods for accessing specific storage slots formatted as common primitive types.
  819. * {TransientSlot}: Primitives for reading from and writing to transient storage (only value types are currently supported).
  820. * {Multicall}: Abstract contract with a utility to allow batching together multiple calls in a single transaction. Useful for allowing EOAs to perform multiple operations at once.
  821. * {Context}: A utility for abstracting the sender and calldata in the current execution context.
  822. * {Packing}: A library for packing and unpacking multiple values into bytes32
  823. * {Panic}: A library to revert with https://docs.soliditylang.org/en/v0.8.20/control-structures.html#panic-via-assert-and-error-via-require[Solidity panic codes].
  824. * {Comparators}: A library that contains comparator functions to use with with the {Heap} library.
  825. * {CAIP2}, {CAIP10}: Libraries for formatting and parsing CAIP-2 and CAIP-10 identifiers.
  826. [NOTE]
  827. ====
  828. Because Solidity does not support generic types, {EnumerableMap} and {EnumerableSet} are specialized to a limited number of key-value types.
  829. ====
  830. == Math
  831. :Rounding: pass:normal[xref:#Math-Rounding[`++Rounding++`]]
  832. :tryAdd: pass:normal[xref:#Math-tryAdd-uint256-uint256-[`++tryAdd++`]]
  833. :trySub: pass:normal[xref:#Math-trySub-uint256-uint256-[`++trySub++`]]
  834. :tryMul: pass:normal[xref:#Math-tryMul-uint256-uint256-[`++tryMul++`]]
  835. :tryDiv: pass:normal[xref:#Math-tryDiv-uint256-uint256-[`++tryDiv++`]]
  836. :tryMod: pass:normal[xref:#Math-tryMod-uint256-uint256-[`++tryMod++`]]
  837. :ternary: pass:normal[xref:#Math-ternary-bool-uint256-uint256-[`++ternary++`]]
  838. :max: pass:normal[xref:#Math-max-uint256-uint256-[`++max++`]]
  839. :min: pass:normal[xref:#Math-min-uint256-uint256-[`++min++`]]
  840. :average: pass:normal[xref:#Math-average-uint256-uint256-[`++average++`]]
  841. :ceilDiv: pass:normal[xref:#Math-ceilDiv-uint256-uint256-[`++ceilDiv++`]]
  842. :mulDiv: pass:normal[xref:#Math-mulDiv-uint256-uint256-uint256-[`++mulDiv++`]]
  843. :mulDiv: pass:normal[xref:#Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-[`++mulDiv++`]]
  844. :invMod: pass:normal[xref:#Math-invMod-uint256-uint256-[`++invMod++`]]
  845. :invModPrime: pass:normal[xref:#Math-invModPrime-uint256-uint256-[`++invModPrime++`]]
  846. :modExp: pass:normal[xref:#Math-modExp-uint256-uint256-uint256-[`++modExp++`]]
  847. :tryModExp: pass:normal[xref:#Math-tryModExp-uint256-uint256-uint256-[`++tryModExp++`]]
  848. :modExp: pass:normal[xref:#Math-modExp-bytes-bytes-bytes-[`++modExp++`]]
  849. :tryModExp: pass:normal[xref:#Math-tryModExp-bytes-bytes-bytes-[`++tryModExp++`]]
  850. :sqrt: pass:normal[xref:#Math-sqrt-uint256-[`++sqrt++`]]
  851. :sqrt: pass:normal[xref:#Math-sqrt-uint256-enum-Math-Rounding-[`++sqrt++`]]
  852. :log2: pass:normal[xref:#Math-log2-uint256-[`++log2++`]]
  853. :log2: pass:normal[xref:#Math-log2-uint256-enum-Math-Rounding-[`++log2++`]]
  854. :log10: pass:normal[xref:#Math-log10-uint256-[`++log10++`]]
  855. :log10: pass:normal[xref:#Math-log10-uint256-enum-Math-Rounding-[`++log10++`]]
  856. :log256: pass:normal[xref:#Math-log256-uint256-[`++log256++`]]
  857. :log256: pass:normal[xref:#Math-log256-uint256-enum-Math-Rounding-[`++log256++`]]
  858. :unsignedRoundsUp: pass:normal[xref:#Math-unsignedRoundsUp-enum-Math-Rounding-[`++unsignedRoundsUp++`]]
  859. [.contract]
  860. [[Math]]
  861. === `++Math++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/math/Math.sol[{github-icon},role=heading-link]
  862. [.hljs-theme-light.nopadding]
  863. ```solidity
  864. import "@openzeppelin/contracts/utils/math/Math.sol";
  865. ```
  866. Standard math utilities missing in the Solidity language.
  867. [.contract-index]
  868. .Functions
  869. --
  870. * {xref-Math-tryAdd-uint256-uint256-}[`++tryAdd(a, b)++`]
  871. * {xref-Math-trySub-uint256-uint256-}[`++trySub(a, b)++`]
  872. * {xref-Math-tryMul-uint256-uint256-}[`++tryMul(a, b)++`]
  873. * {xref-Math-tryDiv-uint256-uint256-}[`++tryDiv(a, b)++`]
  874. * {xref-Math-tryMod-uint256-uint256-}[`++tryMod(a, b)++`]
  875. * {xref-Math-ternary-bool-uint256-uint256-}[`++ternary(condition, a, b)++`]
  876. * {xref-Math-max-uint256-uint256-}[`++max(a, b)++`]
  877. * {xref-Math-min-uint256-uint256-}[`++min(a, b)++`]
  878. * {xref-Math-average-uint256-uint256-}[`++average(a, b)++`]
  879. * {xref-Math-ceilDiv-uint256-uint256-}[`++ceilDiv(a, b)++`]
  880. * {xref-Math-mulDiv-uint256-uint256-uint256-}[`++mulDiv(x, y, denominator)++`]
  881. * {xref-Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-}[`++mulDiv(x, y, denominator, rounding)++`]
  882. * {xref-Math-invMod-uint256-uint256-}[`++invMod(a, n)++`]
  883. * {xref-Math-invModPrime-uint256-uint256-}[`++invModPrime(a, p)++`]
  884. * {xref-Math-modExp-uint256-uint256-uint256-}[`++modExp(b, e, m)++`]
  885. * {xref-Math-tryModExp-uint256-uint256-uint256-}[`++tryModExp(b, e, m)++`]
  886. * {xref-Math-modExp-bytes-bytes-bytes-}[`++modExp(b, e, m)++`]
  887. * {xref-Math-tryModExp-bytes-bytes-bytes-}[`++tryModExp(b, e, m)++`]
  888. * {xref-Math-sqrt-uint256-}[`++sqrt(a)++`]
  889. * {xref-Math-sqrt-uint256-enum-Math-Rounding-}[`++sqrt(a, rounding)++`]
  890. * {xref-Math-log2-uint256-}[`++log2(value)++`]
  891. * {xref-Math-log2-uint256-enum-Math-Rounding-}[`++log2(value, rounding)++`]
  892. * {xref-Math-log10-uint256-}[`++log10(value)++`]
  893. * {xref-Math-log10-uint256-enum-Math-Rounding-}[`++log10(value, rounding)++`]
  894. * {xref-Math-log256-uint256-}[`++log256(value)++`]
  895. * {xref-Math-log256-uint256-enum-Math-Rounding-}[`++log256(value, rounding)++`]
  896. * {xref-Math-unsignedRoundsUp-enum-Math-Rounding-}[`++unsignedRoundsUp(rounding)++`]
  897. --
  898. [.contract-item]
  899. [[Math-tryAdd-uint256-uint256-]]
  900. ==== `[.contract-item-name]#++tryAdd++#++(uint256 a, uint256 b) โ†’ bool success, uint256 result++` [.item-kind]#internal#
  901. Returns the addition of two unsigned integers, with an success flag (no overflow).
  902. [.contract-item]
  903. [[Math-trySub-uint256-uint256-]]
  904. ==== `[.contract-item-name]#++trySub++#++(uint256 a, uint256 b) โ†’ bool success, uint256 result++` [.item-kind]#internal#
  905. Returns the subtraction of two unsigned integers, with an success flag (no overflow).
  906. [.contract-item]
  907. [[Math-tryMul-uint256-uint256-]]
  908. ==== `[.contract-item-name]#++tryMul++#++(uint256 a, uint256 b) โ†’ bool success, uint256 result++` [.item-kind]#internal#
  909. Returns the multiplication of two unsigned integers, with an success flag (no overflow).
  910. [.contract-item]
  911. [[Math-tryDiv-uint256-uint256-]]
  912. ==== `[.contract-item-name]#++tryDiv++#++(uint256 a, uint256 b) โ†’ bool success, uint256 result++` [.item-kind]#internal#
  913. Returns the division of two unsigned integers, with a success flag (no division by zero).
  914. [.contract-item]
  915. [[Math-tryMod-uint256-uint256-]]
  916. ==== `[.contract-item-name]#++tryMod++#++(uint256 a, uint256 b) โ†’ bool success, uint256 result++` [.item-kind]#internal#
  917. Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).
  918. [.contract-item]
  919. [[Math-ternary-bool-uint256-uint256-]]
  920. ==== `[.contract-item-name]#++ternary++#++(bool condition, uint256 a, uint256 b) โ†’ uint256++` [.item-kind]#internal#
  921. Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
  922. IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
  923. However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
  924. one branch when needed, making this function more expensive.
  925. [.contract-item]
  926. [[Math-max-uint256-uint256-]]
  927. ==== `[.contract-item-name]#++max++#++(uint256 a, uint256 b) โ†’ uint256++` [.item-kind]#internal#
  928. Returns the largest of two numbers.
  929. [.contract-item]
  930. [[Math-min-uint256-uint256-]]
  931. ==== `[.contract-item-name]#++min++#++(uint256 a, uint256 b) โ†’ uint256++` [.item-kind]#internal#
  932. Returns the smallest of two numbers.
  933. [.contract-item]
  934. [[Math-average-uint256-uint256-]]
  935. ==== `[.contract-item-name]#++average++#++(uint256 a, uint256 b) โ†’ uint256++` [.item-kind]#internal#
  936. Returns the average of two numbers. The result is rounded towards
  937. zero.
  938. [.contract-item]
  939. [[Math-ceilDiv-uint256-uint256-]]
  940. ==== `[.contract-item-name]#++ceilDiv++#++(uint256 a, uint256 b) โ†’ uint256++` [.item-kind]#internal#
  941. Returns the ceiling of the division of two numbers.
  942. This differs from standard division with `/` in that it rounds towards infinity instead
  943. of rounding towards zero.
  944. [.contract-item]
  945. [[Math-mulDiv-uint256-uint256-uint256-]]
  946. ==== `[.contract-item-name]#++mulDiv++#++(uint256 x, uint256 y, uint256 denominator) โ†’ uint256 result++` [.item-kind]#internal#
  947. Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
  948. denominator == 0.
  949. Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
  950. Uniswap Labs also under MIT license.
  951. [.contract-item]
  952. [[Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-]]
  953. ==== `[.contract-item-name]#++mulDiv++#++(uint256 x, uint256 y, uint256 denominator, enum Math.Rounding rounding) โ†’ uint256++` [.item-kind]#internal#
  954. Calculates x * y / denominator with full precision, following the selected rounding direction.
  955. [.contract-item]
  956. [[Math-invMod-uint256-uint256-]]
  957. ==== `[.contract-item-name]#++invMod++#++(uint256 a, uint256 n) โ†’ uint256++` [.item-kind]#internal#
  958. Calculate the modular multiplicative inverse of a number in Z/nZ.
  959. If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.
  960. If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.
  961. If the input value is not inversible, 0 is returned.
  962. NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the
  963. inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.
  964. [.contract-item]
  965. [[Math-invModPrime-uint256-uint256-]]
  966. ==== `[.contract-item-name]#++invModPrime++#++(uint256 a, uint256 p) โ†’ uint256++` [.item-kind]#internal#
  967. Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.
  968. From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is
  969. prime, then `a**(p-1) โ‰ก 1 mod p`. As a consequence, we have `a * a**(p-2) โ‰ก 1 mod p`, which means that
  970. `a**(p-2)` is the modular multiplicative inverse of a in Fp.
  971. NOTE: this function does NOT check that `p` is a prime greater than `2`.
  972. [.contract-item]
  973. [[Math-modExp-uint256-uint256-uint256-]]
  974. ==== `[.contract-item-name]#++modExp++#++(uint256 b, uint256 e, uint256 m) โ†’ uint256++` [.item-kind]#internal#
  975. Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)
  976. Requirements:
  977. - modulus can't be zero
  978. - underlying staticcall to precompile must succeed
  979. IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make
  980. sure the chain you're using it on supports the precompiled contract for modular exponentiation
  981. at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,
  982. the underlying function will succeed given the lack of a revert, but the result may be incorrectly
  983. interpreted as 0.
  984. [.contract-item]
  985. [[Math-tryModExp-uint256-uint256-uint256-]]
  986. ==== `[.contract-item-name]#++tryModExp++#++(uint256 b, uint256 e, uint256 m) โ†’ bool success, uint256 result++` [.item-kind]#internal#
  987. Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).
  988. It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying
  989. to operate modulo 0 or if the underlying precompile reverted.
  990. IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain
  991. you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in
  992. https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack
  993. of a revert, but the result may be incorrectly interpreted as 0.
  994. [.contract-item]
  995. [[Math-modExp-bytes-bytes-bytes-]]
  996. ==== `[.contract-item-name]#++modExp++#++(bytes b, bytes e, bytes m) โ†’ bytes++` [.item-kind]#internal#
  997. Variant of {modExp} that supports inputs of arbitrary length.
  998. [.contract-item]
  999. [[Math-tryModExp-bytes-bytes-bytes-]]
  1000. ==== `[.contract-item-name]#++tryModExp++#++(bytes b, bytes e, bytes m) โ†’ bool success, bytes result++` [.item-kind]#internal#
  1001. Variant of {tryModExp} that supports inputs of arbitrary length.
  1002. [.contract-item]
  1003. [[Math-sqrt-uint256-]]
  1004. ==== `[.contract-item-name]#++sqrt++#++(uint256 a) โ†’ uint256++` [.item-kind]#internal#
  1005. Returns the square root of a number. If the number is not a perfect square, the value is rounded
  1006. towards zero.
  1007. This method is based on Newton's method for computing square roots; the algorithm is restricted to only
  1008. using integer operations.
  1009. [.contract-item]
  1010. [[Math-sqrt-uint256-enum-Math-Rounding-]]
  1011. ==== `[.contract-item-name]#++sqrt++#++(uint256 a, enum Math.Rounding rounding) โ†’ uint256++` [.item-kind]#internal#
  1012. Calculates sqrt(a), following the selected rounding direction.
  1013. [.contract-item]
  1014. [[Math-log2-uint256-]]
  1015. ==== `[.contract-item-name]#++log2++#++(uint256 value) โ†’ uint256++` [.item-kind]#internal#
  1016. Return the log in base 2 of a positive value rounded towards zero.
  1017. Returns 0 if given 0.
  1018. [.contract-item]
  1019. [[Math-log2-uint256-enum-Math-Rounding-]]
  1020. ==== `[.contract-item-name]#++log2++#++(uint256 value, enum Math.Rounding rounding) โ†’ uint256++` [.item-kind]#internal#
  1021. Return the log in base 2, following the selected rounding direction, of a positive value.
  1022. Returns 0 if given 0.
  1023. [.contract-item]
  1024. [[Math-log10-uint256-]]
  1025. ==== `[.contract-item-name]#++log10++#++(uint256 value) โ†’ uint256++` [.item-kind]#internal#
  1026. Return the log in base 10 of a positive value rounded towards zero.
  1027. Returns 0 if given 0.
  1028. [.contract-item]
  1029. [[Math-log10-uint256-enum-Math-Rounding-]]
  1030. ==== `[.contract-item-name]#++log10++#++(uint256 value, enum Math.Rounding rounding) โ†’ uint256++` [.item-kind]#internal#
  1031. Return the log in base 10, following the selected rounding direction, of a positive value.
  1032. Returns 0 if given 0.
  1033. [.contract-item]
  1034. [[Math-log256-uint256-]]
  1035. ==== `[.contract-item-name]#++log256++#++(uint256 value) โ†’ uint256++` [.item-kind]#internal#
  1036. Return the log in base 256 of a positive value rounded towards zero.
  1037. Returns 0 if given 0.
  1038. Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
  1039. [.contract-item]
  1040. [[Math-log256-uint256-enum-Math-Rounding-]]
  1041. ==== `[.contract-item-name]#++log256++#++(uint256 value, enum Math.Rounding rounding) โ†’ uint256++` [.item-kind]#internal#
  1042. Return the log in base 256, following the selected rounding direction, of a positive value.
  1043. Returns 0 if given 0.
  1044. [.contract-item]
  1045. [[Math-unsignedRoundsUp-enum-Math-Rounding-]]
  1046. ==== `[.contract-item-name]#++unsignedRoundsUp++#++(enum Math.Rounding rounding) โ†’ bool++` [.item-kind]#internal#
  1047. Returns whether a provided rounding mode is considered rounding up for unsigned integers.
  1048. :ternary: pass:normal[xref:#SignedMath-ternary-bool-int256-int256-[`++ternary++`]]
  1049. :max: pass:normal[xref:#SignedMath-max-int256-int256-[`++max++`]]
  1050. :min: pass:normal[xref:#SignedMath-min-int256-int256-[`++min++`]]
  1051. :average: pass:normal[xref:#SignedMath-average-int256-int256-[`++average++`]]
  1052. :abs: pass:normal[xref:#SignedMath-abs-int256-[`++abs++`]]
  1053. [.contract]
  1054. [[SignedMath]]
  1055. === `++SignedMath++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/math/SignedMath.sol[{github-icon},role=heading-link]
  1056. [.hljs-theme-light.nopadding]
  1057. ```solidity
  1058. import "@openzeppelin/contracts/utils/math/SignedMath.sol";
  1059. ```
  1060. Standard signed math utilities missing in the Solidity language.
  1061. [.contract-index]
  1062. .Functions
  1063. --
  1064. * {xref-SignedMath-ternary-bool-int256-int256-}[`++ternary(condition, a, b)++`]
  1065. * {xref-SignedMath-max-int256-int256-}[`++max(a, b)++`]
  1066. * {xref-SignedMath-min-int256-int256-}[`++min(a, b)++`]
  1067. * {xref-SignedMath-average-int256-int256-}[`++average(a, b)++`]
  1068. * {xref-SignedMath-abs-int256-}[`++abs(n)++`]
  1069. --
  1070. [.contract-item]
  1071. [[SignedMath-ternary-bool-int256-int256-]]
  1072. ==== `[.contract-item-name]#++ternary++#++(bool condition, int256 a, int256 b) โ†’ int256++` [.item-kind]#internal#
  1073. Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
  1074. IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
  1075. However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
  1076. one branch when needed, making this function more expensive.
  1077. [.contract-item]
  1078. [[SignedMath-max-int256-int256-]]
  1079. ==== `[.contract-item-name]#++max++#++(int256 a, int256 b) โ†’ int256++` [.item-kind]#internal#
  1080. Returns the largest of two signed numbers.
  1081. [.contract-item]
  1082. [[SignedMath-min-int256-int256-]]
  1083. ==== `[.contract-item-name]#++min++#++(int256 a, int256 b) โ†’ int256++` [.item-kind]#internal#
  1084. Returns the smallest of two signed numbers.
  1085. [.contract-item]
  1086. [[SignedMath-average-int256-int256-]]
  1087. ==== `[.contract-item-name]#++average++#++(int256 a, int256 b) โ†’ int256++` [.item-kind]#internal#
  1088. Returns the average of two signed numbers without overflow.
  1089. The result is rounded towards zero.
  1090. [.contract-item]
  1091. [[SignedMath-abs-int256-]]
  1092. ==== `[.contract-item-name]#++abs++#++(int256 n) โ†’ uint256++` [.item-kind]#internal#
  1093. Returns the absolute unsigned value of a signed value.
  1094. :SafeCastOverflowedUintDowncast: pass:normal[xref:#SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-[`++SafeCastOverflowedUintDowncast++`]]
  1095. :SafeCastOverflowedIntToUint: pass:normal[xref:#SafeCast-SafeCastOverflowedIntToUint-int256-[`++SafeCastOverflowedIntToUint++`]]
  1096. :SafeCastOverflowedIntDowncast: pass:normal[xref:#SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-[`++SafeCastOverflowedIntDowncast++`]]
  1097. :SafeCastOverflowedUintToInt: pass:normal[xref:#SafeCast-SafeCastOverflowedUintToInt-uint256-[`++SafeCastOverflowedUintToInt++`]]
  1098. :toUint248: pass:normal[xref:#SafeCast-toUint248-uint256-[`++toUint248++`]]
  1099. :toUint240: pass:normal[xref:#SafeCast-toUint240-uint256-[`++toUint240++`]]
  1100. :toUint232: pass:normal[xref:#SafeCast-toUint232-uint256-[`++toUint232++`]]
  1101. :toUint224: pass:normal[xref:#SafeCast-toUint224-uint256-[`++toUint224++`]]
  1102. :toUint216: pass:normal[xref:#SafeCast-toUint216-uint256-[`++toUint216++`]]
  1103. :toUint208: pass:normal[xref:#SafeCast-toUint208-uint256-[`++toUint208++`]]
  1104. :toUint200: pass:normal[xref:#SafeCast-toUint200-uint256-[`++toUint200++`]]
  1105. :toUint192: pass:normal[xref:#SafeCast-toUint192-uint256-[`++toUint192++`]]
  1106. :toUint184: pass:normal[xref:#SafeCast-toUint184-uint256-[`++toUint184++`]]
  1107. :toUint176: pass:normal[xref:#SafeCast-toUint176-uint256-[`++toUint176++`]]
  1108. :toUint168: pass:normal[xref:#SafeCast-toUint168-uint256-[`++toUint168++`]]
  1109. :toUint160: pass:normal[xref:#SafeCast-toUint160-uint256-[`++toUint160++`]]
  1110. :toUint152: pass:normal[xref:#SafeCast-toUint152-uint256-[`++toUint152++`]]
  1111. :toUint144: pass:normal[xref:#SafeCast-toUint144-uint256-[`++toUint144++`]]
  1112. :toUint136: pass:normal[xref:#SafeCast-toUint136-uint256-[`++toUint136++`]]
  1113. :toUint128: pass:normal[xref:#SafeCast-toUint128-uint256-[`++toUint128++`]]
  1114. :toUint120: pass:normal[xref:#SafeCast-toUint120-uint256-[`++toUint120++`]]
  1115. :toUint112: pass:normal[xref:#SafeCast-toUint112-uint256-[`++toUint112++`]]
  1116. :toUint104: pass:normal[xref:#SafeCast-toUint104-uint256-[`++toUint104++`]]
  1117. :toUint96: pass:normal[xref:#SafeCast-toUint96-uint256-[`++toUint96++`]]
  1118. :toUint88: pass:normal[xref:#SafeCast-toUint88-uint256-[`++toUint88++`]]
  1119. :toUint80: pass:normal[xref:#SafeCast-toUint80-uint256-[`++toUint80++`]]
  1120. :toUint72: pass:normal[xref:#SafeCast-toUint72-uint256-[`++toUint72++`]]
  1121. :toUint64: pass:normal[xref:#SafeCast-toUint64-uint256-[`++toUint64++`]]
  1122. :toUint56: pass:normal[xref:#SafeCast-toUint56-uint256-[`++toUint56++`]]
  1123. :toUint48: pass:normal[xref:#SafeCast-toUint48-uint256-[`++toUint48++`]]
  1124. :toUint40: pass:normal[xref:#SafeCast-toUint40-uint256-[`++toUint40++`]]
  1125. :toUint32: pass:normal[xref:#SafeCast-toUint32-uint256-[`++toUint32++`]]
  1126. :toUint24: pass:normal[xref:#SafeCast-toUint24-uint256-[`++toUint24++`]]
  1127. :toUint16: pass:normal[xref:#SafeCast-toUint16-uint256-[`++toUint16++`]]
  1128. :toUint8: pass:normal[xref:#SafeCast-toUint8-uint256-[`++toUint8++`]]
  1129. :toUint256: pass:normal[xref:#SafeCast-toUint256-int256-[`++toUint256++`]]
  1130. :toInt248: pass:normal[xref:#SafeCast-toInt248-int256-[`++toInt248++`]]
  1131. :toInt240: pass:normal[xref:#SafeCast-toInt240-int256-[`++toInt240++`]]
  1132. :toInt232: pass:normal[xref:#SafeCast-toInt232-int256-[`++toInt232++`]]
  1133. :toInt224: pass:normal[xref:#SafeCast-toInt224-int256-[`++toInt224++`]]
  1134. :toInt216: pass:normal[xref:#SafeCast-toInt216-int256-[`++toInt216++`]]
  1135. :toInt208: pass:normal[xref:#SafeCast-toInt208-int256-[`++toInt208++`]]
  1136. :toInt200: pass:normal[xref:#SafeCast-toInt200-int256-[`++toInt200++`]]
  1137. :toInt192: pass:normal[xref:#SafeCast-toInt192-int256-[`++toInt192++`]]
  1138. :toInt184: pass:normal[xref:#SafeCast-toInt184-int256-[`++toInt184++`]]
  1139. :toInt176: pass:normal[xref:#SafeCast-toInt176-int256-[`++toInt176++`]]
  1140. :toInt168: pass:normal[xref:#SafeCast-toInt168-int256-[`++toInt168++`]]
  1141. :toInt160: pass:normal[xref:#SafeCast-toInt160-int256-[`++toInt160++`]]
  1142. :toInt152: pass:normal[xref:#SafeCast-toInt152-int256-[`++toInt152++`]]
  1143. :toInt144: pass:normal[xref:#SafeCast-toInt144-int256-[`++toInt144++`]]
  1144. :toInt136: pass:normal[xref:#SafeCast-toInt136-int256-[`++toInt136++`]]
  1145. :toInt128: pass:normal[xref:#SafeCast-toInt128-int256-[`++toInt128++`]]
  1146. :toInt120: pass:normal[xref:#SafeCast-toInt120-int256-[`++toInt120++`]]
  1147. :toInt112: pass:normal[xref:#SafeCast-toInt112-int256-[`++toInt112++`]]
  1148. :toInt104: pass:normal[xref:#SafeCast-toInt104-int256-[`++toInt104++`]]
  1149. :toInt96: pass:normal[xref:#SafeCast-toInt96-int256-[`++toInt96++`]]
  1150. :toInt88: pass:normal[xref:#SafeCast-toInt88-int256-[`++toInt88++`]]
  1151. :toInt80: pass:normal[xref:#SafeCast-toInt80-int256-[`++toInt80++`]]
  1152. :toInt72: pass:normal[xref:#SafeCast-toInt72-int256-[`++toInt72++`]]
  1153. :toInt64: pass:normal[xref:#SafeCast-toInt64-int256-[`++toInt64++`]]
  1154. :toInt56: pass:normal[xref:#SafeCast-toInt56-int256-[`++toInt56++`]]
  1155. :toInt48: pass:normal[xref:#SafeCast-toInt48-int256-[`++toInt48++`]]
  1156. :toInt40: pass:normal[xref:#SafeCast-toInt40-int256-[`++toInt40++`]]
  1157. :toInt32: pass:normal[xref:#SafeCast-toInt32-int256-[`++toInt32++`]]
  1158. :toInt24: pass:normal[xref:#SafeCast-toInt24-int256-[`++toInt24++`]]
  1159. :toInt16: pass:normal[xref:#SafeCast-toInt16-int256-[`++toInt16++`]]
  1160. :toInt8: pass:normal[xref:#SafeCast-toInt8-int256-[`++toInt8++`]]
  1161. :toInt256: pass:normal[xref:#SafeCast-toInt256-uint256-[`++toInt256++`]]
  1162. :toUint: pass:normal[xref:#SafeCast-toUint-bool-[`++toUint++`]]
  1163. [.contract]
  1164. [[SafeCast]]
  1165. === `++SafeCast++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/math/SafeCast.sol[{github-icon},role=heading-link]
  1166. [.hljs-theme-light.nopadding]
  1167. ```solidity
  1168. import "@openzeppelin/contracts/utils/math/SafeCast.sol";
  1169. ```
  1170. Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow
  1171. checks.
  1172. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
  1173. easily result in undesired exploitation or bugs, since developers usually
  1174. assume that overflows raise errors. `SafeCast` restores this intuition by
  1175. reverting the transaction when such an operation overflows.
  1176. Using this library instead of the unchecked operations eliminates an entire
  1177. class of bugs, so it's recommended to use it always.
  1178. [.contract-index]
  1179. .Functions
  1180. --
  1181. * {xref-SafeCast-toUint248-uint256-}[`++toUint248(value)++`]
  1182. * {xref-SafeCast-toUint240-uint256-}[`++toUint240(value)++`]
  1183. * {xref-SafeCast-toUint232-uint256-}[`++toUint232(value)++`]
  1184. * {xref-SafeCast-toUint224-uint256-}[`++toUint224(value)++`]
  1185. * {xref-SafeCast-toUint216-uint256-}[`++toUint216(value)++`]
  1186. * {xref-SafeCast-toUint208-uint256-}[`++toUint208(value)++`]
  1187. * {xref-SafeCast-toUint200-uint256-}[`++toUint200(value)++`]
  1188. * {xref-SafeCast-toUint192-uint256-}[`++toUint192(value)++`]
  1189. * {xref-SafeCast-toUint184-uint256-}[`++toUint184(value)++`]
  1190. * {xref-SafeCast-toUint176-uint256-}[`++toUint176(value)++`]
  1191. * {xref-SafeCast-toUint168-uint256-}[`++toUint168(value)++`]
  1192. * {xref-SafeCast-toUint160-uint256-}[`++toUint160(value)++`]
  1193. * {xref-SafeCast-toUint152-uint256-}[`++toUint152(value)++`]
  1194. * {xref-SafeCast-toUint144-uint256-}[`++toUint144(value)++`]
  1195. * {xref-SafeCast-toUint136-uint256-}[`++toUint136(value)++`]
  1196. * {xref-SafeCast-toUint128-uint256-}[`++toUint128(value)++`]
  1197. * {xref-SafeCast-toUint120-uint256-}[`++toUint120(value)++`]
  1198. * {xref-SafeCast-toUint112-uint256-}[`++toUint112(value)++`]
  1199. * {xref-SafeCast-toUint104-uint256-}[`++toUint104(value)++`]
  1200. * {xref-SafeCast-toUint96-uint256-}[`++toUint96(value)++`]
  1201. * {xref-SafeCast-toUint88-uint256-}[`++toUint88(value)++`]
  1202. * {xref-SafeCast-toUint80-uint256-}[`++toUint80(value)++`]
  1203. * {xref-SafeCast-toUint72-uint256-}[`++toUint72(value)++`]
  1204. * {xref-SafeCast-toUint64-uint256-}[`++toUint64(value)++`]
  1205. * {xref-SafeCast-toUint56-uint256-}[`++toUint56(value)++`]
  1206. * {xref-SafeCast-toUint48-uint256-}[`++toUint48(value)++`]
  1207. * {xref-SafeCast-toUint40-uint256-}[`++toUint40(value)++`]
  1208. * {xref-SafeCast-toUint32-uint256-}[`++toUint32(value)++`]
  1209. * {xref-SafeCast-toUint24-uint256-}[`++toUint24(value)++`]
  1210. * {xref-SafeCast-toUint16-uint256-}[`++toUint16(value)++`]
  1211. * {xref-SafeCast-toUint8-uint256-}[`++toUint8(value)++`]
  1212. * {xref-SafeCast-toUint256-int256-}[`++toUint256(value)++`]
  1213. * {xref-SafeCast-toInt248-int256-}[`++toInt248(value)++`]
  1214. * {xref-SafeCast-toInt240-int256-}[`++toInt240(value)++`]
  1215. * {xref-SafeCast-toInt232-int256-}[`++toInt232(value)++`]
  1216. * {xref-SafeCast-toInt224-int256-}[`++toInt224(value)++`]
  1217. * {xref-SafeCast-toInt216-int256-}[`++toInt216(value)++`]
  1218. * {xref-SafeCast-toInt208-int256-}[`++toInt208(value)++`]
  1219. * {xref-SafeCast-toInt200-int256-}[`++toInt200(value)++`]
  1220. * {xref-SafeCast-toInt192-int256-}[`++toInt192(value)++`]
  1221. * {xref-SafeCast-toInt184-int256-}[`++toInt184(value)++`]
  1222. * {xref-SafeCast-toInt176-int256-}[`++toInt176(value)++`]
  1223. * {xref-SafeCast-toInt168-int256-}[`++toInt168(value)++`]
  1224. * {xref-SafeCast-toInt160-int256-}[`++toInt160(value)++`]
  1225. * {xref-SafeCast-toInt152-int256-}[`++toInt152(value)++`]
  1226. * {xref-SafeCast-toInt144-int256-}[`++toInt144(value)++`]
  1227. * {xref-SafeCast-toInt136-int256-}[`++toInt136(value)++`]
  1228. * {xref-SafeCast-toInt128-int256-}[`++toInt128(value)++`]
  1229. * {xref-SafeCast-toInt120-int256-}[`++toInt120(value)++`]
  1230. * {xref-SafeCast-toInt112-int256-}[`++toInt112(value)++`]
  1231. * {xref-SafeCast-toInt104-int256-}[`++toInt104(value)++`]
  1232. * {xref-SafeCast-toInt96-int256-}[`++toInt96(value)++`]
  1233. * {xref-SafeCast-toInt88-int256-}[`++toInt88(value)++`]
  1234. * {xref-SafeCast-toInt80-int256-}[`++toInt80(value)++`]
  1235. * {xref-SafeCast-toInt72-int256-}[`++toInt72(value)++`]
  1236. * {xref-SafeCast-toInt64-int256-}[`++toInt64(value)++`]
  1237. * {xref-SafeCast-toInt56-int256-}[`++toInt56(value)++`]
  1238. * {xref-SafeCast-toInt48-int256-}[`++toInt48(value)++`]
  1239. * {xref-SafeCast-toInt40-int256-}[`++toInt40(value)++`]
  1240. * {xref-SafeCast-toInt32-int256-}[`++toInt32(value)++`]
  1241. * {xref-SafeCast-toInt24-int256-}[`++toInt24(value)++`]
  1242. * {xref-SafeCast-toInt16-int256-}[`++toInt16(value)++`]
  1243. * {xref-SafeCast-toInt8-int256-}[`++toInt8(value)++`]
  1244. * {xref-SafeCast-toInt256-uint256-}[`++toInt256(value)++`]
  1245. * {xref-SafeCast-toUint-bool-}[`++toUint(b)++`]
  1246. --
  1247. [.contract-index]
  1248. .Errors
  1249. --
  1250. * {xref-SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-}[`++SafeCastOverflowedUintDowncast(bits, value)++`]
  1251. * {xref-SafeCast-SafeCastOverflowedIntToUint-int256-}[`++SafeCastOverflowedIntToUint(value)++`]
  1252. * {xref-SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-}[`++SafeCastOverflowedIntDowncast(bits, value)++`]
  1253. * {xref-SafeCast-SafeCastOverflowedUintToInt-uint256-}[`++SafeCastOverflowedUintToInt(value)++`]
  1254. --
  1255. [.contract-item]
  1256. [[SafeCast-toUint248-uint256-]]
  1257. ==== `[.contract-item-name]#++toUint248++#++(uint256 value) โ†’ uint248++` [.item-kind]#internal#
  1258. Returns the downcasted uint248 from uint256, reverting on
  1259. overflow (when the input is greater than largest uint248).
  1260. Counterpart to Solidity's `uint248` operator.
  1261. Requirements:
  1262. - input must fit into 248 bits
  1263. [.contract-item]
  1264. [[SafeCast-toUint240-uint256-]]
  1265. ==== `[.contract-item-name]#++toUint240++#++(uint256 value) โ†’ uint240++` [.item-kind]#internal#
  1266. Returns the downcasted uint240 from uint256, reverting on
  1267. overflow (when the input is greater than largest uint240).
  1268. Counterpart to Solidity's `uint240` operator.
  1269. Requirements:
  1270. - input must fit into 240 bits
  1271. [.contract-item]
  1272. [[SafeCast-toUint232-uint256-]]
  1273. ==== `[.contract-item-name]#++toUint232++#++(uint256 value) โ†’ uint232++` [.item-kind]#internal#
  1274. Returns the downcasted uint232 from uint256, reverting on
  1275. overflow (when the input is greater than largest uint232).
  1276. Counterpart to Solidity's `uint232` operator.
  1277. Requirements:
  1278. - input must fit into 232 bits
  1279. [.contract-item]
  1280. [[SafeCast-toUint224-uint256-]]
  1281. ==== `[.contract-item-name]#++toUint224++#++(uint256 value) โ†’ uint224++` [.item-kind]#internal#
  1282. Returns the downcasted uint224 from uint256, reverting on
  1283. overflow (when the input is greater than largest uint224).
  1284. Counterpart to Solidity's `uint224` operator.
  1285. Requirements:
  1286. - input must fit into 224 bits
  1287. [.contract-item]
  1288. [[SafeCast-toUint216-uint256-]]
  1289. ==== `[.contract-item-name]#++toUint216++#++(uint256 value) โ†’ uint216++` [.item-kind]#internal#
  1290. Returns the downcasted uint216 from uint256, reverting on
  1291. overflow (when the input is greater than largest uint216).
  1292. Counterpart to Solidity's `uint216` operator.
  1293. Requirements:
  1294. - input must fit into 216 bits
  1295. [.contract-item]
  1296. [[SafeCast-toUint208-uint256-]]
  1297. ==== `[.contract-item-name]#++toUint208++#++(uint256 value) โ†’ uint208++` [.item-kind]#internal#
  1298. Returns the downcasted uint208 from uint256, reverting on
  1299. overflow (when the input is greater than largest uint208).
  1300. Counterpart to Solidity's `uint208` operator.
  1301. Requirements:
  1302. - input must fit into 208 bits
  1303. [.contract-item]
  1304. [[SafeCast-toUint200-uint256-]]
  1305. ==== `[.contract-item-name]#++toUint200++#++(uint256 value) โ†’ uint200++` [.item-kind]#internal#
  1306. Returns the downcasted uint200 from uint256, reverting on
  1307. overflow (when the input is greater than largest uint200).
  1308. Counterpart to Solidity's `uint200` operator.
  1309. Requirements:
  1310. - input must fit into 200 bits
  1311. [.contract-item]
  1312. [[SafeCast-toUint192-uint256-]]
  1313. ==== `[.contract-item-name]#++toUint192++#++(uint256 value) โ†’ uint192++` [.item-kind]#internal#
  1314. Returns the downcasted uint192 from uint256, reverting on
  1315. overflow (when the input is greater than largest uint192).
  1316. Counterpart to Solidity's `uint192` operator.
  1317. Requirements:
  1318. - input must fit into 192 bits
  1319. [.contract-item]
  1320. [[SafeCast-toUint184-uint256-]]
  1321. ==== `[.contract-item-name]#++toUint184++#++(uint256 value) โ†’ uint184++` [.item-kind]#internal#
  1322. Returns the downcasted uint184 from uint256, reverting on
  1323. overflow (when the input is greater than largest uint184).
  1324. Counterpart to Solidity's `uint184` operator.
  1325. Requirements:
  1326. - input must fit into 184 bits
  1327. [.contract-item]
  1328. [[SafeCast-toUint176-uint256-]]
  1329. ==== `[.contract-item-name]#++toUint176++#++(uint256 value) โ†’ uint176++` [.item-kind]#internal#
  1330. Returns the downcasted uint176 from uint256, reverting on
  1331. overflow (when the input is greater than largest uint176).
  1332. Counterpart to Solidity's `uint176` operator.
  1333. Requirements:
  1334. - input must fit into 176 bits
  1335. [.contract-item]
  1336. [[SafeCast-toUint168-uint256-]]
  1337. ==== `[.contract-item-name]#++toUint168++#++(uint256 value) โ†’ uint168++` [.item-kind]#internal#
  1338. Returns the downcasted uint168 from uint256, reverting on
  1339. overflow (when the input is greater than largest uint168).
  1340. Counterpart to Solidity's `uint168` operator.
  1341. Requirements:
  1342. - input must fit into 168 bits
  1343. [.contract-item]
  1344. [[SafeCast-toUint160-uint256-]]
  1345. ==== `[.contract-item-name]#++toUint160++#++(uint256 value) โ†’ uint160++` [.item-kind]#internal#
  1346. Returns the downcasted uint160 from uint256, reverting on
  1347. overflow (when the input is greater than largest uint160).
  1348. Counterpart to Solidity's `uint160` operator.
  1349. Requirements:
  1350. - input must fit into 160 bits
  1351. [.contract-item]
  1352. [[SafeCast-toUint152-uint256-]]
  1353. ==== `[.contract-item-name]#++toUint152++#++(uint256 value) โ†’ uint152++` [.item-kind]#internal#
  1354. Returns the downcasted uint152 from uint256, reverting on
  1355. overflow (when the input is greater than largest uint152).
  1356. Counterpart to Solidity's `uint152` operator.
  1357. Requirements:
  1358. - input must fit into 152 bits
  1359. [.contract-item]
  1360. [[SafeCast-toUint144-uint256-]]
  1361. ==== `[.contract-item-name]#++toUint144++#++(uint256 value) โ†’ uint144++` [.item-kind]#internal#
  1362. Returns the downcasted uint144 from uint256, reverting on
  1363. overflow (when the input is greater than largest uint144).
  1364. Counterpart to Solidity's `uint144` operator.
  1365. Requirements:
  1366. - input must fit into 144 bits
  1367. [.contract-item]
  1368. [[SafeCast-toUint136-uint256-]]
  1369. ==== `[.contract-item-name]#++toUint136++#++(uint256 value) โ†’ uint136++` [.item-kind]#internal#
  1370. Returns the downcasted uint136 from uint256, reverting on
  1371. overflow (when the input is greater than largest uint136).
  1372. Counterpart to Solidity's `uint136` operator.
  1373. Requirements:
  1374. - input must fit into 136 bits
  1375. [.contract-item]
  1376. [[SafeCast-toUint128-uint256-]]
  1377. ==== `[.contract-item-name]#++toUint128++#++(uint256 value) โ†’ uint128++` [.item-kind]#internal#
  1378. Returns the downcasted uint128 from uint256, reverting on
  1379. overflow (when the input is greater than largest uint128).
  1380. Counterpart to Solidity's `uint128` operator.
  1381. Requirements:
  1382. - input must fit into 128 bits
  1383. [.contract-item]
  1384. [[SafeCast-toUint120-uint256-]]
  1385. ==== `[.contract-item-name]#++toUint120++#++(uint256 value) โ†’ uint120++` [.item-kind]#internal#
  1386. Returns the downcasted uint120 from uint256, reverting on
  1387. overflow (when the input is greater than largest uint120).
  1388. Counterpart to Solidity's `uint120` operator.
  1389. Requirements:
  1390. - input must fit into 120 bits
  1391. [.contract-item]
  1392. [[SafeCast-toUint112-uint256-]]
  1393. ==== `[.contract-item-name]#++toUint112++#++(uint256 value) โ†’ uint112++` [.item-kind]#internal#
  1394. Returns the downcasted uint112 from uint256, reverting on
  1395. overflow (when the input is greater than largest uint112).
  1396. Counterpart to Solidity's `uint112` operator.
  1397. Requirements:
  1398. - input must fit into 112 bits
  1399. [.contract-item]
  1400. [[SafeCast-toUint104-uint256-]]
  1401. ==== `[.contract-item-name]#++toUint104++#++(uint256 value) โ†’ uint104++` [.item-kind]#internal#
  1402. Returns the downcasted uint104 from uint256, reverting on
  1403. overflow (when the input is greater than largest uint104).
  1404. Counterpart to Solidity's `uint104` operator.
  1405. Requirements:
  1406. - input must fit into 104 bits
  1407. [.contract-item]
  1408. [[SafeCast-toUint96-uint256-]]
  1409. ==== `[.contract-item-name]#++toUint96++#++(uint256 value) โ†’ uint96++` [.item-kind]#internal#
  1410. Returns the downcasted uint96 from uint256, reverting on
  1411. overflow (when the input is greater than largest uint96).
  1412. Counterpart to Solidity's `uint96` operator.
  1413. Requirements:
  1414. - input must fit into 96 bits
  1415. [.contract-item]
  1416. [[SafeCast-toUint88-uint256-]]
  1417. ==== `[.contract-item-name]#++toUint88++#++(uint256 value) โ†’ uint88++` [.item-kind]#internal#
  1418. Returns the downcasted uint88 from uint256, reverting on
  1419. overflow (when the input is greater than largest uint88).
  1420. Counterpart to Solidity's `uint88` operator.
  1421. Requirements:
  1422. - input must fit into 88 bits
  1423. [.contract-item]
  1424. [[SafeCast-toUint80-uint256-]]
  1425. ==== `[.contract-item-name]#++toUint80++#++(uint256 value) โ†’ uint80++` [.item-kind]#internal#
  1426. Returns the downcasted uint80 from uint256, reverting on
  1427. overflow (when the input is greater than largest uint80).
  1428. Counterpart to Solidity's `uint80` operator.
  1429. Requirements:
  1430. - input must fit into 80 bits
  1431. [.contract-item]
  1432. [[SafeCast-toUint72-uint256-]]
  1433. ==== `[.contract-item-name]#++toUint72++#++(uint256 value) โ†’ uint72++` [.item-kind]#internal#
  1434. Returns the downcasted uint72 from uint256, reverting on
  1435. overflow (when the input is greater than largest uint72).
  1436. Counterpart to Solidity's `uint72` operator.
  1437. Requirements:
  1438. - input must fit into 72 bits
  1439. [.contract-item]
  1440. [[SafeCast-toUint64-uint256-]]
  1441. ==== `[.contract-item-name]#++toUint64++#++(uint256 value) โ†’ uint64++` [.item-kind]#internal#
  1442. Returns the downcasted uint64 from uint256, reverting on
  1443. overflow (when the input is greater than largest uint64).
  1444. Counterpart to Solidity's `uint64` operator.
  1445. Requirements:
  1446. - input must fit into 64 bits
  1447. [.contract-item]
  1448. [[SafeCast-toUint56-uint256-]]
  1449. ==== `[.contract-item-name]#++toUint56++#++(uint256 value) โ†’ uint56++` [.item-kind]#internal#
  1450. Returns the downcasted uint56 from uint256, reverting on
  1451. overflow (when the input is greater than largest uint56).
  1452. Counterpart to Solidity's `uint56` operator.
  1453. Requirements:
  1454. - input must fit into 56 bits
  1455. [.contract-item]
  1456. [[SafeCast-toUint48-uint256-]]
  1457. ==== `[.contract-item-name]#++toUint48++#++(uint256 value) โ†’ uint48++` [.item-kind]#internal#
  1458. Returns the downcasted uint48 from uint256, reverting on
  1459. overflow (when the input is greater than largest uint48).
  1460. Counterpart to Solidity's `uint48` operator.
  1461. Requirements:
  1462. - input must fit into 48 bits
  1463. [.contract-item]
  1464. [[SafeCast-toUint40-uint256-]]
  1465. ==== `[.contract-item-name]#++toUint40++#++(uint256 value) โ†’ uint40++` [.item-kind]#internal#
  1466. Returns the downcasted uint40 from uint256, reverting on
  1467. overflow (when the input is greater than largest uint40).
  1468. Counterpart to Solidity's `uint40` operator.
  1469. Requirements:
  1470. - input must fit into 40 bits
  1471. [.contract-item]
  1472. [[SafeCast-toUint32-uint256-]]
  1473. ==== `[.contract-item-name]#++toUint32++#++(uint256 value) โ†’ uint32++` [.item-kind]#internal#
  1474. Returns the downcasted uint32 from uint256, reverting on
  1475. overflow (when the input is greater than largest uint32).
  1476. Counterpart to Solidity's `uint32` operator.
  1477. Requirements:
  1478. - input must fit into 32 bits
  1479. [.contract-item]
  1480. [[SafeCast-toUint24-uint256-]]
  1481. ==== `[.contract-item-name]#++toUint24++#++(uint256 value) โ†’ uint24++` [.item-kind]#internal#
  1482. Returns the downcasted uint24 from uint256, reverting on
  1483. overflow (when the input is greater than largest uint24).
  1484. Counterpart to Solidity's `uint24` operator.
  1485. Requirements:
  1486. - input must fit into 24 bits
  1487. [.contract-item]
  1488. [[SafeCast-toUint16-uint256-]]
  1489. ==== `[.contract-item-name]#++toUint16++#++(uint256 value) โ†’ uint16++` [.item-kind]#internal#
  1490. Returns the downcasted uint16 from uint256, reverting on
  1491. overflow (when the input is greater than largest uint16).
  1492. Counterpart to Solidity's `uint16` operator.
  1493. Requirements:
  1494. - input must fit into 16 bits
  1495. [.contract-item]
  1496. [[SafeCast-toUint8-uint256-]]
  1497. ==== `[.contract-item-name]#++toUint8++#++(uint256 value) โ†’ uint8++` [.item-kind]#internal#
  1498. Returns the downcasted uint8 from uint256, reverting on
  1499. overflow (when the input is greater than largest uint8).
  1500. Counterpart to Solidity's `uint8` operator.
  1501. Requirements:
  1502. - input must fit into 8 bits
  1503. [.contract-item]
  1504. [[SafeCast-toUint256-int256-]]
  1505. ==== `[.contract-item-name]#++toUint256++#++(int256 value) โ†’ uint256++` [.item-kind]#internal#
  1506. Converts a signed int256 into an unsigned uint256.
  1507. Requirements:
  1508. - input must be greater than or equal to 0.
  1509. [.contract-item]
  1510. [[SafeCast-toInt248-int256-]]
  1511. ==== `[.contract-item-name]#++toInt248++#++(int256 value) โ†’ int248 downcasted++` [.item-kind]#internal#
  1512. Returns the downcasted int248 from int256, reverting on
  1513. overflow (when the input is less than smallest int248 or
  1514. greater than largest int248).
  1515. Counterpart to Solidity's `int248` operator.
  1516. Requirements:
  1517. - input must fit into 248 bits
  1518. [.contract-item]
  1519. [[SafeCast-toInt240-int256-]]
  1520. ==== `[.contract-item-name]#++toInt240++#++(int256 value) โ†’ int240 downcasted++` [.item-kind]#internal#
  1521. Returns the downcasted int240 from int256, reverting on
  1522. overflow (when the input is less than smallest int240 or
  1523. greater than largest int240).
  1524. Counterpart to Solidity's `int240` operator.
  1525. Requirements:
  1526. - input must fit into 240 bits
  1527. [.contract-item]
  1528. [[SafeCast-toInt232-int256-]]
  1529. ==== `[.contract-item-name]#++toInt232++#++(int256 value) โ†’ int232 downcasted++` [.item-kind]#internal#
  1530. Returns the downcasted int232 from int256, reverting on
  1531. overflow (when the input is less than smallest int232 or
  1532. greater than largest int232).
  1533. Counterpart to Solidity's `int232` operator.
  1534. Requirements:
  1535. - input must fit into 232 bits
  1536. [.contract-item]
  1537. [[SafeCast-toInt224-int256-]]
  1538. ==== `[.contract-item-name]#++toInt224++#++(int256 value) โ†’ int224 downcasted++` [.item-kind]#internal#
  1539. Returns the downcasted int224 from int256, reverting on
  1540. overflow (when the input is less than smallest int224 or
  1541. greater than largest int224).
  1542. Counterpart to Solidity's `int224` operator.
  1543. Requirements:
  1544. - input must fit into 224 bits
  1545. [.contract-item]
  1546. [[SafeCast-toInt216-int256-]]
  1547. ==== `[.contract-item-name]#++toInt216++#++(int256 value) โ†’ int216 downcasted++` [.item-kind]#internal#
  1548. Returns the downcasted int216 from int256, reverting on
  1549. overflow (when the input is less than smallest int216 or
  1550. greater than largest int216).
  1551. Counterpart to Solidity's `int216` operator.
  1552. Requirements:
  1553. - input must fit into 216 bits
  1554. [.contract-item]
  1555. [[SafeCast-toInt208-int256-]]
  1556. ==== `[.contract-item-name]#++toInt208++#++(int256 value) โ†’ int208 downcasted++` [.item-kind]#internal#
  1557. Returns the downcasted int208 from int256, reverting on
  1558. overflow (when the input is less than smallest int208 or
  1559. greater than largest int208).
  1560. Counterpart to Solidity's `int208` operator.
  1561. Requirements:
  1562. - input must fit into 208 bits
  1563. [.contract-item]
  1564. [[SafeCast-toInt200-int256-]]
  1565. ==== `[.contract-item-name]#++toInt200++#++(int256 value) โ†’ int200 downcasted++` [.item-kind]#internal#
  1566. Returns the downcasted int200 from int256, reverting on
  1567. overflow (when the input is less than smallest int200 or
  1568. greater than largest int200).
  1569. Counterpart to Solidity's `int200` operator.
  1570. Requirements:
  1571. - input must fit into 200 bits
  1572. [.contract-item]
  1573. [[SafeCast-toInt192-int256-]]
  1574. ==== `[.contract-item-name]#++toInt192++#++(int256 value) โ†’ int192 downcasted++` [.item-kind]#internal#
  1575. Returns the downcasted int192 from int256, reverting on
  1576. overflow (when the input is less than smallest int192 or
  1577. greater than largest int192).
  1578. Counterpart to Solidity's `int192` operator.
  1579. Requirements:
  1580. - input must fit into 192 bits
  1581. [.contract-item]
  1582. [[SafeCast-toInt184-int256-]]
  1583. ==== `[.contract-item-name]#++toInt184++#++(int256 value) โ†’ int184 downcasted++` [.item-kind]#internal#
  1584. Returns the downcasted int184 from int256, reverting on
  1585. overflow (when the input is less than smallest int184 or
  1586. greater than largest int184).
  1587. Counterpart to Solidity's `int184` operator.
  1588. Requirements:
  1589. - input must fit into 184 bits
  1590. [.contract-item]
  1591. [[SafeCast-toInt176-int256-]]
  1592. ==== `[.contract-item-name]#++toInt176++#++(int256 value) โ†’ int176 downcasted++` [.item-kind]#internal#
  1593. Returns the downcasted int176 from int256, reverting on
  1594. overflow (when the input is less than smallest int176 or
  1595. greater than largest int176).
  1596. Counterpart to Solidity's `int176` operator.
  1597. Requirements:
  1598. - input must fit into 176 bits
  1599. [.contract-item]
  1600. [[SafeCast-toInt168-int256-]]
  1601. ==== `[.contract-item-name]#++toInt168++#++(int256 value) โ†’ int168 downcasted++` [.item-kind]#internal#
  1602. Returns the downcasted int168 from int256, reverting on
  1603. overflow (when the input is less than smallest int168 or
  1604. greater than largest int168).
  1605. Counterpart to Solidity's `int168` operator.
  1606. Requirements:
  1607. - input must fit into 168 bits
  1608. [.contract-item]
  1609. [[SafeCast-toInt160-int256-]]
  1610. ==== `[.contract-item-name]#++toInt160++#++(int256 value) โ†’ int160 downcasted++` [.item-kind]#internal#
  1611. Returns the downcasted int160 from int256, reverting on
  1612. overflow (when the input is less than smallest int160 or
  1613. greater than largest int160).
  1614. Counterpart to Solidity's `int160` operator.
  1615. Requirements:
  1616. - input must fit into 160 bits
  1617. [.contract-item]
  1618. [[SafeCast-toInt152-int256-]]
  1619. ==== `[.contract-item-name]#++toInt152++#++(int256 value) โ†’ int152 downcasted++` [.item-kind]#internal#
  1620. Returns the downcasted int152 from int256, reverting on
  1621. overflow (when the input is less than smallest int152 or
  1622. greater than largest int152).
  1623. Counterpart to Solidity's `int152` operator.
  1624. Requirements:
  1625. - input must fit into 152 bits
  1626. [.contract-item]
  1627. [[SafeCast-toInt144-int256-]]
  1628. ==== `[.contract-item-name]#++toInt144++#++(int256 value) โ†’ int144 downcasted++` [.item-kind]#internal#
  1629. Returns the downcasted int144 from int256, reverting on
  1630. overflow (when the input is less than smallest int144 or
  1631. greater than largest int144).
  1632. Counterpart to Solidity's `int144` operator.
  1633. Requirements:
  1634. - input must fit into 144 bits
  1635. [.contract-item]
  1636. [[SafeCast-toInt136-int256-]]
  1637. ==== `[.contract-item-name]#++toInt136++#++(int256 value) โ†’ int136 downcasted++` [.item-kind]#internal#
  1638. Returns the downcasted int136 from int256, reverting on
  1639. overflow (when the input is less than smallest int136 or
  1640. greater than largest int136).
  1641. Counterpart to Solidity's `int136` operator.
  1642. Requirements:
  1643. - input must fit into 136 bits
  1644. [.contract-item]
  1645. [[SafeCast-toInt128-int256-]]
  1646. ==== `[.contract-item-name]#++toInt128++#++(int256 value) โ†’ int128 downcasted++` [.item-kind]#internal#
  1647. Returns the downcasted int128 from int256, reverting on
  1648. overflow (when the input is less than smallest int128 or
  1649. greater than largest int128).
  1650. Counterpart to Solidity's `int128` operator.
  1651. Requirements:
  1652. - input must fit into 128 bits
  1653. [.contract-item]
  1654. [[SafeCast-toInt120-int256-]]
  1655. ==== `[.contract-item-name]#++toInt120++#++(int256 value) โ†’ int120 downcasted++` [.item-kind]#internal#
  1656. Returns the downcasted int120 from int256, reverting on
  1657. overflow (when the input is less than smallest int120 or
  1658. greater than largest int120).
  1659. Counterpart to Solidity's `int120` operator.
  1660. Requirements:
  1661. - input must fit into 120 bits
  1662. [.contract-item]
  1663. [[SafeCast-toInt112-int256-]]
  1664. ==== `[.contract-item-name]#++toInt112++#++(int256 value) โ†’ int112 downcasted++` [.item-kind]#internal#
  1665. Returns the downcasted int112 from int256, reverting on
  1666. overflow (when the input is less than smallest int112 or
  1667. greater than largest int112).
  1668. Counterpart to Solidity's `int112` operator.
  1669. Requirements:
  1670. - input must fit into 112 bits
  1671. [.contract-item]
  1672. [[SafeCast-toInt104-int256-]]
  1673. ==== `[.contract-item-name]#++toInt104++#++(int256 value) โ†’ int104 downcasted++` [.item-kind]#internal#
  1674. Returns the downcasted int104 from int256, reverting on
  1675. overflow (when the input is less than smallest int104 or
  1676. greater than largest int104).
  1677. Counterpart to Solidity's `int104` operator.
  1678. Requirements:
  1679. - input must fit into 104 bits
  1680. [.contract-item]
  1681. [[SafeCast-toInt96-int256-]]
  1682. ==== `[.contract-item-name]#++toInt96++#++(int256 value) โ†’ int96 downcasted++` [.item-kind]#internal#
  1683. Returns the downcasted int96 from int256, reverting on
  1684. overflow (when the input is less than smallest int96 or
  1685. greater than largest int96).
  1686. Counterpart to Solidity's `int96` operator.
  1687. Requirements:
  1688. - input must fit into 96 bits
  1689. [.contract-item]
  1690. [[SafeCast-toInt88-int256-]]
  1691. ==== `[.contract-item-name]#++toInt88++#++(int256 value) โ†’ int88 downcasted++` [.item-kind]#internal#
  1692. Returns the downcasted int88 from int256, reverting on
  1693. overflow (when the input is less than smallest int88 or
  1694. greater than largest int88).
  1695. Counterpart to Solidity's `int88` operator.
  1696. Requirements:
  1697. - input must fit into 88 bits
  1698. [.contract-item]
  1699. [[SafeCast-toInt80-int256-]]
  1700. ==== `[.contract-item-name]#++toInt80++#++(int256 value) โ†’ int80 downcasted++` [.item-kind]#internal#
  1701. Returns the downcasted int80 from int256, reverting on
  1702. overflow (when the input is less than smallest int80 or
  1703. greater than largest int80).
  1704. Counterpart to Solidity's `int80` operator.
  1705. Requirements:
  1706. - input must fit into 80 bits
  1707. [.contract-item]
  1708. [[SafeCast-toInt72-int256-]]
  1709. ==== `[.contract-item-name]#++toInt72++#++(int256 value) โ†’ int72 downcasted++` [.item-kind]#internal#
  1710. Returns the downcasted int72 from int256, reverting on
  1711. overflow (when the input is less than smallest int72 or
  1712. greater than largest int72).
  1713. Counterpart to Solidity's `int72` operator.
  1714. Requirements:
  1715. - input must fit into 72 bits
  1716. [.contract-item]
  1717. [[SafeCast-toInt64-int256-]]
  1718. ==== `[.contract-item-name]#++toInt64++#++(int256 value) โ†’ int64 downcasted++` [.item-kind]#internal#
  1719. Returns the downcasted int64 from int256, reverting on
  1720. overflow (when the input is less than smallest int64 or
  1721. greater than largest int64).
  1722. Counterpart to Solidity's `int64` operator.
  1723. Requirements:
  1724. - input must fit into 64 bits
  1725. [.contract-item]
  1726. [[SafeCast-toInt56-int256-]]
  1727. ==== `[.contract-item-name]#++toInt56++#++(int256 value) โ†’ int56 downcasted++` [.item-kind]#internal#
  1728. Returns the downcasted int56 from int256, reverting on
  1729. overflow (when the input is less than smallest int56 or
  1730. greater than largest int56).
  1731. Counterpart to Solidity's `int56` operator.
  1732. Requirements:
  1733. - input must fit into 56 bits
  1734. [.contract-item]
  1735. [[SafeCast-toInt48-int256-]]
  1736. ==== `[.contract-item-name]#++toInt48++#++(int256 value) โ†’ int48 downcasted++` [.item-kind]#internal#
  1737. Returns the downcasted int48 from int256, reverting on
  1738. overflow (when the input is less than smallest int48 or
  1739. greater than largest int48).
  1740. Counterpart to Solidity's `int48` operator.
  1741. Requirements:
  1742. - input must fit into 48 bits
  1743. [.contract-item]
  1744. [[SafeCast-toInt40-int256-]]
  1745. ==== `[.contract-item-name]#++toInt40++#++(int256 value) โ†’ int40 downcasted++` [.item-kind]#internal#
  1746. Returns the downcasted int40 from int256, reverting on
  1747. overflow (when the input is less than smallest int40 or
  1748. greater than largest int40).
  1749. Counterpart to Solidity's `int40` operator.
  1750. Requirements:
  1751. - input must fit into 40 bits
  1752. [.contract-item]
  1753. [[SafeCast-toInt32-int256-]]
  1754. ==== `[.contract-item-name]#++toInt32++#++(int256 value) โ†’ int32 downcasted++` [.item-kind]#internal#
  1755. Returns the downcasted int32 from int256, reverting on
  1756. overflow (when the input is less than smallest int32 or
  1757. greater than largest int32).
  1758. Counterpart to Solidity's `int32` operator.
  1759. Requirements:
  1760. - input must fit into 32 bits
  1761. [.contract-item]
  1762. [[SafeCast-toInt24-int256-]]
  1763. ==== `[.contract-item-name]#++toInt24++#++(int256 value) โ†’ int24 downcasted++` [.item-kind]#internal#
  1764. Returns the downcasted int24 from int256, reverting on
  1765. overflow (when the input is less than smallest int24 or
  1766. greater than largest int24).
  1767. Counterpart to Solidity's `int24` operator.
  1768. Requirements:
  1769. - input must fit into 24 bits
  1770. [.contract-item]
  1771. [[SafeCast-toInt16-int256-]]
  1772. ==== `[.contract-item-name]#++toInt16++#++(int256 value) โ†’ int16 downcasted++` [.item-kind]#internal#
  1773. Returns the downcasted int16 from int256, reverting on
  1774. overflow (when the input is less than smallest int16 or
  1775. greater than largest int16).
  1776. Counterpart to Solidity's `int16` operator.
  1777. Requirements:
  1778. - input must fit into 16 bits
  1779. [.contract-item]
  1780. [[SafeCast-toInt8-int256-]]
  1781. ==== `[.contract-item-name]#++toInt8++#++(int256 value) โ†’ int8 downcasted++` [.item-kind]#internal#
  1782. Returns the downcasted int8 from int256, reverting on
  1783. overflow (when the input is less than smallest int8 or
  1784. greater than largest int8).
  1785. Counterpart to Solidity's `int8` operator.
  1786. Requirements:
  1787. - input must fit into 8 bits
  1788. [.contract-item]
  1789. [[SafeCast-toInt256-uint256-]]
  1790. ==== `[.contract-item-name]#++toInt256++#++(uint256 value) โ†’ int256++` [.item-kind]#internal#
  1791. Converts an unsigned uint256 into a signed int256.
  1792. Requirements:
  1793. - input must be less than or equal to maxInt256.
  1794. [.contract-item]
  1795. [[SafeCast-toUint-bool-]]
  1796. ==== `[.contract-item-name]#++toUint++#++(bool b) โ†’ uint256 u++` [.item-kind]#internal#
  1797. Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.
  1798. [.contract-item]
  1799. [[SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-]]
  1800. ==== `[.contract-item-name]#++SafeCastOverflowedUintDowncast++#++(uint8 bits, uint256 value)++` [.item-kind]#error#
  1801. Value doesn't fit in an uint of `bits` size.
  1802. [.contract-item]
  1803. [[SafeCast-SafeCastOverflowedIntToUint-int256-]]
  1804. ==== `[.contract-item-name]#++SafeCastOverflowedIntToUint++#++(int256 value)++` [.item-kind]#error#
  1805. An int value doesn't fit in an uint of `bits` size.
  1806. [.contract-item]
  1807. [[SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-]]
  1808. ==== `[.contract-item-name]#++SafeCastOverflowedIntDowncast++#++(uint8 bits, int256 value)++` [.item-kind]#error#
  1809. Value doesn't fit in an int of `bits` size.
  1810. [.contract-item]
  1811. [[SafeCast-SafeCastOverflowedUintToInt-uint256-]]
  1812. ==== `[.contract-item-name]#++SafeCastOverflowedUintToInt++#++(uint256 value)++` [.item-kind]#error#
  1813. An uint value doesn't fit in an int of `bits` size.
  1814. == Cryptography
  1815. :RecoverError: pass:normal[xref:#ECDSA-RecoverError[`++RecoverError++`]]
  1816. :ECDSAInvalidSignature: pass:normal[xref:#ECDSA-ECDSAInvalidSignature--[`++ECDSAInvalidSignature++`]]
  1817. :ECDSAInvalidSignatureLength: pass:normal[xref:#ECDSA-ECDSAInvalidSignatureLength-uint256-[`++ECDSAInvalidSignatureLength++`]]
  1818. :ECDSAInvalidSignatureS: pass:normal[xref:#ECDSA-ECDSAInvalidSignatureS-bytes32-[`++ECDSAInvalidSignatureS++`]]
  1819. :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-bytes-[`++tryRecover++`]]
  1820. :recover: pass:normal[xref:#ECDSA-recover-bytes32-bytes-[`++recover++`]]
  1821. :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-bytes32-bytes32-[`++tryRecover++`]]
  1822. :recover: pass:normal[xref:#ECDSA-recover-bytes32-bytes32-bytes32-[`++recover++`]]
  1823. :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`++tryRecover++`]]
  1824. :recover: pass:normal[xref:#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`++recover++`]]
  1825. [.contract]
  1826. [[ECDSA]]
  1827. === `++ECDSA++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/cryptography/ECDSA.sol[{github-icon},role=heading-link]
  1828. [.hljs-theme-light.nopadding]
  1829. ```solidity
  1830. import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
  1831. ```
  1832. Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
  1833. These functions can be used to verify that a message was signed by the holder
  1834. of the private keys of a given address.
  1835. [.contract-index]
  1836. .Functions
  1837. --
  1838. * {xref-ECDSA-tryRecover-bytes32-bytes-}[`++tryRecover(hash, signature)++`]
  1839. * {xref-ECDSA-recover-bytes32-bytes-}[`++recover(hash, signature)++`]
  1840. * {xref-ECDSA-tryRecover-bytes32-bytes32-bytes32-}[`++tryRecover(hash, r, vs)++`]
  1841. * {xref-ECDSA-recover-bytes32-bytes32-bytes32-}[`++recover(hash, r, vs)++`]
  1842. * {xref-ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-}[`++tryRecover(hash, v, r, s)++`]
  1843. * {xref-ECDSA-recover-bytes32-uint8-bytes32-bytes32-}[`++recover(hash, v, r, s)++`]
  1844. --
  1845. [.contract-index]
  1846. .Errors
  1847. --
  1848. * {xref-ECDSA-ECDSAInvalidSignature--}[`++ECDSAInvalidSignature()++`]
  1849. * {xref-ECDSA-ECDSAInvalidSignatureLength-uint256-}[`++ECDSAInvalidSignatureLength(length)++`]
  1850. * {xref-ECDSA-ECDSAInvalidSignatureS-bytes32-}[`++ECDSAInvalidSignatureS(s)++`]
  1851. --
  1852. [.contract-item]
  1853. [[ECDSA-tryRecover-bytes32-bytes-]]
  1854. ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, bytes signature) โ†’ address recovered, enum ECDSA.RecoverError err, bytes32 errArg++` [.item-kind]#internal#
  1855. Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
  1856. return address(0) without also returning an error description. Errors are documented using an enum (error type)
  1857. and a bytes32 providing additional information about the error.
  1858. If no error is returned, then the address can be used for verification purposes.
  1859. The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
  1860. this function rejects them by requiring the `s` value to be in the lower
  1861. half order, and the `v` value to be either 27 or 28.
  1862. IMPORTANT: `hash` _must_ be the result of a hash operation for the
  1863. verification to be secure: it is possible to craft signatures that
  1864. recover to arbitrary addresses for non-hashed data. A safe way to ensure
  1865. this is by receiving a hash of the original message (which may otherwise
  1866. be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
  1867. Documentation for signature generation:
  1868. - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
  1869. - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
  1870. [.contract-item]
  1871. [[ECDSA-recover-bytes32-bytes-]]
  1872. ==== `[.contract-item-name]#++recover++#++(bytes32 hash, bytes signature) โ†’ address++` [.item-kind]#internal#
  1873. Returns the address that signed a hashed message (`hash`) with
  1874. `signature`. This address can then be used for verification purposes.
  1875. The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
  1876. this function rejects them by requiring the `s` value to be in the lower
  1877. half order, and the `v` value to be either 27 or 28.
  1878. IMPORTANT: `hash` _must_ be the result of a hash operation for the
  1879. verification to be secure: it is possible to craft signatures that
  1880. recover to arbitrary addresses for non-hashed data. A safe way to ensure
  1881. this is by receiving a hash of the original message (which may otherwise
  1882. be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
  1883. [.contract-item]
  1884. [[ECDSA-tryRecover-bytes32-bytes32-bytes32-]]
  1885. ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, bytes32 r, bytes32 vs) โ†’ address recovered, enum ECDSA.RecoverError err, bytes32 errArg++` [.item-kind]#internal#
  1886. Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
  1887. See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]
  1888. [.contract-item]
  1889. [[ECDSA-recover-bytes32-bytes32-bytes32-]]
  1890. ==== `[.contract-item-name]#++recover++#++(bytes32 hash, bytes32 r, bytes32 vs) โ†’ address++` [.item-kind]#internal#
  1891. Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
  1892. [.contract-item]
  1893. [[ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-]]
  1894. ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, uint8 v, bytes32 r, bytes32 s) โ†’ address recovered, enum ECDSA.RecoverError err, bytes32 errArg++` [.item-kind]#internal#
  1895. Overload of {ECDSA-tryRecover} that receives the `v`,
  1896. `r` and `s` signature fields separately.
  1897. [.contract-item]
  1898. [[ECDSA-recover-bytes32-uint8-bytes32-bytes32-]]
  1899. ==== `[.contract-item-name]#++recover++#++(bytes32 hash, uint8 v, bytes32 r, bytes32 s) โ†’ address++` [.item-kind]#internal#
  1900. Overload of {ECDSA-recover} that receives the `v`,
  1901. `r` and `s` signature fields separately.
  1902. [.contract-item]
  1903. [[ECDSA-ECDSAInvalidSignature--]]
  1904. ==== `[.contract-item-name]#++ECDSAInvalidSignature++#++()++` [.item-kind]#error#
  1905. The signature derives the `address(0)`.
  1906. [.contract-item]
  1907. [[ECDSA-ECDSAInvalidSignatureLength-uint256-]]
  1908. ==== `[.contract-item-name]#++ECDSAInvalidSignatureLength++#++(uint256 length)++` [.item-kind]#error#
  1909. The signature has an invalid length.
  1910. [.contract-item]
  1911. [[ECDSA-ECDSAInvalidSignatureS-bytes32-]]
  1912. ==== `[.contract-item-name]#++ECDSAInvalidSignatureS++#++(bytes32 s)++` [.item-kind]#error#
  1913. The signature has an S value that is in the upper half order.
  1914. :JPoint: pass:normal[xref:#P256-JPoint[`++JPoint++`]]
  1915. :GX: pass:normal[xref:#P256-GX-uint256[`++GX++`]]
  1916. :GY: pass:normal[xref:#P256-GY-uint256[`++GY++`]]
  1917. :P: pass:normal[xref:#P256-P-uint256[`++P++`]]
  1918. :N: pass:normal[xref:#P256-N-uint256[`++N++`]]
  1919. :A: pass:normal[xref:#P256-A-uint256[`++A++`]]
  1920. :B: pass:normal[xref:#P256-B-uint256[`++B++`]]
  1921. :verify: pass:normal[xref:#P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-[`++verify++`]]
  1922. :verifyNative: pass:normal[xref:#P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-[`++verifyNative++`]]
  1923. :verifySolidity: pass:normal[xref:#P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-[`++verifySolidity++`]]
  1924. :recovery: pass:normal[xref:#P256-recovery-bytes32-uint8-bytes32-bytes32-[`++recovery++`]]
  1925. :isValidPublicKey: pass:normal[xref:#P256-isValidPublicKey-bytes32-bytes32-[`++isValidPublicKey++`]]
  1926. [.contract]
  1927. [[P256]]
  1928. === `++P256++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/cryptography/P256.sol[{github-icon},role=heading-link]
  1929. [.hljs-theme-light.nopadding]
  1930. ```solidity
  1931. import "@openzeppelin/contracts/utils/cryptography/P256.sol";
  1932. ```
  1933. Implementation of secp256r1 verification and recovery functions.
  1934. The secp256r1 curve (also known as P256) is a NIST standard curve with wide support in modern devices
  1935. and cryptographic standards. Some notable examples include Apple's Secure Enclave and Android's Keystore
  1936. as well as authentication protocols like FIDO2.
  1937. Based on the original https://github.com/itsobvioustech/aa-passkeys-wallet/blob/d3d423f28a4d8dfcb203c7fa0c47f42592a7378e/src/Secp256r1.sol[implementation of itsobvioustech] (GNU General Public License v3.0).
  1938. Heavily inspired in https://github.com/maxrobot/elliptic-solidity/blob/c4bb1b6e8ae89534d8db3a6b3a6b52219100520f/contracts/Secp256r1.sol[maxrobot] and
  1939. https://github.com/tdrerup/elliptic-curve-solidity/blob/59a9c25957d4d190eff53b6610731d81a077a15e/contracts/curves/EllipticCurve.sol[tdrerup] implementations.
  1940. _Available since v5.1._
  1941. [.contract-index]
  1942. .Functions
  1943. --
  1944. * {xref-P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-}[`++verify(h, r, s, qx, qy)++`]
  1945. * {xref-P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-}[`++verifyNative(h, r, s, qx, qy)++`]
  1946. * {xref-P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-}[`++verifySolidity(h, r, s, qx, qy)++`]
  1947. * {xref-P256-recovery-bytes32-uint8-bytes32-bytes32-}[`++recovery(h, v, r, s)++`]
  1948. * {xref-P256-isValidPublicKey-bytes32-bytes32-}[`++isValidPublicKey(x, y)++`]
  1949. --
  1950. [.contract-index]
  1951. .Internal Variables
  1952. --
  1953. * {xref-P256-GX-uint256}[`++uint256 constant GX++`]
  1954. * {xref-P256-GY-uint256}[`++uint256 constant GY++`]
  1955. * {xref-P256-P-uint256}[`++uint256 constant P++`]
  1956. * {xref-P256-N-uint256}[`++uint256 constant N++`]
  1957. * {xref-P256-A-uint256}[`++uint256 constant A++`]
  1958. * {xref-P256-B-uint256}[`++uint256 constant B++`]
  1959. --
  1960. [.contract-item]
  1961. [[P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-]]
  1962. ==== `[.contract-item-name]#++verify++#++(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) โ†’ bool++` [.item-kind]#internal#
  1963. Verifies a secp256r1 signature using the RIP-7212 precompile and falls back to the Solidity implementation
  1964. if the precompile is not available. This version should work on all chains, but requires the deployment of more
  1965. bytecode.
  1966. [.contract-item]
  1967. [[P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-]]
  1968. ==== `[.contract-item-name]#++verifyNative++#++(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) โ†’ bool++` [.item-kind]#internal#
  1969. Same as {verify}, but it will revert if the required precompile is not available.
  1970. Make sure any logic (code or precompile) deployed at that address is the expected one,
  1971. otherwise the returned value may be misinterpreted as a positive boolean.
  1972. [.contract-item]
  1973. [[P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-]]
  1974. ==== `[.contract-item-name]#++verifySolidity++#++(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) โ†’ bool++` [.item-kind]#internal#
  1975. Same as {verify}, but only the Solidity implementation is used.
  1976. [.contract-item]
  1977. [[P256-recovery-bytes32-uint8-bytes32-bytes32-]]
  1978. ==== `[.contract-item-name]#++recovery++#++(bytes32 h, uint8 v, bytes32 r, bytes32 s) โ†’ bytes32 x, bytes32 y++` [.item-kind]#internal#
  1979. Public key recovery
  1980. [.contract-item]
  1981. [[P256-isValidPublicKey-bytes32-bytes32-]]
  1982. ==== `[.contract-item-name]#++isValidPublicKey++#++(bytes32 x, bytes32 y) โ†’ bool result++` [.item-kind]#internal#
  1983. Checks if (x, y) are valid coordinates of a point on the curve.
  1984. In particular this function checks that x < P and y < P.
  1985. [.contract-item]
  1986. [[P256-GX-uint256]]
  1987. ==== `uint256 [.contract-item-name]#++GX++#` [.item-kind]#internal constant#
  1988. Generator (x component)
  1989. [.contract-item]
  1990. [[P256-GY-uint256]]
  1991. ==== `uint256 [.contract-item-name]#++GY++#` [.item-kind]#internal constant#
  1992. Generator (y component)
  1993. [.contract-item]
  1994. [[P256-P-uint256]]
  1995. ==== `uint256 [.contract-item-name]#++P++#` [.item-kind]#internal constant#
  1996. P (size of the field)
  1997. [.contract-item]
  1998. [[P256-N-uint256]]
  1999. ==== `uint256 [.contract-item-name]#++N++#` [.item-kind]#internal constant#
  2000. N (order of G)
  2001. [.contract-item]
  2002. [[P256-A-uint256]]
  2003. ==== `uint256 [.contract-item-name]#++A++#` [.item-kind]#internal constant#
  2004. A parameter of the weierstrass equation
  2005. [.contract-item]
  2006. [[P256-B-uint256]]
  2007. ==== `uint256 [.contract-item-name]#++B++#` [.item-kind]#internal constant#
  2008. B parameter of the weierstrass equation
  2009. :pkcs1Sha256: pass:normal[xref:#RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-[`++pkcs1Sha256++`]]
  2010. :pkcs1Sha256: pass:normal[xref:#RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-[`++pkcs1Sha256++`]]
  2011. [.contract]
  2012. [[RSA]]
  2013. === `++RSA++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/cryptography/RSA.sol[{github-icon},role=heading-link]
  2014. [.hljs-theme-light.nopadding]
  2015. ```solidity
  2016. import "@openzeppelin/contracts/utils/cryptography/RSA.sol";
  2017. ```
  2018. RSA PKCS#1 v1.5 signature verification implementation according to https://datatracker.ietf.org/doc/html/rfc8017[RFC8017].
  2019. This library supports PKCS#1 v1.5 padding to avoid malleability via chosen plaintext attacks in practical implementations.
  2020. The padding follows the EMSA-PKCS1-v1_5-ENCODE encoding definition as per section 9.2 of the RFC. This padding makes
  2021. RSA semantically secure for signing messages.
  2022. Inspired by https://github.com/adria0/SolRsaVerify/blob/79c6182cabb9102ea69d4a2e996816091d5f1cd1[Adriร  Massanet's work] (GNU General Public License v3.0).
  2023. _Available since v5.1._
  2024. [.contract-index]
  2025. .Functions
  2026. --
  2027. * {xref-RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-}[`++pkcs1Sha256(data, s, e, n)++`]
  2028. * {xref-RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-}[`++pkcs1Sha256(digest, s, e, n)++`]
  2029. --
  2030. [.contract-item]
  2031. [[RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-]]
  2032. ==== `[.contract-item-name]#++pkcs1Sha256++#++(bytes data, bytes s, bytes e, bytes n) โ†’ bool++` [.item-kind]#internal#
  2033. Same as {pkcs1Sha256} but using SHA256 to calculate the digest of `data`.
  2034. [.contract-item]
  2035. [[RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-]]
  2036. ==== `[.contract-item-name]#++pkcs1Sha256++#++(bytes32 digest, bytes s, bytes e, bytes n) โ†’ bool++` [.item-kind]#internal#
  2037. Verifies a PKCSv1.5 signature given a digest according to the verification
  2038. method described in https://datatracker.ietf.org/doc/html/rfc8017#section-8.2.2[section 8.2.2 of RFC8017] with
  2039. support for explicit or implicit NULL parameters in the DigestInfo (no other optional parameters are supported).
  2040. IMPORTANT: For security reason, this function requires the signature and modulus to have a length of at least
  2041. 2048 bits. If you use a smaller key, consider replacing it with a larger, more secure, one.
  2042. WARNING: This verification algorithm doesn't prevent replayability. If called multiple times with the same
  2043. digest, public key and (valid signature), it will return true every time. Consider including an onchain nonce
  2044. or unique identifier in the message to prevent replay attacks.
  2045. WARNING: This verification algorithm supports any exponent. NIST recommends using `65537` (or higher).
  2046. That is the default value many libraries use, such as OpenSSL. Developers may choose to reject public keys
  2047. using a low exponent out of security concerns.
  2048. :constructor: pass:normal[xref:#EIP712-constructor-string-string-[`++constructor++`]]
  2049. :_domainSeparatorV4: pass:normal[xref:#EIP712-_domainSeparatorV4--[`++_domainSeparatorV4++`]]
  2050. :_hashTypedDataV4: pass:normal[xref:#EIP712-_hashTypedDataV4-bytes32-[`++_hashTypedDataV4++`]]
  2051. :eip712Domain: pass:normal[xref:#EIP712-eip712Domain--[`++eip712Domain++`]]
  2052. :_EIP712Name: pass:normal[xref:#EIP712-_EIP712Name--[`++_EIP712Name++`]]
  2053. :_EIP712Version: pass:normal[xref:#EIP712-_EIP712Version--[`++_EIP712Version++`]]
  2054. [.contract]
  2055. [[EIP712]]
  2056. === `++EIP712++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/cryptography/EIP712.sol[{github-icon},role=heading-link]
  2057. [.hljs-theme-light.nopadding]
  2058. ```solidity
  2059. import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
  2060. ```
  2061. https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.
  2062. The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
  2063. encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
  2064. does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
  2065. produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
  2066. This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
  2067. scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
  2068. ({_hashTypedDataV4}).
  2069. The implementation of the domain separator was designed to be as efficient as possible while still properly updating
  2070. the chain id to protect against replay attacks on an eventual fork of the chain.
  2071. NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
  2072. https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
  2073. NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
  2074. separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
  2075. separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
  2076. [.contract-index]
  2077. .Functions
  2078. --
  2079. * {xref-EIP712-constructor-string-string-}[`++constructor(name, version)++`]
  2080. * {xref-EIP712-_domainSeparatorV4--}[`++_domainSeparatorV4()++`]
  2081. * {xref-EIP712-_hashTypedDataV4-bytes32-}[`++_hashTypedDataV4(structHash)++`]
  2082. * {xref-EIP712-eip712Domain--}[`++eip712Domain()++`]
  2083. * {xref-EIP712-_EIP712Name--}[`++_EIP712Name()++`]
  2084. * {xref-EIP712-_EIP712Version--}[`++_EIP712Version()++`]
  2085. [.contract-subindex-inherited]
  2086. .IERC5267
  2087. --
  2088. [.contract-index]
  2089. .Events
  2090. --
  2091. [.contract-subindex-inherited]
  2092. .IERC5267
  2093. * {xref-IERC5267-EIP712DomainChanged--}[`++EIP712DomainChanged()++`]
  2094. --
  2095. [.contract-item]
  2096. [[EIP712-constructor-string-string-]]
  2097. ==== `[.contract-item-name]#++constructor++#++(string name, string version)++` [.item-kind]#internal#
  2098. Initializes the domain separator and parameter caches.
  2099. The meaning of `name` and `version` is specified in
  2100. https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:
  2101. - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
  2102. - `version`: the current major version of the signing domain.
  2103. NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
  2104. contract upgrade].
  2105. [.contract-item]
  2106. [[EIP712-_domainSeparatorV4--]]
  2107. ==== `[.contract-item-name]#++_domainSeparatorV4++#++() โ†’ bytes32++` [.item-kind]#internal#
  2108. Returns the domain separator for the current chain.
  2109. [.contract-item]
  2110. [[EIP712-_hashTypedDataV4-bytes32-]]
  2111. ==== `[.contract-item-name]#++_hashTypedDataV4++#++(bytes32 structHash) โ†’ bytes32++` [.item-kind]#internal#
  2112. Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
  2113. function returns the hash of the fully encoded EIP712 message for this domain.
  2114. This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
  2115. ```solidity
  2116. bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
  2117. keccak256("Mail(address to,string contents)"),
  2118. mailTo,
  2119. keccak256(bytes(mailContents))
  2120. )));
  2121. address signer = ECDSA.recover(digest, signature);
  2122. ```
  2123. [.contract-item]
  2124. [[EIP712-eip712Domain--]]
  2125. ==== `[.contract-item-name]#++eip712Domain++#++() โ†’ bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions++` [.item-kind]#public#
  2126. See {IERC-5267}.
  2127. [.contract-item]
  2128. [[EIP712-_EIP712Name--]]
  2129. ==== `[.contract-item-name]#++_EIP712Name++#++() โ†’ string++` [.item-kind]#internal#
  2130. The name parameter for the EIP712 domain.
  2131. NOTE: By default this function reads _name which is an immutable value.
  2132. It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
  2133. [.contract-item]
  2134. [[EIP712-_EIP712Version--]]
  2135. ==== `[.contract-item-name]#++_EIP712Version++#++() โ†’ string++` [.item-kind]#internal#
  2136. The version parameter for the EIP712 domain.
  2137. NOTE: By default this function reads _version which is an immutable value.
  2138. It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
  2139. :toEthSignedMessageHash: pass:normal[xref:#MessageHashUtils-toEthSignedMessageHash-bytes32-[`++toEthSignedMessageHash++`]]
  2140. :toEthSignedMessageHash: pass:normal[xref:#MessageHashUtils-toEthSignedMessageHash-bytes-[`++toEthSignedMessageHash++`]]
  2141. :toDataWithIntendedValidatorHash: pass:normal[xref:#MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-[`++toDataWithIntendedValidatorHash++`]]
  2142. :toTypedDataHash: pass:normal[xref:#MessageHashUtils-toTypedDataHash-bytes32-bytes32-[`++toTypedDataHash++`]]
  2143. [.contract]
  2144. [[MessageHashUtils]]
  2145. === `++MessageHashUtils++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/cryptography/MessageHashUtils.sol[{github-icon},role=heading-link]
  2146. [.hljs-theme-light.nopadding]
  2147. ```solidity
  2148. import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
  2149. ```
  2150. Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
  2151. The library provides methods for generating a hash of a message that conforms to the
  2152. https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
  2153. specifications.
  2154. [.contract-index]
  2155. .Functions
  2156. --
  2157. * {xref-MessageHashUtils-toEthSignedMessageHash-bytes32-}[`++toEthSignedMessageHash(messageHash)++`]
  2158. * {xref-MessageHashUtils-toEthSignedMessageHash-bytes-}[`++toEthSignedMessageHash(message)++`]
  2159. * {xref-MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-}[`++toDataWithIntendedValidatorHash(validator, data)++`]
  2160. * {xref-MessageHashUtils-toTypedDataHash-bytes32-bytes32-}[`++toTypedDataHash(domainSeparator, structHash)++`]
  2161. --
  2162. [.contract-item]
  2163. [[MessageHashUtils-toEthSignedMessageHash-bytes32-]]
  2164. ==== `[.contract-item-name]#++toEthSignedMessageHash++#++(bytes32 messageHash) โ†’ bytes32 digest++` [.item-kind]#internal#
  2165. Returns the keccak256 digest of an ERC-191 signed data with version
  2166. `0x45` (`personal_sign` messages).
  2167. The digest is calculated by prefixing a bytes32 `messageHash` with
  2168. `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
  2169. hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
  2170. NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
  2171. keccak256, although any bytes32 value can be safely used because the final digest will
  2172. be re-hashed.
  2173. See {ECDSA-recover}.
  2174. [.contract-item]
  2175. [[MessageHashUtils-toEthSignedMessageHash-bytes-]]
  2176. ==== `[.contract-item-name]#++toEthSignedMessageHash++#++(bytes message) โ†’ bytes32++` [.item-kind]#internal#
  2177. Returns the keccak256 digest of an ERC-191 signed data with version
  2178. `0x45` (`personal_sign` messages).
  2179. The digest is calculated by prefixing an arbitrary `message` with
  2180. `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
  2181. hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
  2182. See {ECDSA-recover}.
  2183. [.contract-item]
  2184. [[MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-]]
  2185. ==== `[.contract-item-name]#++toDataWithIntendedValidatorHash++#++(address validator, bytes data) โ†’ bytes32++` [.item-kind]#internal#
  2186. Returns the keccak256 digest of an ERC-191 signed data with version
  2187. `0x00` (data with intended validator).
  2188. The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
  2189. `validator` address. Then hashing the result.
  2190. See {ECDSA-recover}.
  2191. [.contract-item]
  2192. [[MessageHashUtils-toTypedDataHash-bytes32-bytes32-]]
  2193. ==== `[.contract-item-name]#++toTypedDataHash++#++(bytes32 domainSeparator, bytes32 structHash) โ†’ bytes32 digest++` [.item-kind]#internal#
  2194. Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).
  2195. The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
  2196. `\x19\x01` and hashing the result. It corresponds to the hash signed by the
  2197. https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
  2198. See {ECDSA-recover}.
  2199. :isValidSignatureNow: pass:normal[xref:#SignatureChecker-isValidSignatureNow-address-bytes32-bytes-[`++isValidSignatureNow++`]]
  2200. :isValidERC1271SignatureNow: pass:normal[xref:#SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-[`++isValidERC1271SignatureNow++`]]
  2201. [.contract]
  2202. [[SignatureChecker]]
  2203. === `++SignatureChecker++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/cryptography/SignatureChecker.sol[{github-icon},role=heading-link]
  2204. [.hljs-theme-light.nopadding]
  2205. ```solidity
  2206. import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
  2207. ```
  2208. Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
  2209. signatures from externally owned accounts (EOAs) as well as ERC-1271 signatures from smart contract wallets like
  2210. Argent and Safe Wallet (previously Gnosis Safe).
  2211. [.contract-index]
  2212. .Functions
  2213. --
  2214. * {xref-SignatureChecker-isValidSignatureNow-address-bytes32-bytes-}[`++isValidSignatureNow(signer, hash, signature)++`]
  2215. * {xref-SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-}[`++isValidERC1271SignatureNow(signer, hash, signature)++`]
  2216. --
  2217. [.contract-item]
  2218. [[SignatureChecker-isValidSignatureNow-address-bytes32-bytes-]]
  2219. ==== `[.contract-item-name]#++isValidSignatureNow++#++(address signer, bytes32 hash, bytes signature) โ†’ bool++` [.item-kind]#internal#
  2220. Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
  2221. signature is validated against that smart contract using ERC-1271, otherwise it's validated using `ECDSA.recover`.
  2222. NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
  2223. change through time. It could return true at block N and false at block N+1 (or the opposite).
  2224. [.contract-item]
  2225. [[SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-]]
  2226. ==== `[.contract-item-name]#++isValidERC1271SignatureNow++#++(address signer, bytes32 hash, bytes signature) โ†’ bool++` [.item-kind]#internal#
  2227. Checks if a signature is valid for a given signer and data hash. The signature is validated
  2228. against the signer smart contract using ERC-1271.
  2229. NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
  2230. change through time. It could return true at block N and false at block N+1 (or the opposite).
  2231. :commutativeKeccak256: pass:normal[xref:#Hashes-commutativeKeccak256-bytes32-bytes32-[`++commutativeKeccak256++`]]
  2232. [.contract]
  2233. [[Hashes]]
  2234. === `++Hashes++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/cryptography/Hashes.sol[{github-icon},role=heading-link]
  2235. [.hljs-theme-light.nopadding]
  2236. ```solidity
  2237. import "@openzeppelin/contracts/utils/cryptography/Hashes.sol";
  2238. ```
  2239. Library of standard hash functions.
  2240. _Available since v5.1._
  2241. [.contract-index]
  2242. .Functions
  2243. --
  2244. * {xref-Hashes-commutativeKeccak256-bytes32-bytes32-}[`++commutativeKeccak256(a, b)++`]
  2245. --
  2246. [.contract-item]
  2247. [[Hashes-commutativeKeccak256-bytes32-bytes32-]]
  2248. ==== `[.contract-item-name]#++commutativeKeccak256++#++(bytes32 a, bytes32 b) โ†’ bytes32++` [.item-kind]#internal#
  2249. Commutative Keccak256 hash of a sorted pair of bytes32. Frequently used when working with merkle proofs.
  2250. NOTE: Equivalent to the `standardNodeHash` in our https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
  2251. :MerkleProofInvalidMultiproof: pass:normal[xref:#MerkleProof-MerkleProofInvalidMultiproof--[`++MerkleProofInvalidMultiproof++`]]
  2252. :verify: pass:normal[xref:#MerkleProof-verify-bytes32---bytes32-bytes32-[`++verify++`]]
  2253. :processProof: pass:normal[xref:#MerkleProof-processProof-bytes32---bytes32-[`++processProof++`]]
  2254. :verify: pass:normal[xref:#MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++verify++`]]
  2255. :processProof: pass:normal[xref:#MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++processProof++`]]
  2256. :verifyCalldata: pass:normal[xref:#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-[`++verifyCalldata++`]]
  2257. :processProofCalldata: pass:normal[xref:#MerkleProof-processProofCalldata-bytes32---bytes32-[`++processProofCalldata++`]]
  2258. :verifyCalldata: pass:normal[xref:#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++verifyCalldata++`]]
  2259. :processProofCalldata: pass:normal[xref:#MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++processProofCalldata++`]]
  2260. :multiProofVerify: pass:normal[xref:#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---[`++multiProofVerify++`]]
  2261. :processMultiProof: pass:normal[xref:#MerkleProof-processMultiProof-bytes32---bool---bytes32---[`++processMultiProof++`]]
  2262. :multiProofVerify: pass:normal[xref:#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++multiProofVerify++`]]
  2263. :processMultiProof: pass:normal[xref:#MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++processMultiProof++`]]
  2264. :multiProofVerifyCalldata: pass:normal[xref:#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---[`++multiProofVerifyCalldata++`]]
  2265. :processMultiProofCalldata: pass:normal[xref:#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---[`++processMultiProofCalldata++`]]
  2266. :multiProofVerifyCalldata: pass:normal[xref:#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++multiProofVerifyCalldata++`]]
  2267. :processMultiProofCalldata: pass:normal[xref:#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++processMultiProofCalldata++`]]
  2268. [.contract]
  2269. [[MerkleProof]]
  2270. === `++MerkleProof++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/cryptography/MerkleProof.sol[{github-icon},role=heading-link]
  2271. [.hljs-theme-light.nopadding]
  2272. ```solidity
  2273. import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
  2274. ```
  2275. These functions deal with verification of Merkle Tree proofs.
  2276. The tree and the proofs can be generated using our
  2277. https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
  2278. You will find a quickstart guide in the readme.
  2279. WARNING: You should avoid using leaf values that are 64 bytes long prior to
  2280. hashing, or use a hash function other than keccak256 for hashing leaves.
  2281. This is because the concatenation of a sorted pair of internal nodes in
  2282. the Merkle tree could be reinterpreted as a leaf value.
  2283. OpenZeppelin's JavaScript library generates Merkle trees that are safe
  2284. against this attack out of the box.
  2285. IMPORTANT: Consider memory side-effects when using custom hashing functions
  2286. that access memory in an unsafe way.
  2287. NOTE: This library supports proof verification for merkle trees built using
  2288. custom _commutative_ hashing functions (i.e. `H(a, b) == H(b, a)`). Proving
  2289. leaf inclusion in trees built using non-commutative hashing functions requires
  2290. additional logic that is not supported by this library.
  2291. [.contract-index]
  2292. .Functions
  2293. --
  2294. * {xref-MerkleProof-verify-bytes32---bytes32-bytes32-}[`++verify(proof, root, leaf)++`]
  2295. * {xref-MerkleProof-processProof-bytes32---bytes32-}[`++processProof(proof, leaf)++`]
  2296. * {xref-MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++verify(proof, root, leaf, hasher)++`]
  2297. * {xref-MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++processProof(proof, leaf, hasher)++`]
  2298. * {xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-}[`++verifyCalldata(proof, root, leaf)++`]
  2299. * {xref-MerkleProof-processProofCalldata-bytes32---bytes32-}[`++processProofCalldata(proof, leaf)++`]
  2300. * {xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++verifyCalldata(proof, root, leaf, hasher)++`]
  2301. * {xref-MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++processProofCalldata(proof, leaf, hasher)++`]
  2302. * {xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---}[`++multiProofVerify(proof, proofFlags, root, leaves)++`]
  2303. * {xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---}[`++processMultiProof(proof, proofFlags, leaves)++`]
  2304. * {xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++multiProofVerify(proof, proofFlags, root, leaves, hasher)++`]
  2305. * {xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++processMultiProof(proof, proofFlags, leaves, hasher)++`]
  2306. * {xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---}[`++multiProofVerifyCalldata(proof, proofFlags, root, leaves)++`]
  2307. * {xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---}[`++processMultiProofCalldata(proof, proofFlags, leaves)++`]
  2308. * {xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++multiProofVerifyCalldata(proof, proofFlags, root, leaves, hasher)++`]
  2309. * {xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++processMultiProofCalldata(proof, proofFlags, leaves, hasher)++`]
  2310. --
  2311. [.contract-index]
  2312. .Errors
  2313. --
  2314. * {xref-MerkleProof-MerkleProofInvalidMultiproof--}[`++MerkleProofInvalidMultiproof()++`]
  2315. --
  2316. [.contract-item]
  2317. [[MerkleProof-verify-bytes32---bytes32-bytes32-]]
  2318. ==== `[.contract-item-name]#++verify++#++(bytes32[] proof, bytes32 root, bytes32 leaf) โ†’ bool++` [.item-kind]#internal#
  2319. Returns true if a `leaf` can be proved to be a part of a Merkle tree
  2320. defined by `root`. For this, a `proof` must be provided, containing
  2321. sibling hashes on the branch from the leaf to the root of the tree. Each
  2322. pair of leaves and each pair of pre-images are assumed to be sorted.
  2323. This version handles proofs in memory with the default hashing function.
  2324. [.contract-item]
  2325. [[MerkleProof-processProof-bytes32---bytes32-]]
  2326. ==== `[.contract-item-name]#++processProof++#++(bytes32[] proof, bytes32 leaf) โ†’ bytes32++` [.item-kind]#internal#
  2327. Returns the rebuilt hash obtained by traversing a Merkle tree up
  2328. from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
  2329. hash matches the root of the tree. When processing the proof, the pairs
  2330. of leaves & pre-images are assumed to be sorted.
  2331. This version handles proofs in memory with the default hashing function.
  2332. [.contract-item]
  2333. [[MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  2334. ==== `[.contract-item-name]#++verify++#++(bytes32[] proof, bytes32 root, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) โ†’ bool++` [.item-kind]#internal#
  2335. Returns true if a `leaf` can be proved to be a part of a Merkle tree
  2336. defined by `root`. For this, a `proof` must be provided, containing
  2337. sibling hashes on the branch from the leaf to the root of the tree. Each
  2338. pair of leaves and each pair of pre-images are assumed to be sorted.
  2339. This version handles proofs in memory with a custom hashing function.
  2340. [.contract-item]
  2341. [[MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  2342. ==== `[.contract-item-name]#++processProof++#++(bytes32[] proof, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) โ†’ bytes32++` [.item-kind]#internal#
  2343. Returns the rebuilt hash obtained by traversing a Merkle tree up
  2344. from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
  2345. hash matches the root of the tree. When processing the proof, the pairs
  2346. of leaves & pre-images are assumed to be sorted.
  2347. This version handles proofs in memory with a custom hashing function.
  2348. [.contract-item]
  2349. [[MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-]]
  2350. ==== `[.contract-item-name]#++verifyCalldata++#++(bytes32[] proof, bytes32 root, bytes32 leaf) โ†’ bool++` [.item-kind]#internal#
  2351. Returns true if a `leaf` can be proved to be a part of a Merkle tree
  2352. defined by `root`. For this, a `proof` must be provided, containing
  2353. sibling hashes on the branch from the leaf to the root of the tree. Each
  2354. pair of leaves and each pair of pre-images are assumed to be sorted.
  2355. This version handles proofs in calldata with the default hashing function.
  2356. [.contract-item]
  2357. [[MerkleProof-processProofCalldata-bytes32---bytes32-]]
  2358. ==== `[.contract-item-name]#++processProofCalldata++#++(bytes32[] proof, bytes32 leaf) โ†’ bytes32++` [.item-kind]#internal#
  2359. Returns the rebuilt hash obtained by traversing a Merkle tree up
  2360. from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
  2361. hash matches the root of the tree. When processing the proof, the pairs
  2362. of leaves & pre-images are assumed to be sorted.
  2363. This version handles proofs in calldata with the default hashing function.
  2364. [.contract-item]
  2365. [[MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  2366. ==== `[.contract-item-name]#++verifyCalldata++#++(bytes32[] proof, bytes32 root, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) โ†’ bool++` [.item-kind]#internal#
  2367. Returns true if a `leaf` can be proved to be a part of a Merkle tree
  2368. defined by `root`. For this, a `proof` must be provided, containing
  2369. sibling hashes on the branch from the leaf to the root of the tree. Each
  2370. pair of leaves and each pair of pre-images are assumed to be sorted.
  2371. This version handles proofs in calldata with a custom hashing function.
  2372. [.contract-item]
  2373. [[MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  2374. ==== `[.contract-item-name]#++processProofCalldata++#++(bytes32[] proof, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) โ†’ bytes32++` [.item-kind]#internal#
  2375. Returns the rebuilt hash obtained by traversing a Merkle tree up
  2376. from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
  2377. hash matches the root of the tree. When processing the proof, the pairs
  2378. of leaves & pre-images are assumed to be sorted.
  2379. This version handles proofs in calldata with a custom hashing function.
  2380. [.contract-item]
  2381. [[MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---]]
  2382. ==== `[.contract-item-name]#++multiProofVerify++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves) โ†’ bool++` [.item-kind]#internal#
  2383. Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
  2384. `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
  2385. This version handles multiproofs in memory with the default hashing function.
  2386. CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
  2387. NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
  2388. The `leaves` must be validated independently. See {processMultiProof}.
  2389. [.contract-item]
  2390. [[MerkleProof-processMultiProof-bytes32---bool---bytes32---]]
  2391. ==== `[.contract-item-name]#++processMultiProof++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves) โ†’ bytes32 merkleRoot++` [.item-kind]#internal#
  2392. Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
  2393. proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
  2394. leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
  2395. respectively.
  2396. This version handles multiproofs in memory with the default hashing function.
  2397. CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
  2398. is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
  2399. tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
  2400. NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
  2401. and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
  2402. validating the leaves elsewhere.
  2403. [.contract-item]
  2404. [[MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
  2405. ==== `[.contract-item-name]#++multiProofVerify++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) โ†’ bool++` [.item-kind]#internal#
  2406. Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
  2407. `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
  2408. This version handles multiproofs in memory with a custom hashing function.
  2409. CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
  2410. NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
  2411. The `leaves` must be validated independently. See {processMultiProof}.
  2412. [.contract-item]
  2413. [[MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
  2414. ==== `[.contract-item-name]#++processMultiProof++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) โ†’ bytes32 merkleRoot++` [.item-kind]#internal#
  2415. Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
  2416. proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
  2417. leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
  2418. respectively.
  2419. This version handles multiproofs in memory with a custom hashing function.
  2420. CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
  2421. is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
  2422. tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
  2423. NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
  2424. and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
  2425. validating the leaves elsewhere.
  2426. [.contract-item]
  2427. [[MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---]]
  2428. ==== `[.contract-item-name]#++multiProofVerifyCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves) โ†’ bool++` [.item-kind]#internal#
  2429. Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
  2430. `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
  2431. This version handles multiproofs in calldata with the default hashing function.
  2432. CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
  2433. NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
  2434. The `leaves` must be validated independently. See {processMultiProofCalldata}.
  2435. [.contract-item]
  2436. [[MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---]]
  2437. ==== `[.contract-item-name]#++processMultiProofCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves) โ†’ bytes32 merkleRoot++` [.item-kind]#internal#
  2438. Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
  2439. proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
  2440. leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
  2441. respectively.
  2442. This version handles multiproofs in calldata with the default hashing function.
  2443. CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
  2444. is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
  2445. tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
  2446. NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
  2447. and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
  2448. validating the leaves elsewhere.
  2449. [.contract-item]
  2450. [[MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
  2451. ==== `[.contract-item-name]#++multiProofVerifyCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) โ†’ bool++` [.item-kind]#internal#
  2452. Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
  2453. `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
  2454. This version handles multiproofs in calldata with a custom hashing function.
  2455. CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
  2456. NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
  2457. The `leaves` must be validated independently. See {processMultiProofCalldata}.
  2458. [.contract-item]
  2459. [[MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
  2460. ==== `[.contract-item-name]#++processMultiProofCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) โ†’ bytes32 merkleRoot++` [.item-kind]#internal#
  2461. Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
  2462. proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
  2463. leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
  2464. respectively.
  2465. This version handles multiproofs in calldata with a custom hashing function.
  2466. CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
  2467. is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
  2468. tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
  2469. NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
  2470. and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
  2471. validating the leaves elsewhere.
  2472. [.contract-item]
  2473. [[MerkleProof-MerkleProofInvalidMultiproof--]]
  2474. ==== `[.contract-item-name]#++MerkleProofInvalidMultiproof++#++()++` [.item-kind]#error#
  2475. The multiproof provided is not valid.
  2476. == Security
  2477. :ReentrancyGuardReentrantCall: pass:normal[xref:#ReentrancyGuard-ReentrancyGuardReentrantCall--[`++ReentrancyGuardReentrantCall++`]]
  2478. :constructor: pass:normal[xref:#ReentrancyGuard-constructor--[`++constructor++`]]
  2479. :nonReentrant: pass:normal[xref:#ReentrancyGuard-nonReentrant--[`++nonReentrant++`]]
  2480. :_reentrancyGuardEntered: pass:normal[xref:#ReentrancyGuard-_reentrancyGuardEntered--[`++_reentrancyGuardEntered++`]]
  2481. [.contract]
  2482. [[ReentrancyGuard]]
  2483. === `++ReentrancyGuard++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/ReentrancyGuard.sol[{github-icon},role=heading-link]
  2484. [.hljs-theme-light.nopadding]
  2485. ```solidity
  2486. import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
  2487. ```
  2488. Contract module that helps prevent reentrant calls to a function.
  2489. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
  2490. available, which can be applied to functions to make sure there are no nested
  2491. (reentrant) calls to them.
  2492. Note that because there is a single `nonReentrant` guard, functions marked as
  2493. `nonReentrant` may not call one another. This can be worked around by making
  2494. those functions `private`, and then adding `external` `nonReentrant` entry
  2495. points to them.
  2496. TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
  2497. consider using {ReentrancyGuardTransient} instead.
  2498. TIP: If you would like to learn more about reentrancy and alternative ways
  2499. to protect against it, check out our blog post
  2500. https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
  2501. [.contract-index]
  2502. .Modifiers
  2503. --
  2504. * {xref-ReentrancyGuard-nonReentrant--}[`++nonReentrant()++`]
  2505. --
  2506. [.contract-index]
  2507. .Functions
  2508. --
  2509. * {xref-ReentrancyGuard-constructor--}[`++constructor()++`]
  2510. * {xref-ReentrancyGuard-_reentrancyGuardEntered--}[`++_reentrancyGuardEntered()++`]
  2511. --
  2512. [.contract-index]
  2513. .Errors
  2514. --
  2515. * {xref-ReentrancyGuard-ReentrancyGuardReentrantCall--}[`++ReentrancyGuardReentrantCall()++`]
  2516. --
  2517. [.contract-item]
  2518. [[ReentrancyGuard-nonReentrant--]]
  2519. ==== `[.contract-item-name]#++nonReentrant++#++()++` [.item-kind]#modifier#
  2520. Prevents a contract from calling itself, directly or indirectly.
  2521. Calling a `nonReentrant` function from another `nonReentrant`
  2522. function is not supported. It is possible to prevent this from happening
  2523. by making the `nonReentrant` function external, and making it call a
  2524. `private` function that does the actual work.
  2525. [.contract-item]
  2526. [[ReentrancyGuard-constructor--]]
  2527. ==== `[.contract-item-name]#++constructor++#++()++` [.item-kind]#internal#
  2528. [.contract-item]
  2529. [[ReentrancyGuard-_reentrancyGuardEntered--]]
  2530. ==== `[.contract-item-name]#++_reentrancyGuardEntered++#++() โ†’ bool++` [.item-kind]#internal#
  2531. Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
  2532. `nonReentrant` function in the call stack.
  2533. [.contract-item]
  2534. [[ReentrancyGuard-ReentrancyGuardReentrantCall--]]
  2535. ==== `[.contract-item-name]#++ReentrancyGuardReentrantCall++#++()++` [.item-kind]#error#
  2536. Unauthorized reentrant call.
  2537. :ReentrancyGuardReentrantCall: pass:normal[xref:#ReentrancyGuardTransient-ReentrancyGuardReentrantCall--[`++ReentrancyGuardReentrantCall++`]]
  2538. :nonReentrant: pass:normal[xref:#ReentrancyGuardTransient-nonReentrant--[`++nonReentrant++`]]
  2539. :_reentrancyGuardEntered: pass:normal[xref:#ReentrancyGuardTransient-_reentrancyGuardEntered--[`++_reentrancyGuardEntered++`]]
  2540. [.contract]
  2541. [[ReentrancyGuardTransient]]
  2542. === `++ReentrancyGuardTransient++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/ReentrancyGuardTransient.sol[{github-icon},role=heading-link]
  2543. [.hljs-theme-light.nopadding]
  2544. ```solidity
  2545. import "@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol";
  2546. ```
  2547. Variant of {ReentrancyGuard} that uses transient storage.
  2548. NOTE: This variant only works on networks where EIP-1153 is available.
  2549. _Available since v5.1._
  2550. [.contract-index]
  2551. .Modifiers
  2552. --
  2553. * {xref-ReentrancyGuardTransient-nonReentrant--}[`++nonReentrant()++`]
  2554. --
  2555. [.contract-index]
  2556. .Functions
  2557. --
  2558. * {xref-ReentrancyGuardTransient-_reentrancyGuardEntered--}[`++_reentrancyGuardEntered()++`]
  2559. --
  2560. [.contract-index]
  2561. .Errors
  2562. --
  2563. * {xref-ReentrancyGuardTransient-ReentrancyGuardReentrantCall--}[`++ReentrancyGuardReentrantCall()++`]
  2564. --
  2565. [.contract-item]
  2566. [[ReentrancyGuardTransient-nonReentrant--]]
  2567. ==== `[.contract-item-name]#++nonReentrant++#++()++` [.item-kind]#modifier#
  2568. Prevents a contract from calling itself, directly or indirectly.
  2569. Calling a `nonReentrant` function from another `nonReentrant`
  2570. function is not supported. It is possible to prevent this from happening
  2571. by making the `nonReentrant` function external, and making it call a
  2572. `private` function that does the actual work.
  2573. [.contract-item]
  2574. [[ReentrancyGuardTransient-_reentrancyGuardEntered--]]
  2575. ==== `[.contract-item-name]#++_reentrancyGuardEntered++#++() โ†’ bool++` [.item-kind]#internal#
  2576. Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
  2577. `nonReentrant` function in the call stack.
  2578. [.contract-item]
  2579. [[ReentrancyGuardTransient-ReentrancyGuardReentrantCall--]]
  2580. ==== `[.contract-item-name]#++ReentrancyGuardReentrantCall++#++()++` [.item-kind]#error#
  2581. Unauthorized reentrant call.
  2582. :Paused: pass:normal[xref:#Pausable-Paused-address-[`++Paused++`]]
  2583. :Unpaused: pass:normal[xref:#Pausable-Unpaused-address-[`++Unpaused++`]]
  2584. :EnforcedPause: pass:normal[xref:#Pausable-EnforcedPause--[`++EnforcedPause++`]]
  2585. :ExpectedPause: pass:normal[xref:#Pausable-ExpectedPause--[`++ExpectedPause++`]]
  2586. :constructor: pass:normal[xref:#Pausable-constructor--[`++constructor++`]]
  2587. :whenNotPaused: pass:normal[xref:#Pausable-whenNotPaused--[`++whenNotPaused++`]]
  2588. :whenPaused: pass:normal[xref:#Pausable-whenPaused--[`++whenPaused++`]]
  2589. :paused: pass:normal[xref:#Pausable-paused--[`++paused++`]]
  2590. :_requireNotPaused: pass:normal[xref:#Pausable-_requireNotPaused--[`++_requireNotPaused++`]]
  2591. :_requirePaused: pass:normal[xref:#Pausable-_requirePaused--[`++_requirePaused++`]]
  2592. :_pause: pass:normal[xref:#Pausable-_pause--[`++_pause++`]]
  2593. :_unpause: pass:normal[xref:#Pausable-_unpause--[`++_unpause++`]]
  2594. [.contract]
  2595. [[Pausable]]
  2596. === `++Pausable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Pausable.sol[{github-icon},role=heading-link]
  2597. [.hljs-theme-light.nopadding]
  2598. ```solidity
  2599. import "@openzeppelin/contracts/utils/Pausable.sol";
  2600. ```
  2601. Contract module which allows children to implement an emergency stop
  2602. mechanism that can be triggered by an authorized account.
  2603. This module is used through inheritance. It will make available the
  2604. modifiers `whenNotPaused` and `whenPaused`, which can be applied to
  2605. the functions of your contract. Note that they will not be pausable by
  2606. simply including this module, only once the modifiers are put in place.
  2607. [.contract-index]
  2608. .Modifiers
  2609. --
  2610. * {xref-Pausable-whenNotPaused--}[`++whenNotPaused()++`]
  2611. * {xref-Pausable-whenPaused--}[`++whenPaused()++`]
  2612. --
  2613. [.contract-index]
  2614. .Functions
  2615. --
  2616. * {xref-Pausable-constructor--}[`++constructor()++`]
  2617. * {xref-Pausable-paused--}[`++paused()++`]
  2618. * {xref-Pausable-_requireNotPaused--}[`++_requireNotPaused()++`]
  2619. * {xref-Pausable-_requirePaused--}[`++_requirePaused()++`]
  2620. * {xref-Pausable-_pause--}[`++_pause()++`]
  2621. * {xref-Pausable-_unpause--}[`++_unpause()++`]
  2622. --
  2623. [.contract-index]
  2624. .Events
  2625. --
  2626. * {xref-Pausable-Paused-address-}[`++Paused(account)++`]
  2627. * {xref-Pausable-Unpaused-address-}[`++Unpaused(account)++`]
  2628. --
  2629. [.contract-index]
  2630. .Errors
  2631. --
  2632. * {xref-Pausable-EnforcedPause--}[`++EnforcedPause()++`]
  2633. * {xref-Pausable-ExpectedPause--}[`++ExpectedPause()++`]
  2634. --
  2635. [.contract-item]
  2636. [[Pausable-whenNotPaused--]]
  2637. ==== `[.contract-item-name]#++whenNotPaused++#++()++` [.item-kind]#modifier#
  2638. Modifier to make a function callable only when the contract is not paused.
  2639. Requirements:
  2640. - The contract must not be paused.
  2641. [.contract-item]
  2642. [[Pausable-whenPaused--]]
  2643. ==== `[.contract-item-name]#++whenPaused++#++()++` [.item-kind]#modifier#
  2644. Modifier to make a function callable only when the contract is paused.
  2645. Requirements:
  2646. - The contract must be paused.
  2647. [.contract-item]
  2648. [[Pausable-constructor--]]
  2649. ==== `[.contract-item-name]#++constructor++#++()++` [.item-kind]#internal#
  2650. Initializes the contract in unpaused state.
  2651. [.contract-item]
  2652. [[Pausable-paused--]]
  2653. ==== `[.contract-item-name]#++paused++#++() โ†’ bool++` [.item-kind]#public#
  2654. Returns true if the contract is paused, and false otherwise.
  2655. [.contract-item]
  2656. [[Pausable-_requireNotPaused--]]
  2657. ==== `[.contract-item-name]#++_requireNotPaused++#++()++` [.item-kind]#internal#
  2658. Throws if the contract is paused.
  2659. [.contract-item]
  2660. [[Pausable-_requirePaused--]]
  2661. ==== `[.contract-item-name]#++_requirePaused++#++()++` [.item-kind]#internal#
  2662. Throws if the contract is not paused.
  2663. [.contract-item]
  2664. [[Pausable-_pause--]]
  2665. ==== `[.contract-item-name]#++_pause++#++()++` [.item-kind]#internal#
  2666. Triggers stopped state.
  2667. Requirements:
  2668. - The contract must not be paused.
  2669. [.contract-item]
  2670. [[Pausable-_unpause--]]
  2671. ==== `[.contract-item-name]#++_unpause++#++()++` [.item-kind]#internal#
  2672. Returns to normal state.
  2673. Requirements:
  2674. - The contract must be paused.
  2675. [.contract-item]
  2676. [[Pausable-Paused-address-]]
  2677. ==== `[.contract-item-name]#++Paused++#++(address account)++` [.item-kind]#event#
  2678. Emitted when the pause is triggered by `account`.
  2679. [.contract-item]
  2680. [[Pausable-Unpaused-address-]]
  2681. ==== `[.contract-item-name]#++Unpaused++#++(address account)++` [.item-kind]#event#
  2682. Emitted when the pause is lifted by `account`.
  2683. [.contract-item]
  2684. [[Pausable-EnforcedPause--]]
  2685. ==== `[.contract-item-name]#++EnforcedPause++#++()++` [.item-kind]#error#
  2686. The operation failed because the contract is paused.
  2687. [.contract-item]
  2688. [[Pausable-ExpectedPause--]]
  2689. ==== `[.contract-item-name]#++ExpectedPause++#++()++` [.item-kind]#error#
  2690. The operation failed because the contract is not paused.
  2691. :InvalidAccountNonce: pass:normal[xref:#Nonces-InvalidAccountNonce-address-uint256-[`++InvalidAccountNonce++`]]
  2692. :nonces: pass:normal[xref:#Nonces-nonces-address-[`++nonces++`]]
  2693. :_useNonce: pass:normal[xref:#Nonces-_useNonce-address-[`++_useNonce++`]]
  2694. :_useCheckedNonce: pass:normal[xref:#Nonces-_useCheckedNonce-address-uint256-[`++_useCheckedNonce++`]]
  2695. [.contract]
  2696. [[Nonces]]
  2697. === `++Nonces++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Nonces.sol[{github-icon},role=heading-link]
  2698. [.hljs-theme-light.nopadding]
  2699. ```solidity
  2700. import "@openzeppelin/contracts/utils/Nonces.sol";
  2701. ```
  2702. Provides tracking nonces for addresses. Nonces will only increment.
  2703. [.contract-index]
  2704. .Functions
  2705. --
  2706. * {xref-Nonces-nonces-address-}[`++nonces(owner)++`]
  2707. * {xref-Nonces-_useNonce-address-}[`++_useNonce(owner)++`]
  2708. * {xref-Nonces-_useCheckedNonce-address-uint256-}[`++_useCheckedNonce(owner, nonce)++`]
  2709. --
  2710. [.contract-index]
  2711. .Errors
  2712. --
  2713. * {xref-Nonces-InvalidAccountNonce-address-uint256-}[`++InvalidAccountNonce(account, currentNonce)++`]
  2714. --
  2715. [.contract-item]
  2716. [[Nonces-nonces-address-]]
  2717. ==== `[.contract-item-name]#++nonces++#++(address owner) โ†’ uint256++` [.item-kind]#public#
  2718. Returns the next unused nonce for an address.
  2719. [.contract-item]
  2720. [[Nonces-_useNonce-address-]]
  2721. ==== `[.contract-item-name]#++_useNonce++#++(address owner) โ†’ uint256++` [.item-kind]#internal#
  2722. Consumes a nonce.
  2723. Returns the current value and increments nonce.
  2724. [.contract-item]
  2725. [[Nonces-_useCheckedNonce-address-uint256-]]
  2726. ==== `[.contract-item-name]#++_useCheckedNonce++#++(address owner, uint256 nonce)++` [.item-kind]#internal#
  2727. Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
  2728. [.contract-item]
  2729. [[Nonces-InvalidAccountNonce-address-uint256-]]
  2730. ==== `[.contract-item-name]#++InvalidAccountNonce++#++(address account, uint256 currentNonce)++` [.item-kind]#error#
  2731. The nonce used for an `account` is not the expected current nonce.
  2732. :nonces: pass:normal[xref:#NoncesKeyed-nonces-address-uint192-[`++nonces++`]]
  2733. :_useNonce: pass:normal[xref:#NoncesKeyed-_useNonce-address-uint192-[`++_useNonce++`]]
  2734. :_useCheckedNonce: pass:normal[xref:#NoncesKeyed-_useCheckedNonce-address-uint256-[`++_useCheckedNonce++`]]
  2735. :_useCheckedNonce: pass:normal[xref:#NoncesKeyed-_useCheckedNonce-address-uint192-uint64-[`++_useCheckedNonce++`]]
  2736. [.contract]
  2737. [[NoncesKeyed]]
  2738. === `++NoncesKeyed++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/NoncesKeyed.sol[{github-icon},role=heading-link]
  2739. [.hljs-theme-light.nopadding]
  2740. ```solidity
  2741. import "@openzeppelin/contracts/utils/NoncesKeyed.sol";
  2742. ```
  2743. Alternative to {Nonces}, that supports key-ed nonces.
  2744. Follows the https://eips.ethereum.org/EIPS/eip-4337#semi-abstracted-nonce-support[ERC-4337's semi-abstracted nonce system].
  2745. NOTE: This contract inherits from {Nonces} and reuses its storage for the first nonce key (i.e. `0`). This
  2746. makes upgrading from {Nonces} to {NoncesKeyed} safe when using their upgradeable versions (e.g. `NoncesKeyedUpgradeable`).
  2747. Doing so will NOT reset the current state of nonces, avoiding replay attacks where a nonce is reused after the upgrade.
  2748. [.contract-index]
  2749. .Functions
  2750. --
  2751. * {xref-NoncesKeyed-nonces-address-uint192-}[`++nonces(owner, key)++`]
  2752. * {xref-NoncesKeyed-_useNonce-address-uint192-}[`++_useNonce(owner, key)++`]
  2753. * {xref-NoncesKeyed-_useCheckedNonce-address-uint256-}[`++_useCheckedNonce(owner, keyNonce)++`]
  2754. * {xref-NoncesKeyed-_useCheckedNonce-address-uint192-uint64-}[`++_useCheckedNonce(owner, key, nonce)++`]
  2755. [.contract-subindex-inherited]
  2756. .Nonces
  2757. * {xref-Nonces-nonces-address-}[`++nonces(owner)++`]
  2758. * {xref-Nonces-_useNonce-address-}[`++_useNonce(owner)++`]
  2759. --
  2760. [.contract-index]
  2761. .Errors
  2762. --
  2763. [.contract-subindex-inherited]
  2764. .Nonces
  2765. * {xref-Nonces-InvalidAccountNonce-address-uint256-}[`++InvalidAccountNonce(account, currentNonce)++`]
  2766. --
  2767. [.contract-item]
  2768. [[NoncesKeyed-nonces-address-uint192-]]
  2769. ==== `[.contract-item-name]#++nonces++#++(address owner, uint192 key) โ†’ uint256++` [.item-kind]#public#
  2770. Returns the next unused nonce for an address and key. Result contains the key prefix.
  2771. [.contract-item]
  2772. [[NoncesKeyed-_useNonce-address-uint192-]]
  2773. ==== `[.contract-item-name]#++_useNonce++#++(address owner, uint192 key) โ†’ uint256++` [.item-kind]#internal#
  2774. Consumes the next unused nonce for an address and key.
  2775. Returns the current value without the key prefix. Consumed nonce is increased, so calling this function twice
  2776. with the same arguments will return different (sequential) results.
  2777. [.contract-item]
  2778. [[NoncesKeyed-_useCheckedNonce-address-uint256-]]
  2779. ==== `[.contract-item-name]#++_useCheckedNonce++#++(address owner, uint256 keyNonce)++` [.item-kind]#internal#
  2780. Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
  2781. This version takes the key and the nonce in a single uint256 parameter:
  2782. - use the first 24 bytes for the key
  2783. - use the last 8 bytes for the nonce
  2784. [.contract-item]
  2785. [[NoncesKeyed-_useCheckedNonce-address-uint192-uint64-]]
  2786. ==== `[.contract-item-name]#++_useCheckedNonce++#++(address owner, uint192 key, uint64 nonce)++` [.item-kind]#internal#
  2787. Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
  2788. This version takes the key and the nonce as two different parameters.
  2789. == Introspection
  2790. This set of interfaces and contracts deal with https://en.wikipedia.org/wiki/Type_introspection[type introspection] of contracts, that is, examining which functions can be called on them. This is usually referred to as a contract's _interface_.
  2791. Ethereum contracts have no native concept of an interface, so applications must usually simply trust they are not making an incorrect call. For trusted setups this is a non-issue, but often unknown and untrusted third-party addresses need to be interacted with. There may even not be any direct calls to them! (e.g. ERC-20 tokens may be sent to a contract that lacks a way to transfer them out of it, locking them forever). In these cases, a contract _declaring_ its interface can be very helpful in preventing errors.
  2792. :supportsInterface: pass:normal[xref:#IERC165-supportsInterface-bytes4-[`++supportsInterface++`]]
  2793. [.contract]
  2794. [[IERC165]]
  2795. === `++IERC165++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/introspection/IERC165.sol[{github-icon},role=heading-link]
  2796. [.hljs-theme-light.nopadding]
  2797. ```solidity
  2798. import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
  2799. ```
  2800. Interface of the ERC-165 standard, as defined in the
  2801. https://eips.ethereum.org/EIPS/eip-165[ERC].
  2802. Implementers can declare support of contract interfaces, which can then be
  2803. queried by others ({ERC165Checker}).
  2804. For an implementation, see {ERC165}.
  2805. [.contract-index]
  2806. .Functions
  2807. --
  2808. * {xref-IERC165-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  2809. --
  2810. [.contract-item]
  2811. [[IERC165-supportsInterface-bytes4-]]
  2812. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) โ†’ bool++` [.item-kind]#external#
  2813. Returns true if this contract implements the interface defined by
  2814. `interfaceId`. See the corresponding
  2815. https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
  2816. to learn more about how these ids are created.
  2817. This function call must use less than 30 000 gas.
  2818. :supportsInterface: pass:normal[xref:#ERC165-supportsInterface-bytes4-[`++supportsInterface++`]]
  2819. [.contract]
  2820. [[ERC165]]
  2821. === `++ERC165++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/introspection/ERC165.sol[{github-icon},role=heading-link]
  2822. [.hljs-theme-light.nopadding]
  2823. ```solidity
  2824. import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
  2825. ```
  2826. Implementation of the {IERC165} interface.
  2827. Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
  2828. for the additional interface id that will be supported. For example:
  2829. ```solidity
  2830. function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
  2831. return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
  2832. }
  2833. ```
  2834. [.contract-index]
  2835. .Functions
  2836. --
  2837. * {xref-ERC165-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  2838. [.contract-subindex-inherited]
  2839. .IERC165
  2840. --
  2841. [.contract-item]
  2842. [[ERC165-supportsInterface-bytes4-]]
  2843. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) โ†’ bool++` [.item-kind]#public#
  2844. See {IERC165-supportsInterface}.
  2845. :supportsERC165: pass:normal[xref:#ERC165Checker-supportsERC165-address-[`++supportsERC165++`]]
  2846. :supportsInterface: pass:normal[xref:#ERC165Checker-supportsInterface-address-bytes4-[`++supportsInterface++`]]
  2847. :getSupportedInterfaces: pass:normal[xref:#ERC165Checker-getSupportedInterfaces-address-bytes4---[`++getSupportedInterfaces++`]]
  2848. :supportsAllInterfaces: pass:normal[xref:#ERC165Checker-supportsAllInterfaces-address-bytes4---[`++supportsAllInterfaces++`]]
  2849. :supportsERC165InterfaceUnchecked: pass:normal[xref:#ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-[`++supportsERC165InterfaceUnchecked++`]]
  2850. [.contract]
  2851. [[ERC165Checker]]
  2852. === `++ERC165Checker++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/introspection/ERC165Checker.sol[{github-icon},role=heading-link]
  2853. [.hljs-theme-light.nopadding]
  2854. ```solidity
  2855. import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
  2856. ```
  2857. Library used to query support of an interface declared via {IERC165}.
  2858. Note that these functions return the actual result of the query: they do not
  2859. `revert` if an interface is not supported. It is up to the caller to decide
  2860. what to do in these cases.
  2861. [.contract-index]
  2862. .Functions
  2863. --
  2864. * {xref-ERC165Checker-supportsERC165-address-}[`++supportsERC165(account)++`]
  2865. * {xref-ERC165Checker-supportsInterface-address-bytes4-}[`++supportsInterface(account, interfaceId)++`]
  2866. * {xref-ERC165Checker-getSupportedInterfaces-address-bytes4---}[`++getSupportedInterfaces(account, interfaceIds)++`]
  2867. * {xref-ERC165Checker-supportsAllInterfaces-address-bytes4---}[`++supportsAllInterfaces(account, interfaceIds)++`]
  2868. * {xref-ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-}[`++supportsERC165InterfaceUnchecked(account, interfaceId)++`]
  2869. --
  2870. [.contract-item]
  2871. [[ERC165Checker-supportsERC165-address-]]
  2872. ==== `[.contract-item-name]#++supportsERC165++#++(address account) โ†’ bool++` [.item-kind]#internal#
  2873. Returns true if `account` supports the {IERC165} interface.
  2874. [.contract-item]
  2875. [[ERC165Checker-supportsInterface-address-bytes4-]]
  2876. ==== `[.contract-item-name]#++supportsInterface++#++(address account, bytes4 interfaceId) โ†’ bool++` [.item-kind]#internal#
  2877. Returns true if `account` supports the interface defined by
  2878. `interfaceId`. Support for {IERC165} itself is queried automatically.
  2879. See {IERC165-supportsInterface}.
  2880. [.contract-item]
  2881. [[ERC165Checker-getSupportedInterfaces-address-bytes4---]]
  2882. ==== `[.contract-item-name]#++getSupportedInterfaces++#++(address account, bytes4[] interfaceIds) โ†’ bool[]++` [.item-kind]#internal#
  2883. Returns a boolean array where each value corresponds to the
  2884. interfaces passed in and whether they're supported or not. This allows
  2885. you to batch check interfaces for a contract where your expectation
  2886. is that some interfaces may not be supported.
  2887. See {IERC165-supportsInterface}.
  2888. [.contract-item]
  2889. [[ERC165Checker-supportsAllInterfaces-address-bytes4---]]
  2890. ==== `[.contract-item-name]#++supportsAllInterfaces++#++(address account, bytes4[] interfaceIds) โ†’ bool++` [.item-kind]#internal#
  2891. Returns true if `account` supports all the interfaces defined in
  2892. `interfaceIds`. Support for {IERC165} itself is queried automatically.
  2893. Batch-querying can lead to gas savings by skipping repeated checks for
  2894. {IERC165} support.
  2895. See {IERC165-supportsInterface}.
  2896. [.contract-item]
  2897. [[ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-]]
  2898. ==== `[.contract-item-name]#++supportsERC165InterfaceUnchecked++#++(address account, bytes4 interfaceId) โ†’ bool++` [.item-kind]#internal#
  2899. Assumes that account contains a contract that supports ERC-165, otherwise
  2900. the behavior of this method is undefined. This precondition can be checked
  2901. with {supportsERC165}.
  2902. Some precompiled contracts will falsely indicate support for a given interface, so caution
  2903. should be exercised when using this function.
  2904. Interface identification is specified in ERC-165.
  2905. == Data Structures
  2906. :BitMap: pass:normal[xref:#BitMaps-BitMap[`++BitMap++`]]
  2907. :get: pass:normal[xref:#BitMaps-get-struct-BitMaps-BitMap-uint256-[`++get++`]]
  2908. :setTo: pass:normal[xref:#BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-[`++setTo++`]]
  2909. :set: pass:normal[xref:#BitMaps-set-struct-BitMaps-BitMap-uint256-[`++set++`]]
  2910. :unset: pass:normal[xref:#BitMaps-unset-struct-BitMaps-BitMap-uint256-[`++unset++`]]
  2911. [.contract]
  2912. [[BitMaps]]
  2913. === `++BitMaps++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/structs/BitMaps.sol[{github-icon},role=heading-link]
  2914. [.hljs-theme-light.nopadding]
  2915. ```solidity
  2916. import "@openzeppelin/contracts/utils/structs/BitMaps.sol";
  2917. ```
  2918. Library for managing uint256 to bool mapping in a compact and efficient way, provided the keys are sequential.
  2919. Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].
  2920. BitMaps pack 256 booleans across each bit of a single 256-bit slot of `uint256` type.
  2921. Hence booleans corresponding to 256 _sequential_ indices would only consume a single slot,
  2922. unlike the regular `bool` which would consume an entire slot for a single value.
  2923. This results in gas savings in two ways:
  2924. - Setting a zero value to non-zero only once every 256 times
  2925. - Accessing the same warm slot for every 256 _sequential_ indices
  2926. [.contract-index]
  2927. .Functions
  2928. --
  2929. * {xref-BitMaps-get-struct-BitMaps-BitMap-uint256-}[`++get(bitmap, index)++`]
  2930. * {xref-BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-}[`++setTo(bitmap, index, value)++`]
  2931. * {xref-BitMaps-set-struct-BitMaps-BitMap-uint256-}[`++set(bitmap, index)++`]
  2932. * {xref-BitMaps-unset-struct-BitMaps-BitMap-uint256-}[`++unset(bitmap, index)++`]
  2933. --
  2934. [.contract-item]
  2935. [[BitMaps-get-struct-BitMaps-BitMap-uint256-]]
  2936. ==== `[.contract-item-name]#++get++#++(struct BitMaps.BitMap bitmap, uint256 index) โ†’ bool++` [.item-kind]#internal#
  2937. Returns whether the bit at `index` is set.
  2938. [.contract-item]
  2939. [[BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-]]
  2940. ==== `[.contract-item-name]#++setTo++#++(struct BitMaps.BitMap bitmap, uint256 index, bool value)++` [.item-kind]#internal#
  2941. Sets the bit at `index` to the boolean `value`.
  2942. [.contract-item]
  2943. [[BitMaps-set-struct-BitMaps-BitMap-uint256-]]
  2944. ==== `[.contract-item-name]#++set++#++(struct BitMaps.BitMap bitmap, uint256 index)++` [.item-kind]#internal#
  2945. Sets the bit at `index`.
  2946. [.contract-item]
  2947. [[BitMaps-unset-struct-BitMaps-BitMap-uint256-]]
  2948. ==== `[.contract-item-name]#++unset++#++(struct BitMaps.BitMap bitmap, uint256 index)++` [.item-kind]#internal#
  2949. Unsets the bit at `index`.
  2950. :EnumerableMapNonexistentKey: pass:normal[xref:#EnumerableMap-EnumerableMapNonexistentKey-bytes32-[`++EnumerableMapNonexistentKey++`]]
  2951. :Bytes32ToBytes32Map: pass:normal[xref:#EnumerableMap-Bytes32ToBytes32Map[`++Bytes32ToBytes32Map++`]]
  2952. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-[`++set++`]]
  2953. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++remove++`]]
  2954. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++contains++`]]
  2955. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-[`++length++`]]
  2956. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-[`++at++`]]
  2957. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++tryGet++`]]
  2958. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++get++`]]
  2959. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-[`++keys++`]]
  2960. :UintToUintMap: pass:normal[xref:#EnumerableMap-UintToUintMap[`++UintToUintMap++`]]
  2961. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-[`++set++`]]
  2962. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-[`++remove++`]]
  2963. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-[`++contains++`]]
  2964. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToUintMap-[`++length++`]]
  2965. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-[`++at++`]]
  2966. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-[`++tryGet++`]]
  2967. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-[`++get++`]]
  2968. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-[`++keys++`]]
  2969. :UintToAddressMap: pass:normal[xref:#EnumerableMap-UintToAddressMap[`++UintToAddressMap++`]]
  2970. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-[`++set++`]]
  2971. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-[`++remove++`]]
  2972. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-[`++contains++`]]
  2973. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-[`++length++`]]
  2974. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-[`++at++`]]
  2975. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-[`++tryGet++`]]
  2976. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-[`++get++`]]
  2977. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-[`++keys++`]]
  2978. :UintToBytes32Map: pass:normal[xref:#EnumerableMap-UintToBytes32Map[`++UintToBytes32Map++`]]
  2979. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-[`++set++`]]
  2980. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-[`++remove++`]]
  2981. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-[`++contains++`]]
  2982. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-[`++length++`]]
  2983. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-[`++at++`]]
  2984. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-[`++tryGet++`]]
  2985. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-[`++get++`]]
  2986. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-[`++keys++`]]
  2987. :AddressToUintMap: pass:normal[xref:#EnumerableMap-AddressToUintMap[`++AddressToUintMap++`]]
  2988. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-[`++set++`]]
  2989. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-[`++remove++`]]
  2990. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-[`++contains++`]]
  2991. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-[`++length++`]]
  2992. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-[`++at++`]]
  2993. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-[`++tryGet++`]]
  2994. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-[`++get++`]]
  2995. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-[`++keys++`]]
  2996. :AddressToAddressMap: pass:normal[xref:#EnumerableMap-AddressToAddressMap[`++AddressToAddressMap++`]]
  2997. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-[`++set++`]]
  2998. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-[`++remove++`]]
  2999. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-[`++contains++`]]
  3000. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-[`++length++`]]
  3001. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-[`++at++`]]
  3002. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-[`++tryGet++`]]
  3003. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-[`++get++`]]
  3004. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-[`++keys++`]]
  3005. :AddressToBytes32Map: pass:normal[xref:#EnumerableMap-AddressToBytes32Map[`++AddressToBytes32Map++`]]
  3006. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-[`++set++`]]
  3007. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-[`++remove++`]]
  3008. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-[`++contains++`]]
  3009. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-[`++length++`]]
  3010. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-[`++at++`]]
  3011. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-[`++tryGet++`]]
  3012. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-[`++get++`]]
  3013. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-[`++keys++`]]
  3014. :Bytes32ToUintMap: pass:normal[xref:#EnumerableMap-Bytes32ToUintMap[`++Bytes32ToUintMap++`]]
  3015. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-[`++set++`]]
  3016. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++remove++`]]
  3017. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++contains++`]]
  3018. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-[`++length++`]]
  3019. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-[`++at++`]]
  3020. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++tryGet++`]]
  3021. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++get++`]]
  3022. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-[`++keys++`]]
  3023. :Bytes32ToAddressMap: pass:normal[xref:#EnumerableMap-Bytes32ToAddressMap[`++Bytes32ToAddressMap++`]]
  3024. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-[`++set++`]]
  3025. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++remove++`]]
  3026. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++contains++`]]
  3027. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-[`++length++`]]
  3028. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-[`++at++`]]
  3029. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++tryGet++`]]
  3030. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++get++`]]
  3031. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-[`++keys++`]]
  3032. [.contract]
  3033. [[EnumerableMap]]
  3034. === `++EnumerableMap++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/structs/EnumerableMap.sol[{github-icon},role=heading-link]
  3035. [.hljs-theme-light.nopadding]
  3036. ```solidity
  3037. import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol";
  3038. ```
  3039. Library for managing an enumerable variant of Solidity's
  3040. https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
  3041. type.
  3042. Maps have the following properties:
  3043. - Entries are added, removed, and checked for existence in constant time
  3044. (O(1)).
  3045. - Entries are enumerated in O(n). No guarantees are made on the ordering.
  3046. ```solidity
  3047. contract Example {
  3048. // Add the library methods
  3049. using EnumerableMap for EnumerableMap.UintToAddressMap;
  3050. // Declare a set state variable
  3051. EnumerableMap.UintToAddressMap private myMap;
  3052. }
  3053. ```
  3054. The following map types are supported:
  3055. - `uint256 -> address` (`UintToAddressMap`) since v3.0.0
  3056. - `address -> uint256` (`AddressToUintMap`) since v4.6.0
  3057. - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0
  3058. - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0
  3059. - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0
  3060. - `uint256 -> bytes32` (`UintToBytes32Map`) since v5.1.0
  3061. - `address -> address` (`AddressToAddressMap`) since v5.1.0
  3062. - `address -> bytes32` (`AddressToBytes32Map`) since v5.1.0
  3063. - `bytes32 -> address` (`Bytes32ToAddressMap`) since v5.1.0
  3064. [WARNING]
  3065. ====
  3066. Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
  3067. unusable.
  3068. See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
  3069. In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an
  3070. array of EnumerableMap.
  3071. ====
  3072. [.contract-index]
  3073. .Functions
  3074. --
  3075. * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-}[`++set(map, key, value)++`]
  3076. * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++remove(map, key)++`]
  3077. * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++contains(map, key)++`]
  3078. * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-}[`++length(map)++`]
  3079. * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-}[`++at(map, index)++`]
  3080. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++tryGet(map, key)++`]
  3081. * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++get(map, key)++`]
  3082. * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-}[`++keys(map)++`]
  3083. * {xref-EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-}[`++set(map, key, value)++`]
  3084. * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-}[`++remove(map, key)++`]
  3085. * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-}[`++contains(map, key)++`]
  3086. * {xref-EnumerableMap-length-struct-EnumerableMap-UintToUintMap-}[`++length(map)++`]
  3087. * {xref-EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-}[`++at(map, index)++`]
  3088. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-}[`++tryGet(map, key)++`]
  3089. * {xref-EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-}[`++get(map, key)++`]
  3090. * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-}[`++keys(map)++`]
  3091. * {xref-EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-}[`++set(map, key, value)++`]
  3092. * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-}[`++remove(map, key)++`]
  3093. * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-}[`++contains(map, key)++`]
  3094. * {xref-EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-}[`++length(map)++`]
  3095. * {xref-EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-}[`++at(map, index)++`]
  3096. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-}[`++tryGet(map, key)++`]
  3097. * {xref-EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-}[`++get(map, key)++`]
  3098. * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-}[`++keys(map)++`]
  3099. * {xref-EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-}[`++set(map, key, value)++`]
  3100. * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++remove(map, key)++`]
  3101. * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++contains(map, key)++`]
  3102. * {xref-EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-}[`++length(map)++`]
  3103. * {xref-EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++at(map, index)++`]
  3104. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++tryGet(map, key)++`]
  3105. * {xref-EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++get(map, key)++`]
  3106. * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-}[`++keys(map)++`]
  3107. * {xref-EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-}[`++set(map, key, value)++`]
  3108. * {xref-EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-}[`++remove(map, key)++`]
  3109. * {xref-EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-}[`++contains(map, key)++`]
  3110. * {xref-EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-}[`++length(map)++`]
  3111. * {xref-EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-}[`++at(map, index)++`]
  3112. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-}[`++tryGet(map, key)++`]
  3113. * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-}[`++get(map, key)++`]
  3114. * {xref-EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-}[`++keys(map)++`]
  3115. * {xref-EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-}[`++set(map, key, value)++`]
  3116. * {xref-EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-}[`++remove(map, key)++`]
  3117. * {xref-EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-}[`++contains(map, key)++`]
  3118. * {xref-EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-}[`++length(map)++`]
  3119. * {xref-EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-}[`++at(map, index)++`]
  3120. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-}[`++tryGet(map, key)++`]
  3121. * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-}[`++get(map, key)++`]
  3122. * {xref-EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-}[`++keys(map)++`]
  3123. * {xref-EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-}[`++set(map, key, value)++`]
  3124. * {xref-EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-}[`++remove(map, key)++`]
  3125. * {xref-EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-}[`++contains(map, key)++`]
  3126. * {xref-EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-}[`++length(map)++`]
  3127. * {xref-EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-}[`++at(map, index)++`]
  3128. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-}[`++tryGet(map, key)++`]
  3129. * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-}[`++get(map, key)++`]
  3130. * {xref-EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-}[`++keys(map)++`]
  3131. * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-}[`++set(map, key, value)++`]
  3132. * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++remove(map, key)++`]
  3133. * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++contains(map, key)++`]
  3134. * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-}[`++length(map)++`]
  3135. * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-}[`++at(map, index)++`]
  3136. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++tryGet(map, key)++`]
  3137. * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++get(map, key)++`]
  3138. * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-}[`++keys(map)++`]
  3139. * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-}[`++set(map, key, value)++`]
  3140. * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++remove(map, key)++`]
  3141. * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++contains(map, key)++`]
  3142. * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-}[`++length(map)++`]
  3143. * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-}[`++at(map, index)++`]
  3144. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++tryGet(map, key)++`]
  3145. * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++get(map, key)++`]
  3146. * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-}[`++keys(map)++`]
  3147. --
  3148. [.contract-index]
  3149. .Errors
  3150. --
  3151. * {xref-EnumerableMap-EnumerableMapNonexistentKey-bytes32-}[`++EnumerableMapNonexistentKey(key)++`]
  3152. --
  3153. [.contract-item]
  3154. [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-]]
  3155. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key, bytes32 value) โ†’ bool++` [.item-kind]#internal#
  3156. Adds a key-value pair to a map, or updates the value for an existing
  3157. key. O(1).
  3158. Returns true if the key was added to the map, that is if it was not
  3159. already present.
  3160. [.contract-item]
  3161. [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  3162. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) โ†’ bool++` [.item-kind]#internal#
  3163. Removes a key-value pair from a map. O(1).
  3164. Returns true if the key was removed from the map, that is if it was present.
  3165. [.contract-item]
  3166. [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  3167. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) โ†’ bool++` [.item-kind]#internal#
  3168. Returns true if the key is in the map. O(1).
  3169. [.contract-item]
  3170. [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-]]
  3171. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToBytes32Map map) โ†’ uint256++` [.item-kind]#internal#
  3172. Returns the number of key-value pairs in the map. O(1).
  3173. [.contract-item]
  3174. [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-]]
  3175. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToBytes32Map map, uint256 index) โ†’ bytes32 key, bytes32 value++` [.item-kind]#internal#
  3176. Returns the key-value pair stored at position `index` in the map. O(1).
  3177. Note that there are no guarantees on the ordering of entries inside the
  3178. array, and it may change when more entries are added or removed.
  3179. Requirements:
  3180. - `index` must be strictly less than {length}.
  3181. [.contract-item]
  3182. [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  3183. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) โ†’ bool exists, bytes32 value++` [.item-kind]#internal#
  3184. Tries to returns the value associated with `key`. O(1).
  3185. Does not revert if `key` is not in the map.
  3186. [.contract-item]
  3187. [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  3188. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) โ†’ bytes32++` [.item-kind]#internal#
  3189. Returns the value associated with `key`. O(1).
  3190. Requirements:
  3191. - `key` must be in the map.
  3192. [.contract-item]
  3193. [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-]]
  3194. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToBytes32Map map) โ†’ bytes32[]++` [.item-kind]#internal#
  3195. Return the an array containing all the keys
  3196. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3197. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3198. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3199. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3200. [.contract-item]
  3201. [[EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-]]
  3202. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToUintMap map, uint256 key, uint256 value) โ†’ bool++` [.item-kind]#internal#
  3203. Adds a key-value pair to a map, or updates the value for an existing
  3204. key. O(1).
  3205. Returns true if the key was added to the map, that is if it was not
  3206. already present.
  3207. [.contract-item]
  3208. [[EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-]]
  3209. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToUintMap map, uint256 key) โ†’ bool++` [.item-kind]#internal#
  3210. Removes a value from a map. O(1).
  3211. Returns true if the key was removed from the map, that is if it was present.
  3212. [.contract-item]
  3213. [[EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-]]
  3214. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToUintMap map, uint256 key) โ†’ bool++` [.item-kind]#internal#
  3215. Returns true if the key is in the map. O(1).
  3216. [.contract-item]
  3217. [[EnumerableMap-length-struct-EnumerableMap-UintToUintMap-]]
  3218. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToUintMap map) โ†’ uint256++` [.item-kind]#internal#
  3219. Returns the number of elements in the map. O(1).
  3220. [.contract-item]
  3221. [[EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-]]
  3222. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToUintMap map, uint256 index) โ†’ uint256 key, uint256 value++` [.item-kind]#internal#
  3223. Returns the element stored at position `index` in the map. O(1).
  3224. Note that there are no guarantees on the ordering of values inside the
  3225. array, and it may change when more values are added or removed.
  3226. Requirements:
  3227. - `index` must be strictly less than {length}.
  3228. [.contract-item]
  3229. [[EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-]]
  3230. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToUintMap map, uint256 key) โ†’ bool exists, uint256 value++` [.item-kind]#internal#
  3231. Tries to returns the value associated with `key`. O(1).
  3232. Does not revert if `key` is not in the map.
  3233. [.contract-item]
  3234. [[EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-]]
  3235. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToUintMap map, uint256 key) โ†’ uint256++` [.item-kind]#internal#
  3236. Returns the value associated with `key`. O(1).
  3237. Requirements:
  3238. - `key` must be in the map.
  3239. [.contract-item]
  3240. [[EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-]]
  3241. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToUintMap map) โ†’ uint256[]++` [.item-kind]#internal#
  3242. Return the an array containing all the keys
  3243. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3244. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3245. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3246. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3247. [.contract-item]
  3248. [[EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-]]
  3249. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToAddressMap map, uint256 key, address value) โ†’ bool++` [.item-kind]#internal#
  3250. Adds a key-value pair to a map, or updates the value for an existing
  3251. key. O(1).
  3252. Returns true if the key was added to the map, that is if it was not
  3253. already present.
  3254. [.contract-item]
  3255. [[EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-]]
  3256. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) โ†’ bool++` [.item-kind]#internal#
  3257. Removes a value from a map. O(1).
  3258. Returns true if the key was removed from the map, that is if it was present.
  3259. [.contract-item]
  3260. [[EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-]]
  3261. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) โ†’ bool++` [.item-kind]#internal#
  3262. Returns true if the key is in the map. O(1).
  3263. [.contract-item]
  3264. [[EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-]]
  3265. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToAddressMap map) โ†’ uint256++` [.item-kind]#internal#
  3266. Returns the number of elements in the map. O(1).
  3267. [.contract-item]
  3268. [[EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-]]
  3269. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToAddressMap map, uint256 index) โ†’ uint256 key, address value++` [.item-kind]#internal#
  3270. Returns the element stored at position `index` in the map. O(1).
  3271. Note that there are no guarantees on the ordering of values inside the
  3272. array, and it may change when more values are added or removed.
  3273. Requirements:
  3274. - `index` must be strictly less than {length}.
  3275. [.contract-item]
  3276. [[EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-]]
  3277. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) โ†’ bool exists, address value++` [.item-kind]#internal#
  3278. Tries to returns the value associated with `key`. O(1).
  3279. Does not revert if `key` is not in the map.
  3280. [.contract-item]
  3281. [[EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-]]
  3282. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) โ†’ address++` [.item-kind]#internal#
  3283. Returns the value associated with `key`. O(1).
  3284. Requirements:
  3285. - `key` must be in the map.
  3286. [.contract-item]
  3287. [[EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-]]
  3288. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToAddressMap map) โ†’ uint256[]++` [.item-kind]#internal#
  3289. Return the an array containing all the keys
  3290. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3291. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3292. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3293. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3294. [.contract-item]
  3295. [[EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-]]
  3296. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key, bytes32 value) โ†’ bool++` [.item-kind]#internal#
  3297. Adds a key-value pair to a map, or updates the value for an existing
  3298. key. O(1).
  3299. Returns true if the key was added to the map, that is if it was not
  3300. already present.
  3301. [.contract-item]
  3302. [[EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-]]
  3303. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) โ†’ bool++` [.item-kind]#internal#
  3304. Removes a value from a map. O(1).
  3305. Returns true if the key was removed from the map, that is if it was present.
  3306. [.contract-item]
  3307. [[EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-]]
  3308. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) โ†’ bool++` [.item-kind]#internal#
  3309. Returns true if the key is in the map. O(1).
  3310. [.contract-item]
  3311. [[EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-]]
  3312. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToBytes32Map map) โ†’ uint256++` [.item-kind]#internal#
  3313. Returns the number of elements in the map. O(1).
  3314. [.contract-item]
  3315. [[EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-]]
  3316. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToBytes32Map map, uint256 index) โ†’ uint256 key, bytes32 value++` [.item-kind]#internal#
  3317. Returns the element stored at position `index` in the map. O(1).
  3318. Note that there are no guarantees on the ordering of values inside the
  3319. array, and it may change when more values are added or removed.
  3320. Requirements:
  3321. - `index` must be strictly less than {length}.
  3322. [.contract-item]
  3323. [[EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-]]
  3324. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) โ†’ bool exists, bytes32 value++` [.item-kind]#internal#
  3325. Tries to returns the value associated with `key`. O(1).
  3326. Does not revert if `key` is not in the map.
  3327. [.contract-item]
  3328. [[EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-]]
  3329. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) โ†’ bytes32++` [.item-kind]#internal#
  3330. Returns the value associated with `key`. O(1).
  3331. Requirements:
  3332. - `key` must be in the map.
  3333. [.contract-item]
  3334. [[EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-]]
  3335. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToBytes32Map map) โ†’ uint256[]++` [.item-kind]#internal#
  3336. Return the an array containing all the keys
  3337. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3338. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3339. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3340. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3341. [.contract-item]
  3342. [[EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-]]
  3343. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.AddressToUintMap map, address key, uint256 value) โ†’ bool++` [.item-kind]#internal#
  3344. Adds a key-value pair to a map, or updates the value for an existing
  3345. key. O(1).
  3346. Returns true if the key was added to the map, that is if it was not
  3347. already present.
  3348. [.contract-item]
  3349. [[EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-]]
  3350. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.AddressToUintMap map, address key) โ†’ bool++` [.item-kind]#internal#
  3351. Removes a value from a map. O(1).
  3352. Returns true if the key was removed from the map, that is if it was present.
  3353. [.contract-item]
  3354. [[EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-]]
  3355. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.AddressToUintMap map, address key) โ†’ bool++` [.item-kind]#internal#
  3356. Returns true if the key is in the map. O(1).
  3357. [.contract-item]
  3358. [[EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-]]
  3359. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.AddressToUintMap map) โ†’ uint256++` [.item-kind]#internal#
  3360. Returns the number of elements in the map. O(1).
  3361. [.contract-item]
  3362. [[EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-]]
  3363. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.AddressToUintMap map, uint256 index) โ†’ address key, uint256 value++` [.item-kind]#internal#
  3364. Returns the element stored at position `index` in the map. O(1).
  3365. Note that there are no guarantees on the ordering of values inside the
  3366. array, and it may change when more values are added or removed.
  3367. Requirements:
  3368. - `index` must be strictly less than {length}.
  3369. [.contract-item]
  3370. [[EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-]]
  3371. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.AddressToUintMap map, address key) โ†’ bool exists, uint256 value++` [.item-kind]#internal#
  3372. Tries to returns the value associated with `key`. O(1).
  3373. Does not revert if `key` is not in the map.
  3374. [.contract-item]
  3375. [[EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-]]
  3376. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToUintMap map, address key) โ†’ uint256++` [.item-kind]#internal#
  3377. Returns the value associated with `key`. O(1).
  3378. Requirements:
  3379. - `key` must be in the map.
  3380. [.contract-item]
  3381. [[EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-]]
  3382. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.AddressToUintMap map) โ†’ address[]++` [.item-kind]#internal#
  3383. Return the an array containing all the keys
  3384. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3385. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3386. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3387. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3388. [.contract-item]
  3389. [[EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-]]
  3390. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.AddressToAddressMap map, address key, address value) โ†’ bool++` [.item-kind]#internal#
  3391. Adds a key-value pair to a map, or updates the value for an existing
  3392. key. O(1).
  3393. Returns true if the key was added to the map, that is if it was not
  3394. already present.
  3395. [.contract-item]
  3396. [[EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-]]
  3397. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.AddressToAddressMap map, address key) โ†’ bool++` [.item-kind]#internal#
  3398. Removes a value from a map. O(1).
  3399. Returns true if the key was removed from the map, that is if it was present.
  3400. [.contract-item]
  3401. [[EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-]]
  3402. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.AddressToAddressMap map, address key) โ†’ bool++` [.item-kind]#internal#
  3403. Returns true if the key is in the map. O(1).
  3404. [.contract-item]
  3405. [[EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-]]
  3406. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.AddressToAddressMap map) โ†’ uint256++` [.item-kind]#internal#
  3407. Returns the number of elements in the map. O(1).
  3408. [.contract-item]
  3409. [[EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-]]
  3410. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.AddressToAddressMap map, uint256 index) โ†’ address key, address value++` [.item-kind]#internal#
  3411. Returns the element stored at position `index` in the map. O(1).
  3412. Note that there are no guarantees on the ordering of values inside the
  3413. array, and it may change when more values are added or removed.
  3414. Requirements:
  3415. - `index` must be strictly less than {length}.
  3416. [.contract-item]
  3417. [[EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-]]
  3418. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.AddressToAddressMap map, address key) โ†’ bool exists, address value++` [.item-kind]#internal#
  3419. Tries to returns the value associated with `key`. O(1).
  3420. Does not revert if `key` is not in the map.
  3421. [.contract-item]
  3422. [[EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-]]
  3423. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToAddressMap map, address key) โ†’ address++` [.item-kind]#internal#
  3424. Returns the value associated with `key`. O(1).
  3425. Requirements:
  3426. - `key` must be in the map.
  3427. [.contract-item]
  3428. [[EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-]]
  3429. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.AddressToAddressMap map) โ†’ address[]++` [.item-kind]#internal#
  3430. Return the an array containing all the keys
  3431. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3432. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3433. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3434. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3435. [.contract-item]
  3436. [[EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-]]
  3437. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.AddressToBytes32Map map, address key, bytes32 value) โ†’ bool++` [.item-kind]#internal#
  3438. Adds a key-value pair to a map, or updates the value for an existing
  3439. key. O(1).
  3440. Returns true if the key was added to the map, that is if it was not
  3441. already present.
  3442. [.contract-item]
  3443. [[EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-]]
  3444. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.AddressToBytes32Map map, address key) โ†’ bool++` [.item-kind]#internal#
  3445. Removes a value from a map. O(1).
  3446. Returns true if the key was removed from the map, that is if it was present.
  3447. [.contract-item]
  3448. [[EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-]]
  3449. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.AddressToBytes32Map map, address key) โ†’ bool++` [.item-kind]#internal#
  3450. Returns true if the key is in the map. O(1).
  3451. [.contract-item]
  3452. [[EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-]]
  3453. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.AddressToBytes32Map map) โ†’ uint256++` [.item-kind]#internal#
  3454. Returns the number of elements in the map. O(1).
  3455. [.contract-item]
  3456. [[EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-]]
  3457. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.AddressToBytes32Map map, uint256 index) โ†’ address key, bytes32 value++` [.item-kind]#internal#
  3458. Returns the element stored at position `index` in the map. O(1).
  3459. Note that there are no guarantees on the ordering of values inside the
  3460. array, and it may change when more values are added or removed.
  3461. Requirements:
  3462. - `index` must be strictly less than {length}.
  3463. [.contract-item]
  3464. [[EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-]]
  3465. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.AddressToBytes32Map map, address key) โ†’ bool exists, bytes32 value++` [.item-kind]#internal#
  3466. Tries to returns the value associated with `key`. O(1).
  3467. Does not revert if `key` is not in the map.
  3468. [.contract-item]
  3469. [[EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-]]
  3470. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToBytes32Map map, address key) โ†’ bytes32++` [.item-kind]#internal#
  3471. Returns the value associated with `key`. O(1).
  3472. Requirements:
  3473. - `key` must be in the map.
  3474. [.contract-item]
  3475. [[EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-]]
  3476. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.AddressToBytes32Map map) โ†’ address[]++` [.item-kind]#internal#
  3477. Return the an array containing all the keys
  3478. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3479. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3480. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3481. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3482. [.contract-item]
  3483. [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-]]
  3484. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key, uint256 value) โ†’ bool++` [.item-kind]#internal#
  3485. Adds a key-value pair to a map, or updates the value for an existing
  3486. key. O(1).
  3487. Returns true if the key was added to the map, that is if it was not
  3488. already present.
  3489. [.contract-item]
  3490. [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  3491. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) โ†’ bool++` [.item-kind]#internal#
  3492. Removes a value from a map. O(1).
  3493. Returns true if the key was removed from the map, that is if it was present.
  3494. [.contract-item]
  3495. [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  3496. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) โ†’ bool++` [.item-kind]#internal#
  3497. Returns true if the key is in the map. O(1).
  3498. [.contract-item]
  3499. [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-]]
  3500. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToUintMap map) โ†’ uint256++` [.item-kind]#internal#
  3501. Returns the number of elements in the map. O(1).
  3502. [.contract-item]
  3503. [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-]]
  3504. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToUintMap map, uint256 index) โ†’ bytes32 key, uint256 value++` [.item-kind]#internal#
  3505. Returns the element stored at position `index` in the map. O(1).
  3506. Note that there are no guarantees on the ordering of values inside the
  3507. array, and it may change when more values are added or removed.
  3508. Requirements:
  3509. - `index` must be strictly less than {length}.
  3510. [.contract-item]
  3511. [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  3512. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) โ†’ bool exists, uint256 value++` [.item-kind]#internal#
  3513. Tries to returns the value associated with `key`. O(1).
  3514. Does not revert if `key` is not in the map.
  3515. [.contract-item]
  3516. [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  3517. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) โ†’ uint256++` [.item-kind]#internal#
  3518. Returns the value associated with `key`. O(1).
  3519. Requirements:
  3520. - `key` must be in the map.
  3521. [.contract-item]
  3522. [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-]]
  3523. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToUintMap map) โ†’ bytes32[]++` [.item-kind]#internal#
  3524. Return the an array containing all the keys
  3525. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3526. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3527. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3528. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3529. [.contract-item]
  3530. [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-]]
  3531. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key, address value) โ†’ bool++` [.item-kind]#internal#
  3532. Adds a key-value pair to a map, or updates the value for an existing
  3533. key. O(1).
  3534. Returns true if the key was added to the map, that is if it was not
  3535. already present.
  3536. [.contract-item]
  3537. [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
  3538. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) โ†’ bool++` [.item-kind]#internal#
  3539. Removes a value from a map. O(1).
  3540. Returns true if the key was removed from the map, that is if it was present.
  3541. [.contract-item]
  3542. [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
  3543. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) โ†’ bool++` [.item-kind]#internal#
  3544. Returns true if the key is in the map. O(1).
  3545. [.contract-item]
  3546. [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-]]
  3547. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToAddressMap map) โ†’ uint256++` [.item-kind]#internal#
  3548. Returns the number of elements in the map. O(1).
  3549. [.contract-item]
  3550. [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-]]
  3551. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToAddressMap map, uint256 index) โ†’ bytes32 key, address value++` [.item-kind]#internal#
  3552. Returns the element stored at position `index` in the map. O(1).
  3553. Note that there are no guarantees on the ordering of values inside the
  3554. array, and it may change when more values are added or removed.
  3555. Requirements:
  3556. - `index` must be strictly less than {length}.
  3557. [.contract-item]
  3558. [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
  3559. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) โ†’ bool exists, address value++` [.item-kind]#internal#
  3560. Tries to returns the value associated with `key`. O(1).
  3561. Does not revert if `key` is not in the map.
  3562. [.contract-item]
  3563. [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
  3564. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) โ†’ address++` [.item-kind]#internal#
  3565. Returns the value associated with `key`. O(1).
  3566. Requirements:
  3567. - `key` must be in the map.
  3568. [.contract-item]
  3569. [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-]]
  3570. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToAddressMap map) โ†’ bytes32[]++` [.item-kind]#internal#
  3571. Return the an array containing all the keys
  3572. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3573. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3574. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3575. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3576. [.contract-item]
  3577. [[EnumerableMap-EnumerableMapNonexistentKey-bytes32-]]
  3578. ==== `[.contract-item-name]#++EnumerableMapNonexistentKey++#++(bytes32 key)++` [.item-kind]#error#
  3579. Query for a nonexistent map key.
  3580. :Set: pass:normal[xref:#EnumerableSet-Set[`++Set++`]]
  3581. :Bytes32Set: pass:normal[xref:#EnumerableSet-Bytes32Set[`++Bytes32Set++`]]
  3582. :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-[`++add++`]]
  3583. :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-[`++remove++`]]
  3584. :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-[`++contains++`]]
  3585. :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-Bytes32Set-[`++length++`]]
  3586. :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-[`++at++`]]
  3587. :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-Bytes32Set-[`++values++`]]
  3588. :AddressSet: pass:normal[xref:#EnumerableSet-AddressSet[`++AddressSet++`]]
  3589. :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-AddressSet-address-[`++add++`]]
  3590. :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-[`++remove++`]]
  3591. :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-[`++contains++`]]
  3592. :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-AddressSet-[`++length++`]]
  3593. :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-[`++at++`]]
  3594. :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-AddressSet-[`++values++`]]
  3595. :UintSet: pass:normal[xref:#EnumerableSet-UintSet[`++UintSet++`]]
  3596. :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-[`++add++`]]
  3597. :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-[`++remove++`]]
  3598. :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-[`++contains++`]]
  3599. :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-UintSet-[`++length++`]]
  3600. :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-[`++at++`]]
  3601. :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-UintSet-[`++values++`]]
  3602. [.contract]
  3603. [[EnumerableSet]]
  3604. === `++EnumerableSet++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/structs/EnumerableSet.sol[{github-icon},role=heading-link]
  3605. [.hljs-theme-light.nopadding]
  3606. ```solidity
  3607. import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
  3608. ```
  3609. Library for managing
  3610. https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
  3611. types.
  3612. Sets have the following properties:
  3613. - Elements are added, removed, and checked for existence in constant time
  3614. (O(1)).
  3615. - Elements are enumerated in O(n). No guarantees are made on the ordering.
  3616. ```solidity
  3617. contract Example {
  3618. // Add the library methods
  3619. using EnumerableSet for EnumerableSet.AddressSet;
  3620. // Declare a set state variable
  3621. EnumerableSet.AddressSet private mySet;
  3622. }
  3623. ```
  3624. As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
  3625. and `uint256` (`UintSet`) are supported.
  3626. [WARNING]
  3627. ====
  3628. Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
  3629. unusable.
  3630. See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
  3631. In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
  3632. array of EnumerableSet.
  3633. ====
  3634. [.contract-index]
  3635. .Functions
  3636. --
  3637. * {xref-EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-}[`++add(set, value)++`]
  3638. * {xref-EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-}[`++remove(set, value)++`]
  3639. * {xref-EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-}[`++contains(set, value)++`]
  3640. * {xref-EnumerableSet-length-struct-EnumerableSet-Bytes32Set-}[`++length(set)++`]
  3641. * {xref-EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-}[`++at(set, index)++`]
  3642. * {xref-EnumerableSet-values-struct-EnumerableSet-Bytes32Set-}[`++values(set)++`]
  3643. * {xref-EnumerableSet-add-struct-EnumerableSet-AddressSet-address-}[`++add(set, value)++`]
  3644. * {xref-EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-}[`++remove(set, value)++`]
  3645. * {xref-EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-}[`++contains(set, value)++`]
  3646. * {xref-EnumerableSet-length-struct-EnumerableSet-AddressSet-}[`++length(set)++`]
  3647. * {xref-EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-}[`++at(set, index)++`]
  3648. * {xref-EnumerableSet-values-struct-EnumerableSet-AddressSet-}[`++values(set)++`]
  3649. * {xref-EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-}[`++add(set, value)++`]
  3650. * {xref-EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-}[`++remove(set, value)++`]
  3651. * {xref-EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-}[`++contains(set, value)++`]
  3652. * {xref-EnumerableSet-length-struct-EnumerableSet-UintSet-}[`++length(set)++`]
  3653. * {xref-EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-}[`++at(set, index)++`]
  3654. * {xref-EnumerableSet-values-struct-EnumerableSet-UintSet-}[`++values(set)++`]
  3655. --
  3656. [.contract-item]
  3657. [[EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-]]
  3658. ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) โ†’ bool++` [.item-kind]#internal#
  3659. Add a value to a set. O(1).
  3660. Returns true if the value was added to the set, that is if it was not
  3661. already present.
  3662. [.contract-item]
  3663. [[EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-]]
  3664. ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) โ†’ bool++` [.item-kind]#internal#
  3665. Removes a value from a set. O(1).
  3666. Returns true if the value was removed from the set, that is if it was
  3667. present.
  3668. [.contract-item]
  3669. [[EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-]]
  3670. ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) โ†’ bool++` [.item-kind]#internal#
  3671. Returns true if the value is in the set. O(1).
  3672. [.contract-item]
  3673. [[EnumerableSet-length-struct-EnumerableSet-Bytes32Set-]]
  3674. ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.Bytes32Set set) โ†’ uint256++` [.item-kind]#internal#
  3675. Returns the number of values in the set. O(1).
  3676. [.contract-item]
  3677. [[EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-]]
  3678. ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.Bytes32Set set, uint256 index) โ†’ bytes32++` [.item-kind]#internal#
  3679. Returns the value stored at position `index` in the set. O(1).
  3680. Note that there are no guarantees on the ordering of values inside the
  3681. array, and it may change when more values are added or removed.
  3682. Requirements:
  3683. - `index` must be strictly less than {length}.
  3684. [.contract-item]
  3685. [[EnumerableSet-values-struct-EnumerableSet-Bytes32Set-]]
  3686. ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.Bytes32Set set) โ†’ bytes32[]++` [.item-kind]#internal#
  3687. Return the entire set in an array
  3688. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3689. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3690. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3691. uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
  3692. [.contract-item]
  3693. [[EnumerableSet-add-struct-EnumerableSet-AddressSet-address-]]
  3694. ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.AddressSet set, address value) โ†’ bool++` [.item-kind]#internal#
  3695. Add a value to a set. O(1).
  3696. Returns true if the value was added to the set, that is if it was not
  3697. already present.
  3698. [.contract-item]
  3699. [[EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-]]
  3700. ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.AddressSet set, address value) โ†’ bool++` [.item-kind]#internal#
  3701. Removes a value from a set. O(1).
  3702. Returns true if the value was removed from the set, that is if it was
  3703. present.
  3704. [.contract-item]
  3705. [[EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-]]
  3706. ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.AddressSet set, address value) โ†’ bool++` [.item-kind]#internal#
  3707. Returns true if the value is in the set. O(1).
  3708. [.contract-item]
  3709. [[EnumerableSet-length-struct-EnumerableSet-AddressSet-]]
  3710. ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.AddressSet set) โ†’ uint256++` [.item-kind]#internal#
  3711. Returns the number of values in the set. O(1).
  3712. [.contract-item]
  3713. [[EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-]]
  3714. ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.AddressSet set, uint256 index) โ†’ address++` [.item-kind]#internal#
  3715. Returns the value stored at position `index` in the set. O(1).
  3716. Note that there are no guarantees on the ordering of values inside the
  3717. array, and it may change when more values are added or removed.
  3718. Requirements:
  3719. - `index` must be strictly less than {length}.
  3720. [.contract-item]
  3721. [[EnumerableSet-values-struct-EnumerableSet-AddressSet-]]
  3722. ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.AddressSet set) โ†’ address[]++` [.item-kind]#internal#
  3723. Return the entire set in an array
  3724. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3725. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3726. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3727. uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
  3728. [.contract-item]
  3729. [[EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-]]
  3730. ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.UintSet set, uint256 value) โ†’ bool++` [.item-kind]#internal#
  3731. Add a value to a set. O(1).
  3732. Returns true if the value was added to the set, that is if it was not
  3733. already present.
  3734. [.contract-item]
  3735. [[EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-]]
  3736. ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.UintSet set, uint256 value) โ†’ bool++` [.item-kind]#internal#
  3737. Removes a value from a set. O(1).
  3738. Returns true if the value was removed from the set, that is if it was
  3739. present.
  3740. [.contract-item]
  3741. [[EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-]]
  3742. ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.UintSet set, uint256 value) โ†’ bool++` [.item-kind]#internal#
  3743. Returns true if the value is in the set. O(1).
  3744. [.contract-item]
  3745. [[EnumerableSet-length-struct-EnumerableSet-UintSet-]]
  3746. ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.UintSet set) โ†’ uint256++` [.item-kind]#internal#
  3747. Returns the number of values in the set. O(1).
  3748. [.contract-item]
  3749. [[EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-]]
  3750. ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.UintSet set, uint256 index) โ†’ uint256++` [.item-kind]#internal#
  3751. Returns the value stored at position `index` in the set. O(1).
  3752. Note that there are no guarantees on the ordering of values inside the
  3753. array, and it may change when more values are added or removed.
  3754. Requirements:
  3755. - `index` must be strictly less than {length}.
  3756. [.contract-item]
  3757. [[EnumerableSet-values-struct-EnumerableSet-UintSet-]]
  3758. ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.UintSet set) โ†’ uint256[]++` [.item-kind]#internal#
  3759. Return the entire set in an array
  3760. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3761. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3762. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3763. uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
  3764. :Bytes32Deque: pass:normal[xref:#DoubleEndedQueue-Bytes32Deque[`++Bytes32Deque++`]]
  3765. :pushBack: pass:normal[xref:#DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-[`++pushBack++`]]
  3766. :popBack: pass:normal[xref:#DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-[`++popBack++`]]
  3767. :pushFront: pass:normal[xref:#DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-[`++pushFront++`]]
  3768. :popFront: pass:normal[xref:#DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-[`++popFront++`]]
  3769. :front: pass:normal[xref:#DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-[`++front++`]]
  3770. :back: pass:normal[xref:#DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-[`++back++`]]
  3771. :at: pass:normal[xref:#DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-[`++at++`]]
  3772. :clear: pass:normal[xref:#DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-[`++clear++`]]
  3773. :length: pass:normal[xref:#DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-[`++length++`]]
  3774. :empty: pass:normal[xref:#DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-[`++empty++`]]
  3775. [.contract]
  3776. [[DoubleEndedQueue]]
  3777. === `++DoubleEndedQueue++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/structs/DoubleEndedQueue.sol[{github-icon},role=heading-link]
  3778. [.hljs-theme-light.nopadding]
  3779. ```solidity
  3780. import "@openzeppelin/contracts/utils/structs/DoubleEndedQueue.sol";
  3781. ```
  3782. A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of
  3783. the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and
  3784. FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that
  3785. the existing queue contents are left in storage.
  3786. The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be
  3787. used in storage, and not in memory.
  3788. ```solidity
  3789. DoubleEndedQueue.Bytes32Deque queue;
  3790. ```
  3791. [.contract-index]
  3792. .Functions
  3793. --
  3794. * {xref-DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-}[`++pushBack(deque, value)++`]
  3795. * {xref-DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-}[`++popBack(deque)++`]
  3796. * {xref-DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-}[`++pushFront(deque, value)++`]
  3797. * {xref-DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-}[`++popFront(deque)++`]
  3798. * {xref-DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-}[`++front(deque)++`]
  3799. * {xref-DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-}[`++back(deque)++`]
  3800. * {xref-DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-}[`++at(deque, index)++`]
  3801. * {xref-DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-}[`++clear(deque)++`]
  3802. * {xref-DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-}[`++length(deque)++`]
  3803. * {xref-DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-}[`++empty(deque)++`]
  3804. --
  3805. [.contract-item]
  3806. [[DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-]]
  3807. ==== `[.contract-item-name]#++pushBack++#++(struct DoubleEndedQueue.Bytes32Deque deque, bytes32 value)++` [.item-kind]#internal#
  3808. Inserts an item at the end of the queue.
  3809. Reverts with {Panic-RESOURCE_ERROR} if the queue is full.
  3810. [.contract-item]
  3811. [[DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-]]
  3812. ==== `[.contract-item-name]#++popBack++#++(struct DoubleEndedQueue.Bytes32Deque deque) โ†’ bytes32 value++` [.item-kind]#internal#
  3813. Removes the item at the end of the queue and returns it.
  3814. Reverts with {Panic-EMPTY_ARRAY_POP} if the queue is empty.
  3815. [.contract-item]
  3816. [[DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-]]
  3817. ==== `[.contract-item-name]#++pushFront++#++(struct DoubleEndedQueue.Bytes32Deque deque, bytes32 value)++` [.item-kind]#internal#
  3818. Inserts an item at the beginning of the queue.
  3819. Reverts with {Panic-RESOURCE_ERROR} if the queue is full.
  3820. [.contract-item]
  3821. [[DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-]]
  3822. ==== `[.contract-item-name]#++popFront++#++(struct DoubleEndedQueue.Bytes32Deque deque) โ†’ bytes32 value++` [.item-kind]#internal#
  3823. Removes the item at the beginning of the queue and returns it.
  3824. Reverts with {Panic-EMPTY_ARRAY_POP} if the queue is empty.
  3825. [.contract-item]
  3826. [[DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-]]
  3827. ==== `[.contract-item-name]#++front++#++(struct DoubleEndedQueue.Bytes32Deque deque) โ†’ bytes32 value++` [.item-kind]#internal#
  3828. Returns the item at the beginning of the queue.
  3829. Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the queue is empty.
  3830. [.contract-item]
  3831. [[DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-]]
  3832. ==== `[.contract-item-name]#++back++#++(struct DoubleEndedQueue.Bytes32Deque deque) โ†’ bytes32 value++` [.item-kind]#internal#
  3833. Returns the item at the end of the queue.
  3834. Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the queue is empty.
  3835. [.contract-item]
  3836. [[DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-]]
  3837. ==== `[.contract-item-name]#++at++#++(struct DoubleEndedQueue.Bytes32Deque deque, uint256 index) โ†’ bytes32 value++` [.item-kind]#internal#
  3838. Return the item at a position in the queue given by `index`, with the first item at 0 and last item at
  3839. `length(deque) - 1`.
  3840. Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the index is out of bounds.
  3841. [.contract-item]
  3842. [[DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-]]
  3843. ==== `[.contract-item-name]#++clear++#++(struct DoubleEndedQueue.Bytes32Deque deque)++` [.item-kind]#internal#
  3844. Resets the queue back to being empty.
  3845. NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses
  3846. out on potential gas refunds.
  3847. [.contract-item]
  3848. [[DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-]]
  3849. ==== `[.contract-item-name]#++length++#++(struct DoubleEndedQueue.Bytes32Deque deque) โ†’ uint256++` [.item-kind]#internal#
  3850. Returns the number of items in the queue.
  3851. [.contract-item]
  3852. [[DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-]]
  3853. ==== `[.contract-item-name]#++empty++#++(struct DoubleEndedQueue.Bytes32Deque deque) โ†’ bool++` [.item-kind]#internal#
  3854. Returns true if the queue is empty.
  3855. :InvalidBufferSize: pass:normal[xref:#CircularBuffer-InvalidBufferSize--[`++InvalidBufferSize++`]]
  3856. :Bytes32CircularBuffer: pass:normal[xref:#CircularBuffer-Bytes32CircularBuffer[`++Bytes32CircularBuffer++`]]
  3857. :setup: pass:normal[xref:#CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-[`++setup++`]]
  3858. :clear: pass:normal[xref:#CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-[`++clear++`]]
  3859. :push: pass:normal[xref:#CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-[`++push++`]]
  3860. :count: pass:normal[xref:#CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-[`++count++`]]
  3861. :length: pass:normal[xref:#CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-[`++length++`]]
  3862. :last: pass:normal[xref:#CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-[`++last++`]]
  3863. :includes: pass:normal[xref:#CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-[`++includes++`]]
  3864. [.contract]
  3865. [[CircularBuffer]]
  3866. === `++CircularBuffer++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/structs/CircularBuffer.sol[{github-icon},role=heading-link]
  3867. [.hljs-theme-light.nopadding]
  3868. ```solidity
  3869. import "@openzeppelin/contracts/utils/structs/CircularBuffer.sol";
  3870. ```
  3871. A fixed-size buffer for keeping `bytes32` items in storage.
  3872. This data structure allows for pushing elements to it, and when its length exceeds the specified fixed size,
  3873. new items take the place of the oldest element in the buffer, keeping at most `N` elements in the
  3874. structure.
  3875. Elements can't be removed but the data structure can be cleared. See {clear}.
  3876. Complexity:
  3877. - insertion ({push}): O(1)
  3878. - lookup ({last}): O(1)
  3879. - inclusion ({includes}): O(N) (worst case)
  3880. - reset ({clear}): O(1)
  3881. * The struct is called `Bytes32CircularBuffer`. Other types can be cast to and from `bytes32`. This data structure
  3882. can only be used in storage, and not in memory.
  3883. Example usage:
  3884. ```solidity
  3885. contract Example {
  3886. // Add the library methods
  3887. using CircularBuffer for CircularBuffer.Bytes32CircularBuffer;
  3888. // Declare a buffer storage variable
  3889. CircularBuffer.Bytes32CircularBuffer private myBuffer;
  3890. }
  3891. ```
  3892. _Available since v5.1._
  3893. [.contract-index]
  3894. .Functions
  3895. --
  3896. * {xref-CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-}[`++setup(self, size)++`]
  3897. * {xref-CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-}[`++clear(self)++`]
  3898. * {xref-CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-}[`++push(self, value)++`]
  3899. * {xref-CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-}[`++count(self)++`]
  3900. * {xref-CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-}[`++length(self)++`]
  3901. * {xref-CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-}[`++last(self, i)++`]
  3902. * {xref-CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-}[`++includes(self, value)++`]
  3903. --
  3904. [.contract-index]
  3905. .Errors
  3906. --
  3907. * {xref-CircularBuffer-InvalidBufferSize--}[`++InvalidBufferSize()++`]
  3908. --
  3909. [.contract-item]
  3910. [[CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-]]
  3911. ==== `[.contract-item-name]#++setup++#++(struct CircularBuffer.Bytes32CircularBuffer self, uint256 size)++` [.item-kind]#internal#
  3912. Initialize a new CircularBuffer of given size.
  3913. If the CircularBuffer was already setup and used, calling that function again will reset it to a blank state.
  3914. NOTE: The size of the buffer will affect the execution of {includes} function, as it has a complexity of O(N).
  3915. Consider a large buffer size may render the function unusable.
  3916. [.contract-item]
  3917. [[CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-]]
  3918. ==== `[.contract-item-name]#++clear++#++(struct CircularBuffer.Bytes32CircularBuffer self)++` [.item-kind]#internal#
  3919. Clear all data in the buffer without resetting memory, keeping the existing size.
  3920. [.contract-item]
  3921. [[CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-]]
  3922. ==== `[.contract-item-name]#++push++#++(struct CircularBuffer.Bytes32CircularBuffer self, bytes32 value)++` [.item-kind]#internal#
  3923. Push a new value to the buffer. If the buffer is already full, the new value replaces the oldest value in
  3924. the buffer.
  3925. [.contract-item]
  3926. [[CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-]]
  3927. ==== `[.contract-item-name]#++count++#++(struct CircularBuffer.Bytes32CircularBuffer self) โ†’ uint256++` [.item-kind]#internal#
  3928. Number of values currently in the buffer. This value is 0 for an empty buffer, and cannot exceed the size of
  3929. the buffer.
  3930. [.contract-item]
  3931. [[CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-]]
  3932. ==== `[.contract-item-name]#++length++#++(struct CircularBuffer.Bytes32CircularBuffer self) โ†’ uint256++` [.item-kind]#internal#
  3933. Length of the buffer. This is the maximum number of elements kept in the buffer.
  3934. [.contract-item]
  3935. [[CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-]]
  3936. ==== `[.contract-item-name]#++last++#++(struct CircularBuffer.Bytes32CircularBuffer self, uint256 i) โ†’ bytes32++` [.item-kind]#internal#
  3937. Getter for the i-th value in the buffer, from the end.
  3938. Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if trying to access an element that was not pushed, or that was
  3939. dropped to make room for newer elements.
  3940. [.contract-item]
  3941. [[CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-]]
  3942. ==== `[.contract-item-name]#++includes++#++(struct CircularBuffer.Bytes32CircularBuffer self, bytes32 value) โ†’ bool++` [.item-kind]#internal#
  3943. Check if a given value is in the buffer.
  3944. [.contract-item]
  3945. [[CircularBuffer-InvalidBufferSize--]]
  3946. ==== `[.contract-item-name]#++InvalidBufferSize++#++()++` [.item-kind]#error#
  3947. Error emitted when trying to setup a buffer with a size of 0.
  3948. :CheckpointUnorderedInsertion: pass:normal[xref:#Checkpoints-CheckpointUnorderedInsertion--[`++CheckpointUnorderedInsertion++`]]
  3949. :Trace224: pass:normal[xref:#Checkpoints-Trace224[`++Trace224++`]]
  3950. :Checkpoint224: pass:normal[xref:#Checkpoints-Checkpoint224[`++Checkpoint224++`]]
  3951. :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-[`++push++`]]
  3952. :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-[`++lowerLookup++`]]
  3953. :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-[`++upperLookup++`]]
  3954. :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-[`++upperLookupRecent++`]]
  3955. :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace224-[`++latest++`]]
  3956. :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-[`++latestCheckpoint++`]]
  3957. :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace224-[`++length++`]]
  3958. :at: pass:normal[xref:#Checkpoints-at-struct-Checkpoints-Trace224-uint32-[`++at++`]]
  3959. :Trace208: pass:normal[xref:#Checkpoints-Trace208[`++Trace208++`]]
  3960. :Checkpoint208: pass:normal[xref:#Checkpoints-Checkpoint208[`++Checkpoint208++`]]
  3961. :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-[`++push++`]]
  3962. :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-[`++lowerLookup++`]]
  3963. :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-[`++upperLookup++`]]
  3964. :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-[`++upperLookupRecent++`]]
  3965. :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace208-[`++latest++`]]
  3966. :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-[`++latestCheckpoint++`]]
  3967. :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace208-[`++length++`]]
  3968. :at: pass:normal[xref:#Checkpoints-at-struct-Checkpoints-Trace208-uint32-[`++at++`]]
  3969. :Trace160: pass:normal[xref:#Checkpoints-Trace160[`++Trace160++`]]
  3970. :Checkpoint160: pass:normal[xref:#Checkpoints-Checkpoint160[`++Checkpoint160++`]]
  3971. :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-[`++push++`]]
  3972. :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-[`++lowerLookup++`]]
  3973. :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-[`++upperLookup++`]]
  3974. :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-[`++upperLookupRecent++`]]
  3975. :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace160-[`++latest++`]]
  3976. :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-[`++latestCheckpoint++`]]
  3977. :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace160-[`++length++`]]
  3978. :at: pass:normal[xref:#Checkpoints-at-struct-Checkpoints-Trace160-uint32-[`++at++`]]
  3979. [.contract]
  3980. [[Checkpoints]]
  3981. === `++Checkpoints++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/structs/Checkpoints.sol[{github-icon},role=heading-link]
  3982. [.hljs-theme-light.nopadding]
  3983. ```solidity
  3984. import "@openzeppelin/contracts/utils/structs/Checkpoints.sol";
  3985. ```
  3986. This library defines the `Trace*` struct, for checkpointing values as they change at different points in
  3987. time, and later looking up past values by block number. See {Votes} as an example.
  3988. To create a history of checkpoints define a variable type `Checkpoints.Trace*` in your contract, and store a new
  3989. checkpoint for the current transaction block using the {push} function.
  3990. [.contract-index]
  3991. .Functions
  3992. --
  3993. * {xref-Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-}[`++push(self, key, value)++`]
  3994. * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-}[`++lowerLookup(self, key)++`]
  3995. * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-}[`++upperLookup(self, key)++`]
  3996. * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-}[`++upperLookupRecent(self, key)++`]
  3997. * {xref-Checkpoints-latest-struct-Checkpoints-Trace224-}[`++latest(self)++`]
  3998. * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-}[`++latestCheckpoint(self)++`]
  3999. * {xref-Checkpoints-length-struct-Checkpoints-Trace224-}[`++length(self)++`]
  4000. * {xref-Checkpoints-at-struct-Checkpoints-Trace224-uint32-}[`++at(self, pos)++`]
  4001. * {xref-Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-}[`++push(self, key, value)++`]
  4002. * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-}[`++lowerLookup(self, key)++`]
  4003. * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-}[`++upperLookup(self, key)++`]
  4004. * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-}[`++upperLookupRecent(self, key)++`]
  4005. * {xref-Checkpoints-latest-struct-Checkpoints-Trace208-}[`++latest(self)++`]
  4006. * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-}[`++latestCheckpoint(self)++`]
  4007. * {xref-Checkpoints-length-struct-Checkpoints-Trace208-}[`++length(self)++`]
  4008. * {xref-Checkpoints-at-struct-Checkpoints-Trace208-uint32-}[`++at(self, pos)++`]
  4009. * {xref-Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-}[`++push(self, key, value)++`]
  4010. * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-}[`++lowerLookup(self, key)++`]
  4011. * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-}[`++upperLookup(self, key)++`]
  4012. * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-}[`++upperLookupRecent(self, key)++`]
  4013. * {xref-Checkpoints-latest-struct-Checkpoints-Trace160-}[`++latest(self)++`]
  4014. * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-}[`++latestCheckpoint(self)++`]
  4015. * {xref-Checkpoints-length-struct-Checkpoints-Trace160-}[`++length(self)++`]
  4016. * {xref-Checkpoints-at-struct-Checkpoints-Trace160-uint32-}[`++at(self, pos)++`]
  4017. --
  4018. [.contract-index]
  4019. .Errors
  4020. --
  4021. * {xref-Checkpoints-CheckpointUnorderedInsertion--}[`++CheckpointUnorderedInsertion()++`]
  4022. --
  4023. [.contract-item]
  4024. [[Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-]]
  4025. ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace224 self, uint32 key, uint224 value) โ†’ uint224 oldValue, uint224 newValue++` [.item-kind]#internal#
  4026. Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint.
  4027. Returns previous value and new value.
  4028. IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint32).max` key set will disable the
  4029. library.
  4030. [.contract-item]
  4031. [[Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-]]
  4032. ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace224 self, uint32 key) โ†’ uint224++` [.item-kind]#internal#
  4033. Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
  4034. there is none.
  4035. [.contract-item]
  4036. [[Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-]]
  4037. ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace224 self, uint32 key) โ†’ uint224++` [.item-kind]#internal#
  4038. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  4039. if there is none.
  4040. [.contract-item]
  4041. [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-]]
  4042. ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace224 self, uint32 key) โ†’ uint224++` [.item-kind]#internal#
  4043. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  4044. if there is none.
  4045. NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high
  4046. keys).
  4047. [.contract-item]
  4048. [[Checkpoints-latest-struct-Checkpoints-Trace224-]]
  4049. ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace224 self) โ†’ uint224++` [.item-kind]#internal#
  4050. Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
  4051. [.contract-item]
  4052. [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-]]
  4053. ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace224 self) โ†’ bool exists, uint32 _key, uint224 _value++` [.item-kind]#internal#
  4054. Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
  4055. in the most recent checkpoint.
  4056. [.contract-item]
  4057. [[Checkpoints-length-struct-Checkpoints-Trace224-]]
  4058. ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace224 self) โ†’ uint256++` [.item-kind]#internal#
  4059. Returns the number of checkpoint.
  4060. [.contract-item]
  4061. [[Checkpoints-at-struct-Checkpoints-Trace224-uint32-]]
  4062. ==== `[.contract-item-name]#++at++#++(struct Checkpoints.Trace224 self, uint32 pos) โ†’ struct Checkpoints.Checkpoint224++` [.item-kind]#internal#
  4063. Returns checkpoint at given position.
  4064. [.contract-item]
  4065. [[Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-]]
  4066. ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace208 self, uint48 key, uint208 value) โ†’ uint208 oldValue, uint208 newValue++` [.item-kind]#internal#
  4067. Pushes a (`key`, `value`) pair into a Trace208 so that it is stored as the checkpoint.
  4068. Returns previous value and new value.
  4069. IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint48).max` key set will disable the
  4070. library.
  4071. [.contract-item]
  4072. [[Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-]]
  4073. ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace208 self, uint48 key) โ†’ uint208++` [.item-kind]#internal#
  4074. Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
  4075. there is none.
  4076. [.contract-item]
  4077. [[Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-]]
  4078. ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace208 self, uint48 key) โ†’ uint208++` [.item-kind]#internal#
  4079. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  4080. if there is none.
  4081. [.contract-item]
  4082. [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-]]
  4083. ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace208 self, uint48 key) โ†’ uint208++` [.item-kind]#internal#
  4084. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  4085. if there is none.
  4086. NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high
  4087. keys).
  4088. [.contract-item]
  4089. [[Checkpoints-latest-struct-Checkpoints-Trace208-]]
  4090. ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace208 self) โ†’ uint208++` [.item-kind]#internal#
  4091. Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
  4092. [.contract-item]
  4093. [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-]]
  4094. ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace208 self) โ†’ bool exists, uint48 _key, uint208 _value++` [.item-kind]#internal#
  4095. Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
  4096. in the most recent checkpoint.
  4097. [.contract-item]
  4098. [[Checkpoints-length-struct-Checkpoints-Trace208-]]
  4099. ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace208 self) โ†’ uint256++` [.item-kind]#internal#
  4100. Returns the number of checkpoint.
  4101. [.contract-item]
  4102. [[Checkpoints-at-struct-Checkpoints-Trace208-uint32-]]
  4103. ==== `[.contract-item-name]#++at++#++(struct Checkpoints.Trace208 self, uint32 pos) โ†’ struct Checkpoints.Checkpoint208++` [.item-kind]#internal#
  4104. Returns checkpoint at given position.
  4105. [.contract-item]
  4106. [[Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-]]
  4107. ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace160 self, uint96 key, uint160 value) โ†’ uint160 oldValue, uint160 newValue++` [.item-kind]#internal#
  4108. Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint.
  4109. Returns previous value and new value.
  4110. IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint96).max` key set will disable the
  4111. library.
  4112. [.contract-item]
  4113. [[Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-]]
  4114. ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace160 self, uint96 key) โ†’ uint160++` [.item-kind]#internal#
  4115. Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
  4116. there is none.
  4117. [.contract-item]
  4118. [[Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-]]
  4119. ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace160 self, uint96 key) โ†’ uint160++` [.item-kind]#internal#
  4120. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  4121. if there is none.
  4122. [.contract-item]
  4123. [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-]]
  4124. ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace160 self, uint96 key) โ†’ uint160++` [.item-kind]#internal#
  4125. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  4126. if there is none.
  4127. NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high
  4128. keys).
  4129. [.contract-item]
  4130. [[Checkpoints-latest-struct-Checkpoints-Trace160-]]
  4131. ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace160 self) โ†’ uint160++` [.item-kind]#internal#
  4132. Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
  4133. [.contract-item]
  4134. [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-]]
  4135. ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace160 self) โ†’ bool exists, uint96 _key, uint160 _value++` [.item-kind]#internal#
  4136. Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
  4137. in the most recent checkpoint.
  4138. [.contract-item]
  4139. [[Checkpoints-length-struct-Checkpoints-Trace160-]]
  4140. ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace160 self) โ†’ uint256++` [.item-kind]#internal#
  4141. Returns the number of checkpoint.
  4142. [.contract-item]
  4143. [[Checkpoints-at-struct-Checkpoints-Trace160-uint32-]]
  4144. ==== `[.contract-item-name]#++at++#++(struct Checkpoints.Trace160 self, uint32 pos) โ†’ struct Checkpoints.Checkpoint160++` [.item-kind]#internal#
  4145. Returns checkpoint at given position.
  4146. [.contract-item]
  4147. [[Checkpoints-CheckpointUnorderedInsertion--]]
  4148. ==== `[.contract-item-name]#++CheckpointUnorderedInsertion++#++()++` [.item-kind]#error#
  4149. A value was attempted to be inserted on a past checkpoint.
  4150. :Uint256Heap: pass:normal[xref:#Heap-Uint256Heap[`++Uint256Heap++`]]
  4151. :peek: pass:normal[xref:#Heap-peek-struct-Heap-Uint256Heap-[`++peek++`]]
  4152. :pop: pass:normal[xref:#Heap-pop-struct-Heap-Uint256Heap-[`++pop++`]]
  4153. :pop: pass:normal[xref:#Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--[`++pop++`]]
  4154. :insert: pass:normal[xref:#Heap-insert-struct-Heap-Uint256Heap-uint256-[`++insert++`]]
  4155. :insert: pass:normal[xref:#Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--[`++insert++`]]
  4156. :replace: pass:normal[xref:#Heap-replace-struct-Heap-Uint256Heap-uint256-[`++replace++`]]
  4157. :replace: pass:normal[xref:#Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--[`++replace++`]]
  4158. :length: pass:normal[xref:#Heap-length-struct-Heap-Uint256Heap-[`++length++`]]
  4159. :clear: pass:normal[xref:#Heap-clear-struct-Heap-Uint256Heap-[`++clear++`]]
  4160. [.contract]
  4161. [[Heap]]
  4162. === `++Heap++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/structs/Heap.sol[{github-icon},role=heading-link]
  4163. [.hljs-theme-light.nopadding]
  4164. ```solidity
  4165. import "@openzeppelin/contracts/utils/structs/Heap.sol";
  4166. ```
  4167. Library for managing https://en.wikipedia.org/wiki/Binary_heap[binary heap] that can be used as
  4168. https://en.wikipedia.org/wiki/Priority_queue[priority queue].
  4169. Heaps are represented as a tree of values where the first element (index 0) is the root, and where the node at
  4170. index i is the child of the node at index (i-1)/2 and the parent of nodes at index 2*i+1 and 2*i+2. Each node
  4171. stores an element of the heap.
  4172. The structure is ordered so that each node is bigger than its parent. An immediate consequence is that the
  4173. highest priority value is the one at the root. This value can be looked up in constant time (O(1)) at
  4174. `heap.tree[0]`
  4175. The structure is designed to perform the following operations with the corresponding complexities:
  4176. * peek (get the highest priority value): O(1)
  4177. * insert (insert a value): O(log(n))
  4178. * pop (remove the highest priority value): O(log(n))
  4179. * replace (replace the highest priority value with a new value): O(log(n))
  4180. * length (get the number of elements): O(1)
  4181. * clear (remove all elements): O(1)
  4182. IMPORTANT: This library allows for the use of custom comparator functions. Given that manipulating
  4183. memory can lead to unexpected behavior. Consider verifying that the comparator does not manipulate
  4184. the Heap's state directly and that it follows the Solidity memory safety rules.
  4185. _Available since v5.1._
  4186. [.contract-index]
  4187. .Functions
  4188. --
  4189. * {xref-Heap-peek-struct-Heap-Uint256Heap-}[`++peek(self)++`]
  4190. * {xref-Heap-pop-struct-Heap-Uint256Heap-}[`++pop(self)++`]
  4191. * {xref-Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--}[`++pop(self, comp)++`]
  4192. * {xref-Heap-insert-struct-Heap-Uint256Heap-uint256-}[`++insert(self, value)++`]
  4193. * {xref-Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--}[`++insert(self, value, comp)++`]
  4194. * {xref-Heap-replace-struct-Heap-Uint256Heap-uint256-}[`++replace(self, newValue)++`]
  4195. * {xref-Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--}[`++replace(self, newValue, comp)++`]
  4196. * {xref-Heap-length-struct-Heap-Uint256Heap-}[`++length(self)++`]
  4197. * {xref-Heap-clear-struct-Heap-Uint256Heap-}[`++clear(self)++`]
  4198. --
  4199. [.contract-item]
  4200. [[Heap-peek-struct-Heap-Uint256Heap-]]
  4201. ==== `[.contract-item-name]#++peek++#++(struct Heap.Uint256Heap self) โ†’ uint256++` [.item-kind]#internal#
  4202. Lookup the root element of the heap.
  4203. [.contract-item]
  4204. [[Heap-pop-struct-Heap-Uint256Heap-]]
  4205. ==== `[.contract-item-name]#++pop++#++(struct Heap.Uint256Heap self) โ†’ uint256++` [.item-kind]#internal#
  4206. Remove (and return) the root element for the heap using the default comparator.
  4207. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4208. during the lifecycle of a heap will result in undefined behavior.
  4209. [.contract-item]
  4210. [[Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--]]
  4211. ==== `[.contract-item-name]#++pop++#++(struct Heap.Uint256Heap self, function (uint256,uint256) view returns (bool) comp) โ†’ uint256++` [.item-kind]#internal#
  4212. Remove (and return) the root element for the heap using the provided comparator.
  4213. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4214. during the lifecycle of a heap will result in undefined behavior.
  4215. [.contract-item]
  4216. [[Heap-insert-struct-Heap-Uint256Heap-uint256-]]
  4217. ==== `[.contract-item-name]#++insert++#++(struct Heap.Uint256Heap self, uint256 value)++` [.item-kind]#internal#
  4218. Insert a new element in the heap using the default comparator.
  4219. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4220. during the lifecycle of a heap will result in undefined behavior.
  4221. [.contract-item]
  4222. [[Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--]]
  4223. ==== `[.contract-item-name]#++insert++#++(struct Heap.Uint256Heap self, uint256 value, function (uint256,uint256) view returns (bool) comp)++` [.item-kind]#internal#
  4224. Insert a new element in the heap using the provided comparator.
  4225. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4226. during the lifecycle of a heap will result in undefined behavior.
  4227. [.contract-item]
  4228. [[Heap-replace-struct-Heap-Uint256Heap-uint256-]]
  4229. ==== `[.contract-item-name]#++replace++#++(struct Heap.Uint256Heap self, uint256 newValue) โ†’ uint256++` [.item-kind]#internal#
  4230. Return the root element for the heap, and replace it with a new value, using the default comparator.
  4231. This is equivalent to using {pop} and {insert}, but requires only one rebalancing operation.
  4232. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4233. during the lifecycle of a heap will result in undefined behavior.
  4234. [.contract-item]
  4235. [[Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--]]
  4236. ==== `[.contract-item-name]#++replace++#++(struct Heap.Uint256Heap self, uint256 newValue, function (uint256,uint256) view returns (bool) comp) โ†’ uint256++` [.item-kind]#internal#
  4237. Return the root element for the heap, and replace it with a new value, using the provided comparator.
  4238. This is equivalent to using {pop} and {insert}, but requires only one rebalancing operation.
  4239. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4240. during the lifecycle of a heap will result in undefined behavior.
  4241. [.contract-item]
  4242. [[Heap-length-struct-Heap-Uint256Heap-]]
  4243. ==== `[.contract-item-name]#++length++#++(struct Heap.Uint256Heap self) โ†’ uint256++` [.item-kind]#internal#
  4244. Returns the number of elements in the heap.
  4245. [.contract-item]
  4246. [[Heap-clear-struct-Heap-Uint256Heap-]]
  4247. ==== `[.contract-item-name]#++clear++#++(struct Heap.Uint256Heap self)++` [.item-kind]#internal#
  4248. Removes all elements in the heap.
  4249. :Bytes32PushTree: pass:normal[xref:#MerkleTree-Bytes32PushTree[`++Bytes32PushTree++`]]
  4250. :setup: pass:normal[xref:#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-[`++setup++`]]
  4251. :setup: pass:normal[xref:#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++setup++`]]
  4252. :push: pass:normal[xref:#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-[`++push++`]]
  4253. :push: pass:normal[xref:#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++push++`]]
  4254. :depth: pass:normal[xref:#MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-[`++depth++`]]
  4255. [.contract]
  4256. [[MerkleTree]]
  4257. === `++MerkleTree++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/structs/MerkleTree.sol[{github-icon},role=heading-link]
  4258. [.hljs-theme-light.nopadding]
  4259. ```solidity
  4260. import "@openzeppelin/contracts/utils/structs/MerkleTree.sol";
  4261. ```
  4262. Library for managing https://wikipedia.org/wiki/Merkle_Tree[Merkle Tree] data structures.
  4263. Each tree is a complete binary tree with the ability to sequentially insert leaves, changing them from a zero to a
  4264. non-zero value and updating its root. This structure allows inserting commitments (or other entries) that are not
  4265. stored, but can be proven to be part of the tree at a later time if the root is kept. See {MerkleProof}.
  4266. A tree is defined by the following parameters:
  4267. * Depth: The number of levels in the tree, it also defines the maximum number of leaves as 2**depth.
  4268. * Zero value: The value that represents an empty leaf. Used to avoid regular zero values to be part of the tree.
  4269. * Hashing function: A cryptographic hash function used to produce internal nodes. Defaults to {Hashes-commutativeKeccak256}.
  4270. NOTE: Building trees using non-commutative hashing functions (i.e. `H(a, b) != H(b, a)`) is supported. However,
  4271. proving the inclusion of a leaf in such trees is not possible with the {MerkleProof} library since it only supports
  4272. _commutative_ hashing functions.
  4273. _Available since v5.1._
  4274. [.contract-index]
  4275. .Functions
  4276. --
  4277. * {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[`++setup(self, treeDepth, zero)++`]
  4278. * {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++setup(self, treeDepth, zero, fnHash)++`]
  4279. * {xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-}[`++push(self, leaf)++`]
  4280. * {xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++push(self, leaf, fnHash)++`]
  4281. * {xref-MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-}[`++depth(self)++`]
  4282. --
  4283. [.contract-item]
  4284. [[MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-]]
  4285. ==== `[.contract-item-name]#++setup++#++(struct MerkleTree.Bytes32PushTree self, uint8 treeDepth, bytes32 zero) โ†’ bytes32 initialRoot++` [.item-kind]#internal#
  4286. Initialize a {Bytes32PushTree} using {Hashes-commutativeKeccak256} to hash internal nodes.
  4287. The capacity of the tree (i.e. number of leaves) is set to `2**treeDepth`.
  4288. Calling this function on MerkleTree that was already setup and used will reset it to a blank state.
  4289. Once a tree is setup, any push to it must use the same hashing function. This means that values
  4290. should be pushed to it using the default {xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-}[push] function.
  4291. IMPORTANT: The zero value should be carefully chosen since it will be stored in the tree representing
  4292. empty leaves. It should be a value that is not expected to be part of the tree.
  4293. [.contract-item]
  4294. [[MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  4295. ==== `[.contract-item-name]#++setup++#++(struct MerkleTree.Bytes32PushTree self, uint8 treeDepth, bytes32 zero, function (bytes32,bytes32) view returns (bytes32) fnHash) โ†’ bytes32 initialRoot++` [.item-kind]#internal#
  4296. Same as {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[setup], but allows to specify a custom hashing function.
  4297. Once a tree is setup, any push to it must use the same hashing function. This means that values
  4298. should be pushed to it using the custom push function, which should be the same one as used during the setup.
  4299. IMPORTANT: Providing a custom hashing function is a security-sensitive operation since it may
  4300. compromise the soundness of the tree.
  4301. NOTE: Consider verifying that the hashing function does not manipulate the memory state directly and that it
  4302. follows the Solidity memory safety rules. Otherwise, it may lead to unexpected behavior.
  4303. [.contract-item]
  4304. [[MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-]]
  4305. ==== `[.contract-item-name]#++push++#++(struct MerkleTree.Bytes32PushTree self, bytes32 leaf) โ†’ uint256 index, bytes32 newRoot++` [.item-kind]#internal#
  4306. Insert a new leaf in the tree, and compute the new root. Returns the position of the inserted leaf in the
  4307. tree, and the resulting root.
  4308. Hashing the leaf before calling this function is recommended as a protection against
  4309. second pre-image attacks.
  4310. This variant uses {Hashes-commutativeKeccak256} to hash internal nodes. It should only be used on merkle trees
  4311. that were setup using the same (default) hashing function (i.e. by calling
  4312. {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[the default setup] function).
  4313. [.contract-item]
  4314. [[MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  4315. ==== `[.contract-item-name]#++push++#++(struct MerkleTree.Bytes32PushTree self, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) fnHash) โ†’ uint256 index, bytes32 newRoot++` [.item-kind]#internal#
  4316. Insert a new leaf in the tree, and compute the new root. Returns the position of the inserted leaf in the
  4317. tree, and the resulting root.
  4318. Hashing the leaf before calling this function is recommended as a protection against
  4319. second pre-image attacks.
  4320. This variant uses a custom hashing function to hash internal nodes. It should only be called with the same
  4321. function as the one used during the initial setup of the merkle tree.
  4322. [.contract-item]
  4323. [[MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-]]
  4324. ==== `[.contract-item-name]#++depth++#++(struct MerkleTree.Bytes32PushTree self) โ†’ uint256++` [.item-kind]#internal#
  4325. Tree's depth (set at initialization)
  4326. == Libraries
  4327. :Create2EmptyBytecode: pass:normal[xref:#Create2-Create2EmptyBytecode--[`++Create2EmptyBytecode++`]]
  4328. :deploy: pass:normal[xref:#Create2-deploy-uint256-bytes32-bytes-[`++deploy++`]]
  4329. :computeAddress: pass:normal[xref:#Create2-computeAddress-bytes32-bytes32-[`++computeAddress++`]]
  4330. :computeAddress: pass:normal[xref:#Create2-computeAddress-bytes32-bytes32-address-[`++computeAddress++`]]
  4331. [.contract]
  4332. [[Create2]]
  4333. === `++Create2++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Create2.sol[{github-icon},role=heading-link]
  4334. [.hljs-theme-light.nopadding]
  4335. ```solidity
  4336. import "@openzeppelin/contracts/utils/Create2.sol";
  4337. ```
  4338. Helper to make usage of the `CREATE2` EVM opcode easier and safer.
  4339. `CREATE2` can be used to compute in advance the address where a smart
  4340. contract will be deployed, which allows for interesting new mechanisms known
  4341. as 'counterfactual interactions'.
  4342. See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
  4343. information.
  4344. [.contract-index]
  4345. .Functions
  4346. --
  4347. * {xref-Create2-deploy-uint256-bytes32-bytes-}[`++deploy(amount, salt, bytecode)++`]
  4348. * {xref-Create2-computeAddress-bytes32-bytes32-}[`++computeAddress(salt, bytecodeHash)++`]
  4349. * {xref-Create2-computeAddress-bytes32-bytes32-address-}[`++computeAddress(salt, bytecodeHash, deployer)++`]
  4350. --
  4351. [.contract-index]
  4352. .Errors
  4353. --
  4354. * {xref-Create2-Create2EmptyBytecode--}[`++Create2EmptyBytecode()++`]
  4355. --
  4356. [.contract-item]
  4357. [[Create2-deploy-uint256-bytes32-bytes-]]
  4358. ==== `[.contract-item-name]#++deploy++#++(uint256 amount, bytes32 salt, bytes bytecode) โ†’ address addr++` [.item-kind]#internal#
  4359. Deploys a contract using `CREATE2`. The address where the contract
  4360. will be deployed can be known in advance via {computeAddress}.
  4361. The bytecode for a contract can be obtained from Solidity with
  4362. `type(contractName).creationCode`.
  4363. Requirements:
  4364. - `bytecode` must not be empty.
  4365. - `salt` must have not been used for `bytecode` already.
  4366. - the factory must have a balance of at least `amount`.
  4367. - if `amount` is non-zero, `bytecode` must have a `payable` constructor.
  4368. [.contract-item]
  4369. [[Create2-computeAddress-bytes32-bytes32-]]
  4370. ==== `[.contract-item-name]#++computeAddress++#++(bytes32 salt, bytes32 bytecodeHash) โ†’ address++` [.item-kind]#internal#
  4371. Returns the address where a contract will be stored if deployed via {deploy}. Any change in the
  4372. `bytecodeHash` or `salt` will result in a new destination address.
  4373. [.contract-item]
  4374. [[Create2-computeAddress-bytes32-bytes32-address-]]
  4375. ==== `[.contract-item-name]#++computeAddress++#++(bytes32 salt, bytes32 bytecodeHash, address deployer) โ†’ address addr++` [.item-kind]#internal#
  4376. Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
  4377. `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
  4378. [.contract-item]
  4379. [[Create2-Create2EmptyBytecode--]]
  4380. ==== `[.contract-item-name]#++Create2EmptyBytecode++#++()++` [.item-kind]#error#
  4381. There's no code to deploy.
  4382. :AddressEmptyCode: pass:normal[xref:#Address-AddressEmptyCode-address-[`++AddressEmptyCode++`]]
  4383. :sendValue: pass:normal[xref:#Address-sendValue-address-payable-uint256-[`++sendValue++`]]
  4384. :functionCall: pass:normal[xref:#Address-functionCall-address-bytes-[`++functionCall++`]]
  4385. :functionCallWithValue: pass:normal[xref:#Address-functionCallWithValue-address-bytes-uint256-[`++functionCallWithValue++`]]
  4386. :functionStaticCall: pass:normal[xref:#Address-functionStaticCall-address-bytes-[`++functionStaticCall++`]]
  4387. :functionDelegateCall: pass:normal[xref:#Address-functionDelegateCall-address-bytes-[`++functionDelegateCall++`]]
  4388. :verifyCallResultFromTarget: pass:normal[xref:#Address-verifyCallResultFromTarget-address-bool-bytes-[`++verifyCallResultFromTarget++`]]
  4389. :verifyCallResult: pass:normal[xref:#Address-verifyCallResult-bool-bytes-[`++verifyCallResult++`]]
  4390. [.contract]
  4391. [[Address]]
  4392. === `++Address++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Address.sol[{github-icon},role=heading-link]
  4393. [.hljs-theme-light.nopadding]
  4394. ```solidity
  4395. import "@openzeppelin/contracts/utils/Address.sol";
  4396. ```
  4397. Collection of functions related to the address type
  4398. [.contract-index]
  4399. .Functions
  4400. --
  4401. * {xref-Address-sendValue-address-payable-uint256-}[`++sendValue(recipient, amount)++`]
  4402. * {xref-Address-functionCall-address-bytes-}[`++functionCall(target, data)++`]
  4403. * {xref-Address-functionCallWithValue-address-bytes-uint256-}[`++functionCallWithValue(target, data, value)++`]
  4404. * {xref-Address-functionStaticCall-address-bytes-}[`++functionStaticCall(target, data)++`]
  4405. * {xref-Address-functionDelegateCall-address-bytes-}[`++functionDelegateCall(target, data)++`]
  4406. * {xref-Address-verifyCallResultFromTarget-address-bool-bytes-}[`++verifyCallResultFromTarget(target, success, returndata)++`]
  4407. * {xref-Address-verifyCallResult-bool-bytes-}[`++verifyCallResult(success, returndata)++`]
  4408. --
  4409. [.contract-index]
  4410. .Errors
  4411. --
  4412. * {xref-Address-AddressEmptyCode-address-}[`++AddressEmptyCode(target)++`]
  4413. --
  4414. [.contract-item]
  4415. [[Address-sendValue-address-payable-uint256-]]
  4416. ==== `[.contract-item-name]#++sendValue++#++(address payable recipient, uint256 amount)++` [.item-kind]#internal#
  4417. Replacement for Solidity's `transfer`: sends `amount` wei to
  4418. `recipient`, forwarding all available gas and reverting on errors.
  4419. https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
  4420. of certain opcodes, possibly making contracts go over the 2300 gas limit
  4421. imposed by `transfer`, making them unable to receive funds via
  4422. `transfer`. {sendValue} removes this limitation.
  4423. https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
  4424. IMPORTANT: because control is transferred to `recipient`, care must be
  4425. taken to not create reentrancy vulnerabilities. Consider using
  4426. {ReentrancyGuard} or the
  4427. https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
  4428. [.contract-item]
  4429. [[Address-functionCall-address-bytes-]]
  4430. ==== `[.contract-item-name]#++functionCall++#++(address target, bytes data) โ†’ bytes++` [.item-kind]#internal#
  4431. Performs a Solidity function call using a low level `call`. A
  4432. plain `call` is an unsafe replacement for a function call: use this
  4433. function instead.
  4434. If `target` reverts with a revert reason or custom error, it is bubbled
  4435. up by this function (like regular Solidity function calls). However, if
  4436. the call reverted with no returned reason, this function reverts with a
  4437. {Errors.FailedCall} error.
  4438. Returns the raw returned data. To convert to the expected return value,
  4439. use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
  4440. Requirements:
  4441. - `target` must be a contract.
  4442. - calling `target` with `data` must not revert.
  4443. [.contract-item]
  4444. [[Address-functionCallWithValue-address-bytes-uint256-]]
  4445. ==== `[.contract-item-name]#++functionCallWithValue++#++(address target, bytes data, uint256 value) โ†’ bytes++` [.item-kind]#internal#
  4446. Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
  4447. but also transferring `value` wei to `target`.
  4448. Requirements:
  4449. - the calling contract must have an ETH balance of at least `value`.
  4450. - the called Solidity function must be `payable`.
  4451. [.contract-item]
  4452. [[Address-functionStaticCall-address-bytes-]]
  4453. ==== `[.contract-item-name]#++functionStaticCall++#++(address target, bytes data) โ†’ bytes++` [.item-kind]#internal#
  4454. Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
  4455. but performing a static call.
  4456. [.contract-item]
  4457. [[Address-functionDelegateCall-address-bytes-]]
  4458. ==== `[.contract-item-name]#++functionDelegateCall++#++(address target, bytes data) โ†’ bytes++` [.item-kind]#internal#
  4459. Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
  4460. but performing a delegate call.
  4461. [.contract-item]
  4462. [[Address-verifyCallResultFromTarget-address-bool-bytes-]]
  4463. ==== `[.contract-item-name]#++verifyCallResultFromTarget++#++(address target, bool success, bytes returndata) โ†’ bytes++` [.item-kind]#internal#
  4464. Tool to verify that a low level call to smart-contract was successful, and reverts if the target
  4465. was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
  4466. of an unsuccessful call.
  4467. [.contract-item]
  4468. [[Address-verifyCallResult-bool-bytes-]]
  4469. ==== `[.contract-item-name]#++verifyCallResult++#++(bool success, bytes returndata) โ†’ bytes++` [.item-kind]#internal#
  4470. Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
  4471. revert reason or with a default {Errors.FailedCall} error.
  4472. [.contract-item]
  4473. [[Address-AddressEmptyCode-address-]]
  4474. ==== `[.contract-item-name]#++AddressEmptyCode++#++(address target)++` [.item-kind]#error#
  4475. There's no code at `target` (it is not a contract).
  4476. :sort: pass:normal[xref:#Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--[`++sort++`]]
  4477. :sort: pass:normal[xref:#Arrays-sort-uint256---[`++sort++`]]
  4478. :sort: pass:normal[xref:#Arrays-sort-address---function--address-address--pure-returns--bool--[`++sort++`]]
  4479. :sort: pass:normal[xref:#Arrays-sort-address---[`++sort++`]]
  4480. :sort: pass:normal[xref:#Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--[`++sort++`]]
  4481. :sort: pass:normal[xref:#Arrays-sort-bytes32---[`++sort++`]]
  4482. :findUpperBound: pass:normal[xref:#Arrays-findUpperBound-uint256---uint256-[`++findUpperBound++`]]
  4483. :lowerBound: pass:normal[xref:#Arrays-lowerBound-uint256---uint256-[`++lowerBound++`]]
  4484. :upperBound: pass:normal[xref:#Arrays-upperBound-uint256---uint256-[`++upperBound++`]]
  4485. :lowerBoundMemory: pass:normal[xref:#Arrays-lowerBoundMemory-uint256---uint256-[`++lowerBoundMemory++`]]
  4486. :upperBoundMemory: pass:normal[xref:#Arrays-upperBoundMemory-uint256---uint256-[`++upperBoundMemory++`]]
  4487. :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-address---uint256-[`++unsafeAccess++`]]
  4488. :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-bytes32---uint256-[`++unsafeAccess++`]]
  4489. :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-uint256---uint256-[`++unsafeAccess++`]]
  4490. :unsafeMemoryAccess: pass:normal[xref:#Arrays-unsafeMemoryAccess-address---uint256-[`++unsafeMemoryAccess++`]]
  4491. :unsafeMemoryAccess: pass:normal[xref:#Arrays-unsafeMemoryAccess-bytes32---uint256-[`++unsafeMemoryAccess++`]]
  4492. :unsafeMemoryAccess: pass:normal[xref:#Arrays-unsafeMemoryAccess-uint256---uint256-[`++unsafeMemoryAccess++`]]
  4493. :unsafeSetLength: pass:normal[xref:#Arrays-unsafeSetLength-address---uint256-[`++unsafeSetLength++`]]
  4494. :unsafeSetLength: pass:normal[xref:#Arrays-unsafeSetLength-bytes32---uint256-[`++unsafeSetLength++`]]
  4495. :unsafeSetLength: pass:normal[xref:#Arrays-unsafeSetLength-uint256---uint256-[`++unsafeSetLength++`]]
  4496. [.contract]
  4497. [[Arrays]]
  4498. === `++Arrays++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Arrays.sol[{github-icon},role=heading-link]
  4499. [.hljs-theme-light.nopadding]
  4500. ```solidity
  4501. import "@openzeppelin/contracts/utils/Arrays.sol";
  4502. ```
  4503. Collection of functions related to array types.
  4504. [.contract-index]
  4505. .Functions
  4506. --
  4507. * {xref-Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--}[`++sort(array, comp)++`]
  4508. * {xref-Arrays-sort-uint256---}[`++sort(array)++`]
  4509. * {xref-Arrays-sort-address---function--address-address--pure-returns--bool--}[`++sort(array, comp)++`]
  4510. * {xref-Arrays-sort-address---}[`++sort(array)++`]
  4511. * {xref-Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--}[`++sort(array, comp)++`]
  4512. * {xref-Arrays-sort-bytes32---}[`++sort(array)++`]
  4513. * {xref-Arrays-findUpperBound-uint256---uint256-}[`++findUpperBound(array, element)++`]
  4514. * {xref-Arrays-lowerBound-uint256---uint256-}[`++lowerBound(array, element)++`]
  4515. * {xref-Arrays-upperBound-uint256---uint256-}[`++upperBound(array, element)++`]
  4516. * {xref-Arrays-lowerBoundMemory-uint256---uint256-}[`++lowerBoundMemory(array, element)++`]
  4517. * {xref-Arrays-upperBoundMemory-uint256---uint256-}[`++upperBoundMemory(array, element)++`]
  4518. * {xref-Arrays-unsafeAccess-address---uint256-}[`++unsafeAccess(arr, pos)++`]
  4519. * {xref-Arrays-unsafeAccess-bytes32---uint256-}[`++unsafeAccess(arr, pos)++`]
  4520. * {xref-Arrays-unsafeAccess-uint256---uint256-}[`++unsafeAccess(arr, pos)++`]
  4521. * {xref-Arrays-unsafeMemoryAccess-address---uint256-}[`++unsafeMemoryAccess(arr, pos)++`]
  4522. * {xref-Arrays-unsafeMemoryAccess-bytes32---uint256-}[`++unsafeMemoryAccess(arr, pos)++`]
  4523. * {xref-Arrays-unsafeMemoryAccess-uint256---uint256-}[`++unsafeMemoryAccess(arr, pos)++`]
  4524. * {xref-Arrays-unsafeSetLength-address---uint256-}[`++unsafeSetLength(array, len)++`]
  4525. * {xref-Arrays-unsafeSetLength-bytes32---uint256-}[`++unsafeSetLength(array, len)++`]
  4526. * {xref-Arrays-unsafeSetLength-uint256---uint256-}[`++unsafeSetLength(array, len)++`]
  4527. --
  4528. [.contract-item]
  4529. [[Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--]]
  4530. ==== `[.contract-item-name]#++sort++#++(uint256[] array, function (uint256,uint256) pure returns (bool) comp) โ†’ uint256[]++` [.item-kind]#internal#
  4531. Sort an array of uint256 (in memory) following the provided comparator function.
  4532. This function does the sorting "in place", meaning that it overrides the input. The object is returned for
  4533. convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array.
  4534. NOTE: this function's cost is `O(n ยท log(n))` in average and `O(nยฒ)` in the worst case, with n the length of the
  4535. array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
  4536. when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
  4537. consume more gas than is available in a block, leading to potential DoS.
  4538. IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
  4539. [.contract-item]
  4540. [[Arrays-sort-uint256---]]
  4541. ==== `[.contract-item-name]#++sort++#++(uint256[] array) โ†’ uint256[]++` [.item-kind]#internal#
  4542. Variant of {sort} that sorts an array of uint256 in increasing order.
  4543. [.contract-item]
  4544. [[Arrays-sort-address---function--address-address--pure-returns--bool--]]
  4545. ==== `[.contract-item-name]#++sort++#++(address[] array, function (address,address) pure returns (bool) comp) โ†’ address[]++` [.item-kind]#internal#
  4546. Sort an array of address (in memory) following the provided comparator function.
  4547. This function does the sorting "in place", meaning that it overrides the input. The object is returned for
  4548. convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array.
  4549. NOTE: this function's cost is `O(n ยท log(n))` in average and `O(nยฒ)` in the worst case, with n the length of the
  4550. array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
  4551. when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
  4552. consume more gas than is available in a block, leading to potential DoS.
  4553. IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
  4554. [.contract-item]
  4555. [[Arrays-sort-address---]]
  4556. ==== `[.contract-item-name]#++sort++#++(address[] array) โ†’ address[]++` [.item-kind]#internal#
  4557. Variant of {sort} that sorts an array of address in increasing order.
  4558. [.contract-item]
  4559. [[Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--]]
  4560. ==== `[.contract-item-name]#++sort++#++(bytes32[] array, function (bytes32,bytes32) pure returns (bool) comp) โ†’ bytes32[]++` [.item-kind]#internal#
  4561. Sort an array of bytes32 (in memory) following the provided comparator function.
  4562. This function does the sorting "in place", meaning that it overrides the input. The object is returned for
  4563. convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array.
  4564. NOTE: this function's cost is `O(n ยท log(n))` in average and `O(nยฒ)` in the worst case, with n the length of the
  4565. array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
  4566. when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
  4567. consume more gas than is available in a block, leading to potential DoS.
  4568. IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
  4569. [.contract-item]
  4570. [[Arrays-sort-bytes32---]]
  4571. ==== `[.contract-item-name]#++sort++#++(bytes32[] array) โ†’ bytes32[]++` [.item-kind]#internal#
  4572. Variant of {sort} that sorts an array of bytes32 in increasing order.
  4573. [.contract-item]
  4574. [[Arrays-findUpperBound-uint256---uint256-]]
  4575. ==== `[.contract-item-name]#++findUpperBound++#++(uint256[] array, uint256 element) โ†’ uint256++` [.item-kind]#internal#
  4576. Searches a sorted `array` and returns the first index that contains
  4577. a value greater or equal to `element`. If no such index exists (i.e. all
  4578. values in the array are strictly less than `element`), the array length is
  4579. returned. Time complexity O(log n).
  4580. NOTE: The `array` is expected to be sorted in ascending order, and to
  4581. contain no repeated elements.
  4582. IMPORTANT: Deprecated. This implementation behaves as {lowerBound} but lacks
  4583. support for repeated elements in the array. The {lowerBound} function should
  4584. be used instead.
  4585. [.contract-item]
  4586. [[Arrays-lowerBound-uint256---uint256-]]
  4587. ==== `[.contract-item-name]#++lowerBound++#++(uint256[] array, uint256 element) โ†’ uint256++` [.item-kind]#internal#
  4588. Searches an `array` sorted in ascending order and returns the first
  4589. index that contains a value greater or equal than `element`. If no such index
  4590. exists (i.e. all values in the array are strictly less than `element`), the array
  4591. length is returned. Time complexity O(log n).
  4592. See C++'s https://en.cppreference.com/w/cpp/algorithm/lower_bound[lower_bound].
  4593. [.contract-item]
  4594. [[Arrays-upperBound-uint256---uint256-]]
  4595. ==== `[.contract-item-name]#++upperBound++#++(uint256[] array, uint256 element) โ†’ uint256++` [.item-kind]#internal#
  4596. Searches an `array` sorted in ascending order and returns the first
  4597. index that contains a value strictly greater than `element`. If no such index
  4598. exists (i.e. all values in the array are strictly less than `element`), the array
  4599. length is returned. Time complexity O(log n).
  4600. See C++'s https://en.cppreference.com/w/cpp/algorithm/upper_bound[upper_bound].
  4601. [.contract-item]
  4602. [[Arrays-lowerBoundMemory-uint256---uint256-]]
  4603. ==== `[.contract-item-name]#++lowerBoundMemory++#++(uint256[] array, uint256 element) โ†’ uint256++` [.item-kind]#internal#
  4604. Same as {lowerBound}, but with an array in memory.
  4605. [.contract-item]
  4606. [[Arrays-upperBoundMemory-uint256---uint256-]]
  4607. ==== `[.contract-item-name]#++upperBoundMemory++#++(uint256[] array, uint256 element) โ†’ uint256++` [.item-kind]#internal#
  4608. Same as {upperBound}, but with an array in memory.
  4609. [.contract-item]
  4610. [[Arrays-unsafeAccess-address---uint256-]]
  4611. ==== `[.contract-item-name]#++unsafeAccess++#++(address[] arr, uint256 pos) โ†’ struct StorageSlot.AddressSlot++` [.item-kind]#internal#
  4612. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4613. WARNING: Only use if you are certain `pos` is lower than the array length.
  4614. [.contract-item]
  4615. [[Arrays-unsafeAccess-bytes32---uint256-]]
  4616. ==== `[.contract-item-name]#++unsafeAccess++#++(bytes32[] arr, uint256 pos) โ†’ struct StorageSlot.Bytes32Slot++` [.item-kind]#internal#
  4617. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4618. WARNING: Only use if you are certain `pos` is lower than the array length.
  4619. [.contract-item]
  4620. [[Arrays-unsafeAccess-uint256---uint256-]]
  4621. ==== `[.contract-item-name]#++unsafeAccess++#++(uint256[] arr, uint256 pos) โ†’ struct StorageSlot.Uint256Slot++` [.item-kind]#internal#
  4622. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4623. WARNING: Only use if you are certain `pos` is lower than the array length.
  4624. [.contract-item]
  4625. [[Arrays-unsafeMemoryAccess-address---uint256-]]
  4626. ==== `[.contract-item-name]#++unsafeMemoryAccess++#++(address[] arr, uint256 pos) โ†’ address res++` [.item-kind]#internal#
  4627. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4628. WARNING: Only use if you are certain `pos` is lower than the array length.
  4629. [.contract-item]
  4630. [[Arrays-unsafeMemoryAccess-bytes32---uint256-]]
  4631. ==== `[.contract-item-name]#++unsafeMemoryAccess++#++(bytes32[] arr, uint256 pos) โ†’ bytes32 res++` [.item-kind]#internal#
  4632. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4633. WARNING: Only use if you are certain `pos` is lower than the array length.
  4634. [.contract-item]
  4635. [[Arrays-unsafeMemoryAccess-uint256---uint256-]]
  4636. ==== `[.contract-item-name]#++unsafeMemoryAccess++#++(uint256[] arr, uint256 pos) โ†’ uint256 res++` [.item-kind]#internal#
  4637. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4638. WARNING: Only use if you are certain `pos` is lower than the array length.
  4639. [.contract-item]
  4640. [[Arrays-unsafeSetLength-address---uint256-]]
  4641. ==== `[.contract-item-name]#++unsafeSetLength++#++(address[] array, uint256 len)++` [.item-kind]#internal#
  4642. Helper to set the length of an dynamic array. Directly writing to `.length` is forbidden.
  4643. WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
  4644. [.contract-item]
  4645. [[Arrays-unsafeSetLength-bytes32---uint256-]]
  4646. ==== `[.contract-item-name]#++unsafeSetLength++#++(bytes32[] array, uint256 len)++` [.item-kind]#internal#
  4647. Helper to set the length of an dynamic array. Directly writing to `.length` is forbidden.
  4648. WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
  4649. [.contract-item]
  4650. [[Arrays-unsafeSetLength-uint256---uint256-]]
  4651. ==== `[.contract-item-name]#++unsafeSetLength++#++(uint256[] array, uint256 len)++` [.item-kind]#internal#
  4652. Helper to set the length of an dynamic array. Directly writing to `.length` is forbidden.
  4653. WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
  4654. :_TABLE: pass:normal[xref:#Base64-_TABLE-string[`++_TABLE++`]]
  4655. :_TABLE_URL: pass:normal[xref:#Base64-_TABLE_URL-string[`++_TABLE_URL++`]]
  4656. :encode: pass:normal[xref:#Base64-encode-bytes-[`++encode++`]]
  4657. :encodeURL: pass:normal[xref:#Base64-encodeURL-bytes-[`++encodeURL++`]]
  4658. [.contract]
  4659. [[Base64]]
  4660. === `++Base64++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Base64.sol[{github-icon},role=heading-link]
  4661. [.hljs-theme-light.nopadding]
  4662. ```solidity
  4663. import "@openzeppelin/contracts/utils/Base64.sol";
  4664. ```
  4665. Provides a set of functions to operate with Base64 strings.
  4666. [.contract-index]
  4667. .Functions
  4668. --
  4669. * {xref-Base64-encode-bytes-}[`++encode(data)++`]
  4670. * {xref-Base64-encodeURL-bytes-}[`++encodeURL(data)++`]
  4671. --
  4672. [.contract-index]
  4673. .Internal Variables
  4674. --
  4675. * {xref-Base64-_TABLE-string}[`++string constant _TABLE++`]
  4676. * {xref-Base64-_TABLE_URL-string}[`++string constant _TABLE_URL++`]
  4677. --
  4678. [.contract-item]
  4679. [[Base64-encode-bytes-]]
  4680. ==== `[.contract-item-name]#++encode++#++(bytes data) โ†’ string++` [.item-kind]#internal#
  4681. Converts a `bytes` to its Bytes64 `string` representation.
  4682. [.contract-item]
  4683. [[Base64-encodeURL-bytes-]]
  4684. ==== `[.contract-item-name]#++encodeURL++#++(bytes data) โ†’ string++` [.item-kind]#internal#
  4685. Converts a `bytes` to its Bytes64Url `string` representation.
  4686. Output is not padded with `=` as specified in https://www.rfc-editor.org/rfc/rfc4648[rfc4648].
  4687. [.contract-item]
  4688. [[Base64-_TABLE-string]]
  4689. ==== `string [.contract-item-name]#++_TABLE++#` [.item-kind]#internal constant#
  4690. Base64 Encoding/Decoding Table
  4691. See sections 4 and 5 of https://datatracker.ietf.org/doc/html/rfc4648
  4692. [.contract-item]
  4693. [[Base64-_TABLE_URL-string]]
  4694. ==== `string [.contract-item-name]#++_TABLE_URL++#` [.item-kind]#internal constant#
  4695. :StringsInsufficientHexLength: pass:normal[xref:#Strings-StringsInsufficientHexLength-uint256-uint256-[`++StringsInsufficientHexLength++`]]
  4696. :StringsInvalidChar: pass:normal[xref:#Strings-StringsInvalidChar--[`++StringsInvalidChar++`]]
  4697. :StringsInvalidAddressFormat: pass:normal[xref:#Strings-StringsInvalidAddressFormat--[`++StringsInvalidAddressFormat++`]]
  4698. :toString: pass:normal[xref:#Strings-toString-uint256-[`++toString++`]]
  4699. :toStringSigned: pass:normal[xref:#Strings-toStringSigned-int256-[`++toStringSigned++`]]
  4700. :toHexString: pass:normal[xref:#Strings-toHexString-uint256-[`++toHexString++`]]
  4701. :toHexString: pass:normal[xref:#Strings-toHexString-uint256-uint256-[`++toHexString++`]]
  4702. :toHexString: pass:normal[xref:#Strings-toHexString-address-[`++toHexString++`]]
  4703. :toChecksumHexString: pass:normal[xref:#Strings-toChecksumHexString-address-[`++toChecksumHexString++`]]
  4704. :equal: pass:normal[xref:#Strings-equal-string-string-[`++equal++`]]
  4705. :parseUint: pass:normal[xref:#Strings-parseUint-string-[`++parseUint++`]]
  4706. :parseUint: pass:normal[xref:#Strings-parseUint-string-uint256-uint256-[`++parseUint++`]]
  4707. :tryParseUint: pass:normal[xref:#Strings-tryParseUint-string-[`++tryParseUint++`]]
  4708. :tryParseUint: pass:normal[xref:#Strings-tryParseUint-string-uint256-uint256-[`++tryParseUint++`]]
  4709. :parseInt: pass:normal[xref:#Strings-parseInt-string-[`++parseInt++`]]
  4710. :parseInt: pass:normal[xref:#Strings-parseInt-string-uint256-uint256-[`++parseInt++`]]
  4711. :tryParseInt: pass:normal[xref:#Strings-tryParseInt-string-[`++tryParseInt++`]]
  4712. :tryParseInt: pass:normal[xref:#Strings-tryParseInt-string-uint256-uint256-[`++tryParseInt++`]]
  4713. :parseHexUint: pass:normal[xref:#Strings-parseHexUint-string-[`++parseHexUint++`]]
  4714. :parseHexUint: pass:normal[xref:#Strings-parseHexUint-string-uint256-uint256-[`++parseHexUint++`]]
  4715. :tryParseHexUint: pass:normal[xref:#Strings-tryParseHexUint-string-[`++tryParseHexUint++`]]
  4716. :tryParseHexUint: pass:normal[xref:#Strings-tryParseHexUint-string-uint256-uint256-[`++tryParseHexUint++`]]
  4717. :parseAddress: pass:normal[xref:#Strings-parseAddress-string-[`++parseAddress++`]]
  4718. :parseAddress: pass:normal[xref:#Strings-parseAddress-string-uint256-uint256-[`++parseAddress++`]]
  4719. :tryParseAddress: pass:normal[xref:#Strings-tryParseAddress-string-[`++tryParseAddress++`]]
  4720. :tryParseAddress: pass:normal[xref:#Strings-tryParseAddress-string-uint256-uint256-[`++tryParseAddress++`]]
  4721. [.contract]
  4722. [[Strings]]
  4723. === `++Strings++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Strings.sol[{github-icon},role=heading-link]
  4724. [.hljs-theme-light.nopadding]
  4725. ```solidity
  4726. import "@openzeppelin/contracts/utils/Strings.sol";
  4727. ```
  4728. String operations.
  4729. [.contract-index]
  4730. .Functions
  4731. --
  4732. * {xref-Strings-toString-uint256-}[`++toString(value)++`]
  4733. * {xref-Strings-toStringSigned-int256-}[`++toStringSigned(value)++`]
  4734. * {xref-Strings-toHexString-uint256-}[`++toHexString(value)++`]
  4735. * {xref-Strings-toHexString-uint256-uint256-}[`++toHexString(value, length)++`]
  4736. * {xref-Strings-toHexString-address-}[`++toHexString(addr)++`]
  4737. * {xref-Strings-toChecksumHexString-address-}[`++toChecksumHexString(addr)++`]
  4738. * {xref-Strings-equal-string-string-}[`++equal(a, b)++`]
  4739. * {xref-Strings-parseUint-string-}[`++parseUint(input)++`]
  4740. * {xref-Strings-parseUint-string-uint256-uint256-}[`++parseUint(input, begin, end)++`]
  4741. * {xref-Strings-tryParseUint-string-}[`++tryParseUint(input)++`]
  4742. * {xref-Strings-tryParseUint-string-uint256-uint256-}[`++tryParseUint(input, begin, end)++`]
  4743. * {xref-Strings-parseInt-string-}[`++parseInt(input)++`]
  4744. * {xref-Strings-parseInt-string-uint256-uint256-}[`++parseInt(input, begin, end)++`]
  4745. * {xref-Strings-tryParseInt-string-}[`++tryParseInt(input)++`]
  4746. * {xref-Strings-tryParseInt-string-uint256-uint256-}[`++tryParseInt(input, begin, end)++`]
  4747. * {xref-Strings-parseHexUint-string-}[`++parseHexUint(input)++`]
  4748. * {xref-Strings-parseHexUint-string-uint256-uint256-}[`++parseHexUint(input, begin, end)++`]
  4749. * {xref-Strings-tryParseHexUint-string-}[`++tryParseHexUint(input)++`]
  4750. * {xref-Strings-tryParseHexUint-string-uint256-uint256-}[`++tryParseHexUint(input, begin, end)++`]
  4751. * {xref-Strings-parseAddress-string-}[`++parseAddress(input)++`]
  4752. * {xref-Strings-parseAddress-string-uint256-uint256-}[`++parseAddress(input, begin, end)++`]
  4753. * {xref-Strings-tryParseAddress-string-}[`++tryParseAddress(input)++`]
  4754. * {xref-Strings-tryParseAddress-string-uint256-uint256-}[`++tryParseAddress(input, begin, end)++`]
  4755. --
  4756. [.contract-index]
  4757. .Errors
  4758. --
  4759. * {xref-Strings-StringsInsufficientHexLength-uint256-uint256-}[`++StringsInsufficientHexLength(value, length)++`]
  4760. * {xref-Strings-StringsInvalidChar--}[`++StringsInvalidChar()++`]
  4761. * {xref-Strings-StringsInvalidAddressFormat--}[`++StringsInvalidAddressFormat()++`]
  4762. --
  4763. [.contract-item]
  4764. [[Strings-toString-uint256-]]
  4765. ==== `[.contract-item-name]#++toString++#++(uint256 value) โ†’ string++` [.item-kind]#internal#
  4766. Converts a `uint256` to its ASCII `string` decimal representation.
  4767. [.contract-item]
  4768. [[Strings-toStringSigned-int256-]]
  4769. ==== `[.contract-item-name]#++toStringSigned++#++(int256 value) โ†’ string++` [.item-kind]#internal#
  4770. Converts a `int256` to its ASCII `string` decimal representation.
  4771. [.contract-item]
  4772. [[Strings-toHexString-uint256-]]
  4773. ==== `[.contract-item-name]#++toHexString++#++(uint256 value) โ†’ string++` [.item-kind]#internal#
  4774. Converts a `uint256` to its ASCII `string` hexadecimal representation.
  4775. [.contract-item]
  4776. [[Strings-toHexString-uint256-uint256-]]
  4777. ==== `[.contract-item-name]#++toHexString++#++(uint256 value, uint256 length) โ†’ string++` [.item-kind]#internal#
  4778. Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
  4779. [.contract-item]
  4780. [[Strings-toHexString-address-]]
  4781. ==== `[.contract-item-name]#++toHexString++#++(address addr) โ†’ string++` [.item-kind]#internal#
  4782. Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
  4783. representation.
  4784. [.contract-item]
  4785. [[Strings-toChecksumHexString-address-]]
  4786. ==== `[.contract-item-name]#++toChecksumHexString++#++(address addr) โ†’ string++` [.item-kind]#internal#
  4787. Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal
  4788. representation, according to EIP-55.
  4789. [.contract-item]
  4790. [[Strings-equal-string-string-]]
  4791. ==== `[.contract-item-name]#++equal++#++(string a, string b) โ†’ bool++` [.item-kind]#internal#
  4792. Returns true if the two strings are equal.
  4793. [.contract-item]
  4794. [[Strings-parseUint-string-]]
  4795. ==== `[.contract-item-name]#++parseUint++#++(string input) โ†’ uint256++` [.item-kind]#internal#
  4796. Parse a decimal string and returns the value as a `uint256`.
  4797. Requirements:
  4798. - The string must be formatted as `[0-9]*`
  4799. - The result must fit into an `uint256` type
  4800. [.contract-item]
  4801. [[Strings-parseUint-string-uint256-uint256-]]
  4802. ==== `[.contract-item-name]#++parseUint++#++(string input, uint256 begin, uint256 end) โ†’ uint256++` [.item-kind]#internal#
  4803. Variant of {parseUint} that parses a substring of `input` located between position `begin` (included) and
  4804. `end` (excluded).
  4805. Requirements:
  4806. - The substring must be formatted as `[0-9]*`
  4807. - The result must fit into an `uint256` type
  4808. [.contract-item]
  4809. [[Strings-tryParseUint-string-]]
  4810. ==== `[.contract-item-name]#++tryParseUint++#++(string input) โ†’ bool success, uint256 value++` [.item-kind]#internal#
  4811. Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.
  4812. NOTE: This function will revert if the result does not fit in a `uint256`.
  4813. [.contract-item]
  4814. [[Strings-tryParseUint-string-uint256-uint256-]]
  4815. ==== `[.contract-item-name]#++tryParseUint++#++(string input, uint256 begin, uint256 end) โ†’ bool success, uint256 value++` [.item-kind]#internal#
  4816. Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid
  4817. character.
  4818. NOTE: This function will revert if the result does not fit in a `uint256`.
  4819. [.contract-item]
  4820. [[Strings-parseInt-string-]]
  4821. ==== `[.contract-item-name]#++parseInt++#++(string input) โ†’ int256++` [.item-kind]#internal#
  4822. Parse a decimal string and returns the value as a `int256`.
  4823. Requirements:
  4824. - The string must be formatted as `[-+]?[0-9]*`
  4825. - The result must fit in an `int256` type.
  4826. [.contract-item]
  4827. [[Strings-parseInt-string-uint256-uint256-]]
  4828. ==== `[.contract-item-name]#++parseInt++#++(string input, uint256 begin, uint256 end) โ†’ int256++` [.item-kind]#internal#
  4829. Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and
  4830. `end` (excluded).
  4831. Requirements:
  4832. - The substring must be formatted as `[-+]?[0-9]*`
  4833. - The result must fit in an `int256` type.
  4834. [.contract-item]
  4835. [[Strings-tryParseInt-string-]]
  4836. ==== `[.contract-item-name]#++tryParseInt++#++(string input) โ†’ bool success, int256 value++` [.item-kind]#internal#
  4837. Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if
  4838. the result does not fit in a `int256`.
  4839. NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.
  4840. [.contract-item]
  4841. [[Strings-tryParseInt-string-uint256-uint256-]]
  4842. ==== `[.contract-item-name]#++tryParseInt++#++(string input, uint256 begin, uint256 end) โ†’ bool success, int256 value++` [.item-kind]#internal#
  4843. Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid
  4844. character or if the result does not fit in a `int256`.
  4845. NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.
  4846. [.contract-item]
  4847. [[Strings-parseHexUint-string-]]
  4848. ==== `[.contract-item-name]#++parseHexUint++#++(string input) โ†’ uint256++` [.item-kind]#internal#
  4849. Parse a hexadecimal string (with or without "0x" prefix), and returns the value as a `uint256`.
  4850. Requirements:
  4851. - The string must be formatted as `(0x)?[0-9a-fA-F]*`
  4852. - The result must fit in an `uint256` type.
  4853. [.contract-item]
  4854. [[Strings-parseHexUint-string-uint256-uint256-]]
  4855. ==== `[.contract-item-name]#++parseHexUint++#++(string input, uint256 begin, uint256 end) โ†’ uint256++` [.item-kind]#internal#
  4856. Variant of {parseHexUint} that parses a substring of `input` located between position `begin` (included) and
  4857. `end` (excluded).
  4858. Requirements:
  4859. - The substring must be formatted as `(0x)?[0-9a-fA-F]*`
  4860. - The result must fit in an `uint256` type.
  4861. [.contract-item]
  4862. [[Strings-tryParseHexUint-string-]]
  4863. ==== `[.contract-item-name]#++tryParseHexUint++#++(string input) โ†’ bool success, uint256 value++` [.item-kind]#internal#
  4864. Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.
  4865. NOTE: This function will revert if the result does not fit in a `uint256`.
  4866. [.contract-item]
  4867. [[Strings-tryParseHexUint-string-uint256-uint256-]]
  4868. ==== `[.contract-item-name]#++tryParseHexUint++#++(string input, uint256 begin, uint256 end) โ†’ bool success, uint256 value++` [.item-kind]#internal#
  4869. Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an
  4870. invalid character.
  4871. NOTE: This function will revert if the result does not fit in a `uint256`.
  4872. [.contract-item]
  4873. [[Strings-parseAddress-string-]]
  4874. ==== `[.contract-item-name]#++parseAddress++#++(string input) โ†’ address++` [.item-kind]#internal#
  4875. Parse a hexadecimal string (with or without "0x" prefix), and returns the value as an `address`.
  4876. Requirements:
  4877. - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`
  4878. [.contract-item]
  4879. [[Strings-parseAddress-string-uint256-uint256-]]
  4880. ==== `[.contract-item-name]#++parseAddress++#++(string input, uint256 begin, uint256 end) โ†’ address++` [.item-kind]#internal#
  4881. Variant of {parseAddress} that parses a substring of `input` located between position `begin` (included) and
  4882. `end` (excluded).
  4883. Requirements:
  4884. - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`
  4885. [.contract-item]
  4886. [[Strings-tryParseAddress-string-]]
  4887. ==== `[.contract-item-name]#++tryParseAddress++#++(string input) โ†’ bool success, address value++` [.item-kind]#internal#
  4888. Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly
  4889. formatted address. See {parseAddress} requirements.
  4890. [.contract-item]
  4891. [[Strings-tryParseAddress-string-uint256-uint256-]]
  4892. ==== `[.contract-item-name]#++tryParseAddress++#++(string input, uint256 begin, uint256 end) โ†’ bool success, address value++` [.item-kind]#internal#
  4893. Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly
  4894. formatted address. See {parseAddress} requirements.
  4895. [.contract-item]
  4896. [[Strings-StringsInsufficientHexLength-uint256-uint256-]]
  4897. ==== `[.contract-item-name]#++StringsInsufficientHexLength++#++(uint256 value, uint256 length)++` [.item-kind]#error#
  4898. The `value` string doesn't fit in the specified `length`.
  4899. [.contract-item]
  4900. [[Strings-StringsInvalidChar--]]
  4901. ==== `[.contract-item-name]#++StringsInvalidChar++#++()++` [.item-kind]#error#
  4902. The string being parsed contains characters that are not in scope of the given base.
  4903. [.contract-item]
  4904. [[Strings-StringsInvalidAddressFormat--]]
  4905. ==== `[.contract-item-name]#++StringsInvalidAddressFormat++#++()++` [.item-kind]#error#
  4906. The string being parsed is not a properly formatted address.
  4907. :StringTooLong: pass:normal[xref:#ShortStrings-StringTooLong-string-[`++StringTooLong++`]]
  4908. :InvalidShortString: pass:normal[xref:#ShortStrings-InvalidShortString--[`++InvalidShortString++`]]
  4909. :toShortString: pass:normal[xref:#ShortStrings-toShortString-string-[`++toShortString++`]]
  4910. :toString: pass:normal[xref:#ShortStrings-toString-ShortString-[`++toString++`]]
  4911. :byteLength: pass:normal[xref:#ShortStrings-byteLength-ShortString-[`++byteLength++`]]
  4912. :toShortStringWithFallback: pass:normal[xref:#ShortStrings-toShortStringWithFallback-string-string-[`++toShortStringWithFallback++`]]
  4913. :toStringWithFallback: pass:normal[xref:#ShortStrings-toStringWithFallback-ShortString-string-[`++toStringWithFallback++`]]
  4914. :byteLengthWithFallback: pass:normal[xref:#ShortStrings-byteLengthWithFallback-ShortString-string-[`++byteLengthWithFallback++`]]
  4915. [.contract]
  4916. [[ShortStrings]]
  4917. === `++ShortStrings++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/ShortStrings.sol[{github-icon},role=heading-link]
  4918. [.hljs-theme-light.nopadding]
  4919. ```solidity
  4920. import "@openzeppelin/contracts/utils/ShortStrings.sol";
  4921. ```
  4922. This library provides functions to convert short memory strings
  4923. into a `ShortString` type that can be used as an immutable variable.
  4924. Strings of arbitrary length can be optimized using this library if
  4925. they are short enough (up to 31 bytes) by packing them with their
  4926. length (1 byte) in a single EVM word (32 bytes). Additionally, a
  4927. fallback mechanism can be used for every other case.
  4928. Usage example:
  4929. ```solidity
  4930. contract Named {
  4931. using ShortStrings for *;
  4932. ShortString private immutable _name;
  4933. string private _nameFallback;
  4934. constructor(string memory contractName) {
  4935. _name = contractName.toShortStringWithFallback(_nameFallback);
  4936. }
  4937. function name() external view returns (string memory) {
  4938. return _name.toStringWithFallback(_nameFallback);
  4939. }
  4940. }
  4941. ```
  4942. [.contract-index]
  4943. .Functions
  4944. --
  4945. * {xref-ShortStrings-toShortString-string-}[`++toShortString(str)++`]
  4946. * {xref-ShortStrings-toString-ShortString-}[`++toString(sstr)++`]
  4947. * {xref-ShortStrings-byteLength-ShortString-}[`++byteLength(sstr)++`]
  4948. * {xref-ShortStrings-toShortStringWithFallback-string-string-}[`++toShortStringWithFallback(value, store)++`]
  4949. * {xref-ShortStrings-toStringWithFallback-ShortString-string-}[`++toStringWithFallback(value, store)++`]
  4950. * {xref-ShortStrings-byteLengthWithFallback-ShortString-string-}[`++byteLengthWithFallback(value, store)++`]
  4951. --
  4952. [.contract-index]
  4953. .Errors
  4954. --
  4955. * {xref-ShortStrings-StringTooLong-string-}[`++StringTooLong(str)++`]
  4956. * {xref-ShortStrings-InvalidShortString--}[`++InvalidShortString()++`]
  4957. --
  4958. [.contract-item]
  4959. [[ShortStrings-toShortString-string-]]
  4960. ==== `[.contract-item-name]#++toShortString++#++(string str) โ†’ ShortString++` [.item-kind]#internal#
  4961. Encode a string of at most 31 chars into a `ShortString`.
  4962. This will trigger a `StringTooLong` error is the input string is too long.
  4963. [.contract-item]
  4964. [[ShortStrings-toString-ShortString-]]
  4965. ==== `[.contract-item-name]#++toString++#++(ShortString sstr) โ†’ string++` [.item-kind]#internal#
  4966. Decode a `ShortString` back to a "normal" string.
  4967. [.contract-item]
  4968. [[ShortStrings-byteLength-ShortString-]]
  4969. ==== `[.contract-item-name]#++byteLength++#++(ShortString sstr) โ†’ uint256++` [.item-kind]#internal#
  4970. Return the length of a `ShortString`.
  4971. [.contract-item]
  4972. [[ShortStrings-toShortStringWithFallback-string-string-]]
  4973. ==== `[.contract-item-name]#++toShortStringWithFallback++#++(string value, string store) โ†’ ShortString++` [.item-kind]#internal#
  4974. Encode a string into a `ShortString`, or write it to storage if it is too long.
  4975. [.contract-item]
  4976. [[ShortStrings-toStringWithFallback-ShortString-string-]]
  4977. ==== `[.contract-item-name]#++toStringWithFallback++#++(ShortString value, string store) โ†’ string++` [.item-kind]#internal#
  4978. Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
  4979. [.contract-item]
  4980. [[ShortStrings-byteLengthWithFallback-ShortString-string-]]
  4981. ==== `[.contract-item-name]#++byteLengthWithFallback++#++(ShortString value, string store) โ†’ uint256++` [.item-kind]#internal#
  4982. Return the length of a string that was encoded to `ShortString` or written to storage using
  4983. {setWithFallback}.
  4984. WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
  4985. actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
  4986. [.contract-item]
  4987. [[ShortStrings-StringTooLong-string-]]
  4988. ==== `[.contract-item-name]#++StringTooLong++#++(string str)++` [.item-kind]#error#
  4989. [.contract-item]
  4990. [[ShortStrings-InvalidShortString--]]
  4991. ==== `[.contract-item-name]#++InvalidShortString++#++()++` [.item-kind]#error#
  4992. :erc7201Slot: pass:normal[xref:#SlotDerivation-erc7201Slot-string-[`++erc7201Slot++`]]
  4993. :offset: pass:normal[xref:#SlotDerivation-offset-bytes32-uint256-[`++offset++`]]
  4994. :deriveArray: pass:normal[xref:#SlotDerivation-deriveArray-bytes32-[`++deriveArray++`]]
  4995. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-address-[`++deriveMapping++`]]
  4996. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-bool-[`++deriveMapping++`]]
  4997. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-bytes32-[`++deriveMapping++`]]
  4998. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-uint256-[`++deriveMapping++`]]
  4999. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-int256-[`++deriveMapping++`]]
  5000. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-string-[`++deriveMapping++`]]
  5001. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-bytes-[`++deriveMapping++`]]
  5002. [.contract]
  5003. [[SlotDerivation]]
  5004. === `++SlotDerivation++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/SlotDerivation.sol[{github-icon},role=heading-link]
  5005. [.hljs-theme-light.nopadding]
  5006. ```solidity
  5007. import "@openzeppelin/contracts/utils/SlotDerivation.sol";
  5008. ```
  5009. Library for computing storage (and transient storage) locations from namespaces and deriving slots
  5010. corresponding to standard patterns. The derivation method for array and mapping matches the storage layout used by
  5011. the solidity language / compiler.
  5012. See https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays[Solidity docs for mappings and dynamic arrays.].
  5013. Example usage:
  5014. ```solidity
  5015. contract Example {
  5016. // Add the library methods
  5017. using StorageSlot for bytes32;
  5018. using SlotDerivation for bytes32;
  5019. // Declare a namespace
  5020. string private constant _NAMESPACE = "<namespace>" // eg. OpenZeppelin.Slot
  5021. function setValueInNamespace(uint256 key, address newValue) internal {
  5022. _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value = newValue;
  5023. }
  5024. function getValueInNamespace(uint256 key) internal view returns (address) {
  5025. return _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value;
  5026. }
  5027. }
  5028. ```
  5029. TIP: Consider using this library along with {StorageSlot}.
  5030. NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking
  5031. upgrade safety will ignore the slots accessed through this library.
  5032. _Available since v5.1._
  5033. [.contract-index]
  5034. .Functions
  5035. --
  5036. * {xref-SlotDerivation-erc7201Slot-string-}[`++erc7201Slot(namespace)++`]
  5037. * {xref-SlotDerivation-offset-bytes32-uint256-}[`++offset(slot, pos)++`]
  5038. * {xref-SlotDerivation-deriveArray-bytes32-}[`++deriveArray(slot)++`]
  5039. * {xref-SlotDerivation-deriveMapping-bytes32-address-}[`++deriveMapping(slot, key)++`]
  5040. * {xref-SlotDerivation-deriveMapping-bytes32-bool-}[`++deriveMapping(slot, key)++`]
  5041. * {xref-SlotDerivation-deriveMapping-bytes32-bytes32-}[`++deriveMapping(slot, key)++`]
  5042. * {xref-SlotDerivation-deriveMapping-bytes32-uint256-}[`++deriveMapping(slot, key)++`]
  5043. * {xref-SlotDerivation-deriveMapping-bytes32-int256-}[`++deriveMapping(slot, key)++`]
  5044. * {xref-SlotDerivation-deriveMapping-bytes32-string-}[`++deriveMapping(slot, key)++`]
  5045. * {xref-SlotDerivation-deriveMapping-bytes32-bytes-}[`++deriveMapping(slot, key)++`]
  5046. --
  5047. [.contract-item]
  5048. [[SlotDerivation-erc7201Slot-string-]]
  5049. ==== `[.contract-item-name]#++erc7201Slot++#++(string namespace) โ†’ bytes32 slot++` [.item-kind]#internal#
  5050. Derive an ERC-7201 slot from a string (namespace).
  5051. [.contract-item]
  5052. [[SlotDerivation-offset-bytes32-uint256-]]
  5053. ==== `[.contract-item-name]#++offset++#++(bytes32 slot, uint256 pos) โ†’ bytes32 result++` [.item-kind]#internal#
  5054. Add an offset to a slot to get the n-th element of a structure or an array.
  5055. [.contract-item]
  5056. [[SlotDerivation-deriveArray-bytes32-]]
  5057. ==== `[.contract-item-name]#++deriveArray++#++(bytes32 slot) โ†’ bytes32 result++` [.item-kind]#internal#
  5058. Derive the location of the first element in an array from the slot where the length is stored.
  5059. [.contract-item]
  5060. [[SlotDerivation-deriveMapping-bytes32-address-]]
  5061. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, address key) โ†’ bytes32 result++` [.item-kind]#internal#
  5062. Derive the location of a mapping element from the key.
  5063. [.contract-item]
  5064. [[SlotDerivation-deriveMapping-bytes32-bool-]]
  5065. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, bool key) โ†’ bytes32 result++` [.item-kind]#internal#
  5066. Derive the location of a mapping element from the key.
  5067. [.contract-item]
  5068. [[SlotDerivation-deriveMapping-bytes32-bytes32-]]
  5069. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, bytes32 key) โ†’ bytes32 result++` [.item-kind]#internal#
  5070. Derive the location of a mapping element from the key.
  5071. [.contract-item]
  5072. [[SlotDerivation-deriveMapping-bytes32-uint256-]]
  5073. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, uint256 key) โ†’ bytes32 result++` [.item-kind]#internal#
  5074. Derive the location of a mapping element from the key.
  5075. [.contract-item]
  5076. [[SlotDerivation-deriveMapping-bytes32-int256-]]
  5077. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, int256 key) โ†’ bytes32 result++` [.item-kind]#internal#
  5078. Derive the location of a mapping element from the key.
  5079. [.contract-item]
  5080. [[SlotDerivation-deriveMapping-bytes32-string-]]
  5081. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, string key) โ†’ bytes32 result++` [.item-kind]#internal#
  5082. Derive the location of a mapping element from the key.
  5083. [.contract-item]
  5084. [[SlotDerivation-deriveMapping-bytes32-bytes-]]
  5085. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, bytes key) โ†’ bytes32 result++` [.item-kind]#internal#
  5086. Derive the location of a mapping element from the key.
  5087. :AddressSlot: pass:normal[xref:#StorageSlot-AddressSlot[`++AddressSlot++`]]
  5088. :BooleanSlot: pass:normal[xref:#StorageSlot-BooleanSlot[`++BooleanSlot++`]]
  5089. :Bytes32Slot: pass:normal[xref:#StorageSlot-Bytes32Slot[`++Bytes32Slot++`]]
  5090. :Uint256Slot: pass:normal[xref:#StorageSlot-Uint256Slot[`++Uint256Slot++`]]
  5091. :Int256Slot: pass:normal[xref:#StorageSlot-Int256Slot[`++Int256Slot++`]]
  5092. :StringSlot: pass:normal[xref:#StorageSlot-StringSlot[`++StringSlot++`]]
  5093. :BytesSlot: pass:normal[xref:#StorageSlot-BytesSlot[`++BytesSlot++`]]
  5094. :getAddressSlot: pass:normal[xref:#StorageSlot-getAddressSlot-bytes32-[`++getAddressSlot++`]]
  5095. :getBooleanSlot: pass:normal[xref:#StorageSlot-getBooleanSlot-bytes32-[`++getBooleanSlot++`]]
  5096. :getBytes32Slot: pass:normal[xref:#StorageSlot-getBytes32Slot-bytes32-[`++getBytes32Slot++`]]
  5097. :getUint256Slot: pass:normal[xref:#StorageSlot-getUint256Slot-bytes32-[`++getUint256Slot++`]]
  5098. :getInt256Slot: pass:normal[xref:#StorageSlot-getInt256Slot-bytes32-[`++getInt256Slot++`]]
  5099. :getStringSlot: pass:normal[xref:#StorageSlot-getStringSlot-bytes32-[`++getStringSlot++`]]
  5100. :getStringSlot: pass:normal[xref:#StorageSlot-getStringSlot-string-[`++getStringSlot++`]]
  5101. :getBytesSlot: pass:normal[xref:#StorageSlot-getBytesSlot-bytes32-[`++getBytesSlot++`]]
  5102. :getBytesSlot: pass:normal[xref:#StorageSlot-getBytesSlot-bytes-[`++getBytesSlot++`]]
  5103. [.contract]
  5104. [[StorageSlot]]
  5105. === `++StorageSlot++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/StorageSlot.sol[{github-icon},role=heading-link]
  5106. [.hljs-theme-light.nopadding]
  5107. ```solidity
  5108. import "@openzeppelin/contracts/utils/StorageSlot.sol";
  5109. ```
  5110. Library for reading and writing primitive types to specific storage slots.
  5111. Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
  5112. This library helps with reading and writing to such slots without the need for inline assembly.
  5113. The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
  5114. Example usage to set ERC-1967 implementation slot:
  5115. ```solidity
  5116. contract ERC1967 {
  5117. // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
  5118. bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
  5119. function _getImplementation() internal view returns (address) {
  5120. return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
  5121. }
  5122. function _setImplementation(address newImplementation) internal {
  5123. require(newImplementation.code.length > 0);
  5124. StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
  5125. }
  5126. }
  5127. ```
  5128. TIP: Consider using this library along with {SlotDerivation}.
  5129. [.contract-index]
  5130. .Functions
  5131. --
  5132. * {xref-StorageSlot-getAddressSlot-bytes32-}[`++getAddressSlot(slot)++`]
  5133. * {xref-StorageSlot-getBooleanSlot-bytes32-}[`++getBooleanSlot(slot)++`]
  5134. * {xref-StorageSlot-getBytes32Slot-bytes32-}[`++getBytes32Slot(slot)++`]
  5135. * {xref-StorageSlot-getUint256Slot-bytes32-}[`++getUint256Slot(slot)++`]
  5136. * {xref-StorageSlot-getInt256Slot-bytes32-}[`++getInt256Slot(slot)++`]
  5137. * {xref-StorageSlot-getStringSlot-bytes32-}[`++getStringSlot(slot)++`]
  5138. * {xref-StorageSlot-getStringSlot-string-}[`++getStringSlot(store)++`]
  5139. * {xref-StorageSlot-getBytesSlot-bytes32-}[`++getBytesSlot(slot)++`]
  5140. * {xref-StorageSlot-getBytesSlot-bytes-}[`++getBytesSlot(store)++`]
  5141. --
  5142. [.contract-item]
  5143. [[StorageSlot-getAddressSlot-bytes32-]]
  5144. ==== `[.contract-item-name]#++getAddressSlot++#++(bytes32 slot) โ†’ struct StorageSlot.AddressSlot r++` [.item-kind]#internal#
  5145. Returns an `AddressSlot` with member `value` located at `slot`.
  5146. [.contract-item]
  5147. [[StorageSlot-getBooleanSlot-bytes32-]]
  5148. ==== `[.contract-item-name]#++getBooleanSlot++#++(bytes32 slot) โ†’ struct StorageSlot.BooleanSlot r++` [.item-kind]#internal#
  5149. Returns a `BooleanSlot` with member `value` located at `slot`.
  5150. [.contract-item]
  5151. [[StorageSlot-getBytes32Slot-bytes32-]]
  5152. ==== `[.contract-item-name]#++getBytes32Slot++#++(bytes32 slot) โ†’ struct StorageSlot.Bytes32Slot r++` [.item-kind]#internal#
  5153. Returns a `Bytes32Slot` with member `value` located at `slot`.
  5154. [.contract-item]
  5155. [[StorageSlot-getUint256Slot-bytes32-]]
  5156. ==== `[.contract-item-name]#++getUint256Slot++#++(bytes32 slot) โ†’ struct StorageSlot.Uint256Slot r++` [.item-kind]#internal#
  5157. Returns a `Uint256Slot` with member `value` located at `slot`.
  5158. [.contract-item]
  5159. [[StorageSlot-getInt256Slot-bytes32-]]
  5160. ==== `[.contract-item-name]#++getInt256Slot++#++(bytes32 slot) โ†’ struct StorageSlot.Int256Slot r++` [.item-kind]#internal#
  5161. Returns a `Int256Slot` with member `value` located at `slot`.
  5162. [.contract-item]
  5163. [[StorageSlot-getStringSlot-bytes32-]]
  5164. ==== `[.contract-item-name]#++getStringSlot++#++(bytes32 slot) โ†’ struct StorageSlot.StringSlot r++` [.item-kind]#internal#
  5165. Returns a `StringSlot` with member `value` located at `slot`.
  5166. [.contract-item]
  5167. [[StorageSlot-getStringSlot-string-]]
  5168. ==== `[.contract-item-name]#++getStringSlot++#++(string store) โ†’ struct StorageSlot.StringSlot r++` [.item-kind]#internal#
  5169. Returns an `StringSlot` representation of the string storage pointer `store`.
  5170. [.contract-item]
  5171. [[StorageSlot-getBytesSlot-bytes32-]]
  5172. ==== `[.contract-item-name]#++getBytesSlot++#++(bytes32 slot) โ†’ struct StorageSlot.BytesSlot r++` [.item-kind]#internal#
  5173. Returns a `BytesSlot` with member `value` located at `slot`.
  5174. [.contract-item]
  5175. [[StorageSlot-getBytesSlot-bytes-]]
  5176. ==== `[.contract-item-name]#++getBytesSlot++#++(bytes store) โ†’ struct StorageSlot.BytesSlot r++` [.item-kind]#internal#
  5177. Returns an `BytesSlot` representation of the bytes storage pointer `store`.
  5178. :AddressSlot: pass:normal[xref:#TransientSlot-AddressSlot[`++AddressSlot++`]]
  5179. :asAddress: pass:normal[xref:#TransientSlot-asAddress-bytes32-[`++asAddress++`]]
  5180. :BooleanSlot: pass:normal[xref:#TransientSlot-BooleanSlot[`++BooleanSlot++`]]
  5181. :asBoolean: pass:normal[xref:#TransientSlot-asBoolean-bytes32-[`++asBoolean++`]]
  5182. :Bytes32Slot: pass:normal[xref:#TransientSlot-Bytes32Slot[`++Bytes32Slot++`]]
  5183. :asBytes32: pass:normal[xref:#TransientSlot-asBytes32-bytes32-[`++asBytes32++`]]
  5184. :Uint256Slot: pass:normal[xref:#TransientSlot-Uint256Slot[`++Uint256Slot++`]]
  5185. :asUint256: pass:normal[xref:#TransientSlot-asUint256-bytes32-[`++asUint256++`]]
  5186. :Int256Slot: pass:normal[xref:#TransientSlot-Int256Slot[`++Int256Slot++`]]
  5187. :asInt256: pass:normal[xref:#TransientSlot-asInt256-bytes32-[`++asInt256++`]]
  5188. :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-AddressSlot-[`++tload++`]]
  5189. :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-AddressSlot-address-[`++tstore++`]]
  5190. :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-BooleanSlot-[`++tload++`]]
  5191. :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-BooleanSlot-bool-[`++tstore++`]]
  5192. :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-Bytes32Slot-[`++tload++`]]
  5193. :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-[`++tstore++`]]
  5194. :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-Uint256Slot-[`++tload++`]]
  5195. :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-[`++tstore++`]]
  5196. :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-Int256Slot-[`++tload++`]]
  5197. :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-Int256Slot-int256-[`++tstore++`]]
  5198. [.contract]
  5199. [[TransientSlot]]
  5200. === `++TransientSlot++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/TransientSlot.sol[{github-icon},role=heading-link]
  5201. [.hljs-theme-light.nopadding]
  5202. ```solidity
  5203. import "@openzeppelin/contracts/utils/TransientSlot.sol";
  5204. ```
  5205. Library for reading and writing value-types to specific transient storage slots.
  5206. Transient slots are often used to store temporary values that are removed after the current transaction.
  5207. This library helps with reading and writing to such slots without the need for inline assembly.
  5208. * Example reading and writing values using transient storage:
  5209. ```solidity
  5210. contract Lock {
  5211. using TransientSlot for *;
  5212. // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
  5213. bytes32 internal constant _LOCK_SLOT = 0xf4678858b2b588224636b8522b729e7722d32fc491da849ed75b3fdf3c84f542;
  5214. modifier locked() {
  5215. require(!_LOCK_SLOT.asBoolean().tload());
  5216. _LOCK_SLOT.asBoolean().tstore(true);
  5217. _;
  5218. _LOCK_SLOT.asBoolean().tstore(false);
  5219. }
  5220. }
  5221. ```
  5222. TIP: Consider using this library along with {SlotDerivation}.
  5223. [.contract-index]
  5224. .Functions
  5225. --
  5226. * {xref-TransientSlot-asAddress-bytes32-}[`++asAddress(slot)++`]
  5227. * {xref-TransientSlot-asBoolean-bytes32-}[`++asBoolean(slot)++`]
  5228. * {xref-TransientSlot-asBytes32-bytes32-}[`++asBytes32(slot)++`]
  5229. * {xref-TransientSlot-asUint256-bytes32-}[`++asUint256(slot)++`]
  5230. * {xref-TransientSlot-asInt256-bytes32-}[`++asInt256(slot)++`]
  5231. * {xref-TransientSlot-tload-TransientSlot-AddressSlot-}[`++tload(slot)++`]
  5232. * {xref-TransientSlot-tstore-TransientSlot-AddressSlot-address-}[`++tstore(slot, value)++`]
  5233. * {xref-TransientSlot-tload-TransientSlot-BooleanSlot-}[`++tload(slot)++`]
  5234. * {xref-TransientSlot-tstore-TransientSlot-BooleanSlot-bool-}[`++tstore(slot, value)++`]
  5235. * {xref-TransientSlot-tload-TransientSlot-Bytes32Slot-}[`++tload(slot)++`]
  5236. * {xref-TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-}[`++tstore(slot, value)++`]
  5237. * {xref-TransientSlot-tload-TransientSlot-Uint256Slot-}[`++tload(slot)++`]
  5238. * {xref-TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-}[`++tstore(slot, value)++`]
  5239. * {xref-TransientSlot-tload-TransientSlot-Int256Slot-}[`++tload(slot)++`]
  5240. * {xref-TransientSlot-tstore-TransientSlot-Int256Slot-int256-}[`++tstore(slot, value)++`]
  5241. --
  5242. [.contract-item]
  5243. [[TransientSlot-asAddress-bytes32-]]
  5244. ==== `[.contract-item-name]#++asAddress++#++(bytes32 slot) โ†’ TransientSlot.AddressSlot++` [.item-kind]#internal#
  5245. Cast an arbitrary slot to a AddressSlot.
  5246. [.contract-item]
  5247. [[TransientSlot-asBoolean-bytes32-]]
  5248. ==== `[.contract-item-name]#++asBoolean++#++(bytes32 slot) โ†’ TransientSlot.BooleanSlot++` [.item-kind]#internal#
  5249. Cast an arbitrary slot to a BooleanSlot.
  5250. [.contract-item]
  5251. [[TransientSlot-asBytes32-bytes32-]]
  5252. ==== `[.contract-item-name]#++asBytes32++#++(bytes32 slot) โ†’ TransientSlot.Bytes32Slot++` [.item-kind]#internal#
  5253. Cast an arbitrary slot to a Bytes32Slot.
  5254. [.contract-item]
  5255. [[TransientSlot-asUint256-bytes32-]]
  5256. ==== `[.contract-item-name]#++asUint256++#++(bytes32 slot) โ†’ TransientSlot.Uint256Slot++` [.item-kind]#internal#
  5257. Cast an arbitrary slot to a Uint256Slot.
  5258. [.contract-item]
  5259. [[TransientSlot-asInt256-bytes32-]]
  5260. ==== `[.contract-item-name]#++asInt256++#++(bytes32 slot) โ†’ TransientSlot.Int256Slot++` [.item-kind]#internal#
  5261. Cast an arbitrary slot to a Int256Slot.
  5262. [.contract-item]
  5263. [[TransientSlot-tload-TransientSlot-AddressSlot-]]
  5264. ==== `[.contract-item-name]#++tload++#++(TransientSlot.AddressSlot slot) โ†’ address value++` [.item-kind]#internal#
  5265. Load the value held at location `slot` in transient storage.
  5266. [.contract-item]
  5267. [[TransientSlot-tstore-TransientSlot-AddressSlot-address-]]
  5268. ==== `[.contract-item-name]#++tstore++#++(TransientSlot.AddressSlot slot, address value)++` [.item-kind]#internal#
  5269. Store `value` at location `slot` in transient storage.
  5270. [.contract-item]
  5271. [[TransientSlot-tload-TransientSlot-BooleanSlot-]]
  5272. ==== `[.contract-item-name]#++tload++#++(TransientSlot.BooleanSlot slot) โ†’ bool value++` [.item-kind]#internal#
  5273. Load the value held at location `slot` in transient storage.
  5274. [.contract-item]
  5275. [[TransientSlot-tstore-TransientSlot-BooleanSlot-bool-]]
  5276. ==== `[.contract-item-name]#++tstore++#++(TransientSlot.BooleanSlot slot, bool value)++` [.item-kind]#internal#
  5277. Store `value` at location `slot` in transient storage.
  5278. [.contract-item]
  5279. [[TransientSlot-tload-TransientSlot-Bytes32Slot-]]
  5280. ==== `[.contract-item-name]#++tload++#++(TransientSlot.Bytes32Slot slot) โ†’ bytes32 value++` [.item-kind]#internal#
  5281. Load the value held at location `slot` in transient storage.
  5282. [.contract-item]
  5283. [[TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-]]
  5284. ==== `[.contract-item-name]#++tstore++#++(TransientSlot.Bytes32Slot slot, bytes32 value)++` [.item-kind]#internal#
  5285. Store `value` at location `slot` in transient storage.
  5286. [.contract-item]
  5287. [[TransientSlot-tload-TransientSlot-Uint256Slot-]]
  5288. ==== `[.contract-item-name]#++tload++#++(TransientSlot.Uint256Slot slot) โ†’ uint256 value++` [.item-kind]#internal#
  5289. Load the value held at location `slot` in transient storage.
  5290. [.contract-item]
  5291. [[TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-]]
  5292. ==== `[.contract-item-name]#++tstore++#++(TransientSlot.Uint256Slot slot, uint256 value)++` [.item-kind]#internal#
  5293. Store `value` at location `slot` in transient storage.
  5294. [.contract-item]
  5295. [[TransientSlot-tload-TransientSlot-Int256Slot-]]
  5296. ==== `[.contract-item-name]#++tload++#++(TransientSlot.Int256Slot slot) โ†’ int256 value++` [.item-kind]#internal#
  5297. Load the value held at location `slot` in transient storage.
  5298. [.contract-item]
  5299. [[TransientSlot-tstore-TransientSlot-Int256Slot-int256-]]
  5300. ==== `[.contract-item-name]#++tstore++#++(TransientSlot.Int256Slot slot, int256 value)++` [.item-kind]#internal#
  5301. Store `value` at location `slot` in transient storage.
  5302. :multicall: pass:normal[xref:#Multicall-multicall-bytes---[`++multicall++`]]
  5303. [.contract]
  5304. [[Multicall]]
  5305. === `++Multicall++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Multicall.sol[{github-icon},role=heading-link]
  5306. [.hljs-theme-light.nopadding]
  5307. ```solidity
  5308. import "@openzeppelin/contracts/utils/Multicall.sol";
  5309. ```
  5310. Provides a function to batch together multiple calls in a single external call.
  5311. Consider any assumption about calldata validation performed by the sender may be violated if it's not especially
  5312. careful about sending transactions invoking {multicall}. For example, a relay address that filters function
  5313. selectors won't filter calls nested within a {multicall} operation.
  5314. NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}).
  5315. If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data`
  5316. to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of
  5317. {_msgSender} are not propagated to subcalls.
  5318. [.contract-index]
  5319. .Functions
  5320. --
  5321. * {xref-Multicall-multicall-bytes---}[`++multicall(data)++`]
  5322. --
  5323. [.contract-item]
  5324. [[Multicall-multicall-bytes---]]
  5325. ==== `[.contract-item-name]#++multicall++#++(bytes[] data) โ†’ bytes[] results++` [.item-kind]#external#
  5326. Receives and executes a batch of function calls on this contract.
  5327. :_msgSender: pass:normal[xref:#Context-_msgSender--[`++_msgSender++`]]
  5328. :_msgData: pass:normal[xref:#Context-_msgData--[`++_msgData++`]]
  5329. :_contextSuffixLength: pass:normal[xref:#Context-_contextSuffixLength--[`++_contextSuffixLength++`]]
  5330. [.contract]
  5331. [[Context]]
  5332. === `++Context++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Context.sol[{github-icon},role=heading-link]
  5333. [.hljs-theme-light.nopadding]
  5334. ```solidity
  5335. import "@openzeppelin/contracts/utils/Context.sol";
  5336. ```
  5337. Provides information about the current execution context, including the
  5338. sender of the transaction and its data. While these are generally available
  5339. via msg.sender and msg.data, they should not be accessed in such a direct
  5340. manner, since when dealing with meta-transactions the account sending and
  5341. paying for execution may not be the actual sender (as far as an application
  5342. is concerned).
  5343. This contract is only required for intermediate, library-like contracts.
  5344. [.contract-index]
  5345. .Functions
  5346. --
  5347. * {xref-Context-_msgSender--}[`++_msgSender()++`]
  5348. * {xref-Context-_msgData--}[`++_msgData()++`]
  5349. * {xref-Context-_contextSuffixLength--}[`++_contextSuffixLength()++`]
  5350. --
  5351. [.contract-item]
  5352. [[Context-_msgSender--]]
  5353. ==== `[.contract-item-name]#++_msgSender++#++() โ†’ address++` [.item-kind]#internal#
  5354. [.contract-item]
  5355. [[Context-_msgData--]]
  5356. ==== `[.contract-item-name]#++_msgData++#++() โ†’ bytes++` [.item-kind]#internal#
  5357. [.contract-item]
  5358. [[Context-_contextSuffixLength--]]
  5359. ==== `[.contract-item-name]#++_contextSuffixLength++#++() โ†’ uint256++` [.item-kind]#internal#
  5360. :OutOfRangeAccess: pass:normal[xref:#Packing-OutOfRangeAccess--[`++OutOfRangeAccess++`]]
  5361. :pack_1_1: pass:normal[xref:#Packing-pack_1_1-bytes1-bytes1-[`++pack_1_1++`]]
  5362. :pack_2_2: pass:normal[xref:#Packing-pack_2_2-bytes2-bytes2-[`++pack_2_2++`]]
  5363. :pack_2_4: pass:normal[xref:#Packing-pack_2_4-bytes2-bytes4-[`++pack_2_4++`]]
  5364. :pack_2_6: pass:normal[xref:#Packing-pack_2_6-bytes2-bytes6-[`++pack_2_6++`]]
  5365. :pack_2_8: pass:normal[xref:#Packing-pack_2_8-bytes2-bytes8-[`++pack_2_8++`]]
  5366. :pack_2_10: pass:normal[xref:#Packing-pack_2_10-bytes2-bytes10-[`++pack_2_10++`]]
  5367. :pack_2_20: pass:normal[xref:#Packing-pack_2_20-bytes2-bytes20-[`++pack_2_20++`]]
  5368. :pack_2_22: pass:normal[xref:#Packing-pack_2_22-bytes2-bytes22-[`++pack_2_22++`]]
  5369. :pack_4_2: pass:normal[xref:#Packing-pack_4_2-bytes4-bytes2-[`++pack_4_2++`]]
  5370. :pack_4_4: pass:normal[xref:#Packing-pack_4_4-bytes4-bytes4-[`++pack_4_4++`]]
  5371. :pack_4_6: pass:normal[xref:#Packing-pack_4_6-bytes4-bytes6-[`++pack_4_6++`]]
  5372. :pack_4_8: pass:normal[xref:#Packing-pack_4_8-bytes4-bytes8-[`++pack_4_8++`]]
  5373. :pack_4_12: pass:normal[xref:#Packing-pack_4_12-bytes4-bytes12-[`++pack_4_12++`]]
  5374. :pack_4_16: pass:normal[xref:#Packing-pack_4_16-bytes4-bytes16-[`++pack_4_16++`]]
  5375. :pack_4_20: pass:normal[xref:#Packing-pack_4_20-bytes4-bytes20-[`++pack_4_20++`]]
  5376. :pack_4_24: pass:normal[xref:#Packing-pack_4_24-bytes4-bytes24-[`++pack_4_24++`]]
  5377. :pack_4_28: pass:normal[xref:#Packing-pack_4_28-bytes4-bytes28-[`++pack_4_28++`]]
  5378. :pack_6_2: pass:normal[xref:#Packing-pack_6_2-bytes6-bytes2-[`++pack_6_2++`]]
  5379. :pack_6_4: pass:normal[xref:#Packing-pack_6_4-bytes6-bytes4-[`++pack_6_4++`]]
  5380. :pack_6_6: pass:normal[xref:#Packing-pack_6_6-bytes6-bytes6-[`++pack_6_6++`]]
  5381. :pack_6_10: pass:normal[xref:#Packing-pack_6_10-bytes6-bytes10-[`++pack_6_10++`]]
  5382. :pack_6_16: pass:normal[xref:#Packing-pack_6_16-bytes6-bytes16-[`++pack_6_16++`]]
  5383. :pack_6_22: pass:normal[xref:#Packing-pack_6_22-bytes6-bytes22-[`++pack_6_22++`]]
  5384. :pack_8_2: pass:normal[xref:#Packing-pack_8_2-bytes8-bytes2-[`++pack_8_2++`]]
  5385. :pack_8_4: pass:normal[xref:#Packing-pack_8_4-bytes8-bytes4-[`++pack_8_4++`]]
  5386. :pack_8_8: pass:normal[xref:#Packing-pack_8_8-bytes8-bytes8-[`++pack_8_8++`]]
  5387. :pack_8_12: pass:normal[xref:#Packing-pack_8_12-bytes8-bytes12-[`++pack_8_12++`]]
  5388. :pack_8_16: pass:normal[xref:#Packing-pack_8_16-bytes8-bytes16-[`++pack_8_16++`]]
  5389. :pack_8_20: pass:normal[xref:#Packing-pack_8_20-bytes8-bytes20-[`++pack_8_20++`]]
  5390. :pack_8_24: pass:normal[xref:#Packing-pack_8_24-bytes8-bytes24-[`++pack_8_24++`]]
  5391. :pack_10_2: pass:normal[xref:#Packing-pack_10_2-bytes10-bytes2-[`++pack_10_2++`]]
  5392. :pack_10_6: pass:normal[xref:#Packing-pack_10_6-bytes10-bytes6-[`++pack_10_6++`]]
  5393. :pack_10_10: pass:normal[xref:#Packing-pack_10_10-bytes10-bytes10-[`++pack_10_10++`]]
  5394. :pack_10_12: pass:normal[xref:#Packing-pack_10_12-bytes10-bytes12-[`++pack_10_12++`]]
  5395. :pack_10_22: pass:normal[xref:#Packing-pack_10_22-bytes10-bytes22-[`++pack_10_22++`]]
  5396. :pack_12_4: pass:normal[xref:#Packing-pack_12_4-bytes12-bytes4-[`++pack_12_4++`]]
  5397. :pack_12_8: pass:normal[xref:#Packing-pack_12_8-bytes12-bytes8-[`++pack_12_8++`]]
  5398. :pack_12_10: pass:normal[xref:#Packing-pack_12_10-bytes12-bytes10-[`++pack_12_10++`]]
  5399. :pack_12_12: pass:normal[xref:#Packing-pack_12_12-bytes12-bytes12-[`++pack_12_12++`]]
  5400. :pack_12_16: pass:normal[xref:#Packing-pack_12_16-bytes12-bytes16-[`++pack_12_16++`]]
  5401. :pack_12_20: pass:normal[xref:#Packing-pack_12_20-bytes12-bytes20-[`++pack_12_20++`]]
  5402. :pack_16_4: pass:normal[xref:#Packing-pack_16_4-bytes16-bytes4-[`++pack_16_4++`]]
  5403. :pack_16_6: pass:normal[xref:#Packing-pack_16_6-bytes16-bytes6-[`++pack_16_6++`]]
  5404. :pack_16_8: pass:normal[xref:#Packing-pack_16_8-bytes16-bytes8-[`++pack_16_8++`]]
  5405. :pack_16_12: pass:normal[xref:#Packing-pack_16_12-bytes16-bytes12-[`++pack_16_12++`]]
  5406. :pack_16_16: pass:normal[xref:#Packing-pack_16_16-bytes16-bytes16-[`++pack_16_16++`]]
  5407. :pack_20_2: pass:normal[xref:#Packing-pack_20_2-bytes20-bytes2-[`++pack_20_2++`]]
  5408. :pack_20_4: pass:normal[xref:#Packing-pack_20_4-bytes20-bytes4-[`++pack_20_4++`]]
  5409. :pack_20_8: pass:normal[xref:#Packing-pack_20_8-bytes20-bytes8-[`++pack_20_8++`]]
  5410. :pack_20_12: pass:normal[xref:#Packing-pack_20_12-bytes20-bytes12-[`++pack_20_12++`]]
  5411. :pack_22_2: pass:normal[xref:#Packing-pack_22_2-bytes22-bytes2-[`++pack_22_2++`]]
  5412. :pack_22_6: pass:normal[xref:#Packing-pack_22_6-bytes22-bytes6-[`++pack_22_6++`]]
  5413. :pack_22_10: pass:normal[xref:#Packing-pack_22_10-bytes22-bytes10-[`++pack_22_10++`]]
  5414. :pack_24_4: pass:normal[xref:#Packing-pack_24_4-bytes24-bytes4-[`++pack_24_4++`]]
  5415. :pack_24_8: pass:normal[xref:#Packing-pack_24_8-bytes24-bytes8-[`++pack_24_8++`]]
  5416. :pack_28_4: pass:normal[xref:#Packing-pack_28_4-bytes28-bytes4-[`++pack_28_4++`]]
  5417. :extract_2_1: pass:normal[xref:#Packing-extract_2_1-bytes2-uint8-[`++extract_2_1++`]]
  5418. :replace_2_1: pass:normal[xref:#Packing-replace_2_1-bytes2-bytes1-uint8-[`++replace_2_1++`]]
  5419. :extract_4_1: pass:normal[xref:#Packing-extract_4_1-bytes4-uint8-[`++extract_4_1++`]]
  5420. :replace_4_1: pass:normal[xref:#Packing-replace_4_1-bytes4-bytes1-uint8-[`++replace_4_1++`]]
  5421. :extract_4_2: pass:normal[xref:#Packing-extract_4_2-bytes4-uint8-[`++extract_4_2++`]]
  5422. :replace_4_2: pass:normal[xref:#Packing-replace_4_2-bytes4-bytes2-uint8-[`++replace_4_2++`]]
  5423. :extract_6_1: pass:normal[xref:#Packing-extract_6_1-bytes6-uint8-[`++extract_6_1++`]]
  5424. :replace_6_1: pass:normal[xref:#Packing-replace_6_1-bytes6-bytes1-uint8-[`++replace_6_1++`]]
  5425. :extract_6_2: pass:normal[xref:#Packing-extract_6_2-bytes6-uint8-[`++extract_6_2++`]]
  5426. :replace_6_2: pass:normal[xref:#Packing-replace_6_2-bytes6-bytes2-uint8-[`++replace_6_2++`]]
  5427. :extract_6_4: pass:normal[xref:#Packing-extract_6_4-bytes6-uint8-[`++extract_6_4++`]]
  5428. :replace_6_4: pass:normal[xref:#Packing-replace_6_4-bytes6-bytes4-uint8-[`++replace_6_4++`]]
  5429. :extract_8_1: pass:normal[xref:#Packing-extract_8_1-bytes8-uint8-[`++extract_8_1++`]]
  5430. :replace_8_1: pass:normal[xref:#Packing-replace_8_1-bytes8-bytes1-uint8-[`++replace_8_1++`]]
  5431. :extract_8_2: pass:normal[xref:#Packing-extract_8_2-bytes8-uint8-[`++extract_8_2++`]]
  5432. :replace_8_2: pass:normal[xref:#Packing-replace_8_2-bytes8-bytes2-uint8-[`++replace_8_2++`]]
  5433. :extract_8_4: pass:normal[xref:#Packing-extract_8_4-bytes8-uint8-[`++extract_8_4++`]]
  5434. :replace_8_4: pass:normal[xref:#Packing-replace_8_4-bytes8-bytes4-uint8-[`++replace_8_4++`]]
  5435. :extract_8_6: pass:normal[xref:#Packing-extract_8_6-bytes8-uint8-[`++extract_8_6++`]]
  5436. :replace_8_6: pass:normal[xref:#Packing-replace_8_6-bytes8-bytes6-uint8-[`++replace_8_6++`]]
  5437. :extract_10_1: pass:normal[xref:#Packing-extract_10_1-bytes10-uint8-[`++extract_10_1++`]]
  5438. :replace_10_1: pass:normal[xref:#Packing-replace_10_1-bytes10-bytes1-uint8-[`++replace_10_1++`]]
  5439. :extract_10_2: pass:normal[xref:#Packing-extract_10_2-bytes10-uint8-[`++extract_10_2++`]]
  5440. :replace_10_2: pass:normal[xref:#Packing-replace_10_2-bytes10-bytes2-uint8-[`++replace_10_2++`]]
  5441. :extract_10_4: pass:normal[xref:#Packing-extract_10_4-bytes10-uint8-[`++extract_10_4++`]]
  5442. :replace_10_4: pass:normal[xref:#Packing-replace_10_4-bytes10-bytes4-uint8-[`++replace_10_4++`]]
  5443. :extract_10_6: pass:normal[xref:#Packing-extract_10_6-bytes10-uint8-[`++extract_10_6++`]]
  5444. :replace_10_6: pass:normal[xref:#Packing-replace_10_6-bytes10-bytes6-uint8-[`++replace_10_6++`]]
  5445. :extract_10_8: pass:normal[xref:#Packing-extract_10_8-bytes10-uint8-[`++extract_10_8++`]]
  5446. :replace_10_8: pass:normal[xref:#Packing-replace_10_8-bytes10-bytes8-uint8-[`++replace_10_8++`]]
  5447. :extract_12_1: pass:normal[xref:#Packing-extract_12_1-bytes12-uint8-[`++extract_12_1++`]]
  5448. :replace_12_1: pass:normal[xref:#Packing-replace_12_1-bytes12-bytes1-uint8-[`++replace_12_1++`]]
  5449. :extract_12_2: pass:normal[xref:#Packing-extract_12_2-bytes12-uint8-[`++extract_12_2++`]]
  5450. :replace_12_2: pass:normal[xref:#Packing-replace_12_2-bytes12-bytes2-uint8-[`++replace_12_2++`]]
  5451. :extract_12_4: pass:normal[xref:#Packing-extract_12_4-bytes12-uint8-[`++extract_12_4++`]]
  5452. :replace_12_4: pass:normal[xref:#Packing-replace_12_4-bytes12-bytes4-uint8-[`++replace_12_4++`]]
  5453. :extract_12_6: pass:normal[xref:#Packing-extract_12_6-bytes12-uint8-[`++extract_12_6++`]]
  5454. :replace_12_6: pass:normal[xref:#Packing-replace_12_6-bytes12-bytes6-uint8-[`++replace_12_6++`]]
  5455. :extract_12_8: pass:normal[xref:#Packing-extract_12_8-bytes12-uint8-[`++extract_12_8++`]]
  5456. :replace_12_8: pass:normal[xref:#Packing-replace_12_8-bytes12-bytes8-uint8-[`++replace_12_8++`]]
  5457. :extract_12_10: pass:normal[xref:#Packing-extract_12_10-bytes12-uint8-[`++extract_12_10++`]]
  5458. :replace_12_10: pass:normal[xref:#Packing-replace_12_10-bytes12-bytes10-uint8-[`++replace_12_10++`]]
  5459. :extract_16_1: pass:normal[xref:#Packing-extract_16_1-bytes16-uint8-[`++extract_16_1++`]]
  5460. :replace_16_1: pass:normal[xref:#Packing-replace_16_1-bytes16-bytes1-uint8-[`++replace_16_1++`]]
  5461. :extract_16_2: pass:normal[xref:#Packing-extract_16_2-bytes16-uint8-[`++extract_16_2++`]]
  5462. :replace_16_2: pass:normal[xref:#Packing-replace_16_2-bytes16-bytes2-uint8-[`++replace_16_2++`]]
  5463. :extract_16_4: pass:normal[xref:#Packing-extract_16_4-bytes16-uint8-[`++extract_16_4++`]]
  5464. :replace_16_4: pass:normal[xref:#Packing-replace_16_4-bytes16-bytes4-uint8-[`++replace_16_4++`]]
  5465. :extract_16_6: pass:normal[xref:#Packing-extract_16_6-bytes16-uint8-[`++extract_16_6++`]]
  5466. :replace_16_6: pass:normal[xref:#Packing-replace_16_6-bytes16-bytes6-uint8-[`++replace_16_6++`]]
  5467. :extract_16_8: pass:normal[xref:#Packing-extract_16_8-bytes16-uint8-[`++extract_16_8++`]]
  5468. :replace_16_8: pass:normal[xref:#Packing-replace_16_8-bytes16-bytes8-uint8-[`++replace_16_8++`]]
  5469. :extract_16_10: pass:normal[xref:#Packing-extract_16_10-bytes16-uint8-[`++extract_16_10++`]]
  5470. :replace_16_10: pass:normal[xref:#Packing-replace_16_10-bytes16-bytes10-uint8-[`++replace_16_10++`]]
  5471. :extract_16_12: pass:normal[xref:#Packing-extract_16_12-bytes16-uint8-[`++extract_16_12++`]]
  5472. :replace_16_12: pass:normal[xref:#Packing-replace_16_12-bytes16-bytes12-uint8-[`++replace_16_12++`]]
  5473. :extract_20_1: pass:normal[xref:#Packing-extract_20_1-bytes20-uint8-[`++extract_20_1++`]]
  5474. :replace_20_1: pass:normal[xref:#Packing-replace_20_1-bytes20-bytes1-uint8-[`++replace_20_1++`]]
  5475. :extract_20_2: pass:normal[xref:#Packing-extract_20_2-bytes20-uint8-[`++extract_20_2++`]]
  5476. :replace_20_2: pass:normal[xref:#Packing-replace_20_2-bytes20-bytes2-uint8-[`++replace_20_2++`]]
  5477. :extract_20_4: pass:normal[xref:#Packing-extract_20_4-bytes20-uint8-[`++extract_20_4++`]]
  5478. :replace_20_4: pass:normal[xref:#Packing-replace_20_4-bytes20-bytes4-uint8-[`++replace_20_4++`]]
  5479. :extract_20_6: pass:normal[xref:#Packing-extract_20_6-bytes20-uint8-[`++extract_20_6++`]]
  5480. :replace_20_6: pass:normal[xref:#Packing-replace_20_6-bytes20-bytes6-uint8-[`++replace_20_6++`]]
  5481. :extract_20_8: pass:normal[xref:#Packing-extract_20_8-bytes20-uint8-[`++extract_20_8++`]]
  5482. :replace_20_8: pass:normal[xref:#Packing-replace_20_8-bytes20-bytes8-uint8-[`++replace_20_8++`]]
  5483. :extract_20_10: pass:normal[xref:#Packing-extract_20_10-bytes20-uint8-[`++extract_20_10++`]]
  5484. :replace_20_10: pass:normal[xref:#Packing-replace_20_10-bytes20-bytes10-uint8-[`++replace_20_10++`]]
  5485. :extract_20_12: pass:normal[xref:#Packing-extract_20_12-bytes20-uint8-[`++extract_20_12++`]]
  5486. :replace_20_12: pass:normal[xref:#Packing-replace_20_12-bytes20-bytes12-uint8-[`++replace_20_12++`]]
  5487. :extract_20_16: pass:normal[xref:#Packing-extract_20_16-bytes20-uint8-[`++extract_20_16++`]]
  5488. :replace_20_16: pass:normal[xref:#Packing-replace_20_16-bytes20-bytes16-uint8-[`++replace_20_16++`]]
  5489. :extract_22_1: pass:normal[xref:#Packing-extract_22_1-bytes22-uint8-[`++extract_22_1++`]]
  5490. :replace_22_1: pass:normal[xref:#Packing-replace_22_1-bytes22-bytes1-uint8-[`++replace_22_1++`]]
  5491. :extract_22_2: pass:normal[xref:#Packing-extract_22_2-bytes22-uint8-[`++extract_22_2++`]]
  5492. :replace_22_2: pass:normal[xref:#Packing-replace_22_2-bytes22-bytes2-uint8-[`++replace_22_2++`]]
  5493. :extract_22_4: pass:normal[xref:#Packing-extract_22_4-bytes22-uint8-[`++extract_22_4++`]]
  5494. :replace_22_4: pass:normal[xref:#Packing-replace_22_4-bytes22-bytes4-uint8-[`++replace_22_4++`]]
  5495. :extract_22_6: pass:normal[xref:#Packing-extract_22_6-bytes22-uint8-[`++extract_22_6++`]]
  5496. :replace_22_6: pass:normal[xref:#Packing-replace_22_6-bytes22-bytes6-uint8-[`++replace_22_6++`]]
  5497. :extract_22_8: pass:normal[xref:#Packing-extract_22_8-bytes22-uint8-[`++extract_22_8++`]]
  5498. :replace_22_8: pass:normal[xref:#Packing-replace_22_8-bytes22-bytes8-uint8-[`++replace_22_8++`]]
  5499. :extract_22_10: pass:normal[xref:#Packing-extract_22_10-bytes22-uint8-[`++extract_22_10++`]]
  5500. :replace_22_10: pass:normal[xref:#Packing-replace_22_10-bytes22-bytes10-uint8-[`++replace_22_10++`]]
  5501. :extract_22_12: pass:normal[xref:#Packing-extract_22_12-bytes22-uint8-[`++extract_22_12++`]]
  5502. :replace_22_12: pass:normal[xref:#Packing-replace_22_12-bytes22-bytes12-uint8-[`++replace_22_12++`]]
  5503. :extract_22_16: pass:normal[xref:#Packing-extract_22_16-bytes22-uint8-[`++extract_22_16++`]]
  5504. :replace_22_16: pass:normal[xref:#Packing-replace_22_16-bytes22-bytes16-uint8-[`++replace_22_16++`]]
  5505. :extract_22_20: pass:normal[xref:#Packing-extract_22_20-bytes22-uint8-[`++extract_22_20++`]]
  5506. :replace_22_20: pass:normal[xref:#Packing-replace_22_20-bytes22-bytes20-uint8-[`++replace_22_20++`]]
  5507. :extract_24_1: pass:normal[xref:#Packing-extract_24_1-bytes24-uint8-[`++extract_24_1++`]]
  5508. :replace_24_1: pass:normal[xref:#Packing-replace_24_1-bytes24-bytes1-uint8-[`++replace_24_1++`]]
  5509. :extract_24_2: pass:normal[xref:#Packing-extract_24_2-bytes24-uint8-[`++extract_24_2++`]]
  5510. :replace_24_2: pass:normal[xref:#Packing-replace_24_2-bytes24-bytes2-uint8-[`++replace_24_2++`]]
  5511. :extract_24_4: pass:normal[xref:#Packing-extract_24_4-bytes24-uint8-[`++extract_24_4++`]]
  5512. :replace_24_4: pass:normal[xref:#Packing-replace_24_4-bytes24-bytes4-uint8-[`++replace_24_4++`]]
  5513. :extract_24_6: pass:normal[xref:#Packing-extract_24_6-bytes24-uint8-[`++extract_24_6++`]]
  5514. :replace_24_6: pass:normal[xref:#Packing-replace_24_6-bytes24-bytes6-uint8-[`++replace_24_6++`]]
  5515. :extract_24_8: pass:normal[xref:#Packing-extract_24_8-bytes24-uint8-[`++extract_24_8++`]]
  5516. :replace_24_8: pass:normal[xref:#Packing-replace_24_8-bytes24-bytes8-uint8-[`++replace_24_8++`]]
  5517. :extract_24_10: pass:normal[xref:#Packing-extract_24_10-bytes24-uint8-[`++extract_24_10++`]]
  5518. :replace_24_10: pass:normal[xref:#Packing-replace_24_10-bytes24-bytes10-uint8-[`++replace_24_10++`]]
  5519. :extract_24_12: pass:normal[xref:#Packing-extract_24_12-bytes24-uint8-[`++extract_24_12++`]]
  5520. :replace_24_12: pass:normal[xref:#Packing-replace_24_12-bytes24-bytes12-uint8-[`++replace_24_12++`]]
  5521. :extract_24_16: pass:normal[xref:#Packing-extract_24_16-bytes24-uint8-[`++extract_24_16++`]]
  5522. :replace_24_16: pass:normal[xref:#Packing-replace_24_16-bytes24-bytes16-uint8-[`++replace_24_16++`]]
  5523. :extract_24_20: pass:normal[xref:#Packing-extract_24_20-bytes24-uint8-[`++extract_24_20++`]]
  5524. :replace_24_20: pass:normal[xref:#Packing-replace_24_20-bytes24-bytes20-uint8-[`++replace_24_20++`]]
  5525. :extract_24_22: pass:normal[xref:#Packing-extract_24_22-bytes24-uint8-[`++extract_24_22++`]]
  5526. :replace_24_22: pass:normal[xref:#Packing-replace_24_22-bytes24-bytes22-uint8-[`++replace_24_22++`]]
  5527. :extract_28_1: pass:normal[xref:#Packing-extract_28_1-bytes28-uint8-[`++extract_28_1++`]]
  5528. :replace_28_1: pass:normal[xref:#Packing-replace_28_1-bytes28-bytes1-uint8-[`++replace_28_1++`]]
  5529. :extract_28_2: pass:normal[xref:#Packing-extract_28_2-bytes28-uint8-[`++extract_28_2++`]]
  5530. :replace_28_2: pass:normal[xref:#Packing-replace_28_2-bytes28-bytes2-uint8-[`++replace_28_2++`]]
  5531. :extract_28_4: pass:normal[xref:#Packing-extract_28_4-bytes28-uint8-[`++extract_28_4++`]]
  5532. :replace_28_4: pass:normal[xref:#Packing-replace_28_4-bytes28-bytes4-uint8-[`++replace_28_4++`]]
  5533. :extract_28_6: pass:normal[xref:#Packing-extract_28_6-bytes28-uint8-[`++extract_28_6++`]]
  5534. :replace_28_6: pass:normal[xref:#Packing-replace_28_6-bytes28-bytes6-uint8-[`++replace_28_6++`]]
  5535. :extract_28_8: pass:normal[xref:#Packing-extract_28_8-bytes28-uint8-[`++extract_28_8++`]]
  5536. :replace_28_8: pass:normal[xref:#Packing-replace_28_8-bytes28-bytes8-uint8-[`++replace_28_8++`]]
  5537. :extract_28_10: pass:normal[xref:#Packing-extract_28_10-bytes28-uint8-[`++extract_28_10++`]]
  5538. :replace_28_10: pass:normal[xref:#Packing-replace_28_10-bytes28-bytes10-uint8-[`++replace_28_10++`]]
  5539. :extract_28_12: pass:normal[xref:#Packing-extract_28_12-bytes28-uint8-[`++extract_28_12++`]]
  5540. :replace_28_12: pass:normal[xref:#Packing-replace_28_12-bytes28-bytes12-uint8-[`++replace_28_12++`]]
  5541. :extract_28_16: pass:normal[xref:#Packing-extract_28_16-bytes28-uint8-[`++extract_28_16++`]]
  5542. :replace_28_16: pass:normal[xref:#Packing-replace_28_16-bytes28-bytes16-uint8-[`++replace_28_16++`]]
  5543. :extract_28_20: pass:normal[xref:#Packing-extract_28_20-bytes28-uint8-[`++extract_28_20++`]]
  5544. :replace_28_20: pass:normal[xref:#Packing-replace_28_20-bytes28-bytes20-uint8-[`++replace_28_20++`]]
  5545. :extract_28_22: pass:normal[xref:#Packing-extract_28_22-bytes28-uint8-[`++extract_28_22++`]]
  5546. :replace_28_22: pass:normal[xref:#Packing-replace_28_22-bytes28-bytes22-uint8-[`++replace_28_22++`]]
  5547. :extract_28_24: pass:normal[xref:#Packing-extract_28_24-bytes28-uint8-[`++extract_28_24++`]]
  5548. :replace_28_24: pass:normal[xref:#Packing-replace_28_24-bytes28-bytes24-uint8-[`++replace_28_24++`]]
  5549. :extract_32_1: pass:normal[xref:#Packing-extract_32_1-bytes32-uint8-[`++extract_32_1++`]]
  5550. :replace_32_1: pass:normal[xref:#Packing-replace_32_1-bytes32-bytes1-uint8-[`++replace_32_1++`]]
  5551. :extract_32_2: pass:normal[xref:#Packing-extract_32_2-bytes32-uint8-[`++extract_32_2++`]]
  5552. :replace_32_2: pass:normal[xref:#Packing-replace_32_2-bytes32-bytes2-uint8-[`++replace_32_2++`]]
  5553. :extract_32_4: pass:normal[xref:#Packing-extract_32_4-bytes32-uint8-[`++extract_32_4++`]]
  5554. :replace_32_4: pass:normal[xref:#Packing-replace_32_4-bytes32-bytes4-uint8-[`++replace_32_4++`]]
  5555. :extract_32_6: pass:normal[xref:#Packing-extract_32_6-bytes32-uint8-[`++extract_32_6++`]]
  5556. :replace_32_6: pass:normal[xref:#Packing-replace_32_6-bytes32-bytes6-uint8-[`++replace_32_6++`]]
  5557. :extract_32_8: pass:normal[xref:#Packing-extract_32_8-bytes32-uint8-[`++extract_32_8++`]]
  5558. :replace_32_8: pass:normal[xref:#Packing-replace_32_8-bytes32-bytes8-uint8-[`++replace_32_8++`]]
  5559. :extract_32_10: pass:normal[xref:#Packing-extract_32_10-bytes32-uint8-[`++extract_32_10++`]]
  5560. :replace_32_10: pass:normal[xref:#Packing-replace_32_10-bytes32-bytes10-uint8-[`++replace_32_10++`]]
  5561. :extract_32_12: pass:normal[xref:#Packing-extract_32_12-bytes32-uint8-[`++extract_32_12++`]]
  5562. :replace_32_12: pass:normal[xref:#Packing-replace_32_12-bytes32-bytes12-uint8-[`++replace_32_12++`]]
  5563. :extract_32_16: pass:normal[xref:#Packing-extract_32_16-bytes32-uint8-[`++extract_32_16++`]]
  5564. :replace_32_16: pass:normal[xref:#Packing-replace_32_16-bytes32-bytes16-uint8-[`++replace_32_16++`]]
  5565. :extract_32_20: pass:normal[xref:#Packing-extract_32_20-bytes32-uint8-[`++extract_32_20++`]]
  5566. :replace_32_20: pass:normal[xref:#Packing-replace_32_20-bytes32-bytes20-uint8-[`++replace_32_20++`]]
  5567. :extract_32_22: pass:normal[xref:#Packing-extract_32_22-bytes32-uint8-[`++extract_32_22++`]]
  5568. :replace_32_22: pass:normal[xref:#Packing-replace_32_22-bytes32-bytes22-uint8-[`++replace_32_22++`]]
  5569. :extract_32_24: pass:normal[xref:#Packing-extract_32_24-bytes32-uint8-[`++extract_32_24++`]]
  5570. :replace_32_24: pass:normal[xref:#Packing-replace_32_24-bytes32-bytes24-uint8-[`++replace_32_24++`]]
  5571. :extract_32_28: pass:normal[xref:#Packing-extract_32_28-bytes32-uint8-[`++extract_32_28++`]]
  5572. :replace_32_28: pass:normal[xref:#Packing-replace_32_28-bytes32-bytes28-uint8-[`++replace_32_28++`]]
  5573. [.contract]
  5574. [[Packing]]
  5575. === `++Packing++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Packing.sol[{github-icon},role=heading-link]
  5576. [.hljs-theme-light.nopadding]
  5577. ```solidity
  5578. import "@openzeppelin/contracts/utils/Packing.sol";
  5579. ```
  5580. Helper library packing and unpacking multiple values into bytesXX.
  5581. Example usage:
  5582. ```solidity
  5583. library MyPacker {
  5584. type MyType is bytes32;
  5585. function _pack(address account, bytes4 selector, uint64 period) external pure returns (MyType) {
  5586. bytes12 subpack = Packing.pack_4_8(selector, bytes8(period));
  5587. bytes32 pack = Packing.pack_20_12(bytes20(account), subpack);
  5588. return MyType.wrap(pack);
  5589. }
  5590. function _unpack(MyType self) external pure returns (address, bytes4, uint64) {
  5591. bytes32 pack = MyType.unwrap(self);
  5592. return (
  5593. address(Packing.extract_32_20(pack, 0)),
  5594. Packing.extract_32_4(pack, 20),
  5595. uint64(Packing.extract_32_8(pack, 24))
  5596. );
  5597. }
  5598. }
  5599. ```
  5600. _Available since v5.1._
  5601. [.contract-index]
  5602. .Functions
  5603. --
  5604. * {xref-Packing-pack_1_1-bytes1-bytes1-}[`++pack_1_1(left, right)++`]
  5605. * {xref-Packing-pack_2_2-bytes2-bytes2-}[`++pack_2_2(left, right)++`]
  5606. * {xref-Packing-pack_2_4-bytes2-bytes4-}[`++pack_2_4(left, right)++`]
  5607. * {xref-Packing-pack_2_6-bytes2-bytes6-}[`++pack_2_6(left, right)++`]
  5608. * {xref-Packing-pack_2_8-bytes2-bytes8-}[`++pack_2_8(left, right)++`]
  5609. * {xref-Packing-pack_2_10-bytes2-bytes10-}[`++pack_2_10(left, right)++`]
  5610. * {xref-Packing-pack_2_20-bytes2-bytes20-}[`++pack_2_20(left, right)++`]
  5611. * {xref-Packing-pack_2_22-bytes2-bytes22-}[`++pack_2_22(left, right)++`]
  5612. * {xref-Packing-pack_4_2-bytes4-bytes2-}[`++pack_4_2(left, right)++`]
  5613. * {xref-Packing-pack_4_4-bytes4-bytes4-}[`++pack_4_4(left, right)++`]
  5614. * {xref-Packing-pack_4_6-bytes4-bytes6-}[`++pack_4_6(left, right)++`]
  5615. * {xref-Packing-pack_4_8-bytes4-bytes8-}[`++pack_4_8(left, right)++`]
  5616. * {xref-Packing-pack_4_12-bytes4-bytes12-}[`++pack_4_12(left, right)++`]
  5617. * {xref-Packing-pack_4_16-bytes4-bytes16-}[`++pack_4_16(left, right)++`]
  5618. * {xref-Packing-pack_4_20-bytes4-bytes20-}[`++pack_4_20(left, right)++`]
  5619. * {xref-Packing-pack_4_24-bytes4-bytes24-}[`++pack_4_24(left, right)++`]
  5620. * {xref-Packing-pack_4_28-bytes4-bytes28-}[`++pack_4_28(left, right)++`]
  5621. * {xref-Packing-pack_6_2-bytes6-bytes2-}[`++pack_6_2(left, right)++`]
  5622. * {xref-Packing-pack_6_4-bytes6-bytes4-}[`++pack_6_4(left, right)++`]
  5623. * {xref-Packing-pack_6_6-bytes6-bytes6-}[`++pack_6_6(left, right)++`]
  5624. * {xref-Packing-pack_6_10-bytes6-bytes10-}[`++pack_6_10(left, right)++`]
  5625. * {xref-Packing-pack_6_16-bytes6-bytes16-}[`++pack_6_16(left, right)++`]
  5626. * {xref-Packing-pack_6_22-bytes6-bytes22-}[`++pack_6_22(left, right)++`]
  5627. * {xref-Packing-pack_8_2-bytes8-bytes2-}[`++pack_8_2(left, right)++`]
  5628. * {xref-Packing-pack_8_4-bytes8-bytes4-}[`++pack_8_4(left, right)++`]
  5629. * {xref-Packing-pack_8_8-bytes8-bytes8-}[`++pack_8_8(left, right)++`]
  5630. * {xref-Packing-pack_8_12-bytes8-bytes12-}[`++pack_8_12(left, right)++`]
  5631. * {xref-Packing-pack_8_16-bytes8-bytes16-}[`++pack_8_16(left, right)++`]
  5632. * {xref-Packing-pack_8_20-bytes8-bytes20-}[`++pack_8_20(left, right)++`]
  5633. * {xref-Packing-pack_8_24-bytes8-bytes24-}[`++pack_8_24(left, right)++`]
  5634. * {xref-Packing-pack_10_2-bytes10-bytes2-}[`++pack_10_2(left, right)++`]
  5635. * {xref-Packing-pack_10_6-bytes10-bytes6-}[`++pack_10_6(left, right)++`]
  5636. * {xref-Packing-pack_10_10-bytes10-bytes10-}[`++pack_10_10(left, right)++`]
  5637. * {xref-Packing-pack_10_12-bytes10-bytes12-}[`++pack_10_12(left, right)++`]
  5638. * {xref-Packing-pack_10_22-bytes10-bytes22-}[`++pack_10_22(left, right)++`]
  5639. * {xref-Packing-pack_12_4-bytes12-bytes4-}[`++pack_12_4(left, right)++`]
  5640. * {xref-Packing-pack_12_8-bytes12-bytes8-}[`++pack_12_8(left, right)++`]
  5641. * {xref-Packing-pack_12_10-bytes12-bytes10-}[`++pack_12_10(left, right)++`]
  5642. * {xref-Packing-pack_12_12-bytes12-bytes12-}[`++pack_12_12(left, right)++`]
  5643. * {xref-Packing-pack_12_16-bytes12-bytes16-}[`++pack_12_16(left, right)++`]
  5644. * {xref-Packing-pack_12_20-bytes12-bytes20-}[`++pack_12_20(left, right)++`]
  5645. * {xref-Packing-pack_16_4-bytes16-bytes4-}[`++pack_16_4(left, right)++`]
  5646. * {xref-Packing-pack_16_6-bytes16-bytes6-}[`++pack_16_6(left, right)++`]
  5647. * {xref-Packing-pack_16_8-bytes16-bytes8-}[`++pack_16_8(left, right)++`]
  5648. * {xref-Packing-pack_16_12-bytes16-bytes12-}[`++pack_16_12(left, right)++`]
  5649. * {xref-Packing-pack_16_16-bytes16-bytes16-}[`++pack_16_16(left, right)++`]
  5650. * {xref-Packing-pack_20_2-bytes20-bytes2-}[`++pack_20_2(left, right)++`]
  5651. * {xref-Packing-pack_20_4-bytes20-bytes4-}[`++pack_20_4(left, right)++`]
  5652. * {xref-Packing-pack_20_8-bytes20-bytes8-}[`++pack_20_8(left, right)++`]
  5653. * {xref-Packing-pack_20_12-bytes20-bytes12-}[`++pack_20_12(left, right)++`]
  5654. * {xref-Packing-pack_22_2-bytes22-bytes2-}[`++pack_22_2(left, right)++`]
  5655. * {xref-Packing-pack_22_6-bytes22-bytes6-}[`++pack_22_6(left, right)++`]
  5656. * {xref-Packing-pack_22_10-bytes22-bytes10-}[`++pack_22_10(left, right)++`]
  5657. * {xref-Packing-pack_24_4-bytes24-bytes4-}[`++pack_24_4(left, right)++`]
  5658. * {xref-Packing-pack_24_8-bytes24-bytes8-}[`++pack_24_8(left, right)++`]
  5659. * {xref-Packing-pack_28_4-bytes28-bytes4-}[`++pack_28_4(left, right)++`]
  5660. * {xref-Packing-extract_2_1-bytes2-uint8-}[`++extract_2_1(self, offset)++`]
  5661. * {xref-Packing-replace_2_1-bytes2-bytes1-uint8-}[`++replace_2_1(self, value, offset)++`]
  5662. * {xref-Packing-extract_4_1-bytes4-uint8-}[`++extract_4_1(self, offset)++`]
  5663. * {xref-Packing-replace_4_1-bytes4-bytes1-uint8-}[`++replace_4_1(self, value, offset)++`]
  5664. * {xref-Packing-extract_4_2-bytes4-uint8-}[`++extract_4_2(self, offset)++`]
  5665. * {xref-Packing-replace_4_2-bytes4-bytes2-uint8-}[`++replace_4_2(self, value, offset)++`]
  5666. * {xref-Packing-extract_6_1-bytes6-uint8-}[`++extract_6_1(self, offset)++`]
  5667. * {xref-Packing-replace_6_1-bytes6-bytes1-uint8-}[`++replace_6_1(self, value, offset)++`]
  5668. * {xref-Packing-extract_6_2-bytes6-uint8-}[`++extract_6_2(self, offset)++`]
  5669. * {xref-Packing-replace_6_2-bytes6-bytes2-uint8-}[`++replace_6_2(self, value, offset)++`]
  5670. * {xref-Packing-extract_6_4-bytes6-uint8-}[`++extract_6_4(self, offset)++`]
  5671. * {xref-Packing-replace_6_4-bytes6-bytes4-uint8-}[`++replace_6_4(self, value, offset)++`]
  5672. * {xref-Packing-extract_8_1-bytes8-uint8-}[`++extract_8_1(self, offset)++`]
  5673. * {xref-Packing-replace_8_1-bytes8-bytes1-uint8-}[`++replace_8_1(self, value, offset)++`]
  5674. * {xref-Packing-extract_8_2-bytes8-uint8-}[`++extract_8_2(self, offset)++`]
  5675. * {xref-Packing-replace_8_2-bytes8-bytes2-uint8-}[`++replace_8_2(self, value, offset)++`]
  5676. * {xref-Packing-extract_8_4-bytes8-uint8-}[`++extract_8_4(self, offset)++`]
  5677. * {xref-Packing-replace_8_4-bytes8-bytes4-uint8-}[`++replace_8_4(self, value, offset)++`]
  5678. * {xref-Packing-extract_8_6-bytes8-uint8-}[`++extract_8_6(self, offset)++`]
  5679. * {xref-Packing-replace_8_6-bytes8-bytes6-uint8-}[`++replace_8_6(self, value, offset)++`]
  5680. * {xref-Packing-extract_10_1-bytes10-uint8-}[`++extract_10_1(self, offset)++`]
  5681. * {xref-Packing-replace_10_1-bytes10-bytes1-uint8-}[`++replace_10_1(self, value, offset)++`]
  5682. * {xref-Packing-extract_10_2-bytes10-uint8-}[`++extract_10_2(self, offset)++`]
  5683. * {xref-Packing-replace_10_2-bytes10-bytes2-uint8-}[`++replace_10_2(self, value, offset)++`]
  5684. * {xref-Packing-extract_10_4-bytes10-uint8-}[`++extract_10_4(self, offset)++`]
  5685. * {xref-Packing-replace_10_4-bytes10-bytes4-uint8-}[`++replace_10_4(self, value, offset)++`]
  5686. * {xref-Packing-extract_10_6-bytes10-uint8-}[`++extract_10_6(self, offset)++`]
  5687. * {xref-Packing-replace_10_6-bytes10-bytes6-uint8-}[`++replace_10_6(self, value, offset)++`]
  5688. * {xref-Packing-extract_10_8-bytes10-uint8-}[`++extract_10_8(self, offset)++`]
  5689. * {xref-Packing-replace_10_8-bytes10-bytes8-uint8-}[`++replace_10_8(self, value, offset)++`]
  5690. * {xref-Packing-extract_12_1-bytes12-uint8-}[`++extract_12_1(self, offset)++`]
  5691. * {xref-Packing-replace_12_1-bytes12-bytes1-uint8-}[`++replace_12_1(self, value, offset)++`]
  5692. * {xref-Packing-extract_12_2-bytes12-uint8-}[`++extract_12_2(self, offset)++`]
  5693. * {xref-Packing-replace_12_2-bytes12-bytes2-uint8-}[`++replace_12_2(self, value, offset)++`]
  5694. * {xref-Packing-extract_12_4-bytes12-uint8-}[`++extract_12_4(self, offset)++`]
  5695. * {xref-Packing-replace_12_4-bytes12-bytes4-uint8-}[`++replace_12_4(self, value, offset)++`]
  5696. * {xref-Packing-extract_12_6-bytes12-uint8-}[`++extract_12_6(self, offset)++`]
  5697. * {xref-Packing-replace_12_6-bytes12-bytes6-uint8-}[`++replace_12_6(self, value, offset)++`]
  5698. * {xref-Packing-extract_12_8-bytes12-uint8-}[`++extract_12_8(self, offset)++`]
  5699. * {xref-Packing-replace_12_8-bytes12-bytes8-uint8-}[`++replace_12_8(self, value, offset)++`]
  5700. * {xref-Packing-extract_12_10-bytes12-uint8-}[`++extract_12_10(self, offset)++`]
  5701. * {xref-Packing-replace_12_10-bytes12-bytes10-uint8-}[`++replace_12_10(self, value, offset)++`]
  5702. * {xref-Packing-extract_16_1-bytes16-uint8-}[`++extract_16_1(self, offset)++`]
  5703. * {xref-Packing-replace_16_1-bytes16-bytes1-uint8-}[`++replace_16_1(self, value, offset)++`]
  5704. * {xref-Packing-extract_16_2-bytes16-uint8-}[`++extract_16_2(self, offset)++`]
  5705. * {xref-Packing-replace_16_2-bytes16-bytes2-uint8-}[`++replace_16_2(self, value, offset)++`]
  5706. * {xref-Packing-extract_16_4-bytes16-uint8-}[`++extract_16_4(self, offset)++`]
  5707. * {xref-Packing-replace_16_4-bytes16-bytes4-uint8-}[`++replace_16_4(self, value, offset)++`]
  5708. * {xref-Packing-extract_16_6-bytes16-uint8-}[`++extract_16_6(self, offset)++`]
  5709. * {xref-Packing-replace_16_6-bytes16-bytes6-uint8-}[`++replace_16_6(self, value, offset)++`]
  5710. * {xref-Packing-extract_16_8-bytes16-uint8-}[`++extract_16_8(self, offset)++`]
  5711. * {xref-Packing-replace_16_8-bytes16-bytes8-uint8-}[`++replace_16_8(self, value, offset)++`]
  5712. * {xref-Packing-extract_16_10-bytes16-uint8-}[`++extract_16_10(self, offset)++`]
  5713. * {xref-Packing-replace_16_10-bytes16-bytes10-uint8-}[`++replace_16_10(self, value, offset)++`]
  5714. * {xref-Packing-extract_16_12-bytes16-uint8-}[`++extract_16_12(self, offset)++`]
  5715. * {xref-Packing-replace_16_12-bytes16-bytes12-uint8-}[`++replace_16_12(self, value, offset)++`]
  5716. * {xref-Packing-extract_20_1-bytes20-uint8-}[`++extract_20_1(self, offset)++`]
  5717. * {xref-Packing-replace_20_1-bytes20-bytes1-uint8-}[`++replace_20_1(self, value, offset)++`]
  5718. * {xref-Packing-extract_20_2-bytes20-uint8-}[`++extract_20_2(self, offset)++`]
  5719. * {xref-Packing-replace_20_2-bytes20-bytes2-uint8-}[`++replace_20_2(self, value, offset)++`]
  5720. * {xref-Packing-extract_20_4-bytes20-uint8-}[`++extract_20_4(self, offset)++`]
  5721. * {xref-Packing-replace_20_4-bytes20-bytes4-uint8-}[`++replace_20_4(self, value, offset)++`]
  5722. * {xref-Packing-extract_20_6-bytes20-uint8-}[`++extract_20_6(self, offset)++`]
  5723. * {xref-Packing-replace_20_6-bytes20-bytes6-uint8-}[`++replace_20_6(self, value, offset)++`]
  5724. * {xref-Packing-extract_20_8-bytes20-uint8-}[`++extract_20_8(self, offset)++`]
  5725. * {xref-Packing-replace_20_8-bytes20-bytes8-uint8-}[`++replace_20_8(self, value, offset)++`]
  5726. * {xref-Packing-extract_20_10-bytes20-uint8-}[`++extract_20_10(self, offset)++`]
  5727. * {xref-Packing-replace_20_10-bytes20-bytes10-uint8-}[`++replace_20_10(self, value, offset)++`]
  5728. * {xref-Packing-extract_20_12-bytes20-uint8-}[`++extract_20_12(self, offset)++`]
  5729. * {xref-Packing-replace_20_12-bytes20-bytes12-uint8-}[`++replace_20_12(self, value, offset)++`]
  5730. * {xref-Packing-extract_20_16-bytes20-uint8-}[`++extract_20_16(self, offset)++`]
  5731. * {xref-Packing-replace_20_16-bytes20-bytes16-uint8-}[`++replace_20_16(self, value, offset)++`]
  5732. * {xref-Packing-extract_22_1-bytes22-uint8-}[`++extract_22_1(self, offset)++`]
  5733. * {xref-Packing-replace_22_1-bytes22-bytes1-uint8-}[`++replace_22_1(self, value, offset)++`]
  5734. * {xref-Packing-extract_22_2-bytes22-uint8-}[`++extract_22_2(self, offset)++`]
  5735. * {xref-Packing-replace_22_2-bytes22-bytes2-uint8-}[`++replace_22_2(self, value, offset)++`]
  5736. * {xref-Packing-extract_22_4-bytes22-uint8-}[`++extract_22_4(self, offset)++`]
  5737. * {xref-Packing-replace_22_4-bytes22-bytes4-uint8-}[`++replace_22_4(self, value, offset)++`]
  5738. * {xref-Packing-extract_22_6-bytes22-uint8-}[`++extract_22_6(self, offset)++`]
  5739. * {xref-Packing-replace_22_6-bytes22-bytes6-uint8-}[`++replace_22_6(self, value, offset)++`]
  5740. * {xref-Packing-extract_22_8-bytes22-uint8-}[`++extract_22_8(self, offset)++`]
  5741. * {xref-Packing-replace_22_8-bytes22-bytes8-uint8-}[`++replace_22_8(self, value, offset)++`]
  5742. * {xref-Packing-extract_22_10-bytes22-uint8-}[`++extract_22_10(self, offset)++`]
  5743. * {xref-Packing-replace_22_10-bytes22-bytes10-uint8-}[`++replace_22_10(self, value, offset)++`]
  5744. * {xref-Packing-extract_22_12-bytes22-uint8-}[`++extract_22_12(self, offset)++`]
  5745. * {xref-Packing-replace_22_12-bytes22-bytes12-uint8-}[`++replace_22_12(self, value, offset)++`]
  5746. * {xref-Packing-extract_22_16-bytes22-uint8-}[`++extract_22_16(self, offset)++`]
  5747. * {xref-Packing-replace_22_16-bytes22-bytes16-uint8-}[`++replace_22_16(self, value, offset)++`]
  5748. * {xref-Packing-extract_22_20-bytes22-uint8-}[`++extract_22_20(self, offset)++`]
  5749. * {xref-Packing-replace_22_20-bytes22-bytes20-uint8-}[`++replace_22_20(self, value, offset)++`]
  5750. * {xref-Packing-extract_24_1-bytes24-uint8-}[`++extract_24_1(self, offset)++`]
  5751. * {xref-Packing-replace_24_1-bytes24-bytes1-uint8-}[`++replace_24_1(self, value, offset)++`]
  5752. * {xref-Packing-extract_24_2-bytes24-uint8-}[`++extract_24_2(self, offset)++`]
  5753. * {xref-Packing-replace_24_2-bytes24-bytes2-uint8-}[`++replace_24_2(self, value, offset)++`]
  5754. * {xref-Packing-extract_24_4-bytes24-uint8-}[`++extract_24_4(self, offset)++`]
  5755. * {xref-Packing-replace_24_4-bytes24-bytes4-uint8-}[`++replace_24_4(self, value, offset)++`]
  5756. * {xref-Packing-extract_24_6-bytes24-uint8-}[`++extract_24_6(self, offset)++`]
  5757. * {xref-Packing-replace_24_6-bytes24-bytes6-uint8-}[`++replace_24_6(self, value, offset)++`]
  5758. * {xref-Packing-extract_24_8-bytes24-uint8-}[`++extract_24_8(self, offset)++`]
  5759. * {xref-Packing-replace_24_8-bytes24-bytes8-uint8-}[`++replace_24_8(self, value, offset)++`]
  5760. * {xref-Packing-extract_24_10-bytes24-uint8-}[`++extract_24_10(self, offset)++`]
  5761. * {xref-Packing-replace_24_10-bytes24-bytes10-uint8-}[`++replace_24_10(self, value, offset)++`]
  5762. * {xref-Packing-extract_24_12-bytes24-uint8-}[`++extract_24_12(self, offset)++`]
  5763. * {xref-Packing-replace_24_12-bytes24-bytes12-uint8-}[`++replace_24_12(self, value, offset)++`]
  5764. * {xref-Packing-extract_24_16-bytes24-uint8-}[`++extract_24_16(self, offset)++`]
  5765. * {xref-Packing-replace_24_16-bytes24-bytes16-uint8-}[`++replace_24_16(self, value, offset)++`]
  5766. * {xref-Packing-extract_24_20-bytes24-uint8-}[`++extract_24_20(self, offset)++`]
  5767. * {xref-Packing-replace_24_20-bytes24-bytes20-uint8-}[`++replace_24_20(self, value, offset)++`]
  5768. * {xref-Packing-extract_24_22-bytes24-uint8-}[`++extract_24_22(self, offset)++`]
  5769. * {xref-Packing-replace_24_22-bytes24-bytes22-uint8-}[`++replace_24_22(self, value, offset)++`]
  5770. * {xref-Packing-extract_28_1-bytes28-uint8-}[`++extract_28_1(self, offset)++`]
  5771. * {xref-Packing-replace_28_1-bytes28-bytes1-uint8-}[`++replace_28_1(self, value, offset)++`]
  5772. * {xref-Packing-extract_28_2-bytes28-uint8-}[`++extract_28_2(self, offset)++`]
  5773. * {xref-Packing-replace_28_2-bytes28-bytes2-uint8-}[`++replace_28_2(self, value, offset)++`]
  5774. * {xref-Packing-extract_28_4-bytes28-uint8-}[`++extract_28_4(self, offset)++`]
  5775. * {xref-Packing-replace_28_4-bytes28-bytes4-uint8-}[`++replace_28_4(self, value, offset)++`]
  5776. * {xref-Packing-extract_28_6-bytes28-uint8-}[`++extract_28_6(self, offset)++`]
  5777. * {xref-Packing-replace_28_6-bytes28-bytes6-uint8-}[`++replace_28_6(self, value, offset)++`]
  5778. * {xref-Packing-extract_28_8-bytes28-uint8-}[`++extract_28_8(self, offset)++`]
  5779. * {xref-Packing-replace_28_8-bytes28-bytes8-uint8-}[`++replace_28_8(self, value, offset)++`]
  5780. * {xref-Packing-extract_28_10-bytes28-uint8-}[`++extract_28_10(self, offset)++`]
  5781. * {xref-Packing-replace_28_10-bytes28-bytes10-uint8-}[`++replace_28_10(self, value, offset)++`]
  5782. * {xref-Packing-extract_28_12-bytes28-uint8-}[`++extract_28_12(self, offset)++`]
  5783. * {xref-Packing-replace_28_12-bytes28-bytes12-uint8-}[`++replace_28_12(self, value, offset)++`]
  5784. * {xref-Packing-extract_28_16-bytes28-uint8-}[`++extract_28_16(self, offset)++`]
  5785. * {xref-Packing-replace_28_16-bytes28-bytes16-uint8-}[`++replace_28_16(self, value, offset)++`]
  5786. * {xref-Packing-extract_28_20-bytes28-uint8-}[`++extract_28_20(self, offset)++`]
  5787. * {xref-Packing-replace_28_20-bytes28-bytes20-uint8-}[`++replace_28_20(self, value, offset)++`]
  5788. * {xref-Packing-extract_28_22-bytes28-uint8-}[`++extract_28_22(self, offset)++`]
  5789. * {xref-Packing-replace_28_22-bytes28-bytes22-uint8-}[`++replace_28_22(self, value, offset)++`]
  5790. * {xref-Packing-extract_28_24-bytes28-uint8-}[`++extract_28_24(self, offset)++`]
  5791. * {xref-Packing-replace_28_24-bytes28-bytes24-uint8-}[`++replace_28_24(self, value, offset)++`]
  5792. * {xref-Packing-extract_32_1-bytes32-uint8-}[`++extract_32_1(self, offset)++`]
  5793. * {xref-Packing-replace_32_1-bytes32-bytes1-uint8-}[`++replace_32_1(self, value, offset)++`]
  5794. * {xref-Packing-extract_32_2-bytes32-uint8-}[`++extract_32_2(self, offset)++`]
  5795. * {xref-Packing-replace_32_2-bytes32-bytes2-uint8-}[`++replace_32_2(self, value, offset)++`]
  5796. * {xref-Packing-extract_32_4-bytes32-uint8-}[`++extract_32_4(self, offset)++`]
  5797. * {xref-Packing-replace_32_4-bytes32-bytes4-uint8-}[`++replace_32_4(self, value, offset)++`]
  5798. * {xref-Packing-extract_32_6-bytes32-uint8-}[`++extract_32_6(self, offset)++`]
  5799. * {xref-Packing-replace_32_6-bytes32-bytes6-uint8-}[`++replace_32_6(self, value, offset)++`]
  5800. * {xref-Packing-extract_32_8-bytes32-uint8-}[`++extract_32_8(self, offset)++`]
  5801. * {xref-Packing-replace_32_8-bytes32-bytes8-uint8-}[`++replace_32_8(self, value, offset)++`]
  5802. * {xref-Packing-extract_32_10-bytes32-uint8-}[`++extract_32_10(self, offset)++`]
  5803. * {xref-Packing-replace_32_10-bytes32-bytes10-uint8-}[`++replace_32_10(self, value, offset)++`]
  5804. * {xref-Packing-extract_32_12-bytes32-uint8-}[`++extract_32_12(self, offset)++`]
  5805. * {xref-Packing-replace_32_12-bytes32-bytes12-uint8-}[`++replace_32_12(self, value, offset)++`]
  5806. * {xref-Packing-extract_32_16-bytes32-uint8-}[`++extract_32_16(self, offset)++`]
  5807. * {xref-Packing-replace_32_16-bytes32-bytes16-uint8-}[`++replace_32_16(self, value, offset)++`]
  5808. * {xref-Packing-extract_32_20-bytes32-uint8-}[`++extract_32_20(self, offset)++`]
  5809. * {xref-Packing-replace_32_20-bytes32-bytes20-uint8-}[`++replace_32_20(self, value, offset)++`]
  5810. * {xref-Packing-extract_32_22-bytes32-uint8-}[`++extract_32_22(self, offset)++`]
  5811. * {xref-Packing-replace_32_22-bytes32-bytes22-uint8-}[`++replace_32_22(self, value, offset)++`]
  5812. * {xref-Packing-extract_32_24-bytes32-uint8-}[`++extract_32_24(self, offset)++`]
  5813. * {xref-Packing-replace_32_24-bytes32-bytes24-uint8-}[`++replace_32_24(self, value, offset)++`]
  5814. * {xref-Packing-extract_32_28-bytes32-uint8-}[`++extract_32_28(self, offset)++`]
  5815. * {xref-Packing-replace_32_28-bytes32-bytes28-uint8-}[`++replace_32_28(self, value, offset)++`]
  5816. --
  5817. [.contract-index]
  5818. .Errors
  5819. --
  5820. * {xref-Packing-OutOfRangeAccess--}[`++OutOfRangeAccess()++`]
  5821. --
  5822. [.contract-item]
  5823. [[Packing-pack_1_1-bytes1-bytes1-]]
  5824. ==== `[.contract-item-name]#++pack_1_1++#++(bytes1 left, bytes1 right) โ†’ bytes2 result++` [.item-kind]#internal#
  5825. [.contract-item]
  5826. [[Packing-pack_2_2-bytes2-bytes2-]]
  5827. ==== `[.contract-item-name]#++pack_2_2++#++(bytes2 left, bytes2 right) โ†’ bytes4 result++` [.item-kind]#internal#
  5828. [.contract-item]
  5829. [[Packing-pack_2_4-bytes2-bytes4-]]
  5830. ==== `[.contract-item-name]#++pack_2_4++#++(bytes2 left, bytes4 right) โ†’ bytes6 result++` [.item-kind]#internal#
  5831. [.contract-item]
  5832. [[Packing-pack_2_6-bytes2-bytes6-]]
  5833. ==== `[.contract-item-name]#++pack_2_6++#++(bytes2 left, bytes6 right) โ†’ bytes8 result++` [.item-kind]#internal#
  5834. [.contract-item]
  5835. [[Packing-pack_2_8-bytes2-bytes8-]]
  5836. ==== `[.contract-item-name]#++pack_2_8++#++(bytes2 left, bytes8 right) โ†’ bytes10 result++` [.item-kind]#internal#
  5837. [.contract-item]
  5838. [[Packing-pack_2_10-bytes2-bytes10-]]
  5839. ==== `[.contract-item-name]#++pack_2_10++#++(bytes2 left, bytes10 right) โ†’ bytes12 result++` [.item-kind]#internal#
  5840. [.contract-item]
  5841. [[Packing-pack_2_20-bytes2-bytes20-]]
  5842. ==== `[.contract-item-name]#++pack_2_20++#++(bytes2 left, bytes20 right) โ†’ bytes22 result++` [.item-kind]#internal#
  5843. [.contract-item]
  5844. [[Packing-pack_2_22-bytes2-bytes22-]]
  5845. ==== `[.contract-item-name]#++pack_2_22++#++(bytes2 left, bytes22 right) โ†’ bytes24 result++` [.item-kind]#internal#
  5846. [.contract-item]
  5847. [[Packing-pack_4_2-bytes4-bytes2-]]
  5848. ==== `[.contract-item-name]#++pack_4_2++#++(bytes4 left, bytes2 right) โ†’ bytes6 result++` [.item-kind]#internal#
  5849. [.contract-item]
  5850. [[Packing-pack_4_4-bytes4-bytes4-]]
  5851. ==== `[.contract-item-name]#++pack_4_4++#++(bytes4 left, bytes4 right) โ†’ bytes8 result++` [.item-kind]#internal#
  5852. [.contract-item]
  5853. [[Packing-pack_4_6-bytes4-bytes6-]]
  5854. ==== `[.contract-item-name]#++pack_4_6++#++(bytes4 left, bytes6 right) โ†’ bytes10 result++` [.item-kind]#internal#
  5855. [.contract-item]
  5856. [[Packing-pack_4_8-bytes4-bytes8-]]
  5857. ==== `[.contract-item-name]#++pack_4_8++#++(bytes4 left, bytes8 right) โ†’ bytes12 result++` [.item-kind]#internal#
  5858. [.contract-item]
  5859. [[Packing-pack_4_12-bytes4-bytes12-]]
  5860. ==== `[.contract-item-name]#++pack_4_12++#++(bytes4 left, bytes12 right) โ†’ bytes16 result++` [.item-kind]#internal#
  5861. [.contract-item]
  5862. [[Packing-pack_4_16-bytes4-bytes16-]]
  5863. ==== `[.contract-item-name]#++pack_4_16++#++(bytes4 left, bytes16 right) โ†’ bytes20 result++` [.item-kind]#internal#
  5864. [.contract-item]
  5865. [[Packing-pack_4_20-bytes4-bytes20-]]
  5866. ==== `[.contract-item-name]#++pack_4_20++#++(bytes4 left, bytes20 right) โ†’ bytes24 result++` [.item-kind]#internal#
  5867. [.contract-item]
  5868. [[Packing-pack_4_24-bytes4-bytes24-]]
  5869. ==== `[.contract-item-name]#++pack_4_24++#++(bytes4 left, bytes24 right) โ†’ bytes28 result++` [.item-kind]#internal#
  5870. [.contract-item]
  5871. [[Packing-pack_4_28-bytes4-bytes28-]]
  5872. ==== `[.contract-item-name]#++pack_4_28++#++(bytes4 left, bytes28 right) โ†’ bytes32 result++` [.item-kind]#internal#
  5873. [.contract-item]
  5874. [[Packing-pack_6_2-bytes6-bytes2-]]
  5875. ==== `[.contract-item-name]#++pack_6_2++#++(bytes6 left, bytes2 right) โ†’ bytes8 result++` [.item-kind]#internal#
  5876. [.contract-item]
  5877. [[Packing-pack_6_4-bytes6-bytes4-]]
  5878. ==== `[.contract-item-name]#++pack_6_4++#++(bytes6 left, bytes4 right) โ†’ bytes10 result++` [.item-kind]#internal#
  5879. [.contract-item]
  5880. [[Packing-pack_6_6-bytes6-bytes6-]]
  5881. ==== `[.contract-item-name]#++pack_6_6++#++(bytes6 left, bytes6 right) โ†’ bytes12 result++` [.item-kind]#internal#
  5882. [.contract-item]
  5883. [[Packing-pack_6_10-bytes6-bytes10-]]
  5884. ==== `[.contract-item-name]#++pack_6_10++#++(bytes6 left, bytes10 right) โ†’ bytes16 result++` [.item-kind]#internal#
  5885. [.contract-item]
  5886. [[Packing-pack_6_16-bytes6-bytes16-]]
  5887. ==== `[.contract-item-name]#++pack_6_16++#++(bytes6 left, bytes16 right) โ†’ bytes22 result++` [.item-kind]#internal#
  5888. [.contract-item]
  5889. [[Packing-pack_6_22-bytes6-bytes22-]]
  5890. ==== `[.contract-item-name]#++pack_6_22++#++(bytes6 left, bytes22 right) โ†’ bytes28 result++` [.item-kind]#internal#
  5891. [.contract-item]
  5892. [[Packing-pack_8_2-bytes8-bytes2-]]
  5893. ==== `[.contract-item-name]#++pack_8_2++#++(bytes8 left, bytes2 right) โ†’ bytes10 result++` [.item-kind]#internal#
  5894. [.contract-item]
  5895. [[Packing-pack_8_4-bytes8-bytes4-]]
  5896. ==== `[.contract-item-name]#++pack_8_4++#++(bytes8 left, bytes4 right) โ†’ bytes12 result++` [.item-kind]#internal#
  5897. [.contract-item]
  5898. [[Packing-pack_8_8-bytes8-bytes8-]]
  5899. ==== `[.contract-item-name]#++pack_8_8++#++(bytes8 left, bytes8 right) โ†’ bytes16 result++` [.item-kind]#internal#
  5900. [.contract-item]
  5901. [[Packing-pack_8_12-bytes8-bytes12-]]
  5902. ==== `[.contract-item-name]#++pack_8_12++#++(bytes8 left, bytes12 right) โ†’ bytes20 result++` [.item-kind]#internal#
  5903. [.contract-item]
  5904. [[Packing-pack_8_16-bytes8-bytes16-]]
  5905. ==== `[.contract-item-name]#++pack_8_16++#++(bytes8 left, bytes16 right) โ†’ bytes24 result++` [.item-kind]#internal#
  5906. [.contract-item]
  5907. [[Packing-pack_8_20-bytes8-bytes20-]]
  5908. ==== `[.contract-item-name]#++pack_8_20++#++(bytes8 left, bytes20 right) โ†’ bytes28 result++` [.item-kind]#internal#
  5909. [.contract-item]
  5910. [[Packing-pack_8_24-bytes8-bytes24-]]
  5911. ==== `[.contract-item-name]#++pack_8_24++#++(bytes8 left, bytes24 right) โ†’ bytes32 result++` [.item-kind]#internal#
  5912. [.contract-item]
  5913. [[Packing-pack_10_2-bytes10-bytes2-]]
  5914. ==== `[.contract-item-name]#++pack_10_2++#++(bytes10 left, bytes2 right) โ†’ bytes12 result++` [.item-kind]#internal#
  5915. [.contract-item]
  5916. [[Packing-pack_10_6-bytes10-bytes6-]]
  5917. ==== `[.contract-item-name]#++pack_10_6++#++(bytes10 left, bytes6 right) โ†’ bytes16 result++` [.item-kind]#internal#
  5918. [.contract-item]
  5919. [[Packing-pack_10_10-bytes10-bytes10-]]
  5920. ==== `[.contract-item-name]#++pack_10_10++#++(bytes10 left, bytes10 right) โ†’ bytes20 result++` [.item-kind]#internal#
  5921. [.contract-item]
  5922. [[Packing-pack_10_12-bytes10-bytes12-]]
  5923. ==== `[.contract-item-name]#++pack_10_12++#++(bytes10 left, bytes12 right) โ†’ bytes22 result++` [.item-kind]#internal#
  5924. [.contract-item]
  5925. [[Packing-pack_10_22-bytes10-bytes22-]]
  5926. ==== `[.contract-item-name]#++pack_10_22++#++(bytes10 left, bytes22 right) โ†’ bytes32 result++` [.item-kind]#internal#
  5927. [.contract-item]
  5928. [[Packing-pack_12_4-bytes12-bytes4-]]
  5929. ==== `[.contract-item-name]#++pack_12_4++#++(bytes12 left, bytes4 right) โ†’ bytes16 result++` [.item-kind]#internal#
  5930. [.contract-item]
  5931. [[Packing-pack_12_8-bytes12-bytes8-]]
  5932. ==== `[.contract-item-name]#++pack_12_8++#++(bytes12 left, bytes8 right) โ†’ bytes20 result++` [.item-kind]#internal#
  5933. [.contract-item]
  5934. [[Packing-pack_12_10-bytes12-bytes10-]]
  5935. ==== `[.contract-item-name]#++pack_12_10++#++(bytes12 left, bytes10 right) โ†’ bytes22 result++` [.item-kind]#internal#
  5936. [.contract-item]
  5937. [[Packing-pack_12_12-bytes12-bytes12-]]
  5938. ==== `[.contract-item-name]#++pack_12_12++#++(bytes12 left, bytes12 right) โ†’ bytes24 result++` [.item-kind]#internal#
  5939. [.contract-item]
  5940. [[Packing-pack_12_16-bytes12-bytes16-]]
  5941. ==== `[.contract-item-name]#++pack_12_16++#++(bytes12 left, bytes16 right) โ†’ bytes28 result++` [.item-kind]#internal#
  5942. [.contract-item]
  5943. [[Packing-pack_12_20-bytes12-bytes20-]]
  5944. ==== `[.contract-item-name]#++pack_12_20++#++(bytes12 left, bytes20 right) โ†’ bytes32 result++` [.item-kind]#internal#
  5945. [.contract-item]
  5946. [[Packing-pack_16_4-bytes16-bytes4-]]
  5947. ==== `[.contract-item-name]#++pack_16_4++#++(bytes16 left, bytes4 right) โ†’ bytes20 result++` [.item-kind]#internal#
  5948. [.contract-item]
  5949. [[Packing-pack_16_6-bytes16-bytes6-]]
  5950. ==== `[.contract-item-name]#++pack_16_6++#++(bytes16 left, bytes6 right) โ†’ bytes22 result++` [.item-kind]#internal#
  5951. [.contract-item]
  5952. [[Packing-pack_16_8-bytes16-bytes8-]]
  5953. ==== `[.contract-item-name]#++pack_16_8++#++(bytes16 left, bytes8 right) โ†’ bytes24 result++` [.item-kind]#internal#
  5954. [.contract-item]
  5955. [[Packing-pack_16_12-bytes16-bytes12-]]
  5956. ==== `[.contract-item-name]#++pack_16_12++#++(bytes16 left, bytes12 right) โ†’ bytes28 result++` [.item-kind]#internal#
  5957. [.contract-item]
  5958. [[Packing-pack_16_16-bytes16-bytes16-]]
  5959. ==== `[.contract-item-name]#++pack_16_16++#++(bytes16 left, bytes16 right) โ†’ bytes32 result++` [.item-kind]#internal#
  5960. [.contract-item]
  5961. [[Packing-pack_20_2-bytes20-bytes2-]]
  5962. ==== `[.contract-item-name]#++pack_20_2++#++(bytes20 left, bytes2 right) โ†’ bytes22 result++` [.item-kind]#internal#
  5963. [.contract-item]
  5964. [[Packing-pack_20_4-bytes20-bytes4-]]
  5965. ==== `[.contract-item-name]#++pack_20_4++#++(bytes20 left, bytes4 right) โ†’ bytes24 result++` [.item-kind]#internal#
  5966. [.contract-item]
  5967. [[Packing-pack_20_8-bytes20-bytes8-]]
  5968. ==== `[.contract-item-name]#++pack_20_8++#++(bytes20 left, bytes8 right) โ†’ bytes28 result++` [.item-kind]#internal#
  5969. [.contract-item]
  5970. [[Packing-pack_20_12-bytes20-bytes12-]]
  5971. ==== `[.contract-item-name]#++pack_20_12++#++(bytes20 left, bytes12 right) โ†’ bytes32 result++` [.item-kind]#internal#
  5972. [.contract-item]
  5973. [[Packing-pack_22_2-bytes22-bytes2-]]
  5974. ==== `[.contract-item-name]#++pack_22_2++#++(bytes22 left, bytes2 right) โ†’ bytes24 result++` [.item-kind]#internal#
  5975. [.contract-item]
  5976. [[Packing-pack_22_6-bytes22-bytes6-]]
  5977. ==== `[.contract-item-name]#++pack_22_6++#++(bytes22 left, bytes6 right) โ†’ bytes28 result++` [.item-kind]#internal#
  5978. [.contract-item]
  5979. [[Packing-pack_22_10-bytes22-bytes10-]]
  5980. ==== `[.contract-item-name]#++pack_22_10++#++(bytes22 left, bytes10 right) โ†’ bytes32 result++` [.item-kind]#internal#
  5981. [.contract-item]
  5982. [[Packing-pack_24_4-bytes24-bytes4-]]
  5983. ==== `[.contract-item-name]#++pack_24_4++#++(bytes24 left, bytes4 right) โ†’ bytes28 result++` [.item-kind]#internal#
  5984. [.contract-item]
  5985. [[Packing-pack_24_8-bytes24-bytes8-]]
  5986. ==== `[.contract-item-name]#++pack_24_8++#++(bytes24 left, bytes8 right) โ†’ bytes32 result++` [.item-kind]#internal#
  5987. [.contract-item]
  5988. [[Packing-pack_28_4-bytes28-bytes4-]]
  5989. ==== `[.contract-item-name]#++pack_28_4++#++(bytes28 left, bytes4 right) โ†’ bytes32 result++` [.item-kind]#internal#
  5990. [.contract-item]
  5991. [[Packing-extract_2_1-bytes2-uint8-]]
  5992. ==== `[.contract-item-name]#++extract_2_1++#++(bytes2 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  5993. [.contract-item]
  5994. [[Packing-replace_2_1-bytes2-bytes1-uint8-]]
  5995. ==== `[.contract-item-name]#++replace_2_1++#++(bytes2 self, bytes1 value, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  5996. [.contract-item]
  5997. [[Packing-extract_4_1-bytes4-uint8-]]
  5998. ==== `[.contract-item-name]#++extract_4_1++#++(bytes4 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  5999. [.contract-item]
  6000. [[Packing-replace_4_1-bytes4-bytes1-uint8-]]
  6001. ==== `[.contract-item-name]#++replace_4_1++#++(bytes4 self, bytes1 value, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6002. [.contract-item]
  6003. [[Packing-extract_4_2-bytes4-uint8-]]
  6004. ==== `[.contract-item-name]#++extract_4_2++#++(bytes4 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6005. [.contract-item]
  6006. [[Packing-replace_4_2-bytes4-bytes2-uint8-]]
  6007. ==== `[.contract-item-name]#++replace_4_2++#++(bytes4 self, bytes2 value, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6008. [.contract-item]
  6009. [[Packing-extract_6_1-bytes6-uint8-]]
  6010. ==== `[.contract-item-name]#++extract_6_1++#++(bytes6 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  6011. [.contract-item]
  6012. [[Packing-replace_6_1-bytes6-bytes1-uint8-]]
  6013. ==== `[.contract-item-name]#++replace_6_1++#++(bytes6 self, bytes1 value, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6014. [.contract-item]
  6015. [[Packing-extract_6_2-bytes6-uint8-]]
  6016. ==== `[.contract-item-name]#++extract_6_2++#++(bytes6 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6017. [.contract-item]
  6018. [[Packing-replace_6_2-bytes6-bytes2-uint8-]]
  6019. ==== `[.contract-item-name]#++replace_6_2++#++(bytes6 self, bytes2 value, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6020. [.contract-item]
  6021. [[Packing-extract_6_4-bytes6-uint8-]]
  6022. ==== `[.contract-item-name]#++extract_6_4++#++(bytes6 self, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6023. [.contract-item]
  6024. [[Packing-replace_6_4-bytes6-bytes4-uint8-]]
  6025. ==== `[.contract-item-name]#++replace_6_4++#++(bytes6 self, bytes4 value, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6026. [.contract-item]
  6027. [[Packing-extract_8_1-bytes8-uint8-]]
  6028. ==== `[.contract-item-name]#++extract_8_1++#++(bytes8 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  6029. [.contract-item]
  6030. [[Packing-replace_8_1-bytes8-bytes1-uint8-]]
  6031. ==== `[.contract-item-name]#++replace_8_1++#++(bytes8 self, bytes1 value, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6032. [.contract-item]
  6033. [[Packing-extract_8_2-bytes8-uint8-]]
  6034. ==== `[.contract-item-name]#++extract_8_2++#++(bytes8 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6035. [.contract-item]
  6036. [[Packing-replace_8_2-bytes8-bytes2-uint8-]]
  6037. ==== `[.contract-item-name]#++replace_8_2++#++(bytes8 self, bytes2 value, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6038. [.contract-item]
  6039. [[Packing-extract_8_4-bytes8-uint8-]]
  6040. ==== `[.contract-item-name]#++extract_8_4++#++(bytes8 self, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6041. [.contract-item]
  6042. [[Packing-replace_8_4-bytes8-bytes4-uint8-]]
  6043. ==== `[.contract-item-name]#++replace_8_4++#++(bytes8 self, bytes4 value, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6044. [.contract-item]
  6045. [[Packing-extract_8_6-bytes8-uint8-]]
  6046. ==== `[.contract-item-name]#++extract_8_6++#++(bytes8 self, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6047. [.contract-item]
  6048. [[Packing-replace_8_6-bytes8-bytes6-uint8-]]
  6049. ==== `[.contract-item-name]#++replace_8_6++#++(bytes8 self, bytes6 value, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6050. [.contract-item]
  6051. [[Packing-extract_10_1-bytes10-uint8-]]
  6052. ==== `[.contract-item-name]#++extract_10_1++#++(bytes10 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  6053. [.contract-item]
  6054. [[Packing-replace_10_1-bytes10-bytes1-uint8-]]
  6055. ==== `[.contract-item-name]#++replace_10_1++#++(bytes10 self, bytes1 value, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6056. [.contract-item]
  6057. [[Packing-extract_10_2-bytes10-uint8-]]
  6058. ==== `[.contract-item-name]#++extract_10_2++#++(bytes10 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6059. [.contract-item]
  6060. [[Packing-replace_10_2-bytes10-bytes2-uint8-]]
  6061. ==== `[.contract-item-name]#++replace_10_2++#++(bytes10 self, bytes2 value, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6062. [.contract-item]
  6063. [[Packing-extract_10_4-bytes10-uint8-]]
  6064. ==== `[.contract-item-name]#++extract_10_4++#++(bytes10 self, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6065. [.contract-item]
  6066. [[Packing-replace_10_4-bytes10-bytes4-uint8-]]
  6067. ==== `[.contract-item-name]#++replace_10_4++#++(bytes10 self, bytes4 value, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6068. [.contract-item]
  6069. [[Packing-extract_10_6-bytes10-uint8-]]
  6070. ==== `[.contract-item-name]#++extract_10_6++#++(bytes10 self, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6071. [.contract-item]
  6072. [[Packing-replace_10_6-bytes10-bytes6-uint8-]]
  6073. ==== `[.contract-item-name]#++replace_10_6++#++(bytes10 self, bytes6 value, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6074. [.contract-item]
  6075. [[Packing-extract_10_8-bytes10-uint8-]]
  6076. ==== `[.contract-item-name]#++extract_10_8++#++(bytes10 self, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6077. [.contract-item]
  6078. [[Packing-replace_10_8-bytes10-bytes8-uint8-]]
  6079. ==== `[.contract-item-name]#++replace_10_8++#++(bytes10 self, bytes8 value, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6080. [.contract-item]
  6081. [[Packing-extract_12_1-bytes12-uint8-]]
  6082. ==== `[.contract-item-name]#++extract_12_1++#++(bytes12 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  6083. [.contract-item]
  6084. [[Packing-replace_12_1-bytes12-bytes1-uint8-]]
  6085. ==== `[.contract-item-name]#++replace_12_1++#++(bytes12 self, bytes1 value, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6086. [.contract-item]
  6087. [[Packing-extract_12_2-bytes12-uint8-]]
  6088. ==== `[.contract-item-name]#++extract_12_2++#++(bytes12 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6089. [.contract-item]
  6090. [[Packing-replace_12_2-bytes12-bytes2-uint8-]]
  6091. ==== `[.contract-item-name]#++replace_12_2++#++(bytes12 self, bytes2 value, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6092. [.contract-item]
  6093. [[Packing-extract_12_4-bytes12-uint8-]]
  6094. ==== `[.contract-item-name]#++extract_12_4++#++(bytes12 self, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6095. [.contract-item]
  6096. [[Packing-replace_12_4-bytes12-bytes4-uint8-]]
  6097. ==== `[.contract-item-name]#++replace_12_4++#++(bytes12 self, bytes4 value, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6098. [.contract-item]
  6099. [[Packing-extract_12_6-bytes12-uint8-]]
  6100. ==== `[.contract-item-name]#++extract_12_6++#++(bytes12 self, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6101. [.contract-item]
  6102. [[Packing-replace_12_6-bytes12-bytes6-uint8-]]
  6103. ==== `[.contract-item-name]#++replace_12_6++#++(bytes12 self, bytes6 value, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6104. [.contract-item]
  6105. [[Packing-extract_12_8-bytes12-uint8-]]
  6106. ==== `[.contract-item-name]#++extract_12_8++#++(bytes12 self, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6107. [.contract-item]
  6108. [[Packing-replace_12_8-bytes12-bytes8-uint8-]]
  6109. ==== `[.contract-item-name]#++replace_12_8++#++(bytes12 self, bytes8 value, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6110. [.contract-item]
  6111. [[Packing-extract_12_10-bytes12-uint8-]]
  6112. ==== `[.contract-item-name]#++extract_12_10++#++(bytes12 self, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6113. [.contract-item]
  6114. [[Packing-replace_12_10-bytes12-bytes10-uint8-]]
  6115. ==== `[.contract-item-name]#++replace_12_10++#++(bytes12 self, bytes10 value, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6116. [.contract-item]
  6117. [[Packing-extract_16_1-bytes16-uint8-]]
  6118. ==== `[.contract-item-name]#++extract_16_1++#++(bytes16 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  6119. [.contract-item]
  6120. [[Packing-replace_16_1-bytes16-bytes1-uint8-]]
  6121. ==== `[.contract-item-name]#++replace_16_1++#++(bytes16 self, bytes1 value, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6122. [.contract-item]
  6123. [[Packing-extract_16_2-bytes16-uint8-]]
  6124. ==== `[.contract-item-name]#++extract_16_2++#++(bytes16 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6125. [.contract-item]
  6126. [[Packing-replace_16_2-bytes16-bytes2-uint8-]]
  6127. ==== `[.contract-item-name]#++replace_16_2++#++(bytes16 self, bytes2 value, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6128. [.contract-item]
  6129. [[Packing-extract_16_4-bytes16-uint8-]]
  6130. ==== `[.contract-item-name]#++extract_16_4++#++(bytes16 self, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6131. [.contract-item]
  6132. [[Packing-replace_16_4-bytes16-bytes4-uint8-]]
  6133. ==== `[.contract-item-name]#++replace_16_4++#++(bytes16 self, bytes4 value, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6134. [.contract-item]
  6135. [[Packing-extract_16_6-bytes16-uint8-]]
  6136. ==== `[.contract-item-name]#++extract_16_6++#++(bytes16 self, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6137. [.contract-item]
  6138. [[Packing-replace_16_6-bytes16-bytes6-uint8-]]
  6139. ==== `[.contract-item-name]#++replace_16_6++#++(bytes16 self, bytes6 value, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6140. [.contract-item]
  6141. [[Packing-extract_16_8-bytes16-uint8-]]
  6142. ==== `[.contract-item-name]#++extract_16_8++#++(bytes16 self, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6143. [.contract-item]
  6144. [[Packing-replace_16_8-bytes16-bytes8-uint8-]]
  6145. ==== `[.contract-item-name]#++replace_16_8++#++(bytes16 self, bytes8 value, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6146. [.contract-item]
  6147. [[Packing-extract_16_10-bytes16-uint8-]]
  6148. ==== `[.contract-item-name]#++extract_16_10++#++(bytes16 self, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6149. [.contract-item]
  6150. [[Packing-replace_16_10-bytes16-bytes10-uint8-]]
  6151. ==== `[.contract-item-name]#++replace_16_10++#++(bytes16 self, bytes10 value, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6152. [.contract-item]
  6153. [[Packing-extract_16_12-bytes16-uint8-]]
  6154. ==== `[.contract-item-name]#++extract_16_12++#++(bytes16 self, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6155. [.contract-item]
  6156. [[Packing-replace_16_12-bytes16-bytes12-uint8-]]
  6157. ==== `[.contract-item-name]#++replace_16_12++#++(bytes16 self, bytes12 value, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6158. [.contract-item]
  6159. [[Packing-extract_20_1-bytes20-uint8-]]
  6160. ==== `[.contract-item-name]#++extract_20_1++#++(bytes20 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  6161. [.contract-item]
  6162. [[Packing-replace_20_1-bytes20-bytes1-uint8-]]
  6163. ==== `[.contract-item-name]#++replace_20_1++#++(bytes20 self, bytes1 value, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6164. [.contract-item]
  6165. [[Packing-extract_20_2-bytes20-uint8-]]
  6166. ==== `[.contract-item-name]#++extract_20_2++#++(bytes20 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6167. [.contract-item]
  6168. [[Packing-replace_20_2-bytes20-bytes2-uint8-]]
  6169. ==== `[.contract-item-name]#++replace_20_2++#++(bytes20 self, bytes2 value, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6170. [.contract-item]
  6171. [[Packing-extract_20_4-bytes20-uint8-]]
  6172. ==== `[.contract-item-name]#++extract_20_4++#++(bytes20 self, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6173. [.contract-item]
  6174. [[Packing-replace_20_4-bytes20-bytes4-uint8-]]
  6175. ==== `[.contract-item-name]#++replace_20_4++#++(bytes20 self, bytes4 value, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6176. [.contract-item]
  6177. [[Packing-extract_20_6-bytes20-uint8-]]
  6178. ==== `[.contract-item-name]#++extract_20_6++#++(bytes20 self, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6179. [.contract-item]
  6180. [[Packing-replace_20_6-bytes20-bytes6-uint8-]]
  6181. ==== `[.contract-item-name]#++replace_20_6++#++(bytes20 self, bytes6 value, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6182. [.contract-item]
  6183. [[Packing-extract_20_8-bytes20-uint8-]]
  6184. ==== `[.contract-item-name]#++extract_20_8++#++(bytes20 self, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6185. [.contract-item]
  6186. [[Packing-replace_20_8-bytes20-bytes8-uint8-]]
  6187. ==== `[.contract-item-name]#++replace_20_8++#++(bytes20 self, bytes8 value, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6188. [.contract-item]
  6189. [[Packing-extract_20_10-bytes20-uint8-]]
  6190. ==== `[.contract-item-name]#++extract_20_10++#++(bytes20 self, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6191. [.contract-item]
  6192. [[Packing-replace_20_10-bytes20-bytes10-uint8-]]
  6193. ==== `[.contract-item-name]#++replace_20_10++#++(bytes20 self, bytes10 value, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6194. [.contract-item]
  6195. [[Packing-extract_20_12-bytes20-uint8-]]
  6196. ==== `[.contract-item-name]#++extract_20_12++#++(bytes20 self, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6197. [.contract-item]
  6198. [[Packing-replace_20_12-bytes20-bytes12-uint8-]]
  6199. ==== `[.contract-item-name]#++replace_20_12++#++(bytes20 self, bytes12 value, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6200. [.contract-item]
  6201. [[Packing-extract_20_16-bytes20-uint8-]]
  6202. ==== `[.contract-item-name]#++extract_20_16++#++(bytes20 self, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6203. [.contract-item]
  6204. [[Packing-replace_20_16-bytes20-bytes16-uint8-]]
  6205. ==== `[.contract-item-name]#++replace_20_16++#++(bytes20 self, bytes16 value, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6206. [.contract-item]
  6207. [[Packing-extract_22_1-bytes22-uint8-]]
  6208. ==== `[.contract-item-name]#++extract_22_1++#++(bytes22 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  6209. [.contract-item]
  6210. [[Packing-replace_22_1-bytes22-bytes1-uint8-]]
  6211. ==== `[.contract-item-name]#++replace_22_1++#++(bytes22 self, bytes1 value, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6212. [.contract-item]
  6213. [[Packing-extract_22_2-bytes22-uint8-]]
  6214. ==== `[.contract-item-name]#++extract_22_2++#++(bytes22 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6215. [.contract-item]
  6216. [[Packing-replace_22_2-bytes22-bytes2-uint8-]]
  6217. ==== `[.contract-item-name]#++replace_22_2++#++(bytes22 self, bytes2 value, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6218. [.contract-item]
  6219. [[Packing-extract_22_4-bytes22-uint8-]]
  6220. ==== `[.contract-item-name]#++extract_22_4++#++(bytes22 self, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6221. [.contract-item]
  6222. [[Packing-replace_22_4-bytes22-bytes4-uint8-]]
  6223. ==== `[.contract-item-name]#++replace_22_4++#++(bytes22 self, bytes4 value, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6224. [.contract-item]
  6225. [[Packing-extract_22_6-bytes22-uint8-]]
  6226. ==== `[.contract-item-name]#++extract_22_6++#++(bytes22 self, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6227. [.contract-item]
  6228. [[Packing-replace_22_6-bytes22-bytes6-uint8-]]
  6229. ==== `[.contract-item-name]#++replace_22_6++#++(bytes22 self, bytes6 value, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6230. [.contract-item]
  6231. [[Packing-extract_22_8-bytes22-uint8-]]
  6232. ==== `[.contract-item-name]#++extract_22_8++#++(bytes22 self, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6233. [.contract-item]
  6234. [[Packing-replace_22_8-bytes22-bytes8-uint8-]]
  6235. ==== `[.contract-item-name]#++replace_22_8++#++(bytes22 self, bytes8 value, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6236. [.contract-item]
  6237. [[Packing-extract_22_10-bytes22-uint8-]]
  6238. ==== `[.contract-item-name]#++extract_22_10++#++(bytes22 self, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6239. [.contract-item]
  6240. [[Packing-replace_22_10-bytes22-bytes10-uint8-]]
  6241. ==== `[.contract-item-name]#++replace_22_10++#++(bytes22 self, bytes10 value, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6242. [.contract-item]
  6243. [[Packing-extract_22_12-bytes22-uint8-]]
  6244. ==== `[.contract-item-name]#++extract_22_12++#++(bytes22 self, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6245. [.contract-item]
  6246. [[Packing-replace_22_12-bytes22-bytes12-uint8-]]
  6247. ==== `[.contract-item-name]#++replace_22_12++#++(bytes22 self, bytes12 value, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6248. [.contract-item]
  6249. [[Packing-extract_22_16-bytes22-uint8-]]
  6250. ==== `[.contract-item-name]#++extract_22_16++#++(bytes22 self, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6251. [.contract-item]
  6252. [[Packing-replace_22_16-bytes22-bytes16-uint8-]]
  6253. ==== `[.contract-item-name]#++replace_22_16++#++(bytes22 self, bytes16 value, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6254. [.contract-item]
  6255. [[Packing-extract_22_20-bytes22-uint8-]]
  6256. ==== `[.contract-item-name]#++extract_22_20++#++(bytes22 self, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6257. [.contract-item]
  6258. [[Packing-replace_22_20-bytes22-bytes20-uint8-]]
  6259. ==== `[.contract-item-name]#++replace_22_20++#++(bytes22 self, bytes20 value, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6260. [.contract-item]
  6261. [[Packing-extract_24_1-bytes24-uint8-]]
  6262. ==== `[.contract-item-name]#++extract_24_1++#++(bytes24 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  6263. [.contract-item]
  6264. [[Packing-replace_24_1-bytes24-bytes1-uint8-]]
  6265. ==== `[.contract-item-name]#++replace_24_1++#++(bytes24 self, bytes1 value, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6266. [.contract-item]
  6267. [[Packing-extract_24_2-bytes24-uint8-]]
  6268. ==== `[.contract-item-name]#++extract_24_2++#++(bytes24 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6269. [.contract-item]
  6270. [[Packing-replace_24_2-bytes24-bytes2-uint8-]]
  6271. ==== `[.contract-item-name]#++replace_24_2++#++(bytes24 self, bytes2 value, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6272. [.contract-item]
  6273. [[Packing-extract_24_4-bytes24-uint8-]]
  6274. ==== `[.contract-item-name]#++extract_24_4++#++(bytes24 self, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6275. [.contract-item]
  6276. [[Packing-replace_24_4-bytes24-bytes4-uint8-]]
  6277. ==== `[.contract-item-name]#++replace_24_4++#++(bytes24 self, bytes4 value, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6278. [.contract-item]
  6279. [[Packing-extract_24_6-bytes24-uint8-]]
  6280. ==== `[.contract-item-name]#++extract_24_6++#++(bytes24 self, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6281. [.contract-item]
  6282. [[Packing-replace_24_6-bytes24-bytes6-uint8-]]
  6283. ==== `[.contract-item-name]#++replace_24_6++#++(bytes24 self, bytes6 value, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6284. [.contract-item]
  6285. [[Packing-extract_24_8-bytes24-uint8-]]
  6286. ==== `[.contract-item-name]#++extract_24_8++#++(bytes24 self, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6287. [.contract-item]
  6288. [[Packing-replace_24_8-bytes24-bytes8-uint8-]]
  6289. ==== `[.contract-item-name]#++replace_24_8++#++(bytes24 self, bytes8 value, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6290. [.contract-item]
  6291. [[Packing-extract_24_10-bytes24-uint8-]]
  6292. ==== `[.contract-item-name]#++extract_24_10++#++(bytes24 self, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6293. [.contract-item]
  6294. [[Packing-replace_24_10-bytes24-bytes10-uint8-]]
  6295. ==== `[.contract-item-name]#++replace_24_10++#++(bytes24 self, bytes10 value, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6296. [.contract-item]
  6297. [[Packing-extract_24_12-bytes24-uint8-]]
  6298. ==== `[.contract-item-name]#++extract_24_12++#++(bytes24 self, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6299. [.contract-item]
  6300. [[Packing-replace_24_12-bytes24-bytes12-uint8-]]
  6301. ==== `[.contract-item-name]#++replace_24_12++#++(bytes24 self, bytes12 value, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6302. [.contract-item]
  6303. [[Packing-extract_24_16-bytes24-uint8-]]
  6304. ==== `[.contract-item-name]#++extract_24_16++#++(bytes24 self, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6305. [.contract-item]
  6306. [[Packing-replace_24_16-bytes24-bytes16-uint8-]]
  6307. ==== `[.contract-item-name]#++replace_24_16++#++(bytes24 self, bytes16 value, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6308. [.contract-item]
  6309. [[Packing-extract_24_20-bytes24-uint8-]]
  6310. ==== `[.contract-item-name]#++extract_24_20++#++(bytes24 self, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6311. [.contract-item]
  6312. [[Packing-replace_24_20-bytes24-bytes20-uint8-]]
  6313. ==== `[.contract-item-name]#++replace_24_20++#++(bytes24 self, bytes20 value, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6314. [.contract-item]
  6315. [[Packing-extract_24_22-bytes24-uint8-]]
  6316. ==== `[.contract-item-name]#++extract_24_22++#++(bytes24 self, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6317. [.contract-item]
  6318. [[Packing-replace_24_22-bytes24-bytes22-uint8-]]
  6319. ==== `[.contract-item-name]#++replace_24_22++#++(bytes24 self, bytes22 value, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6320. [.contract-item]
  6321. [[Packing-extract_28_1-bytes28-uint8-]]
  6322. ==== `[.contract-item-name]#++extract_28_1++#++(bytes28 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  6323. [.contract-item]
  6324. [[Packing-replace_28_1-bytes28-bytes1-uint8-]]
  6325. ==== `[.contract-item-name]#++replace_28_1++#++(bytes28 self, bytes1 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6326. [.contract-item]
  6327. [[Packing-extract_28_2-bytes28-uint8-]]
  6328. ==== `[.contract-item-name]#++extract_28_2++#++(bytes28 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6329. [.contract-item]
  6330. [[Packing-replace_28_2-bytes28-bytes2-uint8-]]
  6331. ==== `[.contract-item-name]#++replace_28_2++#++(bytes28 self, bytes2 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6332. [.contract-item]
  6333. [[Packing-extract_28_4-bytes28-uint8-]]
  6334. ==== `[.contract-item-name]#++extract_28_4++#++(bytes28 self, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6335. [.contract-item]
  6336. [[Packing-replace_28_4-bytes28-bytes4-uint8-]]
  6337. ==== `[.contract-item-name]#++replace_28_4++#++(bytes28 self, bytes4 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6338. [.contract-item]
  6339. [[Packing-extract_28_6-bytes28-uint8-]]
  6340. ==== `[.contract-item-name]#++extract_28_6++#++(bytes28 self, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6341. [.contract-item]
  6342. [[Packing-replace_28_6-bytes28-bytes6-uint8-]]
  6343. ==== `[.contract-item-name]#++replace_28_6++#++(bytes28 self, bytes6 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6344. [.contract-item]
  6345. [[Packing-extract_28_8-bytes28-uint8-]]
  6346. ==== `[.contract-item-name]#++extract_28_8++#++(bytes28 self, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6347. [.contract-item]
  6348. [[Packing-replace_28_8-bytes28-bytes8-uint8-]]
  6349. ==== `[.contract-item-name]#++replace_28_8++#++(bytes28 self, bytes8 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6350. [.contract-item]
  6351. [[Packing-extract_28_10-bytes28-uint8-]]
  6352. ==== `[.contract-item-name]#++extract_28_10++#++(bytes28 self, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6353. [.contract-item]
  6354. [[Packing-replace_28_10-bytes28-bytes10-uint8-]]
  6355. ==== `[.contract-item-name]#++replace_28_10++#++(bytes28 self, bytes10 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6356. [.contract-item]
  6357. [[Packing-extract_28_12-bytes28-uint8-]]
  6358. ==== `[.contract-item-name]#++extract_28_12++#++(bytes28 self, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6359. [.contract-item]
  6360. [[Packing-replace_28_12-bytes28-bytes12-uint8-]]
  6361. ==== `[.contract-item-name]#++replace_28_12++#++(bytes28 self, bytes12 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6362. [.contract-item]
  6363. [[Packing-extract_28_16-bytes28-uint8-]]
  6364. ==== `[.contract-item-name]#++extract_28_16++#++(bytes28 self, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6365. [.contract-item]
  6366. [[Packing-replace_28_16-bytes28-bytes16-uint8-]]
  6367. ==== `[.contract-item-name]#++replace_28_16++#++(bytes28 self, bytes16 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6368. [.contract-item]
  6369. [[Packing-extract_28_20-bytes28-uint8-]]
  6370. ==== `[.contract-item-name]#++extract_28_20++#++(bytes28 self, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6371. [.contract-item]
  6372. [[Packing-replace_28_20-bytes28-bytes20-uint8-]]
  6373. ==== `[.contract-item-name]#++replace_28_20++#++(bytes28 self, bytes20 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6374. [.contract-item]
  6375. [[Packing-extract_28_22-bytes28-uint8-]]
  6376. ==== `[.contract-item-name]#++extract_28_22++#++(bytes28 self, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6377. [.contract-item]
  6378. [[Packing-replace_28_22-bytes28-bytes22-uint8-]]
  6379. ==== `[.contract-item-name]#++replace_28_22++#++(bytes28 self, bytes22 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6380. [.contract-item]
  6381. [[Packing-extract_28_24-bytes28-uint8-]]
  6382. ==== `[.contract-item-name]#++extract_28_24++#++(bytes28 self, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6383. [.contract-item]
  6384. [[Packing-replace_28_24-bytes28-bytes24-uint8-]]
  6385. ==== `[.contract-item-name]#++replace_28_24++#++(bytes28 self, bytes24 value, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6386. [.contract-item]
  6387. [[Packing-extract_32_1-bytes32-uint8-]]
  6388. ==== `[.contract-item-name]#++extract_32_1++#++(bytes32 self, uint8 offset) โ†’ bytes1 result++` [.item-kind]#internal#
  6389. [.contract-item]
  6390. [[Packing-replace_32_1-bytes32-bytes1-uint8-]]
  6391. ==== `[.contract-item-name]#++replace_32_1++#++(bytes32 self, bytes1 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6392. [.contract-item]
  6393. [[Packing-extract_32_2-bytes32-uint8-]]
  6394. ==== `[.contract-item-name]#++extract_32_2++#++(bytes32 self, uint8 offset) โ†’ bytes2 result++` [.item-kind]#internal#
  6395. [.contract-item]
  6396. [[Packing-replace_32_2-bytes32-bytes2-uint8-]]
  6397. ==== `[.contract-item-name]#++replace_32_2++#++(bytes32 self, bytes2 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6398. [.contract-item]
  6399. [[Packing-extract_32_4-bytes32-uint8-]]
  6400. ==== `[.contract-item-name]#++extract_32_4++#++(bytes32 self, uint8 offset) โ†’ bytes4 result++` [.item-kind]#internal#
  6401. [.contract-item]
  6402. [[Packing-replace_32_4-bytes32-bytes4-uint8-]]
  6403. ==== `[.contract-item-name]#++replace_32_4++#++(bytes32 self, bytes4 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6404. [.contract-item]
  6405. [[Packing-extract_32_6-bytes32-uint8-]]
  6406. ==== `[.contract-item-name]#++extract_32_6++#++(bytes32 self, uint8 offset) โ†’ bytes6 result++` [.item-kind]#internal#
  6407. [.contract-item]
  6408. [[Packing-replace_32_6-bytes32-bytes6-uint8-]]
  6409. ==== `[.contract-item-name]#++replace_32_6++#++(bytes32 self, bytes6 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6410. [.contract-item]
  6411. [[Packing-extract_32_8-bytes32-uint8-]]
  6412. ==== `[.contract-item-name]#++extract_32_8++#++(bytes32 self, uint8 offset) โ†’ bytes8 result++` [.item-kind]#internal#
  6413. [.contract-item]
  6414. [[Packing-replace_32_8-bytes32-bytes8-uint8-]]
  6415. ==== `[.contract-item-name]#++replace_32_8++#++(bytes32 self, bytes8 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6416. [.contract-item]
  6417. [[Packing-extract_32_10-bytes32-uint8-]]
  6418. ==== `[.contract-item-name]#++extract_32_10++#++(bytes32 self, uint8 offset) โ†’ bytes10 result++` [.item-kind]#internal#
  6419. [.contract-item]
  6420. [[Packing-replace_32_10-bytes32-bytes10-uint8-]]
  6421. ==== `[.contract-item-name]#++replace_32_10++#++(bytes32 self, bytes10 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6422. [.contract-item]
  6423. [[Packing-extract_32_12-bytes32-uint8-]]
  6424. ==== `[.contract-item-name]#++extract_32_12++#++(bytes32 self, uint8 offset) โ†’ bytes12 result++` [.item-kind]#internal#
  6425. [.contract-item]
  6426. [[Packing-replace_32_12-bytes32-bytes12-uint8-]]
  6427. ==== `[.contract-item-name]#++replace_32_12++#++(bytes32 self, bytes12 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6428. [.contract-item]
  6429. [[Packing-extract_32_16-bytes32-uint8-]]
  6430. ==== `[.contract-item-name]#++extract_32_16++#++(bytes32 self, uint8 offset) โ†’ bytes16 result++` [.item-kind]#internal#
  6431. [.contract-item]
  6432. [[Packing-replace_32_16-bytes32-bytes16-uint8-]]
  6433. ==== `[.contract-item-name]#++replace_32_16++#++(bytes32 self, bytes16 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6434. [.contract-item]
  6435. [[Packing-extract_32_20-bytes32-uint8-]]
  6436. ==== `[.contract-item-name]#++extract_32_20++#++(bytes32 self, uint8 offset) โ†’ bytes20 result++` [.item-kind]#internal#
  6437. [.contract-item]
  6438. [[Packing-replace_32_20-bytes32-bytes20-uint8-]]
  6439. ==== `[.contract-item-name]#++replace_32_20++#++(bytes32 self, bytes20 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6440. [.contract-item]
  6441. [[Packing-extract_32_22-bytes32-uint8-]]
  6442. ==== `[.contract-item-name]#++extract_32_22++#++(bytes32 self, uint8 offset) โ†’ bytes22 result++` [.item-kind]#internal#
  6443. [.contract-item]
  6444. [[Packing-replace_32_22-bytes32-bytes22-uint8-]]
  6445. ==== `[.contract-item-name]#++replace_32_22++#++(bytes32 self, bytes22 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6446. [.contract-item]
  6447. [[Packing-extract_32_24-bytes32-uint8-]]
  6448. ==== `[.contract-item-name]#++extract_32_24++#++(bytes32 self, uint8 offset) โ†’ bytes24 result++` [.item-kind]#internal#
  6449. [.contract-item]
  6450. [[Packing-replace_32_24-bytes32-bytes24-uint8-]]
  6451. ==== `[.contract-item-name]#++replace_32_24++#++(bytes32 self, bytes24 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6452. [.contract-item]
  6453. [[Packing-extract_32_28-bytes32-uint8-]]
  6454. ==== `[.contract-item-name]#++extract_32_28++#++(bytes32 self, uint8 offset) โ†’ bytes28 result++` [.item-kind]#internal#
  6455. [.contract-item]
  6456. [[Packing-replace_32_28-bytes32-bytes28-uint8-]]
  6457. ==== `[.contract-item-name]#++replace_32_28++#++(bytes32 self, bytes28 value, uint8 offset) โ†’ bytes32 result++` [.item-kind]#internal#
  6458. [.contract-item]
  6459. [[Packing-OutOfRangeAccess--]]
  6460. ==== `[.contract-item-name]#++OutOfRangeAccess++#++()++` [.item-kind]#error#
  6461. :GENERIC: pass:normal[xref:#Panic-GENERIC-uint256[`++GENERIC++`]]
  6462. :ASSERT: pass:normal[xref:#Panic-ASSERT-uint256[`++ASSERT++`]]
  6463. :UNDER_OVERFLOW: pass:normal[xref:#Panic-UNDER_OVERFLOW-uint256[`++UNDER_OVERFLOW++`]]
  6464. :DIVISION_BY_ZERO: pass:normal[xref:#Panic-DIVISION_BY_ZERO-uint256[`++DIVISION_BY_ZERO++`]]
  6465. :ENUM_CONVERSION_ERROR: pass:normal[xref:#Panic-ENUM_CONVERSION_ERROR-uint256[`++ENUM_CONVERSION_ERROR++`]]
  6466. :STORAGE_ENCODING_ERROR: pass:normal[xref:#Panic-STORAGE_ENCODING_ERROR-uint256[`++STORAGE_ENCODING_ERROR++`]]
  6467. :EMPTY_ARRAY_POP: pass:normal[xref:#Panic-EMPTY_ARRAY_POP-uint256[`++EMPTY_ARRAY_POP++`]]
  6468. :ARRAY_OUT_OF_BOUNDS: pass:normal[xref:#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`++ARRAY_OUT_OF_BOUNDS++`]]
  6469. :RESOURCE_ERROR: pass:normal[xref:#Panic-RESOURCE_ERROR-uint256[`++RESOURCE_ERROR++`]]
  6470. :INVALID_INTERNAL_FUNCTION: pass:normal[xref:#Panic-INVALID_INTERNAL_FUNCTION-uint256[`++INVALID_INTERNAL_FUNCTION++`]]
  6471. :panic: pass:normal[xref:#Panic-panic-uint256-[`++panic++`]]
  6472. [.contract]
  6473. [[Panic]]
  6474. === `++Panic++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Panic.sol[{github-icon},role=heading-link]
  6475. [.hljs-theme-light.nopadding]
  6476. ```solidity
  6477. import "@openzeppelin/contracts/utils/Panic.sol";
  6478. ```
  6479. Helper library for emitting standardized panic codes.
  6480. ```solidity
  6481. contract Example {
  6482. using Panic for uint256;
  6483. // Use any of the declared internal constants
  6484. function foo() { Panic.GENERIC.panic(); }
  6485. // Alternatively
  6486. function foo() { Panic.panic(Panic.GENERIC); }
  6487. }
  6488. ```
  6489. Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
  6490. _Available since v5.1._
  6491. [.contract-index]
  6492. .Functions
  6493. --
  6494. * {xref-Panic-panic-uint256-}[`++panic(code)++`]
  6495. --
  6496. [.contract-index]
  6497. .Internal Variables
  6498. --
  6499. * {xref-Panic-GENERIC-uint256}[`++uint256 constant GENERIC++`]
  6500. * {xref-Panic-ASSERT-uint256}[`++uint256 constant ASSERT++`]
  6501. * {xref-Panic-UNDER_OVERFLOW-uint256}[`++uint256 constant UNDER_OVERFLOW++`]
  6502. * {xref-Panic-DIVISION_BY_ZERO-uint256}[`++uint256 constant DIVISION_BY_ZERO++`]
  6503. * {xref-Panic-ENUM_CONVERSION_ERROR-uint256}[`++uint256 constant ENUM_CONVERSION_ERROR++`]
  6504. * {xref-Panic-STORAGE_ENCODING_ERROR-uint256}[`++uint256 constant STORAGE_ENCODING_ERROR++`]
  6505. * {xref-Panic-EMPTY_ARRAY_POP-uint256}[`++uint256 constant EMPTY_ARRAY_POP++`]
  6506. * {xref-Panic-ARRAY_OUT_OF_BOUNDS-uint256}[`++uint256 constant ARRAY_OUT_OF_BOUNDS++`]
  6507. * {xref-Panic-RESOURCE_ERROR-uint256}[`++uint256 constant RESOURCE_ERROR++`]
  6508. * {xref-Panic-INVALID_INTERNAL_FUNCTION-uint256}[`++uint256 constant INVALID_INTERNAL_FUNCTION++`]
  6509. --
  6510. [.contract-item]
  6511. [[Panic-panic-uint256-]]
  6512. ==== `[.contract-item-name]#++panic++#++(uint256 code)++` [.item-kind]#internal#
  6513. Reverts with a panic code. Recommended to use with
  6514. the internal constants with predefined codes.
  6515. [.contract-item]
  6516. [[Panic-GENERIC-uint256]]
  6517. ==== `uint256 [.contract-item-name]#++GENERIC++#` [.item-kind]#internal constant#
  6518. generic / unspecified error
  6519. [.contract-item]
  6520. [[Panic-ASSERT-uint256]]
  6521. ==== `uint256 [.contract-item-name]#++ASSERT++#` [.item-kind]#internal constant#
  6522. used by the assert() builtin
  6523. [.contract-item]
  6524. [[Panic-UNDER_OVERFLOW-uint256]]
  6525. ==== `uint256 [.contract-item-name]#++UNDER_OVERFLOW++#` [.item-kind]#internal constant#
  6526. arithmetic underflow or overflow
  6527. [.contract-item]
  6528. [[Panic-DIVISION_BY_ZERO-uint256]]
  6529. ==== `uint256 [.contract-item-name]#++DIVISION_BY_ZERO++#` [.item-kind]#internal constant#
  6530. division or modulo by zero
  6531. [.contract-item]
  6532. [[Panic-ENUM_CONVERSION_ERROR-uint256]]
  6533. ==== `uint256 [.contract-item-name]#++ENUM_CONVERSION_ERROR++#` [.item-kind]#internal constant#
  6534. enum conversion error
  6535. [.contract-item]
  6536. [[Panic-STORAGE_ENCODING_ERROR-uint256]]
  6537. ==== `uint256 [.contract-item-name]#++STORAGE_ENCODING_ERROR++#` [.item-kind]#internal constant#
  6538. invalid encoding in storage
  6539. [.contract-item]
  6540. [[Panic-EMPTY_ARRAY_POP-uint256]]
  6541. ==== `uint256 [.contract-item-name]#++EMPTY_ARRAY_POP++#` [.item-kind]#internal constant#
  6542. empty array pop
  6543. [.contract-item]
  6544. [[Panic-ARRAY_OUT_OF_BOUNDS-uint256]]
  6545. ==== `uint256 [.contract-item-name]#++ARRAY_OUT_OF_BOUNDS++#` [.item-kind]#internal constant#
  6546. array out of bounds access
  6547. [.contract-item]
  6548. [[Panic-RESOURCE_ERROR-uint256]]
  6549. ==== `uint256 [.contract-item-name]#++RESOURCE_ERROR++#` [.item-kind]#internal constant#
  6550. resource error (too large allocation or too large array)
  6551. [.contract-item]
  6552. [[Panic-INVALID_INTERNAL_FUNCTION-uint256]]
  6553. ==== `uint256 [.contract-item-name]#++INVALID_INTERNAL_FUNCTION++#` [.item-kind]#internal constant#
  6554. calling invalid internal function
  6555. :lt: pass:normal[xref:#Comparators-lt-uint256-uint256-[`++lt++`]]
  6556. :gt: pass:normal[xref:#Comparators-gt-uint256-uint256-[`++gt++`]]
  6557. [.contract]
  6558. [[Comparators]]
  6559. === `++Comparators++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.2.0/contracts/utils/Comparators.sol[{github-icon},role=heading-link]
  6560. [.hljs-theme-light.nopadding]
  6561. ```solidity
  6562. import "@openzeppelin/contracts/utils/Comparators.sol";
  6563. ```
  6564. Provides a set of functions to compare values.
  6565. _Available since v5.1._
  6566. [.contract-index]
  6567. .Functions
  6568. --
  6569. * {xref-Comparators-lt-uint256-uint256-}[`++lt(a, b)++`]
  6570. * {xref-Comparators-gt-uint256-uint256-}[`++gt(a, b)++`]
  6571. --
  6572. [.contract-item]
  6573. [[Comparators-lt-uint256-uint256-]]
  6574. ==== `[.contract-item-name]#++lt++#++(uint256 a, uint256 b) โ†’ bool++` [.item-kind]#internal#
  6575. [.contract-item]
  6576. [[Comparators-gt-uint256-uint256-]]
  6577. ==== `[.contract-item-name]#++gt++#++(uint256 a, uint256 b) โ†’ bool++` [.item-kind]#internal#