utils.adoc 400 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795
  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. :ERC165: pass:normal[xref:utils.adoc#ERC165[`ERC165`]]
  19. :ERC165Checker: pass:normal[xref:utils.adoc#ERC165Checker[`ERC165Checker`]]
  20. :BitMaps: pass:normal[xref:utils.adoc#BitMaps[`BitMaps`]]
  21. :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
  22. :EnumerableSet: pass:normal[xref:utils.adoc#EnumerableSet[`EnumerableSet`]]
  23. :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
  24. :DoubleEndedQueue: pass:normal[xref:utils.adoc#DoubleEndedQueue[`DoubleEndedQueue`]]
  25. :CircularBuffer: pass:normal[xref:utils.adoc#CircularBuffer[`CircularBuffer`]]
  26. :Checkpoints: pass:normal[xref:utils.adoc#Checkpoints[`Checkpoints`]]
  27. :Heap: pass:normal[xref:utils.adoc#Heap[`Heap`]]
  28. :MerkleTree: pass:normal[xref:utils.adoc#MerkleTree[`MerkleTree`]]
  29. :Create2: pass:normal[xref:utils.adoc#Create2[`Create2`]]
  30. :Address: pass:normal[xref:utils.adoc#Address[`Address`]]
  31. :Arrays: pass:normal[xref:utils.adoc#Arrays[`Arrays`]]
  32. :Base64: pass:normal[xref:utils.adoc#Base64[`Base64`]]
  33. :Strings: pass:normal[xref:utils.adoc#Strings[`Strings`]]
  34. :ShortString: pass:normal[xref:utils.adoc#ShortString[`ShortString`]]
  35. :SlotDerivation: pass:normal[xref:utils.adoc#SlotDerivation[`SlotDerivation`]]
  36. :StorageSlot: pass:normal[xref:utils.adoc#StorageSlot[`StorageSlot`]]
  37. :TransientSlot: pass:normal[xref:utils.adoc#TransientSlot[`TransientSlot`]]
  38. :Multicall: pass:normal[xref:utils.adoc#Multicall[`Multicall`]]
  39. :Context: pass:normal[xref:utils.adoc#Context[`Context`]]
  40. :Packing: pass:normal[xref:utils.adoc#Packing[`Packing`]]
  41. :Panic: pass:normal[xref:utils.adoc#Panic[`Panic`]]
  42. :Comparators: pass:normal[xref:utils.adoc#Comparators[`Comparators`]]
  43. :Heap: pass:normal[xref:utils.adoc#Heap[`Heap`]]
  44. :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
  45. :EnumerableSet: pass:normal[xref:utils.adoc#EnumerableSet[`EnumerableSet`]]
  46. :xref-Math-tryAdd-uint256-uint256-: xref:utils.adoc#Math-tryAdd-uint256-uint256-
  47. :xref-Math-trySub-uint256-uint256-: xref:utils.adoc#Math-trySub-uint256-uint256-
  48. :xref-Math-tryMul-uint256-uint256-: xref:utils.adoc#Math-tryMul-uint256-uint256-
  49. :xref-Math-tryDiv-uint256-uint256-: xref:utils.adoc#Math-tryDiv-uint256-uint256-
  50. :xref-Math-tryMod-uint256-uint256-: xref:utils.adoc#Math-tryMod-uint256-uint256-
  51. :xref-Math-ternary-bool-uint256-uint256-: xref:utils.adoc#Math-ternary-bool-uint256-uint256-
  52. :xref-Math-max-uint256-uint256-: xref:utils.adoc#Math-max-uint256-uint256-
  53. :xref-Math-min-uint256-uint256-: xref:utils.adoc#Math-min-uint256-uint256-
  54. :xref-Math-average-uint256-uint256-: xref:utils.adoc#Math-average-uint256-uint256-
  55. :xref-Math-ceilDiv-uint256-uint256-: xref:utils.adoc#Math-ceilDiv-uint256-uint256-
  56. :xref-Math-mulDiv-uint256-uint256-uint256-: xref:utils.adoc#Math-mulDiv-uint256-uint256-uint256-
  57. :xref-Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-
  58. :xref-Math-invMod-uint256-uint256-: xref:utils.adoc#Math-invMod-uint256-uint256-
  59. :xref-Math-invModPrime-uint256-uint256-: xref:utils.adoc#Math-invModPrime-uint256-uint256-
  60. :xref-Math-modExp-uint256-uint256-uint256-: xref:utils.adoc#Math-modExp-uint256-uint256-uint256-
  61. :xref-Math-tryModExp-uint256-uint256-uint256-: xref:utils.adoc#Math-tryModExp-uint256-uint256-uint256-
  62. :xref-Math-modExp-bytes-bytes-bytes-: xref:utils.adoc#Math-modExp-bytes-bytes-bytes-
  63. :xref-Math-tryModExp-bytes-bytes-bytes-: xref:utils.adoc#Math-tryModExp-bytes-bytes-bytes-
  64. :xref-Math-sqrt-uint256-: xref:utils.adoc#Math-sqrt-uint256-
  65. :xref-Math-sqrt-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-sqrt-uint256-enum-Math-Rounding-
  66. :xref-Math-log2-uint256-: xref:utils.adoc#Math-log2-uint256-
  67. :xref-Math-log2-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log2-uint256-enum-Math-Rounding-
  68. :xref-Math-log10-uint256-: xref:utils.adoc#Math-log10-uint256-
  69. :xref-Math-log10-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log10-uint256-enum-Math-Rounding-
  70. :xref-Math-log256-uint256-: xref:utils.adoc#Math-log256-uint256-
  71. :xref-Math-log256-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log256-uint256-enum-Math-Rounding-
  72. :xref-Math-unsignedRoundsUp-enum-Math-Rounding-: xref:utils.adoc#Math-unsignedRoundsUp-enum-Math-Rounding-
  73. :xref-SignedMath-ternary-bool-int256-int256-: xref:utils.adoc#SignedMath-ternary-bool-int256-int256-
  74. :xref-SignedMath-max-int256-int256-: xref:utils.adoc#SignedMath-max-int256-int256-
  75. :xref-SignedMath-min-int256-int256-: xref:utils.adoc#SignedMath-min-int256-int256-
  76. :xref-SignedMath-average-int256-int256-: xref:utils.adoc#SignedMath-average-int256-int256-
  77. :xref-SignedMath-abs-int256-: xref:utils.adoc#SignedMath-abs-int256-
  78. :xref-SafeCast-toUint248-uint256-: xref:utils.adoc#SafeCast-toUint248-uint256-
  79. :xref-SafeCast-toUint240-uint256-: xref:utils.adoc#SafeCast-toUint240-uint256-
  80. :xref-SafeCast-toUint232-uint256-: xref:utils.adoc#SafeCast-toUint232-uint256-
  81. :xref-SafeCast-toUint224-uint256-: xref:utils.adoc#SafeCast-toUint224-uint256-
  82. :xref-SafeCast-toUint216-uint256-: xref:utils.adoc#SafeCast-toUint216-uint256-
  83. :xref-SafeCast-toUint208-uint256-: xref:utils.adoc#SafeCast-toUint208-uint256-
  84. :xref-SafeCast-toUint200-uint256-: xref:utils.adoc#SafeCast-toUint200-uint256-
  85. :xref-SafeCast-toUint192-uint256-: xref:utils.adoc#SafeCast-toUint192-uint256-
  86. :xref-SafeCast-toUint184-uint256-: xref:utils.adoc#SafeCast-toUint184-uint256-
  87. :xref-SafeCast-toUint176-uint256-: xref:utils.adoc#SafeCast-toUint176-uint256-
  88. :xref-SafeCast-toUint168-uint256-: xref:utils.adoc#SafeCast-toUint168-uint256-
  89. :xref-SafeCast-toUint160-uint256-: xref:utils.adoc#SafeCast-toUint160-uint256-
  90. :xref-SafeCast-toUint152-uint256-: xref:utils.adoc#SafeCast-toUint152-uint256-
  91. :xref-SafeCast-toUint144-uint256-: xref:utils.adoc#SafeCast-toUint144-uint256-
  92. :xref-SafeCast-toUint136-uint256-: xref:utils.adoc#SafeCast-toUint136-uint256-
  93. :xref-SafeCast-toUint128-uint256-: xref:utils.adoc#SafeCast-toUint128-uint256-
  94. :xref-SafeCast-toUint120-uint256-: xref:utils.adoc#SafeCast-toUint120-uint256-
  95. :xref-SafeCast-toUint112-uint256-: xref:utils.adoc#SafeCast-toUint112-uint256-
  96. :xref-SafeCast-toUint104-uint256-: xref:utils.adoc#SafeCast-toUint104-uint256-
  97. :xref-SafeCast-toUint96-uint256-: xref:utils.adoc#SafeCast-toUint96-uint256-
  98. :xref-SafeCast-toUint88-uint256-: xref:utils.adoc#SafeCast-toUint88-uint256-
  99. :xref-SafeCast-toUint80-uint256-: xref:utils.adoc#SafeCast-toUint80-uint256-
  100. :xref-SafeCast-toUint72-uint256-: xref:utils.adoc#SafeCast-toUint72-uint256-
  101. :xref-SafeCast-toUint64-uint256-: xref:utils.adoc#SafeCast-toUint64-uint256-
  102. :xref-SafeCast-toUint56-uint256-: xref:utils.adoc#SafeCast-toUint56-uint256-
  103. :xref-SafeCast-toUint48-uint256-: xref:utils.adoc#SafeCast-toUint48-uint256-
  104. :xref-SafeCast-toUint40-uint256-: xref:utils.adoc#SafeCast-toUint40-uint256-
  105. :xref-SafeCast-toUint32-uint256-: xref:utils.adoc#SafeCast-toUint32-uint256-
  106. :xref-SafeCast-toUint24-uint256-: xref:utils.adoc#SafeCast-toUint24-uint256-
  107. :xref-SafeCast-toUint16-uint256-: xref:utils.adoc#SafeCast-toUint16-uint256-
  108. :xref-SafeCast-toUint8-uint256-: xref:utils.adoc#SafeCast-toUint8-uint256-
  109. :xref-SafeCast-toUint256-int256-: xref:utils.adoc#SafeCast-toUint256-int256-
  110. :xref-SafeCast-toInt248-int256-: xref:utils.adoc#SafeCast-toInt248-int256-
  111. :xref-SafeCast-toInt240-int256-: xref:utils.adoc#SafeCast-toInt240-int256-
  112. :xref-SafeCast-toInt232-int256-: xref:utils.adoc#SafeCast-toInt232-int256-
  113. :xref-SafeCast-toInt224-int256-: xref:utils.adoc#SafeCast-toInt224-int256-
  114. :xref-SafeCast-toInt216-int256-: xref:utils.adoc#SafeCast-toInt216-int256-
  115. :xref-SafeCast-toInt208-int256-: xref:utils.adoc#SafeCast-toInt208-int256-
  116. :xref-SafeCast-toInt200-int256-: xref:utils.adoc#SafeCast-toInt200-int256-
  117. :xref-SafeCast-toInt192-int256-: xref:utils.adoc#SafeCast-toInt192-int256-
  118. :xref-SafeCast-toInt184-int256-: xref:utils.adoc#SafeCast-toInt184-int256-
  119. :xref-SafeCast-toInt176-int256-: xref:utils.adoc#SafeCast-toInt176-int256-
  120. :xref-SafeCast-toInt168-int256-: xref:utils.adoc#SafeCast-toInt168-int256-
  121. :xref-SafeCast-toInt160-int256-: xref:utils.adoc#SafeCast-toInt160-int256-
  122. :xref-SafeCast-toInt152-int256-: xref:utils.adoc#SafeCast-toInt152-int256-
  123. :xref-SafeCast-toInt144-int256-: xref:utils.adoc#SafeCast-toInt144-int256-
  124. :xref-SafeCast-toInt136-int256-: xref:utils.adoc#SafeCast-toInt136-int256-
  125. :xref-SafeCast-toInt128-int256-: xref:utils.adoc#SafeCast-toInt128-int256-
  126. :xref-SafeCast-toInt120-int256-: xref:utils.adoc#SafeCast-toInt120-int256-
  127. :xref-SafeCast-toInt112-int256-: xref:utils.adoc#SafeCast-toInt112-int256-
  128. :xref-SafeCast-toInt104-int256-: xref:utils.adoc#SafeCast-toInt104-int256-
  129. :xref-SafeCast-toInt96-int256-: xref:utils.adoc#SafeCast-toInt96-int256-
  130. :xref-SafeCast-toInt88-int256-: xref:utils.adoc#SafeCast-toInt88-int256-
  131. :xref-SafeCast-toInt80-int256-: xref:utils.adoc#SafeCast-toInt80-int256-
  132. :xref-SafeCast-toInt72-int256-: xref:utils.adoc#SafeCast-toInt72-int256-
  133. :xref-SafeCast-toInt64-int256-: xref:utils.adoc#SafeCast-toInt64-int256-
  134. :xref-SafeCast-toInt56-int256-: xref:utils.adoc#SafeCast-toInt56-int256-
  135. :xref-SafeCast-toInt48-int256-: xref:utils.adoc#SafeCast-toInt48-int256-
  136. :xref-SafeCast-toInt40-int256-: xref:utils.adoc#SafeCast-toInt40-int256-
  137. :xref-SafeCast-toInt32-int256-: xref:utils.adoc#SafeCast-toInt32-int256-
  138. :xref-SafeCast-toInt24-int256-: xref:utils.adoc#SafeCast-toInt24-int256-
  139. :xref-SafeCast-toInt16-int256-: xref:utils.adoc#SafeCast-toInt16-int256-
  140. :xref-SafeCast-toInt8-int256-: xref:utils.adoc#SafeCast-toInt8-int256-
  141. :xref-SafeCast-toInt256-uint256-: xref:utils.adoc#SafeCast-toInt256-uint256-
  142. :xref-SafeCast-toUint-bool-: xref:utils.adoc#SafeCast-toUint-bool-
  143. :xref-SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-: xref:utils.adoc#SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-
  144. :xref-SafeCast-SafeCastOverflowedIntToUint-int256-: xref:utils.adoc#SafeCast-SafeCastOverflowedIntToUint-int256-
  145. :xref-SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-: xref:utils.adoc#SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-
  146. :xref-SafeCast-SafeCastOverflowedUintToInt-uint256-: xref:utils.adoc#SafeCast-SafeCastOverflowedUintToInt-uint256-
  147. :xref-ECDSA-tryRecover-bytes32-bytes-: xref:utils.adoc#ECDSA-tryRecover-bytes32-bytes-
  148. :xref-ECDSA-recover-bytes32-bytes-: xref:utils.adoc#ECDSA-recover-bytes32-bytes-
  149. :xref-ECDSA-tryRecover-bytes32-bytes32-bytes32-: xref:utils.adoc#ECDSA-tryRecover-bytes32-bytes32-bytes32-
  150. :xref-ECDSA-recover-bytes32-bytes32-bytes32-: xref:utils.adoc#ECDSA-recover-bytes32-bytes32-bytes32-
  151. :xref-ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-
  152. :xref-ECDSA-recover-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-
  153. :xref-ECDSA-ECDSAInvalidSignature--: xref:utils.adoc#ECDSA-ECDSAInvalidSignature--
  154. :xref-ECDSA-ECDSAInvalidSignatureLength-uint256-: xref:utils.adoc#ECDSA-ECDSAInvalidSignatureLength-uint256-
  155. :xref-ECDSA-ECDSAInvalidSignatureS-bytes32-: xref:utils.adoc#ECDSA-ECDSAInvalidSignatureS-bytes32-
  156. :MessageHashUtils-toEthSignedMessageHash: pass:normal[xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes-[`MessageHashUtils.toEthSignedMessageHash`]]
  157. :MessageHashUtils-toEthSignedMessageHash: pass:normal[xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes-[`MessageHashUtils.toEthSignedMessageHash`]]
  158. :ECDSA-tryRecover: pass:normal[xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`ECDSA.tryRecover`]]
  159. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  160. :ECDSA-tryRecover: pass:normal[xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`ECDSA.tryRecover`]]
  161. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  162. :xref-P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-: xref:utils.adoc#P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-
  163. :xref-P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-: xref:utils.adoc#P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-
  164. :xref-P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-: xref:utils.adoc#P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-
  165. :xref-P256-recovery-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#P256-recovery-bytes32-uint8-bytes32-bytes32-
  166. :xref-P256-isValidPublicKey-bytes32-bytes32-: xref:utils.adoc#P256-isValidPublicKey-bytes32-bytes32-
  167. :xref-P256-GX-uint256: xref:utils.adoc#P256-GX-uint256
  168. :xref-P256-GY-uint256: xref:utils.adoc#P256-GY-uint256
  169. :xref-P256-P-uint256: xref:utils.adoc#P256-P-uint256
  170. :xref-P256-N-uint256: xref:utils.adoc#P256-N-uint256
  171. :xref-P256-A-uint256: xref:utils.adoc#P256-A-uint256
  172. :xref-P256-B-uint256: xref:utils.adoc#P256-B-uint256
  173. :xref-RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-: xref:utils.adoc#RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-
  174. :xref-RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-: xref:utils.adoc#RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-
  175. :xref-EIP712-constructor-string-string-: xref:utils.adoc#EIP712-constructor-string-string-
  176. :xref-EIP712-_domainSeparatorV4--: xref:utils.adoc#EIP712-_domainSeparatorV4--
  177. :xref-EIP712-_hashTypedDataV4-bytes32-: xref:utils.adoc#EIP712-_hashTypedDataV4-bytes32-
  178. :xref-EIP712-eip712Domain--: xref:utils.adoc#EIP712-eip712Domain--
  179. :xref-EIP712-_EIP712Name--: xref:utils.adoc#EIP712-_EIP712Name--
  180. :xref-EIP712-_EIP712Version--: xref:utils.adoc#EIP712-_EIP712Version--
  181. :xref-IERC5267-EIP712DomainChanged--: xref:interfaces.adoc#IERC5267-EIP712DomainChanged--
  182. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  183. :ECDSA: pass:normal[xref:utils.adoc#ECDSA[`ECDSA`]]
  184. :xref-MessageHashUtils-toEthSignedMessageHash-bytes32-: xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes32-
  185. :xref-MessageHashUtils-toEthSignedMessageHash-bytes-: xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes-
  186. :xref-MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-: xref:utils.adoc#MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-
  187. :xref-MessageHashUtils-toTypedDataHash-bytes32-bytes32-: xref:utils.adoc#MessageHashUtils-toTypedDataHash-bytes32-bytes32-
  188. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  189. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  190. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  191. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  192. :xref-SignatureChecker-isValidSignatureNow-address-bytes32-bytes-: xref:utils.adoc#SignatureChecker-isValidSignatureNow-address-bytes32-bytes-
  193. :xref-SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-: xref:utils.adoc#SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-
  194. :xref-Hashes-commutativeKeccak256-bytes32-bytes32-: xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-
  195. :xref-MerkleProof-verify-bytes32---bytes32-bytes32-: xref:utils.adoc#MerkleProof-verify-bytes32---bytes32-bytes32-
  196. :xref-MerkleProof-processProof-bytes32---bytes32-: xref:utils.adoc#MerkleProof-processProof-bytes32---bytes32-
  197. :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--
  198. :xref-MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--
  199. :xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-: xref:utils.adoc#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-
  200. :xref-MerkleProof-processProofCalldata-bytes32---bytes32-: xref:utils.adoc#MerkleProof-processProofCalldata-bytes32---bytes32-
  201. :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--
  202. :xref-MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--
  203. :xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---: xref:utils.adoc#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---
  204. :xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---: xref:utils.adoc#MerkleProof-processMultiProof-bytes32---bool---bytes32---
  205. :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--
  206. :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--
  207. :xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---: xref:utils.adoc#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---
  208. :xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---: xref:utils.adoc#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---
  209. :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--
  210. :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--
  211. :xref-MerkleProof-MerkleProofInvalidMultiproof--: xref:utils.adoc#MerkleProof-MerkleProofInvalidMultiproof--
  212. :ReentrancyGuardTransient: pass:normal[xref:utils.adoc#ReentrancyGuardTransient[`ReentrancyGuardTransient`]]
  213. :xref-ReentrancyGuard-nonReentrant--: xref:utils.adoc#ReentrancyGuard-nonReentrant--
  214. :xref-ReentrancyGuard-constructor--: xref:utils.adoc#ReentrancyGuard-constructor--
  215. :xref-ReentrancyGuard-_reentrancyGuardEntered--: xref:utils.adoc#ReentrancyGuard-_reentrancyGuardEntered--
  216. :xref-ReentrancyGuard-ReentrancyGuardReentrantCall--: xref:utils.adoc#ReentrancyGuard-ReentrancyGuardReentrantCall--
  217. :ReentrancyGuard: pass:normal[xref:utils.adoc#ReentrancyGuard[`ReentrancyGuard`]]
  218. :xref-ReentrancyGuardTransient-nonReentrant--: xref:utils.adoc#ReentrancyGuardTransient-nonReentrant--
  219. :xref-ReentrancyGuardTransient-_reentrancyGuardEntered--: xref:utils.adoc#ReentrancyGuardTransient-_reentrancyGuardEntered--
  220. :xref-ReentrancyGuardTransient-ReentrancyGuardReentrantCall--: xref:utils.adoc#ReentrancyGuardTransient-ReentrancyGuardReentrantCall--
  221. :xref-Pausable-whenNotPaused--: xref:utils.adoc#Pausable-whenNotPaused--
  222. :xref-Pausable-whenPaused--: xref:utils.adoc#Pausable-whenPaused--
  223. :xref-Pausable-constructor--: xref:utils.adoc#Pausable-constructor--
  224. :xref-Pausable-paused--: xref:utils.adoc#Pausable-paused--
  225. :xref-Pausable-_requireNotPaused--: xref:utils.adoc#Pausable-_requireNotPaused--
  226. :xref-Pausable-_requirePaused--: xref:utils.adoc#Pausable-_requirePaused--
  227. :xref-Pausable-_pause--: xref:utils.adoc#Pausable-_pause--
  228. :xref-Pausable-_unpause--: xref:utils.adoc#Pausable-_unpause--
  229. :xref-Pausable-Paused-address-: xref:utils.adoc#Pausable-Paused-address-
  230. :xref-Pausable-Unpaused-address-: xref:utils.adoc#Pausable-Unpaused-address-
  231. :xref-Pausable-EnforcedPause--: xref:utils.adoc#Pausable-EnforcedPause--
  232. :xref-Pausable-ExpectedPause--: xref:utils.adoc#Pausable-ExpectedPause--
  233. :xref-Nonces-nonces-address-: xref:utils.adoc#Nonces-nonces-address-
  234. :xref-Nonces-_useNonce-address-: xref:utils.adoc#Nonces-_useNonce-address-
  235. :xref-Nonces-_useCheckedNonce-address-uint256-: xref:utils.adoc#Nonces-_useCheckedNonce-address-uint256-
  236. :xref-Nonces-InvalidAccountNonce-address-uint256-: xref:utils.adoc#Nonces-InvalidAccountNonce-address-uint256-
  237. :ERC165Checker: pass:normal[xref:utils.adoc#ERC165Checker[`ERC165Checker`]]
  238. :ERC165: pass:normal[xref:utils.adoc#ERC165[`ERC165`]]
  239. :xref-IERC165-supportsInterface-bytes4-: xref:utils.adoc#IERC165-supportsInterface-bytes4-
  240. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  241. :xref-ERC165-supportsInterface-bytes4-: xref:utils.adoc#ERC165-supportsInterface-bytes4-
  242. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  243. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  244. :xref-ERC165Checker-supportsERC165-address-: xref:utils.adoc#ERC165Checker-supportsERC165-address-
  245. :xref-ERC165Checker-supportsInterface-address-bytes4-: xref:utils.adoc#ERC165Checker-supportsInterface-address-bytes4-
  246. :xref-ERC165Checker-getSupportedInterfaces-address-bytes4---: xref:utils.adoc#ERC165Checker-getSupportedInterfaces-address-bytes4---
  247. :xref-ERC165Checker-supportsAllInterfaces-address-bytes4---: xref:utils.adoc#ERC165Checker-supportsAllInterfaces-address-bytes4---
  248. :xref-ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-: xref:utils.adoc#ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-
  249. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  250. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  251. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  252. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  253. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  254. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  255. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  256. :xref-BitMaps-get-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-get-struct-BitMaps-BitMap-uint256-
  257. :xref-BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-: xref:utils.adoc#BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-
  258. :xref-BitMaps-set-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-set-struct-BitMaps-BitMap-uint256-
  259. :xref-BitMaps-unset-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-unset-struct-BitMaps-BitMap-uint256-
  260. :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-
  261. :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  262. :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  263. :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-
  264. :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-
  265. :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  266. :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  267. :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-
  268. :xref-EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-
  269. :xref-EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-
  270. :xref-EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-
  271. :xref-EnumerableMap-length-struct-EnumerableMap-UintToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToUintMap-
  272. :xref-EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-
  273. :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-
  274. :xref-EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-
  275. :xref-EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-
  276. :xref-EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-
  277. :xref-EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-
  278. :xref-EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-
  279. :xref-EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-
  280. :xref-EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-
  281. :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-
  282. :xref-EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-
  283. :xref-EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-
  284. :xref-EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-
  285. :xref-EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-
  286. :xref-EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-
  287. :xref-EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-
  288. :xref-EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-
  289. :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-
  290. :xref-EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-
  291. :xref-EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-
  292. :xref-EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-
  293. :xref-EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-
  294. :xref-EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-
  295. :xref-EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-
  296. :xref-EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-
  297. :xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-
  298. :xref-EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-
  299. :xref-EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-
  300. :xref-EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-
  301. :xref-EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-
  302. :xref-EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-
  303. :xref-EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-
  304. :xref-EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-
  305. :xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-
  306. :xref-EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-
  307. :xref-EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-
  308. :xref-EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-
  309. :xref-EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-
  310. :xref-EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-
  311. :xref-EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-
  312. :xref-EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-
  313. :xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-
  314. :xref-EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-
  315. :xref-EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-
  316. :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-
  317. :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  318. :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  319. :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-
  320. :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-
  321. :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  322. :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  323. :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-
  324. :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-
  325. :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
  326. :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
  327. :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-
  328. :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-
  329. :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
  330. :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
  331. :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-
  332. :xref-EnumerableMap-EnumerableMapNonexistentKey-bytes32-: xref:utils.adoc#EnumerableMap-EnumerableMapNonexistentKey-bytes32-
  333. :xref-EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-
  334. :xref-EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-
  335. :xref-EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-
  336. :xref-EnumerableSet-length-struct-EnumerableSet-Bytes32Set-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-Bytes32Set-
  337. :xref-EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-
  338. :xref-EnumerableSet-values-struct-EnumerableSet-Bytes32Set-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-Bytes32Set-
  339. :xref-EnumerableSet-add-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-AddressSet-address-
  340. :xref-EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-
  341. :xref-EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-
  342. :xref-EnumerableSet-length-struct-EnumerableSet-AddressSet-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-AddressSet-
  343. :xref-EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-
  344. :xref-EnumerableSet-values-struct-EnumerableSet-AddressSet-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-AddressSet-
  345. :xref-EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-
  346. :xref-EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-
  347. :xref-EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-
  348. :xref-EnumerableSet-length-struct-EnumerableSet-UintSet-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-UintSet-
  349. :xref-EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-
  350. :xref-EnumerableSet-values-struct-EnumerableSet-UintSet-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-UintSet-
  351. :xref-DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-: xref:utils.adoc#DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-
  352. :xref-DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-
  353. :xref-DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-: xref:utils.adoc#DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-
  354. :xref-DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-
  355. :xref-DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-
  356. :xref-DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-
  357. :xref-DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-: xref:utils.adoc#DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-
  358. :xref-DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-
  359. :xref-DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-
  360. :xref-DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-
  361. :Panic-RESOURCE_ERROR: pass:normal[xref:utils.adoc#Panic-RESOURCE_ERROR-uint256[`Panic.RESOURCE_ERROR`]]
  362. :Panic-EMPTY_ARRAY_POP: pass:normal[xref:utils.adoc#Panic-EMPTY_ARRAY_POP-uint256[`Panic.EMPTY_ARRAY_POP`]]
  363. :Panic-RESOURCE_ERROR: pass:normal[xref:utils.adoc#Panic-RESOURCE_ERROR-uint256[`Panic.RESOURCE_ERROR`]]
  364. :Panic-EMPTY_ARRAY_POP: pass:normal[xref:utils.adoc#Panic-EMPTY_ARRAY_POP-uint256[`Panic.EMPTY_ARRAY_POP`]]
  365. :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
  366. :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
  367. :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
  368. :xref-CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-: xref:utils.adoc#CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-
  369. :xref-CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-: xref:utils.adoc#CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-
  370. :xref-CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-: xref:utils.adoc#CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-
  371. :xref-CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-: xref:utils.adoc#CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-
  372. :xref-CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-: xref:utils.adoc#CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-
  373. :xref-CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-: xref:utils.adoc#CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-
  374. :xref-CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-: xref:utils.adoc#CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-
  375. :xref-CircularBuffer-InvalidBufferSize--: xref:utils.adoc#CircularBuffer-InvalidBufferSize--
  376. :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
  377. :Votes: pass:normal[xref:governance.adoc#Votes[`Votes`]]
  378. :xref-Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-
  379. :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-
  380. :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-
  381. :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-
  382. :xref-Checkpoints-latest-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace224-
  383. :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-
  384. :xref-Checkpoints-length-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace224-
  385. :xref-Checkpoints-at-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-at-struct-Checkpoints-Trace224-uint32-
  386. :xref-Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-
  387. :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-
  388. :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-
  389. :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-
  390. :xref-Checkpoints-latest-struct-Checkpoints-Trace208-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace208-
  391. :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-
  392. :xref-Checkpoints-length-struct-Checkpoints-Trace208-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace208-
  393. :xref-Checkpoints-at-struct-Checkpoints-Trace208-uint32-: xref:utils.adoc#Checkpoints-at-struct-Checkpoints-Trace208-uint32-
  394. :xref-Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-
  395. :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-
  396. :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-
  397. :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-
  398. :xref-Checkpoints-latest-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace160-
  399. :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-
  400. :xref-Checkpoints-length-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace160-
  401. :xref-Checkpoints-at-struct-Checkpoints-Trace160-uint32-: xref:utils.adoc#Checkpoints-at-struct-Checkpoints-Trace160-uint32-
  402. :xref-Checkpoints-CheckpointUnorderedInsertion--: xref:utils.adoc#Checkpoints-CheckpointUnorderedInsertion--
  403. :xref-Heap-peek-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-peek-struct-Heap-Uint256Heap-
  404. :xref-Heap-pop-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-pop-struct-Heap-Uint256Heap-
  405. :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--
  406. :xref-Heap-insert-struct-Heap-Uint256Heap-uint256-: xref:utils.adoc#Heap-insert-struct-Heap-Uint256Heap-uint256-
  407. :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--
  408. :xref-Heap-replace-struct-Heap-Uint256Heap-uint256-: xref:utils.adoc#Heap-replace-struct-Heap-Uint256Heap-uint256-
  409. :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--
  410. :xref-Heap-length-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-length-struct-Heap-Uint256Heap-
  411. :xref-Heap-clear-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-clear-struct-Heap-Uint256Heap-
  412. :MerkleProof: pass:normal[xref:utils.adoc#MerkleProof[`MerkleProof`]]
  413. :Hashes-commutativeKeccak256: pass:normal[xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-[`Hashes.commutativeKeccak256`]]
  414. :MerkleProof: pass:normal[xref:utils.adoc#MerkleProof[`MerkleProof`]]
  415. :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-
  416. :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--
  417. :xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-: xref:utils.adoc#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-
  418. :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--
  419. :xref-MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-: xref:utils.adoc#MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-
  420. :Hashes-commutativeKeccak256: pass:normal[xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-[`Hashes.commutativeKeccak256`]]
  421. :xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-: xref:utils.adoc#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-
  422. :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-
  423. :Hashes-commutativeKeccak256: pass:normal[xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-[`Hashes.commutativeKeccak256`]]
  424. :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-
  425. :xref-Create2-deploy-uint256-bytes32-bytes-: xref:utils.adoc#Create2-deploy-uint256-bytes32-bytes-
  426. :xref-Create2-computeAddress-bytes32-bytes32-: xref:utils.adoc#Create2-computeAddress-bytes32-bytes32-
  427. :xref-Create2-computeAddress-bytes32-bytes32-address-: xref:utils.adoc#Create2-computeAddress-bytes32-bytes32-address-
  428. :xref-Create2-Create2EmptyBytecode--: xref:utils.adoc#Create2-Create2EmptyBytecode--
  429. :xref-Address-sendValue-address-payable-uint256-: xref:utils.adoc#Address-sendValue-address-payable-uint256-
  430. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  431. :xref-Address-functionCallWithValue-address-bytes-uint256-: xref:utils.adoc#Address-functionCallWithValue-address-bytes-uint256-
  432. :xref-Address-functionStaticCall-address-bytes-: xref:utils.adoc#Address-functionStaticCall-address-bytes-
  433. :xref-Address-functionDelegateCall-address-bytes-: xref:utils.adoc#Address-functionDelegateCall-address-bytes-
  434. :xref-Address-verifyCallResultFromTarget-address-bool-bytes-: xref:utils.adoc#Address-verifyCallResultFromTarget-address-bool-bytes-
  435. :xref-Address-verifyCallResult-bool-bytes-: xref:utils.adoc#Address-verifyCallResult-bool-bytes-
  436. :xref-Address-AddressEmptyCode-address-: xref:utils.adoc#Address-AddressEmptyCode-address-
  437. :ReentrancyGuard: pass:normal[xref:utils.adoc#ReentrancyGuard[`ReentrancyGuard`]]
  438. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  439. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  440. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  441. :xref-Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--: xref:utils.adoc#Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--
  442. :xref-Arrays-sort-uint256---: xref:utils.adoc#Arrays-sort-uint256---
  443. :xref-Arrays-sort-address---function--address-address--pure-returns--bool--: xref:utils.adoc#Arrays-sort-address---function--address-address--pure-returns--bool--
  444. :xref-Arrays-sort-address---: xref:utils.adoc#Arrays-sort-address---
  445. :xref-Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--: xref:utils.adoc#Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--
  446. :xref-Arrays-sort-bytes32---: xref:utils.adoc#Arrays-sort-bytes32---
  447. :xref-Arrays-findUpperBound-uint256---uint256-: xref:utils.adoc#Arrays-findUpperBound-uint256---uint256-
  448. :xref-Arrays-lowerBound-uint256---uint256-: xref:utils.adoc#Arrays-lowerBound-uint256---uint256-
  449. :xref-Arrays-upperBound-uint256---uint256-: xref:utils.adoc#Arrays-upperBound-uint256---uint256-
  450. :xref-Arrays-lowerBoundMemory-uint256---uint256-: xref:utils.adoc#Arrays-lowerBoundMemory-uint256---uint256-
  451. :xref-Arrays-upperBoundMemory-uint256---uint256-: xref:utils.adoc#Arrays-upperBoundMemory-uint256---uint256-
  452. :xref-Arrays-unsafeAccess-address---uint256-: xref:utils.adoc#Arrays-unsafeAccess-address---uint256-
  453. :xref-Arrays-unsafeAccess-bytes32---uint256-: xref:utils.adoc#Arrays-unsafeAccess-bytes32---uint256-
  454. :xref-Arrays-unsafeAccess-uint256---uint256-: xref:utils.adoc#Arrays-unsafeAccess-uint256---uint256-
  455. :xref-Arrays-unsafeMemoryAccess-address---uint256-: xref:utils.adoc#Arrays-unsafeMemoryAccess-address---uint256-
  456. :xref-Arrays-unsafeMemoryAccess-bytes32---uint256-: xref:utils.adoc#Arrays-unsafeMemoryAccess-bytes32---uint256-
  457. :xref-Arrays-unsafeMemoryAccess-uint256---uint256-: xref:utils.adoc#Arrays-unsafeMemoryAccess-uint256---uint256-
  458. :xref-Arrays-unsafeSetLength-address---uint256-: xref:utils.adoc#Arrays-unsafeSetLength-address---uint256-
  459. :xref-Arrays-unsafeSetLength-bytes32---uint256-: xref:utils.adoc#Arrays-unsafeSetLength-bytes32---uint256-
  460. :xref-Arrays-unsafeSetLength-uint256---uint256-: xref:utils.adoc#Arrays-unsafeSetLength-uint256---uint256-
  461. :xref-Base64-encode-bytes-: xref:utils.adoc#Base64-encode-bytes-
  462. :xref-Base64-encodeURL-bytes-: xref:utils.adoc#Base64-encodeURL-bytes-
  463. :xref-Base64-_TABLE-string: xref:utils.adoc#Base64-_TABLE-string
  464. :xref-Base64-_TABLE_URL-string: xref:utils.adoc#Base64-_TABLE_URL-string
  465. :xref-Strings-toString-uint256-: xref:utils.adoc#Strings-toString-uint256-
  466. :xref-Strings-toStringSigned-int256-: xref:utils.adoc#Strings-toStringSigned-int256-
  467. :xref-Strings-toHexString-uint256-: xref:utils.adoc#Strings-toHexString-uint256-
  468. :xref-Strings-toHexString-uint256-uint256-: xref:utils.adoc#Strings-toHexString-uint256-uint256-
  469. :xref-Strings-toHexString-address-: xref:utils.adoc#Strings-toHexString-address-
  470. :xref-Strings-toChecksumHexString-address-: xref:utils.adoc#Strings-toChecksumHexString-address-
  471. :xref-Strings-equal-string-string-: xref:utils.adoc#Strings-equal-string-string-
  472. :xref-Strings-StringsInsufficientHexLength-uint256-uint256-: xref:utils.adoc#Strings-StringsInsufficientHexLength-uint256-uint256-
  473. :xref-ShortStrings-toShortString-string-: xref:utils.adoc#ShortStrings-toShortString-string-
  474. :xref-ShortStrings-toString-ShortString-: xref:utils.adoc#ShortStrings-toString-ShortString-
  475. :xref-ShortStrings-byteLength-ShortString-: xref:utils.adoc#ShortStrings-byteLength-ShortString-
  476. :xref-ShortStrings-toShortStringWithFallback-string-string-: xref:utils.adoc#ShortStrings-toShortStringWithFallback-string-string-
  477. :xref-ShortStrings-toStringWithFallback-ShortString-string-: xref:utils.adoc#ShortStrings-toStringWithFallback-ShortString-string-
  478. :xref-ShortStrings-byteLengthWithFallback-ShortString-string-: xref:utils.adoc#ShortStrings-byteLengthWithFallback-ShortString-string-
  479. :xref-ShortStrings-StringTooLong-string-: xref:utils.adoc#ShortStrings-StringTooLong-string-
  480. :xref-ShortStrings-InvalidShortString--: xref:utils.adoc#ShortStrings-InvalidShortString--
  481. :StorageSlot: pass:normal[xref:utils.adoc#StorageSlot[`StorageSlot`]]
  482. :xref-SlotDerivation-erc7201Slot-string-: xref:utils.adoc#SlotDerivation-erc7201Slot-string-
  483. :xref-SlotDerivation-offset-bytes32-uint256-: xref:utils.adoc#SlotDerivation-offset-bytes32-uint256-
  484. :xref-SlotDerivation-deriveArray-bytes32-: xref:utils.adoc#SlotDerivation-deriveArray-bytes32-
  485. :xref-SlotDerivation-deriveMapping-bytes32-address-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-address-
  486. :xref-SlotDerivation-deriveMapping-bytes32-bool-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-bool-
  487. :xref-SlotDerivation-deriveMapping-bytes32-bytes32-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-bytes32-
  488. :xref-SlotDerivation-deriveMapping-bytes32-uint256-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-uint256-
  489. :xref-SlotDerivation-deriveMapping-bytes32-int256-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-int256-
  490. :xref-SlotDerivation-deriveMapping-bytes32-string-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-string-
  491. :xref-SlotDerivation-deriveMapping-bytes32-bytes-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-bytes-
  492. :SlotDerivation: pass:normal[xref:utils.adoc#SlotDerivation[`SlotDerivation`]]
  493. :xref-StorageSlot-getAddressSlot-bytes32-: xref:utils.adoc#StorageSlot-getAddressSlot-bytes32-
  494. :xref-StorageSlot-getBooleanSlot-bytes32-: xref:utils.adoc#StorageSlot-getBooleanSlot-bytes32-
  495. :xref-StorageSlot-getBytes32Slot-bytes32-: xref:utils.adoc#StorageSlot-getBytes32Slot-bytes32-
  496. :xref-StorageSlot-getUint256Slot-bytes32-: xref:utils.adoc#StorageSlot-getUint256Slot-bytes32-
  497. :xref-StorageSlot-getInt256Slot-bytes32-: xref:utils.adoc#StorageSlot-getInt256Slot-bytes32-
  498. :xref-StorageSlot-getStringSlot-bytes32-: xref:utils.adoc#StorageSlot-getStringSlot-bytes32-
  499. :xref-StorageSlot-getStringSlot-string-: xref:utils.adoc#StorageSlot-getStringSlot-string-
  500. :xref-StorageSlot-getBytesSlot-bytes32-: xref:utils.adoc#StorageSlot-getBytesSlot-bytes32-
  501. :xref-StorageSlot-getBytesSlot-bytes-: xref:utils.adoc#StorageSlot-getBytesSlot-bytes-
  502. :SlotDerivation: pass:normal[xref:utils.adoc#SlotDerivation[`SlotDerivation`]]
  503. :xref-TransientSlot-asAddress-bytes32-: xref:utils.adoc#TransientSlot-asAddress-bytes32-
  504. :xref-TransientSlot-asBoolean-bytes32-: xref:utils.adoc#TransientSlot-asBoolean-bytes32-
  505. :xref-TransientSlot-asBytes32-bytes32-: xref:utils.adoc#TransientSlot-asBytes32-bytes32-
  506. :xref-TransientSlot-asUint256-bytes32-: xref:utils.adoc#TransientSlot-asUint256-bytes32-
  507. :xref-TransientSlot-asInt256-bytes32-: xref:utils.adoc#TransientSlot-asInt256-bytes32-
  508. :xref-TransientSlot-tload-TransientSlot-AddressSlot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-AddressSlot-
  509. :xref-TransientSlot-tstore-TransientSlot-AddressSlot-address-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-AddressSlot-address-
  510. :xref-TransientSlot-tload-TransientSlot-BooleanSlot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-BooleanSlot-
  511. :xref-TransientSlot-tstore-TransientSlot-BooleanSlot-bool-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-BooleanSlot-bool-
  512. :xref-TransientSlot-tload-TransientSlot-Bytes32Slot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-Bytes32Slot-
  513. :xref-TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-
  514. :xref-TransientSlot-tload-TransientSlot-Uint256Slot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-Uint256Slot-
  515. :xref-TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-
  516. :xref-TransientSlot-tload-TransientSlot-Int256Slot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-Int256Slot-
  517. :xref-TransientSlot-tstore-TransientSlot-Int256Slot-int256-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-Int256Slot-int256-
  518. :ERC2771Context: pass:normal[xref:metatx.adoc#ERC2771Context[`ERC2771Context`]]
  519. :xref-Multicall-multicall-bytes---: xref:utils.adoc#Multicall-multicall-bytes---
  520. :xref-Context-_msgSender--: xref:utils.adoc#Context-_msgSender--
  521. :xref-Context-_msgData--: xref:utils.adoc#Context-_msgData--
  522. :xref-Context-_contextSuffixLength--: xref:utils.adoc#Context-_contextSuffixLength--
  523. :xref-Packing-pack_1_1-bytes1-bytes1-: xref:utils.adoc#Packing-pack_1_1-bytes1-bytes1-
  524. :xref-Packing-pack_2_2-bytes2-bytes2-: xref:utils.adoc#Packing-pack_2_2-bytes2-bytes2-
  525. :xref-Packing-pack_2_4-bytes2-bytes4-: xref:utils.adoc#Packing-pack_2_4-bytes2-bytes4-
  526. :xref-Packing-pack_2_6-bytes2-bytes6-: xref:utils.adoc#Packing-pack_2_6-bytes2-bytes6-
  527. :xref-Packing-pack_4_2-bytes4-bytes2-: xref:utils.adoc#Packing-pack_4_2-bytes4-bytes2-
  528. :xref-Packing-pack_4_4-bytes4-bytes4-: xref:utils.adoc#Packing-pack_4_4-bytes4-bytes4-
  529. :xref-Packing-pack_4_8-bytes4-bytes8-: xref:utils.adoc#Packing-pack_4_8-bytes4-bytes8-
  530. :xref-Packing-pack_4_12-bytes4-bytes12-: xref:utils.adoc#Packing-pack_4_12-bytes4-bytes12-
  531. :xref-Packing-pack_4_16-bytes4-bytes16-: xref:utils.adoc#Packing-pack_4_16-bytes4-bytes16-
  532. :xref-Packing-pack_4_20-bytes4-bytes20-: xref:utils.adoc#Packing-pack_4_20-bytes4-bytes20-
  533. :xref-Packing-pack_4_24-bytes4-bytes24-: xref:utils.adoc#Packing-pack_4_24-bytes4-bytes24-
  534. :xref-Packing-pack_4_28-bytes4-bytes28-: xref:utils.adoc#Packing-pack_4_28-bytes4-bytes28-
  535. :xref-Packing-pack_6_2-bytes6-bytes2-: xref:utils.adoc#Packing-pack_6_2-bytes6-bytes2-
  536. :xref-Packing-pack_6_6-bytes6-bytes6-: xref:utils.adoc#Packing-pack_6_6-bytes6-bytes6-
  537. :xref-Packing-pack_8_4-bytes8-bytes4-: xref:utils.adoc#Packing-pack_8_4-bytes8-bytes4-
  538. :xref-Packing-pack_8_8-bytes8-bytes8-: xref:utils.adoc#Packing-pack_8_8-bytes8-bytes8-
  539. :xref-Packing-pack_8_12-bytes8-bytes12-: xref:utils.adoc#Packing-pack_8_12-bytes8-bytes12-
  540. :xref-Packing-pack_8_16-bytes8-bytes16-: xref:utils.adoc#Packing-pack_8_16-bytes8-bytes16-
  541. :xref-Packing-pack_8_20-bytes8-bytes20-: xref:utils.adoc#Packing-pack_8_20-bytes8-bytes20-
  542. :xref-Packing-pack_8_24-bytes8-bytes24-: xref:utils.adoc#Packing-pack_8_24-bytes8-bytes24-
  543. :xref-Packing-pack_12_4-bytes12-bytes4-: xref:utils.adoc#Packing-pack_12_4-bytes12-bytes4-
  544. :xref-Packing-pack_12_8-bytes12-bytes8-: xref:utils.adoc#Packing-pack_12_8-bytes12-bytes8-
  545. :xref-Packing-pack_12_12-bytes12-bytes12-: xref:utils.adoc#Packing-pack_12_12-bytes12-bytes12-
  546. :xref-Packing-pack_12_16-bytes12-bytes16-: xref:utils.adoc#Packing-pack_12_16-bytes12-bytes16-
  547. :xref-Packing-pack_12_20-bytes12-bytes20-: xref:utils.adoc#Packing-pack_12_20-bytes12-bytes20-
  548. :xref-Packing-pack_16_4-bytes16-bytes4-: xref:utils.adoc#Packing-pack_16_4-bytes16-bytes4-
  549. :xref-Packing-pack_16_8-bytes16-bytes8-: xref:utils.adoc#Packing-pack_16_8-bytes16-bytes8-
  550. :xref-Packing-pack_16_12-bytes16-bytes12-: xref:utils.adoc#Packing-pack_16_12-bytes16-bytes12-
  551. :xref-Packing-pack_16_16-bytes16-bytes16-: xref:utils.adoc#Packing-pack_16_16-bytes16-bytes16-
  552. :xref-Packing-pack_20_4-bytes20-bytes4-: xref:utils.adoc#Packing-pack_20_4-bytes20-bytes4-
  553. :xref-Packing-pack_20_8-bytes20-bytes8-: xref:utils.adoc#Packing-pack_20_8-bytes20-bytes8-
  554. :xref-Packing-pack_20_12-bytes20-bytes12-: xref:utils.adoc#Packing-pack_20_12-bytes20-bytes12-
  555. :xref-Packing-pack_24_4-bytes24-bytes4-: xref:utils.adoc#Packing-pack_24_4-bytes24-bytes4-
  556. :xref-Packing-pack_24_8-bytes24-bytes8-: xref:utils.adoc#Packing-pack_24_8-bytes24-bytes8-
  557. :xref-Packing-pack_28_4-bytes28-bytes4-: xref:utils.adoc#Packing-pack_28_4-bytes28-bytes4-
  558. :xref-Packing-extract_2_1-bytes2-uint8-: xref:utils.adoc#Packing-extract_2_1-bytes2-uint8-
  559. :xref-Packing-replace_2_1-bytes2-bytes1-uint8-: xref:utils.adoc#Packing-replace_2_1-bytes2-bytes1-uint8-
  560. :xref-Packing-extract_4_1-bytes4-uint8-: xref:utils.adoc#Packing-extract_4_1-bytes4-uint8-
  561. :xref-Packing-replace_4_1-bytes4-bytes1-uint8-: xref:utils.adoc#Packing-replace_4_1-bytes4-bytes1-uint8-
  562. :xref-Packing-extract_4_2-bytes4-uint8-: xref:utils.adoc#Packing-extract_4_2-bytes4-uint8-
  563. :xref-Packing-replace_4_2-bytes4-bytes2-uint8-: xref:utils.adoc#Packing-replace_4_2-bytes4-bytes2-uint8-
  564. :xref-Packing-extract_6_1-bytes6-uint8-: xref:utils.adoc#Packing-extract_6_1-bytes6-uint8-
  565. :xref-Packing-replace_6_1-bytes6-bytes1-uint8-: xref:utils.adoc#Packing-replace_6_1-bytes6-bytes1-uint8-
  566. :xref-Packing-extract_6_2-bytes6-uint8-: xref:utils.adoc#Packing-extract_6_2-bytes6-uint8-
  567. :xref-Packing-replace_6_2-bytes6-bytes2-uint8-: xref:utils.adoc#Packing-replace_6_2-bytes6-bytes2-uint8-
  568. :xref-Packing-extract_6_4-bytes6-uint8-: xref:utils.adoc#Packing-extract_6_4-bytes6-uint8-
  569. :xref-Packing-replace_6_4-bytes6-bytes4-uint8-: xref:utils.adoc#Packing-replace_6_4-bytes6-bytes4-uint8-
  570. :xref-Packing-extract_8_1-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_1-bytes8-uint8-
  571. :xref-Packing-replace_8_1-bytes8-bytes1-uint8-: xref:utils.adoc#Packing-replace_8_1-bytes8-bytes1-uint8-
  572. :xref-Packing-extract_8_2-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_2-bytes8-uint8-
  573. :xref-Packing-replace_8_2-bytes8-bytes2-uint8-: xref:utils.adoc#Packing-replace_8_2-bytes8-bytes2-uint8-
  574. :xref-Packing-extract_8_4-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_4-bytes8-uint8-
  575. :xref-Packing-replace_8_4-bytes8-bytes4-uint8-: xref:utils.adoc#Packing-replace_8_4-bytes8-bytes4-uint8-
  576. :xref-Packing-extract_8_6-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_6-bytes8-uint8-
  577. :xref-Packing-replace_8_6-bytes8-bytes6-uint8-: xref:utils.adoc#Packing-replace_8_6-bytes8-bytes6-uint8-
  578. :xref-Packing-extract_12_1-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_1-bytes12-uint8-
  579. :xref-Packing-replace_12_1-bytes12-bytes1-uint8-: xref:utils.adoc#Packing-replace_12_1-bytes12-bytes1-uint8-
  580. :xref-Packing-extract_12_2-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_2-bytes12-uint8-
  581. :xref-Packing-replace_12_2-bytes12-bytes2-uint8-: xref:utils.adoc#Packing-replace_12_2-bytes12-bytes2-uint8-
  582. :xref-Packing-extract_12_4-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_4-bytes12-uint8-
  583. :xref-Packing-replace_12_4-bytes12-bytes4-uint8-: xref:utils.adoc#Packing-replace_12_4-bytes12-bytes4-uint8-
  584. :xref-Packing-extract_12_6-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_6-bytes12-uint8-
  585. :xref-Packing-replace_12_6-bytes12-bytes6-uint8-: xref:utils.adoc#Packing-replace_12_6-bytes12-bytes6-uint8-
  586. :xref-Packing-extract_12_8-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_8-bytes12-uint8-
  587. :xref-Packing-replace_12_8-bytes12-bytes8-uint8-: xref:utils.adoc#Packing-replace_12_8-bytes12-bytes8-uint8-
  588. :xref-Packing-extract_16_1-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_1-bytes16-uint8-
  589. :xref-Packing-replace_16_1-bytes16-bytes1-uint8-: xref:utils.adoc#Packing-replace_16_1-bytes16-bytes1-uint8-
  590. :xref-Packing-extract_16_2-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_2-bytes16-uint8-
  591. :xref-Packing-replace_16_2-bytes16-bytes2-uint8-: xref:utils.adoc#Packing-replace_16_2-bytes16-bytes2-uint8-
  592. :xref-Packing-extract_16_4-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_4-bytes16-uint8-
  593. :xref-Packing-replace_16_4-bytes16-bytes4-uint8-: xref:utils.adoc#Packing-replace_16_4-bytes16-bytes4-uint8-
  594. :xref-Packing-extract_16_6-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_6-bytes16-uint8-
  595. :xref-Packing-replace_16_6-bytes16-bytes6-uint8-: xref:utils.adoc#Packing-replace_16_6-bytes16-bytes6-uint8-
  596. :xref-Packing-extract_16_8-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_8-bytes16-uint8-
  597. :xref-Packing-replace_16_8-bytes16-bytes8-uint8-: xref:utils.adoc#Packing-replace_16_8-bytes16-bytes8-uint8-
  598. :xref-Packing-extract_16_12-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_12-bytes16-uint8-
  599. :xref-Packing-replace_16_12-bytes16-bytes12-uint8-: xref:utils.adoc#Packing-replace_16_12-bytes16-bytes12-uint8-
  600. :xref-Packing-extract_20_1-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_1-bytes20-uint8-
  601. :xref-Packing-replace_20_1-bytes20-bytes1-uint8-: xref:utils.adoc#Packing-replace_20_1-bytes20-bytes1-uint8-
  602. :xref-Packing-extract_20_2-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_2-bytes20-uint8-
  603. :xref-Packing-replace_20_2-bytes20-bytes2-uint8-: xref:utils.adoc#Packing-replace_20_2-bytes20-bytes2-uint8-
  604. :xref-Packing-extract_20_4-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_4-bytes20-uint8-
  605. :xref-Packing-replace_20_4-bytes20-bytes4-uint8-: xref:utils.adoc#Packing-replace_20_4-bytes20-bytes4-uint8-
  606. :xref-Packing-extract_20_6-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_6-bytes20-uint8-
  607. :xref-Packing-replace_20_6-bytes20-bytes6-uint8-: xref:utils.adoc#Packing-replace_20_6-bytes20-bytes6-uint8-
  608. :xref-Packing-extract_20_8-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_8-bytes20-uint8-
  609. :xref-Packing-replace_20_8-bytes20-bytes8-uint8-: xref:utils.adoc#Packing-replace_20_8-bytes20-bytes8-uint8-
  610. :xref-Packing-extract_20_12-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_12-bytes20-uint8-
  611. :xref-Packing-replace_20_12-bytes20-bytes12-uint8-: xref:utils.adoc#Packing-replace_20_12-bytes20-bytes12-uint8-
  612. :xref-Packing-extract_20_16-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_16-bytes20-uint8-
  613. :xref-Packing-replace_20_16-bytes20-bytes16-uint8-: xref:utils.adoc#Packing-replace_20_16-bytes20-bytes16-uint8-
  614. :xref-Packing-extract_24_1-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_1-bytes24-uint8-
  615. :xref-Packing-replace_24_1-bytes24-bytes1-uint8-: xref:utils.adoc#Packing-replace_24_1-bytes24-bytes1-uint8-
  616. :xref-Packing-extract_24_2-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_2-bytes24-uint8-
  617. :xref-Packing-replace_24_2-bytes24-bytes2-uint8-: xref:utils.adoc#Packing-replace_24_2-bytes24-bytes2-uint8-
  618. :xref-Packing-extract_24_4-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_4-bytes24-uint8-
  619. :xref-Packing-replace_24_4-bytes24-bytes4-uint8-: xref:utils.adoc#Packing-replace_24_4-bytes24-bytes4-uint8-
  620. :xref-Packing-extract_24_6-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_6-bytes24-uint8-
  621. :xref-Packing-replace_24_6-bytes24-bytes6-uint8-: xref:utils.adoc#Packing-replace_24_6-bytes24-bytes6-uint8-
  622. :xref-Packing-extract_24_8-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_8-bytes24-uint8-
  623. :xref-Packing-replace_24_8-bytes24-bytes8-uint8-: xref:utils.adoc#Packing-replace_24_8-bytes24-bytes8-uint8-
  624. :xref-Packing-extract_24_12-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_12-bytes24-uint8-
  625. :xref-Packing-replace_24_12-bytes24-bytes12-uint8-: xref:utils.adoc#Packing-replace_24_12-bytes24-bytes12-uint8-
  626. :xref-Packing-extract_24_16-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_16-bytes24-uint8-
  627. :xref-Packing-replace_24_16-bytes24-bytes16-uint8-: xref:utils.adoc#Packing-replace_24_16-bytes24-bytes16-uint8-
  628. :xref-Packing-extract_24_20-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_20-bytes24-uint8-
  629. :xref-Packing-replace_24_20-bytes24-bytes20-uint8-: xref:utils.adoc#Packing-replace_24_20-bytes24-bytes20-uint8-
  630. :xref-Packing-extract_28_1-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_1-bytes28-uint8-
  631. :xref-Packing-replace_28_1-bytes28-bytes1-uint8-: xref:utils.adoc#Packing-replace_28_1-bytes28-bytes1-uint8-
  632. :xref-Packing-extract_28_2-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_2-bytes28-uint8-
  633. :xref-Packing-replace_28_2-bytes28-bytes2-uint8-: xref:utils.adoc#Packing-replace_28_2-bytes28-bytes2-uint8-
  634. :xref-Packing-extract_28_4-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_4-bytes28-uint8-
  635. :xref-Packing-replace_28_4-bytes28-bytes4-uint8-: xref:utils.adoc#Packing-replace_28_4-bytes28-bytes4-uint8-
  636. :xref-Packing-extract_28_6-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_6-bytes28-uint8-
  637. :xref-Packing-replace_28_6-bytes28-bytes6-uint8-: xref:utils.adoc#Packing-replace_28_6-bytes28-bytes6-uint8-
  638. :xref-Packing-extract_28_8-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_8-bytes28-uint8-
  639. :xref-Packing-replace_28_8-bytes28-bytes8-uint8-: xref:utils.adoc#Packing-replace_28_8-bytes28-bytes8-uint8-
  640. :xref-Packing-extract_28_12-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_12-bytes28-uint8-
  641. :xref-Packing-replace_28_12-bytes28-bytes12-uint8-: xref:utils.adoc#Packing-replace_28_12-bytes28-bytes12-uint8-
  642. :xref-Packing-extract_28_16-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_16-bytes28-uint8-
  643. :xref-Packing-replace_28_16-bytes28-bytes16-uint8-: xref:utils.adoc#Packing-replace_28_16-bytes28-bytes16-uint8-
  644. :xref-Packing-extract_28_20-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_20-bytes28-uint8-
  645. :xref-Packing-replace_28_20-bytes28-bytes20-uint8-: xref:utils.adoc#Packing-replace_28_20-bytes28-bytes20-uint8-
  646. :xref-Packing-extract_28_24-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_24-bytes28-uint8-
  647. :xref-Packing-replace_28_24-bytes28-bytes24-uint8-: xref:utils.adoc#Packing-replace_28_24-bytes28-bytes24-uint8-
  648. :xref-Packing-extract_32_1-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_1-bytes32-uint8-
  649. :xref-Packing-replace_32_1-bytes32-bytes1-uint8-: xref:utils.adoc#Packing-replace_32_1-bytes32-bytes1-uint8-
  650. :xref-Packing-extract_32_2-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_2-bytes32-uint8-
  651. :xref-Packing-replace_32_2-bytes32-bytes2-uint8-: xref:utils.adoc#Packing-replace_32_2-bytes32-bytes2-uint8-
  652. :xref-Packing-extract_32_4-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_4-bytes32-uint8-
  653. :xref-Packing-replace_32_4-bytes32-bytes4-uint8-: xref:utils.adoc#Packing-replace_32_4-bytes32-bytes4-uint8-
  654. :xref-Packing-extract_32_6-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_6-bytes32-uint8-
  655. :xref-Packing-replace_32_6-bytes32-bytes6-uint8-: xref:utils.adoc#Packing-replace_32_6-bytes32-bytes6-uint8-
  656. :xref-Packing-extract_32_8-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_8-bytes32-uint8-
  657. :xref-Packing-replace_32_8-bytes32-bytes8-uint8-: xref:utils.adoc#Packing-replace_32_8-bytes32-bytes8-uint8-
  658. :xref-Packing-extract_32_12-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_12-bytes32-uint8-
  659. :xref-Packing-replace_32_12-bytes32-bytes12-uint8-: xref:utils.adoc#Packing-replace_32_12-bytes32-bytes12-uint8-
  660. :xref-Packing-extract_32_16-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_16-bytes32-uint8-
  661. :xref-Packing-replace_32_16-bytes32-bytes16-uint8-: xref:utils.adoc#Packing-replace_32_16-bytes32-bytes16-uint8-
  662. :xref-Packing-extract_32_20-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_20-bytes32-uint8-
  663. :xref-Packing-replace_32_20-bytes32-bytes20-uint8-: xref:utils.adoc#Packing-replace_32_20-bytes32-bytes20-uint8-
  664. :xref-Packing-extract_32_24-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_24-bytes32-uint8-
  665. :xref-Packing-replace_32_24-bytes32-bytes24-uint8-: xref:utils.adoc#Packing-replace_32_24-bytes32-bytes24-uint8-
  666. :xref-Packing-extract_32_28-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_28-bytes32-uint8-
  667. :xref-Packing-replace_32_28-bytes32-bytes28-uint8-: xref:utils.adoc#Packing-replace_32_28-bytes32-bytes28-uint8-
  668. :xref-Packing-OutOfRangeAccess--: xref:utils.adoc#Packing-OutOfRangeAccess--
  669. :xref-Panic-panic-uint256-: xref:utils.adoc#Panic-panic-uint256-
  670. :xref-Panic-GENERIC-uint256: xref:utils.adoc#Panic-GENERIC-uint256
  671. :xref-Panic-ASSERT-uint256: xref:utils.adoc#Panic-ASSERT-uint256
  672. :xref-Panic-UNDER_OVERFLOW-uint256: xref:utils.adoc#Panic-UNDER_OVERFLOW-uint256
  673. :xref-Panic-DIVISION_BY_ZERO-uint256: xref:utils.adoc#Panic-DIVISION_BY_ZERO-uint256
  674. :xref-Panic-ENUM_CONVERSION_ERROR-uint256: xref:utils.adoc#Panic-ENUM_CONVERSION_ERROR-uint256
  675. :xref-Panic-STORAGE_ENCODING_ERROR-uint256: xref:utils.adoc#Panic-STORAGE_ENCODING_ERROR-uint256
  676. :xref-Panic-EMPTY_ARRAY_POP-uint256: xref:utils.adoc#Panic-EMPTY_ARRAY_POP-uint256
  677. :xref-Panic-ARRAY_OUT_OF_BOUNDS-uint256: xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256
  678. :xref-Panic-RESOURCE_ERROR-uint256: xref:utils.adoc#Panic-RESOURCE_ERROR-uint256
  679. :xref-Panic-INVALID_INTERNAL_FUNCTION-uint256: xref:utils.adoc#Panic-INVALID_INTERNAL_FUNCTION-uint256
  680. :xref-Comparators-lt-uint256-uint256-: xref:utils.adoc#Comparators-lt-uint256-uint256-
  681. :xref-Comparators-gt-uint256-uint256-: xref:utils.adoc#Comparators-gt-uint256-uint256-
  682. = Utilities
  683. [.readme-notice]
  684. NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils
  685. Miscellaneous contracts and libraries containing utility functions you can use to improve security, work with new data types, or safely use low-level primitives.
  686. * {Math}, {SignedMath}: Implementation of various arithmetic functions.
  687. * {SafeCast}: Checked downcasting functions to avoid silent truncation.
  688. * {ECDSA}, {MessageHashUtils}: Libraries for interacting with ECDSA signatures.
  689. * {P256}: Library for verifying and recovering public keys from secp256r1 signatures.
  690. * {RSA}: Library with RSA PKCS#1 v1.5 signature verification utilities.
  691. * {SignatureChecker}: A library helper to support regular ECDSA from EOAs as well as ERC-1271 signatures for smart contracts.
  692. * {Hashes}: Commonly used hash functions.
  693. * {MerkleProof}: Functions for verifying https://en.wikipedia.org/wiki/Merkle_tree[Merkle Tree] proofs.
  694. * {EIP712}: Contract with functions to allow processing signed typed structure data according to https://eips.ethereum.org/EIPS/eip-712[EIP-712].
  695. * {ReentrancyGuard}: A modifier that can prevent reentrancy during certain functions.
  696. * {ReentrancyGuardTransient}: Variant of {ReentrancyGuard} that uses transient storage (https://eips.ethereum.org/EIPS/eip-1153[EIP-1153]).
  697. * {Pausable}: A common emergency response mechanism that can pause functionality while a remediation is pending.
  698. * {Nonces}: Utility for tracking and verifying address nonces that only increment.
  699. * {ERC165}, {ERC165Checker}: Utilities for inspecting interfaces supported by contracts.
  700. * {BitMaps}: A simple library to manage boolean value mapped to a numerical index in an efficient way.
  701. * {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`).
  702. * {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.
  703. * {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.
  704. * {CircularBuffer}: A data structure to store the last N values pushed to it.
  705. * {Checkpoints}: A data structure to store values mapped to a strictly increasing key. Can be used for storing and accessing values over time.
  706. * {Heap}: A library that implements a https://en.wikipedia.org/wiki/Binary_heap[binary heap] in storage.
  707. * {MerkleTree}: A library with https://wikipedia.org/wiki/Merkle_Tree[Merkle Tree] data structures and helper functions.
  708. * {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.
  709. * {Address}: Collection of functions for overloading Solidity's https://docs.soliditylang.org/en/latest/types.html#address[`address`] type.
  710. * {Arrays}: Collection of functions that operate on https://docs.soliditylang.org/en/latest/types.html#arrays[`arrays`].
  711. * {Base64}: On-chain base64 and base64URL encoding according to https://datatracker.ietf.org/doc/html/rfc4648[RFC-4648].
  712. * {Strings}: Common operations for strings formatting.
  713. * {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.
  714. * {SlotDerivation}: Methods for deriving storage slot from ERC-7201 namespaces as well as from constructions such as mapping and arrays.
  715. * {StorageSlot}: Methods for accessing specific storage slots formatted as common primitive types.
  716. * {TransientSlot}: Primitives for reading from and writing to transient storage (only value types are currently supported).
  717. * {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.
  718. * {Context}: A utility for abstracting the sender and calldata in the current execution context.
  719. * {Packing}: A library for packing and unpacking multiple values into bytes32
  720. * {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].
  721. * {Comparators}: A library that contains comparator functions to use with with the {Heap} library.
  722. [NOTE]
  723. ====
  724. Because Solidity does not support generic types, {EnumerableMap} and {EnumerableSet} are specialized to a limited number of key-value types.
  725. ====
  726. == Math
  727. :Rounding: pass:normal[xref:#Math-Rounding[`++Rounding++`]]
  728. :tryAdd: pass:normal[xref:#Math-tryAdd-uint256-uint256-[`++tryAdd++`]]
  729. :trySub: pass:normal[xref:#Math-trySub-uint256-uint256-[`++trySub++`]]
  730. :tryMul: pass:normal[xref:#Math-tryMul-uint256-uint256-[`++tryMul++`]]
  731. :tryDiv: pass:normal[xref:#Math-tryDiv-uint256-uint256-[`++tryDiv++`]]
  732. :tryMod: pass:normal[xref:#Math-tryMod-uint256-uint256-[`++tryMod++`]]
  733. :ternary: pass:normal[xref:#Math-ternary-bool-uint256-uint256-[`++ternary++`]]
  734. :max: pass:normal[xref:#Math-max-uint256-uint256-[`++max++`]]
  735. :min: pass:normal[xref:#Math-min-uint256-uint256-[`++min++`]]
  736. :average: pass:normal[xref:#Math-average-uint256-uint256-[`++average++`]]
  737. :ceilDiv: pass:normal[xref:#Math-ceilDiv-uint256-uint256-[`++ceilDiv++`]]
  738. :mulDiv: pass:normal[xref:#Math-mulDiv-uint256-uint256-uint256-[`++mulDiv++`]]
  739. :mulDiv: pass:normal[xref:#Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-[`++mulDiv++`]]
  740. :invMod: pass:normal[xref:#Math-invMod-uint256-uint256-[`++invMod++`]]
  741. :invModPrime: pass:normal[xref:#Math-invModPrime-uint256-uint256-[`++invModPrime++`]]
  742. :modExp: pass:normal[xref:#Math-modExp-uint256-uint256-uint256-[`++modExp++`]]
  743. :tryModExp: pass:normal[xref:#Math-tryModExp-uint256-uint256-uint256-[`++tryModExp++`]]
  744. :modExp: pass:normal[xref:#Math-modExp-bytes-bytes-bytes-[`++modExp++`]]
  745. :tryModExp: pass:normal[xref:#Math-tryModExp-bytes-bytes-bytes-[`++tryModExp++`]]
  746. :sqrt: pass:normal[xref:#Math-sqrt-uint256-[`++sqrt++`]]
  747. :sqrt: pass:normal[xref:#Math-sqrt-uint256-enum-Math-Rounding-[`++sqrt++`]]
  748. :log2: pass:normal[xref:#Math-log2-uint256-[`++log2++`]]
  749. :log2: pass:normal[xref:#Math-log2-uint256-enum-Math-Rounding-[`++log2++`]]
  750. :log10: pass:normal[xref:#Math-log10-uint256-[`++log10++`]]
  751. :log10: pass:normal[xref:#Math-log10-uint256-enum-Math-Rounding-[`++log10++`]]
  752. :log256: pass:normal[xref:#Math-log256-uint256-[`++log256++`]]
  753. :log256: pass:normal[xref:#Math-log256-uint256-enum-Math-Rounding-[`++log256++`]]
  754. :unsignedRoundsUp: pass:normal[xref:#Math-unsignedRoundsUp-enum-Math-Rounding-[`++unsignedRoundsUp++`]]
  755. [.contract]
  756. [[Math]]
  757. === `++Math++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/math/Math.sol[{github-icon},role=heading-link]
  758. [.hljs-theme-light.nopadding]
  759. ```solidity
  760. import "@openzeppelin/contracts/utils/math/Math.sol";
  761. ```
  762. Standard math utilities missing in the Solidity language.
  763. [.contract-index]
  764. .Functions
  765. --
  766. * {xref-Math-tryAdd-uint256-uint256-}[`++tryAdd(a, b)++`]
  767. * {xref-Math-trySub-uint256-uint256-}[`++trySub(a, b)++`]
  768. * {xref-Math-tryMul-uint256-uint256-}[`++tryMul(a, b)++`]
  769. * {xref-Math-tryDiv-uint256-uint256-}[`++tryDiv(a, b)++`]
  770. * {xref-Math-tryMod-uint256-uint256-}[`++tryMod(a, b)++`]
  771. * {xref-Math-ternary-bool-uint256-uint256-}[`++ternary(condition, a, b)++`]
  772. * {xref-Math-max-uint256-uint256-}[`++max(a, b)++`]
  773. * {xref-Math-min-uint256-uint256-}[`++min(a, b)++`]
  774. * {xref-Math-average-uint256-uint256-}[`++average(a, b)++`]
  775. * {xref-Math-ceilDiv-uint256-uint256-}[`++ceilDiv(a, b)++`]
  776. * {xref-Math-mulDiv-uint256-uint256-uint256-}[`++mulDiv(x, y, denominator)++`]
  777. * {xref-Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-}[`++mulDiv(x, y, denominator, rounding)++`]
  778. * {xref-Math-invMod-uint256-uint256-}[`++invMod(a, n)++`]
  779. * {xref-Math-invModPrime-uint256-uint256-}[`++invModPrime(a, p)++`]
  780. * {xref-Math-modExp-uint256-uint256-uint256-}[`++modExp(b, e, m)++`]
  781. * {xref-Math-tryModExp-uint256-uint256-uint256-}[`++tryModExp(b, e, m)++`]
  782. * {xref-Math-modExp-bytes-bytes-bytes-}[`++modExp(b, e, m)++`]
  783. * {xref-Math-tryModExp-bytes-bytes-bytes-}[`++tryModExp(b, e, m)++`]
  784. * {xref-Math-sqrt-uint256-}[`++sqrt(a)++`]
  785. * {xref-Math-sqrt-uint256-enum-Math-Rounding-}[`++sqrt(a, rounding)++`]
  786. * {xref-Math-log2-uint256-}[`++log2(value)++`]
  787. * {xref-Math-log2-uint256-enum-Math-Rounding-}[`++log2(value, rounding)++`]
  788. * {xref-Math-log10-uint256-}[`++log10(value)++`]
  789. * {xref-Math-log10-uint256-enum-Math-Rounding-}[`++log10(value, rounding)++`]
  790. * {xref-Math-log256-uint256-}[`++log256(value)++`]
  791. * {xref-Math-log256-uint256-enum-Math-Rounding-}[`++log256(value, rounding)++`]
  792. * {xref-Math-unsignedRoundsUp-enum-Math-Rounding-}[`++unsignedRoundsUp(rounding)++`]
  793. --
  794. [.contract-item]
  795. [[Math-tryAdd-uint256-uint256-]]
  796. ==== `[.contract-item-name]#++tryAdd++#++(uint256 a, uint256 b) → bool success, uint256 result++` [.item-kind]#internal#
  797. Returns the addition of two unsigned integers, with an success flag (no overflow).
  798. [.contract-item]
  799. [[Math-trySub-uint256-uint256-]]
  800. ==== `[.contract-item-name]#++trySub++#++(uint256 a, uint256 b) → bool success, uint256 result++` [.item-kind]#internal#
  801. Returns the subtraction of two unsigned integers, with an success flag (no overflow).
  802. [.contract-item]
  803. [[Math-tryMul-uint256-uint256-]]
  804. ==== `[.contract-item-name]#++tryMul++#++(uint256 a, uint256 b) → bool success, uint256 result++` [.item-kind]#internal#
  805. Returns the multiplication of two unsigned integers, with an success flag (no overflow).
  806. [.contract-item]
  807. [[Math-tryDiv-uint256-uint256-]]
  808. ==== `[.contract-item-name]#++tryDiv++#++(uint256 a, uint256 b) → bool success, uint256 result++` [.item-kind]#internal#
  809. Returns the division of two unsigned integers, with a success flag (no division by zero).
  810. [.contract-item]
  811. [[Math-tryMod-uint256-uint256-]]
  812. ==== `[.contract-item-name]#++tryMod++#++(uint256 a, uint256 b) → bool success, uint256 result++` [.item-kind]#internal#
  813. Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).
  814. [.contract-item]
  815. [[Math-ternary-bool-uint256-uint256-]]
  816. ==== `[.contract-item-name]#++ternary++#++(bool condition, uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  817. Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
  818. IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
  819. However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
  820. one branch when needed, making this function more expensive.
  821. [.contract-item]
  822. [[Math-max-uint256-uint256-]]
  823. ==== `[.contract-item-name]#++max++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  824. Returns the largest of two numbers.
  825. [.contract-item]
  826. [[Math-min-uint256-uint256-]]
  827. ==== `[.contract-item-name]#++min++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  828. Returns the smallest of two numbers.
  829. [.contract-item]
  830. [[Math-average-uint256-uint256-]]
  831. ==== `[.contract-item-name]#++average++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  832. Returns the average of two numbers. The result is rounded towards
  833. zero.
  834. [.contract-item]
  835. [[Math-ceilDiv-uint256-uint256-]]
  836. ==== `[.contract-item-name]#++ceilDiv++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  837. Returns the ceiling of the division of two numbers.
  838. This differs from standard division with `/` in that it rounds towards infinity instead
  839. of rounding towards zero.
  840. [.contract-item]
  841. [[Math-mulDiv-uint256-uint256-uint256-]]
  842. ==== `[.contract-item-name]#++mulDiv++#++(uint256 x, uint256 y, uint256 denominator) → uint256 result++` [.item-kind]#internal#
  843. Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
  844. denominator == 0.
  845. Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
  846. Uniswap Labs also under MIT license.
  847. [.contract-item]
  848. [[Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-]]
  849. ==== `[.contract-item-name]#++mulDiv++#++(uint256 x, uint256 y, uint256 denominator, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
  850. Calculates x * y / denominator with full precision, following the selected rounding direction.
  851. [.contract-item]
  852. [[Math-invMod-uint256-uint256-]]
  853. ==== `[.contract-item-name]#++invMod++#++(uint256 a, uint256 n) → uint256++` [.item-kind]#internal#
  854. Calculate the modular multiplicative inverse of a number in Z/nZ.
  855. If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.
  856. If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.
  857. If the input value is not inversible, 0 is returned.
  858. 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
  859. inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.
  860. [.contract-item]
  861. [[Math-invModPrime-uint256-uint256-]]
  862. ==== `[.contract-item-name]#++invModPrime++#++(uint256 a, uint256 p) → uint256++` [.item-kind]#internal#
  863. Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.
  864. From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is
  865. prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that
  866. `a**(p-2)` is the modular multiplicative inverse of a in Fp.
  867. NOTE: this function does NOT check that `p` is a prime greater than `2`.
  868. [.contract-item]
  869. [[Math-modExp-uint256-uint256-uint256-]]
  870. ==== `[.contract-item-name]#++modExp++#++(uint256 b, uint256 e, uint256 m) → uint256++` [.item-kind]#internal#
  871. Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)
  872. Requirements:
  873. - modulus can't be zero
  874. - underlying staticcall to precompile must succeed
  875. IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make
  876. sure the chain you're using it on supports the precompiled contract for modular exponentiation
  877. at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,
  878. the underlying function will succeed given the lack of a revert, but the result may be incorrectly
  879. interpreted as 0.
  880. [.contract-item]
  881. [[Math-tryModExp-uint256-uint256-uint256-]]
  882. ==== `[.contract-item-name]#++tryModExp++#++(uint256 b, uint256 e, uint256 m) → bool success, uint256 result++` [.item-kind]#internal#
  883. Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).
  884. It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying
  885. to operate modulo 0 or if the underlying precompile reverted.
  886. IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain
  887. you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in
  888. https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack
  889. of a revert, but the result may be incorrectly interpreted as 0.
  890. [.contract-item]
  891. [[Math-modExp-bytes-bytes-bytes-]]
  892. ==== `[.contract-item-name]#++modExp++#++(bytes b, bytes e, bytes m) → bytes++` [.item-kind]#internal#
  893. Variant of {modExp} that supports inputs of arbitrary length.
  894. [.contract-item]
  895. [[Math-tryModExp-bytes-bytes-bytes-]]
  896. ==== `[.contract-item-name]#++tryModExp++#++(bytes b, bytes e, bytes m) → bool success, bytes result++` [.item-kind]#internal#
  897. Variant of {tryModExp} that supports inputs of arbitrary length.
  898. [.contract-item]
  899. [[Math-sqrt-uint256-]]
  900. ==== `[.contract-item-name]#++sqrt++#++(uint256 a) → uint256++` [.item-kind]#internal#
  901. Returns the square root of a number. If the number is not a perfect square, the value is rounded
  902. towards zero.
  903. This method is based on Newton's method for computing square roots; the algorithm is restricted to only
  904. using integer operations.
  905. [.contract-item]
  906. [[Math-sqrt-uint256-enum-Math-Rounding-]]
  907. ==== `[.contract-item-name]#++sqrt++#++(uint256 a, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
  908. Calculates sqrt(a), following the selected rounding direction.
  909. [.contract-item]
  910. [[Math-log2-uint256-]]
  911. ==== `[.contract-item-name]#++log2++#++(uint256 value) → uint256++` [.item-kind]#internal#
  912. Return the log in base 2 of a positive value rounded towards zero.
  913. Returns 0 if given 0.
  914. [.contract-item]
  915. [[Math-log2-uint256-enum-Math-Rounding-]]
  916. ==== `[.contract-item-name]#++log2++#++(uint256 value, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
  917. Return the log in base 2, following the selected rounding direction, of a positive value.
  918. Returns 0 if given 0.
  919. [.contract-item]
  920. [[Math-log10-uint256-]]
  921. ==== `[.contract-item-name]#++log10++#++(uint256 value) → uint256++` [.item-kind]#internal#
  922. Return the log in base 10 of a positive value rounded towards zero.
  923. Returns 0 if given 0.
  924. [.contract-item]
  925. [[Math-log10-uint256-enum-Math-Rounding-]]
  926. ==== `[.contract-item-name]#++log10++#++(uint256 value, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
  927. Return the log in base 10, following the selected rounding direction, of a positive value.
  928. Returns 0 if given 0.
  929. [.contract-item]
  930. [[Math-log256-uint256-]]
  931. ==== `[.contract-item-name]#++log256++#++(uint256 value) → uint256++` [.item-kind]#internal#
  932. Return the log in base 256 of a positive value rounded towards zero.
  933. Returns 0 if given 0.
  934. Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
  935. [.contract-item]
  936. [[Math-log256-uint256-enum-Math-Rounding-]]
  937. ==== `[.contract-item-name]#++log256++#++(uint256 value, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
  938. Return the log in base 256, following the selected rounding direction, of a positive value.
  939. Returns 0 if given 0.
  940. [.contract-item]
  941. [[Math-unsignedRoundsUp-enum-Math-Rounding-]]
  942. ==== `[.contract-item-name]#++unsignedRoundsUp++#++(enum Math.Rounding rounding) → bool++` [.item-kind]#internal#
  943. Returns whether a provided rounding mode is considered rounding up for unsigned integers.
  944. :ternary: pass:normal[xref:#SignedMath-ternary-bool-int256-int256-[`++ternary++`]]
  945. :max: pass:normal[xref:#SignedMath-max-int256-int256-[`++max++`]]
  946. :min: pass:normal[xref:#SignedMath-min-int256-int256-[`++min++`]]
  947. :average: pass:normal[xref:#SignedMath-average-int256-int256-[`++average++`]]
  948. :abs: pass:normal[xref:#SignedMath-abs-int256-[`++abs++`]]
  949. [.contract]
  950. [[SignedMath]]
  951. === `++SignedMath++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/math/SignedMath.sol[{github-icon},role=heading-link]
  952. [.hljs-theme-light.nopadding]
  953. ```solidity
  954. import "@openzeppelin/contracts/utils/math/SignedMath.sol";
  955. ```
  956. Standard signed math utilities missing in the Solidity language.
  957. [.contract-index]
  958. .Functions
  959. --
  960. * {xref-SignedMath-ternary-bool-int256-int256-}[`++ternary(condition, a, b)++`]
  961. * {xref-SignedMath-max-int256-int256-}[`++max(a, b)++`]
  962. * {xref-SignedMath-min-int256-int256-}[`++min(a, b)++`]
  963. * {xref-SignedMath-average-int256-int256-}[`++average(a, b)++`]
  964. * {xref-SignedMath-abs-int256-}[`++abs(n)++`]
  965. --
  966. [.contract-item]
  967. [[SignedMath-ternary-bool-int256-int256-]]
  968. ==== `[.contract-item-name]#++ternary++#++(bool condition, int256 a, int256 b) → int256++` [.item-kind]#internal#
  969. Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
  970. IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
  971. However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
  972. one branch when needed, making this function more expensive.
  973. [.contract-item]
  974. [[SignedMath-max-int256-int256-]]
  975. ==== `[.contract-item-name]#++max++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
  976. Returns the largest of two signed numbers.
  977. [.contract-item]
  978. [[SignedMath-min-int256-int256-]]
  979. ==== `[.contract-item-name]#++min++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
  980. Returns the smallest of two signed numbers.
  981. [.contract-item]
  982. [[SignedMath-average-int256-int256-]]
  983. ==== `[.contract-item-name]#++average++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
  984. Returns the average of two signed numbers without overflow.
  985. The result is rounded towards zero.
  986. [.contract-item]
  987. [[SignedMath-abs-int256-]]
  988. ==== `[.contract-item-name]#++abs++#++(int256 n) → uint256++` [.item-kind]#internal#
  989. Returns the absolute unsigned value of a signed value.
  990. :SafeCastOverflowedUintDowncast: pass:normal[xref:#SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-[`++SafeCastOverflowedUintDowncast++`]]
  991. :SafeCastOverflowedIntToUint: pass:normal[xref:#SafeCast-SafeCastOverflowedIntToUint-int256-[`++SafeCastOverflowedIntToUint++`]]
  992. :SafeCastOverflowedIntDowncast: pass:normal[xref:#SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-[`++SafeCastOverflowedIntDowncast++`]]
  993. :SafeCastOverflowedUintToInt: pass:normal[xref:#SafeCast-SafeCastOverflowedUintToInt-uint256-[`++SafeCastOverflowedUintToInt++`]]
  994. :toUint248: pass:normal[xref:#SafeCast-toUint248-uint256-[`++toUint248++`]]
  995. :toUint240: pass:normal[xref:#SafeCast-toUint240-uint256-[`++toUint240++`]]
  996. :toUint232: pass:normal[xref:#SafeCast-toUint232-uint256-[`++toUint232++`]]
  997. :toUint224: pass:normal[xref:#SafeCast-toUint224-uint256-[`++toUint224++`]]
  998. :toUint216: pass:normal[xref:#SafeCast-toUint216-uint256-[`++toUint216++`]]
  999. :toUint208: pass:normal[xref:#SafeCast-toUint208-uint256-[`++toUint208++`]]
  1000. :toUint200: pass:normal[xref:#SafeCast-toUint200-uint256-[`++toUint200++`]]
  1001. :toUint192: pass:normal[xref:#SafeCast-toUint192-uint256-[`++toUint192++`]]
  1002. :toUint184: pass:normal[xref:#SafeCast-toUint184-uint256-[`++toUint184++`]]
  1003. :toUint176: pass:normal[xref:#SafeCast-toUint176-uint256-[`++toUint176++`]]
  1004. :toUint168: pass:normal[xref:#SafeCast-toUint168-uint256-[`++toUint168++`]]
  1005. :toUint160: pass:normal[xref:#SafeCast-toUint160-uint256-[`++toUint160++`]]
  1006. :toUint152: pass:normal[xref:#SafeCast-toUint152-uint256-[`++toUint152++`]]
  1007. :toUint144: pass:normal[xref:#SafeCast-toUint144-uint256-[`++toUint144++`]]
  1008. :toUint136: pass:normal[xref:#SafeCast-toUint136-uint256-[`++toUint136++`]]
  1009. :toUint128: pass:normal[xref:#SafeCast-toUint128-uint256-[`++toUint128++`]]
  1010. :toUint120: pass:normal[xref:#SafeCast-toUint120-uint256-[`++toUint120++`]]
  1011. :toUint112: pass:normal[xref:#SafeCast-toUint112-uint256-[`++toUint112++`]]
  1012. :toUint104: pass:normal[xref:#SafeCast-toUint104-uint256-[`++toUint104++`]]
  1013. :toUint96: pass:normal[xref:#SafeCast-toUint96-uint256-[`++toUint96++`]]
  1014. :toUint88: pass:normal[xref:#SafeCast-toUint88-uint256-[`++toUint88++`]]
  1015. :toUint80: pass:normal[xref:#SafeCast-toUint80-uint256-[`++toUint80++`]]
  1016. :toUint72: pass:normal[xref:#SafeCast-toUint72-uint256-[`++toUint72++`]]
  1017. :toUint64: pass:normal[xref:#SafeCast-toUint64-uint256-[`++toUint64++`]]
  1018. :toUint56: pass:normal[xref:#SafeCast-toUint56-uint256-[`++toUint56++`]]
  1019. :toUint48: pass:normal[xref:#SafeCast-toUint48-uint256-[`++toUint48++`]]
  1020. :toUint40: pass:normal[xref:#SafeCast-toUint40-uint256-[`++toUint40++`]]
  1021. :toUint32: pass:normal[xref:#SafeCast-toUint32-uint256-[`++toUint32++`]]
  1022. :toUint24: pass:normal[xref:#SafeCast-toUint24-uint256-[`++toUint24++`]]
  1023. :toUint16: pass:normal[xref:#SafeCast-toUint16-uint256-[`++toUint16++`]]
  1024. :toUint8: pass:normal[xref:#SafeCast-toUint8-uint256-[`++toUint8++`]]
  1025. :toUint256: pass:normal[xref:#SafeCast-toUint256-int256-[`++toUint256++`]]
  1026. :toInt248: pass:normal[xref:#SafeCast-toInt248-int256-[`++toInt248++`]]
  1027. :toInt240: pass:normal[xref:#SafeCast-toInt240-int256-[`++toInt240++`]]
  1028. :toInt232: pass:normal[xref:#SafeCast-toInt232-int256-[`++toInt232++`]]
  1029. :toInt224: pass:normal[xref:#SafeCast-toInt224-int256-[`++toInt224++`]]
  1030. :toInt216: pass:normal[xref:#SafeCast-toInt216-int256-[`++toInt216++`]]
  1031. :toInt208: pass:normal[xref:#SafeCast-toInt208-int256-[`++toInt208++`]]
  1032. :toInt200: pass:normal[xref:#SafeCast-toInt200-int256-[`++toInt200++`]]
  1033. :toInt192: pass:normal[xref:#SafeCast-toInt192-int256-[`++toInt192++`]]
  1034. :toInt184: pass:normal[xref:#SafeCast-toInt184-int256-[`++toInt184++`]]
  1035. :toInt176: pass:normal[xref:#SafeCast-toInt176-int256-[`++toInt176++`]]
  1036. :toInt168: pass:normal[xref:#SafeCast-toInt168-int256-[`++toInt168++`]]
  1037. :toInt160: pass:normal[xref:#SafeCast-toInt160-int256-[`++toInt160++`]]
  1038. :toInt152: pass:normal[xref:#SafeCast-toInt152-int256-[`++toInt152++`]]
  1039. :toInt144: pass:normal[xref:#SafeCast-toInt144-int256-[`++toInt144++`]]
  1040. :toInt136: pass:normal[xref:#SafeCast-toInt136-int256-[`++toInt136++`]]
  1041. :toInt128: pass:normal[xref:#SafeCast-toInt128-int256-[`++toInt128++`]]
  1042. :toInt120: pass:normal[xref:#SafeCast-toInt120-int256-[`++toInt120++`]]
  1043. :toInt112: pass:normal[xref:#SafeCast-toInt112-int256-[`++toInt112++`]]
  1044. :toInt104: pass:normal[xref:#SafeCast-toInt104-int256-[`++toInt104++`]]
  1045. :toInt96: pass:normal[xref:#SafeCast-toInt96-int256-[`++toInt96++`]]
  1046. :toInt88: pass:normal[xref:#SafeCast-toInt88-int256-[`++toInt88++`]]
  1047. :toInt80: pass:normal[xref:#SafeCast-toInt80-int256-[`++toInt80++`]]
  1048. :toInt72: pass:normal[xref:#SafeCast-toInt72-int256-[`++toInt72++`]]
  1049. :toInt64: pass:normal[xref:#SafeCast-toInt64-int256-[`++toInt64++`]]
  1050. :toInt56: pass:normal[xref:#SafeCast-toInt56-int256-[`++toInt56++`]]
  1051. :toInt48: pass:normal[xref:#SafeCast-toInt48-int256-[`++toInt48++`]]
  1052. :toInt40: pass:normal[xref:#SafeCast-toInt40-int256-[`++toInt40++`]]
  1053. :toInt32: pass:normal[xref:#SafeCast-toInt32-int256-[`++toInt32++`]]
  1054. :toInt24: pass:normal[xref:#SafeCast-toInt24-int256-[`++toInt24++`]]
  1055. :toInt16: pass:normal[xref:#SafeCast-toInt16-int256-[`++toInt16++`]]
  1056. :toInt8: pass:normal[xref:#SafeCast-toInt8-int256-[`++toInt8++`]]
  1057. :toInt256: pass:normal[xref:#SafeCast-toInt256-uint256-[`++toInt256++`]]
  1058. :toUint: pass:normal[xref:#SafeCast-toUint-bool-[`++toUint++`]]
  1059. [.contract]
  1060. [[SafeCast]]
  1061. === `++SafeCast++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/math/SafeCast.sol[{github-icon},role=heading-link]
  1062. [.hljs-theme-light.nopadding]
  1063. ```solidity
  1064. import "@openzeppelin/contracts/utils/math/SafeCast.sol";
  1065. ```
  1066. Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow
  1067. checks.
  1068. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
  1069. easily result in undesired exploitation or bugs, since developers usually
  1070. assume that overflows raise errors. `SafeCast` restores this intuition by
  1071. reverting the transaction when such an operation overflows.
  1072. Using this library instead of the unchecked operations eliminates an entire
  1073. class of bugs, so it's recommended to use it always.
  1074. [.contract-index]
  1075. .Functions
  1076. --
  1077. * {xref-SafeCast-toUint248-uint256-}[`++toUint248(value)++`]
  1078. * {xref-SafeCast-toUint240-uint256-}[`++toUint240(value)++`]
  1079. * {xref-SafeCast-toUint232-uint256-}[`++toUint232(value)++`]
  1080. * {xref-SafeCast-toUint224-uint256-}[`++toUint224(value)++`]
  1081. * {xref-SafeCast-toUint216-uint256-}[`++toUint216(value)++`]
  1082. * {xref-SafeCast-toUint208-uint256-}[`++toUint208(value)++`]
  1083. * {xref-SafeCast-toUint200-uint256-}[`++toUint200(value)++`]
  1084. * {xref-SafeCast-toUint192-uint256-}[`++toUint192(value)++`]
  1085. * {xref-SafeCast-toUint184-uint256-}[`++toUint184(value)++`]
  1086. * {xref-SafeCast-toUint176-uint256-}[`++toUint176(value)++`]
  1087. * {xref-SafeCast-toUint168-uint256-}[`++toUint168(value)++`]
  1088. * {xref-SafeCast-toUint160-uint256-}[`++toUint160(value)++`]
  1089. * {xref-SafeCast-toUint152-uint256-}[`++toUint152(value)++`]
  1090. * {xref-SafeCast-toUint144-uint256-}[`++toUint144(value)++`]
  1091. * {xref-SafeCast-toUint136-uint256-}[`++toUint136(value)++`]
  1092. * {xref-SafeCast-toUint128-uint256-}[`++toUint128(value)++`]
  1093. * {xref-SafeCast-toUint120-uint256-}[`++toUint120(value)++`]
  1094. * {xref-SafeCast-toUint112-uint256-}[`++toUint112(value)++`]
  1095. * {xref-SafeCast-toUint104-uint256-}[`++toUint104(value)++`]
  1096. * {xref-SafeCast-toUint96-uint256-}[`++toUint96(value)++`]
  1097. * {xref-SafeCast-toUint88-uint256-}[`++toUint88(value)++`]
  1098. * {xref-SafeCast-toUint80-uint256-}[`++toUint80(value)++`]
  1099. * {xref-SafeCast-toUint72-uint256-}[`++toUint72(value)++`]
  1100. * {xref-SafeCast-toUint64-uint256-}[`++toUint64(value)++`]
  1101. * {xref-SafeCast-toUint56-uint256-}[`++toUint56(value)++`]
  1102. * {xref-SafeCast-toUint48-uint256-}[`++toUint48(value)++`]
  1103. * {xref-SafeCast-toUint40-uint256-}[`++toUint40(value)++`]
  1104. * {xref-SafeCast-toUint32-uint256-}[`++toUint32(value)++`]
  1105. * {xref-SafeCast-toUint24-uint256-}[`++toUint24(value)++`]
  1106. * {xref-SafeCast-toUint16-uint256-}[`++toUint16(value)++`]
  1107. * {xref-SafeCast-toUint8-uint256-}[`++toUint8(value)++`]
  1108. * {xref-SafeCast-toUint256-int256-}[`++toUint256(value)++`]
  1109. * {xref-SafeCast-toInt248-int256-}[`++toInt248(value)++`]
  1110. * {xref-SafeCast-toInt240-int256-}[`++toInt240(value)++`]
  1111. * {xref-SafeCast-toInt232-int256-}[`++toInt232(value)++`]
  1112. * {xref-SafeCast-toInt224-int256-}[`++toInt224(value)++`]
  1113. * {xref-SafeCast-toInt216-int256-}[`++toInt216(value)++`]
  1114. * {xref-SafeCast-toInt208-int256-}[`++toInt208(value)++`]
  1115. * {xref-SafeCast-toInt200-int256-}[`++toInt200(value)++`]
  1116. * {xref-SafeCast-toInt192-int256-}[`++toInt192(value)++`]
  1117. * {xref-SafeCast-toInt184-int256-}[`++toInt184(value)++`]
  1118. * {xref-SafeCast-toInt176-int256-}[`++toInt176(value)++`]
  1119. * {xref-SafeCast-toInt168-int256-}[`++toInt168(value)++`]
  1120. * {xref-SafeCast-toInt160-int256-}[`++toInt160(value)++`]
  1121. * {xref-SafeCast-toInt152-int256-}[`++toInt152(value)++`]
  1122. * {xref-SafeCast-toInt144-int256-}[`++toInt144(value)++`]
  1123. * {xref-SafeCast-toInt136-int256-}[`++toInt136(value)++`]
  1124. * {xref-SafeCast-toInt128-int256-}[`++toInt128(value)++`]
  1125. * {xref-SafeCast-toInt120-int256-}[`++toInt120(value)++`]
  1126. * {xref-SafeCast-toInt112-int256-}[`++toInt112(value)++`]
  1127. * {xref-SafeCast-toInt104-int256-}[`++toInt104(value)++`]
  1128. * {xref-SafeCast-toInt96-int256-}[`++toInt96(value)++`]
  1129. * {xref-SafeCast-toInt88-int256-}[`++toInt88(value)++`]
  1130. * {xref-SafeCast-toInt80-int256-}[`++toInt80(value)++`]
  1131. * {xref-SafeCast-toInt72-int256-}[`++toInt72(value)++`]
  1132. * {xref-SafeCast-toInt64-int256-}[`++toInt64(value)++`]
  1133. * {xref-SafeCast-toInt56-int256-}[`++toInt56(value)++`]
  1134. * {xref-SafeCast-toInt48-int256-}[`++toInt48(value)++`]
  1135. * {xref-SafeCast-toInt40-int256-}[`++toInt40(value)++`]
  1136. * {xref-SafeCast-toInt32-int256-}[`++toInt32(value)++`]
  1137. * {xref-SafeCast-toInt24-int256-}[`++toInt24(value)++`]
  1138. * {xref-SafeCast-toInt16-int256-}[`++toInt16(value)++`]
  1139. * {xref-SafeCast-toInt8-int256-}[`++toInt8(value)++`]
  1140. * {xref-SafeCast-toInt256-uint256-}[`++toInt256(value)++`]
  1141. * {xref-SafeCast-toUint-bool-}[`++toUint(b)++`]
  1142. --
  1143. [.contract-index]
  1144. .Errors
  1145. --
  1146. * {xref-SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-}[`++SafeCastOverflowedUintDowncast(bits, value)++`]
  1147. * {xref-SafeCast-SafeCastOverflowedIntToUint-int256-}[`++SafeCastOverflowedIntToUint(value)++`]
  1148. * {xref-SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-}[`++SafeCastOverflowedIntDowncast(bits, value)++`]
  1149. * {xref-SafeCast-SafeCastOverflowedUintToInt-uint256-}[`++SafeCastOverflowedUintToInt(value)++`]
  1150. --
  1151. [.contract-item]
  1152. [[SafeCast-toUint248-uint256-]]
  1153. ==== `[.contract-item-name]#++toUint248++#++(uint256 value) → uint248++` [.item-kind]#internal#
  1154. Returns the downcasted uint248 from uint256, reverting on
  1155. overflow (when the input is greater than largest uint248).
  1156. Counterpart to Solidity's `uint248` operator.
  1157. Requirements:
  1158. - input must fit into 248 bits
  1159. [.contract-item]
  1160. [[SafeCast-toUint240-uint256-]]
  1161. ==== `[.contract-item-name]#++toUint240++#++(uint256 value) → uint240++` [.item-kind]#internal#
  1162. Returns the downcasted uint240 from uint256, reverting on
  1163. overflow (when the input is greater than largest uint240).
  1164. Counterpart to Solidity's `uint240` operator.
  1165. Requirements:
  1166. - input must fit into 240 bits
  1167. [.contract-item]
  1168. [[SafeCast-toUint232-uint256-]]
  1169. ==== `[.contract-item-name]#++toUint232++#++(uint256 value) → uint232++` [.item-kind]#internal#
  1170. Returns the downcasted uint232 from uint256, reverting on
  1171. overflow (when the input is greater than largest uint232).
  1172. Counterpart to Solidity's `uint232` operator.
  1173. Requirements:
  1174. - input must fit into 232 bits
  1175. [.contract-item]
  1176. [[SafeCast-toUint224-uint256-]]
  1177. ==== `[.contract-item-name]#++toUint224++#++(uint256 value) → uint224++` [.item-kind]#internal#
  1178. Returns the downcasted uint224 from uint256, reverting on
  1179. overflow (when the input is greater than largest uint224).
  1180. Counterpart to Solidity's `uint224` operator.
  1181. Requirements:
  1182. - input must fit into 224 bits
  1183. [.contract-item]
  1184. [[SafeCast-toUint216-uint256-]]
  1185. ==== `[.contract-item-name]#++toUint216++#++(uint256 value) → uint216++` [.item-kind]#internal#
  1186. Returns the downcasted uint216 from uint256, reverting on
  1187. overflow (when the input is greater than largest uint216).
  1188. Counterpart to Solidity's `uint216` operator.
  1189. Requirements:
  1190. - input must fit into 216 bits
  1191. [.contract-item]
  1192. [[SafeCast-toUint208-uint256-]]
  1193. ==== `[.contract-item-name]#++toUint208++#++(uint256 value) → uint208++` [.item-kind]#internal#
  1194. Returns the downcasted uint208 from uint256, reverting on
  1195. overflow (when the input is greater than largest uint208).
  1196. Counterpart to Solidity's `uint208` operator.
  1197. Requirements:
  1198. - input must fit into 208 bits
  1199. [.contract-item]
  1200. [[SafeCast-toUint200-uint256-]]
  1201. ==== `[.contract-item-name]#++toUint200++#++(uint256 value) → uint200++` [.item-kind]#internal#
  1202. Returns the downcasted uint200 from uint256, reverting on
  1203. overflow (when the input is greater than largest uint200).
  1204. Counterpart to Solidity's `uint200` operator.
  1205. Requirements:
  1206. - input must fit into 200 bits
  1207. [.contract-item]
  1208. [[SafeCast-toUint192-uint256-]]
  1209. ==== `[.contract-item-name]#++toUint192++#++(uint256 value) → uint192++` [.item-kind]#internal#
  1210. Returns the downcasted uint192 from uint256, reverting on
  1211. overflow (when the input is greater than largest uint192).
  1212. Counterpart to Solidity's `uint192` operator.
  1213. Requirements:
  1214. - input must fit into 192 bits
  1215. [.contract-item]
  1216. [[SafeCast-toUint184-uint256-]]
  1217. ==== `[.contract-item-name]#++toUint184++#++(uint256 value) → uint184++` [.item-kind]#internal#
  1218. Returns the downcasted uint184 from uint256, reverting on
  1219. overflow (when the input is greater than largest uint184).
  1220. Counterpart to Solidity's `uint184` operator.
  1221. Requirements:
  1222. - input must fit into 184 bits
  1223. [.contract-item]
  1224. [[SafeCast-toUint176-uint256-]]
  1225. ==== `[.contract-item-name]#++toUint176++#++(uint256 value) → uint176++` [.item-kind]#internal#
  1226. Returns the downcasted uint176 from uint256, reverting on
  1227. overflow (when the input is greater than largest uint176).
  1228. Counterpart to Solidity's `uint176` operator.
  1229. Requirements:
  1230. - input must fit into 176 bits
  1231. [.contract-item]
  1232. [[SafeCast-toUint168-uint256-]]
  1233. ==== `[.contract-item-name]#++toUint168++#++(uint256 value) → uint168++` [.item-kind]#internal#
  1234. Returns the downcasted uint168 from uint256, reverting on
  1235. overflow (when the input is greater than largest uint168).
  1236. Counterpart to Solidity's `uint168` operator.
  1237. Requirements:
  1238. - input must fit into 168 bits
  1239. [.contract-item]
  1240. [[SafeCast-toUint160-uint256-]]
  1241. ==== `[.contract-item-name]#++toUint160++#++(uint256 value) → uint160++` [.item-kind]#internal#
  1242. Returns the downcasted uint160 from uint256, reverting on
  1243. overflow (when the input is greater than largest uint160).
  1244. Counterpart to Solidity's `uint160` operator.
  1245. Requirements:
  1246. - input must fit into 160 bits
  1247. [.contract-item]
  1248. [[SafeCast-toUint152-uint256-]]
  1249. ==== `[.contract-item-name]#++toUint152++#++(uint256 value) → uint152++` [.item-kind]#internal#
  1250. Returns the downcasted uint152 from uint256, reverting on
  1251. overflow (when the input is greater than largest uint152).
  1252. Counterpart to Solidity's `uint152` operator.
  1253. Requirements:
  1254. - input must fit into 152 bits
  1255. [.contract-item]
  1256. [[SafeCast-toUint144-uint256-]]
  1257. ==== `[.contract-item-name]#++toUint144++#++(uint256 value) → uint144++` [.item-kind]#internal#
  1258. Returns the downcasted uint144 from uint256, reverting on
  1259. overflow (when the input is greater than largest uint144).
  1260. Counterpart to Solidity's `uint144` operator.
  1261. Requirements:
  1262. - input must fit into 144 bits
  1263. [.contract-item]
  1264. [[SafeCast-toUint136-uint256-]]
  1265. ==== `[.contract-item-name]#++toUint136++#++(uint256 value) → uint136++` [.item-kind]#internal#
  1266. Returns the downcasted uint136 from uint256, reverting on
  1267. overflow (when the input is greater than largest uint136).
  1268. Counterpart to Solidity's `uint136` operator.
  1269. Requirements:
  1270. - input must fit into 136 bits
  1271. [.contract-item]
  1272. [[SafeCast-toUint128-uint256-]]
  1273. ==== `[.contract-item-name]#++toUint128++#++(uint256 value) → uint128++` [.item-kind]#internal#
  1274. Returns the downcasted uint128 from uint256, reverting on
  1275. overflow (when the input is greater than largest uint128).
  1276. Counterpart to Solidity's `uint128` operator.
  1277. Requirements:
  1278. - input must fit into 128 bits
  1279. [.contract-item]
  1280. [[SafeCast-toUint120-uint256-]]
  1281. ==== `[.contract-item-name]#++toUint120++#++(uint256 value) → uint120++` [.item-kind]#internal#
  1282. Returns the downcasted uint120 from uint256, reverting on
  1283. overflow (when the input is greater than largest uint120).
  1284. Counterpart to Solidity's `uint120` operator.
  1285. Requirements:
  1286. - input must fit into 120 bits
  1287. [.contract-item]
  1288. [[SafeCast-toUint112-uint256-]]
  1289. ==== `[.contract-item-name]#++toUint112++#++(uint256 value) → uint112++` [.item-kind]#internal#
  1290. Returns the downcasted uint112 from uint256, reverting on
  1291. overflow (when the input is greater than largest uint112).
  1292. Counterpart to Solidity's `uint112` operator.
  1293. Requirements:
  1294. - input must fit into 112 bits
  1295. [.contract-item]
  1296. [[SafeCast-toUint104-uint256-]]
  1297. ==== `[.contract-item-name]#++toUint104++#++(uint256 value) → uint104++` [.item-kind]#internal#
  1298. Returns the downcasted uint104 from uint256, reverting on
  1299. overflow (when the input is greater than largest uint104).
  1300. Counterpart to Solidity's `uint104` operator.
  1301. Requirements:
  1302. - input must fit into 104 bits
  1303. [.contract-item]
  1304. [[SafeCast-toUint96-uint256-]]
  1305. ==== `[.contract-item-name]#++toUint96++#++(uint256 value) → uint96++` [.item-kind]#internal#
  1306. Returns the downcasted uint96 from uint256, reverting on
  1307. overflow (when the input is greater than largest uint96).
  1308. Counterpart to Solidity's `uint96` operator.
  1309. Requirements:
  1310. - input must fit into 96 bits
  1311. [.contract-item]
  1312. [[SafeCast-toUint88-uint256-]]
  1313. ==== `[.contract-item-name]#++toUint88++#++(uint256 value) → uint88++` [.item-kind]#internal#
  1314. Returns the downcasted uint88 from uint256, reverting on
  1315. overflow (when the input is greater than largest uint88).
  1316. Counterpart to Solidity's `uint88` operator.
  1317. Requirements:
  1318. - input must fit into 88 bits
  1319. [.contract-item]
  1320. [[SafeCast-toUint80-uint256-]]
  1321. ==== `[.contract-item-name]#++toUint80++#++(uint256 value) → uint80++` [.item-kind]#internal#
  1322. Returns the downcasted uint80 from uint256, reverting on
  1323. overflow (when the input is greater than largest uint80).
  1324. Counterpart to Solidity's `uint80` operator.
  1325. Requirements:
  1326. - input must fit into 80 bits
  1327. [.contract-item]
  1328. [[SafeCast-toUint72-uint256-]]
  1329. ==== `[.contract-item-name]#++toUint72++#++(uint256 value) → uint72++` [.item-kind]#internal#
  1330. Returns the downcasted uint72 from uint256, reverting on
  1331. overflow (when the input is greater than largest uint72).
  1332. Counterpart to Solidity's `uint72` operator.
  1333. Requirements:
  1334. - input must fit into 72 bits
  1335. [.contract-item]
  1336. [[SafeCast-toUint64-uint256-]]
  1337. ==== `[.contract-item-name]#++toUint64++#++(uint256 value) → uint64++` [.item-kind]#internal#
  1338. Returns the downcasted uint64 from uint256, reverting on
  1339. overflow (when the input is greater than largest uint64).
  1340. Counterpart to Solidity's `uint64` operator.
  1341. Requirements:
  1342. - input must fit into 64 bits
  1343. [.contract-item]
  1344. [[SafeCast-toUint56-uint256-]]
  1345. ==== `[.contract-item-name]#++toUint56++#++(uint256 value) → uint56++` [.item-kind]#internal#
  1346. Returns the downcasted uint56 from uint256, reverting on
  1347. overflow (when the input is greater than largest uint56).
  1348. Counterpart to Solidity's `uint56` operator.
  1349. Requirements:
  1350. - input must fit into 56 bits
  1351. [.contract-item]
  1352. [[SafeCast-toUint48-uint256-]]
  1353. ==== `[.contract-item-name]#++toUint48++#++(uint256 value) → uint48++` [.item-kind]#internal#
  1354. Returns the downcasted uint48 from uint256, reverting on
  1355. overflow (when the input is greater than largest uint48).
  1356. Counterpart to Solidity's `uint48` operator.
  1357. Requirements:
  1358. - input must fit into 48 bits
  1359. [.contract-item]
  1360. [[SafeCast-toUint40-uint256-]]
  1361. ==== `[.contract-item-name]#++toUint40++#++(uint256 value) → uint40++` [.item-kind]#internal#
  1362. Returns the downcasted uint40 from uint256, reverting on
  1363. overflow (when the input is greater than largest uint40).
  1364. Counterpart to Solidity's `uint40` operator.
  1365. Requirements:
  1366. - input must fit into 40 bits
  1367. [.contract-item]
  1368. [[SafeCast-toUint32-uint256-]]
  1369. ==== `[.contract-item-name]#++toUint32++#++(uint256 value) → uint32++` [.item-kind]#internal#
  1370. Returns the downcasted uint32 from uint256, reverting on
  1371. overflow (when the input is greater than largest uint32).
  1372. Counterpart to Solidity's `uint32` operator.
  1373. Requirements:
  1374. - input must fit into 32 bits
  1375. [.contract-item]
  1376. [[SafeCast-toUint24-uint256-]]
  1377. ==== `[.contract-item-name]#++toUint24++#++(uint256 value) → uint24++` [.item-kind]#internal#
  1378. Returns the downcasted uint24 from uint256, reverting on
  1379. overflow (when the input is greater than largest uint24).
  1380. Counterpart to Solidity's `uint24` operator.
  1381. Requirements:
  1382. - input must fit into 24 bits
  1383. [.contract-item]
  1384. [[SafeCast-toUint16-uint256-]]
  1385. ==== `[.contract-item-name]#++toUint16++#++(uint256 value) → uint16++` [.item-kind]#internal#
  1386. Returns the downcasted uint16 from uint256, reverting on
  1387. overflow (when the input is greater than largest uint16).
  1388. Counterpart to Solidity's `uint16` operator.
  1389. Requirements:
  1390. - input must fit into 16 bits
  1391. [.contract-item]
  1392. [[SafeCast-toUint8-uint256-]]
  1393. ==== `[.contract-item-name]#++toUint8++#++(uint256 value) → uint8++` [.item-kind]#internal#
  1394. Returns the downcasted uint8 from uint256, reverting on
  1395. overflow (when the input is greater than largest uint8).
  1396. Counterpart to Solidity's `uint8` operator.
  1397. Requirements:
  1398. - input must fit into 8 bits
  1399. [.contract-item]
  1400. [[SafeCast-toUint256-int256-]]
  1401. ==== `[.contract-item-name]#++toUint256++#++(int256 value) → uint256++` [.item-kind]#internal#
  1402. Converts a signed int256 into an unsigned uint256.
  1403. Requirements:
  1404. - input must be greater than or equal to 0.
  1405. [.contract-item]
  1406. [[SafeCast-toInt248-int256-]]
  1407. ==== `[.contract-item-name]#++toInt248++#++(int256 value) → int248 downcasted++` [.item-kind]#internal#
  1408. Returns the downcasted int248 from int256, reverting on
  1409. overflow (when the input is less than smallest int248 or
  1410. greater than largest int248).
  1411. Counterpart to Solidity's `int248` operator.
  1412. Requirements:
  1413. - input must fit into 248 bits
  1414. [.contract-item]
  1415. [[SafeCast-toInt240-int256-]]
  1416. ==== `[.contract-item-name]#++toInt240++#++(int256 value) → int240 downcasted++` [.item-kind]#internal#
  1417. Returns the downcasted int240 from int256, reverting on
  1418. overflow (when the input is less than smallest int240 or
  1419. greater than largest int240).
  1420. Counterpart to Solidity's `int240` operator.
  1421. Requirements:
  1422. - input must fit into 240 bits
  1423. [.contract-item]
  1424. [[SafeCast-toInt232-int256-]]
  1425. ==== `[.contract-item-name]#++toInt232++#++(int256 value) → int232 downcasted++` [.item-kind]#internal#
  1426. Returns the downcasted int232 from int256, reverting on
  1427. overflow (when the input is less than smallest int232 or
  1428. greater than largest int232).
  1429. Counterpart to Solidity's `int232` operator.
  1430. Requirements:
  1431. - input must fit into 232 bits
  1432. [.contract-item]
  1433. [[SafeCast-toInt224-int256-]]
  1434. ==== `[.contract-item-name]#++toInt224++#++(int256 value) → int224 downcasted++` [.item-kind]#internal#
  1435. Returns the downcasted int224 from int256, reverting on
  1436. overflow (when the input is less than smallest int224 or
  1437. greater than largest int224).
  1438. Counterpart to Solidity's `int224` operator.
  1439. Requirements:
  1440. - input must fit into 224 bits
  1441. [.contract-item]
  1442. [[SafeCast-toInt216-int256-]]
  1443. ==== `[.contract-item-name]#++toInt216++#++(int256 value) → int216 downcasted++` [.item-kind]#internal#
  1444. Returns the downcasted int216 from int256, reverting on
  1445. overflow (when the input is less than smallest int216 or
  1446. greater than largest int216).
  1447. Counterpart to Solidity's `int216` operator.
  1448. Requirements:
  1449. - input must fit into 216 bits
  1450. [.contract-item]
  1451. [[SafeCast-toInt208-int256-]]
  1452. ==== `[.contract-item-name]#++toInt208++#++(int256 value) → int208 downcasted++` [.item-kind]#internal#
  1453. Returns the downcasted int208 from int256, reverting on
  1454. overflow (when the input is less than smallest int208 or
  1455. greater than largest int208).
  1456. Counterpart to Solidity's `int208` operator.
  1457. Requirements:
  1458. - input must fit into 208 bits
  1459. [.contract-item]
  1460. [[SafeCast-toInt200-int256-]]
  1461. ==== `[.contract-item-name]#++toInt200++#++(int256 value) → int200 downcasted++` [.item-kind]#internal#
  1462. Returns the downcasted int200 from int256, reverting on
  1463. overflow (when the input is less than smallest int200 or
  1464. greater than largest int200).
  1465. Counterpart to Solidity's `int200` operator.
  1466. Requirements:
  1467. - input must fit into 200 bits
  1468. [.contract-item]
  1469. [[SafeCast-toInt192-int256-]]
  1470. ==== `[.contract-item-name]#++toInt192++#++(int256 value) → int192 downcasted++` [.item-kind]#internal#
  1471. Returns the downcasted int192 from int256, reverting on
  1472. overflow (when the input is less than smallest int192 or
  1473. greater than largest int192).
  1474. Counterpart to Solidity's `int192` operator.
  1475. Requirements:
  1476. - input must fit into 192 bits
  1477. [.contract-item]
  1478. [[SafeCast-toInt184-int256-]]
  1479. ==== `[.contract-item-name]#++toInt184++#++(int256 value) → int184 downcasted++` [.item-kind]#internal#
  1480. Returns the downcasted int184 from int256, reverting on
  1481. overflow (when the input is less than smallest int184 or
  1482. greater than largest int184).
  1483. Counterpart to Solidity's `int184` operator.
  1484. Requirements:
  1485. - input must fit into 184 bits
  1486. [.contract-item]
  1487. [[SafeCast-toInt176-int256-]]
  1488. ==== `[.contract-item-name]#++toInt176++#++(int256 value) → int176 downcasted++` [.item-kind]#internal#
  1489. Returns the downcasted int176 from int256, reverting on
  1490. overflow (when the input is less than smallest int176 or
  1491. greater than largest int176).
  1492. Counterpart to Solidity's `int176` operator.
  1493. Requirements:
  1494. - input must fit into 176 bits
  1495. [.contract-item]
  1496. [[SafeCast-toInt168-int256-]]
  1497. ==== `[.contract-item-name]#++toInt168++#++(int256 value) → int168 downcasted++` [.item-kind]#internal#
  1498. Returns the downcasted int168 from int256, reverting on
  1499. overflow (when the input is less than smallest int168 or
  1500. greater than largest int168).
  1501. Counterpart to Solidity's `int168` operator.
  1502. Requirements:
  1503. - input must fit into 168 bits
  1504. [.contract-item]
  1505. [[SafeCast-toInt160-int256-]]
  1506. ==== `[.contract-item-name]#++toInt160++#++(int256 value) → int160 downcasted++` [.item-kind]#internal#
  1507. Returns the downcasted int160 from int256, reverting on
  1508. overflow (when the input is less than smallest int160 or
  1509. greater than largest int160).
  1510. Counterpart to Solidity's `int160` operator.
  1511. Requirements:
  1512. - input must fit into 160 bits
  1513. [.contract-item]
  1514. [[SafeCast-toInt152-int256-]]
  1515. ==== `[.contract-item-name]#++toInt152++#++(int256 value) → int152 downcasted++` [.item-kind]#internal#
  1516. Returns the downcasted int152 from int256, reverting on
  1517. overflow (when the input is less than smallest int152 or
  1518. greater than largest int152).
  1519. Counterpart to Solidity's `int152` operator.
  1520. Requirements:
  1521. - input must fit into 152 bits
  1522. [.contract-item]
  1523. [[SafeCast-toInt144-int256-]]
  1524. ==== `[.contract-item-name]#++toInt144++#++(int256 value) → int144 downcasted++` [.item-kind]#internal#
  1525. Returns the downcasted int144 from int256, reverting on
  1526. overflow (when the input is less than smallest int144 or
  1527. greater than largest int144).
  1528. Counterpart to Solidity's `int144` operator.
  1529. Requirements:
  1530. - input must fit into 144 bits
  1531. [.contract-item]
  1532. [[SafeCast-toInt136-int256-]]
  1533. ==== `[.contract-item-name]#++toInt136++#++(int256 value) → int136 downcasted++` [.item-kind]#internal#
  1534. Returns the downcasted int136 from int256, reverting on
  1535. overflow (when the input is less than smallest int136 or
  1536. greater than largest int136).
  1537. Counterpart to Solidity's `int136` operator.
  1538. Requirements:
  1539. - input must fit into 136 bits
  1540. [.contract-item]
  1541. [[SafeCast-toInt128-int256-]]
  1542. ==== `[.contract-item-name]#++toInt128++#++(int256 value) → int128 downcasted++` [.item-kind]#internal#
  1543. Returns the downcasted int128 from int256, reverting on
  1544. overflow (when the input is less than smallest int128 or
  1545. greater than largest int128).
  1546. Counterpart to Solidity's `int128` operator.
  1547. Requirements:
  1548. - input must fit into 128 bits
  1549. [.contract-item]
  1550. [[SafeCast-toInt120-int256-]]
  1551. ==== `[.contract-item-name]#++toInt120++#++(int256 value) → int120 downcasted++` [.item-kind]#internal#
  1552. Returns the downcasted int120 from int256, reverting on
  1553. overflow (when the input is less than smallest int120 or
  1554. greater than largest int120).
  1555. Counterpart to Solidity's `int120` operator.
  1556. Requirements:
  1557. - input must fit into 120 bits
  1558. [.contract-item]
  1559. [[SafeCast-toInt112-int256-]]
  1560. ==== `[.contract-item-name]#++toInt112++#++(int256 value) → int112 downcasted++` [.item-kind]#internal#
  1561. Returns the downcasted int112 from int256, reverting on
  1562. overflow (when the input is less than smallest int112 or
  1563. greater than largest int112).
  1564. Counterpart to Solidity's `int112` operator.
  1565. Requirements:
  1566. - input must fit into 112 bits
  1567. [.contract-item]
  1568. [[SafeCast-toInt104-int256-]]
  1569. ==== `[.contract-item-name]#++toInt104++#++(int256 value) → int104 downcasted++` [.item-kind]#internal#
  1570. Returns the downcasted int104 from int256, reverting on
  1571. overflow (when the input is less than smallest int104 or
  1572. greater than largest int104).
  1573. Counterpart to Solidity's `int104` operator.
  1574. Requirements:
  1575. - input must fit into 104 bits
  1576. [.contract-item]
  1577. [[SafeCast-toInt96-int256-]]
  1578. ==== `[.contract-item-name]#++toInt96++#++(int256 value) → int96 downcasted++` [.item-kind]#internal#
  1579. Returns the downcasted int96 from int256, reverting on
  1580. overflow (when the input is less than smallest int96 or
  1581. greater than largest int96).
  1582. Counterpart to Solidity's `int96` operator.
  1583. Requirements:
  1584. - input must fit into 96 bits
  1585. [.contract-item]
  1586. [[SafeCast-toInt88-int256-]]
  1587. ==== `[.contract-item-name]#++toInt88++#++(int256 value) → int88 downcasted++` [.item-kind]#internal#
  1588. Returns the downcasted int88 from int256, reverting on
  1589. overflow (when the input is less than smallest int88 or
  1590. greater than largest int88).
  1591. Counterpart to Solidity's `int88` operator.
  1592. Requirements:
  1593. - input must fit into 88 bits
  1594. [.contract-item]
  1595. [[SafeCast-toInt80-int256-]]
  1596. ==== `[.contract-item-name]#++toInt80++#++(int256 value) → int80 downcasted++` [.item-kind]#internal#
  1597. Returns the downcasted int80 from int256, reverting on
  1598. overflow (when the input is less than smallest int80 or
  1599. greater than largest int80).
  1600. Counterpart to Solidity's `int80` operator.
  1601. Requirements:
  1602. - input must fit into 80 bits
  1603. [.contract-item]
  1604. [[SafeCast-toInt72-int256-]]
  1605. ==== `[.contract-item-name]#++toInt72++#++(int256 value) → int72 downcasted++` [.item-kind]#internal#
  1606. Returns the downcasted int72 from int256, reverting on
  1607. overflow (when the input is less than smallest int72 or
  1608. greater than largest int72).
  1609. Counterpart to Solidity's `int72` operator.
  1610. Requirements:
  1611. - input must fit into 72 bits
  1612. [.contract-item]
  1613. [[SafeCast-toInt64-int256-]]
  1614. ==== `[.contract-item-name]#++toInt64++#++(int256 value) → int64 downcasted++` [.item-kind]#internal#
  1615. Returns the downcasted int64 from int256, reverting on
  1616. overflow (when the input is less than smallest int64 or
  1617. greater than largest int64).
  1618. Counterpart to Solidity's `int64` operator.
  1619. Requirements:
  1620. - input must fit into 64 bits
  1621. [.contract-item]
  1622. [[SafeCast-toInt56-int256-]]
  1623. ==== `[.contract-item-name]#++toInt56++#++(int256 value) → int56 downcasted++` [.item-kind]#internal#
  1624. Returns the downcasted int56 from int256, reverting on
  1625. overflow (when the input is less than smallest int56 or
  1626. greater than largest int56).
  1627. Counterpart to Solidity's `int56` operator.
  1628. Requirements:
  1629. - input must fit into 56 bits
  1630. [.contract-item]
  1631. [[SafeCast-toInt48-int256-]]
  1632. ==== `[.contract-item-name]#++toInt48++#++(int256 value) → int48 downcasted++` [.item-kind]#internal#
  1633. Returns the downcasted int48 from int256, reverting on
  1634. overflow (when the input is less than smallest int48 or
  1635. greater than largest int48).
  1636. Counterpart to Solidity's `int48` operator.
  1637. Requirements:
  1638. - input must fit into 48 bits
  1639. [.contract-item]
  1640. [[SafeCast-toInt40-int256-]]
  1641. ==== `[.contract-item-name]#++toInt40++#++(int256 value) → int40 downcasted++` [.item-kind]#internal#
  1642. Returns the downcasted int40 from int256, reverting on
  1643. overflow (when the input is less than smallest int40 or
  1644. greater than largest int40).
  1645. Counterpart to Solidity's `int40` operator.
  1646. Requirements:
  1647. - input must fit into 40 bits
  1648. [.contract-item]
  1649. [[SafeCast-toInt32-int256-]]
  1650. ==== `[.contract-item-name]#++toInt32++#++(int256 value) → int32 downcasted++` [.item-kind]#internal#
  1651. Returns the downcasted int32 from int256, reverting on
  1652. overflow (when the input is less than smallest int32 or
  1653. greater than largest int32).
  1654. Counterpart to Solidity's `int32` operator.
  1655. Requirements:
  1656. - input must fit into 32 bits
  1657. [.contract-item]
  1658. [[SafeCast-toInt24-int256-]]
  1659. ==== `[.contract-item-name]#++toInt24++#++(int256 value) → int24 downcasted++` [.item-kind]#internal#
  1660. Returns the downcasted int24 from int256, reverting on
  1661. overflow (when the input is less than smallest int24 or
  1662. greater than largest int24).
  1663. Counterpart to Solidity's `int24` operator.
  1664. Requirements:
  1665. - input must fit into 24 bits
  1666. [.contract-item]
  1667. [[SafeCast-toInt16-int256-]]
  1668. ==== `[.contract-item-name]#++toInt16++#++(int256 value) → int16 downcasted++` [.item-kind]#internal#
  1669. Returns the downcasted int16 from int256, reverting on
  1670. overflow (when the input is less than smallest int16 or
  1671. greater than largest int16).
  1672. Counterpart to Solidity's `int16` operator.
  1673. Requirements:
  1674. - input must fit into 16 bits
  1675. [.contract-item]
  1676. [[SafeCast-toInt8-int256-]]
  1677. ==== `[.contract-item-name]#++toInt8++#++(int256 value) → int8 downcasted++` [.item-kind]#internal#
  1678. Returns the downcasted int8 from int256, reverting on
  1679. overflow (when the input is less than smallest int8 or
  1680. greater than largest int8).
  1681. Counterpart to Solidity's `int8` operator.
  1682. Requirements:
  1683. - input must fit into 8 bits
  1684. [.contract-item]
  1685. [[SafeCast-toInt256-uint256-]]
  1686. ==== `[.contract-item-name]#++toInt256++#++(uint256 value) → int256++` [.item-kind]#internal#
  1687. Converts an unsigned uint256 into a signed int256.
  1688. Requirements:
  1689. - input must be less than or equal to maxInt256.
  1690. [.contract-item]
  1691. [[SafeCast-toUint-bool-]]
  1692. ==== `[.contract-item-name]#++toUint++#++(bool b) → uint256 u++` [.item-kind]#internal#
  1693. Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.
  1694. [.contract-item]
  1695. [[SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-]]
  1696. ==== `[.contract-item-name]#++SafeCastOverflowedUintDowncast++#++(uint8 bits, uint256 value)++` [.item-kind]#error#
  1697. Value doesn't fit in an uint of `bits` size.
  1698. [.contract-item]
  1699. [[SafeCast-SafeCastOverflowedIntToUint-int256-]]
  1700. ==== `[.contract-item-name]#++SafeCastOverflowedIntToUint++#++(int256 value)++` [.item-kind]#error#
  1701. An int value doesn't fit in an uint of `bits` size.
  1702. [.contract-item]
  1703. [[SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-]]
  1704. ==== `[.contract-item-name]#++SafeCastOverflowedIntDowncast++#++(uint8 bits, int256 value)++` [.item-kind]#error#
  1705. Value doesn't fit in an int of `bits` size.
  1706. [.contract-item]
  1707. [[SafeCast-SafeCastOverflowedUintToInt-uint256-]]
  1708. ==== `[.contract-item-name]#++SafeCastOverflowedUintToInt++#++(uint256 value)++` [.item-kind]#error#
  1709. An uint value doesn't fit in an int of `bits` size.
  1710. == Cryptography
  1711. :RecoverError: pass:normal[xref:#ECDSA-RecoverError[`++RecoverError++`]]
  1712. :ECDSAInvalidSignature: pass:normal[xref:#ECDSA-ECDSAInvalidSignature--[`++ECDSAInvalidSignature++`]]
  1713. :ECDSAInvalidSignatureLength: pass:normal[xref:#ECDSA-ECDSAInvalidSignatureLength-uint256-[`++ECDSAInvalidSignatureLength++`]]
  1714. :ECDSAInvalidSignatureS: pass:normal[xref:#ECDSA-ECDSAInvalidSignatureS-bytes32-[`++ECDSAInvalidSignatureS++`]]
  1715. :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-bytes-[`++tryRecover++`]]
  1716. :recover: pass:normal[xref:#ECDSA-recover-bytes32-bytes-[`++recover++`]]
  1717. :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-bytes32-bytes32-[`++tryRecover++`]]
  1718. :recover: pass:normal[xref:#ECDSA-recover-bytes32-bytes32-bytes32-[`++recover++`]]
  1719. :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`++tryRecover++`]]
  1720. :recover: pass:normal[xref:#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`++recover++`]]
  1721. [.contract]
  1722. [[ECDSA]]
  1723. === `++ECDSA++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/ECDSA.sol[{github-icon},role=heading-link]
  1724. [.hljs-theme-light.nopadding]
  1725. ```solidity
  1726. import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
  1727. ```
  1728. Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
  1729. These functions can be used to verify that a message was signed by the holder
  1730. of the private keys of a given address.
  1731. [.contract-index]
  1732. .Functions
  1733. --
  1734. * {xref-ECDSA-tryRecover-bytes32-bytes-}[`++tryRecover(hash, signature)++`]
  1735. * {xref-ECDSA-recover-bytes32-bytes-}[`++recover(hash, signature)++`]
  1736. * {xref-ECDSA-tryRecover-bytes32-bytes32-bytes32-}[`++tryRecover(hash, r, vs)++`]
  1737. * {xref-ECDSA-recover-bytes32-bytes32-bytes32-}[`++recover(hash, r, vs)++`]
  1738. * {xref-ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-}[`++tryRecover(hash, v, r, s)++`]
  1739. * {xref-ECDSA-recover-bytes32-uint8-bytes32-bytes32-}[`++recover(hash, v, r, s)++`]
  1740. --
  1741. [.contract-index]
  1742. .Errors
  1743. --
  1744. * {xref-ECDSA-ECDSAInvalidSignature--}[`++ECDSAInvalidSignature()++`]
  1745. * {xref-ECDSA-ECDSAInvalidSignatureLength-uint256-}[`++ECDSAInvalidSignatureLength(length)++`]
  1746. * {xref-ECDSA-ECDSAInvalidSignatureS-bytes32-}[`++ECDSAInvalidSignatureS(s)++`]
  1747. --
  1748. [.contract-item]
  1749. [[ECDSA-tryRecover-bytes32-bytes-]]
  1750. ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, bytes signature) → address recovered, enum ECDSA.RecoverError err, bytes32 errArg++` [.item-kind]#internal#
  1751. Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
  1752. return address(0) without also returning an error description. Errors are documented using an enum (error type)
  1753. and a bytes32 providing additional information about the error.
  1754. If no error is returned, then the address can be used for verification purposes.
  1755. The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
  1756. this function rejects them by requiring the `s` value to be in the lower
  1757. half order, and the `v` value to be either 27 or 28.
  1758. IMPORTANT: `hash` _must_ be the result of a hash operation for the
  1759. verification to be secure: it is possible to craft signatures that
  1760. recover to arbitrary addresses for non-hashed data. A safe way to ensure
  1761. this is by receiving a hash of the original message (which may otherwise
  1762. be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
  1763. Documentation for signature generation:
  1764. - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
  1765. - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
  1766. [.contract-item]
  1767. [[ECDSA-recover-bytes32-bytes-]]
  1768. ==== `[.contract-item-name]#++recover++#++(bytes32 hash, bytes signature) → address++` [.item-kind]#internal#
  1769. Returns the address that signed a hashed message (`hash`) with
  1770. `signature`. This address can then be used for verification purposes.
  1771. The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
  1772. this function rejects them by requiring the `s` value to be in the lower
  1773. half order, and the `v` value to be either 27 or 28.
  1774. IMPORTANT: `hash` _must_ be the result of a hash operation for the
  1775. verification to be secure: it is possible to craft signatures that
  1776. recover to arbitrary addresses for non-hashed data. A safe way to ensure
  1777. this is by receiving a hash of the original message (which may otherwise
  1778. be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
  1779. [.contract-item]
  1780. [[ECDSA-tryRecover-bytes32-bytes32-bytes32-]]
  1781. ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, bytes32 r, bytes32 vs) → address recovered, enum ECDSA.RecoverError err, bytes32 errArg++` [.item-kind]#internal#
  1782. Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
  1783. See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]
  1784. [.contract-item]
  1785. [[ECDSA-recover-bytes32-bytes32-bytes32-]]
  1786. ==== `[.contract-item-name]#++recover++#++(bytes32 hash, bytes32 r, bytes32 vs) → address++` [.item-kind]#internal#
  1787. Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
  1788. [.contract-item]
  1789. [[ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-]]
  1790. ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, uint8 v, bytes32 r, bytes32 s) → address recovered, enum ECDSA.RecoverError err, bytes32 errArg++` [.item-kind]#internal#
  1791. Overload of {ECDSA-tryRecover} that receives the `v`,
  1792. `r` and `s` signature fields separately.
  1793. [.contract-item]
  1794. [[ECDSA-recover-bytes32-uint8-bytes32-bytes32-]]
  1795. ==== `[.contract-item-name]#++recover++#++(bytes32 hash, uint8 v, bytes32 r, bytes32 s) → address++` [.item-kind]#internal#
  1796. Overload of {ECDSA-recover} that receives the `v`,
  1797. `r` and `s` signature fields separately.
  1798. [.contract-item]
  1799. [[ECDSA-ECDSAInvalidSignature--]]
  1800. ==== `[.contract-item-name]#++ECDSAInvalidSignature++#++()++` [.item-kind]#error#
  1801. The signature derives the `address(0)`.
  1802. [.contract-item]
  1803. [[ECDSA-ECDSAInvalidSignatureLength-uint256-]]
  1804. ==== `[.contract-item-name]#++ECDSAInvalidSignatureLength++#++(uint256 length)++` [.item-kind]#error#
  1805. The signature has an invalid length.
  1806. [.contract-item]
  1807. [[ECDSA-ECDSAInvalidSignatureS-bytes32-]]
  1808. ==== `[.contract-item-name]#++ECDSAInvalidSignatureS++#++(bytes32 s)++` [.item-kind]#error#
  1809. The signature has an S value that is in the upper half order.
  1810. :JPoint: pass:normal[xref:#P256-JPoint[`++JPoint++`]]
  1811. :GX: pass:normal[xref:#P256-GX-uint256[`++GX++`]]
  1812. :GY: pass:normal[xref:#P256-GY-uint256[`++GY++`]]
  1813. :P: pass:normal[xref:#P256-P-uint256[`++P++`]]
  1814. :N: pass:normal[xref:#P256-N-uint256[`++N++`]]
  1815. :A: pass:normal[xref:#P256-A-uint256[`++A++`]]
  1816. :B: pass:normal[xref:#P256-B-uint256[`++B++`]]
  1817. :verify: pass:normal[xref:#P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-[`++verify++`]]
  1818. :verifyNative: pass:normal[xref:#P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-[`++verifyNative++`]]
  1819. :verifySolidity: pass:normal[xref:#P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-[`++verifySolidity++`]]
  1820. :recovery: pass:normal[xref:#P256-recovery-bytes32-uint8-bytes32-bytes32-[`++recovery++`]]
  1821. :isValidPublicKey: pass:normal[xref:#P256-isValidPublicKey-bytes32-bytes32-[`++isValidPublicKey++`]]
  1822. [.contract]
  1823. [[P256]]
  1824. === `++P256++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/P256.sol[{github-icon},role=heading-link]
  1825. [.hljs-theme-light.nopadding]
  1826. ```solidity
  1827. import "@openzeppelin/contracts/utils/cryptography/P256.sol";
  1828. ```
  1829. Implementation of secp256r1 verification and recovery functions.
  1830. The secp256r1 curve (also known as P256) is a NIST standard curve with wide support in modern devices
  1831. and cryptographic standards. Some notable examples include Apple's Secure Enclave and Android's Keystore
  1832. as well as authentication protocols like FIDO2.
  1833. 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).
  1834. Heavily inspired in https://github.com/maxrobot/elliptic-solidity/blob/c4bb1b6e8ae89534d8db3a6b3a6b52219100520f/contracts/Secp256r1.sol[maxrobot] and
  1835. https://github.com/tdrerup/elliptic-curve-solidity/blob/59a9c25957d4d190eff53b6610731d81a077a15e/contracts/curves/EllipticCurve.sol[tdrerup] implementations.
  1836. _Available since v5.1._
  1837. [.contract-index]
  1838. .Functions
  1839. --
  1840. * {xref-P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-}[`++verify(h, r, s, qx, qy)++`]
  1841. * {xref-P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-}[`++verifyNative(h, r, s, qx, qy)++`]
  1842. * {xref-P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-}[`++verifySolidity(h, r, s, qx, qy)++`]
  1843. * {xref-P256-recovery-bytes32-uint8-bytes32-bytes32-}[`++recovery(h, v, r, s)++`]
  1844. * {xref-P256-isValidPublicKey-bytes32-bytes32-}[`++isValidPublicKey(x, y)++`]
  1845. --
  1846. [.contract-index]
  1847. .Internal Variables
  1848. --
  1849. * {xref-P256-GX-uint256}[`++uint256 constant GX++`]
  1850. * {xref-P256-GY-uint256}[`++uint256 constant GY++`]
  1851. * {xref-P256-P-uint256}[`++uint256 constant P++`]
  1852. * {xref-P256-N-uint256}[`++uint256 constant N++`]
  1853. * {xref-P256-A-uint256}[`++uint256 constant A++`]
  1854. * {xref-P256-B-uint256}[`++uint256 constant B++`]
  1855. --
  1856. [.contract-item]
  1857. [[P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-]]
  1858. ==== `[.contract-item-name]#++verify++#++(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) → bool++` [.item-kind]#internal#
  1859. Verifies a secp256r1 signature using the RIP-7212 precompile and falls back to the Solidity implementation
  1860. if the precompile is not available. This version should work on all chains, but requires the deployment of more
  1861. bytecode.
  1862. [.contract-item]
  1863. [[P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-]]
  1864. ==== `[.contract-item-name]#++verifyNative++#++(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) → bool++` [.item-kind]#internal#
  1865. Same as {verify}, but it will revert if the required precompile is not available.
  1866. Make sure any logic (code or precompile) deployed at that address is the expected one,
  1867. otherwise the returned value may be misinterpreted as a positive boolean.
  1868. [.contract-item]
  1869. [[P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-]]
  1870. ==== `[.contract-item-name]#++verifySolidity++#++(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) → bool++` [.item-kind]#internal#
  1871. Same as {verify}, but only the Solidity implementation is used.
  1872. [.contract-item]
  1873. [[P256-recovery-bytes32-uint8-bytes32-bytes32-]]
  1874. ==== `[.contract-item-name]#++recovery++#++(bytes32 h, uint8 v, bytes32 r, bytes32 s) → bytes32 x, bytes32 y++` [.item-kind]#internal#
  1875. Public key recovery
  1876. [.contract-item]
  1877. [[P256-isValidPublicKey-bytes32-bytes32-]]
  1878. ==== `[.contract-item-name]#++isValidPublicKey++#++(bytes32 x, bytes32 y) → bool result++` [.item-kind]#internal#
  1879. Checks if (x, y) are valid coordinates of a point on the curve.
  1880. In particular this function checks that x < P and y < P.
  1881. [.contract-item]
  1882. [[P256-GX-uint256]]
  1883. ==== `uint256 [.contract-item-name]#++GX++#` [.item-kind]#internal constant#
  1884. Generator (x component)
  1885. [.contract-item]
  1886. [[P256-GY-uint256]]
  1887. ==== `uint256 [.contract-item-name]#++GY++#` [.item-kind]#internal constant#
  1888. Generator (y component)
  1889. [.contract-item]
  1890. [[P256-P-uint256]]
  1891. ==== `uint256 [.contract-item-name]#++P++#` [.item-kind]#internal constant#
  1892. P (size of the field)
  1893. [.contract-item]
  1894. [[P256-N-uint256]]
  1895. ==== `uint256 [.contract-item-name]#++N++#` [.item-kind]#internal constant#
  1896. N (order of G)
  1897. [.contract-item]
  1898. [[P256-A-uint256]]
  1899. ==== `uint256 [.contract-item-name]#++A++#` [.item-kind]#internal constant#
  1900. A parameter of the weierstrass equation
  1901. [.contract-item]
  1902. [[P256-B-uint256]]
  1903. ==== `uint256 [.contract-item-name]#++B++#` [.item-kind]#internal constant#
  1904. B parameter of the weierstrass equation
  1905. :pkcs1Sha256: pass:normal[xref:#RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-[`++pkcs1Sha256++`]]
  1906. :pkcs1Sha256: pass:normal[xref:#RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-[`++pkcs1Sha256++`]]
  1907. [.contract]
  1908. [[RSA]]
  1909. === `++RSA++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/RSA.sol[{github-icon},role=heading-link]
  1910. [.hljs-theme-light.nopadding]
  1911. ```solidity
  1912. import "@openzeppelin/contracts/utils/cryptography/RSA.sol";
  1913. ```
  1914. RSA PKCS#1 v1.5 signature verification implementation according to https://datatracker.ietf.org/doc/html/rfc8017[RFC8017].
  1915. This library supports PKCS#1 v1.5 padding to avoid malleability via chosen plaintext attacks in practical implementations.
  1916. The padding follows the EMSA-PKCS1-v1_5-ENCODE encoding definition as per section 9.2 of the RFC. This padding makes
  1917. RSA semantically secure for signing messages.
  1918. Inspired by https://github.com/adria0/SolRsaVerify/blob/79c6182cabb9102ea69d4a2e996816091d5f1cd1[Adrià Massanet's work] (GNU General Public License v3.0).
  1919. _Available since v5.1._
  1920. [.contract-index]
  1921. .Functions
  1922. --
  1923. * {xref-RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-}[`++pkcs1Sha256(data, s, e, n)++`]
  1924. * {xref-RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-}[`++pkcs1Sha256(digest, s, e, n)++`]
  1925. --
  1926. [.contract-item]
  1927. [[RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-]]
  1928. ==== `[.contract-item-name]#++pkcs1Sha256++#++(bytes data, bytes s, bytes e, bytes n) → bool++` [.item-kind]#internal#
  1929. Same as {pkcs1Sha256} but using SHA256 to calculate the digest of `data`.
  1930. [.contract-item]
  1931. [[RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-]]
  1932. ==== `[.contract-item-name]#++pkcs1Sha256++#++(bytes32 digest, bytes s, bytes e, bytes n) → bool++` [.item-kind]#internal#
  1933. Verifies a PKCSv1.5 signature given a digest according to the verification
  1934. method described in https://datatracker.ietf.org/doc/html/rfc8017#section-8.2.2[section 8.2.2 of RFC8017] with
  1935. support for explicit or implicit NULL parameters in the DigestInfo (no other optional parameters are supported).
  1936. IMPORTANT: For security reason, this function requires the signature and modulus to have a length of at least
  1937. 2048 bits. If you use a smaller key, consider replacing it with a larger, more secure, one.
  1938. WARNING: This verification algorithm doesn't prevent replayability. If called multiple times with the same
  1939. digest, public key and (valid signature), it will return true every time. Consider including an onchain nonce
  1940. or unique identifier in the message to prevent replay attacks.
  1941. WARNING: This verification algorithm supports any exponent. NIST recommends using `65537` (or higher).
  1942. That is the default value many libraries use, such as OpenSSL. Developers may choose to reject public keys
  1943. using a low exponent out of security concerns.
  1944. :constructor: pass:normal[xref:#EIP712-constructor-string-string-[`++constructor++`]]
  1945. :_domainSeparatorV4: pass:normal[xref:#EIP712-_domainSeparatorV4--[`++_domainSeparatorV4++`]]
  1946. :_hashTypedDataV4: pass:normal[xref:#EIP712-_hashTypedDataV4-bytes32-[`++_hashTypedDataV4++`]]
  1947. :eip712Domain: pass:normal[xref:#EIP712-eip712Domain--[`++eip712Domain++`]]
  1948. :_EIP712Name: pass:normal[xref:#EIP712-_EIP712Name--[`++_EIP712Name++`]]
  1949. :_EIP712Version: pass:normal[xref:#EIP712-_EIP712Version--[`++_EIP712Version++`]]
  1950. [.contract]
  1951. [[EIP712]]
  1952. === `++EIP712++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/EIP712.sol[{github-icon},role=heading-link]
  1953. [.hljs-theme-light.nopadding]
  1954. ```solidity
  1955. import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
  1956. ```
  1957. https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.
  1958. The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
  1959. encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
  1960. does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
  1961. produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
  1962. This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
  1963. scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
  1964. ({_hashTypedDataV4}).
  1965. The implementation of the domain separator was designed to be as efficient as possible while still properly updating
  1966. the chain id to protect against replay attacks on an eventual fork of the chain.
  1967. NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
  1968. https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
  1969. NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
  1970. separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
  1971. separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
  1972. [.contract-index]
  1973. .Functions
  1974. --
  1975. * {xref-EIP712-constructor-string-string-}[`++constructor(name, version)++`]
  1976. * {xref-EIP712-_domainSeparatorV4--}[`++_domainSeparatorV4()++`]
  1977. * {xref-EIP712-_hashTypedDataV4-bytes32-}[`++_hashTypedDataV4(structHash)++`]
  1978. * {xref-EIP712-eip712Domain--}[`++eip712Domain()++`]
  1979. * {xref-EIP712-_EIP712Name--}[`++_EIP712Name()++`]
  1980. * {xref-EIP712-_EIP712Version--}[`++_EIP712Version()++`]
  1981. [.contract-subindex-inherited]
  1982. .IERC5267
  1983. --
  1984. [.contract-index]
  1985. .Events
  1986. --
  1987. [.contract-subindex-inherited]
  1988. .IERC5267
  1989. * {xref-IERC5267-EIP712DomainChanged--}[`++EIP712DomainChanged()++`]
  1990. --
  1991. [.contract-item]
  1992. [[EIP712-constructor-string-string-]]
  1993. ==== `[.contract-item-name]#++constructor++#++(string name, string version)++` [.item-kind]#internal#
  1994. Initializes the domain separator and parameter caches.
  1995. The meaning of `name` and `version` is specified in
  1996. https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:
  1997. - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
  1998. - `version`: the current major version of the signing domain.
  1999. NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
  2000. contract upgrade].
  2001. [.contract-item]
  2002. [[EIP712-_domainSeparatorV4--]]
  2003. ==== `[.contract-item-name]#++_domainSeparatorV4++#++() → bytes32++` [.item-kind]#internal#
  2004. Returns the domain separator for the current chain.
  2005. [.contract-item]
  2006. [[EIP712-_hashTypedDataV4-bytes32-]]
  2007. ==== `[.contract-item-name]#++_hashTypedDataV4++#++(bytes32 structHash) → bytes32++` [.item-kind]#internal#
  2008. Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
  2009. function returns the hash of the fully encoded EIP712 message for this domain.
  2010. This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
  2011. ```solidity
  2012. bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
  2013. keccak256("Mail(address to,string contents)"),
  2014. mailTo,
  2015. keccak256(bytes(mailContents))
  2016. )));
  2017. address signer = ECDSA.recover(digest, signature);
  2018. ```
  2019. [.contract-item]
  2020. [[EIP712-eip712Domain--]]
  2021. ==== `[.contract-item-name]#++eip712Domain++#++() → bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions++` [.item-kind]#public#
  2022. See {IERC-5267}.
  2023. [.contract-item]
  2024. [[EIP712-_EIP712Name--]]
  2025. ==== `[.contract-item-name]#++_EIP712Name++#++() → string++` [.item-kind]#internal#
  2026. The name parameter for the EIP712 domain.
  2027. NOTE: By default this function reads _name which is an immutable value.
  2028. It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
  2029. [.contract-item]
  2030. [[EIP712-_EIP712Version--]]
  2031. ==== `[.contract-item-name]#++_EIP712Version++#++() → string++` [.item-kind]#internal#
  2032. The version parameter for the EIP712 domain.
  2033. NOTE: By default this function reads _version which is an immutable value.
  2034. It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
  2035. :toEthSignedMessageHash: pass:normal[xref:#MessageHashUtils-toEthSignedMessageHash-bytes32-[`++toEthSignedMessageHash++`]]
  2036. :toEthSignedMessageHash: pass:normal[xref:#MessageHashUtils-toEthSignedMessageHash-bytes-[`++toEthSignedMessageHash++`]]
  2037. :toDataWithIntendedValidatorHash: pass:normal[xref:#MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-[`++toDataWithIntendedValidatorHash++`]]
  2038. :toTypedDataHash: pass:normal[xref:#MessageHashUtils-toTypedDataHash-bytes32-bytes32-[`++toTypedDataHash++`]]
  2039. [.contract]
  2040. [[MessageHashUtils]]
  2041. === `++MessageHashUtils++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/MessageHashUtils.sol[{github-icon},role=heading-link]
  2042. [.hljs-theme-light.nopadding]
  2043. ```solidity
  2044. import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
  2045. ```
  2046. Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
  2047. The library provides methods for generating a hash of a message that conforms to the
  2048. https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
  2049. specifications.
  2050. [.contract-index]
  2051. .Functions
  2052. --
  2053. * {xref-MessageHashUtils-toEthSignedMessageHash-bytes32-}[`++toEthSignedMessageHash(messageHash)++`]
  2054. * {xref-MessageHashUtils-toEthSignedMessageHash-bytes-}[`++toEthSignedMessageHash(message)++`]
  2055. * {xref-MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-}[`++toDataWithIntendedValidatorHash(validator, data)++`]
  2056. * {xref-MessageHashUtils-toTypedDataHash-bytes32-bytes32-}[`++toTypedDataHash(domainSeparator, structHash)++`]
  2057. --
  2058. [.contract-item]
  2059. [[MessageHashUtils-toEthSignedMessageHash-bytes32-]]
  2060. ==== `[.contract-item-name]#++toEthSignedMessageHash++#++(bytes32 messageHash) → bytes32 digest++` [.item-kind]#internal#
  2061. Returns the keccak256 digest of an ERC-191 signed data with version
  2062. `0x45` (`personal_sign` messages).
  2063. The digest is calculated by prefixing a bytes32 `messageHash` with
  2064. `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
  2065. hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
  2066. NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
  2067. keccak256, although any bytes32 value can be safely used because the final digest will
  2068. be re-hashed.
  2069. See {ECDSA-recover}.
  2070. [.contract-item]
  2071. [[MessageHashUtils-toEthSignedMessageHash-bytes-]]
  2072. ==== `[.contract-item-name]#++toEthSignedMessageHash++#++(bytes message) → bytes32++` [.item-kind]#internal#
  2073. Returns the keccak256 digest of an ERC-191 signed data with version
  2074. `0x45` (`personal_sign` messages).
  2075. The digest is calculated by prefixing an arbitrary `message` with
  2076. `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
  2077. hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
  2078. See {ECDSA-recover}.
  2079. [.contract-item]
  2080. [[MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-]]
  2081. ==== `[.contract-item-name]#++toDataWithIntendedValidatorHash++#++(address validator, bytes data) → bytes32++` [.item-kind]#internal#
  2082. Returns the keccak256 digest of an ERC-191 signed data with version
  2083. `0x00` (data with intended validator).
  2084. The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
  2085. `validator` address. Then hashing the result.
  2086. See {ECDSA-recover}.
  2087. [.contract-item]
  2088. [[MessageHashUtils-toTypedDataHash-bytes32-bytes32-]]
  2089. ==== `[.contract-item-name]#++toTypedDataHash++#++(bytes32 domainSeparator, bytes32 structHash) → bytes32 digest++` [.item-kind]#internal#
  2090. Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).
  2091. The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
  2092. `\x19\x01` and hashing the result. It corresponds to the hash signed by the
  2093. https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
  2094. See {ECDSA-recover}.
  2095. :isValidSignatureNow: pass:normal[xref:#SignatureChecker-isValidSignatureNow-address-bytes32-bytes-[`++isValidSignatureNow++`]]
  2096. :isValidERC1271SignatureNow: pass:normal[xref:#SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-[`++isValidERC1271SignatureNow++`]]
  2097. [.contract]
  2098. [[SignatureChecker]]
  2099. === `++SignatureChecker++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/SignatureChecker.sol[{github-icon},role=heading-link]
  2100. [.hljs-theme-light.nopadding]
  2101. ```solidity
  2102. import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
  2103. ```
  2104. Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
  2105. signatures from externally owned accounts (EOAs) as well as ERC-1271 signatures from smart contract wallets like
  2106. Argent and Safe Wallet (previously Gnosis Safe).
  2107. [.contract-index]
  2108. .Functions
  2109. --
  2110. * {xref-SignatureChecker-isValidSignatureNow-address-bytes32-bytes-}[`++isValidSignatureNow(signer, hash, signature)++`]
  2111. * {xref-SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-}[`++isValidERC1271SignatureNow(signer, hash, signature)++`]
  2112. --
  2113. [.contract-item]
  2114. [[SignatureChecker-isValidSignatureNow-address-bytes32-bytes-]]
  2115. ==== `[.contract-item-name]#++isValidSignatureNow++#++(address signer, bytes32 hash, bytes signature) → bool++` [.item-kind]#internal#
  2116. Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
  2117. signature is validated against that smart contract using ERC-1271, otherwise it's validated using `ECDSA.recover`.
  2118. NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
  2119. change through time. It could return true at block N and false at block N+1 (or the opposite).
  2120. [.contract-item]
  2121. [[SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-]]
  2122. ==== `[.contract-item-name]#++isValidERC1271SignatureNow++#++(address signer, bytes32 hash, bytes signature) → bool++` [.item-kind]#internal#
  2123. Checks if a signature is valid for a given signer and data hash. The signature is validated
  2124. against the signer smart contract using ERC-1271.
  2125. NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
  2126. change through time. It could return true at block N and false at block N+1 (or the opposite).
  2127. :commutativeKeccak256: pass:normal[xref:#Hashes-commutativeKeccak256-bytes32-bytes32-[`++commutativeKeccak256++`]]
  2128. [.contract]
  2129. [[Hashes]]
  2130. === `++Hashes++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/Hashes.sol[{github-icon},role=heading-link]
  2131. [.hljs-theme-light.nopadding]
  2132. ```solidity
  2133. import "@openzeppelin/contracts/utils/cryptography/Hashes.sol";
  2134. ```
  2135. Library of standard hash functions.
  2136. _Available since v5.1._
  2137. [.contract-index]
  2138. .Functions
  2139. --
  2140. * {xref-Hashes-commutativeKeccak256-bytes32-bytes32-}[`++commutativeKeccak256(a, b)++`]
  2141. --
  2142. [.contract-item]
  2143. [[Hashes-commutativeKeccak256-bytes32-bytes32-]]
  2144. ==== `[.contract-item-name]#++commutativeKeccak256++#++(bytes32 a, bytes32 b) → bytes32++` [.item-kind]#internal#
  2145. Commutative Keccak256 hash of a sorted pair of bytes32. Frequently used when working with merkle proofs.
  2146. NOTE: Equivalent to the `standardNodeHash` in our https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
  2147. :MerkleProofInvalidMultiproof: pass:normal[xref:#MerkleProof-MerkleProofInvalidMultiproof--[`++MerkleProofInvalidMultiproof++`]]
  2148. :verify: pass:normal[xref:#MerkleProof-verify-bytes32---bytes32-bytes32-[`++verify++`]]
  2149. :processProof: pass:normal[xref:#MerkleProof-processProof-bytes32---bytes32-[`++processProof++`]]
  2150. :verify: pass:normal[xref:#MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++verify++`]]
  2151. :processProof: pass:normal[xref:#MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++processProof++`]]
  2152. :verifyCalldata: pass:normal[xref:#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-[`++verifyCalldata++`]]
  2153. :processProofCalldata: pass:normal[xref:#MerkleProof-processProofCalldata-bytes32---bytes32-[`++processProofCalldata++`]]
  2154. :verifyCalldata: pass:normal[xref:#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++verifyCalldata++`]]
  2155. :processProofCalldata: pass:normal[xref:#MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++processProofCalldata++`]]
  2156. :multiProofVerify: pass:normal[xref:#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---[`++multiProofVerify++`]]
  2157. :processMultiProof: pass:normal[xref:#MerkleProof-processMultiProof-bytes32---bool---bytes32---[`++processMultiProof++`]]
  2158. :multiProofVerify: pass:normal[xref:#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++multiProofVerify++`]]
  2159. :processMultiProof: pass:normal[xref:#MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++processMultiProof++`]]
  2160. :multiProofVerifyCalldata: pass:normal[xref:#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---[`++multiProofVerifyCalldata++`]]
  2161. :processMultiProofCalldata: pass:normal[xref:#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---[`++processMultiProofCalldata++`]]
  2162. :multiProofVerifyCalldata: pass:normal[xref:#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++multiProofVerifyCalldata++`]]
  2163. :processMultiProofCalldata: pass:normal[xref:#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++processMultiProofCalldata++`]]
  2164. [.contract]
  2165. [[MerkleProof]]
  2166. === `++MerkleProof++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/MerkleProof.sol[{github-icon},role=heading-link]
  2167. [.hljs-theme-light.nopadding]
  2168. ```solidity
  2169. import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
  2170. ```
  2171. These functions deal with verification of Merkle Tree proofs.
  2172. The tree and the proofs can be generated using our
  2173. https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
  2174. You will find a quickstart guide in the readme.
  2175. WARNING: You should avoid using leaf values that are 64 bytes long prior to
  2176. hashing, or use a hash function other than keccak256 for hashing leaves.
  2177. This is because the concatenation of a sorted pair of internal nodes in
  2178. the Merkle tree could be reinterpreted as a leaf value.
  2179. OpenZeppelin's JavaScript library generates Merkle trees that are safe
  2180. against this attack out of the box.
  2181. IMPORTANT: Consider memory side-effects when using custom hashing functions
  2182. that access memory in an unsafe way.
  2183. NOTE: This library supports proof verification for merkle trees built using
  2184. custom _commutative_ hashing functions (i.e. `H(a, b) == H(b, a)`). Proving
  2185. leaf inclusion in trees built using non-commutative hashing functions requires
  2186. additional logic that is not supported by this library.
  2187. [.contract-index]
  2188. .Functions
  2189. --
  2190. * {xref-MerkleProof-verify-bytes32---bytes32-bytes32-}[`++verify(proof, root, leaf)++`]
  2191. * {xref-MerkleProof-processProof-bytes32---bytes32-}[`++processProof(proof, leaf)++`]
  2192. * {xref-MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++verify(proof, root, leaf, hasher)++`]
  2193. * {xref-MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++processProof(proof, leaf, hasher)++`]
  2194. * {xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-}[`++verifyCalldata(proof, root, leaf)++`]
  2195. * {xref-MerkleProof-processProofCalldata-bytes32---bytes32-}[`++processProofCalldata(proof, leaf)++`]
  2196. * {xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++verifyCalldata(proof, root, leaf, hasher)++`]
  2197. * {xref-MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++processProofCalldata(proof, leaf, hasher)++`]
  2198. * {xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---}[`++multiProofVerify(proof, proofFlags, root, leaves)++`]
  2199. * {xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---}[`++processMultiProof(proof, proofFlags, leaves)++`]
  2200. * {xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++multiProofVerify(proof, proofFlags, root, leaves, hasher)++`]
  2201. * {xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++processMultiProof(proof, proofFlags, leaves, hasher)++`]
  2202. * {xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---}[`++multiProofVerifyCalldata(proof, proofFlags, root, leaves)++`]
  2203. * {xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---}[`++processMultiProofCalldata(proof, proofFlags, leaves)++`]
  2204. * {xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++multiProofVerifyCalldata(proof, proofFlags, root, leaves, hasher)++`]
  2205. * {xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++processMultiProofCalldata(proof, proofFlags, leaves, hasher)++`]
  2206. --
  2207. [.contract-index]
  2208. .Errors
  2209. --
  2210. * {xref-MerkleProof-MerkleProofInvalidMultiproof--}[`++MerkleProofInvalidMultiproof()++`]
  2211. --
  2212. [.contract-item]
  2213. [[MerkleProof-verify-bytes32---bytes32-bytes32-]]
  2214. ==== `[.contract-item-name]#++verify++#++(bytes32[] proof, bytes32 root, bytes32 leaf) → bool++` [.item-kind]#internal#
  2215. Returns true if a `leaf` can be proved to be a part of a Merkle tree
  2216. defined by `root`. For this, a `proof` must be provided, containing
  2217. sibling hashes on the branch from the leaf to the root of the tree. Each
  2218. pair of leaves and each pair of pre-images are assumed to be sorted.
  2219. This version handles proofs in memory with the default hashing function.
  2220. [.contract-item]
  2221. [[MerkleProof-processProof-bytes32---bytes32-]]
  2222. ==== `[.contract-item-name]#++processProof++#++(bytes32[] proof, bytes32 leaf) → bytes32++` [.item-kind]#internal#
  2223. Returns the rebuilt hash obtained by traversing a Merkle tree up
  2224. from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
  2225. hash matches the root of the tree. When processing the proof, the pairs
  2226. of leaves & pre-images are assumed to be sorted.
  2227. This version handles proofs in memory with the default hashing function.
  2228. [.contract-item]
  2229. [[MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  2230. ==== `[.contract-item-name]#++verify++#++(bytes32[] proof, bytes32 root, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) → bool++` [.item-kind]#internal#
  2231. Returns true if a `leaf` can be proved to be a part of a Merkle tree
  2232. defined by `root`. For this, a `proof` must be provided, containing
  2233. sibling hashes on the branch from the leaf to the root of the tree. Each
  2234. pair of leaves and each pair of pre-images are assumed to be sorted.
  2235. This version handles proofs in memory with a custom hashing function.
  2236. [.contract-item]
  2237. [[MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  2238. ==== `[.contract-item-name]#++processProof++#++(bytes32[] proof, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) → bytes32++` [.item-kind]#internal#
  2239. Returns the rebuilt hash obtained by traversing a Merkle tree up
  2240. from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
  2241. hash matches the root of the tree. When processing the proof, the pairs
  2242. of leaves & pre-images are assumed to be sorted.
  2243. This version handles proofs in memory with a custom hashing function.
  2244. [.contract-item]
  2245. [[MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-]]
  2246. ==== `[.contract-item-name]#++verifyCalldata++#++(bytes32[] proof, bytes32 root, bytes32 leaf) → bool++` [.item-kind]#internal#
  2247. Returns true if a `leaf` can be proved to be a part of a Merkle tree
  2248. defined by `root`. For this, a `proof` must be provided, containing
  2249. sibling hashes on the branch from the leaf to the root of the tree. Each
  2250. pair of leaves and each pair of pre-images are assumed to be sorted.
  2251. This version handles proofs in calldata with the default hashing function.
  2252. [.contract-item]
  2253. [[MerkleProof-processProofCalldata-bytes32---bytes32-]]
  2254. ==== `[.contract-item-name]#++processProofCalldata++#++(bytes32[] proof, bytes32 leaf) → bytes32++` [.item-kind]#internal#
  2255. Returns the rebuilt hash obtained by traversing a Merkle tree up
  2256. from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
  2257. hash matches the root of the tree. When processing the proof, the pairs
  2258. of leaves & pre-images are assumed to be sorted.
  2259. This version handles proofs in calldata with the default hashing function.
  2260. [.contract-item]
  2261. [[MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  2262. ==== `[.contract-item-name]#++verifyCalldata++#++(bytes32[] proof, bytes32 root, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) → bool++` [.item-kind]#internal#
  2263. Returns true if a `leaf` can be proved to be a part of a Merkle tree
  2264. defined by `root`. For this, a `proof` must be provided, containing
  2265. sibling hashes on the branch from the leaf to the root of the tree. Each
  2266. pair of leaves and each pair of pre-images are assumed to be sorted.
  2267. This version handles proofs in calldata with a custom hashing function.
  2268. [.contract-item]
  2269. [[MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  2270. ==== `[.contract-item-name]#++processProofCalldata++#++(bytes32[] proof, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) → bytes32++` [.item-kind]#internal#
  2271. Returns the rebuilt hash obtained by traversing a Merkle tree up
  2272. from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
  2273. hash matches the root of the tree. When processing the proof, the pairs
  2274. of leaves & pre-images are assumed to be sorted.
  2275. This version handles proofs in calldata with a custom hashing function.
  2276. [.contract-item]
  2277. [[MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---]]
  2278. ==== `[.contract-item-name]#++multiProofVerify++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves) → bool++` [.item-kind]#internal#
  2279. Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
  2280. `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
  2281. This version handles multiproofs in memory with the default hashing function.
  2282. CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
  2283. NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
  2284. The `leaves` must be validated independently. See {processMultiProof}.
  2285. [.contract-item]
  2286. [[MerkleProof-processMultiProof-bytes32---bool---bytes32---]]
  2287. ==== `[.contract-item-name]#++processMultiProof++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves) → bytes32 merkleRoot++` [.item-kind]#internal#
  2288. Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
  2289. proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
  2290. leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
  2291. respectively.
  2292. This version handles multiproofs in memory with the default hashing function.
  2293. CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
  2294. is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
  2295. tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
  2296. NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
  2297. and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
  2298. validating the leaves elsewhere.
  2299. [.contract-item]
  2300. [[MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
  2301. ==== `[.contract-item-name]#++multiProofVerify++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) → bool++` [.item-kind]#internal#
  2302. Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
  2303. `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
  2304. This version handles multiproofs in memory with a custom hashing function.
  2305. CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
  2306. NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
  2307. The `leaves` must be validated independently. See {processMultiProof}.
  2308. [.contract-item]
  2309. [[MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
  2310. ==== `[.contract-item-name]#++processMultiProof++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) → bytes32 merkleRoot++` [.item-kind]#internal#
  2311. Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
  2312. proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
  2313. leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
  2314. respectively.
  2315. This version handles multiproofs in memory with a custom hashing function.
  2316. CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
  2317. is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
  2318. tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
  2319. NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
  2320. and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
  2321. validating the leaves elsewhere.
  2322. [.contract-item]
  2323. [[MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---]]
  2324. ==== `[.contract-item-name]#++multiProofVerifyCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves) → bool++` [.item-kind]#internal#
  2325. Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
  2326. `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
  2327. This version handles multiproofs in calldata with the default hashing function.
  2328. CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
  2329. NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
  2330. The `leaves` must be validated independently. See {processMultiProofCalldata}.
  2331. [.contract-item]
  2332. [[MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---]]
  2333. ==== `[.contract-item-name]#++processMultiProofCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves) → bytes32 merkleRoot++` [.item-kind]#internal#
  2334. Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
  2335. proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
  2336. leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
  2337. respectively.
  2338. This version handles multiproofs in calldata with the default hashing function.
  2339. CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
  2340. is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
  2341. tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
  2342. NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
  2343. and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
  2344. validating the leaves elsewhere.
  2345. [.contract-item]
  2346. [[MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
  2347. ==== `[.contract-item-name]#++multiProofVerifyCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) → bool++` [.item-kind]#internal#
  2348. Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
  2349. `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
  2350. This version handles multiproofs in calldata with a custom hashing function.
  2351. CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
  2352. NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
  2353. The `leaves` must be validated independently. See {processMultiProofCalldata}.
  2354. [.contract-item]
  2355. [[MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
  2356. ==== `[.contract-item-name]#++processMultiProofCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) → bytes32 merkleRoot++` [.item-kind]#internal#
  2357. Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
  2358. proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
  2359. leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
  2360. respectively.
  2361. This version handles multiproofs in calldata with a custom hashing function.
  2362. CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
  2363. is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
  2364. tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
  2365. NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
  2366. and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
  2367. validating the leaves elsewhere.
  2368. [.contract-item]
  2369. [[MerkleProof-MerkleProofInvalidMultiproof--]]
  2370. ==== `[.contract-item-name]#++MerkleProofInvalidMultiproof++#++()++` [.item-kind]#error#
  2371. The multiproof provided is not valid.
  2372. == Security
  2373. :ReentrancyGuardReentrantCall: pass:normal[xref:#ReentrancyGuard-ReentrancyGuardReentrantCall--[`++ReentrancyGuardReentrantCall++`]]
  2374. :constructor: pass:normal[xref:#ReentrancyGuard-constructor--[`++constructor++`]]
  2375. :nonReentrant: pass:normal[xref:#ReentrancyGuard-nonReentrant--[`++nonReentrant++`]]
  2376. :_reentrancyGuardEntered: pass:normal[xref:#ReentrancyGuard-_reentrancyGuardEntered--[`++_reentrancyGuardEntered++`]]
  2377. [.contract]
  2378. [[ReentrancyGuard]]
  2379. === `++ReentrancyGuard++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/ReentrancyGuard.sol[{github-icon},role=heading-link]
  2380. [.hljs-theme-light.nopadding]
  2381. ```solidity
  2382. import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
  2383. ```
  2384. Contract module that helps prevent reentrant calls to a function.
  2385. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
  2386. available, which can be applied to functions to make sure there are no nested
  2387. (reentrant) calls to them.
  2388. Note that because there is a single `nonReentrant` guard, functions marked as
  2389. `nonReentrant` may not call one another. This can be worked around by making
  2390. those functions `private`, and then adding `external` `nonReentrant` entry
  2391. points to them.
  2392. TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
  2393. consider using {ReentrancyGuardTransient} instead.
  2394. TIP: If you would like to learn more about reentrancy and alternative ways
  2395. to protect against it, check out our blog post
  2396. https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
  2397. [.contract-index]
  2398. .Modifiers
  2399. --
  2400. * {xref-ReentrancyGuard-nonReentrant--}[`++nonReentrant()++`]
  2401. --
  2402. [.contract-index]
  2403. .Functions
  2404. --
  2405. * {xref-ReentrancyGuard-constructor--}[`++constructor()++`]
  2406. * {xref-ReentrancyGuard-_reentrancyGuardEntered--}[`++_reentrancyGuardEntered()++`]
  2407. --
  2408. [.contract-index]
  2409. .Errors
  2410. --
  2411. * {xref-ReentrancyGuard-ReentrancyGuardReentrantCall--}[`++ReentrancyGuardReentrantCall()++`]
  2412. --
  2413. [.contract-item]
  2414. [[ReentrancyGuard-nonReentrant--]]
  2415. ==== `[.contract-item-name]#++nonReentrant++#++()++` [.item-kind]#modifier#
  2416. Prevents a contract from calling itself, directly or indirectly.
  2417. Calling a `nonReentrant` function from another `nonReentrant`
  2418. function is not supported. It is possible to prevent this from happening
  2419. by making the `nonReentrant` function external, and making it call a
  2420. `private` function that does the actual work.
  2421. [.contract-item]
  2422. [[ReentrancyGuard-constructor--]]
  2423. ==== `[.contract-item-name]#++constructor++#++()++` [.item-kind]#internal#
  2424. [.contract-item]
  2425. [[ReentrancyGuard-_reentrancyGuardEntered--]]
  2426. ==== `[.contract-item-name]#++_reentrancyGuardEntered++#++() → bool++` [.item-kind]#internal#
  2427. Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
  2428. `nonReentrant` function in the call stack.
  2429. [.contract-item]
  2430. [[ReentrancyGuard-ReentrancyGuardReentrantCall--]]
  2431. ==== `[.contract-item-name]#++ReentrancyGuardReentrantCall++#++()++` [.item-kind]#error#
  2432. Unauthorized reentrant call.
  2433. :ReentrancyGuardReentrantCall: pass:normal[xref:#ReentrancyGuardTransient-ReentrancyGuardReentrantCall--[`++ReentrancyGuardReentrantCall++`]]
  2434. :nonReentrant: pass:normal[xref:#ReentrancyGuardTransient-nonReentrant--[`++nonReentrant++`]]
  2435. :_reentrancyGuardEntered: pass:normal[xref:#ReentrancyGuardTransient-_reentrancyGuardEntered--[`++_reentrancyGuardEntered++`]]
  2436. [.contract]
  2437. [[ReentrancyGuardTransient]]
  2438. === `++ReentrancyGuardTransient++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/ReentrancyGuardTransient.sol[{github-icon},role=heading-link]
  2439. [.hljs-theme-light.nopadding]
  2440. ```solidity
  2441. import "@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol";
  2442. ```
  2443. Variant of {ReentrancyGuard} that uses transient storage.
  2444. NOTE: This variant only works on networks where EIP-1153 is available.
  2445. _Available since v5.1._
  2446. [.contract-index]
  2447. .Modifiers
  2448. --
  2449. * {xref-ReentrancyGuardTransient-nonReentrant--}[`++nonReentrant()++`]
  2450. --
  2451. [.contract-index]
  2452. .Functions
  2453. --
  2454. * {xref-ReentrancyGuardTransient-_reentrancyGuardEntered--}[`++_reentrancyGuardEntered()++`]
  2455. --
  2456. [.contract-index]
  2457. .Errors
  2458. --
  2459. * {xref-ReentrancyGuardTransient-ReentrancyGuardReentrantCall--}[`++ReentrancyGuardReentrantCall()++`]
  2460. --
  2461. [.contract-item]
  2462. [[ReentrancyGuardTransient-nonReentrant--]]
  2463. ==== `[.contract-item-name]#++nonReentrant++#++()++` [.item-kind]#modifier#
  2464. Prevents a contract from calling itself, directly or indirectly.
  2465. Calling a `nonReentrant` function from another `nonReentrant`
  2466. function is not supported. It is possible to prevent this from happening
  2467. by making the `nonReentrant` function external, and making it call a
  2468. `private` function that does the actual work.
  2469. [.contract-item]
  2470. [[ReentrancyGuardTransient-_reentrancyGuardEntered--]]
  2471. ==== `[.contract-item-name]#++_reentrancyGuardEntered++#++() → bool++` [.item-kind]#internal#
  2472. Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
  2473. `nonReentrant` function in the call stack.
  2474. [.contract-item]
  2475. [[ReentrancyGuardTransient-ReentrancyGuardReentrantCall--]]
  2476. ==== `[.contract-item-name]#++ReentrancyGuardReentrantCall++#++()++` [.item-kind]#error#
  2477. Unauthorized reentrant call.
  2478. :Paused: pass:normal[xref:#Pausable-Paused-address-[`++Paused++`]]
  2479. :Unpaused: pass:normal[xref:#Pausable-Unpaused-address-[`++Unpaused++`]]
  2480. :EnforcedPause: pass:normal[xref:#Pausable-EnforcedPause--[`++EnforcedPause++`]]
  2481. :ExpectedPause: pass:normal[xref:#Pausable-ExpectedPause--[`++ExpectedPause++`]]
  2482. :constructor: pass:normal[xref:#Pausable-constructor--[`++constructor++`]]
  2483. :whenNotPaused: pass:normal[xref:#Pausable-whenNotPaused--[`++whenNotPaused++`]]
  2484. :whenPaused: pass:normal[xref:#Pausable-whenPaused--[`++whenPaused++`]]
  2485. :paused: pass:normal[xref:#Pausable-paused--[`++paused++`]]
  2486. :_requireNotPaused: pass:normal[xref:#Pausable-_requireNotPaused--[`++_requireNotPaused++`]]
  2487. :_requirePaused: pass:normal[xref:#Pausable-_requirePaused--[`++_requirePaused++`]]
  2488. :_pause: pass:normal[xref:#Pausable-_pause--[`++_pause++`]]
  2489. :_unpause: pass:normal[xref:#Pausable-_unpause--[`++_unpause++`]]
  2490. [.contract]
  2491. [[Pausable]]
  2492. === `++Pausable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Pausable.sol[{github-icon},role=heading-link]
  2493. [.hljs-theme-light.nopadding]
  2494. ```solidity
  2495. import "@openzeppelin/contracts/utils/Pausable.sol";
  2496. ```
  2497. Contract module which allows children to implement an emergency stop
  2498. mechanism that can be triggered by an authorized account.
  2499. This module is used through inheritance. It will make available the
  2500. modifiers `whenNotPaused` and `whenPaused`, which can be applied to
  2501. the functions of your contract. Note that they will not be pausable by
  2502. simply including this module, only once the modifiers are put in place.
  2503. [.contract-index]
  2504. .Modifiers
  2505. --
  2506. * {xref-Pausable-whenNotPaused--}[`++whenNotPaused()++`]
  2507. * {xref-Pausable-whenPaused--}[`++whenPaused()++`]
  2508. --
  2509. [.contract-index]
  2510. .Functions
  2511. --
  2512. * {xref-Pausable-constructor--}[`++constructor()++`]
  2513. * {xref-Pausable-paused--}[`++paused()++`]
  2514. * {xref-Pausable-_requireNotPaused--}[`++_requireNotPaused()++`]
  2515. * {xref-Pausable-_requirePaused--}[`++_requirePaused()++`]
  2516. * {xref-Pausable-_pause--}[`++_pause()++`]
  2517. * {xref-Pausable-_unpause--}[`++_unpause()++`]
  2518. --
  2519. [.contract-index]
  2520. .Events
  2521. --
  2522. * {xref-Pausable-Paused-address-}[`++Paused(account)++`]
  2523. * {xref-Pausable-Unpaused-address-}[`++Unpaused(account)++`]
  2524. --
  2525. [.contract-index]
  2526. .Errors
  2527. --
  2528. * {xref-Pausable-EnforcedPause--}[`++EnforcedPause()++`]
  2529. * {xref-Pausable-ExpectedPause--}[`++ExpectedPause()++`]
  2530. --
  2531. [.contract-item]
  2532. [[Pausable-whenNotPaused--]]
  2533. ==== `[.contract-item-name]#++whenNotPaused++#++()++` [.item-kind]#modifier#
  2534. Modifier to make a function callable only when the contract is not paused.
  2535. Requirements:
  2536. - The contract must not be paused.
  2537. [.contract-item]
  2538. [[Pausable-whenPaused--]]
  2539. ==== `[.contract-item-name]#++whenPaused++#++()++` [.item-kind]#modifier#
  2540. Modifier to make a function callable only when the contract is paused.
  2541. Requirements:
  2542. - The contract must be paused.
  2543. [.contract-item]
  2544. [[Pausable-constructor--]]
  2545. ==== `[.contract-item-name]#++constructor++#++()++` [.item-kind]#internal#
  2546. Initializes the contract in unpaused state.
  2547. [.contract-item]
  2548. [[Pausable-paused--]]
  2549. ==== `[.contract-item-name]#++paused++#++() → bool++` [.item-kind]#public#
  2550. Returns true if the contract is paused, and false otherwise.
  2551. [.contract-item]
  2552. [[Pausable-_requireNotPaused--]]
  2553. ==== `[.contract-item-name]#++_requireNotPaused++#++()++` [.item-kind]#internal#
  2554. Throws if the contract is paused.
  2555. [.contract-item]
  2556. [[Pausable-_requirePaused--]]
  2557. ==== `[.contract-item-name]#++_requirePaused++#++()++` [.item-kind]#internal#
  2558. Throws if the contract is not paused.
  2559. [.contract-item]
  2560. [[Pausable-_pause--]]
  2561. ==== `[.contract-item-name]#++_pause++#++()++` [.item-kind]#internal#
  2562. Triggers stopped state.
  2563. Requirements:
  2564. - The contract must not be paused.
  2565. [.contract-item]
  2566. [[Pausable-_unpause--]]
  2567. ==== `[.contract-item-name]#++_unpause++#++()++` [.item-kind]#internal#
  2568. Returns to normal state.
  2569. Requirements:
  2570. - The contract must be paused.
  2571. [.contract-item]
  2572. [[Pausable-Paused-address-]]
  2573. ==== `[.contract-item-name]#++Paused++#++(address account)++` [.item-kind]#event#
  2574. Emitted when the pause is triggered by `account`.
  2575. [.contract-item]
  2576. [[Pausable-Unpaused-address-]]
  2577. ==== `[.contract-item-name]#++Unpaused++#++(address account)++` [.item-kind]#event#
  2578. Emitted when the pause is lifted by `account`.
  2579. [.contract-item]
  2580. [[Pausable-EnforcedPause--]]
  2581. ==== `[.contract-item-name]#++EnforcedPause++#++()++` [.item-kind]#error#
  2582. The operation failed because the contract is paused.
  2583. [.contract-item]
  2584. [[Pausable-ExpectedPause--]]
  2585. ==== `[.contract-item-name]#++ExpectedPause++#++()++` [.item-kind]#error#
  2586. The operation failed because the contract is not paused.
  2587. :InvalidAccountNonce: pass:normal[xref:#Nonces-InvalidAccountNonce-address-uint256-[`++InvalidAccountNonce++`]]
  2588. :nonces: pass:normal[xref:#Nonces-nonces-address-[`++nonces++`]]
  2589. :_useNonce: pass:normal[xref:#Nonces-_useNonce-address-[`++_useNonce++`]]
  2590. :_useCheckedNonce: pass:normal[xref:#Nonces-_useCheckedNonce-address-uint256-[`++_useCheckedNonce++`]]
  2591. [.contract]
  2592. [[Nonces]]
  2593. === `++Nonces++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Nonces.sol[{github-icon},role=heading-link]
  2594. [.hljs-theme-light.nopadding]
  2595. ```solidity
  2596. import "@openzeppelin/contracts/utils/Nonces.sol";
  2597. ```
  2598. Provides tracking nonces for addresses. Nonces will only increment.
  2599. [.contract-index]
  2600. .Functions
  2601. --
  2602. * {xref-Nonces-nonces-address-}[`++nonces(owner)++`]
  2603. * {xref-Nonces-_useNonce-address-}[`++_useNonce(owner)++`]
  2604. * {xref-Nonces-_useCheckedNonce-address-uint256-}[`++_useCheckedNonce(owner, nonce)++`]
  2605. --
  2606. [.contract-index]
  2607. .Errors
  2608. --
  2609. * {xref-Nonces-InvalidAccountNonce-address-uint256-}[`++InvalidAccountNonce(account, currentNonce)++`]
  2610. --
  2611. [.contract-item]
  2612. [[Nonces-nonces-address-]]
  2613. ==== `[.contract-item-name]#++nonces++#++(address owner) → uint256++` [.item-kind]#public#
  2614. Returns the next unused nonce for an address.
  2615. [.contract-item]
  2616. [[Nonces-_useNonce-address-]]
  2617. ==== `[.contract-item-name]#++_useNonce++#++(address owner) → uint256++` [.item-kind]#internal#
  2618. Consumes a nonce.
  2619. Returns the current value and increments nonce.
  2620. [.contract-item]
  2621. [[Nonces-_useCheckedNonce-address-uint256-]]
  2622. ==== `[.contract-item-name]#++_useCheckedNonce++#++(address owner, uint256 nonce)++` [.item-kind]#internal#
  2623. Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
  2624. [.contract-item]
  2625. [[Nonces-InvalidAccountNonce-address-uint256-]]
  2626. ==== `[.contract-item-name]#++InvalidAccountNonce++#++(address account, uint256 currentNonce)++` [.item-kind]#error#
  2627. The nonce used for an `account` is not the expected current nonce.
  2628. == Introspection
  2629. 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_.
  2630. 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.
  2631. :supportsInterface: pass:normal[xref:#IERC165-supportsInterface-bytes4-[`++supportsInterface++`]]
  2632. [.contract]
  2633. [[IERC165]]
  2634. === `++IERC165++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/introspection/IERC165.sol[{github-icon},role=heading-link]
  2635. [.hljs-theme-light.nopadding]
  2636. ```solidity
  2637. import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
  2638. ```
  2639. Interface of the ERC-165 standard, as defined in the
  2640. https://eips.ethereum.org/EIPS/eip-165[ERC].
  2641. Implementers can declare support of contract interfaces, which can then be
  2642. queried by others ({ERC165Checker}).
  2643. For an implementation, see {ERC165}.
  2644. [.contract-index]
  2645. .Functions
  2646. --
  2647. * {xref-IERC165-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  2648. --
  2649. [.contract-item]
  2650. [[IERC165-supportsInterface-bytes4-]]
  2651. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#external#
  2652. Returns true if this contract implements the interface defined by
  2653. `interfaceId`. See the corresponding
  2654. https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
  2655. to learn more about how these ids are created.
  2656. This function call must use less than 30 000 gas.
  2657. :supportsInterface: pass:normal[xref:#ERC165-supportsInterface-bytes4-[`++supportsInterface++`]]
  2658. [.contract]
  2659. [[ERC165]]
  2660. === `++ERC165++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/introspection/ERC165.sol[{github-icon},role=heading-link]
  2661. [.hljs-theme-light.nopadding]
  2662. ```solidity
  2663. import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
  2664. ```
  2665. Implementation of the {IERC165} interface.
  2666. Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
  2667. for the additional interface id that will be supported. For example:
  2668. ```solidity
  2669. function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
  2670. return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
  2671. }
  2672. ```
  2673. [.contract-index]
  2674. .Functions
  2675. --
  2676. * {xref-ERC165-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  2677. [.contract-subindex-inherited]
  2678. .IERC165
  2679. --
  2680. [.contract-item]
  2681. [[ERC165-supportsInterface-bytes4-]]
  2682. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#public#
  2683. See {IERC165-supportsInterface}.
  2684. :supportsERC165: pass:normal[xref:#ERC165Checker-supportsERC165-address-[`++supportsERC165++`]]
  2685. :supportsInterface: pass:normal[xref:#ERC165Checker-supportsInterface-address-bytes4-[`++supportsInterface++`]]
  2686. :getSupportedInterfaces: pass:normal[xref:#ERC165Checker-getSupportedInterfaces-address-bytes4---[`++getSupportedInterfaces++`]]
  2687. :supportsAllInterfaces: pass:normal[xref:#ERC165Checker-supportsAllInterfaces-address-bytes4---[`++supportsAllInterfaces++`]]
  2688. :supportsERC165InterfaceUnchecked: pass:normal[xref:#ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-[`++supportsERC165InterfaceUnchecked++`]]
  2689. [.contract]
  2690. [[ERC165Checker]]
  2691. === `++ERC165Checker++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/introspection/ERC165Checker.sol[{github-icon},role=heading-link]
  2692. [.hljs-theme-light.nopadding]
  2693. ```solidity
  2694. import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
  2695. ```
  2696. Library used to query support of an interface declared via {IERC165}.
  2697. Note that these functions return the actual result of the query: they do not
  2698. `revert` if an interface is not supported. It is up to the caller to decide
  2699. what to do in these cases.
  2700. [.contract-index]
  2701. .Functions
  2702. --
  2703. * {xref-ERC165Checker-supportsERC165-address-}[`++supportsERC165(account)++`]
  2704. * {xref-ERC165Checker-supportsInterface-address-bytes4-}[`++supportsInterface(account, interfaceId)++`]
  2705. * {xref-ERC165Checker-getSupportedInterfaces-address-bytes4---}[`++getSupportedInterfaces(account, interfaceIds)++`]
  2706. * {xref-ERC165Checker-supportsAllInterfaces-address-bytes4---}[`++supportsAllInterfaces(account, interfaceIds)++`]
  2707. * {xref-ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-}[`++supportsERC165InterfaceUnchecked(account, interfaceId)++`]
  2708. --
  2709. [.contract-item]
  2710. [[ERC165Checker-supportsERC165-address-]]
  2711. ==== `[.contract-item-name]#++supportsERC165++#++(address account) → bool++` [.item-kind]#internal#
  2712. Returns true if `account` supports the {IERC165} interface.
  2713. [.contract-item]
  2714. [[ERC165Checker-supportsInterface-address-bytes4-]]
  2715. ==== `[.contract-item-name]#++supportsInterface++#++(address account, bytes4 interfaceId) → bool++` [.item-kind]#internal#
  2716. Returns true if `account` supports the interface defined by
  2717. `interfaceId`. Support for {IERC165} itself is queried automatically.
  2718. See {IERC165-supportsInterface}.
  2719. [.contract-item]
  2720. [[ERC165Checker-getSupportedInterfaces-address-bytes4---]]
  2721. ==== `[.contract-item-name]#++getSupportedInterfaces++#++(address account, bytes4[] interfaceIds) → bool[]++` [.item-kind]#internal#
  2722. Returns a boolean array where each value corresponds to the
  2723. interfaces passed in and whether they're supported or not. This allows
  2724. you to batch check interfaces for a contract where your expectation
  2725. is that some interfaces may not be supported.
  2726. See {IERC165-supportsInterface}.
  2727. [.contract-item]
  2728. [[ERC165Checker-supportsAllInterfaces-address-bytes4---]]
  2729. ==== `[.contract-item-name]#++supportsAllInterfaces++#++(address account, bytes4[] interfaceIds) → bool++` [.item-kind]#internal#
  2730. Returns true if `account` supports all the interfaces defined in
  2731. `interfaceIds`. Support for {IERC165} itself is queried automatically.
  2732. Batch-querying can lead to gas savings by skipping repeated checks for
  2733. {IERC165} support.
  2734. See {IERC165-supportsInterface}.
  2735. [.contract-item]
  2736. [[ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-]]
  2737. ==== `[.contract-item-name]#++supportsERC165InterfaceUnchecked++#++(address account, bytes4 interfaceId) → bool++` [.item-kind]#internal#
  2738. Assumes that account contains a contract that supports ERC-165, otherwise
  2739. the behavior of this method is undefined. This precondition can be checked
  2740. with {supportsERC165}.
  2741. Some precompiled contracts will falsely indicate support for a given interface, so caution
  2742. should be exercised when using this function.
  2743. Interface identification is specified in ERC-165.
  2744. == Data Structures
  2745. :BitMap: pass:normal[xref:#BitMaps-BitMap[`++BitMap++`]]
  2746. :get: pass:normal[xref:#BitMaps-get-struct-BitMaps-BitMap-uint256-[`++get++`]]
  2747. :setTo: pass:normal[xref:#BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-[`++setTo++`]]
  2748. :set: pass:normal[xref:#BitMaps-set-struct-BitMaps-BitMap-uint256-[`++set++`]]
  2749. :unset: pass:normal[xref:#BitMaps-unset-struct-BitMaps-BitMap-uint256-[`++unset++`]]
  2750. [.contract]
  2751. [[BitMaps]]
  2752. === `++BitMaps++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/BitMaps.sol[{github-icon},role=heading-link]
  2753. [.hljs-theme-light.nopadding]
  2754. ```solidity
  2755. import "@openzeppelin/contracts/utils/structs/BitMaps.sol";
  2756. ```
  2757. Library for managing uint256 to bool mapping in a compact and efficient way, provided the keys are sequential.
  2758. Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].
  2759. BitMaps pack 256 booleans across each bit of a single 256-bit slot of `uint256` type.
  2760. Hence booleans corresponding to 256 _sequential_ indices would only consume a single slot,
  2761. unlike the regular `bool` which would consume an entire slot for a single value.
  2762. This results in gas savings in two ways:
  2763. - Setting a zero value to non-zero only once every 256 times
  2764. - Accessing the same warm slot for every 256 _sequential_ indices
  2765. [.contract-index]
  2766. .Functions
  2767. --
  2768. * {xref-BitMaps-get-struct-BitMaps-BitMap-uint256-}[`++get(bitmap, index)++`]
  2769. * {xref-BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-}[`++setTo(bitmap, index, value)++`]
  2770. * {xref-BitMaps-set-struct-BitMaps-BitMap-uint256-}[`++set(bitmap, index)++`]
  2771. * {xref-BitMaps-unset-struct-BitMaps-BitMap-uint256-}[`++unset(bitmap, index)++`]
  2772. --
  2773. [.contract-item]
  2774. [[BitMaps-get-struct-BitMaps-BitMap-uint256-]]
  2775. ==== `[.contract-item-name]#++get++#++(struct BitMaps.BitMap bitmap, uint256 index) → bool++` [.item-kind]#internal#
  2776. Returns whether the bit at `index` is set.
  2777. [.contract-item]
  2778. [[BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-]]
  2779. ==== `[.contract-item-name]#++setTo++#++(struct BitMaps.BitMap bitmap, uint256 index, bool value)++` [.item-kind]#internal#
  2780. Sets the bit at `index` to the boolean `value`.
  2781. [.contract-item]
  2782. [[BitMaps-set-struct-BitMaps-BitMap-uint256-]]
  2783. ==== `[.contract-item-name]#++set++#++(struct BitMaps.BitMap bitmap, uint256 index)++` [.item-kind]#internal#
  2784. Sets the bit at `index`.
  2785. [.contract-item]
  2786. [[BitMaps-unset-struct-BitMaps-BitMap-uint256-]]
  2787. ==== `[.contract-item-name]#++unset++#++(struct BitMaps.BitMap bitmap, uint256 index)++` [.item-kind]#internal#
  2788. Unsets the bit at `index`.
  2789. :EnumerableMapNonexistentKey: pass:normal[xref:#EnumerableMap-EnumerableMapNonexistentKey-bytes32-[`++EnumerableMapNonexistentKey++`]]
  2790. :Bytes32ToBytes32Map: pass:normal[xref:#EnumerableMap-Bytes32ToBytes32Map[`++Bytes32ToBytes32Map++`]]
  2791. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-[`++set++`]]
  2792. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++remove++`]]
  2793. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++contains++`]]
  2794. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-[`++length++`]]
  2795. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-[`++at++`]]
  2796. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++tryGet++`]]
  2797. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++get++`]]
  2798. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-[`++keys++`]]
  2799. :UintToUintMap: pass:normal[xref:#EnumerableMap-UintToUintMap[`++UintToUintMap++`]]
  2800. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-[`++set++`]]
  2801. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-[`++remove++`]]
  2802. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-[`++contains++`]]
  2803. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToUintMap-[`++length++`]]
  2804. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-[`++at++`]]
  2805. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-[`++tryGet++`]]
  2806. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-[`++get++`]]
  2807. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-[`++keys++`]]
  2808. :UintToAddressMap: pass:normal[xref:#EnumerableMap-UintToAddressMap[`++UintToAddressMap++`]]
  2809. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-[`++set++`]]
  2810. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-[`++remove++`]]
  2811. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-[`++contains++`]]
  2812. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-[`++length++`]]
  2813. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-[`++at++`]]
  2814. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-[`++tryGet++`]]
  2815. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-[`++get++`]]
  2816. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-[`++keys++`]]
  2817. :UintToBytes32Map: pass:normal[xref:#EnumerableMap-UintToBytes32Map[`++UintToBytes32Map++`]]
  2818. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-[`++set++`]]
  2819. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-[`++remove++`]]
  2820. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-[`++contains++`]]
  2821. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-[`++length++`]]
  2822. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-[`++at++`]]
  2823. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-[`++tryGet++`]]
  2824. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-[`++get++`]]
  2825. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-[`++keys++`]]
  2826. :AddressToUintMap: pass:normal[xref:#EnumerableMap-AddressToUintMap[`++AddressToUintMap++`]]
  2827. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-[`++set++`]]
  2828. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-[`++remove++`]]
  2829. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-[`++contains++`]]
  2830. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-[`++length++`]]
  2831. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-[`++at++`]]
  2832. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-[`++tryGet++`]]
  2833. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-[`++get++`]]
  2834. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-[`++keys++`]]
  2835. :AddressToAddressMap: pass:normal[xref:#EnumerableMap-AddressToAddressMap[`++AddressToAddressMap++`]]
  2836. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-[`++set++`]]
  2837. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-[`++remove++`]]
  2838. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-[`++contains++`]]
  2839. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-[`++length++`]]
  2840. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-[`++at++`]]
  2841. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-[`++tryGet++`]]
  2842. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-[`++get++`]]
  2843. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-[`++keys++`]]
  2844. :AddressToBytes32Map: pass:normal[xref:#EnumerableMap-AddressToBytes32Map[`++AddressToBytes32Map++`]]
  2845. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-[`++set++`]]
  2846. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-[`++remove++`]]
  2847. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-[`++contains++`]]
  2848. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-[`++length++`]]
  2849. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-[`++at++`]]
  2850. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-[`++tryGet++`]]
  2851. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-[`++get++`]]
  2852. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-[`++keys++`]]
  2853. :Bytes32ToUintMap: pass:normal[xref:#EnumerableMap-Bytes32ToUintMap[`++Bytes32ToUintMap++`]]
  2854. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-[`++set++`]]
  2855. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++remove++`]]
  2856. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++contains++`]]
  2857. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-[`++length++`]]
  2858. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-[`++at++`]]
  2859. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++tryGet++`]]
  2860. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++get++`]]
  2861. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-[`++keys++`]]
  2862. :Bytes32ToAddressMap: pass:normal[xref:#EnumerableMap-Bytes32ToAddressMap[`++Bytes32ToAddressMap++`]]
  2863. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-[`++set++`]]
  2864. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++remove++`]]
  2865. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++contains++`]]
  2866. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-[`++length++`]]
  2867. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-[`++at++`]]
  2868. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++tryGet++`]]
  2869. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++get++`]]
  2870. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-[`++keys++`]]
  2871. [.contract]
  2872. [[EnumerableMap]]
  2873. === `++EnumerableMap++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/EnumerableMap.sol[{github-icon},role=heading-link]
  2874. [.hljs-theme-light.nopadding]
  2875. ```solidity
  2876. import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol";
  2877. ```
  2878. Library for managing an enumerable variant of Solidity's
  2879. https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
  2880. type.
  2881. Maps have the following properties:
  2882. - Entries are added, removed, and checked for existence in constant time
  2883. (O(1)).
  2884. - Entries are enumerated in O(n). No guarantees are made on the ordering.
  2885. ```solidity
  2886. contract Example {
  2887. // Add the library methods
  2888. using EnumerableMap for EnumerableMap.UintToAddressMap;
  2889. // Declare a set state variable
  2890. EnumerableMap.UintToAddressMap private myMap;
  2891. }
  2892. ```
  2893. The following map types are supported:
  2894. - `uint256 -> address` (`UintToAddressMap`) since v3.0.0
  2895. - `address -> uint256` (`AddressToUintMap`) since v4.6.0
  2896. - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0
  2897. - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0
  2898. - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0
  2899. - `uint256 -> bytes32` (`UintToBytes32Map`) since v5.1.0
  2900. - `address -> address` (`AddressToAddressMap`) since v5.1.0
  2901. - `address -> bytes32` (`AddressToBytes32Map`) since v5.1.0
  2902. - `bytes32 -> address` (`Bytes32ToAddressMap`) since v5.1.0
  2903. [WARNING]
  2904. ====
  2905. Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
  2906. unusable.
  2907. See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
  2908. In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an
  2909. array of EnumerableMap.
  2910. ====
  2911. [.contract-index]
  2912. .Functions
  2913. --
  2914. * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-}[`++set(map, key, value)++`]
  2915. * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++remove(map, key)++`]
  2916. * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++contains(map, key)++`]
  2917. * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-}[`++length(map)++`]
  2918. * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-}[`++at(map, index)++`]
  2919. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++tryGet(map, key)++`]
  2920. * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++get(map, key)++`]
  2921. * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-}[`++keys(map)++`]
  2922. * {xref-EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-}[`++set(map, key, value)++`]
  2923. * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-}[`++remove(map, key)++`]
  2924. * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-}[`++contains(map, key)++`]
  2925. * {xref-EnumerableMap-length-struct-EnumerableMap-UintToUintMap-}[`++length(map)++`]
  2926. * {xref-EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-}[`++at(map, index)++`]
  2927. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-}[`++tryGet(map, key)++`]
  2928. * {xref-EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-}[`++get(map, key)++`]
  2929. * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-}[`++keys(map)++`]
  2930. * {xref-EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-}[`++set(map, key, value)++`]
  2931. * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-}[`++remove(map, key)++`]
  2932. * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-}[`++contains(map, key)++`]
  2933. * {xref-EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-}[`++length(map)++`]
  2934. * {xref-EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-}[`++at(map, index)++`]
  2935. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-}[`++tryGet(map, key)++`]
  2936. * {xref-EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-}[`++get(map, key)++`]
  2937. * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-}[`++keys(map)++`]
  2938. * {xref-EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-}[`++set(map, key, value)++`]
  2939. * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++remove(map, key)++`]
  2940. * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++contains(map, key)++`]
  2941. * {xref-EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-}[`++length(map)++`]
  2942. * {xref-EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++at(map, index)++`]
  2943. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++tryGet(map, key)++`]
  2944. * {xref-EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++get(map, key)++`]
  2945. * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-}[`++keys(map)++`]
  2946. * {xref-EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-}[`++set(map, key, value)++`]
  2947. * {xref-EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-}[`++remove(map, key)++`]
  2948. * {xref-EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-}[`++contains(map, key)++`]
  2949. * {xref-EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-}[`++length(map)++`]
  2950. * {xref-EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-}[`++at(map, index)++`]
  2951. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-}[`++tryGet(map, key)++`]
  2952. * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-}[`++get(map, key)++`]
  2953. * {xref-EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-}[`++keys(map)++`]
  2954. * {xref-EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-}[`++set(map, key, value)++`]
  2955. * {xref-EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-}[`++remove(map, key)++`]
  2956. * {xref-EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-}[`++contains(map, key)++`]
  2957. * {xref-EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-}[`++length(map)++`]
  2958. * {xref-EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-}[`++at(map, index)++`]
  2959. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-}[`++tryGet(map, key)++`]
  2960. * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-}[`++get(map, key)++`]
  2961. * {xref-EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-}[`++keys(map)++`]
  2962. * {xref-EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-}[`++set(map, key, value)++`]
  2963. * {xref-EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-}[`++remove(map, key)++`]
  2964. * {xref-EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-}[`++contains(map, key)++`]
  2965. * {xref-EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-}[`++length(map)++`]
  2966. * {xref-EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-}[`++at(map, index)++`]
  2967. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-}[`++tryGet(map, key)++`]
  2968. * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-}[`++get(map, key)++`]
  2969. * {xref-EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-}[`++keys(map)++`]
  2970. * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-}[`++set(map, key, value)++`]
  2971. * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++remove(map, key)++`]
  2972. * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++contains(map, key)++`]
  2973. * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-}[`++length(map)++`]
  2974. * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-}[`++at(map, index)++`]
  2975. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++tryGet(map, key)++`]
  2976. * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++get(map, key)++`]
  2977. * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-}[`++keys(map)++`]
  2978. * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-}[`++set(map, key, value)++`]
  2979. * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++remove(map, key)++`]
  2980. * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++contains(map, key)++`]
  2981. * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-}[`++length(map)++`]
  2982. * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-}[`++at(map, index)++`]
  2983. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++tryGet(map, key)++`]
  2984. * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++get(map, key)++`]
  2985. * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-}[`++keys(map)++`]
  2986. --
  2987. [.contract-index]
  2988. .Errors
  2989. --
  2990. * {xref-EnumerableMap-EnumerableMapNonexistentKey-bytes32-}[`++EnumerableMapNonexistentKey(key)++`]
  2991. --
  2992. [.contract-item]
  2993. [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-]]
  2994. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key, bytes32 value) → bool++` [.item-kind]#internal#
  2995. Adds a key-value pair to a map, or updates the value for an existing
  2996. key. O(1).
  2997. Returns true if the key was added to the map, that is if it was not
  2998. already present.
  2999. [.contract-item]
  3000. [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  3001. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bool++` [.item-kind]#internal#
  3002. Removes a key-value pair from a map. O(1).
  3003. Returns true if the key was removed from the map, that is if it was present.
  3004. [.contract-item]
  3005. [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  3006. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bool++` [.item-kind]#internal#
  3007. Returns true if the key is in the map. O(1).
  3008. [.contract-item]
  3009. [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-]]
  3010. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToBytes32Map map) → uint256++` [.item-kind]#internal#
  3011. Returns the number of key-value pairs in the map. O(1).
  3012. [.contract-item]
  3013. [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-]]
  3014. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToBytes32Map map, uint256 index) → bytes32 key, bytes32 value++` [.item-kind]#internal#
  3015. Returns the key-value pair stored at position `index` in the map. O(1).
  3016. Note that there are no guarantees on the ordering of entries inside the
  3017. array, and it may change when more entries are added or removed.
  3018. Requirements:
  3019. - `index` must be strictly less than {length}.
  3020. [.contract-item]
  3021. [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  3022. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bool exists, bytes32 value++` [.item-kind]#internal#
  3023. Tries to returns the value associated with `key`. O(1).
  3024. Does not revert if `key` is not in the map.
  3025. [.contract-item]
  3026. [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  3027. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bytes32++` [.item-kind]#internal#
  3028. Returns the value associated with `key`. O(1).
  3029. Requirements:
  3030. - `key` must be in the map.
  3031. [.contract-item]
  3032. [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-]]
  3033. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToBytes32Map map) → bytes32[]++` [.item-kind]#internal#
  3034. Return the an array containing all the keys
  3035. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3036. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3037. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3038. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3039. [.contract-item]
  3040. [[EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-]]
  3041. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToUintMap map, uint256 key, uint256 value) → bool++` [.item-kind]#internal#
  3042. Adds a key-value pair to a map, or updates the value for an existing
  3043. key. O(1).
  3044. Returns true if the key was added to the map, that is if it was not
  3045. already present.
  3046. [.contract-item]
  3047. [[EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-]]
  3048. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → bool++` [.item-kind]#internal#
  3049. Removes a value from a map. O(1).
  3050. Returns true if the key was removed from the map, that is if it was present.
  3051. [.contract-item]
  3052. [[EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-]]
  3053. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → bool++` [.item-kind]#internal#
  3054. Returns true if the key is in the map. O(1).
  3055. [.contract-item]
  3056. [[EnumerableMap-length-struct-EnumerableMap-UintToUintMap-]]
  3057. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToUintMap map) → uint256++` [.item-kind]#internal#
  3058. Returns the number of elements in the map. O(1).
  3059. [.contract-item]
  3060. [[EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-]]
  3061. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToUintMap map, uint256 index) → uint256 key, uint256 value++` [.item-kind]#internal#
  3062. Returns the element stored at position `index` in the map. O(1).
  3063. Note that there are no guarantees on the ordering of values inside the
  3064. array, and it may change when more values are added or removed.
  3065. Requirements:
  3066. - `index` must be strictly less than {length}.
  3067. [.contract-item]
  3068. [[EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-]]
  3069. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → bool exists, uint256 value++` [.item-kind]#internal#
  3070. Tries to returns the value associated with `key`. O(1).
  3071. Does not revert if `key` is not in the map.
  3072. [.contract-item]
  3073. [[EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-]]
  3074. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → uint256++` [.item-kind]#internal#
  3075. Returns the value associated with `key`. O(1).
  3076. Requirements:
  3077. - `key` must be in the map.
  3078. [.contract-item]
  3079. [[EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-]]
  3080. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToUintMap map) → uint256[]++` [.item-kind]#internal#
  3081. Return the an array containing all the keys
  3082. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3083. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3084. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3085. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3086. [.contract-item]
  3087. [[EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-]]
  3088. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToAddressMap map, uint256 key, address value) → bool++` [.item-kind]#internal#
  3089. Adds a key-value pair to a map, or updates the value for an existing
  3090. key. O(1).
  3091. Returns true if the key was added to the map, that is if it was not
  3092. already present.
  3093. [.contract-item]
  3094. [[EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-]]
  3095. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → bool++` [.item-kind]#internal#
  3096. Removes a value from a map. O(1).
  3097. Returns true if the key was removed from the map, that is if it was present.
  3098. [.contract-item]
  3099. [[EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-]]
  3100. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → bool++` [.item-kind]#internal#
  3101. Returns true if the key is in the map. O(1).
  3102. [.contract-item]
  3103. [[EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-]]
  3104. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToAddressMap map) → uint256++` [.item-kind]#internal#
  3105. Returns the number of elements in the map. O(1).
  3106. [.contract-item]
  3107. [[EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-]]
  3108. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToAddressMap map, uint256 index) → uint256 key, address value++` [.item-kind]#internal#
  3109. Returns the element stored at position `index` in the map. O(1).
  3110. Note that there are no guarantees on the ordering of values inside the
  3111. array, and it may change when more values are added or removed.
  3112. Requirements:
  3113. - `index` must be strictly less than {length}.
  3114. [.contract-item]
  3115. [[EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-]]
  3116. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → bool exists, address value++` [.item-kind]#internal#
  3117. Tries to returns the value associated with `key`. O(1).
  3118. Does not revert if `key` is not in the map.
  3119. [.contract-item]
  3120. [[EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-]]
  3121. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → address++` [.item-kind]#internal#
  3122. Returns the value associated with `key`. O(1).
  3123. Requirements:
  3124. - `key` must be in the map.
  3125. [.contract-item]
  3126. [[EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-]]
  3127. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToAddressMap map) → uint256[]++` [.item-kind]#internal#
  3128. Return the an array containing all the keys
  3129. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3130. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3131. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3132. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3133. [.contract-item]
  3134. [[EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-]]
  3135. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key, bytes32 value) → bool++` [.item-kind]#internal#
  3136. Adds a key-value pair to a map, or updates the value for an existing
  3137. key. O(1).
  3138. Returns true if the key was added to the map, that is if it was not
  3139. already present.
  3140. [.contract-item]
  3141. [[EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-]]
  3142. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) → bool++` [.item-kind]#internal#
  3143. Removes a value from a map. O(1).
  3144. Returns true if the key was removed from the map, that is if it was present.
  3145. [.contract-item]
  3146. [[EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-]]
  3147. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) → bool++` [.item-kind]#internal#
  3148. Returns true if the key is in the map. O(1).
  3149. [.contract-item]
  3150. [[EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-]]
  3151. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToBytes32Map map) → uint256++` [.item-kind]#internal#
  3152. Returns the number of elements in the map. O(1).
  3153. [.contract-item]
  3154. [[EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-]]
  3155. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToBytes32Map map, uint256 index) → uint256 key, bytes32 value++` [.item-kind]#internal#
  3156. Returns the element stored at position `index` in the map. O(1).
  3157. Note that there are no guarantees on the ordering of values inside the
  3158. array, and it may change when more values are added or removed.
  3159. Requirements:
  3160. - `index` must be strictly less than {length}.
  3161. [.contract-item]
  3162. [[EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-]]
  3163. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) → bool exists, bytes32 value++` [.item-kind]#internal#
  3164. Tries to returns the value associated with `key`. O(1).
  3165. Does not revert if `key` is not in the map.
  3166. [.contract-item]
  3167. [[EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-]]
  3168. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) → bytes32++` [.item-kind]#internal#
  3169. Returns the value associated with `key`. O(1).
  3170. Requirements:
  3171. - `key` must be in the map.
  3172. [.contract-item]
  3173. [[EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-]]
  3174. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToBytes32Map map) → uint256[]++` [.item-kind]#internal#
  3175. Return the an array containing all the keys
  3176. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3177. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3178. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3179. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3180. [.contract-item]
  3181. [[EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-]]
  3182. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.AddressToUintMap map, address key, uint256 value) → bool++` [.item-kind]#internal#
  3183. Adds a key-value pair to a map, or updates the value for an existing
  3184. key. O(1).
  3185. Returns true if the key was added to the map, that is if it was not
  3186. already present.
  3187. [.contract-item]
  3188. [[EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-]]
  3189. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.AddressToUintMap map, address key) → bool++` [.item-kind]#internal#
  3190. Removes a value from a map. O(1).
  3191. Returns true if the key was removed from the map, that is if it was present.
  3192. [.contract-item]
  3193. [[EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-]]
  3194. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.AddressToUintMap map, address key) → bool++` [.item-kind]#internal#
  3195. Returns true if the key is in the map. O(1).
  3196. [.contract-item]
  3197. [[EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-]]
  3198. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.AddressToUintMap map) → uint256++` [.item-kind]#internal#
  3199. Returns the number of elements in the map. O(1).
  3200. [.contract-item]
  3201. [[EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-]]
  3202. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.AddressToUintMap map, uint256 index) → address key, uint256 value++` [.item-kind]#internal#
  3203. Returns the element stored at position `index` in the map. O(1).
  3204. Note that there are no guarantees on the ordering of values inside the
  3205. array, and it may change when more values are added or removed.
  3206. Requirements:
  3207. - `index` must be strictly less than {length}.
  3208. [.contract-item]
  3209. [[EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-]]
  3210. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.AddressToUintMap map, address key) → bool exists, uint256 value++` [.item-kind]#internal#
  3211. Tries to returns the value associated with `key`. O(1).
  3212. Does not revert if `key` is not in the map.
  3213. [.contract-item]
  3214. [[EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-]]
  3215. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToUintMap map, address key) → uint256++` [.item-kind]#internal#
  3216. Returns the value associated with `key`. O(1).
  3217. Requirements:
  3218. - `key` must be in the map.
  3219. [.contract-item]
  3220. [[EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-]]
  3221. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.AddressToUintMap map) → address[]++` [.item-kind]#internal#
  3222. Return the an array containing all the keys
  3223. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3224. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3225. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3226. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3227. [.contract-item]
  3228. [[EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-]]
  3229. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.AddressToAddressMap map, address key, address value) → bool++` [.item-kind]#internal#
  3230. Adds a key-value pair to a map, or updates the value for an existing
  3231. key. O(1).
  3232. Returns true if the key was added to the map, that is if it was not
  3233. already present.
  3234. [.contract-item]
  3235. [[EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-]]
  3236. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.AddressToAddressMap map, address key) → bool++` [.item-kind]#internal#
  3237. Removes a value from a map. O(1).
  3238. Returns true if the key was removed from the map, that is if it was present.
  3239. [.contract-item]
  3240. [[EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-]]
  3241. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.AddressToAddressMap map, address key) → bool++` [.item-kind]#internal#
  3242. Returns true if the key is in the map. O(1).
  3243. [.contract-item]
  3244. [[EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-]]
  3245. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.AddressToAddressMap map) → uint256++` [.item-kind]#internal#
  3246. Returns the number of elements in the map. O(1).
  3247. [.contract-item]
  3248. [[EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-]]
  3249. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.AddressToAddressMap map, uint256 index) → address key, address value++` [.item-kind]#internal#
  3250. Returns the element stored at position `index` in the map. O(1).
  3251. Note that there are no guarantees on the ordering of values inside the
  3252. array, and it may change when more values are added or removed.
  3253. Requirements:
  3254. - `index` must be strictly less than {length}.
  3255. [.contract-item]
  3256. [[EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-]]
  3257. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.AddressToAddressMap map, address key) → bool exists, address value++` [.item-kind]#internal#
  3258. Tries to returns the value associated with `key`. O(1).
  3259. Does not revert if `key` is not in the map.
  3260. [.contract-item]
  3261. [[EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-]]
  3262. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToAddressMap map, address key) → address++` [.item-kind]#internal#
  3263. Returns the value associated with `key`. O(1).
  3264. Requirements:
  3265. - `key` must be in the map.
  3266. [.contract-item]
  3267. [[EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-]]
  3268. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.AddressToAddressMap map) → address[]++` [.item-kind]#internal#
  3269. Return the an array containing all the keys
  3270. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3271. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3272. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3273. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3274. [.contract-item]
  3275. [[EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-]]
  3276. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.AddressToBytes32Map map, address key, bytes32 value) → bool++` [.item-kind]#internal#
  3277. Adds a key-value pair to a map, or updates the value for an existing
  3278. key. O(1).
  3279. Returns true if the key was added to the map, that is if it was not
  3280. already present.
  3281. [.contract-item]
  3282. [[EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-]]
  3283. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.AddressToBytes32Map map, address key) → bool++` [.item-kind]#internal#
  3284. Removes a value from a map. O(1).
  3285. Returns true if the key was removed from the map, that is if it was present.
  3286. [.contract-item]
  3287. [[EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-]]
  3288. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.AddressToBytes32Map map, address key) → bool++` [.item-kind]#internal#
  3289. Returns true if the key is in the map. O(1).
  3290. [.contract-item]
  3291. [[EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-]]
  3292. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.AddressToBytes32Map map) → uint256++` [.item-kind]#internal#
  3293. Returns the number of elements in the map. O(1).
  3294. [.contract-item]
  3295. [[EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-]]
  3296. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.AddressToBytes32Map map, uint256 index) → address key, bytes32 value++` [.item-kind]#internal#
  3297. Returns the element stored at position `index` in the map. O(1).
  3298. Note that there are no guarantees on the ordering of values inside the
  3299. array, and it may change when more values are added or removed.
  3300. Requirements:
  3301. - `index` must be strictly less than {length}.
  3302. [.contract-item]
  3303. [[EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-]]
  3304. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.AddressToBytes32Map map, address key) → bool exists, bytes32 value++` [.item-kind]#internal#
  3305. Tries to returns the value associated with `key`. O(1).
  3306. Does not revert if `key` is not in the map.
  3307. [.contract-item]
  3308. [[EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-]]
  3309. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToBytes32Map map, address key) → bytes32++` [.item-kind]#internal#
  3310. Returns the value associated with `key`. O(1).
  3311. Requirements:
  3312. - `key` must be in the map.
  3313. [.contract-item]
  3314. [[EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-]]
  3315. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.AddressToBytes32Map map) → address[]++` [.item-kind]#internal#
  3316. Return the an array containing all the keys
  3317. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3318. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3319. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3320. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3321. [.contract-item]
  3322. [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-]]
  3323. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key, uint256 value) → bool++` [.item-kind]#internal#
  3324. Adds a key-value pair to a map, or updates the value for an existing
  3325. key. O(1).
  3326. Returns true if the key was added to the map, that is if it was not
  3327. already present.
  3328. [.contract-item]
  3329. [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  3330. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → bool++` [.item-kind]#internal#
  3331. Removes a value from a map. O(1).
  3332. Returns true if the key was removed from the map, that is if it was present.
  3333. [.contract-item]
  3334. [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  3335. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → bool++` [.item-kind]#internal#
  3336. Returns true if the key is in the map. O(1).
  3337. [.contract-item]
  3338. [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-]]
  3339. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToUintMap map) → uint256++` [.item-kind]#internal#
  3340. Returns the number of elements in the map. O(1).
  3341. [.contract-item]
  3342. [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-]]
  3343. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToUintMap map, uint256 index) → bytes32 key, uint256 value++` [.item-kind]#internal#
  3344. Returns the element stored at position `index` in the map. O(1).
  3345. Note that there are no guarantees on the ordering of values inside the
  3346. array, and it may change when more values are added or removed.
  3347. Requirements:
  3348. - `index` must be strictly less than {length}.
  3349. [.contract-item]
  3350. [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  3351. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → bool exists, uint256 value++` [.item-kind]#internal#
  3352. Tries to returns the value associated with `key`. O(1).
  3353. Does not revert if `key` is not in the map.
  3354. [.contract-item]
  3355. [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  3356. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → uint256++` [.item-kind]#internal#
  3357. Returns the value associated with `key`. O(1).
  3358. Requirements:
  3359. - `key` must be in the map.
  3360. [.contract-item]
  3361. [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-]]
  3362. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToUintMap map) → bytes32[]++` [.item-kind]#internal#
  3363. Return the an array containing all the keys
  3364. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3365. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3366. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3367. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3368. [.contract-item]
  3369. [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-]]
  3370. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key, address value) → bool++` [.item-kind]#internal#
  3371. Adds a key-value pair to a map, or updates the value for an existing
  3372. key. O(1).
  3373. Returns true if the key was added to the map, that is if it was not
  3374. already present.
  3375. [.contract-item]
  3376. [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
  3377. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) → bool++` [.item-kind]#internal#
  3378. Removes a value from a map. O(1).
  3379. Returns true if the key was removed from the map, that is if it was present.
  3380. [.contract-item]
  3381. [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
  3382. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) → bool++` [.item-kind]#internal#
  3383. Returns true if the key is in the map. O(1).
  3384. [.contract-item]
  3385. [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-]]
  3386. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToAddressMap map) → uint256++` [.item-kind]#internal#
  3387. Returns the number of elements in the map. O(1).
  3388. [.contract-item]
  3389. [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-]]
  3390. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToAddressMap map, uint256 index) → bytes32 key, address value++` [.item-kind]#internal#
  3391. Returns the element stored at position `index` in the map. O(1).
  3392. Note that there are no guarantees on the ordering of values inside the
  3393. array, and it may change when more values are added or removed.
  3394. Requirements:
  3395. - `index` must be strictly less than {length}.
  3396. [.contract-item]
  3397. [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
  3398. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) → bool exists, address value++` [.item-kind]#internal#
  3399. Tries to returns the value associated with `key`. O(1).
  3400. Does not revert if `key` is not in the map.
  3401. [.contract-item]
  3402. [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
  3403. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) → address++` [.item-kind]#internal#
  3404. Returns the value associated with `key`. O(1).
  3405. Requirements:
  3406. - `key` must be in the map.
  3407. [.contract-item]
  3408. [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-]]
  3409. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToAddressMap map) → bytes32[]++` [.item-kind]#internal#
  3410. Return the an array containing all the keys
  3411. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3412. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3413. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3414. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  3415. [.contract-item]
  3416. [[EnumerableMap-EnumerableMapNonexistentKey-bytes32-]]
  3417. ==== `[.contract-item-name]#++EnumerableMapNonexistentKey++#++(bytes32 key)++` [.item-kind]#error#
  3418. Query for a nonexistent map key.
  3419. :Set: pass:normal[xref:#EnumerableSet-Set[`++Set++`]]
  3420. :Bytes32Set: pass:normal[xref:#EnumerableSet-Bytes32Set[`++Bytes32Set++`]]
  3421. :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-[`++add++`]]
  3422. :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-[`++remove++`]]
  3423. :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-[`++contains++`]]
  3424. :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-Bytes32Set-[`++length++`]]
  3425. :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-[`++at++`]]
  3426. :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-Bytes32Set-[`++values++`]]
  3427. :AddressSet: pass:normal[xref:#EnumerableSet-AddressSet[`++AddressSet++`]]
  3428. :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-AddressSet-address-[`++add++`]]
  3429. :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-[`++remove++`]]
  3430. :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-[`++contains++`]]
  3431. :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-AddressSet-[`++length++`]]
  3432. :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-[`++at++`]]
  3433. :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-AddressSet-[`++values++`]]
  3434. :UintSet: pass:normal[xref:#EnumerableSet-UintSet[`++UintSet++`]]
  3435. :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-[`++add++`]]
  3436. :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-[`++remove++`]]
  3437. :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-[`++contains++`]]
  3438. :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-UintSet-[`++length++`]]
  3439. :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-[`++at++`]]
  3440. :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-UintSet-[`++values++`]]
  3441. [.contract]
  3442. [[EnumerableSet]]
  3443. === `++EnumerableSet++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/EnumerableSet.sol[{github-icon},role=heading-link]
  3444. [.hljs-theme-light.nopadding]
  3445. ```solidity
  3446. import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
  3447. ```
  3448. Library for managing
  3449. https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
  3450. types.
  3451. Sets have the following properties:
  3452. - Elements are added, removed, and checked for existence in constant time
  3453. (O(1)).
  3454. - Elements are enumerated in O(n). No guarantees are made on the ordering.
  3455. ```solidity
  3456. contract Example {
  3457. // Add the library methods
  3458. using EnumerableSet for EnumerableSet.AddressSet;
  3459. // Declare a set state variable
  3460. EnumerableSet.AddressSet private mySet;
  3461. }
  3462. ```
  3463. As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
  3464. and `uint256` (`UintSet`) are supported.
  3465. [WARNING]
  3466. ====
  3467. Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
  3468. unusable.
  3469. See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
  3470. In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
  3471. array of EnumerableSet.
  3472. ====
  3473. [.contract-index]
  3474. .Functions
  3475. --
  3476. * {xref-EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-}[`++add(set, value)++`]
  3477. * {xref-EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-}[`++remove(set, value)++`]
  3478. * {xref-EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-}[`++contains(set, value)++`]
  3479. * {xref-EnumerableSet-length-struct-EnumerableSet-Bytes32Set-}[`++length(set)++`]
  3480. * {xref-EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-}[`++at(set, index)++`]
  3481. * {xref-EnumerableSet-values-struct-EnumerableSet-Bytes32Set-}[`++values(set)++`]
  3482. * {xref-EnumerableSet-add-struct-EnumerableSet-AddressSet-address-}[`++add(set, value)++`]
  3483. * {xref-EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-}[`++remove(set, value)++`]
  3484. * {xref-EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-}[`++contains(set, value)++`]
  3485. * {xref-EnumerableSet-length-struct-EnumerableSet-AddressSet-}[`++length(set)++`]
  3486. * {xref-EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-}[`++at(set, index)++`]
  3487. * {xref-EnumerableSet-values-struct-EnumerableSet-AddressSet-}[`++values(set)++`]
  3488. * {xref-EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-}[`++add(set, value)++`]
  3489. * {xref-EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-}[`++remove(set, value)++`]
  3490. * {xref-EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-}[`++contains(set, value)++`]
  3491. * {xref-EnumerableSet-length-struct-EnumerableSet-UintSet-}[`++length(set)++`]
  3492. * {xref-EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-}[`++at(set, index)++`]
  3493. * {xref-EnumerableSet-values-struct-EnumerableSet-UintSet-}[`++values(set)++`]
  3494. --
  3495. [.contract-item]
  3496. [[EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-]]
  3497. ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) → bool++` [.item-kind]#internal#
  3498. Add a value to a set. O(1).
  3499. Returns true if the value was added to the set, that is if it was not
  3500. already present.
  3501. [.contract-item]
  3502. [[EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-]]
  3503. ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) → bool++` [.item-kind]#internal#
  3504. Removes a value from a set. O(1).
  3505. Returns true if the value was removed from the set, that is if it was
  3506. present.
  3507. [.contract-item]
  3508. [[EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-]]
  3509. ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) → bool++` [.item-kind]#internal#
  3510. Returns true if the value is in the set. O(1).
  3511. [.contract-item]
  3512. [[EnumerableSet-length-struct-EnumerableSet-Bytes32Set-]]
  3513. ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.Bytes32Set set) → uint256++` [.item-kind]#internal#
  3514. Returns the number of values in the set. O(1).
  3515. [.contract-item]
  3516. [[EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-]]
  3517. ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.Bytes32Set set, uint256 index) → bytes32++` [.item-kind]#internal#
  3518. Returns the value stored at position `index` in the set. O(1).
  3519. Note that there are no guarantees on the ordering of values inside the
  3520. array, and it may change when more values are added or removed.
  3521. Requirements:
  3522. - `index` must be strictly less than {length}.
  3523. [.contract-item]
  3524. [[EnumerableSet-values-struct-EnumerableSet-Bytes32Set-]]
  3525. ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.Bytes32Set set) → bytes32[]++` [.item-kind]#internal#
  3526. Return the entire set in an array
  3527. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3528. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3529. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3530. uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
  3531. [.contract-item]
  3532. [[EnumerableSet-add-struct-EnumerableSet-AddressSet-address-]]
  3533. ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.AddressSet set, address value) → bool++` [.item-kind]#internal#
  3534. Add a value to a set. O(1).
  3535. Returns true if the value was added to the set, that is if it was not
  3536. already present.
  3537. [.contract-item]
  3538. [[EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-]]
  3539. ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.AddressSet set, address value) → bool++` [.item-kind]#internal#
  3540. Removes a value from a set. O(1).
  3541. Returns true if the value was removed from the set, that is if it was
  3542. present.
  3543. [.contract-item]
  3544. [[EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-]]
  3545. ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.AddressSet set, address value) → bool++` [.item-kind]#internal#
  3546. Returns true if the value is in the set. O(1).
  3547. [.contract-item]
  3548. [[EnumerableSet-length-struct-EnumerableSet-AddressSet-]]
  3549. ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.AddressSet set) → uint256++` [.item-kind]#internal#
  3550. Returns the number of values in the set. O(1).
  3551. [.contract-item]
  3552. [[EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-]]
  3553. ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.AddressSet set, uint256 index) → address++` [.item-kind]#internal#
  3554. Returns the value stored at position `index` in the set. O(1).
  3555. Note that there are no guarantees on the ordering of values inside the
  3556. array, and it may change when more values are added or removed.
  3557. Requirements:
  3558. - `index` must be strictly less than {length}.
  3559. [.contract-item]
  3560. [[EnumerableSet-values-struct-EnumerableSet-AddressSet-]]
  3561. ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.AddressSet set) → address[]++` [.item-kind]#internal#
  3562. Return the entire set in an array
  3563. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3564. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3565. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3566. uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
  3567. [.contract-item]
  3568. [[EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-]]
  3569. ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.UintSet set, uint256 value) → bool++` [.item-kind]#internal#
  3570. Add a value to a set. O(1).
  3571. Returns true if the value was added to the set, that is if it was not
  3572. already present.
  3573. [.contract-item]
  3574. [[EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-]]
  3575. ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.UintSet set, uint256 value) → bool++` [.item-kind]#internal#
  3576. Removes a value from a set. O(1).
  3577. Returns true if the value was removed from the set, that is if it was
  3578. present.
  3579. [.contract-item]
  3580. [[EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-]]
  3581. ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.UintSet set, uint256 value) → bool++` [.item-kind]#internal#
  3582. Returns true if the value is in the set. O(1).
  3583. [.contract-item]
  3584. [[EnumerableSet-length-struct-EnumerableSet-UintSet-]]
  3585. ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.UintSet set) → uint256++` [.item-kind]#internal#
  3586. Returns the number of values in the set. O(1).
  3587. [.contract-item]
  3588. [[EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-]]
  3589. ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.UintSet set, uint256 index) → uint256++` [.item-kind]#internal#
  3590. Returns the value stored at position `index` in the set. O(1).
  3591. Note that there are no guarantees on the ordering of values inside the
  3592. array, and it may change when more values are added or removed.
  3593. Requirements:
  3594. - `index` must be strictly less than {length}.
  3595. [.contract-item]
  3596. [[EnumerableSet-values-struct-EnumerableSet-UintSet-]]
  3597. ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.UintSet set) → uint256[]++` [.item-kind]#internal#
  3598. Return the entire set in an array
  3599. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  3600. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  3601. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  3602. uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
  3603. :Bytes32Deque: pass:normal[xref:#DoubleEndedQueue-Bytes32Deque[`++Bytes32Deque++`]]
  3604. :pushBack: pass:normal[xref:#DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-[`++pushBack++`]]
  3605. :popBack: pass:normal[xref:#DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-[`++popBack++`]]
  3606. :pushFront: pass:normal[xref:#DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-[`++pushFront++`]]
  3607. :popFront: pass:normal[xref:#DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-[`++popFront++`]]
  3608. :front: pass:normal[xref:#DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-[`++front++`]]
  3609. :back: pass:normal[xref:#DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-[`++back++`]]
  3610. :at: pass:normal[xref:#DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-[`++at++`]]
  3611. :clear: pass:normal[xref:#DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-[`++clear++`]]
  3612. :length: pass:normal[xref:#DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-[`++length++`]]
  3613. :empty: pass:normal[xref:#DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-[`++empty++`]]
  3614. [.contract]
  3615. [[DoubleEndedQueue]]
  3616. === `++DoubleEndedQueue++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/DoubleEndedQueue.sol[{github-icon},role=heading-link]
  3617. [.hljs-theme-light.nopadding]
  3618. ```solidity
  3619. import "@openzeppelin/contracts/utils/structs/DoubleEndedQueue.sol";
  3620. ```
  3621. A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of
  3622. the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and
  3623. FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that
  3624. the existing queue contents are left in storage.
  3625. The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be
  3626. used in storage, and not in memory.
  3627. ```solidity
  3628. DoubleEndedQueue.Bytes32Deque queue;
  3629. ```
  3630. [.contract-index]
  3631. .Functions
  3632. --
  3633. * {xref-DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-}[`++pushBack(deque, value)++`]
  3634. * {xref-DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-}[`++popBack(deque)++`]
  3635. * {xref-DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-}[`++pushFront(deque, value)++`]
  3636. * {xref-DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-}[`++popFront(deque)++`]
  3637. * {xref-DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-}[`++front(deque)++`]
  3638. * {xref-DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-}[`++back(deque)++`]
  3639. * {xref-DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-}[`++at(deque, index)++`]
  3640. * {xref-DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-}[`++clear(deque)++`]
  3641. * {xref-DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-}[`++length(deque)++`]
  3642. * {xref-DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-}[`++empty(deque)++`]
  3643. --
  3644. [.contract-item]
  3645. [[DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-]]
  3646. ==== `[.contract-item-name]#++pushBack++#++(struct DoubleEndedQueue.Bytes32Deque deque, bytes32 value)++` [.item-kind]#internal#
  3647. Inserts an item at the end of the queue.
  3648. Reverts with {Panic-RESOURCE_ERROR} if the queue is full.
  3649. [.contract-item]
  3650. [[DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-]]
  3651. ==== `[.contract-item-name]#++popBack++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
  3652. Removes the item at the end of the queue and returns it.
  3653. Reverts with {Panic-EMPTY_ARRAY_POP} if the queue is empty.
  3654. [.contract-item]
  3655. [[DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-]]
  3656. ==== `[.contract-item-name]#++pushFront++#++(struct DoubleEndedQueue.Bytes32Deque deque, bytes32 value)++` [.item-kind]#internal#
  3657. Inserts an item at the beginning of the queue.
  3658. Reverts with {Panic-RESOURCE_ERROR} if the queue is full.
  3659. [.contract-item]
  3660. [[DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-]]
  3661. ==== `[.contract-item-name]#++popFront++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
  3662. Removes the item at the beginning of the queue and returns it.
  3663. Reverts with {Panic-EMPTY_ARRAY_POP} if the queue is empty.
  3664. [.contract-item]
  3665. [[DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-]]
  3666. ==== `[.contract-item-name]#++front++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
  3667. Returns the item at the beginning of the queue.
  3668. Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the queue is empty.
  3669. [.contract-item]
  3670. [[DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-]]
  3671. ==== `[.contract-item-name]#++back++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
  3672. Returns the item at the end of the queue.
  3673. Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the queue is empty.
  3674. [.contract-item]
  3675. [[DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-]]
  3676. ==== `[.contract-item-name]#++at++#++(struct DoubleEndedQueue.Bytes32Deque deque, uint256 index) → bytes32 value++` [.item-kind]#internal#
  3677. Return the item at a position in the queue given by `index`, with the first item at 0 and last item at
  3678. `length(deque) - 1`.
  3679. Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the index is out of bounds.
  3680. [.contract-item]
  3681. [[DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-]]
  3682. ==== `[.contract-item-name]#++clear++#++(struct DoubleEndedQueue.Bytes32Deque deque)++` [.item-kind]#internal#
  3683. Resets the queue back to being empty.
  3684. NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses
  3685. out on potential gas refunds.
  3686. [.contract-item]
  3687. [[DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-]]
  3688. ==== `[.contract-item-name]#++length++#++(struct DoubleEndedQueue.Bytes32Deque deque) → uint256++` [.item-kind]#internal#
  3689. Returns the number of items in the queue.
  3690. [.contract-item]
  3691. [[DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-]]
  3692. ==== `[.contract-item-name]#++empty++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bool++` [.item-kind]#internal#
  3693. Returns true if the queue is empty.
  3694. :InvalidBufferSize: pass:normal[xref:#CircularBuffer-InvalidBufferSize--[`++InvalidBufferSize++`]]
  3695. :Bytes32CircularBuffer: pass:normal[xref:#CircularBuffer-Bytes32CircularBuffer[`++Bytes32CircularBuffer++`]]
  3696. :setup: pass:normal[xref:#CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-[`++setup++`]]
  3697. :clear: pass:normal[xref:#CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-[`++clear++`]]
  3698. :push: pass:normal[xref:#CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-[`++push++`]]
  3699. :count: pass:normal[xref:#CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-[`++count++`]]
  3700. :length: pass:normal[xref:#CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-[`++length++`]]
  3701. :last: pass:normal[xref:#CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-[`++last++`]]
  3702. :includes: pass:normal[xref:#CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-[`++includes++`]]
  3703. [.contract]
  3704. [[CircularBuffer]]
  3705. === `++CircularBuffer++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/CircularBuffer.sol[{github-icon},role=heading-link]
  3706. [.hljs-theme-light.nopadding]
  3707. ```solidity
  3708. import "@openzeppelin/contracts/utils/structs/CircularBuffer.sol";
  3709. ```
  3710. A fixed-size buffer for keeping `bytes32` items in storage.
  3711. This data structure allows for pushing elements to it, and when its length exceeds the specified fixed size,
  3712. new items take the place of the oldest element in the buffer, keeping at most `N` elements in the
  3713. structure.
  3714. Elements can't be removed but the data structure can be cleared. See {clear}.
  3715. Complexity:
  3716. - insertion ({push}): O(1)
  3717. - lookup ({last}): O(1)
  3718. - inclusion ({includes}): O(N) (worst case)
  3719. - reset ({clear}): O(1)
  3720. * The struct is called `Bytes32CircularBuffer`. Other types can be cast to and from `bytes32`. This data structure
  3721. can only be used in storage, and not in memory.
  3722. Example usage:
  3723. ```solidity
  3724. contract Example {
  3725. // Add the library methods
  3726. using CircularBuffer for CircularBuffer.Bytes32CircularBuffer;
  3727. // Declare a buffer storage variable
  3728. CircularBuffer.Bytes32CircularBuffer private myBuffer;
  3729. }
  3730. ```
  3731. _Available since v5.1._
  3732. [.contract-index]
  3733. .Functions
  3734. --
  3735. * {xref-CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-}[`++setup(self, size)++`]
  3736. * {xref-CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-}[`++clear(self)++`]
  3737. * {xref-CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-}[`++push(self, value)++`]
  3738. * {xref-CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-}[`++count(self)++`]
  3739. * {xref-CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-}[`++length(self)++`]
  3740. * {xref-CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-}[`++last(self, i)++`]
  3741. * {xref-CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-}[`++includes(self, value)++`]
  3742. --
  3743. [.contract-index]
  3744. .Errors
  3745. --
  3746. * {xref-CircularBuffer-InvalidBufferSize--}[`++InvalidBufferSize()++`]
  3747. --
  3748. [.contract-item]
  3749. [[CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-]]
  3750. ==== `[.contract-item-name]#++setup++#++(struct CircularBuffer.Bytes32CircularBuffer self, uint256 size)++` [.item-kind]#internal#
  3751. Initialize a new CircularBuffer of given size.
  3752. If the CircularBuffer was already setup and used, calling that function again will reset it to a blank state.
  3753. NOTE: The size of the buffer will affect the execution of {includes} function, as it has a complexity of O(N).
  3754. Consider a large buffer size may render the function unusable.
  3755. [.contract-item]
  3756. [[CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-]]
  3757. ==== `[.contract-item-name]#++clear++#++(struct CircularBuffer.Bytes32CircularBuffer self)++` [.item-kind]#internal#
  3758. Clear all data in the buffer without resetting memory, keeping the existing size.
  3759. [.contract-item]
  3760. [[CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-]]
  3761. ==== `[.contract-item-name]#++push++#++(struct CircularBuffer.Bytes32CircularBuffer self, bytes32 value)++` [.item-kind]#internal#
  3762. Push a new value to the buffer. If the buffer is already full, the new value replaces the oldest value in
  3763. the buffer.
  3764. [.contract-item]
  3765. [[CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-]]
  3766. ==== `[.contract-item-name]#++count++#++(struct CircularBuffer.Bytes32CircularBuffer self) → uint256++` [.item-kind]#internal#
  3767. Number of values currently in the buffer. This value is 0 for an empty buffer, and cannot exceed the size of
  3768. the buffer.
  3769. [.contract-item]
  3770. [[CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-]]
  3771. ==== `[.contract-item-name]#++length++#++(struct CircularBuffer.Bytes32CircularBuffer self) → uint256++` [.item-kind]#internal#
  3772. Length of the buffer. This is the maximum number of elements kept in the buffer.
  3773. [.contract-item]
  3774. [[CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-]]
  3775. ==== `[.contract-item-name]#++last++#++(struct CircularBuffer.Bytes32CircularBuffer self, uint256 i) → bytes32++` [.item-kind]#internal#
  3776. Getter for the i-th value in the buffer, from the end.
  3777. Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if trying to access an element that was not pushed, or that was
  3778. dropped to make room for newer elements.
  3779. [.contract-item]
  3780. [[CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-]]
  3781. ==== `[.contract-item-name]#++includes++#++(struct CircularBuffer.Bytes32CircularBuffer self, bytes32 value) → bool++` [.item-kind]#internal#
  3782. Check if a given value is in the buffer.
  3783. [.contract-item]
  3784. [[CircularBuffer-InvalidBufferSize--]]
  3785. ==== `[.contract-item-name]#++InvalidBufferSize++#++()++` [.item-kind]#error#
  3786. Error emitted when trying to setup a buffer with a size of 0.
  3787. :CheckpointUnorderedInsertion: pass:normal[xref:#Checkpoints-CheckpointUnorderedInsertion--[`++CheckpointUnorderedInsertion++`]]
  3788. :Trace224: pass:normal[xref:#Checkpoints-Trace224[`++Trace224++`]]
  3789. :Checkpoint224: pass:normal[xref:#Checkpoints-Checkpoint224[`++Checkpoint224++`]]
  3790. :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-[`++push++`]]
  3791. :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-[`++lowerLookup++`]]
  3792. :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-[`++upperLookup++`]]
  3793. :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-[`++upperLookupRecent++`]]
  3794. :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace224-[`++latest++`]]
  3795. :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-[`++latestCheckpoint++`]]
  3796. :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace224-[`++length++`]]
  3797. :at: pass:normal[xref:#Checkpoints-at-struct-Checkpoints-Trace224-uint32-[`++at++`]]
  3798. :Trace208: pass:normal[xref:#Checkpoints-Trace208[`++Trace208++`]]
  3799. :Checkpoint208: pass:normal[xref:#Checkpoints-Checkpoint208[`++Checkpoint208++`]]
  3800. :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-[`++push++`]]
  3801. :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-[`++lowerLookup++`]]
  3802. :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-[`++upperLookup++`]]
  3803. :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-[`++upperLookupRecent++`]]
  3804. :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace208-[`++latest++`]]
  3805. :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-[`++latestCheckpoint++`]]
  3806. :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace208-[`++length++`]]
  3807. :at: pass:normal[xref:#Checkpoints-at-struct-Checkpoints-Trace208-uint32-[`++at++`]]
  3808. :Trace160: pass:normal[xref:#Checkpoints-Trace160[`++Trace160++`]]
  3809. :Checkpoint160: pass:normal[xref:#Checkpoints-Checkpoint160[`++Checkpoint160++`]]
  3810. :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-[`++push++`]]
  3811. :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-[`++lowerLookup++`]]
  3812. :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-[`++upperLookup++`]]
  3813. :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-[`++upperLookupRecent++`]]
  3814. :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace160-[`++latest++`]]
  3815. :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-[`++latestCheckpoint++`]]
  3816. :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace160-[`++length++`]]
  3817. :at: pass:normal[xref:#Checkpoints-at-struct-Checkpoints-Trace160-uint32-[`++at++`]]
  3818. [.contract]
  3819. [[Checkpoints]]
  3820. === `++Checkpoints++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/Checkpoints.sol[{github-icon},role=heading-link]
  3821. [.hljs-theme-light.nopadding]
  3822. ```solidity
  3823. import "@openzeppelin/contracts/utils/structs/Checkpoints.sol";
  3824. ```
  3825. This library defines the `Trace*` struct, for checkpointing values as they change at different points in
  3826. time, and later looking up past values by block number. See {Votes} as an example.
  3827. To create a history of checkpoints define a variable type `Checkpoints.Trace*` in your contract, and store a new
  3828. checkpoint for the current transaction block using the {push} function.
  3829. [.contract-index]
  3830. .Functions
  3831. --
  3832. * {xref-Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-}[`++push(self, key, value)++`]
  3833. * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-}[`++lowerLookup(self, key)++`]
  3834. * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-}[`++upperLookup(self, key)++`]
  3835. * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-}[`++upperLookupRecent(self, key)++`]
  3836. * {xref-Checkpoints-latest-struct-Checkpoints-Trace224-}[`++latest(self)++`]
  3837. * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-}[`++latestCheckpoint(self)++`]
  3838. * {xref-Checkpoints-length-struct-Checkpoints-Trace224-}[`++length(self)++`]
  3839. * {xref-Checkpoints-at-struct-Checkpoints-Trace224-uint32-}[`++at(self, pos)++`]
  3840. * {xref-Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-}[`++push(self, key, value)++`]
  3841. * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-}[`++lowerLookup(self, key)++`]
  3842. * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-}[`++upperLookup(self, key)++`]
  3843. * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-}[`++upperLookupRecent(self, key)++`]
  3844. * {xref-Checkpoints-latest-struct-Checkpoints-Trace208-}[`++latest(self)++`]
  3845. * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-}[`++latestCheckpoint(self)++`]
  3846. * {xref-Checkpoints-length-struct-Checkpoints-Trace208-}[`++length(self)++`]
  3847. * {xref-Checkpoints-at-struct-Checkpoints-Trace208-uint32-}[`++at(self, pos)++`]
  3848. * {xref-Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-}[`++push(self, key, value)++`]
  3849. * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-}[`++lowerLookup(self, key)++`]
  3850. * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-}[`++upperLookup(self, key)++`]
  3851. * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-}[`++upperLookupRecent(self, key)++`]
  3852. * {xref-Checkpoints-latest-struct-Checkpoints-Trace160-}[`++latest(self)++`]
  3853. * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-}[`++latestCheckpoint(self)++`]
  3854. * {xref-Checkpoints-length-struct-Checkpoints-Trace160-}[`++length(self)++`]
  3855. * {xref-Checkpoints-at-struct-Checkpoints-Trace160-uint32-}[`++at(self, pos)++`]
  3856. --
  3857. [.contract-index]
  3858. .Errors
  3859. --
  3860. * {xref-Checkpoints-CheckpointUnorderedInsertion--}[`++CheckpointUnorderedInsertion()++`]
  3861. --
  3862. [.contract-item]
  3863. [[Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-]]
  3864. ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace224 self, uint32 key, uint224 value) → uint224 oldValue, uint224 newValue++` [.item-kind]#internal#
  3865. Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint.
  3866. Returns previous value and new value.
  3867. IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint32).max` key set will disable the
  3868. library.
  3869. [.contract-item]
  3870. [[Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-]]
  3871. ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace224 self, uint32 key) → uint224++` [.item-kind]#internal#
  3872. Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
  3873. there is none.
  3874. [.contract-item]
  3875. [[Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-]]
  3876. ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace224 self, uint32 key) → uint224++` [.item-kind]#internal#
  3877. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  3878. if there is none.
  3879. [.contract-item]
  3880. [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-]]
  3881. ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace224 self, uint32 key) → uint224++` [.item-kind]#internal#
  3882. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  3883. if there is none.
  3884. NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high
  3885. keys).
  3886. [.contract-item]
  3887. [[Checkpoints-latest-struct-Checkpoints-Trace224-]]
  3888. ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace224 self) → uint224++` [.item-kind]#internal#
  3889. Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
  3890. [.contract-item]
  3891. [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-]]
  3892. ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace224 self) → bool exists, uint32 _key, uint224 _value++` [.item-kind]#internal#
  3893. Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
  3894. in the most recent checkpoint.
  3895. [.contract-item]
  3896. [[Checkpoints-length-struct-Checkpoints-Trace224-]]
  3897. ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace224 self) → uint256++` [.item-kind]#internal#
  3898. Returns the number of checkpoint.
  3899. [.contract-item]
  3900. [[Checkpoints-at-struct-Checkpoints-Trace224-uint32-]]
  3901. ==== `[.contract-item-name]#++at++#++(struct Checkpoints.Trace224 self, uint32 pos) → struct Checkpoints.Checkpoint224++` [.item-kind]#internal#
  3902. Returns checkpoint at given position.
  3903. [.contract-item]
  3904. [[Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-]]
  3905. ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace208 self, uint48 key, uint208 value) → uint208 oldValue, uint208 newValue++` [.item-kind]#internal#
  3906. Pushes a (`key`, `value`) pair into a Trace208 so that it is stored as the checkpoint.
  3907. Returns previous value and new value.
  3908. IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint48).max` key set will disable the
  3909. library.
  3910. [.contract-item]
  3911. [[Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-]]
  3912. ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace208 self, uint48 key) → uint208++` [.item-kind]#internal#
  3913. Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
  3914. there is none.
  3915. [.contract-item]
  3916. [[Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-]]
  3917. ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace208 self, uint48 key) → uint208++` [.item-kind]#internal#
  3918. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  3919. if there is none.
  3920. [.contract-item]
  3921. [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-]]
  3922. ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace208 self, uint48 key) → uint208++` [.item-kind]#internal#
  3923. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  3924. if there is none.
  3925. NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high
  3926. keys).
  3927. [.contract-item]
  3928. [[Checkpoints-latest-struct-Checkpoints-Trace208-]]
  3929. ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace208 self) → uint208++` [.item-kind]#internal#
  3930. Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
  3931. [.contract-item]
  3932. [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-]]
  3933. ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace208 self) → bool exists, uint48 _key, uint208 _value++` [.item-kind]#internal#
  3934. Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
  3935. in the most recent checkpoint.
  3936. [.contract-item]
  3937. [[Checkpoints-length-struct-Checkpoints-Trace208-]]
  3938. ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace208 self) → uint256++` [.item-kind]#internal#
  3939. Returns the number of checkpoint.
  3940. [.contract-item]
  3941. [[Checkpoints-at-struct-Checkpoints-Trace208-uint32-]]
  3942. ==== `[.contract-item-name]#++at++#++(struct Checkpoints.Trace208 self, uint32 pos) → struct Checkpoints.Checkpoint208++` [.item-kind]#internal#
  3943. Returns checkpoint at given position.
  3944. [.contract-item]
  3945. [[Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-]]
  3946. ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace160 self, uint96 key, uint160 value) → uint160 oldValue, uint160 newValue++` [.item-kind]#internal#
  3947. Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint.
  3948. Returns previous value and new value.
  3949. IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint96).max` key set will disable the
  3950. library.
  3951. [.contract-item]
  3952. [[Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-]]
  3953. ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace160 self, uint96 key) → uint160++` [.item-kind]#internal#
  3954. Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
  3955. there is none.
  3956. [.contract-item]
  3957. [[Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-]]
  3958. ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace160 self, uint96 key) → uint160++` [.item-kind]#internal#
  3959. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  3960. if there is none.
  3961. [.contract-item]
  3962. [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-]]
  3963. ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace160 self, uint96 key) → uint160++` [.item-kind]#internal#
  3964. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
  3965. if there is none.
  3966. NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high
  3967. keys).
  3968. [.contract-item]
  3969. [[Checkpoints-latest-struct-Checkpoints-Trace160-]]
  3970. ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace160 self) → uint160++` [.item-kind]#internal#
  3971. Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
  3972. [.contract-item]
  3973. [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-]]
  3974. ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace160 self) → bool exists, uint96 _key, uint160 _value++` [.item-kind]#internal#
  3975. Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
  3976. in the most recent checkpoint.
  3977. [.contract-item]
  3978. [[Checkpoints-length-struct-Checkpoints-Trace160-]]
  3979. ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace160 self) → uint256++` [.item-kind]#internal#
  3980. Returns the number of checkpoint.
  3981. [.contract-item]
  3982. [[Checkpoints-at-struct-Checkpoints-Trace160-uint32-]]
  3983. ==== `[.contract-item-name]#++at++#++(struct Checkpoints.Trace160 self, uint32 pos) → struct Checkpoints.Checkpoint160++` [.item-kind]#internal#
  3984. Returns checkpoint at given position.
  3985. [.contract-item]
  3986. [[Checkpoints-CheckpointUnorderedInsertion--]]
  3987. ==== `[.contract-item-name]#++CheckpointUnorderedInsertion++#++()++` [.item-kind]#error#
  3988. A value was attempted to be inserted on a past checkpoint.
  3989. :Uint256Heap: pass:normal[xref:#Heap-Uint256Heap[`++Uint256Heap++`]]
  3990. :peek: pass:normal[xref:#Heap-peek-struct-Heap-Uint256Heap-[`++peek++`]]
  3991. :pop: pass:normal[xref:#Heap-pop-struct-Heap-Uint256Heap-[`++pop++`]]
  3992. :pop: pass:normal[xref:#Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--[`++pop++`]]
  3993. :insert: pass:normal[xref:#Heap-insert-struct-Heap-Uint256Heap-uint256-[`++insert++`]]
  3994. :insert: pass:normal[xref:#Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--[`++insert++`]]
  3995. :replace: pass:normal[xref:#Heap-replace-struct-Heap-Uint256Heap-uint256-[`++replace++`]]
  3996. :replace: pass:normal[xref:#Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--[`++replace++`]]
  3997. :length: pass:normal[xref:#Heap-length-struct-Heap-Uint256Heap-[`++length++`]]
  3998. :clear: pass:normal[xref:#Heap-clear-struct-Heap-Uint256Heap-[`++clear++`]]
  3999. [.contract]
  4000. [[Heap]]
  4001. === `++Heap++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/Heap.sol[{github-icon},role=heading-link]
  4002. [.hljs-theme-light.nopadding]
  4003. ```solidity
  4004. import "@openzeppelin/contracts/utils/structs/Heap.sol";
  4005. ```
  4006. Library for managing https://en.wikipedia.org/wiki/Binary_heap[binary heap] that can be used as
  4007. https://en.wikipedia.org/wiki/Priority_queue[priority queue].
  4008. Heaps are represented as a tree of values where the first element (index 0) is the root, and where the node at
  4009. 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
  4010. stores an element of the heap.
  4011. The structure is ordered so that each node is bigger than its parent. An immediate consequence is that the
  4012. highest priority value is the one at the root. This value can be looked up in constant time (O(1)) at
  4013. `heap.tree[0]`
  4014. The structure is designed to perform the following operations with the corresponding complexities:
  4015. * peek (get the highest priority value): O(1)
  4016. * insert (insert a value): O(log(n))
  4017. * pop (remove the highest priority value): O(log(n))
  4018. * replace (replace the highest priority value with a new value): O(log(n))
  4019. * length (get the number of elements): O(1)
  4020. * clear (remove all elements): O(1)
  4021. IMPORTANT: This library allows for the use of custom comparator functions. Given that manipulating
  4022. memory can lead to unexpected behavior. Consider verifying that the comparator does not manipulate
  4023. the Heap's state directly and that it follows the Solidity memory safety rules.
  4024. _Available since v5.1._
  4025. [.contract-index]
  4026. .Functions
  4027. --
  4028. * {xref-Heap-peek-struct-Heap-Uint256Heap-}[`++peek(self)++`]
  4029. * {xref-Heap-pop-struct-Heap-Uint256Heap-}[`++pop(self)++`]
  4030. * {xref-Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--}[`++pop(self, comp)++`]
  4031. * {xref-Heap-insert-struct-Heap-Uint256Heap-uint256-}[`++insert(self, value)++`]
  4032. * {xref-Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--}[`++insert(self, value, comp)++`]
  4033. * {xref-Heap-replace-struct-Heap-Uint256Heap-uint256-}[`++replace(self, newValue)++`]
  4034. * {xref-Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--}[`++replace(self, newValue, comp)++`]
  4035. * {xref-Heap-length-struct-Heap-Uint256Heap-}[`++length(self)++`]
  4036. * {xref-Heap-clear-struct-Heap-Uint256Heap-}[`++clear(self)++`]
  4037. --
  4038. [.contract-item]
  4039. [[Heap-peek-struct-Heap-Uint256Heap-]]
  4040. ==== `[.contract-item-name]#++peek++#++(struct Heap.Uint256Heap self) → uint256++` [.item-kind]#internal#
  4041. Lookup the root element of the heap.
  4042. [.contract-item]
  4043. [[Heap-pop-struct-Heap-Uint256Heap-]]
  4044. ==== `[.contract-item-name]#++pop++#++(struct Heap.Uint256Heap self) → uint256++` [.item-kind]#internal#
  4045. Remove (and return) the root element for the heap using the default comparator.
  4046. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4047. during the lifecycle of a heap will result in undefined behavior.
  4048. [.contract-item]
  4049. [[Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--]]
  4050. ==== `[.contract-item-name]#++pop++#++(struct Heap.Uint256Heap self, function (uint256,uint256) view returns (bool) comp) → uint256++` [.item-kind]#internal#
  4051. Remove (and return) the root element for the heap using the provided comparator.
  4052. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4053. during the lifecycle of a heap will result in undefined behavior.
  4054. [.contract-item]
  4055. [[Heap-insert-struct-Heap-Uint256Heap-uint256-]]
  4056. ==== `[.contract-item-name]#++insert++#++(struct Heap.Uint256Heap self, uint256 value)++` [.item-kind]#internal#
  4057. Insert a new element in the heap using the default comparator.
  4058. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4059. during the lifecycle of a heap will result in undefined behavior.
  4060. [.contract-item]
  4061. [[Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--]]
  4062. ==== `[.contract-item-name]#++insert++#++(struct Heap.Uint256Heap self, uint256 value, function (uint256,uint256) view returns (bool) comp)++` [.item-kind]#internal#
  4063. Insert a new element in the heap using the provided comparator.
  4064. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4065. during the lifecycle of a heap will result in undefined behavior.
  4066. [.contract-item]
  4067. [[Heap-replace-struct-Heap-Uint256Heap-uint256-]]
  4068. ==== `[.contract-item-name]#++replace++#++(struct Heap.Uint256Heap self, uint256 newValue) → uint256++` [.item-kind]#internal#
  4069. Return the root element for the heap, and replace it with a new value, using the default comparator.
  4070. This is equivalent to using {pop} and {insert}, but requires only one rebalancing operation.
  4071. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4072. during the lifecycle of a heap will result in undefined behavior.
  4073. [.contract-item]
  4074. [[Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--]]
  4075. ==== `[.contract-item-name]#++replace++#++(struct Heap.Uint256Heap self, uint256 newValue, function (uint256,uint256) view returns (bool) comp) → uint256++` [.item-kind]#internal#
  4076. Return the root element for the heap, and replace it with a new value, using the provided comparator.
  4077. This is equivalent to using {pop} and {insert}, but requires only one rebalancing operation.
  4078. NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
  4079. during the lifecycle of a heap will result in undefined behavior.
  4080. [.contract-item]
  4081. [[Heap-length-struct-Heap-Uint256Heap-]]
  4082. ==== `[.contract-item-name]#++length++#++(struct Heap.Uint256Heap self) → uint256++` [.item-kind]#internal#
  4083. Returns the number of elements in the heap.
  4084. [.contract-item]
  4085. [[Heap-clear-struct-Heap-Uint256Heap-]]
  4086. ==== `[.contract-item-name]#++clear++#++(struct Heap.Uint256Heap self)++` [.item-kind]#internal#
  4087. Removes all elements in the heap.
  4088. :Bytes32PushTree: pass:normal[xref:#MerkleTree-Bytes32PushTree[`++Bytes32PushTree++`]]
  4089. :setup: pass:normal[xref:#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-[`++setup++`]]
  4090. :setup: pass:normal[xref:#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++setup++`]]
  4091. :push: pass:normal[xref:#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-[`++push++`]]
  4092. :push: pass:normal[xref:#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++push++`]]
  4093. :depth: pass:normal[xref:#MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-[`++depth++`]]
  4094. [.contract]
  4095. [[MerkleTree]]
  4096. === `++MerkleTree++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/MerkleTree.sol[{github-icon},role=heading-link]
  4097. [.hljs-theme-light.nopadding]
  4098. ```solidity
  4099. import "@openzeppelin/contracts/utils/structs/MerkleTree.sol";
  4100. ```
  4101. Library for managing https://wikipedia.org/wiki/Merkle_Tree[Merkle Tree] data structures.
  4102. Each tree is a complete binary tree with the ability to sequentially insert leaves, changing them from a zero to a
  4103. non-zero value and updating its root. This structure allows inserting commitments (or other entries) that are not
  4104. stored, but can be proven to be part of the tree at a later time if the root is kept. See {MerkleProof}.
  4105. A tree is defined by the following parameters:
  4106. * Depth: The number of levels in the tree, it also defines the maximum number of leaves as 2**depth.
  4107. * Zero value: The value that represents an empty leaf. Used to avoid regular zero values to be part of the tree.
  4108. * Hashing function: A cryptographic hash function used to produce internal nodes. Defaults to {Hashes-commutativeKeccak256}.
  4109. NOTE: Building trees using non-commutative hashing functions (i.e. `H(a, b) != H(b, a)`) is supported. However,
  4110. proving the inclusion of a leaf in such trees is not possible with the {MerkleProof} library since it only supports
  4111. _commutative_ hashing functions.
  4112. _Available since v5.1._
  4113. [.contract-index]
  4114. .Functions
  4115. --
  4116. * {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[`++setup(self, treeDepth, zero)++`]
  4117. * {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++setup(self, treeDepth, zero, fnHash)++`]
  4118. * {xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-}[`++push(self, leaf)++`]
  4119. * {xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++push(self, leaf, fnHash)++`]
  4120. * {xref-MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-}[`++depth(self)++`]
  4121. --
  4122. [.contract-item]
  4123. [[MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-]]
  4124. ==== `[.contract-item-name]#++setup++#++(struct MerkleTree.Bytes32PushTree self, uint8 treeDepth, bytes32 zero) → bytes32 initialRoot++` [.item-kind]#internal#
  4125. Initialize a {Bytes32PushTree} using {Hashes-commutativeKeccak256} to hash internal nodes.
  4126. The capacity of the tree (i.e. number of leaves) is set to `2**treeDepth`.
  4127. Calling this function on MerkleTree that was already setup and used will reset it to a blank state.
  4128. Once a tree is setup, any push to it must use the same hashing function. This means that values
  4129. should be pushed to it using the default {xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-}[push] function.
  4130. IMPORTANT: The zero value should be carefully chosen since it will be stored in the tree representing
  4131. empty leaves. It should be a value that is not expected to be part of the tree.
  4132. [.contract-item]
  4133. [[MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  4134. ==== `[.contract-item-name]#++setup++#++(struct MerkleTree.Bytes32PushTree self, uint8 treeDepth, bytes32 zero, function (bytes32,bytes32) view returns (bytes32) fnHash) → bytes32 initialRoot++` [.item-kind]#internal#
  4135. Same as {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[setup], but allows to specify a custom hashing function.
  4136. Once a tree is setup, any push to it must use the same hashing function. This means that values
  4137. should be pushed to it using the custom push function, which should be the same one as used during the setup.
  4138. IMPORTANT: Providing a custom hashing function is a security-sensitive operation since it may
  4139. compromise the soundness of the tree.
  4140. NOTE: Consider verifying that the hashing function does not manipulate the memory state directly and that it
  4141. follows the Solidity memory safety rules. Otherwise, it may lead to unexpected behavior.
  4142. [.contract-item]
  4143. [[MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-]]
  4144. ==== `[.contract-item-name]#++push++#++(struct MerkleTree.Bytes32PushTree self, bytes32 leaf) → uint256 index, bytes32 newRoot++` [.item-kind]#internal#
  4145. Insert a new leaf in the tree, and compute the new root. Returns the position of the inserted leaf in the
  4146. tree, and the resulting root.
  4147. Hashing the leaf before calling this function is recommended as a protection against
  4148. second pre-image attacks.
  4149. This variant uses {Hashes-commutativeKeccak256} to hash internal nodes. It should only be used on merkle trees
  4150. that were setup using the same (default) hashing function (i.e. by calling
  4151. {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[the default setup] function).
  4152. [.contract-item]
  4153. [[MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
  4154. ==== `[.contract-item-name]#++push++#++(struct MerkleTree.Bytes32PushTree self, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) fnHash) → uint256 index, bytes32 newRoot++` [.item-kind]#internal#
  4155. Insert a new leaf in the tree, and compute the new root. Returns the position of the inserted leaf in the
  4156. tree, and the resulting root.
  4157. Hashing the leaf before calling this function is recommended as a protection against
  4158. second pre-image attacks.
  4159. This variant uses a custom hashing function to hash internal nodes. It should only be called with the same
  4160. function as the one used during the initial setup of the merkle tree.
  4161. [.contract-item]
  4162. [[MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-]]
  4163. ==== `[.contract-item-name]#++depth++#++(struct MerkleTree.Bytes32PushTree self) → uint256++` [.item-kind]#internal#
  4164. Tree's depth (set at initialization)
  4165. == Libraries
  4166. :Create2EmptyBytecode: pass:normal[xref:#Create2-Create2EmptyBytecode--[`++Create2EmptyBytecode++`]]
  4167. :deploy: pass:normal[xref:#Create2-deploy-uint256-bytes32-bytes-[`++deploy++`]]
  4168. :computeAddress: pass:normal[xref:#Create2-computeAddress-bytes32-bytes32-[`++computeAddress++`]]
  4169. :computeAddress: pass:normal[xref:#Create2-computeAddress-bytes32-bytes32-address-[`++computeAddress++`]]
  4170. [.contract]
  4171. [[Create2]]
  4172. === `++Create2++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Create2.sol[{github-icon},role=heading-link]
  4173. [.hljs-theme-light.nopadding]
  4174. ```solidity
  4175. import "@openzeppelin/contracts/utils/Create2.sol";
  4176. ```
  4177. Helper to make usage of the `CREATE2` EVM opcode easier and safer.
  4178. `CREATE2` can be used to compute in advance the address where a smart
  4179. contract will be deployed, which allows for interesting new mechanisms known
  4180. as 'counterfactual interactions'.
  4181. See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
  4182. information.
  4183. [.contract-index]
  4184. .Functions
  4185. --
  4186. * {xref-Create2-deploy-uint256-bytes32-bytes-}[`++deploy(amount, salt, bytecode)++`]
  4187. * {xref-Create2-computeAddress-bytes32-bytes32-}[`++computeAddress(salt, bytecodeHash)++`]
  4188. * {xref-Create2-computeAddress-bytes32-bytes32-address-}[`++computeAddress(salt, bytecodeHash, deployer)++`]
  4189. --
  4190. [.contract-index]
  4191. .Errors
  4192. --
  4193. * {xref-Create2-Create2EmptyBytecode--}[`++Create2EmptyBytecode()++`]
  4194. --
  4195. [.contract-item]
  4196. [[Create2-deploy-uint256-bytes32-bytes-]]
  4197. ==== `[.contract-item-name]#++deploy++#++(uint256 amount, bytes32 salt, bytes bytecode) → address addr++` [.item-kind]#internal#
  4198. Deploys a contract using `CREATE2`. The address where the contract
  4199. will be deployed can be known in advance via {computeAddress}.
  4200. The bytecode for a contract can be obtained from Solidity with
  4201. `type(contractName).creationCode`.
  4202. Requirements:
  4203. - `bytecode` must not be empty.
  4204. - `salt` must have not been used for `bytecode` already.
  4205. - the factory must have a balance of at least `amount`.
  4206. - if `amount` is non-zero, `bytecode` must have a `payable` constructor.
  4207. [.contract-item]
  4208. [[Create2-computeAddress-bytes32-bytes32-]]
  4209. ==== `[.contract-item-name]#++computeAddress++#++(bytes32 salt, bytes32 bytecodeHash) → address++` [.item-kind]#internal#
  4210. Returns the address where a contract will be stored if deployed via {deploy}. Any change in the
  4211. `bytecodeHash` or `salt` will result in a new destination address.
  4212. [.contract-item]
  4213. [[Create2-computeAddress-bytes32-bytes32-address-]]
  4214. ==== `[.contract-item-name]#++computeAddress++#++(bytes32 salt, bytes32 bytecodeHash, address deployer) → address addr++` [.item-kind]#internal#
  4215. Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
  4216. `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
  4217. [.contract-item]
  4218. [[Create2-Create2EmptyBytecode--]]
  4219. ==== `[.contract-item-name]#++Create2EmptyBytecode++#++()++` [.item-kind]#error#
  4220. There's no code to deploy.
  4221. :AddressEmptyCode: pass:normal[xref:#Address-AddressEmptyCode-address-[`++AddressEmptyCode++`]]
  4222. :sendValue: pass:normal[xref:#Address-sendValue-address-payable-uint256-[`++sendValue++`]]
  4223. :functionCall: pass:normal[xref:#Address-functionCall-address-bytes-[`++functionCall++`]]
  4224. :functionCallWithValue: pass:normal[xref:#Address-functionCallWithValue-address-bytes-uint256-[`++functionCallWithValue++`]]
  4225. :functionStaticCall: pass:normal[xref:#Address-functionStaticCall-address-bytes-[`++functionStaticCall++`]]
  4226. :functionDelegateCall: pass:normal[xref:#Address-functionDelegateCall-address-bytes-[`++functionDelegateCall++`]]
  4227. :verifyCallResultFromTarget: pass:normal[xref:#Address-verifyCallResultFromTarget-address-bool-bytes-[`++verifyCallResultFromTarget++`]]
  4228. :verifyCallResult: pass:normal[xref:#Address-verifyCallResult-bool-bytes-[`++verifyCallResult++`]]
  4229. [.contract]
  4230. [[Address]]
  4231. === `++Address++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Address.sol[{github-icon},role=heading-link]
  4232. [.hljs-theme-light.nopadding]
  4233. ```solidity
  4234. import "@openzeppelin/contracts/utils/Address.sol";
  4235. ```
  4236. Collection of functions related to the address type
  4237. [.contract-index]
  4238. .Functions
  4239. --
  4240. * {xref-Address-sendValue-address-payable-uint256-}[`++sendValue(recipient, amount)++`]
  4241. * {xref-Address-functionCall-address-bytes-}[`++functionCall(target, data)++`]
  4242. * {xref-Address-functionCallWithValue-address-bytes-uint256-}[`++functionCallWithValue(target, data, value)++`]
  4243. * {xref-Address-functionStaticCall-address-bytes-}[`++functionStaticCall(target, data)++`]
  4244. * {xref-Address-functionDelegateCall-address-bytes-}[`++functionDelegateCall(target, data)++`]
  4245. * {xref-Address-verifyCallResultFromTarget-address-bool-bytes-}[`++verifyCallResultFromTarget(target, success, returndata)++`]
  4246. * {xref-Address-verifyCallResult-bool-bytes-}[`++verifyCallResult(success, returndata)++`]
  4247. --
  4248. [.contract-index]
  4249. .Errors
  4250. --
  4251. * {xref-Address-AddressEmptyCode-address-}[`++AddressEmptyCode(target)++`]
  4252. --
  4253. [.contract-item]
  4254. [[Address-sendValue-address-payable-uint256-]]
  4255. ==== `[.contract-item-name]#++sendValue++#++(address payable recipient, uint256 amount)++` [.item-kind]#internal#
  4256. Replacement for Solidity's `transfer`: sends `amount` wei to
  4257. `recipient`, forwarding all available gas and reverting on errors.
  4258. https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
  4259. of certain opcodes, possibly making contracts go over the 2300 gas limit
  4260. imposed by `transfer`, making them unable to receive funds via
  4261. `transfer`. {sendValue} removes this limitation.
  4262. https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
  4263. IMPORTANT: because control is transferred to `recipient`, care must be
  4264. taken to not create reentrancy vulnerabilities. Consider using
  4265. {ReentrancyGuard} or the
  4266. https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
  4267. [.contract-item]
  4268. [[Address-functionCall-address-bytes-]]
  4269. ==== `[.contract-item-name]#++functionCall++#++(address target, bytes data) → bytes++` [.item-kind]#internal#
  4270. Performs a Solidity function call using a low level `call`. A
  4271. plain `call` is an unsafe replacement for a function call: use this
  4272. function instead.
  4273. If `target` reverts with a revert reason or custom error, it is bubbled
  4274. up by this function (like regular Solidity function calls). However, if
  4275. the call reverted with no returned reason, this function reverts with a
  4276. {Errors.FailedCall} error.
  4277. Returns the raw returned data. To convert to the expected return value,
  4278. use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
  4279. Requirements:
  4280. - `target` must be a contract.
  4281. - calling `target` with `data` must not revert.
  4282. [.contract-item]
  4283. [[Address-functionCallWithValue-address-bytes-uint256-]]
  4284. ==== `[.contract-item-name]#++functionCallWithValue++#++(address target, bytes data, uint256 value) → bytes++` [.item-kind]#internal#
  4285. Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
  4286. but also transferring `value` wei to `target`.
  4287. Requirements:
  4288. - the calling contract must have an ETH balance of at least `value`.
  4289. - the called Solidity function must be `payable`.
  4290. [.contract-item]
  4291. [[Address-functionStaticCall-address-bytes-]]
  4292. ==== `[.contract-item-name]#++functionStaticCall++#++(address target, bytes data) → bytes++` [.item-kind]#internal#
  4293. Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
  4294. but performing a static call.
  4295. [.contract-item]
  4296. [[Address-functionDelegateCall-address-bytes-]]
  4297. ==== `[.contract-item-name]#++functionDelegateCall++#++(address target, bytes data) → bytes++` [.item-kind]#internal#
  4298. Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
  4299. but performing a delegate call.
  4300. [.contract-item]
  4301. [[Address-verifyCallResultFromTarget-address-bool-bytes-]]
  4302. ==== `[.contract-item-name]#++verifyCallResultFromTarget++#++(address target, bool success, bytes returndata) → bytes++` [.item-kind]#internal#
  4303. Tool to verify that a low level call to smart-contract was successful, and reverts if the target
  4304. was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
  4305. of an unsuccessful call.
  4306. [.contract-item]
  4307. [[Address-verifyCallResult-bool-bytes-]]
  4308. ==== `[.contract-item-name]#++verifyCallResult++#++(bool success, bytes returndata) → bytes++` [.item-kind]#internal#
  4309. Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
  4310. revert reason or with a default {Errors.FailedCall} error.
  4311. [.contract-item]
  4312. [[Address-AddressEmptyCode-address-]]
  4313. ==== `[.contract-item-name]#++AddressEmptyCode++#++(address target)++` [.item-kind]#error#
  4314. There's no code at `target` (it is not a contract).
  4315. :sort: pass:normal[xref:#Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--[`++sort++`]]
  4316. :sort: pass:normal[xref:#Arrays-sort-uint256---[`++sort++`]]
  4317. :sort: pass:normal[xref:#Arrays-sort-address---function--address-address--pure-returns--bool--[`++sort++`]]
  4318. :sort: pass:normal[xref:#Arrays-sort-address---[`++sort++`]]
  4319. :sort: pass:normal[xref:#Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--[`++sort++`]]
  4320. :sort: pass:normal[xref:#Arrays-sort-bytes32---[`++sort++`]]
  4321. :findUpperBound: pass:normal[xref:#Arrays-findUpperBound-uint256---uint256-[`++findUpperBound++`]]
  4322. :lowerBound: pass:normal[xref:#Arrays-lowerBound-uint256---uint256-[`++lowerBound++`]]
  4323. :upperBound: pass:normal[xref:#Arrays-upperBound-uint256---uint256-[`++upperBound++`]]
  4324. :lowerBoundMemory: pass:normal[xref:#Arrays-lowerBoundMemory-uint256---uint256-[`++lowerBoundMemory++`]]
  4325. :upperBoundMemory: pass:normal[xref:#Arrays-upperBoundMemory-uint256---uint256-[`++upperBoundMemory++`]]
  4326. :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-address---uint256-[`++unsafeAccess++`]]
  4327. :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-bytes32---uint256-[`++unsafeAccess++`]]
  4328. :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-uint256---uint256-[`++unsafeAccess++`]]
  4329. :unsafeMemoryAccess: pass:normal[xref:#Arrays-unsafeMemoryAccess-address---uint256-[`++unsafeMemoryAccess++`]]
  4330. :unsafeMemoryAccess: pass:normal[xref:#Arrays-unsafeMemoryAccess-bytes32---uint256-[`++unsafeMemoryAccess++`]]
  4331. :unsafeMemoryAccess: pass:normal[xref:#Arrays-unsafeMemoryAccess-uint256---uint256-[`++unsafeMemoryAccess++`]]
  4332. :unsafeSetLength: pass:normal[xref:#Arrays-unsafeSetLength-address---uint256-[`++unsafeSetLength++`]]
  4333. :unsafeSetLength: pass:normal[xref:#Arrays-unsafeSetLength-bytes32---uint256-[`++unsafeSetLength++`]]
  4334. :unsafeSetLength: pass:normal[xref:#Arrays-unsafeSetLength-uint256---uint256-[`++unsafeSetLength++`]]
  4335. [.contract]
  4336. [[Arrays]]
  4337. === `++Arrays++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Arrays.sol[{github-icon},role=heading-link]
  4338. [.hljs-theme-light.nopadding]
  4339. ```solidity
  4340. import "@openzeppelin/contracts/utils/Arrays.sol";
  4341. ```
  4342. Collection of functions related to array types.
  4343. [.contract-index]
  4344. .Functions
  4345. --
  4346. * {xref-Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--}[`++sort(array, comp)++`]
  4347. * {xref-Arrays-sort-uint256---}[`++sort(array)++`]
  4348. * {xref-Arrays-sort-address---function--address-address--pure-returns--bool--}[`++sort(array, comp)++`]
  4349. * {xref-Arrays-sort-address---}[`++sort(array)++`]
  4350. * {xref-Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--}[`++sort(array, comp)++`]
  4351. * {xref-Arrays-sort-bytes32---}[`++sort(array)++`]
  4352. * {xref-Arrays-findUpperBound-uint256---uint256-}[`++findUpperBound(array, element)++`]
  4353. * {xref-Arrays-lowerBound-uint256---uint256-}[`++lowerBound(array, element)++`]
  4354. * {xref-Arrays-upperBound-uint256---uint256-}[`++upperBound(array, element)++`]
  4355. * {xref-Arrays-lowerBoundMemory-uint256---uint256-}[`++lowerBoundMemory(array, element)++`]
  4356. * {xref-Arrays-upperBoundMemory-uint256---uint256-}[`++upperBoundMemory(array, element)++`]
  4357. * {xref-Arrays-unsafeAccess-address---uint256-}[`++unsafeAccess(arr, pos)++`]
  4358. * {xref-Arrays-unsafeAccess-bytes32---uint256-}[`++unsafeAccess(arr, pos)++`]
  4359. * {xref-Arrays-unsafeAccess-uint256---uint256-}[`++unsafeAccess(arr, pos)++`]
  4360. * {xref-Arrays-unsafeMemoryAccess-address---uint256-}[`++unsafeMemoryAccess(arr, pos)++`]
  4361. * {xref-Arrays-unsafeMemoryAccess-bytes32---uint256-}[`++unsafeMemoryAccess(arr, pos)++`]
  4362. * {xref-Arrays-unsafeMemoryAccess-uint256---uint256-}[`++unsafeMemoryAccess(arr, pos)++`]
  4363. * {xref-Arrays-unsafeSetLength-address---uint256-}[`++unsafeSetLength(array, len)++`]
  4364. * {xref-Arrays-unsafeSetLength-bytes32---uint256-}[`++unsafeSetLength(array, len)++`]
  4365. * {xref-Arrays-unsafeSetLength-uint256---uint256-}[`++unsafeSetLength(array, len)++`]
  4366. --
  4367. [.contract-item]
  4368. [[Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--]]
  4369. ==== `[.contract-item-name]#++sort++#++(uint256[] array, function (uint256,uint256) pure returns (bool) comp) → uint256[]++` [.item-kind]#internal#
  4370. Sort an array of uint256 (in memory) following the provided comparator function.
  4371. This function does the sorting "in place", meaning that it overrides the input. The object is returned for
  4372. convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array.
  4373. 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
  4374. array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
  4375. when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
  4376. consume more gas than is available in a block, leading to potential DoS.
  4377. IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
  4378. [.contract-item]
  4379. [[Arrays-sort-uint256---]]
  4380. ==== `[.contract-item-name]#++sort++#++(uint256[] array) → uint256[]++` [.item-kind]#internal#
  4381. Variant of {sort} that sorts an array of uint256 in increasing order.
  4382. [.contract-item]
  4383. [[Arrays-sort-address---function--address-address--pure-returns--bool--]]
  4384. ==== `[.contract-item-name]#++sort++#++(address[] array, function (address,address) pure returns (bool) comp) → address[]++` [.item-kind]#internal#
  4385. Sort an array of address (in memory) following the provided comparator function.
  4386. This function does the sorting "in place", meaning that it overrides the input. The object is returned for
  4387. convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array.
  4388. 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
  4389. array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
  4390. when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
  4391. consume more gas than is available in a block, leading to potential DoS.
  4392. IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
  4393. [.contract-item]
  4394. [[Arrays-sort-address---]]
  4395. ==== `[.contract-item-name]#++sort++#++(address[] array) → address[]++` [.item-kind]#internal#
  4396. Variant of {sort} that sorts an array of address in increasing order.
  4397. [.contract-item]
  4398. [[Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--]]
  4399. ==== `[.contract-item-name]#++sort++#++(bytes32[] array, function (bytes32,bytes32) pure returns (bool) comp) → bytes32[]++` [.item-kind]#internal#
  4400. Sort an array of bytes32 (in memory) following the provided comparator function.
  4401. This function does the sorting "in place", meaning that it overrides the input. The object is returned for
  4402. convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array.
  4403. 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
  4404. array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
  4405. when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
  4406. consume more gas than is available in a block, leading to potential DoS.
  4407. IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
  4408. [.contract-item]
  4409. [[Arrays-sort-bytes32---]]
  4410. ==== `[.contract-item-name]#++sort++#++(bytes32[] array) → bytes32[]++` [.item-kind]#internal#
  4411. Variant of {sort} that sorts an array of bytes32 in increasing order.
  4412. [.contract-item]
  4413. [[Arrays-findUpperBound-uint256---uint256-]]
  4414. ==== `[.contract-item-name]#++findUpperBound++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
  4415. Searches a sorted `array` and returns the first index that contains
  4416. a value greater or equal to `element`. If no such index exists (i.e. all
  4417. values in the array are strictly less than `element`), the array length is
  4418. returned. Time complexity O(log n).
  4419. NOTE: The `array` is expected to be sorted in ascending order, and to
  4420. contain no repeated elements.
  4421. IMPORTANT: Deprecated. This implementation behaves as {lowerBound} but lacks
  4422. support for repeated elements in the array. The {lowerBound} function should
  4423. be used instead.
  4424. [.contract-item]
  4425. [[Arrays-lowerBound-uint256---uint256-]]
  4426. ==== `[.contract-item-name]#++lowerBound++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
  4427. Searches an `array` sorted in ascending order and returns the first
  4428. index that contains a value greater or equal than `element`. If no such index
  4429. exists (i.e. all values in the array are strictly less than `element`), the array
  4430. length is returned. Time complexity O(log n).
  4431. See C++'s https://en.cppreference.com/w/cpp/algorithm/lower_bound[lower_bound].
  4432. [.contract-item]
  4433. [[Arrays-upperBound-uint256---uint256-]]
  4434. ==== `[.contract-item-name]#++upperBound++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
  4435. Searches an `array` sorted in ascending order and returns the first
  4436. index that contains a value strictly greater than `element`. If no such index
  4437. exists (i.e. all values in the array are strictly less than `element`), the array
  4438. length is returned. Time complexity O(log n).
  4439. See C++'s https://en.cppreference.com/w/cpp/algorithm/upper_bound[upper_bound].
  4440. [.contract-item]
  4441. [[Arrays-lowerBoundMemory-uint256---uint256-]]
  4442. ==== `[.contract-item-name]#++lowerBoundMemory++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
  4443. Same as {lowerBound}, but with an array in memory.
  4444. [.contract-item]
  4445. [[Arrays-upperBoundMemory-uint256---uint256-]]
  4446. ==== `[.contract-item-name]#++upperBoundMemory++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
  4447. Same as {upperBound}, but with an array in memory.
  4448. [.contract-item]
  4449. [[Arrays-unsafeAccess-address---uint256-]]
  4450. ==== `[.contract-item-name]#++unsafeAccess++#++(address[] arr, uint256 pos) → struct StorageSlot.AddressSlot++` [.item-kind]#internal#
  4451. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4452. WARNING: Only use if you are certain `pos` is lower than the array length.
  4453. [.contract-item]
  4454. [[Arrays-unsafeAccess-bytes32---uint256-]]
  4455. ==== `[.contract-item-name]#++unsafeAccess++#++(bytes32[] arr, uint256 pos) → struct StorageSlot.Bytes32Slot++` [.item-kind]#internal#
  4456. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4457. WARNING: Only use if you are certain `pos` is lower than the array length.
  4458. [.contract-item]
  4459. [[Arrays-unsafeAccess-uint256---uint256-]]
  4460. ==== `[.contract-item-name]#++unsafeAccess++#++(uint256[] arr, uint256 pos) → struct StorageSlot.Uint256Slot++` [.item-kind]#internal#
  4461. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4462. WARNING: Only use if you are certain `pos` is lower than the array length.
  4463. [.contract-item]
  4464. [[Arrays-unsafeMemoryAccess-address---uint256-]]
  4465. ==== `[.contract-item-name]#++unsafeMemoryAccess++#++(address[] arr, uint256 pos) → address res++` [.item-kind]#internal#
  4466. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4467. WARNING: Only use if you are certain `pos` is lower than the array length.
  4468. [.contract-item]
  4469. [[Arrays-unsafeMemoryAccess-bytes32---uint256-]]
  4470. ==== `[.contract-item-name]#++unsafeMemoryAccess++#++(bytes32[] arr, uint256 pos) → bytes32 res++` [.item-kind]#internal#
  4471. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4472. WARNING: Only use if you are certain `pos` is lower than the array length.
  4473. [.contract-item]
  4474. [[Arrays-unsafeMemoryAccess-uint256---uint256-]]
  4475. ==== `[.contract-item-name]#++unsafeMemoryAccess++#++(uint256[] arr, uint256 pos) → uint256 res++` [.item-kind]#internal#
  4476. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  4477. WARNING: Only use if you are certain `pos` is lower than the array length.
  4478. [.contract-item]
  4479. [[Arrays-unsafeSetLength-address---uint256-]]
  4480. ==== `[.contract-item-name]#++unsafeSetLength++#++(address[] array, uint256 len)++` [.item-kind]#internal#
  4481. Helper to set the length of an dynamic array. Directly writing to `.length` is forbidden.
  4482. WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
  4483. [.contract-item]
  4484. [[Arrays-unsafeSetLength-bytes32---uint256-]]
  4485. ==== `[.contract-item-name]#++unsafeSetLength++#++(bytes32[] array, uint256 len)++` [.item-kind]#internal#
  4486. Helper to set the length of an dynamic array. Directly writing to `.length` is forbidden.
  4487. WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
  4488. [.contract-item]
  4489. [[Arrays-unsafeSetLength-uint256---uint256-]]
  4490. ==== `[.contract-item-name]#++unsafeSetLength++#++(uint256[] array, uint256 len)++` [.item-kind]#internal#
  4491. Helper to set the length of an dynamic array. Directly writing to `.length` is forbidden.
  4492. WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
  4493. :_TABLE: pass:normal[xref:#Base64-_TABLE-string[`++_TABLE++`]]
  4494. :_TABLE_URL: pass:normal[xref:#Base64-_TABLE_URL-string[`++_TABLE_URL++`]]
  4495. :encode: pass:normal[xref:#Base64-encode-bytes-[`++encode++`]]
  4496. :encodeURL: pass:normal[xref:#Base64-encodeURL-bytes-[`++encodeURL++`]]
  4497. [.contract]
  4498. [[Base64]]
  4499. === `++Base64++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Base64.sol[{github-icon},role=heading-link]
  4500. [.hljs-theme-light.nopadding]
  4501. ```solidity
  4502. import "@openzeppelin/contracts/utils/Base64.sol";
  4503. ```
  4504. Provides a set of functions to operate with Base64 strings.
  4505. [.contract-index]
  4506. .Functions
  4507. --
  4508. * {xref-Base64-encode-bytes-}[`++encode(data)++`]
  4509. * {xref-Base64-encodeURL-bytes-}[`++encodeURL(data)++`]
  4510. --
  4511. [.contract-index]
  4512. .Internal Variables
  4513. --
  4514. * {xref-Base64-_TABLE-string}[`++string constant _TABLE++`]
  4515. * {xref-Base64-_TABLE_URL-string}[`++string constant _TABLE_URL++`]
  4516. --
  4517. [.contract-item]
  4518. [[Base64-encode-bytes-]]
  4519. ==== `[.contract-item-name]#++encode++#++(bytes data) → string++` [.item-kind]#internal#
  4520. Converts a `bytes` to its Bytes64 `string` representation.
  4521. [.contract-item]
  4522. [[Base64-encodeURL-bytes-]]
  4523. ==== `[.contract-item-name]#++encodeURL++#++(bytes data) → string++` [.item-kind]#internal#
  4524. Converts a `bytes` to its Bytes64Url `string` representation.
  4525. Output is not padded with `=` as specified in https://www.rfc-editor.org/rfc/rfc4648[rfc4648].
  4526. [.contract-item]
  4527. [[Base64-_TABLE-string]]
  4528. ==== `string [.contract-item-name]#++_TABLE++#` [.item-kind]#internal constant#
  4529. Base64 Encoding/Decoding Table
  4530. See sections 4 and 5 of https://datatracker.ietf.org/doc/html/rfc4648
  4531. [.contract-item]
  4532. [[Base64-_TABLE_URL-string]]
  4533. ==== `string [.contract-item-name]#++_TABLE_URL++#` [.item-kind]#internal constant#
  4534. :StringsInsufficientHexLength: pass:normal[xref:#Strings-StringsInsufficientHexLength-uint256-uint256-[`++StringsInsufficientHexLength++`]]
  4535. :toString: pass:normal[xref:#Strings-toString-uint256-[`++toString++`]]
  4536. :toStringSigned: pass:normal[xref:#Strings-toStringSigned-int256-[`++toStringSigned++`]]
  4537. :toHexString: pass:normal[xref:#Strings-toHexString-uint256-[`++toHexString++`]]
  4538. :toHexString: pass:normal[xref:#Strings-toHexString-uint256-uint256-[`++toHexString++`]]
  4539. :toHexString: pass:normal[xref:#Strings-toHexString-address-[`++toHexString++`]]
  4540. :toChecksumHexString: pass:normal[xref:#Strings-toChecksumHexString-address-[`++toChecksumHexString++`]]
  4541. :equal: pass:normal[xref:#Strings-equal-string-string-[`++equal++`]]
  4542. [.contract]
  4543. [[Strings]]
  4544. === `++Strings++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Strings.sol[{github-icon},role=heading-link]
  4545. [.hljs-theme-light.nopadding]
  4546. ```solidity
  4547. import "@openzeppelin/contracts/utils/Strings.sol";
  4548. ```
  4549. String operations.
  4550. [.contract-index]
  4551. .Functions
  4552. --
  4553. * {xref-Strings-toString-uint256-}[`++toString(value)++`]
  4554. * {xref-Strings-toStringSigned-int256-}[`++toStringSigned(value)++`]
  4555. * {xref-Strings-toHexString-uint256-}[`++toHexString(value)++`]
  4556. * {xref-Strings-toHexString-uint256-uint256-}[`++toHexString(value, length)++`]
  4557. * {xref-Strings-toHexString-address-}[`++toHexString(addr)++`]
  4558. * {xref-Strings-toChecksumHexString-address-}[`++toChecksumHexString(addr)++`]
  4559. * {xref-Strings-equal-string-string-}[`++equal(a, b)++`]
  4560. --
  4561. [.contract-index]
  4562. .Errors
  4563. --
  4564. * {xref-Strings-StringsInsufficientHexLength-uint256-uint256-}[`++StringsInsufficientHexLength(value, length)++`]
  4565. --
  4566. [.contract-item]
  4567. [[Strings-toString-uint256-]]
  4568. ==== `[.contract-item-name]#++toString++#++(uint256 value) → string++` [.item-kind]#internal#
  4569. Converts a `uint256` to its ASCII `string` decimal representation.
  4570. [.contract-item]
  4571. [[Strings-toStringSigned-int256-]]
  4572. ==== `[.contract-item-name]#++toStringSigned++#++(int256 value) → string++` [.item-kind]#internal#
  4573. Converts a `int256` to its ASCII `string` decimal representation.
  4574. [.contract-item]
  4575. [[Strings-toHexString-uint256-]]
  4576. ==== `[.contract-item-name]#++toHexString++#++(uint256 value) → string++` [.item-kind]#internal#
  4577. Converts a `uint256` to its ASCII `string` hexadecimal representation.
  4578. [.contract-item]
  4579. [[Strings-toHexString-uint256-uint256-]]
  4580. ==== `[.contract-item-name]#++toHexString++#++(uint256 value, uint256 length) → string++` [.item-kind]#internal#
  4581. Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
  4582. [.contract-item]
  4583. [[Strings-toHexString-address-]]
  4584. ==== `[.contract-item-name]#++toHexString++#++(address addr) → string++` [.item-kind]#internal#
  4585. Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
  4586. representation.
  4587. [.contract-item]
  4588. [[Strings-toChecksumHexString-address-]]
  4589. ==== `[.contract-item-name]#++toChecksumHexString++#++(address addr) → string++` [.item-kind]#internal#
  4590. Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal
  4591. representation, according to EIP-55.
  4592. [.contract-item]
  4593. [[Strings-equal-string-string-]]
  4594. ==== `[.contract-item-name]#++equal++#++(string a, string b) → bool++` [.item-kind]#internal#
  4595. Returns true if the two strings are equal.
  4596. [.contract-item]
  4597. [[Strings-StringsInsufficientHexLength-uint256-uint256-]]
  4598. ==== `[.contract-item-name]#++StringsInsufficientHexLength++#++(uint256 value, uint256 length)++` [.item-kind]#error#
  4599. The `value` string doesn't fit in the specified `length`.
  4600. :StringTooLong: pass:normal[xref:#ShortStrings-StringTooLong-string-[`++StringTooLong++`]]
  4601. :InvalidShortString: pass:normal[xref:#ShortStrings-InvalidShortString--[`++InvalidShortString++`]]
  4602. :toShortString: pass:normal[xref:#ShortStrings-toShortString-string-[`++toShortString++`]]
  4603. :toString: pass:normal[xref:#ShortStrings-toString-ShortString-[`++toString++`]]
  4604. :byteLength: pass:normal[xref:#ShortStrings-byteLength-ShortString-[`++byteLength++`]]
  4605. :toShortStringWithFallback: pass:normal[xref:#ShortStrings-toShortStringWithFallback-string-string-[`++toShortStringWithFallback++`]]
  4606. :toStringWithFallback: pass:normal[xref:#ShortStrings-toStringWithFallback-ShortString-string-[`++toStringWithFallback++`]]
  4607. :byteLengthWithFallback: pass:normal[xref:#ShortStrings-byteLengthWithFallback-ShortString-string-[`++byteLengthWithFallback++`]]
  4608. [.contract]
  4609. [[ShortStrings]]
  4610. === `++ShortStrings++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/ShortStrings.sol[{github-icon},role=heading-link]
  4611. [.hljs-theme-light.nopadding]
  4612. ```solidity
  4613. import "@openzeppelin/contracts/utils/ShortStrings.sol";
  4614. ```
  4615. This library provides functions to convert short memory strings
  4616. into a `ShortString` type that can be used as an immutable variable.
  4617. Strings of arbitrary length can be optimized using this library if
  4618. they are short enough (up to 31 bytes) by packing them with their
  4619. length (1 byte) in a single EVM word (32 bytes). Additionally, a
  4620. fallback mechanism can be used for every other case.
  4621. Usage example:
  4622. ```solidity
  4623. contract Named {
  4624. using ShortStrings for *;
  4625. ShortString private immutable _name;
  4626. string private _nameFallback;
  4627. constructor(string memory contractName) {
  4628. _name = contractName.toShortStringWithFallback(_nameFallback);
  4629. }
  4630. function name() external view returns (string memory) {
  4631. return _name.toStringWithFallback(_nameFallback);
  4632. }
  4633. }
  4634. ```
  4635. [.contract-index]
  4636. .Functions
  4637. --
  4638. * {xref-ShortStrings-toShortString-string-}[`++toShortString(str)++`]
  4639. * {xref-ShortStrings-toString-ShortString-}[`++toString(sstr)++`]
  4640. * {xref-ShortStrings-byteLength-ShortString-}[`++byteLength(sstr)++`]
  4641. * {xref-ShortStrings-toShortStringWithFallback-string-string-}[`++toShortStringWithFallback(value, store)++`]
  4642. * {xref-ShortStrings-toStringWithFallback-ShortString-string-}[`++toStringWithFallback(value, store)++`]
  4643. * {xref-ShortStrings-byteLengthWithFallback-ShortString-string-}[`++byteLengthWithFallback(value, store)++`]
  4644. --
  4645. [.contract-index]
  4646. .Errors
  4647. --
  4648. * {xref-ShortStrings-StringTooLong-string-}[`++StringTooLong(str)++`]
  4649. * {xref-ShortStrings-InvalidShortString--}[`++InvalidShortString()++`]
  4650. --
  4651. [.contract-item]
  4652. [[ShortStrings-toShortString-string-]]
  4653. ==== `[.contract-item-name]#++toShortString++#++(string str) → ShortString++` [.item-kind]#internal#
  4654. Encode a string of at most 31 chars into a `ShortString`.
  4655. This will trigger a `StringTooLong` error is the input string is too long.
  4656. [.contract-item]
  4657. [[ShortStrings-toString-ShortString-]]
  4658. ==== `[.contract-item-name]#++toString++#++(ShortString sstr) → string++` [.item-kind]#internal#
  4659. Decode a `ShortString` back to a "normal" string.
  4660. [.contract-item]
  4661. [[ShortStrings-byteLength-ShortString-]]
  4662. ==== `[.contract-item-name]#++byteLength++#++(ShortString sstr) → uint256++` [.item-kind]#internal#
  4663. Return the length of a `ShortString`.
  4664. [.contract-item]
  4665. [[ShortStrings-toShortStringWithFallback-string-string-]]
  4666. ==== `[.contract-item-name]#++toShortStringWithFallback++#++(string value, string store) → ShortString++` [.item-kind]#internal#
  4667. Encode a string into a `ShortString`, or write it to storage if it is too long.
  4668. [.contract-item]
  4669. [[ShortStrings-toStringWithFallback-ShortString-string-]]
  4670. ==== `[.contract-item-name]#++toStringWithFallback++#++(ShortString value, string store) → string++` [.item-kind]#internal#
  4671. Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
  4672. [.contract-item]
  4673. [[ShortStrings-byteLengthWithFallback-ShortString-string-]]
  4674. ==== `[.contract-item-name]#++byteLengthWithFallback++#++(ShortString value, string store) → uint256++` [.item-kind]#internal#
  4675. Return the length of a string that was encoded to `ShortString` or written to storage using
  4676. {setWithFallback}.
  4677. WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
  4678. actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
  4679. [.contract-item]
  4680. [[ShortStrings-StringTooLong-string-]]
  4681. ==== `[.contract-item-name]#++StringTooLong++#++(string str)++` [.item-kind]#error#
  4682. [.contract-item]
  4683. [[ShortStrings-InvalidShortString--]]
  4684. ==== `[.contract-item-name]#++InvalidShortString++#++()++` [.item-kind]#error#
  4685. :erc7201Slot: pass:normal[xref:#SlotDerivation-erc7201Slot-string-[`++erc7201Slot++`]]
  4686. :offset: pass:normal[xref:#SlotDerivation-offset-bytes32-uint256-[`++offset++`]]
  4687. :deriveArray: pass:normal[xref:#SlotDerivation-deriveArray-bytes32-[`++deriveArray++`]]
  4688. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-address-[`++deriveMapping++`]]
  4689. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-bool-[`++deriveMapping++`]]
  4690. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-bytes32-[`++deriveMapping++`]]
  4691. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-uint256-[`++deriveMapping++`]]
  4692. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-int256-[`++deriveMapping++`]]
  4693. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-string-[`++deriveMapping++`]]
  4694. :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-bytes-[`++deriveMapping++`]]
  4695. [.contract]
  4696. [[SlotDerivation]]
  4697. === `++SlotDerivation++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/SlotDerivation.sol[{github-icon},role=heading-link]
  4698. [.hljs-theme-light.nopadding]
  4699. ```solidity
  4700. import "@openzeppelin/contracts/utils/SlotDerivation.sol";
  4701. ```
  4702. Library for computing storage (and transient storage) locations from namespaces and deriving slots
  4703. corresponding to standard patterns. The derivation method for array and mapping matches the storage layout used by
  4704. the solidity language / compiler.
  4705. 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.].
  4706. Example usage:
  4707. ```solidity
  4708. contract Example {
  4709. // Add the library methods
  4710. using StorageSlot for bytes32;
  4711. using SlotDerivation for bytes32;
  4712. // Declare a namespace
  4713. string private constant _NAMESPACE = "<namespace>" // eg. OpenZeppelin.Slot
  4714. function setValueInNamespace(uint256 key, address newValue) internal {
  4715. _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value = newValue;
  4716. }
  4717. function getValueInNamespace(uint256 key) internal view returns (address) {
  4718. return _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value;
  4719. }
  4720. }
  4721. ```
  4722. TIP: Consider using this library along with {StorageSlot}.
  4723. NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking
  4724. upgrade safety will ignore the slots accessed through this library.
  4725. _Available since v5.1._
  4726. [.contract-index]
  4727. .Functions
  4728. --
  4729. * {xref-SlotDerivation-erc7201Slot-string-}[`++erc7201Slot(namespace)++`]
  4730. * {xref-SlotDerivation-offset-bytes32-uint256-}[`++offset(slot, pos)++`]
  4731. * {xref-SlotDerivation-deriveArray-bytes32-}[`++deriveArray(slot)++`]
  4732. * {xref-SlotDerivation-deriveMapping-bytes32-address-}[`++deriveMapping(slot, key)++`]
  4733. * {xref-SlotDerivation-deriveMapping-bytes32-bool-}[`++deriveMapping(slot, key)++`]
  4734. * {xref-SlotDerivation-deriveMapping-bytes32-bytes32-}[`++deriveMapping(slot, key)++`]
  4735. * {xref-SlotDerivation-deriveMapping-bytes32-uint256-}[`++deriveMapping(slot, key)++`]
  4736. * {xref-SlotDerivation-deriveMapping-bytes32-int256-}[`++deriveMapping(slot, key)++`]
  4737. * {xref-SlotDerivation-deriveMapping-bytes32-string-}[`++deriveMapping(slot, key)++`]
  4738. * {xref-SlotDerivation-deriveMapping-bytes32-bytes-}[`++deriveMapping(slot, key)++`]
  4739. --
  4740. [.contract-item]
  4741. [[SlotDerivation-erc7201Slot-string-]]
  4742. ==== `[.contract-item-name]#++erc7201Slot++#++(string namespace) → bytes32 slot++` [.item-kind]#internal#
  4743. Derive an ERC-7201 slot from a string (namespace).
  4744. [.contract-item]
  4745. [[SlotDerivation-offset-bytes32-uint256-]]
  4746. ==== `[.contract-item-name]#++offset++#++(bytes32 slot, uint256 pos) → bytes32 result++` [.item-kind]#internal#
  4747. Add an offset to a slot to get the n-th element of a structure or an array.
  4748. [.contract-item]
  4749. [[SlotDerivation-deriveArray-bytes32-]]
  4750. ==== `[.contract-item-name]#++deriveArray++#++(bytes32 slot) → bytes32 result++` [.item-kind]#internal#
  4751. Derive the location of the first element in an array from the slot where the length is stored.
  4752. [.contract-item]
  4753. [[SlotDerivation-deriveMapping-bytes32-address-]]
  4754. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, address key) → bytes32 result++` [.item-kind]#internal#
  4755. Derive the location of a mapping element from the key.
  4756. [.contract-item]
  4757. [[SlotDerivation-deriveMapping-bytes32-bool-]]
  4758. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, bool key) → bytes32 result++` [.item-kind]#internal#
  4759. Derive the location of a mapping element from the key.
  4760. [.contract-item]
  4761. [[SlotDerivation-deriveMapping-bytes32-bytes32-]]
  4762. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, bytes32 key) → bytes32 result++` [.item-kind]#internal#
  4763. Derive the location of a mapping element from the key.
  4764. [.contract-item]
  4765. [[SlotDerivation-deriveMapping-bytes32-uint256-]]
  4766. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, uint256 key) → bytes32 result++` [.item-kind]#internal#
  4767. Derive the location of a mapping element from the key.
  4768. [.contract-item]
  4769. [[SlotDerivation-deriveMapping-bytes32-int256-]]
  4770. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, int256 key) → bytes32 result++` [.item-kind]#internal#
  4771. Derive the location of a mapping element from the key.
  4772. [.contract-item]
  4773. [[SlotDerivation-deriveMapping-bytes32-string-]]
  4774. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, string key) → bytes32 result++` [.item-kind]#internal#
  4775. Derive the location of a mapping element from the key.
  4776. [.contract-item]
  4777. [[SlotDerivation-deriveMapping-bytes32-bytes-]]
  4778. ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, bytes key) → bytes32 result++` [.item-kind]#internal#
  4779. Derive the location of a mapping element from the key.
  4780. :AddressSlot: pass:normal[xref:#StorageSlot-AddressSlot[`++AddressSlot++`]]
  4781. :BooleanSlot: pass:normal[xref:#StorageSlot-BooleanSlot[`++BooleanSlot++`]]
  4782. :Bytes32Slot: pass:normal[xref:#StorageSlot-Bytes32Slot[`++Bytes32Slot++`]]
  4783. :Uint256Slot: pass:normal[xref:#StorageSlot-Uint256Slot[`++Uint256Slot++`]]
  4784. :Int256Slot: pass:normal[xref:#StorageSlot-Int256Slot[`++Int256Slot++`]]
  4785. :StringSlot: pass:normal[xref:#StorageSlot-StringSlot[`++StringSlot++`]]
  4786. :BytesSlot: pass:normal[xref:#StorageSlot-BytesSlot[`++BytesSlot++`]]
  4787. :getAddressSlot: pass:normal[xref:#StorageSlot-getAddressSlot-bytes32-[`++getAddressSlot++`]]
  4788. :getBooleanSlot: pass:normal[xref:#StorageSlot-getBooleanSlot-bytes32-[`++getBooleanSlot++`]]
  4789. :getBytes32Slot: pass:normal[xref:#StorageSlot-getBytes32Slot-bytes32-[`++getBytes32Slot++`]]
  4790. :getUint256Slot: pass:normal[xref:#StorageSlot-getUint256Slot-bytes32-[`++getUint256Slot++`]]
  4791. :getInt256Slot: pass:normal[xref:#StorageSlot-getInt256Slot-bytes32-[`++getInt256Slot++`]]
  4792. :getStringSlot: pass:normal[xref:#StorageSlot-getStringSlot-bytes32-[`++getStringSlot++`]]
  4793. :getStringSlot: pass:normal[xref:#StorageSlot-getStringSlot-string-[`++getStringSlot++`]]
  4794. :getBytesSlot: pass:normal[xref:#StorageSlot-getBytesSlot-bytes32-[`++getBytesSlot++`]]
  4795. :getBytesSlot: pass:normal[xref:#StorageSlot-getBytesSlot-bytes-[`++getBytesSlot++`]]
  4796. [.contract]
  4797. [[StorageSlot]]
  4798. === `++StorageSlot++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/StorageSlot.sol[{github-icon},role=heading-link]
  4799. [.hljs-theme-light.nopadding]
  4800. ```solidity
  4801. import "@openzeppelin/contracts/utils/StorageSlot.sol";
  4802. ```
  4803. Library for reading and writing primitive types to specific storage slots.
  4804. Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
  4805. This library helps with reading and writing to such slots without the need for inline assembly.
  4806. The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
  4807. Example usage to set ERC-1967 implementation slot:
  4808. ```solidity
  4809. contract ERC1967 {
  4810. // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
  4811. bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
  4812. function _getImplementation() internal view returns (address) {
  4813. return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
  4814. }
  4815. function _setImplementation(address newImplementation) internal {
  4816. require(newImplementation.code.length > 0);
  4817. StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
  4818. }
  4819. }
  4820. ```
  4821. TIP: Consider using this library along with {SlotDerivation}.
  4822. [.contract-index]
  4823. .Functions
  4824. --
  4825. * {xref-StorageSlot-getAddressSlot-bytes32-}[`++getAddressSlot(slot)++`]
  4826. * {xref-StorageSlot-getBooleanSlot-bytes32-}[`++getBooleanSlot(slot)++`]
  4827. * {xref-StorageSlot-getBytes32Slot-bytes32-}[`++getBytes32Slot(slot)++`]
  4828. * {xref-StorageSlot-getUint256Slot-bytes32-}[`++getUint256Slot(slot)++`]
  4829. * {xref-StorageSlot-getInt256Slot-bytes32-}[`++getInt256Slot(slot)++`]
  4830. * {xref-StorageSlot-getStringSlot-bytes32-}[`++getStringSlot(slot)++`]
  4831. * {xref-StorageSlot-getStringSlot-string-}[`++getStringSlot(store)++`]
  4832. * {xref-StorageSlot-getBytesSlot-bytes32-}[`++getBytesSlot(slot)++`]
  4833. * {xref-StorageSlot-getBytesSlot-bytes-}[`++getBytesSlot(store)++`]
  4834. --
  4835. [.contract-item]
  4836. [[StorageSlot-getAddressSlot-bytes32-]]
  4837. ==== `[.contract-item-name]#++getAddressSlot++#++(bytes32 slot) → struct StorageSlot.AddressSlot r++` [.item-kind]#internal#
  4838. Returns an `AddressSlot` with member `value` located at `slot`.
  4839. [.contract-item]
  4840. [[StorageSlot-getBooleanSlot-bytes32-]]
  4841. ==== `[.contract-item-name]#++getBooleanSlot++#++(bytes32 slot) → struct StorageSlot.BooleanSlot r++` [.item-kind]#internal#
  4842. Returns a `BooleanSlot` with member `value` located at `slot`.
  4843. [.contract-item]
  4844. [[StorageSlot-getBytes32Slot-bytes32-]]
  4845. ==== `[.contract-item-name]#++getBytes32Slot++#++(bytes32 slot) → struct StorageSlot.Bytes32Slot r++` [.item-kind]#internal#
  4846. Returns a `Bytes32Slot` with member `value` located at `slot`.
  4847. [.contract-item]
  4848. [[StorageSlot-getUint256Slot-bytes32-]]
  4849. ==== `[.contract-item-name]#++getUint256Slot++#++(bytes32 slot) → struct StorageSlot.Uint256Slot r++` [.item-kind]#internal#
  4850. Returns a `Uint256Slot` with member `value` located at `slot`.
  4851. [.contract-item]
  4852. [[StorageSlot-getInt256Slot-bytes32-]]
  4853. ==== `[.contract-item-name]#++getInt256Slot++#++(bytes32 slot) → struct StorageSlot.Int256Slot r++` [.item-kind]#internal#
  4854. Returns a `Int256Slot` with member `value` located at `slot`.
  4855. [.contract-item]
  4856. [[StorageSlot-getStringSlot-bytes32-]]
  4857. ==== `[.contract-item-name]#++getStringSlot++#++(bytes32 slot) → struct StorageSlot.StringSlot r++` [.item-kind]#internal#
  4858. Returns a `StringSlot` with member `value` located at `slot`.
  4859. [.contract-item]
  4860. [[StorageSlot-getStringSlot-string-]]
  4861. ==== `[.contract-item-name]#++getStringSlot++#++(string store) → struct StorageSlot.StringSlot r++` [.item-kind]#internal#
  4862. Returns an `StringSlot` representation of the string storage pointer `store`.
  4863. [.contract-item]
  4864. [[StorageSlot-getBytesSlot-bytes32-]]
  4865. ==== `[.contract-item-name]#++getBytesSlot++#++(bytes32 slot) → struct StorageSlot.BytesSlot r++` [.item-kind]#internal#
  4866. Returns a `BytesSlot` with member `value` located at `slot`.
  4867. [.contract-item]
  4868. [[StorageSlot-getBytesSlot-bytes-]]
  4869. ==== `[.contract-item-name]#++getBytesSlot++#++(bytes store) → struct StorageSlot.BytesSlot r++` [.item-kind]#internal#
  4870. Returns an `BytesSlot` representation of the bytes storage pointer `store`.
  4871. :AddressSlot: pass:normal[xref:#TransientSlot-AddressSlot[`++AddressSlot++`]]
  4872. :asAddress: pass:normal[xref:#TransientSlot-asAddress-bytes32-[`++asAddress++`]]
  4873. :BooleanSlot: pass:normal[xref:#TransientSlot-BooleanSlot[`++BooleanSlot++`]]
  4874. :asBoolean: pass:normal[xref:#TransientSlot-asBoolean-bytes32-[`++asBoolean++`]]
  4875. :Bytes32Slot: pass:normal[xref:#TransientSlot-Bytes32Slot[`++Bytes32Slot++`]]
  4876. :asBytes32: pass:normal[xref:#TransientSlot-asBytes32-bytes32-[`++asBytes32++`]]
  4877. :Uint256Slot: pass:normal[xref:#TransientSlot-Uint256Slot[`++Uint256Slot++`]]
  4878. :asUint256: pass:normal[xref:#TransientSlot-asUint256-bytes32-[`++asUint256++`]]
  4879. :Int256Slot: pass:normal[xref:#TransientSlot-Int256Slot[`++Int256Slot++`]]
  4880. :asInt256: pass:normal[xref:#TransientSlot-asInt256-bytes32-[`++asInt256++`]]
  4881. :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-AddressSlot-[`++tload++`]]
  4882. :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-AddressSlot-address-[`++tstore++`]]
  4883. :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-BooleanSlot-[`++tload++`]]
  4884. :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-BooleanSlot-bool-[`++tstore++`]]
  4885. :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-Bytes32Slot-[`++tload++`]]
  4886. :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-[`++tstore++`]]
  4887. :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-Uint256Slot-[`++tload++`]]
  4888. :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-[`++tstore++`]]
  4889. :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-Int256Slot-[`++tload++`]]
  4890. :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-Int256Slot-int256-[`++tstore++`]]
  4891. [.contract]
  4892. [[TransientSlot]]
  4893. === `++TransientSlot++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/TransientSlot.sol[{github-icon},role=heading-link]
  4894. [.hljs-theme-light.nopadding]
  4895. ```solidity
  4896. import "@openzeppelin/contracts/utils/TransientSlot.sol";
  4897. ```
  4898. Library for reading and writing value-types to specific transient storage slots.
  4899. Transient slots are often used to store temporary values that are removed after the current transaction.
  4900. This library helps with reading and writing to such slots without the need for inline assembly.
  4901. * Example reading and writing values using transient storage:
  4902. ```solidity
  4903. contract Lock {
  4904. using TransientSlot for *;
  4905. // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
  4906. bytes32 internal constant _LOCK_SLOT = 0xf4678858b2b588224636b8522b729e7722d32fc491da849ed75b3fdf3c84f542;
  4907. modifier locked() {
  4908. require(!_LOCK_SLOT.asBoolean().tload());
  4909. _LOCK_SLOT.asBoolean().tstore(true);
  4910. _;
  4911. _LOCK_SLOT.asBoolean().tstore(false);
  4912. }
  4913. }
  4914. ```
  4915. TIP: Consider using this library along with {SlotDerivation}.
  4916. [.contract-index]
  4917. .Functions
  4918. --
  4919. * {xref-TransientSlot-asAddress-bytes32-}[`++asAddress(slot)++`]
  4920. * {xref-TransientSlot-asBoolean-bytes32-}[`++asBoolean(slot)++`]
  4921. * {xref-TransientSlot-asBytes32-bytes32-}[`++asBytes32(slot)++`]
  4922. * {xref-TransientSlot-asUint256-bytes32-}[`++asUint256(slot)++`]
  4923. * {xref-TransientSlot-asInt256-bytes32-}[`++asInt256(slot)++`]
  4924. * {xref-TransientSlot-tload-TransientSlot-AddressSlot-}[`++tload(slot)++`]
  4925. * {xref-TransientSlot-tstore-TransientSlot-AddressSlot-address-}[`++tstore(slot, value)++`]
  4926. * {xref-TransientSlot-tload-TransientSlot-BooleanSlot-}[`++tload(slot)++`]
  4927. * {xref-TransientSlot-tstore-TransientSlot-BooleanSlot-bool-}[`++tstore(slot, value)++`]
  4928. * {xref-TransientSlot-tload-TransientSlot-Bytes32Slot-}[`++tload(slot)++`]
  4929. * {xref-TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-}[`++tstore(slot, value)++`]
  4930. * {xref-TransientSlot-tload-TransientSlot-Uint256Slot-}[`++tload(slot)++`]
  4931. * {xref-TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-}[`++tstore(slot, value)++`]
  4932. * {xref-TransientSlot-tload-TransientSlot-Int256Slot-}[`++tload(slot)++`]
  4933. * {xref-TransientSlot-tstore-TransientSlot-Int256Slot-int256-}[`++tstore(slot, value)++`]
  4934. --
  4935. [.contract-item]
  4936. [[TransientSlot-asAddress-bytes32-]]
  4937. ==== `[.contract-item-name]#++asAddress++#++(bytes32 slot) → TransientSlot.AddressSlot++` [.item-kind]#internal#
  4938. Cast an arbitrary slot to a AddressSlot.
  4939. [.contract-item]
  4940. [[TransientSlot-asBoolean-bytes32-]]
  4941. ==== `[.contract-item-name]#++asBoolean++#++(bytes32 slot) → TransientSlot.BooleanSlot++` [.item-kind]#internal#
  4942. Cast an arbitrary slot to a BooleanSlot.
  4943. [.contract-item]
  4944. [[TransientSlot-asBytes32-bytes32-]]
  4945. ==== `[.contract-item-name]#++asBytes32++#++(bytes32 slot) → TransientSlot.Bytes32Slot++` [.item-kind]#internal#
  4946. Cast an arbitrary slot to a Bytes32Slot.
  4947. [.contract-item]
  4948. [[TransientSlot-asUint256-bytes32-]]
  4949. ==== `[.contract-item-name]#++asUint256++#++(bytes32 slot) → TransientSlot.Uint256Slot++` [.item-kind]#internal#
  4950. Cast an arbitrary slot to a Uint256Slot.
  4951. [.contract-item]
  4952. [[TransientSlot-asInt256-bytes32-]]
  4953. ==== `[.contract-item-name]#++asInt256++#++(bytes32 slot) → TransientSlot.Int256Slot++` [.item-kind]#internal#
  4954. Cast an arbitrary slot to a Int256Slot.
  4955. [.contract-item]
  4956. [[TransientSlot-tload-TransientSlot-AddressSlot-]]
  4957. ==== `[.contract-item-name]#++tload++#++(TransientSlot.AddressSlot slot) → address value++` [.item-kind]#internal#
  4958. Load the value held at location `slot` in transient storage.
  4959. [.contract-item]
  4960. [[TransientSlot-tstore-TransientSlot-AddressSlot-address-]]
  4961. ==== `[.contract-item-name]#++tstore++#++(TransientSlot.AddressSlot slot, address value)++` [.item-kind]#internal#
  4962. Store `value` at location `slot` in transient storage.
  4963. [.contract-item]
  4964. [[TransientSlot-tload-TransientSlot-BooleanSlot-]]
  4965. ==== `[.contract-item-name]#++tload++#++(TransientSlot.BooleanSlot slot) → bool value++` [.item-kind]#internal#
  4966. Load the value held at location `slot` in transient storage.
  4967. [.contract-item]
  4968. [[TransientSlot-tstore-TransientSlot-BooleanSlot-bool-]]
  4969. ==== `[.contract-item-name]#++tstore++#++(TransientSlot.BooleanSlot slot, bool value)++` [.item-kind]#internal#
  4970. Store `value` at location `slot` in transient storage.
  4971. [.contract-item]
  4972. [[TransientSlot-tload-TransientSlot-Bytes32Slot-]]
  4973. ==== `[.contract-item-name]#++tload++#++(TransientSlot.Bytes32Slot slot) → bytes32 value++` [.item-kind]#internal#
  4974. Load the value held at location `slot` in transient storage.
  4975. [.contract-item]
  4976. [[TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-]]
  4977. ==== `[.contract-item-name]#++tstore++#++(TransientSlot.Bytes32Slot slot, bytes32 value)++` [.item-kind]#internal#
  4978. Store `value` at location `slot` in transient storage.
  4979. [.contract-item]
  4980. [[TransientSlot-tload-TransientSlot-Uint256Slot-]]
  4981. ==== `[.contract-item-name]#++tload++#++(TransientSlot.Uint256Slot slot) → uint256 value++` [.item-kind]#internal#
  4982. Load the value held at location `slot` in transient storage.
  4983. [.contract-item]
  4984. [[TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-]]
  4985. ==== `[.contract-item-name]#++tstore++#++(TransientSlot.Uint256Slot slot, uint256 value)++` [.item-kind]#internal#
  4986. Store `value` at location `slot` in transient storage.
  4987. [.contract-item]
  4988. [[TransientSlot-tload-TransientSlot-Int256Slot-]]
  4989. ==== `[.contract-item-name]#++tload++#++(TransientSlot.Int256Slot slot) → int256 value++` [.item-kind]#internal#
  4990. Load the value held at location `slot` in transient storage.
  4991. [.contract-item]
  4992. [[TransientSlot-tstore-TransientSlot-Int256Slot-int256-]]
  4993. ==== `[.contract-item-name]#++tstore++#++(TransientSlot.Int256Slot slot, int256 value)++` [.item-kind]#internal#
  4994. Store `value` at location `slot` in transient storage.
  4995. :multicall: pass:normal[xref:#Multicall-multicall-bytes---[`++multicall++`]]
  4996. [.contract]
  4997. [[Multicall]]
  4998. === `++Multicall++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Multicall.sol[{github-icon},role=heading-link]
  4999. [.hljs-theme-light.nopadding]
  5000. ```solidity
  5001. import "@openzeppelin/contracts/utils/Multicall.sol";
  5002. ```
  5003. Provides a function to batch together multiple calls in a single external call.
  5004. Consider any assumption about calldata validation performed by the sender may be violated if it's not especially
  5005. careful about sending transactions invoking {multicall}. For example, a relay address that filters function
  5006. selectors won't filter calls nested within a {multicall} operation.
  5007. NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}).
  5008. If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data`
  5009. to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of
  5010. {_msgSender} are not propagated to subcalls.
  5011. [.contract-index]
  5012. .Functions
  5013. --
  5014. * {xref-Multicall-multicall-bytes---}[`++multicall(data)++`]
  5015. --
  5016. [.contract-item]
  5017. [[Multicall-multicall-bytes---]]
  5018. ==== `[.contract-item-name]#++multicall++#++(bytes[] data) → bytes[] results++` [.item-kind]#external#
  5019. Receives and executes a batch of function calls on this contract.
  5020. :_msgSender: pass:normal[xref:#Context-_msgSender--[`++_msgSender++`]]
  5021. :_msgData: pass:normal[xref:#Context-_msgData--[`++_msgData++`]]
  5022. :_contextSuffixLength: pass:normal[xref:#Context-_contextSuffixLength--[`++_contextSuffixLength++`]]
  5023. [.contract]
  5024. [[Context]]
  5025. === `++Context++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Context.sol[{github-icon},role=heading-link]
  5026. [.hljs-theme-light.nopadding]
  5027. ```solidity
  5028. import "@openzeppelin/contracts/utils/Context.sol";
  5029. ```
  5030. Provides information about the current execution context, including the
  5031. sender of the transaction and its data. While these are generally available
  5032. via msg.sender and msg.data, they should not be accessed in such a direct
  5033. manner, since when dealing with meta-transactions the account sending and
  5034. paying for execution may not be the actual sender (as far as an application
  5035. is concerned).
  5036. This contract is only required for intermediate, library-like contracts.
  5037. [.contract-index]
  5038. .Functions
  5039. --
  5040. * {xref-Context-_msgSender--}[`++_msgSender()++`]
  5041. * {xref-Context-_msgData--}[`++_msgData()++`]
  5042. * {xref-Context-_contextSuffixLength--}[`++_contextSuffixLength()++`]
  5043. --
  5044. [.contract-item]
  5045. [[Context-_msgSender--]]
  5046. ==== `[.contract-item-name]#++_msgSender++#++() → address++` [.item-kind]#internal#
  5047. [.contract-item]
  5048. [[Context-_msgData--]]
  5049. ==== `[.contract-item-name]#++_msgData++#++() → bytes++` [.item-kind]#internal#
  5050. [.contract-item]
  5051. [[Context-_contextSuffixLength--]]
  5052. ==== `[.contract-item-name]#++_contextSuffixLength++#++() → uint256++` [.item-kind]#internal#
  5053. :OutOfRangeAccess: pass:normal[xref:#Packing-OutOfRangeAccess--[`++OutOfRangeAccess++`]]
  5054. :pack_1_1: pass:normal[xref:#Packing-pack_1_1-bytes1-bytes1-[`++pack_1_1++`]]
  5055. :pack_2_2: pass:normal[xref:#Packing-pack_2_2-bytes2-bytes2-[`++pack_2_2++`]]
  5056. :pack_2_4: pass:normal[xref:#Packing-pack_2_4-bytes2-bytes4-[`++pack_2_4++`]]
  5057. :pack_2_6: pass:normal[xref:#Packing-pack_2_6-bytes2-bytes6-[`++pack_2_6++`]]
  5058. :pack_4_2: pass:normal[xref:#Packing-pack_4_2-bytes4-bytes2-[`++pack_4_2++`]]
  5059. :pack_4_4: pass:normal[xref:#Packing-pack_4_4-bytes4-bytes4-[`++pack_4_4++`]]
  5060. :pack_4_8: pass:normal[xref:#Packing-pack_4_8-bytes4-bytes8-[`++pack_4_8++`]]
  5061. :pack_4_12: pass:normal[xref:#Packing-pack_4_12-bytes4-bytes12-[`++pack_4_12++`]]
  5062. :pack_4_16: pass:normal[xref:#Packing-pack_4_16-bytes4-bytes16-[`++pack_4_16++`]]
  5063. :pack_4_20: pass:normal[xref:#Packing-pack_4_20-bytes4-bytes20-[`++pack_4_20++`]]
  5064. :pack_4_24: pass:normal[xref:#Packing-pack_4_24-bytes4-bytes24-[`++pack_4_24++`]]
  5065. :pack_4_28: pass:normal[xref:#Packing-pack_4_28-bytes4-bytes28-[`++pack_4_28++`]]
  5066. :pack_6_2: pass:normal[xref:#Packing-pack_6_2-bytes6-bytes2-[`++pack_6_2++`]]
  5067. :pack_6_6: pass:normal[xref:#Packing-pack_6_6-bytes6-bytes6-[`++pack_6_6++`]]
  5068. :pack_8_4: pass:normal[xref:#Packing-pack_8_4-bytes8-bytes4-[`++pack_8_4++`]]
  5069. :pack_8_8: pass:normal[xref:#Packing-pack_8_8-bytes8-bytes8-[`++pack_8_8++`]]
  5070. :pack_8_12: pass:normal[xref:#Packing-pack_8_12-bytes8-bytes12-[`++pack_8_12++`]]
  5071. :pack_8_16: pass:normal[xref:#Packing-pack_8_16-bytes8-bytes16-[`++pack_8_16++`]]
  5072. :pack_8_20: pass:normal[xref:#Packing-pack_8_20-bytes8-bytes20-[`++pack_8_20++`]]
  5073. :pack_8_24: pass:normal[xref:#Packing-pack_8_24-bytes8-bytes24-[`++pack_8_24++`]]
  5074. :pack_12_4: pass:normal[xref:#Packing-pack_12_4-bytes12-bytes4-[`++pack_12_4++`]]
  5075. :pack_12_8: pass:normal[xref:#Packing-pack_12_8-bytes12-bytes8-[`++pack_12_8++`]]
  5076. :pack_12_12: pass:normal[xref:#Packing-pack_12_12-bytes12-bytes12-[`++pack_12_12++`]]
  5077. :pack_12_16: pass:normal[xref:#Packing-pack_12_16-bytes12-bytes16-[`++pack_12_16++`]]
  5078. :pack_12_20: pass:normal[xref:#Packing-pack_12_20-bytes12-bytes20-[`++pack_12_20++`]]
  5079. :pack_16_4: pass:normal[xref:#Packing-pack_16_4-bytes16-bytes4-[`++pack_16_4++`]]
  5080. :pack_16_8: pass:normal[xref:#Packing-pack_16_8-bytes16-bytes8-[`++pack_16_8++`]]
  5081. :pack_16_12: pass:normal[xref:#Packing-pack_16_12-bytes16-bytes12-[`++pack_16_12++`]]
  5082. :pack_16_16: pass:normal[xref:#Packing-pack_16_16-bytes16-bytes16-[`++pack_16_16++`]]
  5083. :pack_20_4: pass:normal[xref:#Packing-pack_20_4-bytes20-bytes4-[`++pack_20_4++`]]
  5084. :pack_20_8: pass:normal[xref:#Packing-pack_20_8-bytes20-bytes8-[`++pack_20_8++`]]
  5085. :pack_20_12: pass:normal[xref:#Packing-pack_20_12-bytes20-bytes12-[`++pack_20_12++`]]
  5086. :pack_24_4: pass:normal[xref:#Packing-pack_24_4-bytes24-bytes4-[`++pack_24_4++`]]
  5087. :pack_24_8: pass:normal[xref:#Packing-pack_24_8-bytes24-bytes8-[`++pack_24_8++`]]
  5088. :pack_28_4: pass:normal[xref:#Packing-pack_28_4-bytes28-bytes4-[`++pack_28_4++`]]
  5089. :extract_2_1: pass:normal[xref:#Packing-extract_2_1-bytes2-uint8-[`++extract_2_1++`]]
  5090. :replace_2_1: pass:normal[xref:#Packing-replace_2_1-bytes2-bytes1-uint8-[`++replace_2_1++`]]
  5091. :extract_4_1: pass:normal[xref:#Packing-extract_4_1-bytes4-uint8-[`++extract_4_1++`]]
  5092. :replace_4_1: pass:normal[xref:#Packing-replace_4_1-bytes4-bytes1-uint8-[`++replace_4_1++`]]
  5093. :extract_4_2: pass:normal[xref:#Packing-extract_4_2-bytes4-uint8-[`++extract_4_2++`]]
  5094. :replace_4_2: pass:normal[xref:#Packing-replace_4_2-bytes4-bytes2-uint8-[`++replace_4_2++`]]
  5095. :extract_6_1: pass:normal[xref:#Packing-extract_6_1-bytes6-uint8-[`++extract_6_1++`]]
  5096. :replace_6_1: pass:normal[xref:#Packing-replace_6_1-bytes6-bytes1-uint8-[`++replace_6_1++`]]
  5097. :extract_6_2: pass:normal[xref:#Packing-extract_6_2-bytes6-uint8-[`++extract_6_2++`]]
  5098. :replace_6_2: pass:normal[xref:#Packing-replace_6_2-bytes6-bytes2-uint8-[`++replace_6_2++`]]
  5099. :extract_6_4: pass:normal[xref:#Packing-extract_6_4-bytes6-uint8-[`++extract_6_4++`]]
  5100. :replace_6_4: pass:normal[xref:#Packing-replace_6_4-bytes6-bytes4-uint8-[`++replace_6_4++`]]
  5101. :extract_8_1: pass:normal[xref:#Packing-extract_8_1-bytes8-uint8-[`++extract_8_1++`]]
  5102. :replace_8_1: pass:normal[xref:#Packing-replace_8_1-bytes8-bytes1-uint8-[`++replace_8_1++`]]
  5103. :extract_8_2: pass:normal[xref:#Packing-extract_8_2-bytes8-uint8-[`++extract_8_2++`]]
  5104. :replace_8_2: pass:normal[xref:#Packing-replace_8_2-bytes8-bytes2-uint8-[`++replace_8_2++`]]
  5105. :extract_8_4: pass:normal[xref:#Packing-extract_8_4-bytes8-uint8-[`++extract_8_4++`]]
  5106. :replace_8_4: pass:normal[xref:#Packing-replace_8_4-bytes8-bytes4-uint8-[`++replace_8_4++`]]
  5107. :extract_8_6: pass:normal[xref:#Packing-extract_8_6-bytes8-uint8-[`++extract_8_6++`]]
  5108. :replace_8_6: pass:normal[xref:#Packing-replace_8_6-bytes8-bytes6-uint8-[`++replace_8_6++`]]
  5109. :extract_12_1: pass:normal[xref:#Packing-extract_12_1-bytes12-uint8-[`++extract_12_1++`]]
  5110. :replace_12_1: pass:normal[xref:#Packing-replace_12_1-bytes12-bytes1-uint8-[`++replace_12_1++`]]
  5111. :extract_12_2: pass:normal[xref:#Packing-extract_12_2-bytes12-uint8-[`++extract_12_2++`]]
  5112. :replace_12_2: pass:normal[xref:#Packing-replace_12_2-bytes12-bytes2-uint8-[`++replace_12_2++`]]
  5113. :extract_12_4: pass:normal[xref:#Packing-extract_12_4-bytes12-uint8-[`++extract_12_4++`]]
  5114. :replace_12_4: pass:normal[xref:#Packing-replace_12_4-bytes12-bytes4-uint8-[`++replace_12_4++`]]
  5115. :extract_12_6: pass:normal[xref:#Packing-extract_12_6-bytes12-uint8-[`++extract_12_6++`]]
  5116. :replace_12_6: pass:normal[xref:#Packing-replace_12_6-bytes12-bytes6-uint8-[`++replace_12_6++`]]
  5117. :extract_12_8: pass:normal[xref:#Packing-extract_12_8-bytes12-uint8-[`++extract_12_8++`]]
  5118. :replace_12_8: pass:normal[xref:#Packing-replace_12_8-bytes12-bytes8-uint8-[`++replace_12_8++`]]
  5119. :extract_16_1: pass:normal[xref:#Packing-extract_16_1-bytes16-uint8-[`++extract_16_1++`]]
  5120. :replace_16_1: pass:normal[xref:#Packing-replace_16_1-bytes16-bytes1-uint8-[`++replace_16_1++`]]
  5121. :extract_16_2: pass:normal[xref:#Packing-extract_16_2-bytes16-uint8-[`++extract_16_2++`]]
  5122. :replace_16_2: pass:normal[xref:#Packing-replace_16_2-bytes16-bytes2-uint8-[`++replace_16_2++`]]
  5123. :extract_16_4: pass:normal[xref:#Packing-extract_16_4-bytes16-uint8-[`++extract_16_4++`]]
  5124. :replace_16_4: pass:normal[xref:#Packing-replace_16_4-bytes16-bytes4-uint8-[`++replace_16_4++`]]
  5125. :extract_16_6: pass:normal[xref:#Packing-extract_16_6-bytes16-uint8-[`++extract_16_6++`]]
  5126. :replace_16_6: pass:normal[xref:#Packing-replace_16_6-bytes16-bytes6-uint8-[`++replace_16_6++`]]
  5127. :extract_16_8: pass:normal[xref:#Packing-extract_16_8-bytes16-uint8-[`++extract_16_8++`]]
  5128. :replace_16_8: pass:normal[xref:#Packing-replace_16_8-bytes16-bytes8-uint8-[`++replace_16_8++`]]
  5129. :extract_16_12: pass:normal[xref:#Packing-extract_16_12-bytes16-uint8-[`++extract_16_12++`]]
  5130. :replace_16_12: pass:normal[xref:#Packing-replace_16_12-bytes16-bytes12-uint8-[`++replace_16_12++`]]
  5131. :extract_20_1: pass:normal[xref:#Packing-extract_20_1-bytes20-uint8-[`++extract_20_1++`]]
  5132. :replace_20_1: pass:normal[xref:#Packing-replace_20_1-bytes20-bytes1-uint8-[`++replace_20_1++`]]
  5133. :extract_20_2: pass:normal[xref:#Packing-extract_20_2-bytes20-uint8-[`++extract_20_2++`]]
  5134. :replace_20_2: pass:normal[xref:#Packing-replace_20_2-bytes20-bytes2-uint8-[`++replace_20_2++`]]
  5135. :extract_20_4: pass:normal[xref:#Packing-extract_20_4-bytes20-uint8-[`++extract_20_4++`]]
  5136. :replace_20_4: pass:normal[xref:#Packing-replace_20_4-bytes20-bytes4-uint8-[`++replace_20_4++`]]
  5137. :extract_20_6: pass:normal[xref:#Packing-extract_20_6-bytes20-uint8-[`++extract_20_6++`]]
  5138. :replace_20_6: pass:normal[xref:#Packing-replace_20_6-bytes20-bytes6-uint8-[`++replace_20_6++`]]
  5139. :extract_20_8: pass:normal[xref:#Packing-extract_20_8-bytes20-uint8-[`++extract_20_8++`]]
  5140. :replace_20_8: pass:normal[xref:#Packing-replace_20_8-bytes20-bytes8-uint8-[`++replace_20_8++`]]
  5141. :extract_20_12: pass:normal[xref:#Packing-extract_20_12-bytes20-uint8-[`++extract_20_12++`]]
  5142. :replace_20_12: pass:normal[xref:#Packing-replace_20_12-bytes20-bytes12-uint8-[`++replace_20_12++`]]
  5143. :extract_20_16: pass:normal[xref:#Packing-extract_20_16-bytes20-uint8-[`++extract_20_16++`]]
  5144. :replace_20_16: pass:normal[xref:#Packing-replace_20_16-bytes20-bytes16-uint8-[`++replace_20_16++`]]
  5145. :extract_24_1: pass:normal[xref:#Packing-extract_24_1-bytes24-uint8-[`++extract_24_1++`]]
  5146. :replace_24_1: pass:normal[xref:#Packing-replace_24_1-bytes24-bytes1-uint8-[`++replace_24_1++`]]
  5147. :extract_24_2: pass:normal[xref:#Packing-extract_24_2-bytes24-uint8-[`++extract_24_2++`]]
  5148. :replace_24_2: pass:normal[xref:#Packing-replace_24_2-bytes24-bytes2-uint8-[`++replace_24_2++`]]
  5149. :extract_24_4: pass:normal[xref:#Packing-extract_24_4-bytes24-uint8-[`++extract_24_4++`]]
  5150. :replace_24_4: pass:normal[xref:#Packing-replace_24_4-bytes24-bytes4-uint8-[`++replace_24_4++`]]
  5151. :extract_24_6: pass:normal[xref:#Packing-extract_24_6-bytes24-uint8-[`++extract_24_6++`]]
  5152. :replace_24_6: pass:normal[xref:#Packing-replace_24_6-bytes24-bytes6-uint8-[`++replace_24_6++`]]
  5153. :extract_24_8: pass:normal[xref:#Packing-extract_24_8-bytes24-uint8-[`++extract_24_8++`]]
  5154. :replace_24_8: pass:normal[xref:#Packing-replace_24_8-bytes24-bytes8-uint8-[`++replace_24_8++`]]
  5155. :extract_24_12: pass:normal[xref:#Packing-extract_24_12-bytes24-uint8-[`++extract_24_12++`]]
  5156. :replace_24_12: pass:normal[xref:#Packing-replace_24_12-bytes24-bytes12-uint8-[`++replace_24_12++`]]
  5157. :extract_24_16: pass:normal[xref:#Packing-extract_24_16-bytes24-uint8-[`++extract_24_16++`]]
  5158. :replace_24_16: pass:normal[xref:#Packing-replace_24_16-bytes24-bytes16-uint8-[`++replace_24_16++`]]
  5159. :extract_24_20: pass:normal[xref:#Packing-extract_24_20-bytes24-uint8-[`++extract_24_20++`]]
  5160. :replace_24_20: pass:normal[xref:#Packing-replace_24_20-bytes24-bytes20-uint8-[`++replace_24_20++`]]
  5161. :extract_28_1: pass:normal[xref:#Packing-extract_28_1-bytes28-uint8-[`++extract_28_1++`]]
  5162. :replace_28_1: pass:normal[xref:#Packing-replace_28_1-bytes28-bytes1-uint8-[`++replace_28_1++`]]
  5163. :extract_28_2: pass:normal[xref:#Packing-extract_28_2-bytes28-uint8-[`++extract_28_2++`]]
  5164. :replace_28_2: pass:normal[xref:#Packing-replace_28_2-bytes28-bytes2-uint8-[`++replace_28_2++`]]
  5165. :extract_28_4: pass:normal[xref:#Packing-extract_28_4-bytes28-uint8-[`++extract_28_4++`]]
  5166. :replace_28_4: pass:normal[xref:#Packing-replace_28_4-bytes28-bytes4-uint8-[`++replace_28_4++`]]
  5167. :extract_28_6: pass:normal[xref:#Packing-extract_28_6-bytes28-uint8-[`++extract_28_6++`]]
  5168. :replace_28_6: pass:normal[xref:#Packing-replace_28_6-bytes28-bytes6-uint8-[`++replace_28_6++`]]
  5169. :extract_28_8: pass:normal[xref:#Packing-extract_28_8-bytes28-uint8-[`++extract_28_8++`]]
  5170. :replace_28_8: pass:normal[xref:#Packing-replace_28_8-bytes28-bytes8-uint8-[`++replace_28_8++`]]
  5171. :extract_28_12: pass:normal[xref:#Packing-extract_28_12-bytes28-uint8-[`++extract_28_12++`]]
  5172. :replace_28_12: pass:normal[xref:#Packing-replace_28_12-bytes28-bytes12-uint8-[`++replace_28_12++`]]
  5173. :extract_28_16: pass:normal[xref:#Packing-extract_28_16-bytes28-uint8-[`++extract_28_16++`]]
  5174. :replace_28_16: pass:normal[xref:#Packing-replace_28_16-bytes28-bytes16-uint8-[`++replace_28_16++`]]
  5175. :extract_28_20: pass:normal[xref:#Packing-extract_28_20-bytes28-uint8-[`++extract_28_20++`]]
  5176. :replace_28_20: pass:normal[xref:#Packing-replace_28_20-bytes28-bytes20-uint8-[`++replace_28_20++`]]
  5177. :extract_28_24: pass:normal[xref:#Packing-extract_28_24-bytes28-uint8-[`++extract_28_24++`]]
  5178. :replace_28_24: pass:normal[xref:#Packing-replace_28_24-bytes28-bytes24-uint8-[`++replace_28_24++`]]
  5179. :extract_32_1: pass:normal[xref:#Packing-extract_32_1-bytes32-uint8-[`++extract_32_1++`]]
  5180. :replace_32_1: pass:normal[xref:#Packing-replace_32_1-bytes32-bytes1-uint8-[`++replace_32_1++`]]
  5181. :extract_32_2: pass:normal[xref:#Packing-extract_32_2-bytes32-uint8-[`++extract_32_2++`]]
  5182. :replace_32_2: pass:normal[xref:#Packing-replace_32_2-bytes32-bytes2-uint8-[`++replace_32_2++`]]
  5183. :extract_32_4: pass:normal[xref:#Packing-extract_32_4-bytes32-uint8-[`++extract_32_4++`]]
  5184. :replace_32_4: pass:normal[xref:#Packing-replace_32_4-bytes32-bytes4-uint8-[`++replace_32_4++`]]
  5185. :extract_32_6: pass:normal[xref:#Packing-extract_32_6-bytes32-uint8-[`++extract_32_6++`]]
  5186. :replace_32_6: pass:normal[xref:#Packing-replace_32_6-bytes32-bytes6-uint8-[`++replace_32_6++`]]
  5187. :extract_32_8: pass:normal[xref:#Packing-extract_32_8-bytes32-uint8-[`++extract_32_8++`]]
  5188. :replace_32_8: pass:normal[xref:#Packing-replace_32_8-bytes32-bytes8-uint8-[`++replace_32_8++`]]
  5189. :extract_32_12: pass:normal[xref:#Packing-extract_32_12-bytes32-uint8-[`++extract_32_12++`]]
  5190. :replace_32_12: pass:normal[xref:#Packing-replace_32_12-bytes32-bytes12-uint8-[`++replace_32_12++`]]
  5191. :extract_32_16: pass:normal[xref:#Packing-extract_32_16-bytes32-uint8-[`++extract_32_16++`]]
  5192. :replace_32_16: pass:normal[xref:#Packing-replace_32_16-bytes32-bytes16-uint8-[`++replace_32_16++`]]
  5193. :extract_32_20: pass:normal[xref:#Packing-extract_32_20-bytes32-uint8-[`++extract_32_20++`]]
  5194. :replace_32_20: pass:normal[xref:#Packing-replace_32_20-bytes32-bytes20-uint8-[`++replace_32_20++`]]
  5195. :extract_32_24: pass:normal[xref:#Packing-extract_32_24-bytes32-uint8-[`++extract_32_24++`]]
  5196. :replace_32_24: pass:normal[xref:#Packing-replace_32_24-bytes32-bytes24-uint8-[`++replace_32_24++`]]
  5197. :extract_32_28: pass:normal[xref:#Packing-extract_32_28-bytes32-uint8-[`++extract_32_28++`]]
  5198. :replace_32_28: pass:normal[xref:#Packing-replace_32_28-bytes32-bytes28-uint8-[`++replace_32_28++`]]
  5199. [.contract]
  5200. [[Packing]]
  5201. === `++Packing++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Packing.sol[{github-icon},role=heading-link]
  5202. [.hljs-theme-light.nopadding]
  5203. ```solidity
  5204. import "@openzeppelin/contracts/utils/Packing.sol";
  5205. ```
  5206. Helper library packing and unpacking multiple values into bytesXX.
  5207. Example usage:
  5208. ```solidity
  5209. library MyPacker {
  5210. type MyType is bytes32;
  5211. function _pack(address account, bytes4 selector, uint64 period) external pure returns (MyType) {
  5212. bytes12 subpack = Packing.pack_4_8(selector, bytes8(period));
  5213. bytes32 pack = Packing.pack_20_12(bytes20(account), subpack);
  5214. return MyType.wrap(pack);
  5215. }
  5216. function _unpack(MyType self) external pure returns (address, bytes4, uint64) {
  5217. bytes32 pack = MyType.unwrap(self);
  5218. return (
  5219. address(Packing.extract_32_20(pack, 0)),
  5220. Packing.extract_32_4(pack, 20),
  5221. uint64(Packing.extract_32_8(pack, 24))
  5222. );
  5223. }
  5224. }
  5225. ```
  5226. _Available since v5.1._
  5227. [.contract-index]
  5228. .Functions
  5229. --
  5230. * {xref-Packing-pack_1_1-bytes1-bytes1-}[`++pack_1_1(left, right)++`]
  5231. * {xref-Packing-pack_2_2-bytes2-bytes2-}[`++pack_2_2(left, right)++`]
  5232. * {xref-Packing-pack_2_4-bytes2-bytes4-}[`++pack_2_4(left, right)++`]
  5233. * {xref-Packing-pack_2_6-bytes2-bytes6-}[`++pack_2_6(left, right)++`]
  5234. * {xref-Packing-pack_4_2-bytes4-bytes2-}[`++pack_4_2(left, right)++`]
  5235. * {xref-Packing-pack_4_4-bytes4-bytes4-}[`++pack_4_4(left, right)++`]
  5236. * {xref-Packing-pack_4_8-bytes4-bytes8-}[`++pack_4_8(left, right)++`]
  5237. * {xref-Packing-pack_4_12-bytes4-bytes12-}[`++pack_4_12(left, right)++`]
  5238. * {xref-Packing-pack_4_16-bytes4-bytes16-}[`++pack_4_16(left, right)++`]
  5239. * {xref-Packing-pack_4_20-bytes4-bytes20-}[`++pack_4_20(left, right)++`]
  5240. * {xref-Packing-pack_4_24-bytes4-bytes24-}[`++pack_4_24(left, right)++`]
  5241. * {xref-Packing-pack_4_28-bytes4-bytes28-}[`++pack_4_28(left, right)++`]
  5242. * {xref-Packing-pack_6_2-bytes6-bytes2-}[`++pack_6_2(left, right)++`]
  5243. * {xref-Packing-pack_6_6-bytes6-bytes6-}[`++pack_6_6(left, right)++`]
  5244. * {xref-Packing-pack_8_4-bytes8-bytes4-}[`++pack_8_4(left, right)++`]
  5245. * {xref-Packing-pack_8_8-bytes8-bytes8-}[`++pack_8_8(left, right)++`]
  5246. * {xref-Packing-pack_8_12-bytes8-bytes12-}[`++pack_8_12(left, right)++`]
  5247. * {xref-Packing-pack_8_16-bytes8-bytes16-}[`++pack_8_16(left, right)++`]
  5248. * {xref-Packing-pack_8_20-bytes8-bytes20-}[`++pack_8_20(left, right)++`]
  5249. * {xref-Packing-pack_8_24-bytes8-bytes24-}[`++pack_8_24(left, right)++`]
  5250. * {xref-Packing-pack_12_4-bytes12-bytes4-}[`++pack_12_4(left, right)++`]
  5251. * {xref-Packing-pack_12_8-bytes12-bytes8-}[`++pack_12_8(left, right)++`]
  5252. * {xref-Packing-pack_12_12-bytes12-bytes12-}[`++pack_12_12(left, right)++`]
  5253. * {xref-Packing-pack_12_16-bytes12-bytes16-}[`++pack_12_16(left, right)++`]
  5254. * {xref-Packing-pack_12_20-bytes12-bytes20-}[`++pack_12_20(left, right)++`]
  5255. * {xref-Packing-pack_16_4-bytes16-bytes4-}[`++pack_16_4(left, right)++`]
  5256. * {xref-Packing-pack_16_8-bytes16-bytes8-}[`++pack_16_8(left, right)++`]
  5257. * {xref-Packing-pack_16_12-bytes16-bytes12-}[`++pack_16_12(left, right)++`]
  5258. * {xref-Packing-pack_16_16-bytes16-bytes16-}[`++pack_16_16(left, right)++`]
  5259. * {xref-Packing-pack_20_4-bytes20-bytes4-}[`++pack_20_4(left, right)++`]
  5260. * {xref-Packing-pack_20_8-bytes20-bytes8-}[`++pack_20_8(left, right)++`]
  5261. * {xref-Packing-pack_20_12-bytes20-bytes12-}[`++pack_20_12(left, right)++`]
  5262. * {xref-Packing-pack_24_4-bytes24-bytes4-}[`++pack_24_4(left, right)++`]
  5263. * {xref-Packing-pack_24_8-bytes24-bytes8-}[`++pack_24_8(left, right)++`]
  5264. * {xref-Packing-pack_28_4-bytes28-bytes4-}[`++pack_28_4(left, right)++`]
  5265. * {xref-Packing-extract_2_1-bytes2-uint8-}[`++extract_2_1(self, offset)++`]
  5266. * {xref-Packing-replace_2_1-bytes2-bytes1-uint8-}[`++replace_2_1(self, value, offset)++`]
  5267. * {xref-Packing-extract_4_1-bytes4-uint8-}[`++extract_4_1(self, offset)++`]
  5268. * {xref-Packing-replace_4_1-bytes4-bytes1-uint8-}[`++replace_4_1(self, value, offset)++`]
  5269. * {xref-Packing-extract_4_2-bytes4-uint8-}[`++extract_4_2(self, offset)++`]
  5270. * {xref-Packing-replace_4_2-bytes4-bytes2-uint8-}[`++replace_4_2(self, value, offset)++`]
  5271. * {xref-Packing-extract_6_1-bytes6-uint8-}[`++extract_6_1(self, offset)++`]
  5272. * {xref-Packing-replace_6_1-bytes6-bytes1-uint8-}[`++replace_6_1(self, value, offset)++`]
  5273. * {xref-Packing-extract_6_2-bytes6-uint8-}[`++extract_6_2(self, offset)++`]
  5274. * {xref-Packing-replace_6_2-bytes6-bytes2-uint8-}[`++replace_6_2(self, value, offset)++`]
  5275. * {xref-Packing-extract_6_4-bytes6-uint8-}[`++extract_6_4(self, offset)++`]
  5276. * {xref-Packing-replace_6_4-bytes6-bytes4-uint8-}[`++replace_6_4(self, value, offset)++`]
  5277. * {xref-Packing-extract_8_1-bytes8-uint8-}[`++extract_8_1(self, offset)++`]
  5278. * {xref-Packing-replace_8_1-bytes8-bytes1-uint8-}[`++replace_8_1(self, value, offset)++`]
  5279. * {xref-Packing-extract_8_2-bytes8-uint8-}[`++extract_8_2(self, offset)++`]
  5280. * {xref-Packing-replace_8_2-bytes8-bytes2-uint8-}[`++replace_8_2(self, value, offset)++`]
  5281. * {xref-Packing-extract_8_4-bytes8-uint8-}[`++extract_8_4(self, offset)++`]
  5282. * {xref-Packing-replace_8_4-bytes8-bytes4-uint8-}[`++replace_8_4(self, value, offset)++`]
  5283. * {xref-Packing-extract_8_6-bytes8-uint8-}[`++extract_8_6(self, offset)++`]
  5284. * {xref-Packing-replace_8_6-bytes8-bytes6-uint8-}[`++replace_8_6(self, value, offset)++`]
  5285. * {xref-Packing-extract_12_1-bytes12-uint8-}[`++extract_12_1(self, offset)++`]
  5286. * {xref-Packing-replace_12_1-bytes12-bytes1-uint8-}[`++replace_12_1(self, value, offset)++`]
  5287. * {xref-Packing-extract_12_2-bytes12-uint8-}[`++extract_12_2(self, offset)++`]
  5288. * {xref-Packing-replace_12_2-bytes12-bytes2-uint8-}[`++replace_12_2(self, value, offset)++`]
  5289. * {xref-Packing-extract_12_4-bytes12-uint8-}[`++extract_12_4(self, offset)++`]
  5290. * {xref-Packing-replace_12_4-bytes12-bytes4-uint8-}[`++replace_12_4(self, value, offset)++`]
  5291. * {xref-Packing-extract_12_6-bytes12-uint8-}[`++extract_12_6(self, offset)++`]
  5292. * {xref-Packing-replace_12_6-bytes12-bytes6-uint8-}[`++replace_12_6(self, value, offset)++`]
  5293. * {xref-Packing-extract_12_8-bytes12-uint8-}[`++extract_12_8(self, offset)++`]
  5294. * {xref-Packing-replace_12_8-bytes12-bytes8-uint8-}[`++replace_12_8(self, value, offset)++`]
  5295. * {xref-Packing-extract_16_1-bytes16-uint8-}[`++extract_16_1(self, offset)++`]
  5296. * {xref-Packing-replace_16_1-bytes16-bytes1-uint8-}[`++replace_16_1(self, value, offset)++`]
  5297. * {xref-Packing-extract_16_2-bytes16-uint8-}[`++extract_16_2(self, offset)++`]
  5298. * {xref-Packing-replace_16_2-bytes16-bytes2-uint8-}[`++replace_16_2(self, value, offset)++`]
  5299. * {xref-Packing-extract_16_4-bytes16-uint8-}[`++extract_16_4(self, offset)++`]
  5300. * {xref-Packing-replace_16_4-bytes16-bytes4-uint8-}[`++replace_16_4(self, value, offset)++`]
  5301. * {xref-Packing-extract_16_6-bytes16-uint8-}[`++extract_16_6(self, offset)++`]
  5302. * {xref-Packing-replace_16_6-bytes16-bytes6-uint8-}[`++replace_16_6(self, value, offset)++`]
  5303. * {xref-Packing-extract_16_8-bytes16-uint8-}[`++extract_16_8(self, offset)++`]
  5304. * {xref-Packing-replace_16_8-bytes16-bytes8-uint8-}[`++replace_16_8(self, value, offset)++`]
  5305. * {xref-Packing-extract_16_12-bytes16-uint8-}[`++extract_16_12(self, offset)++`]
  5306. * {xref-Packing-replace_16_12-bytes16-bytes12-uint8-}[`++replace_16_12(self, value, offset)++`]
  5307. * {xref-Packing-extract_20_1-bytes20-uint8-}[`++extract_20_1(self, offset)++`]
  5308. * {xref-Packing-replace_20_1-bytes20-bytes1-uint8-}[`++replace_20_1(self, value, offset)++`]
  5309. * {xref-Packing-extract_20_2-bytes20-uint8-}[`++extract_20_2(self, offset)++`]
  5310. * {xref-Packing-replace_20_2-bytes20-bytes2-uint8-}[`++replace_20_2(self, value, offset)++`]
  5311. * {xref-Packing-extract_20_4-bytes20-uint8-}[`++extract_20_4(self, offset)++`]
  5312. * {xref-Packing-replace_20_4-bytes20-bytes4-uint8-}[`++replace_20_4(self, value, offset)++`]
  5313. * {xref-Packing-extract_20_6-bytes20-uint8-}[`++extract_20_6(self, offset)++`]
  5314. * {xref-Packing-replace_20_6-bytes20-bytes6-uint8-}[`++replace_20_6(self, value, offset)++`]
  5315. * {xref-Packing-extract_20_8-bytes20-uint8-}[`++extract_20_8(self, offset)++`]
  5316. * {xref-Packing-replace_20_8-bytes20-bytes8-uint8-}[`++replace_20_8(self, value, offset)++`]
  5317. * {xref-Packing-extract_20_12-bytes20-uint8-}[`++extract_20_12(self, offset)++`]
  5318. * {xref-Packing-replace_20_12-bytes20-bytes12-uint8-}[`++replace_20_12(self, value, offset)++`]
  5319. * {xref-Packing-extract_20_16-bytes20-uint8-}[`++extract_20_16(self, offset)++`]
  5320. * {xref-Packing-replace_20_16-bytes20-bytes16-uint8-}[`++replace_20_16(self, value, offset)++`]
  5321. * {xref-Packing-extract_24_1-bytes24-uint8-}[`++extract_24_1(self, offset)++`]
  5322. * {xref-Packing-replace_24_1-bytes24-bytes1-uint8-}[`++replace_24_1(self, value, offset)++`]
  5323. * {xref-Packing-extract_24_2-bytes24-uint8-}[`++extract_24_2(self, offset)++`]
  5324. * {xref-Packing-replace_24_2-bytes24-bytes2-uint8-}[`++replace_24_2(self, value, offset)++`]
  5325. * {xref-Packing-extract_24_4-bytes24-uint8-}[`++extract_24_4(self, offset)++`]
  5326. * {xref-Packing-replace_24_4-bytes24-bytes4-uint8-}[`++replace_24_4(self, value, offset)++`]
  5327. * {xref-Packing-extract_24_6-bytes24-uint8-}[`++extract_24_6(self, offset)++`]
  5328. * {xref-Packing-replace_24_6-bytes24-bytes6-uint8-}[`++replace_24_6(self, value, offset)++`]
  5329. * {xref-Packing-extract_24_8-bytes24-uint8-}[`++extract_24_8(self, offset)++`]
  5330. * {xref-Packing-replace_24_8-bytes24-bytes8-uint8-}[`++replace_24_8(self, value, offset)++`]
  5331. * {xref-Packing-extract_24_12-bytes24-uint8-}[`++extract_24_12(self, offset)++`]
  5332. * {xref-Packing-replace_24_12-bytes24-bytes12-uint8-}[`++replace_24_12(self, value, offset)++`]
  5333. * {xref-Packing-extract_24_16-bytes24-uint8-}[`++extract_24_16(self, offset)++`]
  5334. * {xref-Packing-replace_24_16-bytes24-bytes16-uint8-}[`++replace_24_16(self, value, offset)++`]
  5335. * {xref-Packing-extract_24_20-bytes24-uint8-}[`++extract_24_20(self, offset)++`]
  5336. * {xref-Packing-replace_24_20-bytes24-bytes20-uint8-}[`++replace_24_20(self, value, offset)++`]
  5337. * {xref-Packing-extract_28_1-bytes28-uint8-}[`++extract_28_1(self, offset)++`]
  5338. * {xref-Packing-replace_28_1-bytes28-bytes1-uint8-}[`++replace_28_1(self, value, offset)++`]
  5339. * {xref-Packing-extract_28_2-bytes28-uint8-}[`++extract_28_2(self, offset)++`]
  5340. * {xref-Packing-replace_28_2-bytes28-bytes2-uint8-}[`++replace_28_2(self, value, offset)++`]
  5341. * {xref-Packing-extract_28_4-bytes28-uint8-}[`++extract_28_4(self, offset)++`]
  5342. * {xref-Packing-replace_28_4-bytes28-bytes4-uint8-}[`++replace_28_4(self, value, offset)++`]
  5343. * {xref-Packing-extract_28_6-bytes28-uint8-}[`++extract_28_6(self, offset)++`]
  5344. * {xref-Packing-replace_28_6-bytes28-bytes6-uint8-}[`++replace_28_6(self, value, offset)++`]
  5345. * {xref-Packing-extract_28_8-bytes28-uint8-}[`++extract_28_8(self, offset)++`]
  5346. * {xref-Packing-replace_28_8-bytes28-bytes8-uint8-}[`++replace_28_8(self, value, offset)++`]
  5347. * {xref-Packing-extract_28_12-bytes28-uint8-}[`++extract_28_12(self, offset)++`]
  5348. * {xref-Packing-replace_28_12-bytes28-bytes12-uint8-}[`++replace_28_12(self, value, offset)++`]
  5349. * {xref-Packing-extract_28_16-bytes28-uint8-}[`++extract_28_16(self, offset)++`]
  5350. * {xref-Packing-replace_28_16-bytes28-bytes16-uint8-}[`++replace_28_16(self, value, offset)++`]
  5351. * {xref-Packing-extract_28_20-bytes28-uint8-}[`++extract_28_20(self, offset)++`]
  5352. * {xref-Packing-replace_28_20-bytes28-bytes20-uint8-}[`++replace_28_20(self, value, offset)++`]
  5353. * {xref-Packing-extract_28_24-bytes28-uint8-}[`++extract_28_24(self, offset)++`]
  5354. * {xref-Packing-replace_28_24-bytes28-bytes24-uint8-}[`++replace_28_24(self, value, offset)++`]
  5355. * {xref-Packing-extract_32_1-bytes32-uint8-}[`++extract_32_1(self, offset)++`]
  5356. * {xref-Packing-replace_32_1-bytes32-bytes1-uint8-}[`++replace_32_1(self, value, offset)++`]
  5357. * {xref-Packing-extract_32_2-bytes32-uint8-}[`++extract_32_2(self, offset)++`]
  5358. * {xref-Packing-replace_32_2-bytes32-bytes2-uint8-}[`++replace_32_2(self, value, offset)++`]
  5359. * {xref-Packing-extract_32_4-bytes32-uint8-}[`++extract_32_4(self, offset)++`]
  5360. * {xref-Packing-replace_32_4-bytes32-bytes4-uint8-}[`++replace_32_4(self, value, offset)++`]
  5361. * {xref-Packing-extract_32_6-bytes32-uint8-}[`++extract_32_6(self, offset)++`]
  5362. * {xref-Packing-replace_32_6-bytes32-bytes6-uint8-}[`++replace_32_6(self, value, offset)++`]
  5363. * {xref-Packing-extract_32_8-bytes32-uint8-}[`++extract_32_8(self, offset)++`]
  5364. * {xref-Packing-replace_32_8-bytes32-bytes8-uint8-}[`++replace_32_8(self, value, offset)++`]
  5365. * {xref-Packing-extract_32_12-bytes32-uint8-}[`++extract_32_12(self, offset)++`]
  5366. * {xref-Packing-replace_32_12-bytes32-bytes12-uint8-}[`++replace_32_12(self, value, offset)++`]
  5367. * {xref-Packing-extract_32_16-bytes32-uint8-}[`++extract_32_16(self, offset)++`]
  5368. * {xref-Packing-replace_32_16-bytes32-bytes16-uint8-}[`++replace_32_16(self, value, offset)++`]
  5369. * {xref-Packing-extract_32_20-bytes32-uint8-}[`++extract_32_20(self, offset)++`]
  5370. * {xref-Packing-replace_32_20-bytes32-bytes20-uint8-}[`++replace_32_20(self, value, offset)++`]
  5371. * {xref-Packing-extract_32_24-bytes32-uint8-}[`++extract_32_24(self, offset)++`]
  5372. * {xref-Packing-replace_32_24-bytes32-bytes24-uint8-}[`++replace_32_24(self, value, offset)++`]
  5373. * {xref-Packing-extract_32_28-bytes32-uint8-}[`++extract_32_28(self, offset)++`]
  5374. * {xref-Packing-replace_32_28-bytes32-bytes28-uint8-}[`++replace_32_28(self, value, offset)++`]
  5375. --
  5376. [.contract-index]
  5377. .Errors
  5378. --
  5379. * {xref-Packing-OutOfRangeAccess--}[`++OutOfRangeAccess()++`]
  5380. --
  5381. [.contract-item]
  5382. [[Packing-pack_1_1-bytes1-bytes1-]]
  5383. ==== `[.contract-item-name]#++pack_1_1++#++(bytes1 left, bytes1 right) → bytes2 result++` [.item-kind]#internal#
  5384. [.contract-item]
  5385. [[Packing-pack_2_2-bytes2-bytes2-]]
  5386. ==== `[.contract-item-name]#++pack_2_2++#++(bytes2 left, bytes2 right) → bytes4 result++` [.item-kind]#internal#
  5387. [.contract-item]
  5388. [[Packing-pack_2_4-bytes2-bytes4-]]
  5389. ==== `[.contract-item-name]#++pack_2_4++#++(bytes2 left, bytes4 right) → bytes6 result++` [.item-kind]#internal#
  5390. [.contract-item]
  5391. [[Packing-pack_2_6-bytes2-bytes6-]]
  5392. ==== `[.contract-item-name]#++pack_2_6++#++(bytes2 left, bytes6 right) → bytes8 result++` [.item-kind]#internal#
  5393. [.contract-item]
  5394. [[Packing-pack_4_2-bytes4-bytes2-]]
  5395. ==== `[.contract-item-name]#++pack_4_2++#++(bytes4 left, bytes2 right) → bytes6 result++` [.item-kind]#internal#
  5396. [.contract-item]
  5397. [[Packing-pack_4_4-bytes4-bytes4-]]
  5398. ==== `[.contract-item-name]#++pack_4_4++#++(bytes4 left, bytes4 right) → bytes8 result++` [.item-kind]#internal#
  5399. [.contract-item]
  5400. [[Packing-pack_4_8-bytes4-bytes8-]]
  5401. ==== `[.contract-item-name]#++pack_4_8++#++(bytes4 left, bytes8 right) → bytes12 result++` [.item-kind]#internal#
  5402. [.contract-item]
  5403. [[Packing-pack_4_12-bytes4-bytes12-]]
  5404. ==== `[.contract-item-name]#++pack_4_12++#++(bytes4 left, bytes12 right) → bytes16 result++` [.item-kind]#internal#
  5405. [.contract-item]
  5406. [[Packing-pack_4_16-bytes4-bytes16-]]
  5407. ==== `[.contract-item-name]#++pack_4_16++#++(bytes4 left, bytes16 right) → bytes20 result++` [.item-kind]#internal#
  5408. [.contract-item]
  5409. [[Packing-pack_4_20-bytes4-bytes20-]]
  5410. ==== `[.contract-item-name]#++pack_4_20++#++(bytes4 left, bytes20 right) → bytes24 result++` [.item-kind]#internal#
  5411. [.contract-item]
  5412. [[Packing-pack_4_24-bytes4-bytes24-]]
  5413. ==== `[.contract-item-name]#++pack_4_24++#++(bytes4 left, bytes24 right) → bytes28 result++` [.item-kind]#internal#
  5414. [.contract-item]
  5415. [[Packing-pack_4_28-bytes4-bytes28-]]
  5416. ==== `[.contract-item-name]#++pack_4_28++#++(bytes4 left, bytes28 right) → bytes32 result++` [.item-kind]#internal#
  5417. [.contract-item]
  5418. [[Packing-pack_6_2-bytes6-bytes2-]]
  5419. ==== `[.contract-item-name]#++pack_6_2++#++(bytes6 left, bytes2 right) → bytes8 result++` [.item-kind]#internal#
  5420. [.contract-item]
  5421. [[Packing-pack_6_6-bytes6-bytes6-]]
  5422. ==== `[.contract-item-name]#++pack_6_6++#++(bytes6 left, bytes6 right) → bytes12 result++` [.item-kind]#internal#
  5423. [.contract-item]
  5424. [[Packing-pack_8_4-bytes8-bytes4-]]
  5425. ==== `[.contract-item-name]#++pack_8_4++#++(bytes8 left, bytes4 right) → bytes12 result++` [.item-kind]#internal#
  5426. [.contract-item]
  5427. [[Packing-pack_8_8-bytes8-bytes8-]]
  5428. ==== `[.contract-item-name]#++pack_8_8++#++(bytes8 left, bytes8 right) → bytes16 result++` [.item-kind]#internal#
  5429. [.contract-item]
  5430. [[Packing-pack_8_12-bytes8-bytes12-]]
  5431. ==== `[.contract-item-name]#++pack_8_12++#++(bytes8 left, bytes12 right) → bytes20 result++` [.item-kind]#internal#
  5432. [.contract-item]
  5433. [[Packing-pack_8_16-bytes8-bytes16-]]
  5434. ==== `[.contract-item-name]#++pack_8_16++#++(bytes8 left, bytes16 right) → bytes24 result++` [.item-kind]#internal#
  5435. [.contract-item]
  5436. [[Packing-pack_8_20-bytes8-bytes20-]]
  5437. ==== `[.contract-item-name]#++pack_8_20++#++(bytes8 left, bytes20 right) → bytes28 result++` [.item-kind]#internal#
  5438. [.contract-item]
  5439. [[Packing-pack_8_24-bytes8-bytes24-]]
  5440. ==== `[.contract-item-name]#++pack_8_24++#++(bytes8 left, bytes24 right) → bytes32 result++` [.item-kind]#internal#
  5441. [.contract-item]
  5442. [[Packing-pack_12_4-bytes12-bytes4-]]
  5443. ==== `[.contract-item-name]#++pack_12_4++#++(bytes12 left, bytes4 right) → bytes16 result++` [.item-kind]#internal#
  5444. [.contract-item]
  5445. [[Packing-pack_12_8-bytes12-bytes8-]]
  5446. ==== `[.contract-item-name]#++pack_12_8++#++(bytes12 left, bytes8 right) → bytes20 result++` [.item-kind]#internal#
  5447. [.contract-item]
  5448. [[Packing-pack_12_12-bytes12-bytes12-]]
  5449. ==== `[.contract-item-name]#++pack_12_12++#++(bytes12 left, bytes12 right) → bytes24 result++` [.item-kind]#internal#
  5450. [.contract-item]
  5451. [[Packing-pack_12_16-bytes12-bytes16-]]
  5452. ==== `[.contract-item-name]#++pack_12_16++#++(bytes12 left, bytes16 right) → bytes28 result++` [.item-kind]#internal#
  5453. [.contract-item]
  5454. [[Packing-pack_12_20-bytes12-bytes20-]]
  5455. ==== `[.contract-item-name]#++pack_12_20++#++(bytes12 left, bytes20 right) → bytes32 result++` [.item-kind]#internal#
  5456. [.contract-item]
  5457. [[Packing-pack_16_4-bytes16-bytes4-]]
  5458. ==== `[.contract-item-name]#++pack_16_4++#++(bytes16 left, bytes4 right) → bytes20 result++` [.item-kind]#internal#
  5459. [.contract-item]
  5460. [[Packing-pack_16_8-bytes16-bytes8-]]
  5461. ==== `[.contract-item-name]#++pack_16_8++#++(bytes16 left, bytes8 right) → bytes24 result++` [.item-kind]#internal#
  5462. [.contract-item]
  5463. [[Packing-pack_16_12-bytes16-bytes12-]]
  5464. ==== `[.contract-item-name]#++pack_16_12++#++(bytes16 left, bytes12 right) → bytes28 result++` [.item-kind]#internal#
  5465. [.contract-item]
  5466. [[Packing-pack_16_16-bytes16-bytes16-]]
  5467. ==== `[.contract-item-name]#++pack_16_16++#++(bytes16 left, bytes16 right) → bytes32 result++` [.item-kind]#internal#
  5468. [.contract-item]
  5469. [[Packing-pack_20_4-bytes20-bytes4-]]
  5470. ==== `[.contract-item-name]#++pack_20_4++#++(bytes20 left, bytes4 right) → bytes24 result++` [.item-kind]#internal#
  5471. [.contract-item]
  5472. [[Packing-pack_20_8-bytes20-bytes8-]]
  5473. ==== `[.contract-item-name]#++pack_20_8++#++(bytes20 left, bytes8 right) → bytes28 result++` [.item-kind]#internal#
  5474. [.contract-item]
  5475. [[Packing-pack_20_12-bytes20-bytes12-]]
  5476. ==== `[.contract-item-name]#++pack_20_12++#++(bytes20 left, bytes12 right) → bytes32 result++` [.item-kind]#internal#
  5477. [.contract-item]
  5478. [[Packing-pack_24_4-bytes24-bytes4-]]
  5479. ==== `[.contract-item-name]#++pack_24_4++#++(bytes24 left, bytes4 right) → bytes28 result++` [.item-kind]#internal#
  5480. [.contract-item]
  5481. [[Packing-pack_24_8-bytes24-bytes8-]]
  5482. ==== `[.contract-item-name]#++pack_24_8++#++(bytes24 left, bytes8 right) → bytes32 result++` [.item-kind]#internal#
  5483. [.contract-item]
  5484. [[Packing-pack_28_4-bytes28-bytes4-]]
  5485. ==== `[.contract-item-name]#++pack_28_4++#++(bytes28 left, bytes4 right) → bytes32 result++` [.item-kind]#internal#
  5486. [.contract-item]
  5487. [[Packing-extract_2_1-bytes2-uint8-]]
  5488. ==== `[.contract-item-name]#++extract_2_1++#++(bytes2 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
  5489. [.contract-item]
  5490. [[Packing-replace_2_1-bytes2-bytes1-uint8-]]
  5491. ==== `[.contract-item-name]#++replace_2_1++#++(bytes2 self, bytes1 value, uint8 offset) → bytes2 result++` [.item-kind]#internal#
  5492. [.contract-item]
  5493. [[Packing-extract_4_1-bytes4-uint8-]]
  5494. ==== `[.contract-item-name]#++extract_4_1++#++(bytes4 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
  5495. [.contract-item]
  5496. [[Packing-replace_4_1-bytes4-bytes1-uint8-]]
  5497. ==== `[.contract-item-name]#++replace_4_1++#++(bytes4 self, bytes1 value, uint8 offset) → bytes4 result++` [.item-kind]#internal#
  5498. [.contract-item]
  5499. [[Packing-extract_4_2-bytes4-uint8-]]
  5500. ==== `[.contract-item-name]#++extract_4_2++#++(bytes4 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
  5501. [.contract-item]
  5502. [[Packing-replace_4_2-bytes4-bytes2-uint8-]]
  5503. ==== `[.contract-item-name]#++replace_4_2++#++(bytes4 self, bytes2 value, uint8 offset) → bytes4 result++` [.item-kind]#internal#
  5504. [.contract-item]
  5505. [[Packing-extract_6_1-bytes6-uint8-]]
  5506. ==== `[.contract-item-name]#++extract_6_1++#++(bytes6 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
  5507. [.contract-item]
  5508. [[Packing-replace_6_1-bytes6-bytes1-uint8-]]
  5509. ==== `[.contract-item-name]#++replace_6_1++#++(bytes6 self, bytes1 value, uint8 offset) → bytes6 result++` [.item-kind]#internal#
  5510. [.contract-item]
  5511. [[Packing-extract_6_2-bytes6-uint8-]]
  5512. ==== `[.contract-item-name]#++extract_6_2++#++(bytes6 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
  5513. [.contract-item]
  5514. [[Packing-replace_6_2-bytes6-bytes2-uint8-]]
  5515. ==== `[.contract-item-name]#++replace_6_2++#++(bytes6 self, bytes2 value, uint8 offset) → bytes6 result++` [.item-kind]#internal#
  5516. [.contract-item]
  5517. [[Packing-extract_6_4-bytes6-uint8-]]
  5518. ==== `[.contract-item-name]#++extract_6_4++#++(bytes6 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
  5519. [.contract-item]
  5520. [[Packing-replace_6_4-bytes6-bytes4-uint8-]]
  5521. ==== `[.contract-item-name]#++replace_6_4++#++(bytes6 self, bytes4 value, uint8 offset) → bytes6 result++` [.item-kind]#internal#
  5522. [.contract-item]
  5523. [[Packing-extract_8_1-bytes8-uint8-]]
  5524. ==== `[.contract-item-name]#++extract_8_1++#++(bytes8 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
  5525. [.contract-item]
  5526. [[Packing-replace_8_1-bytes8-bytes1-uint8-]]
  5527. ==== `[.contract-item-name]#++replace_8_1++#++(bytes8 self, bytes1 value, uint8 offset) → bytes8 result++` [.item-kind]#internal#
  5528. [.contract-item]
  5529. [[Packing-extract_8_2-bytes8-uint8-]]
  5530. ==== `[.contract-item-name]#++extract_8_2++#++(bytes8 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
  5531. [.contract-item]
  5532. [[Packing-replace_8_2-bytes8-bytes2-uint8-]]
  5533. ==== `[.contract-item-name]#++replace_8_2++#++(bytes8 self, bytes2 value, uint8 offset) → bytes8 result++` [.item-kind]#internal#
  5534. [.contract-item]
  5535. [[Packing-extract_8_4-bytes8-uint8-]]
  5536. ==== `[.contract-item-name]#++extract_8_4++#++(bytes8 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
  5537. [.contract-item]
  5538. [[Packing-replace_8_4-bytes8-bytes4-uint8-]]
  5539. ==== `[.contract-item-name]#++replace_8_4++#++(bytes8 self, bytes4 value, uint8 offset) → bytes8 result++` [.item-kind]#internal#
  5540. [.contract-item]
  5541. [[Packing-extract_8_6-bytes8-uint8-]]
  5542. ==== `[.contract-item-name]#++extract_8_6++#++(bytes8 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
  5543. [.contract-item]
  5544. [[Packing-replace_8_6-bytes8-bytes6-uint8-]]
  5545. ==== `[.contract-item-name]#++replace_8_6++#++(bytes8 self, bytes6 value, uint8 offset) → bytes8 result++` [.item-kind]#internal#
  5546. [.contract-item]
  5547. [[Packing-extract_12_1-bytes12-uint8-]]
  5548. ==== `[.contract-item-name]#++extract_12_1++#++(bytes12 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
  5549. [.contract-item]
  5550. [[Packing-replace_12_1-bytes12-bytes1-uint8-]]
  5551. ==== `[.contract-item-name]#++replace_12_1++#++(bytes12 self, bytes1 value, uint8 offset) → bytes12 result++` [.item-kind]#internal#
  5552. [.contract-item]
  5553. [[Packing-extract_12_2-bytes12-uint8-]]
  5554. ==== `[.contract-item-name]#++extract_12_2++#++(bytes12 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
  5555. [.contract-item]
  5556. [[Packing-replace_12_2-bytes12-bytes2-uint8-]]
  5557. ==== `[.contract-item-name]#++replace_12_2++#++(bytes12 self, bytes2 value, uint8 offset) → bytes12 result++` [.item-kind]#internal#
  5558. [.contract-item]
  5559. [[Packing-extract_12_4-bytes12-uint8-]]
  5560. ==== `[.contract-item-name]#++extract_12_4++#++(bytes12 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
  5561. [.contract-item]
  5562. [[Packing-replace_12_4-bytes12-bytes4-uint8-]]
  5563. ==== `[.contract-item-name]#++replace_12_4++#++(bytes12 self, bytes4 value, uint8 offset) → bytes12 result++` [.item-kind]#internal#
  5564. [.contract-item]
  5565. [[Packing-extract_12_6-bytes12-uint8-]]
  5566. ==== `[.contract-item-name]#++extract_12_6++#++(bytes12 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
  5567. [.contract-item]
  5568. [[Packing-replace_12_6-bytes12-bytes6-uint8-]]
  5569. ==== `[.contract-item-name]#++replace_12_6++#++(bytes12 self, bytes6 value, uint8 offset) → bytes12 result++` [.item-kind]#internal#
  5570. [.contract-item]
  5571. [[Packing-extract_12_8-bytes12-uint8-]]
  5572. ==== `[.contract-item-name]#++extract_12_8++#++(bytes12 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
  5573. [.contract-item]
  5574. [[Packing-replace_12_8-bytes12-bytes8-uint8-]]
  5575. ==== `[.contract-item-name]#++replace_12_8++#++(bytes12 self, bytes8 value, uint8 offset) → bytes12 result++` [.item-kind]#internal#
  5576. [.contract-item]
  5577. [[Packing-extract_16_1-bytes16-uint8-]]
  5578. ==== `[.contract-item-name]#++extract_16_1++#++(bytes16 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
  5579. [.contract-item]
  5580. [[Packing-replace_16_1-bytes16-bytes1-uint8-]]
  5581. ==== `[.contract-item-name]#++replace_16_1++#++(bytes16 self, bytes1 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
  5582. [.contract-item]
  5583. [[Packing-extract_16_2-bytes16-uint8-]]
  5584. ==== `[.contract-item-name]#++extract_16_2++#++(bytes16 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
  5585. [.contract-item]
  5586. [[Packing-replace_16_2-bytes16-bytes2-uint8-]]
  5587. ==== `[.contract-item-name]#++replace_16_2++#++(bytes16 self, bytes2 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
  5588. [.contract-item]
  5589. [[Packing-extract_16_4-bytes16-uint8-]]
  5590. ==== `[.contract-item-name]#++extract_16_4++#++(bytes16 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
  5591. [.contract-item]
  5592. [[Packing-replace_16_4-bytes16-bytes4-uint8-]]
  5593. ==== `[.contract-item-name]#++replace_16_4++#++(bytes16 self, bytes4 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
  5594. [.contract-item]
  5595. [[Packing-extract_16_6-bytes16-uint8-]]
  5596. ==== `[.contract-item-name]#++extract_16_6++#++(bytes16 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
  5597. [.contract-item]
  5598. [[Packing-replace_16_6-bytes16-bytes6-uint8-]]
  5599. ==== `[.contract-item-name]#++replace_16_6++#++(bytes16 self, bytes6 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
  5600. [.contract-item]
  5601. [[Packing-extract_16_8-bytes16-uint8-]]
  5602. ==== `[.contract-item-name]#++extract_16_8++#++(bytes16 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
  5603. [.contract-item]
  5604. [[Packing-replace_16_8-bytes16-bytes8-uint8-]]
  5605. ==== `[.contract-item-name]#++replace_16_8++#++(bytes16 self, bytes8 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
  5606. [.contract-item]
  5607. [[Packing-extract_16_12-bytes16-uint8-]]
  5608. ==== `[.contract-item-name]#++extract_16_12++#++(bytes16 self, uint8 offset) → bytes12 result++` [.item-kind]#internal#
  5609. [.contract-item]
  5610. [[Packing-replace_16_12-bytes16-bytes12-uint8-]]
  5611. ==== `[.contract-item-name]#++replace_16_12++#++(bytes16 self, bytes12 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
  5612. [.contract-item]
  5613. [[Packing-extract_20_1-bytes20-uint8-]]
  5614. ==== `[.contract-item-name]#++extract_20_1++#++(bytes20 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
  5615. [.contract-item]
  5616. [[Packing-replace_20_1-bytes20-bytes1-uint8-]]
  5617. ==== `[.contract-item-name]#++replace_20_1++#++(bytes20 self, bytes1 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
  5618. [.contract-item]
  5619. [[Packing-extract_20_2-bytes20-uint8-]]
  5620. ==== `[.contract-item-name]#++extract_20_2++#++(bytes20 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
  5621. [.contract-item]
  5622. [[Packing-replace_20_2-bytes20-bytes2-uint8-]]
  5623. ==== `[.contract-item-name]#++replace_20_2++#++(bytes20 self, bytes2 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
  5624. [.contract-item]
  5625. [[Packing-extract_20_4-bytes20-uint8-]]
  5626. ==== `[.contract-item-name]#++extract_20_4++#++(bytes20 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
  5627. [.contract-item]
  5628. [[Packing-replace_20_4-bytes20-bytes4-uint8-]]
  5629. ==== `[.contract-item-name]#++replace_20_4++#++(bytes20 self, bytes4 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
  5630. [.contract-item]
  5631. [[Packing-extract_20_6-bytes20-uint8-]]
  5632. ==== `[.contract-item-name]#++extract_20_6++#++(bytes20 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
  5633. [.contract-item]
  5634. [[Packing-replace_20_6-bytes20-bytes6-uint8-]]
  5635. ==== `[.contract-item-name]#++replace_20_6++#++(bytes20 self, bytes6 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
  5636. [.contract-item]
  5637. [[Packing-extract_20_8-bytes20-uint8-]]
  5638. ==== `[.contract-item-name]#++extract_20_8++#++(bytes20 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
  5639. [.contract-item]
  5640. [[Packing-replace_20_8-bytes20-bytes8-uint8-]]
  5641. ==== `[.contract-item-name]#++replace_20_8++#++(bytes20 self, bytes8 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
  5642. [.contract-item]
  5643. [[Packing-extract_20_12-bytes20-uint8-]]
  5644. ==== `[.contract-item-name]#++extract_20_12++#++(bytes20 self, uint8 offset) → bytes12 result++` [.item-kind]#internal#
  5645. [.contract-item]
  5646. [[Packing-replace_20_12-bytes20-bytes12-uint8-]]
  5647. ==== `[.contract-item-name]#++replace_20_12++#++(bytes20 self, bytes12 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
  5648. [.contract-item]
  5649. [[Packing-extract_20_16-bytes20-uint8-]]
  5650. ==== `[.contract-item-name]#++extract_20_16++#++(bytes20 self, uint8 offset) → bytes16 result++` [.item-kind]#internal#
  5651. [.contract-item]
  5652. [[Packing-replace_20_16-bytes20-bytes16-uint8-]]
  5653. ==== `[.contract-item-name]#++replace_20_16++#++(bytes20 self, bytes16 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
  5654. [.contract-item]
  5655. [[Packing-extract_24_1-bytes24-uint8-]]
  5656. ==== `[.contract-item-name]#++extract_24_1++#++(bytes24 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
  5657. [.contract-item]
  5658. [[Packing-replace_24_1-bytes24-bytes1-uint8-]]
  5659. ==== `[.contract-item-name]#++replace_24_1++#++(bytes24 self, bytes1 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
  5660. [.contract-item]
  5661. [[Packing-extract_24_2-bytes24-uint8-]]
  5662. ==== `[.contract-item-name]#++extract_24_2++#++(bytes24 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
  5663. [.contract-item]
  5664. [[Packing-replace_24_2-bytes24-bytes2-uint8-]]
  5665. ==== `[.contract-item-name]#++replace_24_2++#++(bytes24 self, bytes2 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
  5666. [.contract-item]
  5667. [[Packing-extract_24_4-bytes24-uint8-]]
  5668. ==== `[.contract-item-name]#++extract_24_4++#++(bytes24 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
  5669. [.contract-item]
  5670. [[Packing-replace_24_4-bytes24-bytes4-uint8-]]
  5671. ==== `[.contract-item-name]#++replace_24_4++#++(bytes24 self, bytes4 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
  5672. [.contract-item]
  5673. [[Packing-extract_24_6-bytes24-uint8-]]
  5674. ==== `[.contract-item-name]#++extract_24_6++#++(bytes24 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
  5675. [.contract-item]
  5676. [[Packing-replace_24_6-bytes24-bytes6-uint8-]]
  5677. ==== `[.contract-item-name]#++replace_24_6++#++(bytes24 self, bytes6 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
  5678. [.contract-item]
  5679. [[Packing-extract_24_8-bytes24-uint8-]]
  5680. ==== `[.contract-item-name]#++extract_24_8++#++(bytes24 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
  5681. [.contract-item]
  5682. [[Packing-replace_24_8-bytes24-bytes8-uint8-]]
  5683. ==== `[.contract-item-name]#++replace_24_8++#++(bytes24 self, bytes8 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
  5684. [.contract-item]
  5685. [[Packing-extract_24_12-bytes24-uint8-]]
  5686. ==== `[.contract-item-name]#++extract_24_12++#++(bytes24 self, uint8 offset) → bytes12 result++` [.item-kind]#internal#
  5687. [.contract-item]
  5688. [[Packing-replace_24_12-bytes24-bytes12-uint8-]]
  5689. ==== `[.contract-item-name]#++replace_24_12++#++(bytes24 self, bytes12 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
  5690. [.contract-item]
  5691. [[Packing-extract_24_16-bytes24-uint8-]]
  5692. ==== `[.contract-item-name]#++extract_24_16++#++(bytes24 self, uint8 offset) → bytes16 result++` [.item-kind]#internal#
  5693. [.contract-item]
  5694. [[Packing-replace_24_16-bytes24-bytes16-uint8-]]
  5695. ==== `[.contract-item-name]#++replace_24_16++#++(bytes24 self, bytes16 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
  5696. [.contract-item]
  5697. [[Packing-extract_24_20-bytes24-uint8-]]
  5698. ==== `[.contract-item-name]#++extract_24_20++#++(bytes24 self, uint8 offset) → bytes20 result++` [.item-kind]#internal#
  5699. [.contract-item]
  5700. [[Packing-replace_24_20-bytes24-bytes20-uint8-]]
  5701. ==== `[.contract-item-name]#++replace_24_20++#++(bytes24 self, bytes20 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
  5702. [.contract-item]
  5703. [[Packing-extract_28_1-bytes28-uint8-]]
  5704. ==== `[.contract-item-name]#++extract_28_1++#++(bytes28 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
  5705. [.contract-item]
  5706. [[Packing-replace_28_1-bytes28-bytes1-uint8-]]
  5707. ==== `[.contract-item-name]#++replace_28_1++#++(bytes28 self, bytes1 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
  5708. [.contract-item]
  5709. [[Packing-extract_28_2-bytes28-uint8-]]
  5710. ==== `[.contract-item-name]#++extract_28_2++#++(bytes28 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
  5711. [.contract-item]
  5712. [[Packing-replace_28_2-bytes28-bytes2-uint8-]]
  5713. ==== `[.contract-item-name]#++replace_28_2++#++(bytes28 self, bytes2 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
  5714. [.contract-item]
  5715. [[Packing-extract_28_4-bytes28-uint8-]]
  5716. ==== `[.contract-item-name]#++extract_28_4++#++(bytes28 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
  5717. [.contract-item]
  5718. [[Packing-replace_28_4-bytes28-bytes4-uint8-]]
  5719. ==== `[.contract-item-name]#++replace_28_4++#++(bytes28 self, bytes4 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
  5720. [.contract-item]
  5721. [[Packing-extract_28_6-bytes28-uint8-]]
  5722. ==== `[.contract-item-name]#++extract_28_6++#++(bytes28 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
  5723. [.contract-item]
  5724. [[Packing-replace_28_6-bytes28-bytes6-uint8-]]
  5725. ==== `[.contract-item-name]#++replace_28_6++#++(bytes28 self, bytes6 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
  5726. [.contract-item]
  5727. [[Packing-extract_28_8-bytes28-uint8-]]
  5728. ==== `[.contract-item-name]#++extract_28_8++#++(bytes28 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
  5729. [.contract-item]
  5730. [[Packing-replace_28_8-bytes28-bytes8-uint8-]]
  5731. ==== `[.contract-item-name]#++replace_28_8++#++(bytes28 self, bytes8 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
  5732. [.contract-item]
  5733. [[Packing-extract_28_12-bytes28-uint8-]]
  5734. ==== `[.contract-item-name]#++extract_28_12++#++(bytes28 self, uint8 offset) → bytes12 result++` [.item-kind]#internal#
  5735. [.contract-item]
  5736. [[Packing-replace_28_12-bytes28-bytes12-uint8-]]
  5737. ==== `[.contract-item-name]#++replace_28_12++#++(bytes28 self, bytes12 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
  5738. [.contract-item]
  5739. [[Packing-extract_28_16-bytes28-uint8-]]
  5740. ==== `[.contract-item-name]#++extract_28_16++#++(bytes28 self, uint8 offset) → bytes16 result++` [.item-kind]#internal#
  5741. [.contract-item]
  5742. [[Packing-replace_28_16-bytes28-bytes16-uint8-]]
  5743. ==== `[.contract-item-name]#++replace_28_16++#++(bytes28 self, bytes16 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
  5744. [.contract-item]
  5745. [[Packing-extract_28_20-bytes28-uint8-]]
  5746. ==== `[.contract-item-name]#++extract_28_20++#++(bytes28 self, uint8 offset) → bytes20 result++` [.item-kind]#internal#
  5747. [.contract-item]
  5748. [[Packing-replace_28_20-bytes28-bytes20-uint8-]]
  5749. ==== `[.contract-item-name]#++replace_28_20++#++(bytes28 self, bytes20 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
  5750. [.contract-item]
  5751. [[Packing-extract_28_24-bytes28-uint8-]]
  5752. ==== `[.contract-item-name]#++extract_28_24++#++(bytes28 self, uint8 offset) → bytes24 result++` [.item-kind]#internal#
  5753. [.contract-item]
  5754. [[Packing-replace_28_24-bytes28-bytes24-uint8-]]
  5755. ==== `[.contract-item-name]#++replace_28_24++#++(bytes28 self, bytes24 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
  5756. [.contract-item]
  5757. [[Packing-extract_32_1-bytes32-uint8-]]
  5758. ==== `[.contract-item-name]#++extract_32_1++#++(bytes32 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
  5759. [.contract-item]
  5760. [[Packing-replace_32_1-bytes32-bytes1-uint8-]]
  5761. ==== `[.contract-item-name]#++replace_32_1++#++(bytes32 self, bytes1 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
  5762. [.contract-item]
  5763. [[Packing-extract_32_2-bytes32-uint8-]]
  5764. ==== `[.contract-item-name]#++extract_32_2++#++(bytes32 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
  5765. [.contract-item]
  5766. [[Packing-replace_32_2-bytes32-bytes2-uint8-]]
  5767. ==== `[.contract-item-name]#++replace_32_2++#++(bytes32 self, bytes2 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
  5768. [.contract-item]
  5769. [[Packing-extract_32_4-bytes32-uint8-]]
  5770. ==== `[.contract-item-name]#++extract_32_4++#++(bytes32 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
  5771. [.contract-item]
  5772. [[Packing-replace_32_4-bytes32-bytes4-uint8-]]
  5773. ==== `[.contract-item-name]#++replace_32_4++#++(bytes32 self, bytes4 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
  5774. [.contract-item]
  5775. [[Packing-extract_32_6-bytes32-uint8-]]
  5776. ==== `[.contract-item-name]#++extract_32_6++#++(bytes32 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
  5777. [.contract-item]
  5778. [[Packing-replace_32_6-bytes32-bytes6-uint8-]]
  5779. ==== `[.contract-item-name]#++replace_32_6++#++(bytes32 self, bytes6 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
  5780. [.contract-item]
  5781. [[Packing-extract_32_8-bytes32-uint8-]]
  5782. ==== `[.contract-item-name]#++extract_32_8++#++(bytes32 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
  5783. [.contract-item]
  5784. [[Packing-replace_32_8-bytes32-bytes8-uint8-]]
  5785. ==== `[.contract-item-name]#++replace_32_8++#++(bytes32 self, bytes8 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
  5786. [.contract-item]
  5787. [[Packing-extract_32_12-bytes32-uint8-]]
  5788. ==== `[.contract-item-name]#++extract_32_12++#++(bytes32 self, uint8 offset) → bytes12 result++` [.item-kind]#internal#
  5789. [.contract-item]
  5790. [[Packing-replace_32_12-bytes32-bytes12-uint8-]]
  5791. ==== `[.contract-item-name]#++replace_32_12++#++(bytes32 self, bytes12 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
  5792. [.contract-item]
  5793. [[Packing-extract_32_16-bytes32-uint8-]]
  5794. ==== `[.contract-item-name]#++extract_32_16++#++(bytes32 self, uint8 offset) → bytes16 result++` [.item-kind]#internal#
  5795. [.contract-item]
  5796. [[Packing-replace_32_16-bytes32-bytes16-uint8-]]
  5797. ==== `[.contract-item-name]#++replace_32_16++#++(bytes32 self, bytes16 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
  5798. [.contract-item]
  5799. [[Packing-extract_32_20-bytes32-uint8-]]
  5800. ==== `[.contract-item-name]#++extract_32_20++#++(bytes32 self, uint8 offset) → bytes20 result++` [.item-kind]#internal#
  5801. [.contract-item]
  5802. [[Packing-replace_32_20-bytes32-bytes20-uint8-]]
  5803. ==== `[.contract-item-name]#++replace_32_20++#++(bytes32 self, bytes20 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
  5804. [.contract-item]
  5805. [[Packing-extract_32_24-bytes32-uint8-]]
  5806. ==== `[.contract-item-name]#++extract_32_24++#++(bytes32 self, uint8 offset) → bytes24 result++` [.item-kind]#internal#
  5807. [.contract-item]
  5808. [[Packing-replace_32_24-bytes32-bytes24-uint8-]]
  5809. ==== `[.contract-item-name]#++replace_32_24++#++(bytes32 self, bytes24 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
  5810. [.contract-item]
  5811. [[Packing-extract_32_28-bytes32-uint8-]]
  5812. ==== `[.contract-item-name]#++extract_32_28++#++(bytes32 self, uint8 offset) → bytes28 result++` [.item-kind]#internal#
  5813. [.contract-item]
  5814. [[Packing-replace_32_28-bytes32-bytes28-uint8-]]
  5815. ==== `[.contract-item-name]#++replace_32_28++#++(bytes32 self, bytes28 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
  5816. [.contract-item]
  5817. [[Packing-OutOfRangeAccess--]]
  5818. ==== `[.contract-item-name]#++OutOfRangeAccess++#++()++` [.item-kind]#error#
  5819. :GENERIC: pass:normal[xref:#Panic-GENERIC-uint256[`++GENERIC++`]]
  5820. :ASSERT: pass:normal[xref:#Panic-ASSERT-uint256[`++ASSERT++`]]
  5821. :UNDER_OVERFLOW: pass:normal[xref:#Panic-UNDER_OVERFLOW-uint256[`++UNDER_OVERFLOW++`]]
  5822. :DIVISION_BY_ZERO: pass:normal[xref:#Panic-DIVISION_BY_ZERO-uint256[`++DIVISION_BY_ZERO++`]]
  5823. :ENUM_CONVERSION_ERROR: pass:normal[xref:#Panic-ENUM_CONVERSION_ERROR-uint256[`++ENUM_CONVERSION_ERROR++`]]
  5824. :STORAGE_ENCODING_ERROR: pass:normal[xref:#Panic-STORAGE_ENCODING_ERROR-uint256[`++STORAGE_ENCODING_ERROR++`]]
  5825. :EMPTY_ARRAY_POP: pass:normal[xref:#Panic-EMPTY_ARRAY_POP-uint256[`++EMPTY_ARRAY_POP++`]]
  5826. :ARRAY_OUT_OF_BOUNDS: pass:normal[xref:#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`++ARRAY_OUT_OF_BOUNDS++`]]
  5827. :RESOURCE_ERROR: pass:normal[xref:#Panic-RESOURCE_ERROR-uint256[`++RESOURCE_ERROR++`]]
  5828. :INVALID_INTERNAL_FUNCTION: pass:normal[xref:#Panic-INVALID_INTERNAL_FUNCTION-uint256[`++INVALID_INTERNAL_FUNCTION++`]]
  5829. :panic: pass:normal[xref:#Panic-panic-uint256-[`++panic++`]]
  5830. [.contract]
  5831. [[Panic]]
  5832. === `++Panic++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Panic.sol[{github-icon},role=heading-link]
  5833. [.hljs-theme-light.nopadding]
  5834. ```solidity
  5835. import "@openzeppelin/contracts/utils/Panic.sol";
  5836. ```
  5837. Helper library for emitting standardized panic codes.
  5838. ```solidity
  5839. contract Example {
  5840. using Panic for uint256;
  5841. // Use any of the declared internal constants
  5842. function foo() { Panic.GENERIC.panic(); }
  5843. // Alternatively
  5844. function foo() { Panic.panic(Panic.GENERIC); }
  5845. }
  5846. ```
  5847. Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
  5848. _Available since v5.1._
  5849. [.contract-index]
  5850. .Functions
  5851. --
  5852. * {xref-Panic-panic-uint256-}[`++panic(code)++`]
  5853. --
  5854. [.contract-index]
  5855. .Internal Variables
  5856. --
  5857. * {xref-Panic-GENERIC-uint256}[`++uint256 constant GENERIC++`]
  5858. * {xref-Panic-ASSERT-uint256}[`++uint256 constant ASSERT++`]
  5859. * {xref-Panic-UNDER_OVERFLOW-uint256}[`++uint256 constant UNDER_OVERFLOW++`]
  5860. * {xref-Panic-DIVISION_BY_ZERO-uint256}[`++uint256 constant DIVISION_BY_ZERO++`]
  5861. * {xref-Panic-ENUM_CONVERSION_ERROR-uint256}[`++uint256 constant ENUM_CONVERSION_ERROR++`]
  5862. * {xref-Panic-STORAGE_ENCODING_ERROR-uint256}[`++uint256 constant STORAGE_ENCODING_ERROR++`]
  5863. * {xref-Panic-EMPTY_ARRAY_POP-uint256}[`++uint256 constant EMPTY_ARRAY_POP++`]
  5864. * {xref-Panic-ARRAY_OUT_OF_BOUNDS-uint256}[`++uint256 constant ARRAY_OUT_OF_BOUNDS++`]
  5865. * {xref-Panic-RESOURCE_ERROR-uint256}[`++uint256 constant RESOURCE_ERROR++`]
  5866. * {xref-Panic-INVALID_INTERNAL_FUNCTION-uint256}[`++uint256 constant INVALID_INTERNAL_FUNCTION++`]
  5867. --
  5868. [.contract-item]
  5869. [[Panic-panic-uint256-]]
  5870. ==== `[.contract-item-name]#++panic++#++(uint256 code)++` [.item-kind]#internal#
  5871. Reverts with a panic code. Recommended to use with
  5872. the internal constants with predefined codes.
  5873. [.contract-item]
  5874. [[Panic-GENERIC-uint256]]
  5875. ==== `uint256 [.contract-item-name]#++GENERIC++#` [.item-kind]#internal constant#
  5876. generic / unspecified error
  5877. [.contract-item]
  5878. [[Panic-ASSERT-uint256]]
  5879. ==== `uint256 [.contract-item-name]#++ASSERT++#` [.item-kind]#internal constant#
  5880. used by the assert() builtin
  5881. [.contract-item]
  5882. [[Panic-UNDER_OVERFLOW-uint256]]
  5883. ==== `uint256 [.contract-item-name]#++UNDER_OVERFLOW++#` [.item-kind]#internal constant#
  5884. arithmetic underflow or overflow
  5885. [.contract-item]
  5886. [[Panic-DIVISION_BY_ZERO-uint256]]
  5887. ==== `uint256 [.contract-item-name]#++DIVISION_BY_ZERO++#` [.item-kind]#internal constant#
  5888. division or modulo by zero
  5889. [.contract-item]
  5890. [[Panic-ENUM_CONVERSION_ERROR-uint256]]
  5891. ==== `uint256 [.contract-item-name]#++ENUM_CONVERSION_ERROR++#` [.item-kind]#internal constant#
  5892. enum conversion error
  5893. [.contract-item]
  5894. [[Panic-STORAGE_ENCODING_ERROR-uint256]]
  5895. ==== `uint256 [.contract-item-name]#++STORAGE_ENCODING_ERROR++#` [.item-kind]#internal constant#
  5896. invalid encoding in storage
  5897. [.contract-item]
  5898. [[Panic-EMPTY_ARRAY_POP-uint256]]
  5899. ==== `uint256 [.contract-item-name]#++EMPTY_ARRAY_POP++#` [.item-kind]#internal constant#
  5900. empty array pop
  5901. [.contract-item]
  5902. [[Panic-ARRAY_OUT_OF_BOUNDS-uint256]]
  5903. ==== `uint256 [.contract-item-name]#++ARRAY_OUT_OF_BOUNDS++#` [.item-kind]#internal constant#
  5904. array out of bounds access
  5905. [.contract-item]
  5906. [[Panic-RESOURCE_ERROR-uint256]]
  5907. ==== `uint256 [.contract-item-name]#++RESOURCE_ERROR++#` [.item-kind]#internal constant#
  5908. resource error (too large allocation or too large array)
  5909. [.contract-item]
  5910. [[Panic-INVALID_INTERNAL_FUNCTION-uint256]]
  5911. ==== `uint256 [.contract-item-name]#++INVALID_INTERNAL_FUNCTION++#` [.item-kind]#internal constant#
  5912. calling invalid internal function
  5913. :lt: pass:normal[xref:#Comparators-lt-uint256-uint256-[`++lt++`]]
  5914. :gt: pass:normal[xref:#Comparators-gt-uint256-uint256-[`++gt++`]]
  5915. [.contract]
  5916. [[Comparators]]
  5917. === `++Comparators++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Comparators.sol[{github-icon},role=heading-link]
  5918. [.hljs-theme-light.nopadding]
  5919. ```solidity
  5920. import "@openzeppelin/contracts/utils/Comparators.sol";
  5921. ```
  5922. Provides a set of functions to compare values.
  5923. _Available since v5.1._
  5924. [.contract-index]
  5925. .Functions
  5926. --
  5927. * {xref-Comparators-lt-uint256-uint256-}[`++lt(a, b)++`]
  5928. * {xref-Comparators-gt-uint256-uint256-}[`++gt(a, b)++`]
  5929. --
  5930. [.contract-item]
  5931. [[Comparators-lt-uint256-uint256-]]
  5932. ==== `[.contract-item-name]#++lt++#++(uint256 a, uint256 b) → bool++` [.item-kind]#internal#
  5933. [.contract-item]
  5934. [[Comparators-gt-uint256-uint256-]]
  5935. ==== `[.contract-item-name]#++gt++#++(uint256 a, uint256 b) → bool++` [.item-kind]#internal#