utils.adoc 234 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119
  1. :github-icon: pass:[<svg class="icon"><use href="#github-icon"/></svg>]
  2. :Address: pass:normal[xref:utils.adoc#Address[`Address`]]
  3. :Arrays: pass:normal[xref:utils.adoc#Arrays[`Arrays`]]
  4. :Base64: pass:normal[xref:utils.adoc#Base64[`Base64`]]
  5. :Strings: pass:normal[xref:utils.adoc#Strings[`Strings`]]
  6. :SafeCast: pass:normal[xref:utils.adoc#SafeCast[`SafeCast`]]
  7. :Multicall: pass:normal[xref:utils.adoc#Multicall[`Multicall`]]
  8. :Counters: pass:normal[xref:utils.adoc#Counters[`Counters`]]
  9. :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
  10. :EnumerableSet: pass:normal[xref:utils.adoc#EnumerableSet[`EnumerableSet`]]
  11. :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
  12. :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
  13. :EnumerableSet: pass:normal[xref:utils.adoc#EnumerableSet[`EnumerableSet`]]
  14. :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
  15. :EnumerableSet: pass:normal[xref:utils.adoc#EnumerableSet[`EnumerableSet`]]
  16. :Create2: pass:normal[xref:utils.adoc#Create2[`Create2`]]
  17. :xref-Math-max-uint256-uint256-: xref:utils.adoc#Math-max-uint256-uint256-
  18. :xref-Math-min-uint256-uint256-: xref:utils.adoc#Math-min-uint256-uint256-
  19. :xref-Math-average-uint256-uint256-: xref:utils.adoc#Math-average-uint256-uint256-
  20. :xref-Math-ceilDiv-uint256-uint256-: xref:utils.adoc#Math-ceilDiv-uint256-uint256-
  21. :xref-Math-mulDiv-uint256-uint256-uint256-: xref:utils.adoc#Math-mulDiv-uint256-uint256-uint256-
  22. :xref-Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-
  23. :xref-Math-sqrt-uint256-: xref:utils.adoc#Math-sqrt-uint256-
  24. :xref-Math-sqrt-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-sqrt-uint256-enum-Math-Rounding-
  25. :xref-Math-log2-uint256-: xref:utils.adoc#Math-log2-uint256-
  26. :xref-Math-log2-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log2-uint256-enum-Math-Rounding-
  27. :xref-Math-log10-uint256-: xref:utils.adoc#Math-log10-uint256-
  28. :xref-Math-log10-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log10-uint256-enum-Math-Rounding-
  29. :xref-Math-log256-uint256-: xref:utils.adoc#Math-log256-uint256-
  30. :xref-Math-log256-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log256-uint256-enum-Math-Rounding-
  31. :xref-SignedMath-max-int256-int256-: xref:utils.adoc#SignedMath-max-int256-int256-
  32. :xref-SignedMath-min-int256-int256-: xref:utils.adoc#SignedMath-min-int256-int256-
  33. :xref-SignedMath-average-int256-int256-: xref:utils.adoc#SignedMath-average-int256-int256-
  34. :xref-SignedMath-abs-int256-: xref:utils.adoc#SignedMath-abs-int256-
  35. :SafeMath: pass:normal[xref:utils.adoc#SafeMath[`SafeMath`]]
  36. :SignedSafeMath: pass:normal[xref:utils.adoc#SignedSafeMath[`SignedSafeMath`]]
  37. :xref-SafeCast-toUint248-uint256-: xref:utils.adoc#SafeCast-toUint248-uint256-
  38. :xref-SafeCast-toUint240-uint256-: xref:utils.adoc#SafeCast-toUint240-uint256-
  39. :xref-SafeCast-toUint232-uint256-: xref:utils.adoc#SafeCast-toUint232-uint256-
  40. :xref-SafeCast-toUint224-uint256-: xref:utils.adoc#SafeCast-toUint224-uint256-
  41. :xref-SafeCast-toUint216-uint256-: xref:utils.adoc#SafeCast-toUint216-uint256-
  42. :xref-SafeCast-toUint208-uint256-: xref:utils.adoc#SafeCast-toUint208-uint256-
  43. :xref-SafeCast-toUint200-uint256-: xref:utils.adoc#SafeCast-toUint200-uint256-
  44. :xref-SafeCast-toUint192-uint256-: xref:utils.adoc#SafeCast-toUint192-uint256-
  45. :xref-SafeCast-toUint184-uint256-: xref:utils.adoc#SafeCast-toUint184-uint256-
  46. :xref-SafeCast-toUint176-uint256-: xref:utils.adoc#SafeCast-toUint176-uint256-
  47. :xref-SafeCast-toUint168-uint256-: xref:utils.adoc#SafeCast-toUint168-uint256-
  48. :xref-SafeCast-toUint160-uint256-: xref:utils.adoc#SafeCast-toUint160-uint256-
  49. :xref-SafeCast-toUint152-uint256-: xref:utils.adoc#SafeCast-toUint152-uint256-
  50. :xref-SafeCast-toUint144-uint256-: xref:utils.adoc#SafeCast-toUint144-uint256-
  51. :xref-SafeCast-toUint136-uint256-: xref:utils.adoc#SafeCast-toUint136-uint256-
  52. :xref-SafeCast-toUint128-uint256-: xref:utils.adoc#SafeCast-toUint128-uint256-
  53. :xref-SafeCast-toUint120-uint256-: xref:utils.adoc#SafeCast-toUint120-uint256-
  54. :xref-SafeCast-toUint112-uint256-: xref:utils.adoc#SafeCast-toUint112-uint256-
  55. :xref-SafeCast-toUint104-uint256-: xref:utils.adoc#SafeCast-toUint104-uint256-
  56. :xref-SafeCast-toUint96-uint256-: xref:utils.adoc#SafeCast-toUint96-uint256-
  57. :xref-SafeCast-toUint88-uint256-: xref:utils.adoc#SafeCast-toUint88-uint256-
  58. :xref-SafeCast-toUint80-uint256-: xref:utils.adoc#SafeCast-toUint80-uint256-
  59. :xref-SafeCast-toUint72-uint256-: xref:utils.adoc#SafeCast-toUint72-uint256-
  60. :xref-SafeCast-toUint64-uint256-: xref:utils.adoc#SafeCast-toUint64-uint256-
  61. :xref-SafeCast-toUint56-uint256-: xref:utils.adoc#SafeCast-toUint56-uint256-
  62. :xref-SafeCast-toUint48-uint256-: xref:utils.adoc#SafeCast-toUint48-uint256-
  63. :xref-SafeCast-toUint40-uint256-: xref:utils.adoc#SafeCast-toUint40-uint256-
  64. :xref-SafeCast-toUint32-uint256-: xref:utils.adoc#SafeCast-toUint32-uint256-
  65. :xref-SafeCast-toUint24-uint256-: xref:utils.adoc#SafeCast-toUint24-uint256-
  66. :xref-SafeCast-toUint16-uint256-: xref:utils.adoc#SafeCast-toUint16-uint256-
  67. :xref-SafeCast-toUint8-uint256-: xref:utils.adoc#SafeCast-toUint8-uint256-
  68. :xref-SafeCast-toUint256-int256-: xref:utils.adoc#SafeCast-toUint256-int256-
  69. :xref-SafeCast-toInt248-int256-: xref:utils.adoc#SafeCast-toInt248-int256-
  70. :xref-SafeCast-toInt240-int256-: xref:utils.adoc#SafeCast-toInt240-int256-
  71. :xref-SafeCast-toInt232-int256-: xref:utils.adoc#SafeCast-toInt232-int256-
  72. :xref-SafeCast-toInt224-int256-: xref:utils.adoc#SafeCast-toInt224-int256-
  73. :xref-SafeCast-toInt216-int256-: xref:utils.adoc#SafeCast-toInt216-int256-
  74. :xref-SafeCast-toInt208-int256-: xref:utils.adoc#SafeCast-toInt208-int256-
  75. :xref-SafeCast-toInt200-int256-: xref:utils.adoc#SafeCast-toInt200-int256-
  76. :xref-SafeCast-toInt192-int256-: xref:utils.adoc#SafeCast-toInt192-int256-
  77. :xref-SafeCast-toInt184-int256-: xref:utils.adoc#SafeCast-toInt184-int256-
  78. :xref-SafeCast-toInt176-int256-: xref:utils.adoc#SafeCast-toInt176-int256-
  79. :xref-SafeCast-toInt168-int256-: xref:utils.adoc#SafeCast-toInt168-int256-
  80. :xref-SafeCast-toInt160-int256-: xref:utils.adoc#SafeCast-toInt160-int256-
  81. :xref-SafeCast-toInt152-int256-: xref:utils.adoc#SafeCast-toInt152-int256-
  82. :xref-SafeCast-toInt144-int256-: xref:utils.adoc#SafeCast-toInt144-int256-
  83. :xref-SafeCast-toInt136-int256-: xref:utils.adoc#SafeCast-toInt136-int256-
  84. :xref-SafeCast-toInt128-int256-: xref:utils.adoc#SafeCast-toInt128-int256-
  85. :xref-SafeCast-toInt120-int256-: xref:utils.adoc#SafeCast-toInt120-int256-
  86. :xref-SafeCast-toInt112-int256-: xref:utils.adoc#SafeCast-toInt112-int256-
  87. :xref-SafeCast-toInt104-int256-: xref:utils.adoc#SafeCast-toInt104-int256-
  88. :xref-SafeCast-toInt96-int256-: xref:utils.adoc#SafeCast-toInt96-int256-
  89. :xref-SafeCast-toInt88-int256-: xref:utils.adoc#SafeCast-toInt88-int256-
  90. :xref-SafeCast-toInt80-int256-: xref:utils.adoc#SafeCast-toInt80-int256-
  91. :xref-SafeCast-toInt72-int256-: xref:utils.adoc#SafeCast-toInt72-int256-
  92. :xref-SafeCast-toInt64-int256-: xref:utils.adoc#SafeCast-toInt64-int256-
  93. :xref-SafeCast-toInt56-int256-: xref:utils.adoc#SafeCast-toInt56-int256-
  94. :xref-SafeCast-toInt48-int256-: xref:utils.adoc#SafeCast-toInt48-int256-
  95. :xref-SafeCast-toInt40-int256-: xref:utils.adoc#SafeCast-toInt40-int256-
  96. :xref-SafeCast-toInt32-int256-: xref:utils.adoc#SafeCast-toInt32-int256-
  97. :xref-SafeCast-toInt24-int256-: xref:utils.adoc#SafeCast-toInt24-int256-
  98. :xref-SafeCast-toInt16-int256-: xref:utils.adoc#SafeCast-toInt16-int256-
  99. :xref-SafeCast-toInt8-int256-: xref:utils.adoc#SafeCast-toInt8-int256-
  100. :xref-SafeCast-toInt256-uint256-: xref:utils.adoc#SafeCast-toInt256-uint256-
  101. :xref-SafeMath-tryAdd-uint256-uint256-: xref:utils.adoc#SafeMath-tryAdd-uint256-uint256-
  102. :xref-SafeMath-trySub-uint256-uint256-: xref:utils.adoc#SafeMath-trySub-uint256-uint256-
  103. :xref-SafeMath-tryMul-uint256-uint256-: xref:utils.adoc#SafeMath-tryMul-uint256-uint256-
  104. :xref-SafeMath-tryDiv-uint256-uint256-: xref:utils.adoc#SafeMath-tryDiv-uint256-uint256-
  105. :xref-SafeMath-tryMod-uint256-uint256-: xref:utils.adoc#SafeMath-tryMod-uint256-uint256-
  106. :xref-SafeMath-add-uint256-uint256-: xref:utils.adoc#SafeMath-add-uint256-uint256-
  107. :xref-SafeMath-sub-uint256-uint256-: xref:utils.adoc#SafeMath-sub-uint256-uint256-
  108. :xref-SafeMath-mul-uint256-uint256-: xref:utils.adoc#SafeMath-mul-uint256-uint256-
  109. :xref-SafeMath-div-uint256-uint256-: xref:utils.adoc#SafeMath-div-uint256-uint256-
  110. :xref-SafeMath-mod-uint256-uint256-: xref:utils.adoc#SafeMath-mod-uint256-uint256-
  111. :xref-SafeMath-sub-uint256-uint256-string-: xref:utils.adoc#SafeMath-sub-uint256-uint256-string-
  112. :xref-SafeMath-div-uint256-uint256-string-: xref:utils.adoc#SafeMath-div-uint256-uint256-string-
  113. :xref-SafeMath-mod-uint256-uint256-string-: xref:utils.adoc#SafeMath-mod-uint256-uint256-string-
  114. :xref-SignedSafeMath-mul-int256-int256-: xref:utils.adoc#SignedSafeMath-mul-int256-int256-
  115. :xref-SignedSafeMath-div-int256-int256-: xref:utils.adoc#SignedSafeMath-div-int256-int256-
  116. :xref-SignedSafeMath-sub-int256-int256-: xref:utils.adoc#SignedSafeMath-sub-int256-int256-
  117. :xref-SignedSafeMath-add-int256-int256-: xref:utils.adoc#SignedSafeMath-add-int256-int256-
  118. :xref-ECDSA-tryRecover-bytes32-bytes-: xref:utils.adoc#ECDSA-tryRecover-bytes32-bytes-
  119. :xref-ECDSA-recover-bytes32-bytes-: xref:utils.adoc#ECDSA-recover-bytes32-bytes-
  120. :xref-ECDSA-tryRecover-bytes32-bytes32-bytes32-: xref:utils.adoc#ECDSA-tryRecover-bytes32-bytes32-bytes32-
  121. :xref-ECDSA-recover-bytes32-bytes32-bytes32-: xref:utils.adoc#ECDSA-recover-bytes32-bytes32-bytes32-
  122. :xref-ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-
  123. :xref-ECDSA-recover-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-
  124. :xref-ECDSA-toEthSignedMessageHash-bytes32-: xref:utils.adoc#ECDSA-toEthSignedMessageHash-bytes32-
  125. :xref-ECDSA-toEthSignedMessageHash-bytes-: xref:utils.adoc#ECDSA-toEthSignedMessageHash-bytes-
  126. :xref-ECDSA-toTypedDataHash-bytes32-bytes32-: xref:utils.adoc#ECDSA-toTypedDataHash-bytes32-bytes32-
  127. :xref-ECDSA-toDataWithIntendedValidatorHash-address-bytes-: xref:utils.adoc#ECDSA-toDataWithIntendedValidatorHash-address-bytes-
  128. :ECDSA-tryRecover: pass:normal[xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`ECDSA.tryRecover`]]
  129. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  130. :ECDSA-tryRecover: pass:normal[xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`ECDSA.tryRecover`]]
  131. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  132. :xref-SignatureChecker-isValidSignatureNow-address-bytes32-bytes-: xref:utils.adoc#SignatureChecker-isValidSignatureNow-address-bytes32-bytes-
  133. :xref-SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-: xref:utils.adoc#SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-
  134. :xref-MerkleProof-verify-bytes32---bytes32-bytes32-: xref:utils.adoc#MerkleProof-verify-bytes32---bytes32-bytes32-
  135. :xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-: xref:utils.adoc#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-
  136. :xref-MerkleProof-processProof-bytes32---bytes32-: xref:utils.adoc#MerkleProof-processProof-bytes32---bytes32-
  137. :xref-MerkleProof-processProofCalldata-bytes32---bytes32-: xref:utils.adoc#MerkleProof-processProofCalldata-bytes32---bytes32-
  138. :xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---: xref:utils.adoc#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---
  139. :xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---: xref:utils.adoc#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---
  140. :xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---: xref:utils.adoc#MerkleProof-processMultiProof-bytes32---bool---bytes32---
  141. :xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---: xref:utils.adoc#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---
  142. :xref-EIP712-constructor-string-string-: xref:utils.adoc#EIP712-constructor-string-string-
  143. :xref-EIP712-_domainSeparatorV4--: xref:utils.adoc#EIP712-_domainSeparatorV4--
  144. :xref-EIP712-_hashTypedDataV4-bytes32-: xref:utils.adoc#EIP712-_hashTypedDataV4-bytes32-
  145. :xref-EIP712-eip712Domain--: xref:utils.adoc#EIP712-eip712Domain--
  146. :xref-IERC5267-EIP712DomainChanged--: xref:interfaces.adoc#IERC5267-EIP712DomainChanged--
  147. :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
  148. :Escrow: pass:normal[xref:utils.adoc#Escrow[`Escrow`]]
  149. :xref-ConditionalEscrow-withdrawalAllowed-address-: xref:utils.adoc#ConditionalEscrow-withdrawalAllowed-address-
  150. :xref-ConditionalEscrow-withdraw-address-payable-: xref:utils.adoc#ConditionalEscrow-withdraw-address-payable-
  151. :xref-Escrow-depositsOf-address-: xref:utils.adoc#Escrow-depositsOf-address-
  152. :xref-Escrow-deposit-address-: xref:utils.adoc#Escrow-deposit-address-
  153. :xref-Ownable-owner--: xref:access.adoc#Ownable-owner--
  154. :xref-Ownable-_checkOwner--: xref:access.adoc#Ownable-_checkOwner--
  155. :xref-Ownable-renounceOwnership--: xref:access.adoc#Ownable-renounceOwnership--
  156. :xref-Ownable-transferOwnership-address-: xref:access.adoc#Ownable-transferOwnership-address-
  157. :xref-Ownable-_transferOwnership-address-: xref:access.adoc#Ownable-_transferOwnership-address-
  158. :xref-Escrow-Deposited-address-uint256-: xref:utils.adoc#Escrow-Deposited-address-uint256-
  159. :xref-Escrow-Withdrawn-address-uint256-: xref:utils.adoc#Escrow-Withdrawn-address-uint256-
  160. :xref-Ownable-OwnershipTransferred-address-address-: xref:access.adoc#Ownable-OwnershipTransferred-address-address-
  161. :ReentrancyGuard: pass:normal[xref:security.adoc#ReentrancyGuard[`ReentrancyGuard`]]
  162. :xref-Escrow-depositsOf-address-: xref:utils.adoc#Escrow-depositsOf-address-
  163. :xref-Escrow-deposit-address-: xref:utils.adoc#Escrow-deposit-address-
  164. :xref-Escrow-withdraw-address-payable-: xref:utils.adoc#Escrow-withdraw-address-payable-
  165. :xref-Ownable-owner--: xref:access.adoc#Ownable-owner--
  166. :xref-Ownable-_checkOwner--: xref:access.adoc#Ownable-_checkOwner--
  167. :xref-Ownable-renounceOwnership--: xref:access.adoc#Ownable-renounceOwnership--
  168. :xref-Ownable-transferOwnership-address-: xref:access.adoc#Ownable-transferOwnership-address-
  169. :xref-Ownable-_transferOwnership-address-: xref:access.adoc#Ownable-_transferOwnership-address-
  170. :xref-Escrow-Deposited-address-uint256-: xref:utils.adoc#Escrow-Deposited-address-uint256-
  171. :xref-Escrow-Withdrawn-address-uint256-: xref:utils.adoc#Escrow-Withdrawn-address-uint256-
  172. :xref-Ownable-OwnershipTransferred-address-address-: xref:access.adoc#Ownable-OwnershipTransferred-address-address-
  173. :ReentrancyGuard: pass:normal[xref:security.adoc#ReentrancyGuard[`ReentrancyGuard`]]
  174. :Escrow: pass:normal[xref:utils.adoc#Escrow[`Escrow`]]
  175. :xref-RefundEscrow-constructor-address-payable-: xref:utils.adoc#RefundEscrow-constructor-address-payable-
  176. :xref-RefundEscrow-state--: xref:utils.adoc#RefundEscrow-state--
  177. :xref-RefundEscrow-beneficiary--: xref:utils.adoc#RefundEscrow-beneficiary--
  178. :xref-RefundEscrow-deposit-address-: xref:utils.adoc#RefundEscrow-deposit-address-
  179. :xref-RefundEscrow-close--: xref:utils.adoc#RefundEscrow-close--
  180. :xref-RefundEscrow-enableRefunds--: xref:utils.adoc#RefundEscrow-enableRefunds--
  181. :xref-RefundEscrow-beneficiaryWithdraw--: xref:utils.adoc#RefundEscrow-beneficiaryWithdraw--
  182. :xref-RefundEscrow-withdrawalAllowed-address-: xref:utils.adoc#RefundEscrow-withdrawalAllowed-address-
  183. :xref-ConditionalEscrow-withdraw-address-payable-: xref:utils.adoc#ConditionalEscrow-withdraw-address-payable-
  184. :xref-Escrow-depositsOf-address-: xref:utils.adoc#Escrow-depositsOf-address-
  185. :xref-Ownable-owner--: xref:access.adoc#Ownable-owner--
  186. :xref-Ownable-_checkOwner--: xref:access.adoc#Ownable-_checkOwner--
  187. :xref-Ownable-renounceOwnership--: xref:access.adoc#Ownable-renounceOwnership--
  188. :xref-Ownable-transferOwnership-address-: xref:access.adoc#Ownable-transferOwnership-address-
  189. :xref-Ownable-_transferOwnership-address-: xref:access.adoc#Ownable-_transferOwnership-address-
  190. :xref-RefundEscrow-RefundsClosed--: xref:utils.adoc#RefundEscrow-RefundsClosed--
  191. :xref-RefundEscrow-RefundsEnabled--: xref:utils.adoc#RefundEscrow-RefundsEnabled--
  192. :xref-Escrow-Deposited-address-uint256-: xref:utils.adoc#Escrow-Deposited-address-uint256-
  193. :xref-Escrow-Withdrawn-address-uint256-: xref:utils.adoc#Escrow-Withdrawn-address-uint256-
  194. :xref-Ownable-OwnershipTransferred-address-address-: xref:access.adoc#Ownable-OwnershipTransferred-address-address-
  195. :ERC165Checker: pass:normal[xref:utils.adoc#ERC165Checker[`ERC165Checker`]]
  196. :ERC165: pass:normal[xref:utils.adoc#ERC165[`ERC165`]]
  197. :xref-IERC165-supportsInterface-bytes4-: xref:utils.adoc#IERC165-supportsInterface-bytes4-
  198. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  199. :ERC165Storage: pass:normal[xref:utils.adoc#ERC165Storage[`ERC165Storage`]]
  200. :xref-ERC165-supportsInterface-bytes4-: xref:utils.adoc#ERC165-supportsInterface-bytes4-
  201. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  202. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  203. :xref-ERC165Storage-supportsInterface-bytes4-: xref:utils.adoc#ERC165Storage-supportsInterface-bytes4-
  204. :xref-ERC165Storage-_registerInterface-bytes4-: xref:utils.adoc#ERC165Storage-_registerInterface-bytes4-
  205. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  206. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  207. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  208. :xref-ERC165Checker-supportsERC165-address-: xref:utils.adoc#ERC165Checker-supportsERC165-address-
  209. :xref-ERC165Checker-supportsInterface-address-bytes4-: xref:utils.adoc#ERC165Checker-supportsInterface-address-bytes4-
  210. :xref-ERC165Checker-getSupportedInterfaces-address-bytes4---: xref:utils.adoc#ERC165Checker-getSupportedInterfaces-address-bytes4---
  211. :xref-ERC165Checker-supportsAllInterfaces-address-bytes4---: xref:utils.adoc#ERC165Checker-supportsAllInterfaces-address-bytes4---
  212. :xref-ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-: xref:utils.adoc#ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-
  213. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  214. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  215. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  216. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  217. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  218. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  219. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  220. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  221. :xref-IERC1820Registry-setManager-address-address-: xref:utils.adoc#IERC1820Registry-setManager-address-address-
  222. :xref-IERC1820Registry-getManager-address-: xref:utils.adoc#IERC1820Registry-getManager-address-
  223. :xref-IERC1820Registry-setInterfaceImplementer-address-bytes32-address-: xref:utils.adoc#IERC1820Registry-setInterfaceImplementer-address-bytes32-address-
  224. :xref-IERC1820Registry-getInterfaceImplementer-address-bytes32-: xref:utils.adoc#IERC1820Registry-getInterfaceImplementer-address-bytes32-
  225. :xref-IERC1820Registry-interfaceHash-string-: xref:utils.adoc#IERC1820Registry-interfaceHash-string-
  226. :xref-IERC1820Registry-updateERC165Cache-address-bytes4-: xref:utils.adoc#IERC1820Registry-updateERC165Cache-address-bytes4-
  227. :xref-IERC1820Registry-implementsERC165Interface-address-bytes4-: xref:utils.adoc#IERC1820Registry-implementsERC165Interface-address-bytes4-
  228. :xref-IERC1820Registry-implementsERC165InterfaceNoCache-address-bytes4-: xref:utils.adoc#IERC1820Registry-implementsERC165InterfaceNoCache-address-bytes4-
  229. :xref-IERC1820Registry-InterfaceImplementerSet-address-bytes32-address-: xref:utils.adoc#IERC1820Registry-InterfaceImplementerSet-address-bytes32-address-
  230. :xref-IERC1820Registry-ManagerChanged-address-address-: xref:utils.adoc#IERC1820Registry-ManagerChanged-address-address-
  231. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  232. :IERC1820Implementer: pass:normal[xref:utils.adoc#IERC1820Implementer[`IERC1820Implementer`]]
  233. :IERC1820Implementer-canImplementInterfaceForAddress: pass:normal[xref:utils.adoc#IERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-[`IERC1820Implementer.canImplementInterfaceForAddress`]]
  234. :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
  235. :IERC1820Registry: pass:normal[xref:utils.adoc#IERC1820Registry[`IERC1820Registry`]]
  236. :xref-IERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-: xref:utils.adoc#IERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-
  237. :IERC1820Registry-setInterfaceImplementer: pass:normal[xref:utils.adoc#IERC1820Registry-setInterfaceImplementer-address-bytes32-address-[`IERC1820Registry.setInterfaceImplementer`]]
  238. :IERC1820Implementer: pass:normal[xref:utils.adoc#IERC1820Implementer[`IERC1820Implementer`]]
  239. :IERC1820Registry-setInterfaceImplementer: pass:normal[xref:utils.adoc#IERC1820Registry-setInterfaceImplementer-address-bytes32-address-[`IERC1820Registry.setInterfaceImplementer`]]
  240. :xref-ERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-: xref:utils.adoc#ERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-
  241. :xref-ERC1820Implementer-_registerInterfaceForAddress-bytes32-address-: xref:utils.adoc#ERC1820Implementer-_registerInterfaceForAddress-bytes32-address-
  242. :IERC1820Implementer-canImplementInterfaceForAddress: pass:normal[xref:utils.adoc#IERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-[`IERC1820Implementer.canImplementInterfaceForAddress`]]
  243. :IERC1820Registry-setInterfaceImplementer: pass:normal[xref:utils.adoc#IERC1820Registry-setInterfaceImplementer-address-bytes32-address-[`IERC1820Registry.setInterfaceImplementer`]]
  244. :IERC1820Registry-interfaceHash: pass:normal[xref:utils.adoc#IERC1820Registry-interfaceHash-string-[`IERC1820Registry.interfaceHash`]]
  245. :xref-BitMaps-get-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-get-struct-BitMaps-BitMap-uint256-
  246. :xref-BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-: xref:utils.adoc#BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-
  247. :xref-BitMaps-set-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-set-struct-BitMaps-BitMap-uint256-
  248. :xref-BitMaps-unset-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-unset-struct-BitMaps-BitMap-uint256-
  249. :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-
  250. :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  251. :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  252. :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-
  253. :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-
  254. :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  255. :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
  256. :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-string-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-string-
  257. :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-
  258. :xref-EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-
  259. :xref-EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-
  260. :xref-EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-
  261. :xref-EnumerableMap-length-struct-EnumerableMap-UintToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToUintMap-
  262. :xref-EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-
  263. :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-
  264. :xref-EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-
  265. :xref-EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-string-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-string-
  266. :xref-EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-
  267. :xref-EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-
  268. :xref-EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-
  269. :xref-EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-
  270. :xref-EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-
  271. :xref-EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-
  272. :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-
  273. :xref-EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-
  274. :xref-EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-string-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-string-
  275. :xref-EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-
  276. :xref-EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-
  277. :xref-EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-
  278. :xref-EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-
  279. :xref-EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-
  280. :xref-EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-
  281. :xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-
  282. :xref-EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-
  283. :xref-EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-string-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-string-
  284. :xref-EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-
  285. :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-
  286. :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  287. :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  288. :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-
  289. :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-
  290. :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  291. :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
  292. :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-string-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-string-
  293. :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-
  294. :xref-EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-
  295. :xref-EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-
  296. :xref-EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-
  297. :xref-EnumerableSet-length-struct-EnumerableSet-Bytes32Set-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-Bytes32Set-
  298. :xref-EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-
  299. :xref-EnumerableSet-values-struct-EnumerableSet-Bytes32Set-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-Bytes32Set-
  300. :xref-EnumerableSet-add-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-AddressSet-address-
  301. :xref-EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-
  302. :xref-EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-
  303. :xref-EnumerableSet-length-struct-EnumerableSet-AddressSet-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-AddressSet-
  304. :xref-EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-
  305. :xref-EnumerableSet-values-struct-EnumerableSet-AddressSet-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-AddressSet-
  306. :xref-EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-
  307. :xref-EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-
  308. :xref-EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-
  309. :xref-EnumerableSet-length-struct-EnumerableSet-UintSet-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-UintSet-
  310. :xref-EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-
  311. :xref-EnumerableSet-values-struct-EnumerableSet-UintSet-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-UintSet-
  312. :xref-DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-: xref:utils.adoc#DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-
  313. :xref-DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-
  314. :xref-DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-: xref:utils.adoc#DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-
  315. :xref-DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-
  316. :xref-DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-
  317. :xref-DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-
  318. :xref-DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-: xref:utils.adoc#DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-
  319. :xref-DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-
  320. :xref-DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-
  321. :xref-DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-
  322. :Votes: pass:normal[xref:governance.adoc#Votes[`Votes`]]
  323. :xref-Checkpoints-getAtBlock-struct-Checkpoints-History-uint256-: xref:utils.adoc#Checkpoints-getAtBlock-struct-Checkpoints-History-uint256-
  324. :xref-Checkpoints-getAtProbablyRecentBlock-struct-Checkpoints-History-uint256-: xref:utils.adoc#Checkpoints-getAtProbablyRecentBlock-struct-Checkpoints-History-uint256-
  325. :xref-Checkpoints-push-struct-Checkpoints-History-uint256-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-History-uint256-
  326. :xref-Checkpoints-push-struct-Checkpoints-History-function--uint256-uint256--view-returns--uint256--uint256-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-History-function--uint256-uint256--view-returns--uint256--uint256-
  327. :xref-Checkpoints-latest-struct-Checkpoints-History-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-History-
  328. :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-History-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-History-
  329. :xref-Checkpoints-length-struct-Checkpoints-History-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-History-
  330. :xref-Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-
  331. :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-
  332. :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-
  333. :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-
  334. :xref-Checkpoints-latest-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace224-
  335. :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-
  336. :xref-Checkpoints-length-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace224-
  337. :xref-Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-
  338. :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-
  339. :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-
  340. :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-
  341. :xref-Checkpoints-latest-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace160-
  342. :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-
  343. :xref-Checkpoints-length-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace160-
  344. :xref-Create2-deploy-uint256-bytes32-bytes-: xref:utils.adoc#Create2-deploy-uint256-bytes32-bytes-
  345. :xref-Create2-computeAddress-bytes32-bytes32-: xref:utils.adoc#Create2-computeAddress-bytes32-bytes32-
  346. :xref-Create2-computeAddress-bytes32-bytes32-address-: xref:utils.adoc#Create2-computeAddress-bytes32-bytes32-address-
  347. :xref-Address-isContract-address-: xref:utils.adoc#Address-isContract-address-
  348. :xref-Address-sendValue-address-payable-uint256-: xref:utils.adoc#Address-sendValue-address-payable-uint256-
  349. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  350. :xref-Address-functionCall-address-bytes-string-: xref:utils.adoc#Address-functionCall-address-bytes-string-
  351. :xref-Address-functionCallWithValue-address-bytes-uint256-: xref:utils.adoc#Address-functionCallWithValue-address-bytes-uint256-
  352. :xref-Address-functionCallWithValue-address-bytes-uint256-string-: xref:utils.adoc#Address-functionCallWithValue-address-bytes-uint256-string-
  353. :xref-Address-functionStaticCall-address-bytes-: xref:utils.adoc#Address-functionStaticCall-address-bytes-
  354. :xref-Address-functionStaticCall-address-bytes-string-: xref:utils.adoc#Address-functionStaticCall-address-bytes-string-
  355. :xref-Address-functionDelegateCall-address-bytes-: xref:utils.adoc#Address-functionDelegateCall-address-bytes-
  356. :xref-Address-functionDelegateCall-address-bytes-string-: xref:utils.adoc#Address-functionDelegateCall-address-bytes-string-
  357. :xref-Address-verifyCallResultFromTarget-address-bool-bytes-string-: xref:utils.adoc#Address-verifyCallResultFromTarget-address-bool-bytes-string-
  358. :xref-Address-verifyCallResult-bool-bytes-string-: xref:utils.adoc#Address-verifyCallResult-bool-bytes-string-
  359. :ReentrancyGuard: pass:normal[xref:security.adoc#ReentrancyGuard[`ReentrancyGuard`]]
  360. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  361. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  362. :xref-Address-functionCallWithValue-address-bytes-uint256-: xref:utils.adoc#Address-functionCallWithValue-address-bytes-uint256-
  363. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  364. :xref-Address-functionCall-address-bytes-string-: xref:utils.adoc#Address-functionCall-address-bytes-string-
  365. :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
  366. :xref-Address-functionCall-address-bytes-string-: xref:utils.adoc#Address-functionCall-address-bytes-string-
  367. :xref-Arrays-findUpperBound-uint256---uint256-: xref:utils.adoc#Arrays-findUpperBound-uint256---uint256-
  368. :xref-Arrays-unsafeAccess-address---uint256-: xref:utils.adoc#Arrays-unsafeAccess-address---uint256-
  369. :xref-Arrays-unsafeAccess-bytes32---uint256-: xref:utils.adoc#Arrays-unsafeAccess-bytes32---uint256-
  370. :xref-Arrays-unsafeAccess-uint256---uint256-: xref:utils.adoc#Arrays-unsafeAccess-uint256---uint256-
  371. :xref-Base64-encode-bytes-: xref:utils.adoc#Base64-encode-bytes-
  372. :xref-Counters-current-struct-Counters-Counter-: xref:utils.adoc#Counters-current-struct-Counters-Counter-
  373. :xref-Counters-increment-struct-Counters-Counter-: xref:utils.adoc#Counters-increment-struct-Counters-Counter-
  374. :xref-Counters-decrement-struct-Counters-Counter-: xref:utils.adoc#Counters-decrement-struct-Counters-Counter-
  375. :xref-Counters-reset-struct-Counters-Counter-: xref:utils.adoc#Counters-reset-struct-Counters-Counter-
  376. :xref-Strings-toString-uint256-: xref:utils.adoc#Strings-toString-uint256-
  377. :xref-Strings-toString-int256-: xref:utils.adoc#Strings-toString-int256-
  378. :xref-Strings-toHexString-uint256-: xref:utils.adoc#Strings-toHexString-uint256-
  379. :xref-Strings-toHexString-uint256-uint256-: xref:utils.adoc#Strings-toHexString-uint256-uint256-
  380. :xref-Strings-toHexString-address-: xref:utils.adoc#Strings-toHexString-address-
  381. :xref-Strings-equal-string-string-: xref:utils.adoc#Strings-equal-string-string-
  382. :xref-ShortStrings-toShortString-string-: xref:utils.adoc#ShortStrings-toShortString-string-
  383. :xref-ShortStrings-toString-ShortString-: xref:utils.adoc#ShortStrings-toString-ShortString-
  384. :xref-ShortStrings-byteLength-ShortString-: xref:utils.adoc#ShortStrings-byteLength-ShortString-
  385. :xref-ShortStrings-toShortStringWithFallback-string-string-: xref:utils.adoc#ShortStrings-toShortStringWithFallback-string-string-
  386. :xref-ShortStrings-toStringWithFallback-ShortString-string-: xref:utils.adoc#ShortStrings-toStringWithFallback-ShortString-string-
  387. :xref-ShortStrings-byteLengthWithFallback-ShortString-string-: xref:utils.adoc#ShortStrings-byteLengthWithFallback-ShortString-string-
  388. :xref-StorageSlot-getAddressSlot-bytes32-: xref:utils.adoc#StorageSlot-getAddressSlot-bytes32-
  389. :xref-StorageSlot-getBooleanSlot-bytes32-: xref:utils.adoc#StorageSlot-getBooleanSlot-bytes32-
  390. :xref-StorageSlot-getBytes32Slot-bytes32-: xref:utils.adoc#StorageSlot-getBytes32Slot-bytes32-
  391. :xref-StorageSlot-getUint256Slot-bytes32-: xref:utils.adoc#StorageSlot-getUint256Slot-bytes32-
  392. :xref-StorageSlot-getStringSlot-bytes32-: xref:utils.adoc#StorageSlot-getStringSlot-bytes32-
  393. :xref-StorageSlot-getStringSlot-string-: xref:utils.adoc#StorageSlot-getStringSlot-string-
  394. :xref-StorageSlot-getBytesSlot-bytes32-: xref:utils.adoc#StorageSlot-getBytesSlot-bytes32-
  395. :xref-StorageSlot-getBytesSlot-bytes-: xref:utils.adoc#StorageSlot-getBytesSlot-bytes-
  396. :xref-Multicall-multicall-bytes---: xref:utils.adoc#Multicall-multicall-bytes---
  397. = Utilities
  398. [.readme-notice]
  399. NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils
  400. Miscellaneous contracts and libraries containing utility functions you can use to improve security, work with new data types, or safely use low-level primitives.
  401. The {Address}, {Arrays}, {Base64} and {Strings} libraries provide more operations related to these native data types, while {SafeCast} adds ways to safely convert between the different signed and unsigned numeric types.
  402. {Multicall} provides a function to batch together multiple calls in a single external call.
  403. For new data types:
  404. * {Counters}: a simple way to get a counter that can only be incremented, decremented or reset. Very useful for ID generation, counting contract activity, among others.
  405. * {EnumerableMap}: like Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] type, 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`).
  406. * {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.
  407. [NOTE]
  408. ====
  409. Because Solidity does not support generic types, {EnumerableMap} and {EnumerableSet} are specialized to a limited number of key-value types.
  410. As of v3.0, {EnumerableMap} supports `uint256 -> address` (`UintToAddressMap`), and {EnumerableSet} supports `address` and `uint256` (`AddressSet` and `UintSet`).
  411. ====
  412. Finally, {Create2} contains all necessary utilities to safely use the https://blog.openzeppelin.com/getting-the-most-out-of-create2/[`CREATE2` EVM opcode], without having to deal with low-level assembly.
  413. == Math
  414. :Rounding: pass:normal[xref:#Math-Rounding[`++Rounding++`]]
  415. :max: pass:normal[xref:#Math-max-uint256-uint256-[`++max++`]]
  416. :min: pass:normal[xref:#Math-min-uint256-uint256-[`++min++`]]
  417. :average: pass:normal[xref:#Math-average-uint256-uint256-[`++average++`]]
  418. :ceilDiv: pass:normal[xref:#Math-ceilDiv-uint256-uint256-[`++ceilDiv++`]]
  419. :mulDiv: pass:normal[xref:#Math-mulDiv-uint256-uint256-uint256-[`++mulDiv++`]]
  420. :mulDiv: pass:normal[xref:#Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-[`++mulDiv++`]]
  421. :sqrt: pass:normal[xref:#Math-sqrt-uint256-[`++sqrt++`]]
  422. :sqrt: pass:normal[xref:#Math-sqrt-uint256-enum-Math-Rounding-[`++sqrt++`]]
  423. :log2: pass:normal[xref:#Math-log2-uint256-[`++log2++`]]
  424. :log2: pass:normal[xref:#Math-log2-uint256-enum-Math-Rounding-[`++log2++`]]
  425. :log10: pass:normal[xref:#Math-log10-uint256-[`++log10++`]]
  426. :log10: pass:normal[xref:#Math-log10-uint256-enum-Math-Rounding-[`++log10++`]]
  427. :log256: pass:normal[xref:#Math-log256-uint256-[`++log256++`]]
  428. :log256: pass:normal[xref:#Math-log256-uint256-enum-Math-Rounding-[`++log256++`]]
  429. [.contract]
  430. [[Math]]
  431. === `++Math++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/math/Math.sol[{github-icon},role=heading-link]
  432. [.hljs-theme-light.nopadding]
  433. ```solidity
  434. import "@openzeppelin/contracts/utils/math/Math.sol";
  435. ```
  436. Standard math utilities missing in the Solidity language.
  437. [.contract-index]
  438. .Functions
  439. --
  440. * {xref-Math-max-uint256-uint256-}[`++max(a, b)++`]
  441. * {xref-Math-min-uint256-uint256-}[`++min(a, b)++`]
  442. * {xref-Math-average-uint256-uint256-}[`++average(a, b)++`]
  443. * {xref-Math-ceilDiv-uint256-uint256-}[`++ceilDiv(a, b)++`]
  444. * {xref-Math-mulDiv-uint256-uint256-uint256-}[`++mulDiv(x, y, denominator)++`]
  445. * {xref-Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-}[`++mulDiv(x, y, denominator, rounding)++`]
  446. * {xref-Math-sqrt-uint256-}[`++sqrt(a)++`]
  447. * {xref-Math-sqrt-uint256-enum-Math-Rounding-}[`++sqrt(a, rounding)++`]
  448. * {xref-Math-log2-uint256-}[`++log2(value)++`]
  449. * {xref-Math-log2-uint256-enum-Math-Rounding-}[`++log2(value, rounding)++`]
  450. * {xref-Math-log10-uint256-}[`++log10(value)++`]
  451. * {xref-Math-log10-uint256-enum-Math-Rounding-}[`++log10(value, rounding)++`]
  452. * {xref-Math-log256-uint256-}[`++log256(value)++`]
  453. * {xref-Math-log256-uint256-enum-Math-Rounding-}[`++log256(value, rounding)++`]
  454. --
  455. [.contract-item]
  456. [[Math-max-uint256-uint256-]]
  457. ==== `[.contract-item-name]#++max++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  458. Returns the largest of two numbers.
  459. [.contract-item]
  460. [[Math-min-uint256-uint256-]]
  461. ==== `[.contract-item-name]#++min++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  462. Returns the smallest of two numbers.
  463. [.contract-item]
  464. [[Math-average-uint256-uint256-]]
  465. ==== `[.contract-item-name]#++average++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  466. Returns the average of two numbers. The result is rounded towards
  467. zero.
  468. [.contract-item]
  469. [[Math-ceilDiv-uint256-uint256-]]
  470. ==== `[.contract-item-name]#++ceilDiv++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  471. Returns the ceiling of the division of two numbers.
  472. This differs from standard division with `/` in that it rounds up instead
  473. of rounding down.
  474. [.contract-item]
  475. [[Math-mulDiv-uint256-uint256-uint256-]]
  476. ==== `[.contract-item-name]#++mulDiv++#++(uint256 x, uint256 y, uint256 denominator) → uint256 result++` [.item-kind]#internal#
  477. Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
  478. with further edits by Uniswap Labs also under MIT license.
  479. [.contract-item]
  480. [[Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-]]
  481. ==== `[.contract-item-name]#++mulDiv++#++(uint256 x, uint256 y, uint256 denominator, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
  482. [.contract-item]
  483. [[Math-sqrt-uint256-]]
  484. ==== `[.contract-item-name]#++sqrt++#++(uint256 a) → uint256++` [.item-kind]#internal#
  485. Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
  486. Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
  487. [.contract-item]
  488. [[Math-sqrt-uint256-enum-Math-Rounding-]]
  489. ==== `[.contract-item-name]#++sqrt++#++(uint256 a, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
  490. [.contract-item]
  491. [[Math-log2-uint256-]]
  492. ==== `[.contract-item-name]#++log2++#++(uint256 value) → uint256++` [.item-kind]#internal#
  493. Return the log in base 2, rounded down, of a positive value.
  494. Returns 0 if given 0.
  495. [.contract-item]
  496. [[Math-log2-uint256-enum-Math-Rounding-]]
  497. ==== `[.contract-item-name]#++log2++#++(uint256 value, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
  498. Return the log in base 2, following the selected rounding direction, of a positive value.
  499. Returns 0 if given 0.
  500. [.contract-item]
  501. [[Math-log10-uint256-]]
  502. ==== `[.contract-item-name]#++log10++#++(uint256 value) → uint256++` [.item-kind]#internal#
  503. Return the log in base 10, rounded down, of a positive value.
  504. Returns 0 if given 0.
  505. [.contract-item]
  506. [[Math-log10-uint256-enum-Math-Rounding-]]
  507. ==== `[.contract-item-name]#++log10++#++(uint256 value, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
  508. Return the log in base 10, following the selected rounding direction, of a positive value.
  509. Returns 0 if given 0.
  510. [.contract-item]
  511. [[Math-log256-uint256-]]
  512. ==== `[.contract-item-name]#++log256++#++(uint256 value) → uint256++` [.item-kind]#internal#
  513. Return the log in base 256, rounded down, of a positive value.
  514. Returns 0 if given 0.
  515. Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
  516. [.contract-item]
  517. [[Math-log256-uint256-enum-Math-Rounding-]]
  518. ==== `[.contract-item-name]#++log256++#++(uint256 value, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
  519. Return the log in base 256, following the selected rounding direction, of a positive value.
  520. Returns 0 if given 0.
  521. :max: pass:normal[xref:#SignedMath-max-int256-int256-[`++max++`]]
  522. :min: pass:normal[xref:#SignedMath-min-int256-int256-[`++min++`]]
  523. :average: pass:normal[xref:#SignedMath-average-int256-int256-[`++average++`]]
  524. :abs: pass:normal[xref:#SignedMath-abs-int256-[`++abs++`]]
  525. [.contract]
  526. [[SignedMath]]
  527. === `++SignedMath++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/math/SignedMath.sol[{github-icon},role=heading-link]
  528. [.hljs-theme-light.nopadding]
  529. ```solidity
  530. import "@openzeppelin/contracts/utils/math/SignedMath.sol";
  531. ```
  532. Standard signed math utilities missing in the Solidity language.
  533. [.contract-index]
  534. .Functions
  535. --
  536. * {xref-SignedMath-max-int256-int256-}[`++max(a, b)++`]
  537. * {xref-SignedMath-min-int256-int256-}[`++min(a, b)++`]
  538. * {xref-SignedMath-average-int256-int256-}[`++average(a, b)++`]
  539. * {xref-SignedMath-abs-int256-}[`++abs(n)++`]
  540. --
  541. [.contract-item]
  542. [[SignedMath-max-int256-int256-]]
  543. ==== `[.contract-item-name]#++max++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
  544. Returns the largest of two signed numbers.
  545. [.contract-item]
  546. [[SignedMath-min-int256-int256-]]
  547. ==== `[.contract-item-name]#++min++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
  548. Returns the smallest of two signed numbers.
  549. [.contract-item]
  550. [[SignedMath-average-int256-int256-]]
  551. ==== `[.contract-item-name]#++average++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
  552. Returns the average of two signed numbers without overflow.
  553. The result is rounded towards zero.
  554. [.contract-item]
  555. [[SignedMath-abs-int256-]]
  556. ==== `[.contract-item-name]#++abs++#++(int256 n) → uint256++` [.item-kind]#internal#
  557. Returns the absolute unsigned value of a signed value.
  558. :toUint248: pass:normal[xref:#SafeCast-toUint248-uint256-[`++toUint248++`]]
  559. :toUint240: pass:normal[xref:#SafeCast-toUint240-uint256-[`++toUint240++`]]
  560. :toUint232: pass:normal[xref:#SafeCast-toUint232-uint256-[`++toUint232++`]]
  561. :toUint224: pass:normal[xref:#SafeCast-toUint224-uint256-[`++toUint224++`]]
  562. :toUint216: pass:normal[xref:#SafeCast-toUint216-uint256-[`++toUint216++`]]
  563. :toUint208: pass:normal[xref:#SafeCast-toUint208-uint256-[`++toUint208++`]]
  564. :toUint200: pass:normal[xref:#SafeCast-toUint200-uint256-[`++toUint200++`]]
  565. :toUint192: pass:normal[xref:#SafeCast-toUint192-uint256-[`++toUint192++`]]
  566. :toUint184: pass:normal[xref:#SafeCast-toUint184-uint256-[`++toUint184++`]]
  567. :toUint176: pass:normal[xref:#SafeCast-toUint176-uint256-[`++toUint176++`]]
  568. :toUint168: pass:normal[xref:#SafeCast-toUint168-uint256-[`++toUint168++`]]
  569. :toUint160: pass:normal[xref:#SafeCast-toUint160-uint256-[`++toUint160++`]]
  570. :toUint152: pass:normal[xref:#SafeCast-toUint152-uint256-[`++toUint152++`]]
  571. :toUint144: pass:normal[xref:#SafeCast-toUint144-uint256-[`++toUint144++`]]
  572. :toUint136: pass:normal[xref:#SafeCast-toUint136-uint256-[`++toUint136++`]]
  573. :toUint128: pass:normal[xref:#SafeCast-toUint128-uint256-[`++toUint128++`]]
  574. :toUint120: pass:normal[xref:#SafeCast-toUint120-uint256-[`++toUint120++`]]
  575. :toUint112: pass:normal[xref:#SafeCast-toUint112-uint256-[`++toUint112++`]]
  576. :toUint104: pass:normal[xref:#SafeCast-toUint104-uint256-[`++toUint104++`]]
  577. :toUint96: pass:normal[xref:#SafeCast-toUint96-uint256-[`++toUint96++`]]
  578. :toUint88: pass:normal[xref:#SafeCast-toUint88-uint256-[`++toUint88++`]]
  579. :toUint80: pass:normal[xref:#SafeCast-toUint80-uint256-[`++toUint80++`]]
  580. :toUint72: pass:normal[xref:#SafeCast-toUint72-uint256-[`++toUint72++`]]
  581. :toUint64: pass:normal[xref:#SafeCast-toUint64-uint256-[`++toUint64++`]]
  582. :toUint56: pass:normal[xref:#SafeCast-toUint56-uint256-[`++toUint56++`]]
  583. :toUint48: pass:normal[xref:#SafeCast-toUint48-uint256-[`++toUint48++`]]
  584. :toUint40: pass:normal[xref:#SafeCast-toUint40-uint256-[`++toUint40++`]]
  585. :toUint32: pass:normal[xref:#SafeCast-toUint32-uint256-[`++toUint32++`]]
  586. :toUint24: pass:normal[xref:#SafeCast-toUint24-uint256-[`++toUint24++`]]
  587. :toUint16: pass:normal[xref:#SafeCast-toUint16-uint256-[`++toUint16++`]]
  588. :toUint8: pass:normal[xref:#SafeCast-toUint8-uint256-[`++toUint8++`]]
  589. :toUint256: pass:normal[xref:#SafeCast-toUint256-int256-[`++toUint256++`]]
  590. :toInt248: pass:normal[xref:#SafeCast-toInt248-int256-[`++toInt248++`]]
  591. :toInt240: pass:normal[xref:#SafeCast-toInt240-int256-[`++toInt240++`]]
  592. :toInt232: pass:normal[xref:#SafeCast-toInt232-int256-[`++toInt232++`]]
  593. :toInt224: pass:normal[xref:#SafeCast-toInt224-int256-[`++toInt224++`]]
  594. :toInt216: pass:normal[xref:#SafeCast-toInt216-int256-[`++toInt216++`]]
  595. :toInt208: pass:normal[xref:#SafeCast-toInt208-int256-[`++toInt208++`]]
  596. :toInt200: pass:normal[xref:#SafeCast-toInt200-int256-[`++toInt200++`]]
  597. :toInt192: pass:normal[xref:#SafeCast-toInt192-int256-[`++toInt192++`]]
  598. :toInt184: pass:normal[xref:#SafeCast-toInt184-int256-[`++toInt184++`]]
  599. :toInt176: pass:normal[xref:#SafeCast-toInt176-int256-[`++toInt176++`]]
  600. :toInt168: pass:normal[xref:#SafeCast-toInt168-int256-[`++toInt168++`]]
  601. :toInt160: pass:normal[xref:#SafeCast-toInt160-int256-[`++toInt160++`]]
  602. :toInt152: pass:normal[xref:#SafeCast-toInt152-int256-[`++toInt152++`]]
  603. :toInt144: pass:normal[xref:#SafeCast-toInt144-int256-[`++toInt144++`]]
  604. :toInt136: pass:normal[xref:#SafeCast-toInt136-int256-[`++toInt136++`]]
  605. :toInt128: pass:normal[xref:#SafeCast-toInt128-int256-[`++toInt128++`]]
  606. :toInt120: pass:normal[xref:#SafeCast-toInt120-int256-[`++toInt120++`]]
  607. :toInt112: pass:normal[xref:#SafeCast-toInt112-int256-[`++toInt112++`]]
  608. :toInt104: pass:normal[xref:#SafeCast-toInt104-int256-[`++toInt104++`]]
  609. :toInt96: pass:normal[xref:#SafeCast-toInt96-int256-[`++toInt96++`]]
  610. :toInt88: pass:normal[xref:#SafeCast-toInt88-int256-[`++toInt88++`]]
  611. :toInt80: pass:normal[xref:#SafeCast-toInt80-int256-[`++toInt80++`]]
  612. :toInt72: pass:normal[xref:#SafeCast-toInt72-int256-[`++toInt72++`]]
  613. :toInt64: pass:normal[xref:#SafeCast-toInt64-int256-[`++toInt64++`]]
  614. :toInt56: pass:normal[xref:#SafeCast-toInt56-int256-[`++toInt56++`]]
  615. :toInt48: pass:normal[xref:#SafeCast-toInt48-int256-[`++toInt48++`]]
  616. :toInt40: pass:normal[xref:#SafeCast-toInt40-int256-[`++toInt40++`]]
  617. :toInt32: pass:normal[xref:#SafeCast-toInt32-int256-[`++toInt32++`]]
  618. :toInt24: pass:normal[xref:#SafeCast-toInt24-int256-[`++toInt24++`]]
  619. :toInt16: pass:normal[xref:#SafeCast-toInt16-int256-[`++toInt16++`]]
  620. :toInt8: pass:normal[xref:#SafeCast-toInt8-int256-[`++toInt8++`]]
  621. :toInt256: pass:normal[xref:#SafeCast-toInt256-uint256-[`++toInt256++`]]
  622. [.contract]
  623. [[SafeCast]]
  624. === `++SafeCast++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/math/SafeCast.sol[{github-icon},role=heading-link]
  625. [.hljs-theme-light.nopadding]
  626. ```solidity
  627. import "@openzeppelin/contracts/utils/math/SafeCast.sol";
  628. ```
  629. Wrappers over Solidity's uintXX/intXX casting operators with added overflow
  630. checks.
  631. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
  632. easily result in undesired exploitation or bugs, since developers usually
  633. assume that overflows raise errors. `SafeCast` restores this intuition by
  634. reverting the transaction when such an operation overflows.
  635. Using this library instead of the unchecked operations eliminates an entire
  636. class of bugs, so it's recommended to use it always.
  637. Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
  638. all math on `uint256` and `int256` and then downcasting.
  639. [.contract-index]
  640. .Functions
  641. --
  642. * {xref-SafeCast-toUint248-uint256-}[`++toUint248(value)++`]
  643. * {xref-SafeCast-toUint240-uint256-}[`++toUint240(value)++`]
  644. * {xref-SafeCast-toUint232-uint256-}[`++toUint232(value)++`]
  645. * {xref-SafeCast-toUint224-uint256-}[`++toUint224(value)++`]
  646. * {xref-SafeCast-toUint216-uint256-}[`++toUint216(value)++`]
  647. * {xref-SafeCast-toUint208-uint256-}[`++toUint208(value)++`]
  648. * {xref-SafeCast-toUint200-uint256-}[`++toUint200(value)++`]
  649. * {xref-SafeCast-toUint192-uint256-}[`++toUint192(value)++`]
  650. * {xref-SafeCast-toUint184-uint256-}[`++toUint184(value)++`]
  651. * {xref-SafeCast-toUint176-uint256-}[`++toUint176(value)++`]
  652. * {xref-SafeCast-toUint168-uint256-}[`++toUint168(value)++`]
  653. * {xref-SafeCast-toUint160-uint256-}[`++toUint160(value)++`]
  654. * {xref-SafeCast-toUint152-uint256-}[`++toUint152(value)++`]
  655. * {xref-SafeCast-toUint144-uint256-}[`++toUint144(value)++`]
  656. * {xref-SafeCast-toUint136-uint256-}[`++toUint136(value)++`]
  657. * {xref-SafeCast-toUint128-uint256-}[`++toUint128(value)++`]
  658. * {xref-SafeCast-toUint120-uint256-}[`++toUint120(value)++`]
  659. * {xref-SafeCast-toUint112-uint256-}[`++toUint112(value)++`]
  660. * {xref-SafeCast-toUint104-uint256-}[`++toUint104(value)++`]
  661. * {xref-SafeCast-toUint96-uint256-}[`++toUint96(value)++`]
  662. * {xref-SafeCast-toUint88-uint256-}[`++toUint88(value)++`]
  663. * {xref-SafeCast-toUint80-uint256-}[`++toUint80(value)++`]
  664. * {xref-SafeCast-toUint72-uint256-}[`++toUint72(value)++`]
  665. * {xref-SafeCast-toUint64-uint256-}[`++toUint64(value)++`]
  666. * {xref-SafeCast-toUint56-uint256-}[`++toUint56(value)++`]
  667. * {xref-SafeCast-toUint48-uint256-}[`++toUint48(value)++`]
  668. * {xref-SafeCast-toUint40-uint256-}[`++toUint40(value)++`]
  669. * {xref-SafeCast-toUint32-uint256-}[`++toUint32(value)++`]
  670. * {xref-SafeCast-toUint24-uint256-}[`++toUint24(value)++`]
  671. * {xref-SafeCast-toUint16-uint256-}[`++toUint16(value)++`]
  672. * {xref-SafeCast-toUint8-uint256-}[`++toUint8(value)++`]
  673. * {xref-SafeCast-toUint256-int256-}[`++toUint256(value)++`]
  674. * {xref-SafeCast-toInt248-int256-}[`++toInt248(value)++`]
  675. * {xref-SafeCast-toInt240-int256-}[`++toInt240(value)++`]
  676. * {xref-SafeCast-toInt232-int256-}[`++toInt232(value)++`]
  677. * {xref-SafeCast-toInt224-int256-}[`++toInt224(value)++`]
  678. * {xref-SafeCast-toInt216-int256-}[`++toInt216(value)++`]
  679. * {xref-SafeCast-toInt208-int256-}[`++toInt208(value)++`]
  680. * {xref-SafeCast-toInt200-int256-}[`++toInt200(value)++`]
  681. * {xref-SafeCast-toInt192-int256-}[`++toInt192(value)++`]
  682. * {xref-SafeCast-toInt184-int256-}[`++toInt184(value)++`]
  683. * {xref-SafeCast-toInt176-int256-}[`++toInt176(value)++`]
  684. * {xref-SafeCast-toInt168-int256-}[`++toInt168(value)++`]
  685. * {xref-SafeCast-toInt160-int256-}[`++toInt160(value)++`]
  686. * {xref-SafeCast-toInt152-int256-}[`++toInt152(value)++`]
  687. * {xref-SafeCast-toInt144-int256-}[`++toInt144(value)++`]
  688. * {xref-SafeCast-toInt136-int256-}[`++toInt136(value)++`]
  689. * {xref-SafeCast-toInt128-int256-}[`++toInt128(value)++`]
  690. * {xref-SafeCast-toInt120-int256-}[`++toInt120(value)++`]
  691. * {xref-SafeCast-toInt112-int256-}[`++toInt112(value)++`]
  692. * {xref-SafeCast-toInt104-int256-}[`++toInt104(value)++`]
  693. * {xref-SafeCast-toInt96-int256-}[`++toInt96(value)++`]
  694. * {xref-SafeCast-toInt88-int256-}[`++toInt88(value)++`]
  695. * {xref-SafeCast-toInt80-int256-}[`++toInt80(value)++`]
  696. * {xref-SafeCast-toInt72-int256-}[`++toInt72(value)++`]
  697. * {xref-SafeCast-toInt64-int256-}[`++toInt64(value)++`]
  698. * {xref-SafeCast-toInt56-int256-}[`++toInt56(value)++`]
  699. * {xref-SafeCast-toInt48-int256-}[`++toInt48(value)++`]
  700. * {xref-SafeCast-toInt40-int256-}[`++toInt40(value)++`]
  701. * {xref-SafeCast-toInt32-int256-}[`++toInt32(value)++`]
  702. * {xref-SafeCast-toInt24-int256-}[`++toInt24(value)++`]
  703. * {xref-SafeCast-toInt16-int256-}[`++toInt16(value)++`]
  704. * {xref-SafeCast-toInt8-int256-}[`++toInt8(value)++`]
  705. * {xref-SafeCast-toInt256-uint256-}[`++toInt256(value)++`]
  706. --
  707. [.contract-item]
  708. [[SafeCast-toUint248-uint256-]]
  709. ==== `[.contract-item-name]#++toUint248++#++(uint256 value) → uint248++` [.item-kind]#internal#
  710. Returns the downcasted uint248 from uint256, reverting on
  711. overflow (when the input is greater than largest uint248).
  712. Counterpart to Solidity's `uint248` operator.
  713. Requirements:
  714. - input must fit into 248 bits
  715. _Available since v4.7._
  716. [.contract-item]
  717. [[SafeCast-toUint240-uint256-]]
  718. ==== `[.contract-item-name]#++toUint240++#++(uint256 value) → uint240++` [.item-kind]#internal#
  719. Returns the downcasted uint240 from uint256, reverting on
  720. overflow (when the input is greater than largest uint240).
  721. Counterpart to Solidity's `uint240` operator.
  722. Requirements:
  723. - input must fit into 240 bits
  724. _Available since v4.7._
  725. [.contract-item]
  726. [[SafeCast-toUint232-uint256-]]
  727. ==== `[.contract-item-name]#++toUint232++#++(uint256 value) → uint232++` [.item-kind]#internal#
  728. Returns the downcasted uint232 from uint256, reverting on
  729. overflow (when the input is greater than largest uint232).
  730. Counterpart to Solidity's `uint232` operator.
  731. Requirements:
  732. - input must fit into 232 bits
  733. _Available since v4.7._
  734. [.contract-item]
  735. [[SafeCast-toUint224-uint256-]]
  736. ==== `[.contract-item-name]#++toUint224++#++(uint256 value) → uint224++` [.item-kind]#internal#
  737. Returns the downcasted uint224 from uint256, reverting on
  738. overflow (when the input is greater than largest uint224).
  739. Counterpart to Solidity's `uint224` operator.
  740. Requirements:
  741. - input must fit into 224 bits
  742. _Available since v4.2._
  743. [.contract-item]
  744. [[SafeCast-toUint216-uint256-]]
  745. ==== `[.contract-item-name]#++toUint216++#++(uint256 value) → uint216++` [.item-kind]#internal#
  746. Returns the downcasted uint216 from uint256, reverting on
  747. overflow (when the input is greater than largest uint216).
  748. Counterpart to Solidity's `uint216` operator.
  749. Requirements:
  750. - input must fit into 216 bits
  751. _Available since v4.7._
  752. [.contract-item]
  753. [[SafeCast-toUint208-uint256-]]
  754. ==== `[.contract-item-name]#++toUint208++#++(uint256 value) → uint208++` [.item-kind]#internal#
  755. Returns the downcasted uint208 from uint256, reverting on
  756. overflow (when the input is greater than largest uint208).
  757. Counterpart to Solidity's `uint208` operator.
  758. Requirements:
  759. - input must fit into 208 bits
  760. _Available since v4.7._
  761. [.contract-item]
  762. [[SafeCast-toUint200-uint256-]]
  763. ==== `[.contract-item-name]#++toUint200++#++(uint256 value) → uint200++` [.item-kind]#internal#
  764. Returns the downcasted uint200 from uint256, reverting on
  765. overflow (when the input is greater than largest uint200).
  766. Counterpart to Solidity's `uint200` operator.
  767. Requirements:
  768. - input must fit into 200 bits
  769. _Available since v4.7._
  770. [.contract-item]
  771. [[SafeCast-toUint192-uint256-]]
  772. ==== `[.contract-item-name]#++toUint192++#++(uint256 value) → uint192++` [.item-kind]#internal#
  773. Returns the downcasted uint192 from uint256, reverting on
  774. overflow (when the input is greater than largest uint192).
  775. Counterpart to Solidity's `uint192` operator.
  776. Requirements:
  777. - input must fit into 192 bits
  778. _Available since v4.7._
  779. [.contract-item]
  780. [[SafeCast-toUint184-uint256-]]
  781. ==== `[.contract-item-name]#++toUint184++#++(uint256 value) → uint184++` [.item-kind]#internal#
  782. Returns the downcasted uint184 from uint256, reverting on
  783. overflow (when the input is greater than largest uint184).
  784. Counterpart to Solidity's `uint184` operator.
  785. Requirements:
  786. - input must fit into 184 bits
  787. _Available since v4.7._
  788. [.contract-item]
  789. [[SafeCast-toUint176-uint256-]]
  790. ==== `[.contract-item-name]#++toUint176++#++(uint256 value) → uint176++` [.item-kind]#internal#
  791. Returns the downcasted uint176 from uint256, reverting on
  792. overflow (when the input is greater than largest uint176).
  793. Counterpart to Solidity's `uint176` operator.
  794. Requirements:
  795. - input must fit into 176 bits
  796. _Available since v4.7._
  797. [.contract-item]
  798. [[SafeCast-toUint168-uint256-]]
  799. ==== `[.contract-item-name]#++toUint168++#++(uint256 value) → uint168++` [.item-kind]#internal#
  800. Returns the downcasted uint168 from uint256, reverting on
  801. overflow (when the input is greater than largest uint168).
  802. Counterpart to Solidity's `uint168` operator.
  803. Requirements:
  804. - input must fit into 168 bits
  805. _Available since v4.7._
  806. [.contract-item]
  807. [[SafeCast-toUint160-uint256-]]
  808. ==== `[.contract-item-name]#++toUint160++#++(uint256 value) → uint160++` [.item-kind]#internal#
  809. Returns the downcasted uint160 from uint256, reverting on
  810. overflow (when the input is greater than largest uint160).
  811. Counterpart to Solidity's `uint160` operator.
  812. Requirements:
  813. - input must fit into 160 bits
  814. _Available since v4.7._
  815. [.contract-item]
  816. [[SafeCast-toUint152-uint256-]]
  817. ==== `[.contract-item-name]#++toUint152++#++(uint256 value) → uint152++` [.item-kind]#internal#
  818. Returns the downcasted uint152 from uint256, reverting on
  819. overflow (when the input is greater than largest uint152).
  820. Counterpart to Solidity's `uint152` operator.
  821. Requirements:
  822. - input must fit into 152 bits
  823. _Available since v4.7._
  824. [.contract-item]
  825. [[SafeCast-toUint144-uint256-]]
  826. ==== `[.contract-item-name]#++toUint144++#++(uint256 value) → uint144++` [.item-kind]#internal#
  827. Returns the downcasted uint144 from uint256, reverting on
  828. overflow (when the input is greater than largest uint144).
  829. Counterpart to Solidity's `uint144` operator.
  830. Requirements:
  831. - input must fit into 144 bits
  832. _Available since v4.7._
  833. [.contract-item]
  834. [[SafeCast-toUint136-uint256-]]
  835. ==== `[.contract-item-name]#++toUint136++#++(uint256 value) → uint136++` [.item-kind]#internal#
  836. Returns the downcasted uint136 from uint256, reverting on
  837. overflow (when the input is greater than largest uint136).
  838. Counterpart to Solidity's `uint136` operator.
  839. Requirements:
  840. - input must fit into 136 bits
  841. _Available since v4.7._
  842. [.contract-item]
  843. [[SafeCast-toUint128-uint256-]]
  844. ==== `[.contract-item-name]#++toUint128++#++(uint256 value) → uint128++` [.item-kind]#internal#
  845. Returns the downcasted uint128 from uint256, reverting on
  846. overflow (when the input is greater than largest uint128).
  847. Counterpart to Solidity's `uint128` operator.
  848. Requirements:
  849. - input must fit into 128 bits
  850. _Available since v2.5._
  851. [.contract-item]
  852. [[SafeCast-toUint120-uint256-]]
  853. ==== `[.contract-item-name]#++toUint120++#++(uint256 value) → uint120++` [.item-kind]#internal#
  854. Returns the downcasted uint120 from uint256, reverting on
  855. overflow (when the input is greater than largest uint120).
  856. Counterpart to Solidity's `uint120` operator.
  857. Requirements:
  858. - input must fit into 120 bits
  859. _Available since v4.7._
  860. [.contract-item]
  861. [[SafeCast-toUint112-uint256-]]
  862. ==== `[.contract-item-name]#++toUint112++#++(uint256 value) → uint112++` [.item-kind]#internal#
  863. Returns the downcasted uint112 from uint256, reverting on
  864. overflow (when the input is greater than largest uint112).
  865. Counterpart to Solidity's `uint112` operator.
  866. Requirements:
  867. - input must fit into 112 bits
  868. _Available since v4.7._
  869. [.contract-item]
  870. [[SafeCast-toUint104-uint256-]]
  871. ==== `[.contract-item-name]#++toUint104++#++(uint256 value) → uint104++` [.item-kind]#internal#
  872. Returns the downcasted uint104 from uint256, reverting on
  873. overflow (when the input is greater than largest uint104).
  874. Counterpart to Solidity's `uint104` operator.
  875. Requirements:
  876. - input must fit into 104 bits
  877. _Available since v4.7._
  878. [.contract-item]
  879. [[SafeCast-toUint96-uint256-]]
  880. ==== `[.contract-item-name]#++toUint96++#++(uint256 value) → uint96++` [.item-kind]#internal#
  881. Returns the downcasted uint96 from uint256, reverting on
  882. overflow (when the input is greater than largest uint96).
  883. Counterpart to Solidity's `uint96` operator.
  884. Requirements:
  885. - input must fit into 96 bits
  886. _Available since v4.2._
  887. [.contract-item]
  888. [[SafeCast-toUint88-uint256-]]
  889. ==== `[.contract-item-name]#++toUint88++#++(uint256 value) → uint88++` [.item-kind]#internal#
  890. Returns the downcasted uint88 from uint256, reverting on
  891. overflow (when the input is greater than largest uint88).
  892. Counterpart to Solidity's `uint88` operator.
  893. Requirements:
  894. - input must fit into 88 bits
  895. _Available since v4.7._
  896. [.contract-item]
  897. [[SafeCast-toUint80-uint256-]]
  898. ==== `[.contract-item-name]#++toUint80++#++(uint256 value) → uint80++` [.item-kind]#internal#
  899. Returns the downcasted uint80 from uint256, reverting on
  900. overflow (when the input is greater than largest uint80).
  901. Counterpart to Solidity's `uint80` operator.
  902. Requirements:
  903. - input must fit into 80 bits
  904. _Available since v4.7._
  905. [.contract-item]
  906. [[SafeCast-toUint72-uint256-]]
  907. ==== `[.contract-item-name]#++toUint72++#++(uint256 value) → uint72++` [.item-kind]#internal#
  908. Returns the downcasted uint72 from uint256, reverting on
  909. overflow (when the input is greater than largest uint72).
  910. Counterpart to Solidity's `uint72` operator.
  911. Requirements:
  912. - input must fit into 72 bits
  913. _Available since v4.7._
  914. [.contract-item]
  915. [[SafeCast-toUint64-uint256-]]
  916. ==== `[.contract-item-name]#++toUint64++#++(uint256 value) → uint64++` [.item-kind]#internal#
  917. Returns the downcasted uint64 from uint256, reverting on
  918. overflow (when the input is greater than largest uint64).
  919. Counterpart to Solidity's `uint64` operator.
  920. Requirements:
  921. - input must fit into 64 bits
  922. _Available since v2.5._
  923. [.contract-item]
  924. [[SafeCast-toUint56-uint256-]]
  925. ==== `[.contract-item-name]#++toUint56++#++(uint256 value) → uint56++` [.item-kind]#internal#
  926. Returns the downcasted uint56 from uint256, reverting on
  927. overflow (when the input is greater than largest uint56).
  928. Counterpart to Solidity's `uint56` operator.
  929. Requirements:
  930. - input must fit into 56 bits
  931. _Available since v4.7._
  932. [.contract-item]
  933. [[SafeCast-toUint48-uint256-]]
  934. ==== `[.contract-item-name]#++toUint48++#++(uint256 value) → uint48++` [.item-kind]#internal#
  935. Returns the downcasted uint48 from uint256, reverting on
  936. overflow (when the input is greater than largest uint48).
  937. Counterpart to Solidity's `uint48` operator.
  938. Requirements:
  939. - input must fit into 48 bits
  940. _Available since v4.7._
  941. [.contract-item]
  942. [[SafeCast-toUint40-uint256-]]
  943. ==== `[.contract-item-name]#++toUint40++#++(uint256 value) → uint40++` [.item-kind]#internal#
  944. Returns the downcasted uint40 from uint256, reverting on
  945. overflow (when the input is greater than largest uint40).
  946. Counterpart to Solidity's `uint40` operator.
  947. Requirements:
  948. - input must fit into 40 bits
  949. _Available since v4.7._
  950. [.contract-item]
  951. [[SafeCast-toUint32-uint256-]]
  952. ==== `[.contract-item-name]#++toUint32++#++(uint256 value) → uint32++` [.item-kind]#internal#
  953. Returns the downcasted uint32 from uint256, reverting on
  954. overflow (when the input is greater than largest uint32).
  955. Counterpart to Solidity's `uint32` operator.
  956. Requirements:
  957. - input must fit into 32 bits
  958. _Available since v2.5._
  959. [.contract-item]
  960. [[SafeCast-toUint24-uint256-]]
  961. ==== `[.contract-item-name]#++toUint24++#++(uint256 value) → uint24++` [.item-kind]#internal#
  962. Returns the downcasted uint24 from uint256, reverting on
  963. overflow (when the input is greater than largest uint24).
  964. Counterpart to Solidity's `uint24` operator.
  965. Requirements:
  966. - input must fit into 24 bits
  967. _Available since v4.7._
  968. [.contract-item]
  969. [[SafeCast-toUint16-uint256-]]
  970. ==== `[.contract-item-name]#++toUint16++#++(uint256 value) → uint16++` [.item-kind]#internal#
  971. Returns the downcasted uint16 from uint256, reverting on
  972. overflow (when the input is greater than largest uint16).
  973. Counterpart to Solidity's `uint16` operator.
  974. Requirements:
  975. - input must fit into 16 bits
  976. _Available since v2.5._
  977. [.contract-item]
  978. [[SafeCast-toUint8-uint256-]]
  979. ==== `[.contract-item-name]#++toUint8++#++(uint256 value) → uint8++` [.item-kind]#internal#
  980. Returns the downcasted uint8 from uint256, reverting on
  981. overflow (when the input is greater than largest uint8).
  982. Counterpart to Solidity's `uint8` operator.
  983. Requirements:
  984. - input must fit into 8 bits
  985. _Available since v2.5._
  986. [.contract-item]
  987. [[SafeCast-toUint256-int256-]]
  988. ==== `[.contract-item-name]#++toUint256++#++(int256 value) → uint256++` [.item-kind]#internal#
  989. Converts a signed int256 into an unsigned uint256.
  990. Requirements:
  991. - input must be greater than or equal to 0.
  992. _Available since v3.0._
  993. [.contract-item]
  994. [[SafeCast-toInt248-int256-]]
  995. ==== `[.contract-item-name]#++toInt248++#++(int256 value) → int248 downcasted++` [.item-kind]#internal#
  996. Returns the downcasted int248 from int256, reverting on
  997. overflow (when the input is less than smallest int248 or
  998. greater than largest int248).
  999. Counterpart to Solidity's `int248` operator.
  1000. Requirements:
  1001. - input must fit into 248 bits
  1002. _Available since v4.7._
  1003. [.contract-item]
  1004. [[SafeCast-toInt240-int256-]]
  1005. ==== `[.contract-item-name]#++toInt240++#++(int256 value) → int240 downcasted++` [.item-kind]#internal#
  1006. Returns the downcasted int240 from int256, reverting on
  1007. overflow (when the input is less than smallest int240 or
  1008. greater than largest int240).
  1009. Counterpart to Solidity's `int240` operator.
  1010. Requirements:
  1011. - input must fit into 240 bits
  1012. _Available since v4.7._
  1013. [.contract-item]
  1014. [[SafeCast-toInt232-int256-]]
  1015. ==== `[.contract-item-name]#++toInt232++#++(int256 value) → int232 downcasted++` [.item-kind]#internal#
  1016. Returns the downcasted int232 from int256, reverting on
  1017. overflow (when the input is less than smallest int232 or
  1018. greater than largest int232).
  1019. Counterpart to Solidity's `int232` operator.
  1020. Requirements:
  1021. - input must fit into 232 bits
  1022. _Available since v4.7._
  1023. [.contract-item]
  1024. [[SafeCast-toInt224-int256-]]
  1025. ==== `[.contract-item-name]#++toInt224++#++(int256 value) → int224 downcasted++` [.item-kind]#internal#
  1026. Returns the downcasted int224 from int256, reverting on
  1027. overflow (when the input is less than smallest int224 or
  1028. greater than largest int224).
  1029. Counterpart to Solidity's `int224` operator.
  1030. Requirements:
  1031. - input must fit into 224 bits
  1032. _Available since v4.7._
  1033. [.contract-item]
  1034. [[SafeCast-toInt216-int256-]]
  1035. ==== `[.contract-item-name]#++toInt216++#++(int256 value) → int216 downcasted++` [.item-kind]#internal#
  1036. Returns the downcasted int216 from int256, reverting on
  1037. overflow (when the input is less than smallest int216 or
  1038. greater than largest int216).
  1039. Counterpart to Solidity's `int216` operator.
  1040. Requirements:
  1041. - input must fit into 216 bits
  1042. _Available since v4.7._
  1043. [.contract-item]
  1044. [[SafeCast-toInt208-int256-]]
  1045. ==== `[.contract-item-name]#++toInt208++#++(int256 value) → int208 downcasted++` [.item-kind]#internal#
  1046. Returns the downcasted int208 from int256, reverting on
  1047. overflow (when the input is less than smallest int208 or
  1048. greater than largest int208).
  1049. Counterpart to Solidity's `int208` operator.
  1050. Requirements:
  1051. - input must fit into 208 bits
  1052. _Available since v4.7._
  1053. [.contract-item]
  1054. [[SafeCast-toInt200-int256-]]
  1055. ==== `[.contract-item-name]#++toInt200++#++(int256 value) → int200 downcasted++` [.item-kind]#internal#
  1056. Returns the downcasted int200 from int256, reverting on
  1057. overflow (when the input is less than smallest int200 or
  1058. greater than largest int200).
  1059. Counterpart to Solidity's `int200` operator.
  1060. Requirements:
  1061. - input must fit into 200 bits
  1062. _Available since v4.7._
  1063. [.contract-item]
  1064. [[SafeCast-toInt192-int256-]]
  1065. ==== `[.contract-item-name]#++toInt192++#++(int256 value) → int192 downcasted++` [.item-kind]#internal#
  1066. Returns the downcasted int192 from int256, reverting on
  1067. overflow (when the input is less than smallest int192 or
  1068. greater than largest int192).
  1069. Counterpart to Solidity's `int192` operator.
  1070. Requirements:
  1071. - input must fit into 192 bits
  1072. _Available since v4.7._
  1073. [.contract-item]
  1074. [[SafeCast-toInt184-int256-]]
  1075. ==== `[.contract-item-name]#++toInt184++#++(int256 value) → int184 downcasted++` [.item-kind]#internal#
  1076. Returns the downcasted int184 from int256, reverting on
  1077. overflow (when the input is less than smallest int184 or
  1078. greater than largest int184).
  1079. Counterpart to Solidity's `int184` operator.
  1080. Requirements:
  1081. - input must fit into 184 bits
  1082. _Available since v4.7._
  1083. [.contract-item]
  1084. [[SafeCast-toInt176-int256-]]
  1085. ==== `[.contract-item-name]#++toInt176++#++(int256 value) → int176 downcasted++` [.item-kind]#internal#
  1086. Returns the downcasted int176 from int256, reverting on
  1087. overflow (when the input is less than smallest int176 or
  1088. greater than largest int176).
  1089. Counterpart to Solidity's `int176` operator.
  1090. Requirements:
  1091. - input must fit into 176 bits
  1092. _Available since v4.7._
  1093. [.contract-item]
  1094. [[SafeCast-toInt168-int256-]]
  1095. ==== `[.contract-item-name]#++toInt168++#++(int256 value) → int168 downcasted++` [.item-kind]#internal#
  1096. Returns the downcasted int168 from int256, reverting on
  1097. overflow (when the input is less than smallest int168 or
  1098. greater than largest int168).
  1099. Counterpart to Solidity's `int168` operator.
  1100. Requirements:
  1101. - input must fit into 168 bits
  1102. _Available since v4.7._
  1103. [.contract-item]
  1104. [[SafeCast-toInt160-int256-]]
  1105. ==== `[.contract-item-name]#++toInt160++#++(int256 value) → int160 downcasted++` [.item-kind]#internal#
  1106. Returns the downcasted int160 from int256, reverting on
  1107. overflow (when the input is less than smallest int160 or
  1108. greater than largest int160).
  1109. Counterpart to Solidity's `int160` operator.
  1110. Requirements:
  1111. - input must fit into 160 bits
  1112. _Available since v4.7._
  1113. [.contract-item]
  1114. [[SafeCast-toInt152-int256-]]
  1115. ==== `[.contract-item-name]#++toInt152++#++(int256 value) → int152 downcasted++` [.item-kind]#internal#
  1116. Returns the downcasted int152 from int256, reverting on
  1117. overflow (when the input is less than smallest int152 or
  1118. greater than largest int152).
  1119. Counterpart to Solidity's `int152` operator.
  1120. Requirements:
  1121. - input must fit into 152 bits
  1122. _Available since v4.7._
  1123. [.contract-item]
  1124. [[SafeCast-toInt144-int256-]]
  1125. ==== `[.contract-item-name]#++toInt144++#++(int256 value) → int144 downcasted++` [.item-kind]#internal#
  1126. Returns the downcasted int144 from int256, reverting on
  1127. overflow (when the input is less than smallest int144 or
  1128. greater than largest int144).
  1129. Counterpart to Solidity's `int144` operator.
  1130. Requirements:
  1131. - input must fit into 144 bits
  1132. _Available since v4.7._
  1133. [.contract-item]
  1134. [[SafeCast-toInt136-int256-]]
  1135. ==== `[.contract-item-name]#++toInt136++#++(int256 value) → int136 downcasted++` [.item-kind]#internal#
  1136. Returns the downcasted int136 from int256, reverting on
  1137. overflow (when the input is less than smallest int136 or
  1138. greater than largest int136).
  1139. Counterpart to Solidity's `int136` operator.
  1140. Requirements:
  1141. - input must fit into 136 bits
  1142. _Available since v4.7._
  1143. [.contract-item]
  1144. [[SafeCast-toInt128-int256-]]
  1145. ==== `[.contract-item-name]#++toInt128++#++(int256 value) → int128 downcasted++` [.item-kind]#internal#
  1146. Returns the downcasted int128 from int256, reverting on
  1147. overflow (when the input is less than smallest int128 or
  1148. greater than largest int128).
  1149. Counterpart to Solidity's `int128` operator.
  1150. Requirements:
  1151. - input must fit into 128 bits
  1152. _Available since v3.1._
  1153. [.contract-item]
  1154. [[SafeCast-toInt120-int256-]]
  1155. ==== `[.contract-item-name]#++toInt120++#++(int256 value) → int120 downcasted++` [.item-kind]#internal#
  1156. Returns the downcasted int120 from int256, reverting on
  1157. overflow (when the input is less than smallest int120 or
  1158. greater than largest int120).
  1159. Counterpart to Solidity's `int120` operator.
  1160. Requirements:
  1161. - input must fit into 120 bits
  1162. _Available since v4.7._
  1163. [.contract-item]
  1164. [[SafeCast-toInt112-int256-]]
  1165. ==== `[.contract-item-name]#++toInt112++#++(int256 value) → int112 downcasted++` [.item-kind]#internal#
  1166. Returns the downcasted int112 from int256, reverting on
  1167. overflow (when the input is less than smallest int112 or
  1168. greater than largest int112).
  1169. Counterpart to Solidity's `int112` operator.
  1170. Requirements:
  1171. - input must fit into 112 bits
  1172. _Available since v4.7._
  1173. [.contract-item]
  1174. [[SafeCast-toInt104-int256-]]
  1175. ==== `[.contract-item-name]#++toInt104++#++(int256 value) → int104 downcasted++` [.item-kind]#internal#
  1176. Returns the downcasted int104 from int256, reverting on
  1177. overflow (when the input is less than smallest int104 or
  1178. greater than largest int104).
  1179. Counterpart to Solidity's `int104` operator.
  1180. Requirements:
  1181. - input must fit into 104 bits
  1182. _Available since v4.7._
  1183. [.contract-item]
  1184. [[SafeCast-toInt96-int256-]]
  1185. ==== `[.contract-item-name]#++toInt96++#++(int256 value) → int96 downcasted++` [.item-kind]#internal#
  1186. Returns the downcasted int96 from int256, reverting on
  1187. overflow (when the input is less than smallest int96 or
  1188. greater than largest int96).
  1189. Counterpart to Solidity's `int96` operator.
  1190. Requirements:
  1191. - input must fit into 96 bits
  1192. _Available since v4.7._
  1193. [.contract-item]
  1194. [[SafeCast-toInt88-int256-]]
  1195. ==== `[.contract-item-name]#++toInt88++#++(int256 value) → int88 downcasted++` [.item-kind]#internal#
  1196. Returns the downcasted int88 from int256, reverting on
  1197. overflow (when the input is less than smallest int88 or
  1198. greater than largest int88).
  1199. Counterpart to Solidity's `int88` operator.
  1200. Requirements:
  1201. - input must fit into 88 bits
  1202. _Available since v4.7._
  1203. [.contract-item]
  1204. [[SafeCast-toInt80-int256-]]
  1205. ==== `[.contract-item-name]#++toInt80++#++(int256 value) → int80 downcasted++` [.item-kind]#internal#
  1206. Returns the downcasted int80 from int256, reverting on
  1207. overflow (when the input is less than smallest int80 or
  1208. greater than largest int80).
  1209. Counterpart to Solidity's `int80` operator.
  1210. Requirements:
  1211. - input must fit into 80 bits
  1212. _Available since v4.7._
  1213. [.contract-item]
  1214. [[SafeCast-toInt72-int256-]]
  1215. ==== `[.contract-item-name]#++toInt72++#++(int256 value) → int72 downcasted++` [.item-kind]#internal#
  1216. Returns the downcasted int72 from int256, reverting on
  1217. overflow (when the input is less than smallest int72 or
  1218. greater than largest int72).
  1219. Counterpart to Solidity's `int72` operator.
  1220. Requirements:
  1221. - input must fit into 72 bits
  1222. _Available since v4.7._
  1223. [.contract-item]
  1224. [[SafeCast-toInt64-int256-]]
  1225. ==== `[.contract-item-name]#++toInt64++#++(int256 value) → int64 downcasted++` [.item-kind]#internal#
  1226. Returns the downcasted int64 from int256, reverting on
  1227. overflow (when the input is less than smallest int64 or
  1228. greater than largest int64).
  1229. Counterpart to Solidity's `int64` operator.
  1230. Requirements:
  1231. - input must fit into 64 bits
  1232. _Available since v3.1._
  1233. [.contract-item]
  1234. [[SafeCast-toInt56-int256-]]
  1235. ==== `[.contract-item-name]#++toInt56++#++(int256 value) → int56 downcasted++` [.item-kind]#internal#
  1236. Returns the downcasted int56 from int256, reverting on
  1237. overflow (when the input is less than smallest int56 or
  1238. greater than largest int56).
  1239. Counterpart to Solidity's `int56` operator.
  1240. Requirements:
  1241. - input must fit into 56 bits
  1242. _Available since v4.7._
  1243. [.contract-item]
  1244. [[SafeCast-toInt48-int256-]]
  1245. ==== `[.contract-item-name]#++toInt48++#++(int256 value) → int48 downcasted++` [.item-kind]#internal#
  1246. Returns the downcasted int48 from int256, reverting on
  1247. overflow (when the input is less than smallest int48 or
  1248. greater than largest int48).
  1249. Counterpart to Solidity's `int48` operator.
  1250. Requirements:
  1251. - input must fit into 48 bits
  1252. _Available since v4.7._
  1253. [.contract-item]
  1254. [[SafeCast-toInt40-int256-]]
  1255. ==== `[.contract-item-name]#++toInt40++#++(int256 value) → int40 downcasted++` [.item-kind]#internal#
  1256. Returns the downcasted int40 from int256, reverting on
  1257. overflow (when the input is less than smallest int40 or
  1258. greater than largest int40).
  1259. Counterpart to Solidity's `int40` operator.
  1260. Requirements:
  1261. - input must fit into 40 bits
  1262. _Available since v4.7._
  1263. [.contract-item]
  1264. [[SafeCast-toInt32-int256-]]
  1265. ==== `[.contract-item-name]#++toInt32++#++(int256 value) → int32 downcasted++` [.item-kind]#internal#
  1266. Returns the downcasted int32 from int256, reverting on
  1267. overflow (when the input is less than smallest int32 or
  1268. greater than largest int32).
  1269. Counterpart to Solidity's `int32` operator.
  1270. Requirements:
  1271. - input must fit into 32 bits
  1272. _Available since v3.1._
  1273. [.contract-item]
  1274. [[SafeCast-toInt24-int256-]]
  1275. ==== `[.contract-item-name]#++toInt24++#++(int256 value) → int24 downcasted++` [.item-kind]#internal#
  1276. Returns the downcasted int24 from int256, reverting on
  1277. overflow (when the input is less than smallest int24 or
  1278. greater than largest int24).
  1279. Counterpart to Solidity's `int24` operator.
  1280. Requirements:
  1281. - input must fit into 24 bits
  1282. _Available since v4.7._
  1283. [.contract-item]
  1284. [[SafeCast-toInt16-int256-]]
  1285. ==== `[.contract-item-name]#++toInt16++#++(int256 value) → int16 downcasted++` [.item-kind]#internal#
  1286. Returns the downcasted int16 from int256, reverting on
  1287. overflow (when the input is less than smallest int16 or
  1288. greater than largest int16).
  1289. Counterpart to Solidity's `int16` operator.
  1290. Requirements:
  1291. - input must fit into 16 bits
  1292. _Available since v3.1._
  1293. [.contract-item]
  1294. [[SafeCast-toInt8-int256-]]
  1295. ==== `[.contract-item-name]#++toInt8++#++(int256 value) → int8 downcasted++` [.item-kind]#internal#
  1296. Returns the downcasted int8 from int256, reverting on
  1297. overflow (when the input is less than smallest int8 or
  1298. greater than largest int8).
  1299. Counterpart to Solidity's `int8` operator.
  1300. Requirements:
  1301. - input must fit into 8 bits
  1302. _Available since v3.1._
  1303. [.contract-item]
  1304. [[SafeCast-toInt256-uint256-]]
  1305. ==== `[.contract-item-name]#++toInt256++#++(uint256 value) → int256++` [.item-kind]#internal#
  1306. Converts an unsigned uint256 into a signed int256.
  1307. Requirements:
  1308. - input must be less than or equal to maxInt256.
  1309. _Available since v3.0._
  1310. :tryAdd: pass:normal[xref:#SafeMath-tryAdd-uint256-uint256-[`++tryAdd++`]]
  1311. :trySub: pass:normal[xref:#SafeMath-trySub-uint256-uint256-[`++trySub++`]]
  1312. :tryMul: pass:normal[xref:#SafeMath-tryMul-uint256-uint256-[`++tryMul++`]]
  1313. :tryDiv: pass:normal[xref:#SafeMath-tryDiv-uint256-uint256-[`++tryDiv++`]]
  1314. :tryMod: pass:normal[xref:#SafeMath-tryMod-uint256-uint256-[`++tryMod++`]]
  1315. :add: pass:normal[xref:#SafeMath-add-uint256-uint256-[`++add++`]]
  1316. :sub: pass:normal[xref:#SafeMath-sub-uint256-uint256-[`++sub++`]]
  1317. :mul: pass:normal[xref:#SafeMath-mul-uint256-uint256-[`++mul++`]]
  1318. :div: pass:normal[xref:#SafeMath-div-uint256-uint256-[`++div++`]]
  1319. :mod: pass:normal[xref:#SafeMath-mod-uint256-uint256-[`++mod++`]]
  1320. :sub: pass:normal[xref:#SafeMath-sub-uint256-uint256-string-[`++sub++`]]
  1321. :div: pass:normal[xref:#SafeMath-div-uint256-uint256-string-[`++div++`]]
  1322. :mod: pass:normal[xref:#SafeMath-mod-uint256-uint256-string-[`++mod++`]]
  1323. [.contract]
  1324. [[SafeMath]]
  1325. === `++SafeMath++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/math/SafeMath.sol[{github-icon},role=heading-link]
  1326. [.hljs-theme-light.nopadding]
  1327. ```solidity
  1328. import "@openzeppelin/contracts/utils/math/SafeMath.sol";
  1329. ```
  1330. Wrappers over Solidity's arithmetic operations.
  1331. NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
  1332. now has built in overflow checking.
  1333. [.contract-index]
  1334. .Functions
  1335. --
  1336. * {xref-SafeMath-tryAdd-uint256-uint256-}[`++tryAdd(a, b)++`]
  1337. * {xref-SafeMath-trySub-uint256-uint256-}[`++trySub(a, b)++`]
  1338. * {xref-SafeMath-tryMul-uint256-uint256-}[`++tryMul(a, b)++`]
  1339. * {xref-SafeMath-tryDiv-uint256-uint256-}[`++tryDiv(a, b)++`]
  1340. * {xref-SafeMath-tryMod-uint256-uint256-}[`++tryMod(a, b)++`]
  1341. * {xref-SafeMath-add-uint256-uint256-}[`++add(a, b)++`]
  1342. * {xref-SafeMath-sub-uint256-uint256-}[`++sub(a, b)++`]
  1343. * {xref-SafeMath-mul-uint256-uint256-}[`++mul(a, b)++`]
  1344. * {xref-SafeMath-div-uint256-uint256-}[`++div(a, b)++`]
  1345. * {xref-SafeMath-mod-uint256-uint256-}[`++mod(a, b)++`]
  1346. * {xref-SafeMath-sub-uint256-uint256-string-}[`++sub(a, b, errorMessage)++`]
  1347. * {xref-SafeMath-div-uint256-uint256-string-}[`++div(a, b, errorMessage)++`]
  1348. * {xref-SafeMath-mod-uint256-uint256-string-}[`++mod(a, b, errorMessage)++`]
  1349. --
  1350. [.contract-item]
  1351. [[SafeMath-tryAdd-uint256-uint256-]]
  1352. ==== `[.contract-item-name]#++tryAdd++#++(uint256 a, uint256 b) → bool, uint256++` [.item-kind]#internal#
  1353. Returns the addition of two unsigned integers, with an overflow flag.
  1354. _Available since v3.4._
  1355. [.contract-item]
  1356. [[SafeMath-trySub-uint256-uint256-]]
  1357. ==== `[.contract-item-name]#++trySub++#++(uint256 a, uint256 b) → bool, uint256++` [.item-kind]#internal#
  1358. Returns the subtraction of two unsigned integers, with an overflow flag.
  1359. _Available since v3.4._
  1360. [.contract-item]
  1361. [[SafeMath-tryMul-uint256-uint256-]]
  1362. ==== `[.contract-item-name]#++tryMul++#++(uint256 a, uint256 b) → bool, uint256++` [.item-kind]#internal#
  1363. Returns the multiplication of two unsigned integers, with an overflow flag.
  1364. _Available since v3.4._
  1365. [.contract-item]
  1366. [[SafeMath-tryDiv-uint256-uint256-]]
  1367. ==== `[.contract-item-name]#++tryDiv++#++(uint256 a, uint256 b) → bool, uint256++` [.item-kind]#internal#
  1368. Returns the division of two unsigned integers, with a division by zero flag.
  1369. _Available since v3.4._
  1370. [.contract-item]
  1371. [[SafeMath-tryMod-uint256-uint256-]]
  1372. ==== `[.contract-item-name]#++tryMod++#++(uint256 a, uint256 b) → bool, uint256++` [.item-kind]#internal#
  1373. Returns the remainder of dividing two unsigned integers, with a division by zero flag.
  1374. _Available since v3.4._
  1375. [.contract-item]
  1376. [[SafeMath-add-uint256-uint256-]]
  1377. ==== `[.contract-item-name]#++add++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  1378. Returns the addition of two unsigned integers, reverting on
  1379. overflow.
  1380. Counterpart to Solidity's `+` operator.
  1381. Requirements:
  1382. - Addition cannot overflow.
  1383. [.contract-item]
  1384. [[SafeMath-sub-uint256-uint256-]]
  1385. ==== `[.contract-item-name]#++sub++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  1386. Returns the subtraction of two unsigned integers, reverting on
  1387. overflow (when the result is negative).
  1388. Counterpart to Solidity's `-` operator.
  1389. Requirements:
  1390. - Subtraction cannot overflow.
  1391. [.contract-item]
  1392. [[SafeMath-mul-uint256-uint256-]]
  1393. ==== `[.contract-item-name]#++mul++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  1394. Returns the multiplication of two unsigned integers, reverting on
  1395. overflow.
  1396. Counterpart to Solidity's `*` operator.
  1397. Requirements:
  1398. - Multiplication cannot overflow.
  1399. [.contract-item]
  1400. [[SafeMath-div-uint256-uint256-]]
  1401. ==== `[.contract-item-name]#++div++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  1402. Returns the integer division of two unsigned integers, reverting on
  1403. division by zero. The result is rounded towards zero.
  1404. Counterpart to Solidity's `/` operator.
  1405. Requirements:
  1406. - The divisor cannot be zero.
  1407. [.contract-item]
  1408. [[SafeMath-mod-uint256-uint256-]]
  1409. ==== `[.contract-item-name]#++mod++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
  1410. Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
  1411. reverting when dividing by zero.
  1412. Counterpart to Solidity's `%` operator. This function uses a `revert`
  1413. opcode (which leaves remaining gas untouched) while Solidity uses an
  1414. invalid opcode to revert (consuming all remaining gas).
  1415. Requirements:
  1416. - The divisor cannot be zero.
  1417. [.contract-item]
  1418. [[SafeMath-sub-uint256-uint256-string-]]
  1419. ==== `[.contract-item-name]#++sub++#++(uint256 a, uint256 b, string errorMessage) → uint256++` [.item-kind]#internal#
  1420. Returns the subtraction of two unsigned integers, reverting with custom message on
  1421. overflow (when the result is negative).
  1422. CAUTION: This function is deprecated because it requires allocating memory for the error
  1423. message unnecessarily. For custom revert reasons use {trySub}.
  1424. Counterpart to Solidity's `-` operator.
  1425. Requirements:
  1426. - Subtraction cannot overflow.
  1427. [.contract-item]
  1428. [[SafeMath-div-uint256-uint256-string-]]
  1429. ==== `[.contract-item-name]#++div++#++(uint256 a, uint256 b, string errorMessage) → uint256++` [.item-kind]#internal#
  1430. Returns the integer division of two unsigned integers, reverting with custom message on
  1431. division by zero. The result is rounded towards zero.
  1432. Counterpart to Solidity's `/` operator. Note: this function uses a
  1433. `revert` opcode (which leaves remaining gas untouched) while Solidity
  1434. uses an invalid opcode to revert (consuming all remaining gas).
  1435. Requirements:
  1436. - The divisor cannot be zero.
  1437. [.contract-item]
  1438. [[SafeMath-mod-uint256-uint256-string-]]
  1439. ==== `[.contract-item-name]#++mod++#++(uint256 a, uint256 b, string errorMessage) → uint256++` [.item-kind]#internal#
  1440. Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
  1441. reverting with custom message when dividing by zero.
  1442. CAUTION: This function is deprecated because it requires allocating memory for the error
  1443. message unnecessarily. For custom revert reasons use {tryMod}.
  1444. Counterpart to Solidity's `%` operator. This function uses a `revert`
  1445. opcode (which leaves remaining gas untouched) while Solidity uses an
  1446. invalid opcode to revert (consuming all remaining gas).
  1447. Requirements:
  1448. - The divisor cannot be zero.
  1449. :mul: pass:normal[xref:#SignedSafeMath-mul-int256-int256-[`++mul++`]]
  1450. :div: pass:normal[xref:#SignedSafeMath-div-int256-int256-[`++div++`]]
  1451. :sub: pass:normal[xref:#SignedSafeMath-sub-int256-int256-[`++sub++`]]
  1452. :add: pass:normal[xref:#SignedSafeMath-add-int256-int256-[`++add++`]]
  1453. [.contract]
  1454. [[SignedSafeMath]]
  1455. === `++SignedSafeMath++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/math/SignedSafeMath.sol[{github-icon},role=heading-link]
  1456. [.hljs-theme-light.nopadding]
  1457. ```solidity
  1458. import "@openzeppelin/contracts/utils/math/SignedSafeMath.sol";
  1459. ```
  1460. Wrappers over Solidity's arithmetic operations.
  1461. NOTE: `SignedSafeMath` is no longer needed starting with Solidity 0.8. The compiler
  1462. now has built in overflow checking.
  1463. [.contract-index]
  1464. .Functions
  1465. --
  1466. * {xref-SignedSafeMath-mul-int256-int256-}[`++mul(a, b)++`]
  1467. * {xref-SignedSafeMath-div-int256-int256-}[`++div(a, b)++`]
  1468. * {xref-SignedSafeMath-sub-int256-int256-}[`++sub(a, b)++`]
  1469. * {xref-SignedSafeMath-add-int256-int256-}[`++add(a, b)++`]
  1470. --
  1471. [.contract-item]
  1472. [[SignedSafeMath-mul-int256-int256-]]
  1473. ==== `[.contract-item-name]#++mul++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
  1474. Returns the multiplication of two signed integers, reverting on
  1475. overflow.
  1476. Counterpart to Solidity's `*` operator.
  1477. Requirements:
  1478. - Multiplication cannot overflow.
  1479. [.contract-item]
  1480. [[SignedSafeMath-div-int256-int256-]]
  1481. ==== `[.contract-item-name]#++div++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
  1482. Returns the integer division of two signed integers. Reverts on
  1483. division by zero. The result is rounded towards zero.
  1484. Counterpart to Solidity's `/` operator.
  1485. Requirements:
  1486. - The divisor cannot be zero.
  1487. [.contract-item]
  1488. [[SignedSafeMath-sub-int256-int256-]]
  1489. ==== `[.contract-item-name]#++sub++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
  1490. Returns the subtraction of two signed integers, reverting on
  1491. overflow.
  1492. Counterpart to Solidity's `-` operator.
  1493. Requirements:
  1494. - Subtraction cannot overflow.
  1495. [.contract-item]
  1496. [[SignedSafeMath-add-int256-int256-]]
  1497. ==== `[.contract-item-name]#++add++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
  1498. Returns the addition of two signed integers, reverting on
  1499. overflow.
  1500. Counterpart to Solidity's `+` operator.
  1501. Requirements:
  1502. - Addition cannot overflow.
  1503. == Cryptography
  1504. :RecoverError: pass:normal[xref:#ECDSA-RecoverError[`++RecoverError++`]]
  1505. :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-bytes-[`++tryRecover++`]]
  1506. :recover: pass:normal[xref:#ECDSA-recover-bytes32-bytes-[`++recover++`]]
  1507. :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-bytes32-bytes32-[`++tryRecover++`]]
  1508. :recover: pass:normal[xref:#ECDSA-recover-bytes32-bytes32-bytes32-[`++recover++`]]
  1509. :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`++tryRecover++`]]
  1510. :recover: pass:normal[xref:#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`++recover++`]]
  1511. :toEthSignedMessageHash: pass:normal[xref:#ECDSA-toEthSignedMessageHash-bytes32-[`++toEthSignedMessageHash++`]]
  1512. :toEthSignedMessageHash: pass:normal[xref:#ECDSA-toEthSignedMessageHash-bytes-[`++toEthSignedMessageHash++`]]
  1513. :toTypedDataHash: pass:normal[xref:#ECDSA-toTypedDataHash-bytes32-bytes32-[`++toTypedDataHash++`]]
  1514. :toDataWithIntendedValidatorHash: pass:normal[xref:#ECDSA-toDataWithIntendedValidatorHash-address-bytes-[`++toDataWithIntendedValidatorHash++`]]
  1515. [.contract]
  1516. [[ECDSA]]
  1517. === `++ECDSA++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/cryptography/ECDSA.sol[{github-icon},role=heading-link]
  1518. [.hljs-theme-light.nopadding]
  1519. ```solidity
  1520. import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
  1521. ```
  1522. Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
  1523. These functions can be used to verify that a message was signed by the holder
  1524. of the private keys of a given address.
  1525. [.contract-index]
  1526. .Functions
  1527. --
  1528. * {xref-ECDSA-tryRecover-bytes32-bytes-}[`++tryRecover(hash, signature)++`]
  1529. * {xref-ECDSA-recover-bytes32-bytes-}[`++recover(hash, signature)++`]
  1530. * {xref-ECDSA-tryRecover-bytes32-bytes32-bytes32-}[`++tryRecover(hash, r, vs)++`]
  1531. * {xref-ECDSA-recover-bytes32-bytes32-bytes32-}[`++recover(hash, r, vs)++`]
  1532. * {xref-ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-}[`++tryRecover(hash, v, r, s)++`]
  1533. * {xref-ECDSA-recover-bytes32-uint8-bytes32-bytes32-}[`++recover(hash, v, r, s)++`]
  1534. * {xref-ECDSA-toEthSignedMessageHash-bytes32-}[`++toEthSignedMessageHash(hash)++`]
  1535. * {xref-ECDSA-toEthSignedMessageHash-bytes-}[`++toEthSignedMessageHash(s)++`]
  1536. * {xref-ECDSA-toTypedDataHash-bytes32-bytes32-}[`++toTypedDataHash(domainSeparator, structHash)++`]
  1537. * {xref-ECDSA-toDataWithIntendedValidatorHash-address-bytes-}[`++toDataWithIntendedValidatorHash(validator, data)++`]
  1538. --
  1539. [.contract-item]
  1540. [[ECDSA-tryRecover-bytes32-bytes-]]
  1541. ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, bytes signature) → address, enum ECDSA.RecoverError++` [.item-kind]#internal#
  1542. Returns the address that signed a hashed message (`hash`) with
  1543. `signature` or error string. This address can then be used for verification purposes.
  1544. The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
  1545. this function rejects them by requiring the `s` value to be in the lower
  1546. half order, and the `v` value to be either 27 or 28.
  1547. IMPORTANT: `hash` _must_ be the result of a hash operation for the
  1548. verification to be secure: it is possible to craft signatures that
  1549. recover to arbitrary addresses for non-hashed data. A safe way to ensure
  1550. this is by receiving a hash of the original message (which may otherwise
  1551. be too long), and then calling {toEthSignedMessageHash} on it.
  1552. Documentation for signature generation:
  1553. - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
  1554. - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
  1555. _Available since v4.3._
  1556. [.contract-item]
  1557. [[ECDSA-recover-bytes32-bytes-]]
  1558. ==== `[.contract-item-name]#++recover++#++(bytes32 hash, bytes signature) → address++` [.item-kind]#internal#
  1559. Returns the address that signed a hashed message (`hash`) with
  1560. `signature`. This address can then be used for verification purposes.
  1561. The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
  1562. this function rejects them by requiring the `s` value to be in the lower
  1563. half order, and the `v` value to be either 27 or 28.
  1564. IMPORTANT: `hash` _must_ be the result of a hash operation for the
  1565. verification to be secure: it is possible to craft signatures that
  1566. recover to arbitrary addresses for non-hashed data. A safe way to ensure
  1567. this is by receiving a hash of the original message (which may otherwise
  1568. be too long), and then calling {toEthSignedMessageHash} on it.
  1569. [.contract-item]
  1570. [[ECDSA-tryRecover-bytes32-bytes32-bytes32-]]
  1571. ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, bytes32 r, bytes32 vs) → address, enum ECDSA.RecoverError++` [.item-kind]#internal#
  1572. Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
  1573. See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
  1574. _Available since v4.3._
  1575. [.contract-item]
  1576. [[ECDSA-recover-bytes32-bytes32-bytes32-]]
  1577. ==== `[.contract-item-name]#++recover++#++(bytes32 hash, bytes32 r, bytes32 vs) → address++` [.item-kind]#internal#
  1578. Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
  1579. _Available since v4.2._
  1580. [.contract-item]
  1581. [[ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-]]
  1582. ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, uint8 v, bytes32 r, bytes32 s) → address, enum ECDSA.RecoverError++` [.item-kind]#internal#
  1583. Overload of {ECDSA-tryRecover} that receives the `v`,
  1584. `r` and `s` signature fields separately.
  1585. _Available since v4.3._
  1586. [.contract-item]
  1587. [[ECDSA-recover-bytes32-uint8-bytes32-bytes32-]]
  1588. ==== `[.contract-item-name]#++recover++#++(bytes32 hash, uint8 v, bytes32 r, bytes32 s) → address++` [.item-kind]#internal#
  1589. Overload of {ECDSA-recover} that receives the `v`,
  1590. `r` and `s` signature fields separately.
  1591. [.contract-item]
  1592. [[ECDSA-toEthSignedMessageHash-bytes32-]]
  1593. ==== `[.contract-item-name]#++toEthSignedMessageHash++#++(bytes32 hash) → bytes32 message++` [.item-kind]#internal#
  1594. Returns an Ethereum Signed Message, created from a `hash`. This
  1595. produces hash corresponding to the one signed with the
  1596. https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
  1597. JSON-RPC method as part of EIP-191.
  1598. See {recover}.
  1599. [.contract-item]
  1600. [[ECDSA-toEthSignedMessageHash-bytes-]]
  1601. ==== `[.contract-item-name]#++toEthSignedMessageHash++#++(bytes s) → bytes32++` [.item-kind]#internal#
  1602. Returns an Ethereum Signed Message, created from `s`. This
  1603. produces hash corresponding to the one signed with the
  1604. https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
  1605. JSON-RPC method as part of EIP-191.
  1606. See {recover}.
  1607. [.contract-item]
  1608. [[ECDSA-toTypedDataHash-bytes32-bytes32-]]
  1609. ==== `[.contract-item-name]#++toTypedDataHash++#++(bytes32 domainSeparator, bytes32 structHash) → bytes32 data++` [.item-kind]#internal#
  1610. Returns an Ethereum Signed Typed Data, created from a
  1611. `domainSeparator` and a `structHash`. This produces hash corresponding
  1612. to the one signed with the
  1613. https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
  1614. JSON-RPC method as part of EIP-712.
  1615. See {recover}.
  1616. [.contract-item]
  1617. [[ECDSA-toDataWithIntendedValidatorHash-address-bytes-]]
  1618. ==== `[.contract-item-name]#++toDataWithIntendedValidatorHash++#++(address validator, bytes data) → bytes32++` [.item-kind]#internal#
  1619. Returns an Ethereum Signed Data with intended validator, created from a
  1620. `validator` and `data` according to the version 0 of EIP-191.
  1621. See {recover}.
  1622. :isValidSignatureNow: pass:normal[xref:#SignatureChecker-isValidSignatureNow-address-bytes32-bytes-[`++isValidSignatureNow++`]]
  1623. :isValidERC1271SignatureNow: pass:normal[xref:#SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-[`++isValidERC1271SignatureNow++`]]
  1624. [.contract]
  1625. [[SignatureChecker]]
  1626. === `++SignatureChecker++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/cryptography/SignatureChecker.sol[{github-icon},role=heading-link]
  1627. [.hljs-theme-light.nopadding]
  1628. ```solidity
  1629. import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
  1630. ```
  1631. Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
  1632. signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like
  1633. Argent and Gnosis Safe.
  1634. _Available since v4.1._
  1635. [.contract-index]
  1636. .Functions
  1637. --
  1638. * {xref-SignatureChecker-isValidSignatureNow-address-bytes32-bytes-}[`++isValidSignatureNow(signer, hash, signature)++`]
  1639. * {xref-SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-}[`++isValidERC1271SignatureNow(signer, hash, signature)++`]
  1640. --
  1641. [.contract-item]
  1642. [[SignatureChecker-isValidSignatureNow-address-bytes32-bytes-]]
  1643. ==== `[.contract-item-name]#++isValidSignatureNow++#++(address signer, bytes32 hash, bytes signature) → bool++` [.item-kind]#internal#
  1644. Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
  1645. signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.
  1646. NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
  1647. change through time. It could return true at block N and false at block N+1 (or the opposite).
  1648. [.contract-item]
  1649. [[SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-]]
  1650. ==== `[.contract-item-name]#++isValidERC1271SignatureNow++#++(address signer, bytes32 hash, bytes signature) → bool++` [.item-kind]#internal#
  1651. Checks if a signature is valid for a given signer and data hash. The signature is validated
  1652. against the signer smart contract using ERC1271.
  1653. NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
  1654. change through time. It could return true at block N and false at block N+1 (or the opposite).
  1655. :verify: pass:normal[xref:#MerkleProof-verify-bytes32---bytes32-bytes32-[`++verify++`]]
  1656. :verifyCalldata: pass:normal[xref:#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-[`++verifyCalldata++`]]
  1657. :processProof: pass:normal[xref:#MerkleProof-processProof-bytes32---bytes32-[`++processProof++`]]
  1658. :processProofCalldata: pass:normal[xref:#MerkleProof-processProofCalldata-bytes32---bytes32-[`++processProofCalldata++`]]
  1659. :multiProofVerify: pass:normal[xref:#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---[`++multiProofVerify++`]]
  1660. :multiProofVerifyCalldata: pass:normal[xref:#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---[`++multiProofVerifyCalldata++`]]
  1661. :processMultiProof: pass:normal[xref:#MerkleProof-processMultiProof-bytes32---bool---bytes32---[`++processMultiProof++`]]
  1662. :processMultiProofCalldata: pass:normal[xref:#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---[`++processMultiProofCalldata++`]]
  1663. [.contract]
  1664. [[MerkleProof]]
  1665. === `++MerkleProof++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/cryptography/MerkleProof.sol[{github-icon},role=heading-link]
  1666. [.hljs-theme-light.nopadding]
  1667. ```solidity
  1668. import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
  1669. ```
  1670. These functions deal with verification of Merkle Tree proofs.
  1671. The tree and the proofs can be generated using our
  1672. https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
  1673. You will find a quickstart guide in the readme.
  1674. WARNING: You should avoid using leaf values that are 64 bytes long prior to
  1675. hashing, or use a hash function other than keccak256 for hashing leaves.
  1676. This is because the concatenation of a sorted pair of internal nodes in
  1677. the merkle tree could be reinterpreted as a leaf value.
  1678. OpenZeppelin's JavaScript library generates merkle trees that are safe
  1679. against this attack out of the box.
  1680. [.contract-index]
  1681. .Functions
  1682. --
  1683. * {xref-MerkleProof-verify-bytes32---bytes32-bytes32-}[`++verify(proof, root, leaf)++`]
  1684. * {xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-}[`++verifyCalldata(proof, root, leaf)++`]
  1685. * {xref-MerkleProof-processProof-bytes32---bytes32-}[`++processProof(proof, leaf)++`]
  1686. * {xref-MerkleProof-processProofCalldata-bytes32---bytes32-}[`++processProofCalldata(proof, leaf)++`]
  1687. * {xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---}[`++multiProofVerify(proof, proofFlags, root, leaves)++`]
  1688. * {xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---}[`++multiProofVerifyCalldata(proof, proofFlags, root, leaves)++`]
  1689. * {xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---}[`++processMultiProof(proof, proofFlags, leaves)++`]
  1690. * {xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---}[`++processMultiProofCalldata(proof, proofFlags, leaves)++`]
  1691. --
  1692. [.contract-item]
  1693. [[MerkleProof-verify-bytes32---bytes32-bytes32-]]
  1694. ==== `[.contract-item-name]#++verify++#++(bytes32[] proof, bytes32 root, bytes32 leaf) → bool++` [.item-kind]#internal#
  1695. Returns true if a `leaf` can be proved to be a part of a Merkle tree
  1696. defined by `root`. For this, a `proof` must be provided, containing
  1697. sibling hashes on the branch from the leaf to the root of the tree. Each
  1698. pair of leaves and each pair of pre-images are assumed to be sorted.
  1699. [.contract-item]
  1700. [[MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-]]
  1701. ==== `[.contract-item-name]#++verifyCalldata++#++(bytes32[] proof, bytes32 root, bytes32 leaf) → bool++` [.item-kind]#internal#
  1702. Calldata version of {verify}
  1703. _Available since v4.7._
  1704. [.contract-item]
  1705. [[MerkleProof-processProof-bytes32---bytes32-]]
  1706. ==== `[.contract-item-name]#++processProof++#++(bytes32[] proof, bytes32 leaf) → bytes32++` [.item-kind]#internal#
  1707. Returns the rebuilt hash obtained by traversing a Merkle tree up
  1708. from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
  1709. hash matches the root of the tree. When processing the proof, the pairs
  1710. of leafs & pre-images are assumed to be sorted.
  1711. _Available since v4.4._
  1712. [.contract-item]
  1713. [[MerkleProof-processProofCalldata-bytes32---bytes32-]]
  1714. ==== `[.contract-item-name]#++processProofCalldata++#++(bytes32[] proof, bytes32 leaf) → bytes32++` [.item-kind]#internal#
  1715. Calldata version of {processProof}
  1716. _Available since v4.7._
  1717. [.contract-item]
  1718. [[MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---]]
  1719. ==== `[.contract-item-name]#++multiProofVerify++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves) → bool++` [.item-kind]#internal#
  1720. Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
  1721. `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
  1722. CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
  1723. _Available since v4.7._
  1724. [.contract-item]
  1725. [[MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---]]
  1726. ==== `[.contract-item-name]#++multiProofVerifyCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves) → bool++` [.item-kind]#internal#
  1727. Calldata version of {multiProofVerify}
  1728. CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
  1729. _Available since v4.7._
  1730. [.contract-item]
  1731. [[MerkleProof-processMultiProof-bytes32---bool---bytes32---]]
  1732. ==== `[.contract-item-name]#++processMultiProof++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves) → bytes32 merkleRoot++` [.item-kind]#internal#
  1733. Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
  1734. proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
  1735. leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
  1736. respectively.
  1737. CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
  1738. is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
  1739. tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
  1740. _Available since v4.7._
  1741. [.contract-item]
  1742. [[MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---]]
  1743. ==== `[.contract-item-name]#++processMultiProofCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves) → bytes32 merkleRoot++` [.item-kind]#internal#
  1744. Calldata version of {processMultiProof}.
  1745. CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
  1746. _Available since v4.7._
  1747. :constructor: pass:normal[xref:#EIP712-constructor-string-string-[`++constructor++`]]
  1748. :_domainSeparatorV4: pass:normal[xref:#EIP712-_domainSeparatorV4--[`++_domainSeparatorV4++`]]
  1749. :_hashTypedDataV4: pass:normal[xref:#EIP712-_hashTypedDataV4-bytes32-[`++_hashTypedDataV4++`]]
  1750. :eip712Domain: pass:normal[xref:#EIP712-eip712Domain--[`++eip712Domain++`]]
  1751. [.contract]
  1752. [[EIP712]]
  1753. === `++EIP712++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/cryptography/EIP712.sol[{github-icon},role=heading-link]
  1754. [.hljs-theme-light.nopadding]
  1755. ```solidity
  1756. import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
  1757. ```
  1758. https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
  1759. The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
  1760. thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
  1761. they need in their contracts using a combination of `abi.encode` and `keccak256`.
  1762. This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
  1763. scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
  1764. ({_hashTypedDataV4}).
  1765. The implementation of the domain separator was designed to be as efficient as possible while still properly updating
  1766. the chain id to protect against replay attacks on an eventual fork of the chain.
  1767. NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
  1768. https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
  1769. NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
  1770. separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the
  1771. separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
  1772. _Available since v3.4._
  1773. [.contract-index]
  1774. .Functions
  1775. --
  1776. * {xref-EIP712-constructor-string-string-}[`++constructor(name, version)++`]
  1777. * {xref-EIP712-_domainSeparatorV4--}[`++_domainSeparatorV4()++`]
  1778. * {xref-EIP712-_hashTypedDataV4-bytes32-}[`++_hashTypedDataV4(structHash)++`]
  1779. * {xref-EIP712-eip712Domain--}[`++eip712Domain()++`]
  1780. [.contract-subindex-inherited]
  1781. .IERC5267
  1782. --
  1783. [.contract-index]
  1784. .Events
  1785. --
  1786. [.contract-subindex-inherited]
  1787. .IERC5267
  1788. * {xref-IERC5267-EIP712DomainChanged--}[`++EIP712DomainChanged()++`]
  1789. --
  1790. [.contract-item]
  1791. [[EIP712-constructor-string-string-]]
  1792. ==== `[.contract-item-name]#++constructor++#++(string name, string version)++` [.item-kind]#internal#
  1793. Initializes the domain separator and parameter caches.
  1794. The meaning of `name` and `version` is specified in
  1795. https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
  1796. - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
  1797. - `version`: the current major version of the signing domain.
  1798. NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
  1799. contract upgrade].
  1800. [.contract-item]
  1801. [[EIP712-_domainSeparatorV4--]]
  1802. ==== `[.contract-item-name]#++_domainSeparatorV4++#++() → bytes32++` [.item-kind]#internal#
  1803. Returns the domain separator for the current chain.
  1804. [.contract-item]
  1805. [[EIP712-_hashTypedDataV4-bytes32-]]
  1806. ==== `[.contract-item-name]#++_hashTypedDataV4++#++(bytes32 structHash) → bytes32++` [.item-kind]#internal#
  1807. Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
  1808. function returns the hash of the fully encoded EIP712 message for this domain.
  1809. This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
  1810. ```solidity
  1811. bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
  1812. keccak256("Mail(address to,string contents)"),
  1813. mailTo,
  1814. keccak256(bytes(mailContents))
  1815. )));
  1816. address signer = ECDSA.recover(digest, signature);
  1817. ```
  1818. [.contract-item]
  1819. [[EIP712-eip712Domain--]]
  1820. ==== `[.contract-item-name]#++eip712Domain++#++() → bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions++` [.item-kind]#public#
  1821. See {EIP-5267}.
  1822. _Available since v4.9._
  1823. == Escrow
  1824. :withdrawalAllowed: pass:normal[xref:#ConditionalEscrow-withdrawalAllowed-address-[`++withdrawalAllowed++`]]
  1825. :withdraw: pass:normal[xref:#ConditionalEscrow-withdraw-address-payable-[`++withdraw++`]]
  1826. [.contract]
  1827. [[ConditionalEscrow]]
  1828. === `++ConditionalEscrow++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/escrow/ConditionalEscrow.sol[{github-icon},role=heading-link]
  1829. [.hljs-theme-light.nopadding]
  1830. ```solidity
  1831. import "@openzeppelin/contracts/utils/escrow/ConditionalEscrow.sol";
  1832. ```
  1833. Base abstract escrow to only allow withdrawal if a condition is met.
  1834. Intended usage: See {Escrow}. Same usage guidelines apply here.
  1835. [.contract-index]
  1836. .Functions
  1837. --
  1838. * {xref-ConditionalEscrow-withdrawalAllowed-address-}[`++withdrawalAllowed(payee)++`]
  1839. * {xref-ConditionalEscrow-withdraw-address-payable-}[`++withdraw(payee)++`]
  1840. [.contract-subindex-inherited]
  1841. .Escrow
  1842. * {xref-Escrow-depositsOf-address-}[`++depositsOf(payee)++`]
  1843. * {xref-Escrow-deposit-address-}[`++deposit(payee)++`]
  1844. [.contract-subindex-inherited]
  1845. .Ownable
  1846. * {xref-Ownable-owner--}[`++owner()++`]
  1847. * {xref-Ownable-_checkOwner--}[`++_checkOwner()++`]
  1848. * {xref-Ownable-renounceOwnership--}[`++renounceOwnership()++`]
  1849. * {xref-Ownable-transferOwnership-address-}[`++transferOwnership(newOwner)++`]
  1850. * {xref-Ownable-_transferOwnership-address-}[`++_transferOwnership(newOwner)++`]
  1851. --
  1852. [.contract-index]
  1853. .Events
  1854. --
  1855. [.contract-subindex-inherited]
  1856. .Escrow
  1857. * {xref-Escrow-Deposited-address-uint256-}[`++Deposited(payee, weiAmount)++`]
  1858. * {xref-Escrow-Withdrawn-address-uint256-}[`++Withdrawn(payee, weiAmount)++`]
  1859. [.contract-subindex-inherited]
  1860. .Ownable
  1861. * {xref-Ownable-OwnershipTransferred-address-address-}[`++OwnershipTransferred(previousOwner, newOwner)++`]
  1862. --
  1863. [.contract-item]
  1864. [[ConditionalEscrow-withdrawalAllowed-address-]]
  1865. ==== `[.contract-item-name]#++withdrawalAllowed++#++(address payee) → bool++` [.item-kind]#public#
  1866. Returns whether an address is allowed to withdraw their funds. To be
  1867. implemented by derived contracts.
  1868. [.contract-item]
  1869. [[ConditionalEscrow-withdraw-address-payable-]]
  1870. ==== `[.contract-item-name]#++withdraw++#++(address payable payee)++` [.item-kind]#public#
  1871. Withdraw accumulated balance for a payee, forwarding all gas to the
  1872. recipient.
  1873. WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
  1874. Make sure you trust the recipient, or are either following the
  1875. checks-effects-interactions pattern or using {ReentrancyGuard}.
  1876. :Deposited: pass:normal[xref:#Escrow-Deposited-address-uint256-[`++Deposited++`]]
  1877. :Withdrawn: pass:normal[xref:#Escrow-Withdrawn-address-uint256-[`++Withdrawn++`]]
  1878. :depositsOf: pass:normal[xref:#Escrow-depositsOf-address-[`++depositsOf++`]]
  1879. :deposit: pass:normal[xref:#Escrow-deposit-address-[`++deposit++`]]
  1880. :withdraw: pass:normal[xref:#Escrow-withdraw-address-payable-[`++withdraw++`]]
  1881. [.contract]
  1882. [[Escrow]]
  1883. === `++Escrow++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/escrow/Escrow.sol[{github-icon},role=heading-link]
  1884. [.hljs-theme-light.nopadding]
  1885. ```solidity
  1886. import "@openzeppelin/contracts/utils/escrow/Escrow.sol";
  1887. ```
  1888. Base escrow contract, holds funds designated for a payee until they
  1889. withdraw them.
  1890. Intended usage: This contract (and derived escrow contracts) should be a
  1891. standalone contract, that only interacts with the contract that instantiated
  1892. it. That way, it is guaranteed that all Ether will be handled according to
  1893. the `Escrow` rules, and there is no need to check for payable functions or
  1894. transfers in the inheritance tree. The contract that uses the escrow as its
  1895. payment method should be its owner, and provide public methods redirecting
  1896. to the escrow's deposit and withdraw.
  1897. [.contract-index]
  1898. .Functions
  1899. --
  1900. * {xref-Escrow-depositsOf-address-}[`++depositsOf(payee)++`]
  1901. * {xref-Escrow-deposit-address-}[`++deposit(payee)++`]
  1902. * {xref-Escrow-withdraw-address-payable-}[`++withdraw(payee)++`]
  1903. [.contract-subindex-inherited]
  1904. .Ownable
  1905. * {xref-Ownable-owner--}[`++owner()++`]
  1906. * {xref-Ownable-_checkOwner--}[`++_checkOwner()++`]
  1907. * {xref-Ownable-renounceOwnership--}[`++renounceOwnership()++`]
  1908. * {xref-Ownable-transferOwnership-address-}[`++transferOwnership(newOwner)++`]
  1909. * {xref-Ownable-_transferOwnership-address-}[`++_transferOwnership(newOwner)++`]
  1910. --
  1911. [.contract-index]
  1912. .Events
  1913. --
  1914. * {xref-Escrow-Deposited-address-uint256-}[`++Deposited(payee, weiAmount)++`]
  1915. * {xref-Escrow-Withdrawn-address-uint256-}[`++Withdrawn(payee, weiAmount)++`]
  1916. [.contract-subindex-inherited]
  1917. .Ownable
  1918. * {xref-Ownable-OwnershipTransferred-address-address-}[`++OwnershipTransferred(previousOwner, newOwner)++`]
  1919. --
  1920. [.contract-item]
  1921. [[Escrow-depositsOf-address-]]
  1922. ==== `[.contract-item-name]#++depositsOf++#++(address payee) → uint256++` [.item-kind]#public#
  1923. [.contract-item]
  1924. [[Escrow-deposit-address-]]
  1925. ==== `[.contract-item-name]#++deposit++#++(address payee)++` [.item-kind]#public#
  1926. Stores the sent amount as credit to be withdrawn.
  1927. [.contract-item]
  1928. [[Escrow-withdraw-address-payable-]]
  1929. ==== `[.contract-item-name]#++withdraw++#++(address payable payee)++` [.item-kind]#public#
  1930. Withdraw accumulated balance for a payee, forwarding all gas to the
  1931. recipient.
  1932. WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
  1933. Make sure you trust the recipient, or are either following the
  1934. checks-effects-interactions pattern or using {ReentrancyGuard}.
  1935. [.contract-item]
  1936. [[Escrow-Deposited-address-uint256-]]
  1937. ==== `[.contract-item-name]#++Deposited++#++(address indexed payee, uint256 weiAmount)++` [.item-kind]#event#
  1938. [.contract-item]
  1939. [[Escrow-Withdrawn-address-uint256-]]
  1940. ==== `[.contract-item-name]#++Withdrawn++#++(address indexed payee, uint256 weiAmount)++` [.item-kind]#event#
  1941. :State: pass:normal[xref:#RefundEscrow-State[`++State++`]]
  1942. :RefundsClosed: pass:normal[xref:#RefundEscrow-RefundsClosed--[`++RefundsClosed++`]]
  1943. :RefundsEnabled: pass:normal[xref:#RefundEscrow-RefundsEnabled--[`++RefundsEnabled++`]]
  1944. :constructor: pass:normal[xref:#RefundEscrow-constructor-address-payable-[`++constructor++`]]
  1945. :state: pass:normal[xref:#RefundEscrow-state--[`++state++`]]
  1946. :beneficiary: pass:normal[xref:#RefundEscrow-beneficiary--[`++beneficiary++`]]
  1947. :deposit: pass:normal[xref:#RefundEscrow-deposit-address-[`++deposit++`]]
  1948. :close: pass:normal[xref:#RefundEscrow-close--[`++close++`]]
  1949. :enableRefunds: pass:normal[xref:#RefundEscrow-enableRefunds--[`++enableRefunds++`]]
  1950. :beneficiaryWithdraw: pass:normal[xref:#RefundEscrow-beneficiaryWithdraw--[`++beneficiaryWithdraw++`]]
  1951. :withdrawalAllowed: pass:normal[xref:#RefundEscrow-withdrawalAllowed-address-[`++withdrawalAllowed++`]]
  1952. [.contract]
  1953. [[RefundEscrow]]
  1954. === `++RefundEscrow++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/escrow/RefundEscrow.sol[{github-icon},role=heading-link]
  1955. [.hljs-theme-light.nopadding]
  1956. ```solidity
  1957. import "@openzeppelin/contracts/utils/escrow/RefundEscrow.sol";
  1958. ```
  1959. Escrow that holds funds for a beneficiary, deposited from multiple
  1960. parties.
  1961. Intended usage: See {Escrow}. Same usage guidelines apply here.
  1962. The owner account (that is, the contract that instantiates this
  1963. contract) may deposit, close the deposit period, and allow for either
  1964. withdrawal by the beneficiary, or refunds to the depositors. All interactions
  1965. with `RefundEscrow` will be made through the owner contract.
  1966. [.contract-index]
  1967. .Functions
  1968. --
  1969. * {xref-RefundEscrow-constructor-address-payable-}[`++constructor(beneficiary_)++`]
  1970. * {xref-RefundEscrow-state--}[`++state()++`]
  1971. * {xref-RefundEscrow-beneficiary--}[`++beneficiary()++`]
  1972. * {xref-RefundEscrow-deposit-address-}[`++deposit(refundee)++`]
  1973. * {xref-RefundEscrow-close--}[`++close()++`]
  1974. * {xref-RefundEscrow-enableRefunds--}[`++enableRefunds()++`]
  1975. * {xref-RefundEscrow-beneficiaryWithdraw--}[`++beneficiaryWithdraw()++`]
  1976. * {xref-RefundEscrow-withdrawalAllowed-address-}[`++withdrawalAllowed()++`]
  1977. [.contract-subindex-inherited]
  1978. .ConditionalEscrow
  1979. * {xref-ConditionalEscrow-withdraw-address-payable-}[`++withdraw(payee)++`]
  1980. [.contract-subindex-inherited]
  1981. .Escrow
  1982. * {xref-Escrow-depositsOf-address-}[`++depositsOf(payee)++`]
  1983. [.contract-subindex-inherited]
  1984. .Ownable
  1985. * {xref-Ownable-owner--}[`++owner()++`]
  1986. * {xref-Ownable-_checkOwner--}[`++_checkOwner()++`]
  1987. * {xref-Ownable-renounceOwnership--}[`++renounceOwnership()++`]
  1988. * {xref-Ownable-transferOwnership-address-}[`++transferOwnership(newOwner)++`]
  1989. * {xref-Ownable-_transferOwnership-address-}[`++_transferOwnership(newOwner)++`]
  1990. --
  1991. [.contract-index]
  1992. .Events
  1993. --
  1994. * {xref-RefundEscrow-RefundsClosed--}[`++RefundsClosed()++`]
  1995. * {xref-RefundEscrow-RefundsEnabled--}[`++RefundsEnabled()++`]
  1996. [.contract-subindex-inherited]
  1997. .ConditionalEscrow
  1998. [.contract-subindex-inherited]
  1999. .Escrow
  2000. * {xref-Escrow-Deposited-address-uint256-}[`++Deposited(payee, weiAmount)++`]
  2001. * {xref-Escrow-Withdrawn-address-uint256-}[`++Withdrawn(payee, weiAmount)++`]
  2002. [.contract-subindex-inherited]
  2003. .Ownable
  2004. * {xref-Ownable-OwnershipTransferred-address-address-}[`++OwnershipTransferred(previousOwner, newOwner)++`]
  2005. --
  2006. [.contract-item]
  2007. [[RefundEscrow-constructor-address-payable-]]
  2008. ==== `[.contract-item-name]#++constructor++#++(address payable beneficiary_)++` [.item-kind]#public#
  2009. Constructor.
  2010. [.contract-item]
  2011. [[RefundEscrow-state--]]
  2012. ==== `[.contract-item-name]#++state++#++() → enum RefundEscrow.State++` [.item-kind]#public#
  2013. [.contract-item]
  2014. [[RefundEscrow-beneficiary--]]
  2015. ==== `[.contract-item-name]#++beneficiary++#++() → address payable++` [.item-kind]#public#
  2016. [.contract-item]
  2017. [[RefundEscrow-deposit-address-]]
  2018. ==== `[.contract-item-name]#++deposit++#++(address refundee)++` [.item-kind]#public#
  2019. Stores funds that may later be refunded.
  2020. [.contract-item]
  2021. [[RefundEscrow-close--]]
  2022. ==== `[.contract-item-name]#++close++#++()++` [.item-kind]#public#
  2023. Allows for the beneficiary to withdraw their funds, rejecting
  2024. further deposits.
  2025. [.contract-item]
  2026. [[RefundEscrow-enableRefunds--]]
  2027. ==== `[.contract-item-name]#++enableRefunds++#++()++` [.item-kind]#public#
  2028. Allows for refunds to take place, rejecting further deposits.
  2029. [.contract-item]
  2030. [[RefundEscrow-beneficiaryWithdraw--]]
  2031. ==== `[.contract-item-name]#++beneficiaryWithdraw++#++()++` [.item-kind]#public#
  2032. Withdraws the beneficiary's funds.
  2033. [.contract-item]
  2034. [[RefundEscrow-withdrawalAllowed-address-]]
  2035. ==== `[.contract-item-name]#++withdrawalAllowed++#++(address) → bool++` [.item-kind]#public#
  2036. Returns whether refundees can withdraw their deposits (be refunded). The overridden function receives a
  2037. 'payee' argument, but we ignore it here since the condition is global, not per-payee.
  2038. [.contract-item]
  2039. [[RefundEscrow-RefundsClosed--]]
  2040. ==== `[.contract-item-name]#++RefundsClosed++#++()++` [.item-kind]#event#
  2041. [.contract-item]
  2042. [[RefundEscrow-RefundsEnabled--]]
  2043. ==== `[.contract-item-name]#++RefundsEnabled++#++()++` [.item-kind]#event#
  2044. == Introspection
  2045. 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_.
  2046. 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. `ERC20` 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.
  2047. There are two main ways to approach this.
  2048. * Locally, where a contract implements `IERC165` and declares an interface, and a second one queries it directly via `ERC165Checker`.
  2049. * Globally, where a global and unique registry (`IERC1820Registry`) is used to register implementers of a certain interface (`IERC1820Implementer`). It is then the registry that is queried, which allows for more complex setups, like contracts implementing interfaces for externally-owned accounts.
  2050. Note that, in all cases, accounts simply _declare_ their interfaces, but they are not required to actually implement them. This mechanism can therefore be used to both prevent errors and allow for complex interactions (see `ERC777`), but it must not be relied on for security.
  2051. :supportsInterface: pass:normal[xref:#IERC165-supportsInterface-bytes4-[`++supportsInterface++`]]
  2052. [.contract]
  2053. [[IERC165]]
  2054. === `++IERC165++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/introspection/IERC165.sol[{github-icon},role=heading-link]
  2055. [.hljs-theme-light.nopadding]
  2056. ```solidity
  2057. import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
  2058. ```
  2059. Interface of the ERC165 standard, as defined in the
  2060. https://eips.ethereum.org/EIPS/eip-165[EIP].
  2061. Implementers can declare support of contract interfaces, which can then be
  2062. queried by others ({ERC165Checker}).
  2063. For an implementation, see {ERC165}.
  2064. [.contract-index]
  2065. .Functions
  2066. --
  2067. * {xref-IERC165-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  2068. --
  2069. [.contract-item]
  2070. [[IERC165-supportsInterface-bytes4-]]
  2071. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#external#
  2072. Returns true if this contract implements the interface defined by
  2073. `interfaceId`. See the corresponding
  2074. https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
  2075. to learn more about how these ids are created.
  2076. This function call must use less than 30 000 gas.
  2077. :supportsInterface: pass:normal[xref:#ERC165-supportsInterface-bytes4-[`++supportsInterface++`]]
  2078. [.contract]
  2079. [[ERC165]]
  2080. === `++ERC165++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/introspection/ERC165.sol[{github-icon},role=heading-link]
  2081. [.hljs-theme-light.nopadding]
  2082. ```solidity
  2083. import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
  2084. ```
  2085. Implementation of the {IERC165} interface.
  2086. Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
  2087. for the additional interface id that will be supported. For example:
  2088. ```solidity
  2089. function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
  2090. return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
  2091. }
  2092. ```
  2093. Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
  2094. [.contract-index]
  2095. .Functions
  2096. --
  2097. * {xref-ERC165-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  2098. [.contract-subindex-inherited]
  2099. .IERC165
  2100. --
  2101. [.contract-item]
  2102. [[ERC165-supportsInterface-bytes4-]]
  2103. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#public#
  2104. See {IERC165-supportsInterface}.
  2105. :supportsInterface: pass:normal[xref:#ERC165Storage-supportsInterface-bytes4-[`++supportsInterface++`]]
  2106. :_registerInterface: pass:normal[xref:#ERC165Storage-_registerInterface-bytes4-[`++_registerInterface++`]]
  2107. [.contract]
  2108. [[ERC165Storage]]
  2109. === `++ERC165Storage++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/introspection/ERC165Storage.sol[{github-icon},role=heading-link]
  2110. [.hljs-theme-light.nopadding]
  2111. ```solidity
  2112. import "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol";
  2113. ```
  2114. Storage based implementation of the {IERC165} interface.
  2115. Contracts may inherit from this and call {_registerInterface} to declare
  2116. their support of an interface.
  2117. [.contract-index]
  2118. .Functions
  2119. --
  2120. * {xref-ERC165Storage-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  2121. * {xref-ERC165Storage-_registerInterface-bytes4-}[`++_registerInterface(interfaceId)++`]
  2122. [.contract-subindex-inherited]
  2123. .ERC165
  2124. [.contract-subindex-inherited]
  2125. .IERC165
  2126. --
  2127. [.contract-item]
  2128. [[ERC165Storage-supportsInterface-bytes4-]]
  2129. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#public#
  2130. See {IERC165-supportsInterface}.
  2131. [.contract-item]
  2132. [[ERC165Storage-_registerInterface-bytes4-]]
  2133. ==== `[.contract-item-name]#++_registerInterface++#++(bytes4 interfaceId)++` [.item-kind]#internal#
  2134. Registers the contract as an implementer of the interface defined by
  2135. `interfaceId`. Support of the actual ERC165 interface is automatic and
  2136. registering its interface id is not required.
  2137. See {IERC165-supportsInterface}.
  2138. Requirements:
  2139. - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
  2140. :supportsERC165: pass:normal[xref:#ERC165Checker-supportsERC165-address-[`++supportsERC165++`]]
  2141. :supportsInterface: pass:normal[xref:#ERC165Checker-supportsInterface-address-bytes4-[`++supportsInterface++`]]
  2142. :getSupportedInterfaces: pass:normal[xref:#ERC165Checker-getSupportedInterfaces-address-bytes4---[`++getSupportedInterfaces++`]]
  2143. :supportsAllInterfaces: pass:normal[xref:#ERC165Checker-supportsAllInterfaces-address-bytes4---[`++supportsAllInterfaces++`]]
  2144. :supportsERC165InterfaceUnchecked: pass:normal[xref:#ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-[`++supportsERC165InterfaceUnchecked++`]]
  2145. [.contract]
  2146. [[ERC165Checker]]
  2147. === `++ERC165Checker++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/introspection/ERC165Checker.sol[{github-icon},role=heading-link]
  2148. [.hljs-theme-light.nopadding]
  2149. ```solidity
  2150. import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
  2151. ```
  2152. Library used to query support of an interface declared via {IERC165}.
  2153. Note that these functions return the actual result of the query: they do not
  2154. `revert` if an interface is not supported. It is up to the caller to decide
  2155. what to do in these cases.
  2156. [.contract-index]
  2157. .Functions
  2158. --
  2159. * {xref-ERC165Checker-supportsERC165-address-}[`++supportsERC165(account)++`]
  2160. * {xref-ERC165Checker-supportsInterface-address-bytes4-}[`++supportsInterface(account, interfaceId)++`]
  2161. * {xref-ERC165Checker-getSupportedInterfaces-address-bytes4---}[`++getSupportedInterfaces(account, interfaceIds)++`]
  2162. * {xref-ERC165Checker-supportsAllInterfaces-address-bytes4---}[`++supportsAllInterfaces(account, interfaceIds)++`]
  2163. * {xref-ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-}[`++supportsERC165InterfaceUnchecked(account, interfaceId)++`]
  2164. --
  2165. [.contract-item]
  2166. [[ERC165Checker-supportsERC165-address-]]
  2167. ==== `[.contract-item-name]#++supportsERC165++#++(address account) → bool++` [.item-kind]#internal#
  2168. Returns true if `account` supports the {IERC165} interface.
  2169. [.contract-item]
  2170. [[ERC165Checker-supportsInterface-address-bytes4-]]
  2171. ==== `[.contract-item-name]#++supportsInterface++#++(address account, bytes4 interfaceId) → bool++` [.item-kind]#internal#
  2172. Returns true if `account` supports the interface defined by
  2173. `interfaceId`. Support for {IERC165} itself is queried automatically.
  2174. See {IERC165-supportsInterface}.
  2175. [.contract-item]
  2176. [[ERC165Checker-getSupportedInterfaces-address-bytes4---]]
  2177. ==== `[.contract-item-name]#++getSupportedInterfaces++#++(address account, bytes4[] interfaceIds) → bool[]++` [.item-kind]#internal#
  2178. Returns a boolean array where each value corresponds to the
  2179. interfaces passed in and whether they're supported or not. This allows
  2180. you to batch check interfaces for a contract where your expectation
  2181. is that some interfaces may not be supported.
  2182. See {IERC165-supportsInterface}.
  2183. _Available since v3.4._
  2184. [.contract-item]
  2185. [[ERC165Checker-supportsAllInterfaces-address-bytes4---]]
  2186. ==== `[.contract-item-name]#++supportsAllInterfaces++#++(address account, bytes4[] interfaceIds) → bool++` [.item-kind]#internal#
  2187. Returns true if `account` supports all the interfaces defined in
  2188. `interfaceIds`. Support for {IERC165} itself is queried automatically.
  2189. Batch-querying can lead to gas savings by skipping repeated checks for
  2190. {IERC165} support.
  2191. See {IERC165-supportsInterface}.
  2192. [.contract-item]
  2193. [[ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-]]
  2194. ==== `[.contract-item-name]#++supportsERC165InterfaceUnchecked++#++(address account, bytes4 interfaceId) → bool++` [.item-kind]#internal#
  2195. Assumes that account contains a contract that supports ERC165, otherwise
  2196. the behavior of this method is undefined. This precondition can be checked
  2197. with {supportsERC165}.
  2198. Some precompiled contracts will falsely indicate support for a given interface, so caution
  2199. should be exercised when using this function.
  2200. Interface identification is specified in ERC-165.
  2201. :InterfaceImplementerSet: pass:normal[xref:#IERC1820Registry-InterfaceImplementerSet-address-bytes32-address-[`++InterfaceImplementerSet++`]]
  2202. :ManagerChanged: pass:normal[xref:#IERC1820Registry-ManagerChanged-address-address-[`++ManagerChanged++`]]
  2203. :setManager: pass:normal[xref:#IERC1820Registry-setManager-address-address-[`++setManager++`]]
  2204. :getManager: pass:normal[xref:#IERC1820Registry-getManager-address-[`++getManager++`]]
  2205. :setInterfaceImplementer: pass:normal[xref:#IERC1820Registry-setInterfaceImplementer-address-bytes32-address-[`++setInterfaceImplementer++`]]
  2206. :getInterfaceImplementer: pass:normal[xref:#IERC1820Registry-getInterfaceImplementer-address-bytes32-[`++getInterfaceImplementer++`]]
  2207. :interfaceHash: pass:normal[xref:#IERC1820Registry-interfaceHash-string-[`++interfaceHash++`]]
  2208. :updateERC165Cache: pass:normal[xref:#IERC1820Registry-updateERC165Cache-address-bytes4-[`++updateERC165Cache++`]]
  2209. :implementsERC165Interface: pass:normal[xref:#IERC1820Registry-implementsERC165Interface-address-bytes4-[`++implementsERC165Interface++`]]
  2210. :implementsERC165InterfaceNoCache: pass:normal[xref:#IERC1820Registry-implementsERC165InterfaceNoCache-address-bytes4-[`++implementsERC165InterfaceNoCache++`]]
  2211. [.contract]
  2212. [[IERC1820Registry]]
  2213. === `++IERC1820Registry++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/introspection/IERC1820Registry.sol[{github-icon},role=heading-link]
  2214. [.hljs-theme-light.nopadding]
  2215. ```solidity
  2216. import "@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol";
  2217. ```
  2218. Interface of the global ERC1820 Registry, as defined in the
  2219. https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register
  2220. implementers for interfaces in this registry, as well as query support.
  2221. Implementers may be shared by multiple accounts, and can also implement more
  2222. than a single interface for each account. Contracts can implement interfaces
  2223. for themselves, but externally-owned accounts (EOA) must delegate this to a
  2224. contract.
  2225. {IERC165} interfaces can also be queried via the registry.
  2226. For an in-depth explanation and source code analysis, see the EIP text.
  2227. [.contract-index]
  2228. .Functions
  2229. --
  2230. * {xref-IERC1820Registry-setManager-address-address-}[`++setManager(account, newManager)++`]
  2231. * {xref-IERC1820Registry-getManager-address-}[`++getManager(account)++`]
  2232. * {xref-IERC1820Registry-setInterfaceImplementer-address-bytes32-address-}[`++setInterfaceImplementer(account, _interfaceHash, implementer)++`]
  2233. * {xref-IERC1820Registry-getInterfaceImplementer-address-bytes32-}[`++getInterfaceImplementer(account, _interfaceHash)++`]
  2234. * {xref-IERC1820Registry-interfaceHash-string-}[`++interfaceHash(interfaceName)++`]
  2235. * {xref-IERC1820Registry-updateERC165Cache-address-bytes4-}[`++updateERC165Cache(account, interfaceId)++`]
  2236. * {xref-IERC1820Registry-implementsERC165Interface-address-bytes4-}[`++implementsERC165Interface(account, interfaceId)++`]
  2237. * {xref-IERC1820Registry-implementsERC165InterfaceNoCache-address-bytes4-}[`++implementsERC165InterfaceNoCache(account, interfaceId)++`]
  2238. --
  2239. [.contract-index]
  2240. .Events
  2241. --
  2242. * {xref-IERC1820Registry-InterfaceImplementerSet-address-bytes32-address-}[`++InterfaceImplementerSet(account, interfaceHash, implementer)++`]
  2243. * {xref-IERC1820Registry-ManagerChanged-address-address-}[`++ManagerChanged(account, newManager)++`]
  2244. --
  2245. [.contract-item]
  2246. [[IERC1820Registry-setManager-address-address-]]
  2247. ==== `[.contract-item-name]#++setManager++#++(address account, address newManager)++` [.item-kind]#external#
  2248. Sets `newManager` as the manager for `account`. A manager of an
  2249. account is able to set interface implementers for it.
  2250. By default, each account is its own manager. Passing a value of `0x0` in
  2251. `newManager` will reset the manager to this initial state.
  2252. Emits a {ManagerChanged} event.
  2253. Requirements:
  2254. - the caller must be the current manager for `account`.
  2255. [.contract-item]
  2256. [[IERC1820Registry-getManager-address-]]
  2257. ==== `[.contract-item-name]#++getManager++#++(address account) → address++` [.item-kind]#external#
  2258. Returns the manager for `account`.
  2259. See {setManager}.
  2260. [.contract-item]
  2261. [[IERC1820Registry-setInterfaceImplementer-address-bytes32-address-]]
  2262. ==== `[.contract-item-name]#++setInterfaceImplementer++#++(address account, bytes32 _interfaceHash, address implementer)++` [.item-kind]#external#
  2263. Sets the `implementer` contract as ``account``'s implementer for
  2264. `interfaceHash`.
  2265. `account` being the zero address is an alias for the caller's address.
  2266. The zero address can also be used in `implementer` to remove an old one.
  2267. See {interfaceHash} to learn how these are created.
  2268. Emits an {InterfaceImplementerSet} event.
  2269. Requirements:
  2270. - the caller must be the current manager for `account`.
  2271. - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not
  2272. end in 28 zeroes).
  2273. - `implementer` must implement {IERC1820Implementer} and return true when
  2274. queried for support, unless `implementer` is the caller. See
  2275. {IERC1820Implementer-canImplementInterfaceForAddress}.
  2276. [.contract-item]
  2277. [[IERC1820Registry-getInterfaceImplementer-address-bytes32-]]
  2278. ==== `[.contract-item-name]#++getInterfaceImplementer++#++(address account, bytes32 _interfaceHash) → address++` [.item-kind]#external#
  2279. Returns the implementer of `interfaceHash` for `account`. If no such
  2280. implementer is registered, returns the zero address.
  2281. If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28
  2282. zeroes), `account` will be queried for support of it.
  2283. `account` being the zero address is an alias for the caller's address.
  2284. [.contract-item]
  2285. [[IERC1820Registry-interfaceHash-string-]]
  2286. ==== `[.contract-item-name]#++interfaceHash++#++(string interfaceName) → bytes32++` [.item-kind]#external#
  2287. Returns the interface hash for an `interfaceName`, as defined in the
  2288. corresponding
  2289. https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP].
  2290. [.contract-item]
  2291. [[IERC1820Registry-updateERC165Cache-address-bytes4-]]
  2292. ==== `[.contract-item-name]#++updateERC165Cache++#++(address account, bytes4 interfaceId)++` [.item-kind]#external#
  2293. [.contract-item]
  2294. [[IERC1820Registry-implementsERC165Interface-address-bytes4-]]
  2295. ==== `[.contract-item-name]#++implementsERC165Interface++#++(address account, bytes4 interfaceId) → bool++` [.item-kind]#external#
  2296. [.contract-item]
  2297. [[IERC1820Registry-implementsERC165InterfaceNoCache-address-bytes4-]]
  2298. ==== `[.contract-item-name]#++implementsERC165InterfaceNoCache++#++(address account, bytes4 interfaceId) → bool++` [.item-kind]#external#
  2299. [.contract-item]
  2300. [[IERC1820Registry-InterfaceImplementerSet-address-bytes32-address-]]
  2301. ==== `[.contract-item-name]#++InterfaceImplementerSet++#++(address indexed account, bytes32 indexed interfaceHash, address indexed implementer)++` [.item-kind]#event#
  2302. [.contract-item]
  2303. [[IERC1820Registry-ManagerChanged-address-address-]]
  2304. ==== `[.contract-item-name]#++ManagerChanged++#++(address indexed account, address indexed newManager)++` [.item-kind]#event#
  2305. :canImplementInterfaceForAddress: pass:normal[xref:#IERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-[`++canImplementInterfaceForAddress++`]]
  2306. [.contract]
  2307. [[IERC1820Implementer]]
  2308. === `++IERC1820Implementer++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/introspection/IERC1820Implementer.sol[{github-icon},role=heading-link]
  2309. [.hljs-theme-light.nopadding]
  2310. ```solidity
  2311. import "@openzeppelin/contracts/utils/introspection/IERC1820Implementer.sol";
  2312. ```
  2313. Interface for an ERC1820 implementer, as defined in the
  2314. https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP].
  2315. Used by contracts that will be registered as implementers in the
  2316. {IERC1820Registry}.
  2317. [.contract-index]
  2318. .Functions
  2319. --
  2320. * {xref-IERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-}[`++canImplementInterfaceForAddress(interfaceHash, account)++`]
  2321. --
  2322. [.contract-item]
  2323. [[IERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-]]
  2324. ==== `[.contract-item-name]#++canImplementInterfaceForAddress++#++(bytes32 interfaceHash, address account) → bytes32++` [.item-kind]#external#
  2325. Returns a special value (`ERC1820_ACCEPT_MAGIC`) if this contract
  2326. implements `interfaceHash` for `account`.
  2327. See {IERC1820Registry-setInterfaceImplementer}.
  2328. :canImplementInterfaceForAddress: pass:normal[xref:#ERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-[`++canImplementInterfaceForAddress++`]]
  2329. :_registerInterfaceForAddress: pass:normal[xref:#ERC1820Implementer-_registerInterfaceForAddress-bytes32-address-[`++_registerInterfaceForAddress++`]]
  2330. [.contract]
  2331. [[ERC1820Implementer]]
  2332. === `++ERC1820Implementer++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/introspection/ERC1820Implementer.sol[{github-icon},role=heading-link]
  2333. [.hljs-theme-light.nopadding]
  2334. ```solidity
  2335. import "@openzeppelin/contracts/utils/introspection/ERC1820Implementer.sol";
  2336. ```
  2337. Implementation of the {IERC1820Implementer} interface.
  2338. Contracts may inherit from this and call {_registerInterfaceForAddress} to
  2339. declare their willingness to be implementers.
  2340. {IERC1820Registry-setInterfaceImplementer} should then be called for the
  2341. registration to be complete.
  2342. CAUTION: This file is deprecated as of v4.9 and will be removed in the next major release.
  2343. [.contract-index]
  2344. .Functions
  2345. --
  2346. * {xref-ERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-}[`++canImplementInterfaceForAddress(interfaceHash, account)++`]
  2347. * {xref-ERC1820Implementer-_registerInterfaceForAddress-bytes32-address-}[`++_registerInterfaceForAddress(interfaceHash, account)++`]
  2348. [.contract-subindex-inherited]
  2349. .IERC1820Implementer
  2350. --
  2351. [.contract-item]
  2352. [[ERC1820Implementer-canImplementInterfaceForAddress-bytes32-address-]]
  2353. ==== `[.contract-item-name]#++canImplementInterfaceForAddress++#++(bytes32 interfaceHash, address account) → bytes32++` [.item-kind]#public#
  2354. See {IERC1820Implementer-canImplementInterfaceForAddress}.
  2355. [.contract-item]
  2356. [[ERC1820Implementer-_registerInterfaceForAddress-bytes32-address-]]
  2357. ==== `[.contract-item-name]#++_registerInterfaceForAddress++#++(bytes32 interfaceHash, address account)++` [.item-kind]#internal#
  2358. Declares the contract as willing to be an implementer of
  2359. `interfaceHash` for `account`.
  2360. See {IERC1820Registry-setInterfaceImplementer} and
  2361. {IERC1820Registry-interfaceHash}.
  2362. == Data Structures
  2363. :BitMap: pass:normal[xref:#BitMaps-BitMap[`++BitMap++`]]
  2364. :get: pass:normal[xref:#BitMaps-get-struct-BitMaps-BitMap-uint256-[`++get++`]]
  2365. :setTo: pass:normal[xref:#BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-[`++setTo++`]]
  2366. :set: pass:normal[xref:#BitMaps-set-struct-BitMaps-BitMap-uint256-[`++set++`]]
  2367. :unset: pass:normal[xref:#BitMaps-unset-struct-BitMaps-BitMap-uint256-[`++unset++`]]
  2368. [.contract]
  2369. [[BitMaps]]
  2370. === `++BitMaps++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/structs/BitMaps.sol[{github-icon},role=heading-link]
  2371. [.hljs-theme-light.nopadding]
  2372. ```solidity
  2373. import "@openzeppelin/contracts/utils/structs/BitMaps.sol";
  2374. ```
  2375. Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential.
  2376. Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].
  2377. [.contract-index]
  2378. .Functions
  2379. --
  2380. * {xref-BitMaps-get-struct-BitMaps-BitMap-uint256-}[`++get(bitmap, index)++`]
  2381. * {xref-BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-}[`++setTo(bitmap, index, value)++`]
  2382. * {xref-BitMaps-set-struct-BitMaps-BitMap-uint256-}[`++set(bitmap, index)++`]
  2383. * {xref-BitMaps-unset-struct-BitMaps-BitMap-uint256-}[`++unset(bitmap, index)++`]
  2384. --
  2385. [.contract-item]
  2386. [[BitMaps-get-struct-BitMaps-BitMap-uint256-]]
  2387. ==== `[.contract-item-name]#++get++#++(struct BitMaps.BitMap bitmap, uint256 index) → bool++` [.item-kind]#internal#
  2388. Returns whether the bit at `index` is set.
  2389. [.contract-item]
  2390. [[BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-]]
  2391. ==== `[.contract-item-name]#++setTo++#++(struct BitMaps.BitMap bitmap, uint256 index, bool value)++` [.item-kind]#internal#
  2392. Sets the bit at `index` to the boolean `value`.
  2393. [.contract-item]
  2394. [[BitMaps-set-struct-BitMaps-BitMap-uint256-]]
  2395. ==== `[.contract-item-name]#++set++#++(struct BitMaps.BitMap bitmap, uint256 index)++` [.item-kind]#internal#
  2396. Sets the bit at `index`.
  2397. [.contract-item]
  2398. [[BitMaps-unset-struct-BitMaps-BitMap-uint256-]]
  2399. ==== `[.contract-item-name]#++unset++#++(struct BitMaps.BitMap bitmap, uint256 index)++` [.item-kind]#internal#
  2400. Unsets the bit at `index`.
  2401. :Bytes32ToBytes32Map: pass:normal[xref:#EnumerableMap-Bytes32ToBytes32Map[`++Bytes32ToBytes32Map++`]]
  2402. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-[`++set++`]]
  2403. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++remove++`]]
  2404. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++contains++`]]
  2405. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-[`++length++`]]
  2406. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-[`++at++`]]
  2407. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++tryGet++`]]
  2408. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++get++`]]
  2409. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-string-[`++get++`]]
  2410. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-[`++keys++`]]
  2411. :UintToUintMap: pass:normal[xref:#EnumerableMap-UintToUintMap[`++UintToUintMap++`]]
  2412. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-[`++set++`]]
  2413. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-[`++remove++`]]
  2414. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-[`++contains++`]]
  2415. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToUintMap-[`++length++`]]
  2416. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-[`++at++`]]
  2417. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-[`++tryGet++`]]
  2418. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-[`++get++`]]
  2419. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-string-[`++get++`]]
  2420. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-[`++keys++`]]
  2421. :UintToAddressMap: pass:normal[xref:#EnumerableMap-UintToAddressMap[`++UintToAddressMap++`]]
  2422. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-[`++set++`]]
  2423. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-[`++remove++`]]
  2424. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-[`++contains++`]]
  2425. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-[`++length++`]]
  2426. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-[`++at++`]]
  2427. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-[`++tryGet++`]]
  2428. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-[`++get++`]]
  2429. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-string-[`++get++`]]
  2430. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-[`++keys++`]]
  2431. :AddressToUintMap: pass:normal[xref:#EnumerableMap-AddressToUintMap[`++AddressToUintMap++`]]
  2432. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-[`++set++`]]
  2433. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-[`++remove++`]]
  2434. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-[`++contains++`]]
  2435. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-[`++length++`]]
  2436. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-[`++at++`]]
  2437. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-[`++tryGet++`]]
  2438. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-[`++get++`]]
  2439. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-string-[`++get++`]]
  2440. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-[`++keys++`]]
  2441. :Bytes32ToUintMap: pass:normal[xref:#EnumerableMap-Bytes32ToUintMap[`++Bytes32ToUintMap++`]]
  2442. :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-[`++set++`]]
  2443. :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++remove++`]]
  2444. :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++contains++`]]
  2445. :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-[`++length++`]]
  2446. :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-[`++at++`]]
  2447. :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++tryGet++`]]
  2448. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++get++`]]
  2449. :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-string-[`++get++`]]
  2450. :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-[`++keys++`]]
  2451. [.contract]
  2452. [[EnumerableMap]]
  2453. === `++EnumerableMap++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/structs/EnumerableMap.sol[{github-icon},role=heading-link]
  2454. [.hljs-theme-light.nopadding]
  2455. ```solidity
  2456. import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol";
  2457. ```
  2458. Library for managing an enumerable variant of Solidity's
  2459. https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
  2460. type.
  2461. Maps have the following properties:
  2462. - Entries are added, removed, and checked for existence in constant time
  2463. (O(1)).
  2464. - Entries are enumerated in O(n). No guarantees are made on the ordering.
  2465. ```solidity
  2466. contract Example {
  2467. // Add the library methods
  2468. using EnumerableMap for EnumerableMap.UintToAddressMap;
  2469. // Declare a set state variable
  2470. EnumerableMap.UintToAddressMap private myMap;
  2471. }
  2472. ```
  2473. The following map types are supported:
  2474. - `uint256 -> address` (`UintToAddressMap`) since v3.0.0
  2475. - `address -> uint256` (`AddressToUintMap`) since v4.6.0
  2476. - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0
  2477. - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0
  2478. - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0
  2479. [WARNING]
  2480. ====
  2481. Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
  2482. unusable.
  2483. See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
  2484. In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an
  2485. array of EnumerableMap.
  2486. ====
  2487. [.contract-index]
  2488. .Functions
  2489. --
  2490. * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-}[`++set(map, key, value)++`]
  2491. * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++remove(map, key)++`]
  2492. * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++contains(map, key)++`]
  2493. * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-}[`++length(map)++`]
  2494. * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-}[`++at(map, index)++`]
  2495. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++tryGet(map, key)++`]
  2496. * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++get(map, key)++`]
  2497. * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-string-}[`++get(map, key, errorMessage)++`]
  2498. * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-}[`++keys(map)++`]
  2499. * {xref-EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-}[`++set(map, key, value)++`]
  2500. * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-}[`++remove(map, key)++`]
  2501. * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-}[`++contains(map, key)++`]
  2502. * {xref-EnumerableMap-length-struct-EnumerableMap-UintToUintMap-}[`++length(map)++`]
  2503. * {xref-EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-}[`++at(map, index)++`]
  2504. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-}[`++tryGet(map, key)++`]
  2505. * {xref-EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-}[`++get(map, key)++`]
  2506. * {xref-EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-string-}[`++get(map, key, errorMessage)++`]
  2507. * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-}[`++keys(map)++`]
  2508. * {xref-EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-}[`++set(map, key, value)++`]
  2509. * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-}[`++remove(map, key)++`]
  2510. * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-}[`++contains(map, key)++`]
  2511. * {xref-EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-}[`++length(map)++`]
  2512. * {xref-EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-}[`++at(map, index)++`]
  2513. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-}[`++tryGet(map, key)++`]
  2514. * {xref-EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-}[`++get(map, key)++`]
  2515. * {xref-EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-string-}[`++get(map, key, errorMessage)++`]
  2516. * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-}[`++keys(map)++`]
  2517. * {xref-EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-}[`++set(map, key, value)++`]
  2518. * {xref-EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-}[`++remove(map, key)++`]
  2519. * {xref-EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-}[`++contains(map, key)++`]
  2520. * {xref-EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-}[`++length(map)++`]
  2521. * {xref-EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-}[`++at(map, index)++`]
  2522. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-}[`++tryGet(map, key)++`]
  2523. * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-}[`++get(map, key)++`]
  2524. * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-string-}[`++get(map, key, errorMessage)++`]
  2525. * {xref-EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-}[`++keys(map)++`]
  2526. * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-}[`++set(map, key, value)++`]
  2527. * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++remove(map, key)++`]
  2528. * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++contains(map, key)++`]
  2529. * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-}[`++length(map)++`]
  2530. * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-}[`++at(map, index)++`]
  2531. * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++tryGet(map, key)++`]
  2532. * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++get(map, key)++`]
  2533. * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-string-}[`++get(map, key, errorMessage)++`]
  2534. * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-}[`++keys(map)++`]
  2535. --
  2536. [.contract-item]
  2537. [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-]]
  2538. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key, bytes32 value) → bool++` [.item-kind]#internal#
  2539. Adds a key-value pair to a map, or updates the value for an existing
  2540. key. O(1).
  2541. Returns true if the key was added to the map, that is if it was not
  2542. already present.
  2543. [.contract-item]
  2544. [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  2545. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bool++` [.item-kind]#internal#
  2546. Removes a key-value pair from a map. O(1).
  2547. Returns true if the key was removed from the map, that is if it was present.
  2548. [.contract-item]
  2549. [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  2550. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bool++` [.item-kind]#internal#
  2551. Returns true if the key is in the map. O(1).
  2552. [.contract-item]
  2553. [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-]]
  2554. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToBytes32Map map) → uint256++` [.item-kind]#internal#
  2555. Returns the number of key-value pairs in the map. O(1).
  2556. [.contract-item]
  2557. [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-]]
  2558. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToBytes32Map map, uint256 index) → bytes32, bytes32++` [.item-kind]#internal#
  2559. Returns the key-value pair stored at position `index` in the map. O(1).
  2560. Note that there are no guarantees on the ordering of entries inside the
  2561. array, and it may change when more entries are added or removed.
  2562. Requirements:
  2563. - `index` must be strictly less than {length}.
  2564. [.contract-item]
  2565. [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  2566. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bool, bytes32++` [.item-kind]#internal#
  2567. Tries to returns the value associated with `key`. O(1).
  2568. Does not revert if `key` is not in the map.
  2569. [.contract-item]
  2570. [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
  2571. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bytes32++` [.item-kind]#internal#
  2572. Returns the value associated with `key`. O(1).
  2573. Requirements:
  2574. - `key` must be in the map.
  2575. [.contract-item]
  2576. [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-string-]]
  2577. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key, string errorMessage) → bytes32++` [.item-kind]#internal#
  2578. Same as {get}, with a custom error message when `key` is not in the map.
  2579. CAUTION: This function is deprecated because it requires allocating memory for the error
  2580. message unnecessarily. For custom revert reasons use {tryGet}.
  2581. [.contract-item]
  2582. [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-]]
  2583. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToBytes32Map map) → bytes32[]++` [.item-kind]#internal#
  2584. Return the an array containing all the keys
  2585. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  2586. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  2587. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  2588. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  2589. [.contract-item]
  2590. [[EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-]]
  2591. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToUintMap map, uint256 key, uint256 value) → bool++` [.item-kind]#internal#
  2592. Adds a key-value pair to a map, or updates the value for an existing
  2593. key. O(1).
  2594. Returns true if the key was added to the map, that is if it was not
  2595. already present.
  2596. [.contract-item]
  2597. [[EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-]]
  2598. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → bool++` [.item-kind]#internal#
  2599. Removes a value from a map. O(1).
  2600. Returns true if the key was removed from the map, that is if it was present.
  2601. [.contract-item]
  2602. [[EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-]]
  2603. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → bool++` [.item-kind]#internal#
  2604. Returns true if the key is in the map. O(1).
  2605. [.contract-item]
  2606. [[EnumerableMap-length-struct-EnumerableMap-UintToUintMap-]]
  2607. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToUintMap map) → uint256++` [.item-kind]#internal#
  2608. Returns the number of elements in the map. O(1).
  2609. [.contract-item]
  2610. [[EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-]]
  2611. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToUintMap map, uint256 index) → uint256, uint256++` [.item-kind]#internal#
  2612. Returns the element stored at position `index` in the map. O(1).
  2613. Note that there are no guarantees on the ordering of values inside the
  2614. array, and it may change when more values are added or removed.
  2615. Requirements:
  2616. - `index` must be strictly less than {length}.
  2617. [.contract-item]
  2618. [[EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-]]
  2619. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → bool, uint256++` [.item-kind]#internal#
  2620. Tries to returns the value associated with `key`. O(1).
  2621. Does not revert if `key` is not in the map.
  2622. [.contract-item]
  2623. [[EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-]]
  2624. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → uint256++` [.item-kind]#internal#
  2625. Returns the value associated with `key`. O(1).
  2626. Requirements:
  2627. - `key` must be in the map.
  2628. [.contract-item]
  2629. [[EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-string-]]
  2630. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToUintMap map, uint256 key, string errorMessage) → uint256++` [.item-kind]#internal#
  2631. Same as {get}, with a custom error message when `key` is not in the map.
  2632. CAUTION: This function is deprecated because it requires allocating memory for the error
  2633. message unnecessarily. For custom revert reasons use {tryGet}.
  2634. [.contract-item]
  2635. [[EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-]]
  2636. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToUintMap map) → uint256[]++` [.item-kind]#internal#
  2637. Return the an array containing all the keys
  2638. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  2639. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  2640. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  2641. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  2642. [.contract-item]
  2643. [[EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-]]
  2644. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToAddressMap map, uint256 key, address value) → bool++` [.item-kind]#internal#
  2645. Adds a key-value pair to a map, or updates the value for an existing
  2646. key. O(1).
  2647. Returns true if the key was added to the map, that is if it was not
  2648. already present.
  2649. [.contract-item]
  2650. [[EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-]]
  2651. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → bool++` [.item-kind]#internal#
  2652. Removes a value from a map. O(1).
  2653. Returns true if the key was removed from the map, that is if it was present.
  2654. [.contract-item]
  2655. [[EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-]]
  2656. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → bool++` [.item-kind]#internal#
  2657. Returns true if the key is in the map. O(1).
  2658. [.contract-item]
  2659. [[EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-]]
  2660. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToAddressMap map) → uint256++` [.item-kind]#internal#
  2661. Returns the number of elements in the map. O(1).
  2662. [.contract-item]
  2663. [[EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-]]
  2664. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToAddressMap map, uint256 index) → uint256, address++` [.item-kind]#internal#
  2665. Returns the element stored at position `index` in the map. O(1).
  2666. Note that there are no guarantees on the ordering of values inside the
  2667. array, and it may change when more values are added or removed.
  2668. Requirements:
  2669. - `index` must be strictly less than {length}.
  2670. [.contract-item]
  2671. [[EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-]]
  2672. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → bool, address++` [.item-kind]#internal#
  2673. Tries to returns the value associated with `key`. O(1).
  2674. Does not revert if `key` is not in the map.
  2675. [.contract-item]
  2676. [[EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-]]
  2677. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → address++` [.item-kind]#internal#
  2678. Returns the value associated with `key`. O(1).
  2679. Requirements:
  2680. - `key` must be in the map.
  2681. [.contract-item]
  2682. [[EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-string-]]
  2683. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToAddressMap map, uint256 key, string errorMessage) → address++` [.item-kind]#internal#
  2684. Same as {get}, with a custom error message when `key` is not in the map.
  2685. CAUTION: This function is deprecated because it requires allocating memory for the error
  2686. message unnecessarily. For custom revert reasons use {tryGet}.
  2687. [.contract-item]
  2688. [[EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-]]
  2689. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToAddressMap map) → uint256[]++` [.item-kind]#internal#
  2690. Return the an array containing all the keys
  2691. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  2692. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  2693. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  2694. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  2695. [.contract-item]
  2696. [[EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-]]
  2697. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.AddressToUintMap map, address key, uint256 value) → bool++` [.item-kind]#internal#
  2698. Adds a key-value pair to a map, or updates the value for an existing
  2699. key. O(1).
  2700. Returns true if the key was added to the map, that is if it was not
  2701. already present.
  2702. [.contract-item]
  2703. [[EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-]]
  2704. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.AddressToUintMap map, address key) → bool++` [.item-kind]#internal#
  2705. Removes a value from a map. O(1).
  2706. Returns true if the key was removed from the map, that is if it was present.
  2707. [.contract-item]
  2708. [[EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-]]
  2709. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.AddressToUintMap map, address key) → bool++` [.item-kind]#internal#
  2710. Returns true if the key is in the map. O(1).
  2711. [.contract-item]
  2712. [[EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-]]
  2713. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.AddressToUintMap map) → uint256++` [.item-kind]#internal#
  2714. Returns the number of elements in the map. O(1).
  2715. [.contract-item]
  2716. [[EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-]]
  2717. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.AddressToUintMap map, uint256 index) → address, uint256++` [.item-kind]#internal#
  2718. Returns the element stored at position `index` in the map. O(1).
  2719. Note that there are no guarantees on the ordering of values inside the
  2720. array, and it may change when more values are added or removed.
  2721. Requirements:
  2722. - `index` must be strictly less than {length}.
  2723. [.contract-item]
  2724. [[EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-]]
  2725. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.AddressToUintMap map, address key) → bool, uint256++` [.item-kind]#internal#
  2726. Tries to returns the value associated with `key`. O(1).
  2727. Does not revert if `key` is not in the map.
  2728. [.contract-item]
  2729. [[EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-]]
  2730. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToUintMap map, address key) → uint256++` [.item-kind]#internal#
  2731. Returns the value associated with `key`. O(1).
  2732. Requirements:
  2733. - `key` must be in the map.
  2734. [.contract-item]
  2735. [[EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-string-]]
  2736. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToUintMap map, address key, string errorMessage) → uint256++` [.item-kind]#internal#
  2737. Same as {get}, with a custom error message when `key` is not in the map.
  2738. CAUTION: This function is deprecated because it requires allocating memory for the error
  2739. message unnecessarily. For custom revert reasons use {tryGet}.
  2740. [.contract-item]
  2741. [[EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-]]
  2742. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.AddressToUintMap map) → address[]++` [.item-kind]#internal#
  2743. Return the an array containing all the keys
  2744. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  2745. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  2746. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  2747. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  2748. [.contract-item]
  2749. [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-]]
  2750. ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key, uint256 value) → bool++` [.item-kind]#internal#
  2751. Adds a key-value pair to a map, or updates the value for an existing
  2752. key. O(1).
  2753. Returns true if the key was added to the map, that is if it was not
  2754. already present.
  2755. [.contract-item]
  2756. [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  2757. ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → bool++` [.item-kind]#internal#
  2758. Removes a value from a map. O(1).
  2759. Returns true if the key was removed from the map, that is if it was present.
  2760. [.contract-item]
  2761. [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  2762. ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → bool++` [.item-kind]#internal#
  2763. Returns true if the key is in the map. O(1).
  2764. [.contract-item]
  2765. [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-]]
  2766. ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToUintMap map) → uint256++` [.item-kind]#internal#
  2767. Returns the number of elements in the map. O(1).
  2768. [.contract-item]
  2769. [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-]]
  2770. ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToUintMap map, uint256 index) → bytes32, uint256++` [.item-kind]#internal#
  2771. Returns the element stored at position `index` in the map. O(1).
  2772. Note that there are no guarantees on the ordering of values inside the
  2773. array, and it may change when more values are added or removed.
  2774. Requirements:
  2775. - `index` must be strictly less than {length}.
  2776. [.contract-item]
  2777. [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  2778. ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → bool, uint256++` [.item-kind]#internal#
  2779. Tries to returns the value associated with `key`. O(1).
  2780. Does not revert if `key` is not in the map.
  2781. [.contract-item]
  2782. [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
  2783. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → uint256++` [.item-kind]#internal#
  2784. Returns the value associated with `key`. O(1).
  2785. Requirements:
  2786. - `key` must be in the map.
  2787. [.contract-item]
  2788. [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-string-]]
  2789. ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key, string errorMessage) → uint256++` [.item-kind]#internal#
  2790. Same as {get}, with a custom error message when `key` is not in the map.
  2791. CAUTION: This function is deprecated because it requires allocating memory for the error
  2792. message unnecessarily. For custom revert reasons use {tryGet}.
  2793. [.contract-item]
  2794. [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-]]
  2795. ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToUintMap map) → bytes32[]++` [.item-kind]#internal#
  2796. Return the an array containing all the keys
  2797. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  2798. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  2799. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  2800. uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
  2801. :Set: pass:normal[xref:#EnumerableSet-Set[`++Set++`]]
  2802. :Bytes32Set: pass:normal[xref:#EnumerableSet-Bytes32Set[`++Bytes32Set++`]]
  2803. :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-[`++add++`]]
  2804. :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-[`++remove++`]]
  2805. :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-[`++contains++`]]
  2806. :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-Bytes32Set-[`++length++`]]
  2807. :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-[`++at++`]]
  2808. :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-Bytes32Set-[`++values++`]]
  2809. :AddressSet: pass:normal[xref:#EnumerableSet-AddressSet[`++AddressSet++`]]
  2810. :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-AddressSet-address-[`++add++`]]
  2811. :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-[`++remove++`]]
  2812. :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-[`++contains++`]]
  2813. :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-AddressSet-[`++length++`]]
  2814. :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-[`++at++`]]
  2815. :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-AddressSet-[`++values++`]]
  2816. :UintSet: pass:normal[xref:#EnumerableSet-UintSet[`++UintSet++`]]
  2817. :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-[`++add++`]]
  2818. :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-[`++remove++`]]
  2819. :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-[`++contains++`]]
  2820. :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-UintSet-[`++length++`]]
  2821. :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-[`++at++`]]
  2822. :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-UintSet-[`++values++`]]
  2823. [.contract]
  2824. [[EnumerableSet]]
  2825. === `++EnumerableSet++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/structs/EnumerableSet.sol[{github-icon},role=heading-link]
  2826. [.hljs-theme-light.nopadding]
  2827. ```solidity
  2828. import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
  2829. ```
  2830. Library for managing
  2831. https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
  2832. types.
  2833. Sets have the following properties:
  2834. - Elements are added, removed, and checked for existence in constant time
  2835. (O(1)).
  2836. - Elements are enumerated in O(n). No guarantees are made on the ordering.
  2837. ```solidity
  2838. contract Example {
  2839. // Add the library methods
  2840. using EnumerableSet for EnumerableSet.AddressSet;
  2841. // Declare a set state variable
  2842. EnumerableSet.AddressSet private mySet;
  2843. }
  2844. ```
  2845. As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
  2846. and `uint256` (`UintSet`) are supported.
  2847. [WARNING]
  2848. ====
  2849. Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
  2850. unusable.
  2851. See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
  2852. In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
  2853. array of EnumerableSet.
  2854. ====
  2855. [.contract-index]
  2856. .Functions
  2857. --
  2858. * {xref-EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-}[`++add(set, value)++`]
  2859. * {xref-EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-}[`++remove(set, value)++`]
  2860. * {xref-EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-}[`++contains(set, value)++`]
  2861. * {xref-EnumerableSet-length-struct-EnumerableSet-Bytes32Set-}[`++length(set)++`]
  2862. * {xref-EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-}[`++at(set, index)++`]
  2863. * {xref-EnumerableSet-values-struct-EnumerableSet-Bytes32Set-}[`++values(set)++`]
  2864. * {xref-EnumerableSet-add-struct-EnumerableSet-AddressSet-address-}[`++add(set, value)++`]
  2865. * {xref-EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-}[`++remove(set, value)++`]
  2866. * {xref-EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-}[`++contains(set, value)++`]
  2867. * {xref-EnumerableSet-length-struct-EnumerableSet-AddressSet-}[`++length(set)++`]
  2868. * {xref-EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-}[`++at(set, index)++`]
  2869. * {xref-EnumerableSet-values-struct-EnumerableSet-AddressSet-}[`++values(set)++`]
  2870. * {xref-EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-}[`++add(set, value)++`]
  2871. * {xref-EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-}[`++remove(set, value)++`]
  2872. * {xref-EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-}[`++contains(set, value)++`]
  2873. * {xref-EnumerableSet-length-struct-EnumerableSet-UintSet-}[`++length(set)++`]
  2874. * {xref-EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-}[`++at(set, index)++`]
  2875. * {xref-EnumerableSet-values-struct-EnumerableSet-UintSet-}[`++values(set)++`]
  2876. --
  2877. [.contract-item]
  2878. [[EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-]]
  2879. ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) → bool++` [.item-kind]#internal#
  2880. Add a value to a set. O(1).
  2881. Returns true if the value was added to the set, that is if it was not
  2882. already present.
  2883. [.contract-item]
  2884. [[EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-]]
  2885. ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) → bool++` [.item-kind]#internal#
  2886. Removes a value from a set. O(1).
  2887. Returns true if the value was removed from the set, that is if it was
  2888. present.
  2889. [.contract-item]
  2890. [[EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-]]
  2891. ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) → bool++` [.item-kind]#internal#
  2892. Returns true if the value is in the set. O(1).
  2893. [.contract-item]
  2894. [[EnumerableSet-length-struct-EnumerableSet-Bytes32Set-]]
  2895. ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.Bytes32Set set) → uint256++` [.item-kind]#internal#
  2896. Returns the number of values in the set. O(1).
  2897. [.contract-item]
  2898. [[EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-]]
  2899. ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.Bytes32Set set, uint256 index) → bytes32++` [.item-kind]#internal#
  2900. Returns the value stored at position `index` in the set. O(1).
  2901. Note that there are no guarantees on the ordering of values inside the
  2902. array, and it may change when more values are added or removed.
  2903. Requirements:
  2904. - `index` must be strictly less than {length}.
  2905. [.contract-item]
  2906. [[EnumerableSet-values-struct-EnumerableSet-Bytes32Set-]]
  2907. ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.Bytes32Set set) → bytes32[]++` [.item-kind]#internal#
  2908. Return the entire set in an array
  2909. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  2910. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  2911. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  2912. uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
  2913. [.contract-item]
  2914. [[EnumerableSet-add-struct-EnumerableSet-AddressSet-address-]]
  2915. ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.AddressSet set, address value) → bool++` [.item-kind]#internal#
  2916. Add a value to a set. O(1).
  2917. Returns true if the value was added to the set, that is if it was not
  2918. already present.
  2919. [.contract-item]
  2920. [[EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-]]
  2921. ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.AddressSet set, address value) → bool++` [.item-kind]#internal#
  2922. Removes a value from a set. O(1).
  2923. Returns true if the value was removed from the set, that is if it was
  2924. present.
  2925. [.contract-item]
  2926. [[EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-]]
  2927. ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.AddressSet set, address value) → bool++` [.item-kind]#internal#
  2928. Returns true if the value is in the set. O(1).
  2929. [.contract-item]
  2930. [[EnumerableSet-length-struct-EnumerableSet-AddressSet-]]
  2931. ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.AddressSet set) → uint256++` [.item-kind]#internal#
  2932. Returns the number of values in the set. O(1).
  2933. [.contract-item]
  2934. [[EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-]]
  2935. ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.AddressSet set, uint256 index) → address++` [.item-kind]#internal#
  2936. Returns the value stored at position `index` in the set. O(1).
  2937. Note that there are no guarantees on the ordering of values inside the
  2938. array, and it may change when more values are added or removed.
  2939. Requirements:
  2940. - `index` must be strictly less than {length}.
  2941. [.contract-item]
  2942. [[EnumerableSet-values-struct-EnumerableSet-AddressSet-]]
  2943. ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.AddressSet set) → address[]++` [.item-kind]#internal#
  2944. Return the entire set in an array
  2945. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  2946. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  2947. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  2948. uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
  2949. [.contract-item]
  2950. [[EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-]]
  2951. ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.UintSet set, uint256 value) → bool++` [.item-kind]#internal#
  2952. Add a value to a set. O(1).
  2953. Returns true if the value was added to the set, that is if it was not
  2954. already present.
  2955. [.contract-item]
  2956. [[EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-]]
  2957. ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.UintSet set, uint256 value) → bool++` [.item-kind]#internal#
  2958. Removes a value from a set. O(1).
  2959. Returns true if the value was removed from the set, that is if it was
  2960. present.
  2961. [.contract-item]
  2962. [[EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-]]
  2963. ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.UintSet set, uint256 value) → bool++` [.item-kind]#internal#
  2964. Returns true if the value is in the set. O(1).
  2965. [.contract-item]
  2966. [[EnumerableSet-length-struct-EnumerableSet-UintSet-]]
  2967. ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.UintSet set) → uint256++` [.item-kind]#internal#
  2968. Returns the number of values in the set. O(1).
  2969. [.contract-item]
  2970. [[EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-]]
  2971. ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.UintSet set, uint256 index) → uint256++` [.item-kind]#internal#
  2972. Returns the value stored at position `index` in the set. O(1).
  2973. Note that there are no guarantees on the ordering of values inside the
  2974. array, and it may change when more values are added or removed.
  2975. Requirements:
  2976. - `index` must be strictly less than {length}.
  2977. [.contract-item]
  2978. [[EnumerableSet-values-struct-EnumerableSet-UintSet-]]
  2979. ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.UintSet set) → uint256[]++` [.item-kind]#internal#
  2980. Return the entire set in an array
  2981. WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
  2982. to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
  2983. this function has an unbounded cost, and using it as part of a state-changing function may render the function
  2984. uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
  2985. :Empty: pass:normal[xref:#DoubleEndedQueue-Empty--[`++Empty++`]]
  2986. :OutOfBounds: pass:normal[xref:#DoubleEndedQueue-OutOfBounds--[`++OutOfBounds++`]]
  2987. :Bytes32Deque: pass:normal[xref:#DoubleEndedQueue-Bytes32Deque[`++Bytes32Deque++`]]
  2988. :pushBack: pass:normal[xref:#DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-[`++pushBack++`]]
  2989. :popBack: pass:normal[xref:#DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-[`++popBack++`]]
  2990. :pushFront: pass:normal[xref:#DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-[`++pushFront++`]]
  2991. :popFront: pass:normal[xref:#DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-[`++popFront++`]]
  2992. :front: pass:normal[xref:#DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-[`++front++`]]
  2993. :back: pass:normal[xref:#DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-[`++back++`]]
  2994. :at: pass:normal[xref:#DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-[`++at++`]]
  2995. :clear: pass:normal[xref:#DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-[`++clear++`]]
  2996. :length: pass:normal[xref:#DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-[`++length++`]]
  2997. :empty: pass:normal[xref:#DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-[`++empty++`]]
  2998. [.contract]
  2999. [[DoubleEndedQueue]]
  3000. === `++DoubleEndedQueue++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/structs/DoubleEndedQueue.sol[{github-icon},role=heading-link]
  3001. [.hljs-theme-light.nopadding]
  3002. ```solidity
  3003. import "@openzeppelin/contracts/utils/structs/DoubleEndedQueue.sol";
  3004. ```
  3005. A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of
  3006. the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and
  3007. FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that
  3008. the existing queue contents are left in storage.
  3009. The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be
  3010. used in storage, and not in memory.
  3011. ```solidity
  3012. DoubleEndedQueue.Bytes32Deque queue;
  3013. ```
  3014. _Available since v4.6._
  3015. [.contract-index]
  3016. .Functions
  3017. --
  3018. * {xref-DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-}[`++pushBack(deque, value)++`]
  3019. * {xref-DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-}[`++popBack(deque)++`]
  3020. * {xref-DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-}[`++pushFront(deque, value)++`]
  3021. * {xref-DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-}[`++popFront(deque)++`]
  3022. * {xref-DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-}[`++front(deque)++`]
  3023. * {xref-DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-}[`++back(deque)++`]
  3024. * {xref-DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-}[`++at(deque, index)++`]
  3025. * {xref-DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-}[`++clear(deque)++`]
  3026. * {xref-DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-}[`++length(deque)++`]
  3027. * {xref-DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-}[`++empty(deque)++`]
  3028. --
  3029. [.contract-item]
  3030. [[DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-]]
  3031. ==== `[.contract-item-name]#++pushBack++#++(struct DoubleEndedQueue.Bytes32Deque deque, bytes32 value)++` [.item-kind]#internal#
  3032. Inserts an item at the end of the queue.
  3033. [.contract-item]
  3034. [[DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-]]
  3035. ==== `[.contract-item-name]#++popBack++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
  3036. Removes the item at the end of the queue and returns it.
  3037. Reverts with `Empty` if the queue is empty.
  3038. [.contract-item]
  3039. [[DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-]]
  3040. ==== `[.contract-item-name]#++pushFront++#++(struct DoubleEndedQueue.Bytes32Deque deque, bytes32 value)++` [.item-kind]#internal#
  3041. Inserts an item at the beginning of the queue.
  3042. [.contract-item]
  3043. [[DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-]]
  3044. ==== `[.contract-item-name]#++popFront++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
  3045. Removes the item at the beginning of the queue and returns it.
  3046. Reverts with `Empty` if the queue is empty.
  3047. [.contract-item]
  3048. [[DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-]]
  3049. ==== `[.contract-item-name]#++front++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
  3050. Returns the item at the beginning of the queue.
  3051. Reverts with `Empty` if the queue is empty.
  3052. [.contract-item]
  3053. [[DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-]]
  3054. ==== `[.contract-item-name]#++back++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
  3055. Returns the item at the end of the queue.
  3056. Reverts with `Empty` if the queue is empty.
  3057. [.contract-item]
  3058. [[DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-]]
  3059. ==== `[.contract-item-name]#++at++#++(struct DoubleEndedQueue.Bytes32Deque deque, uint256 index) → bytes32 value++` [.item-kind]#internal#
  3060. Return the item at a position in the queue given by `index`, with the first item at 0 and last item at
  3061. `length(deque) - 1`.
  3062. Reverts with `OutOfBounds` if the index is out of bounds.
  3063. [.contract-item]
  3064. [[DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-]]
  3065. ==== `[.contract-item-name]#++clear++#++(struct DoubleEndedQueue.Bytes32Deque deque)++` [.item-kind]#internal#
  3066. Resets the queue back to being empty.
  3067. NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses
  3068. out on potential gas refunds.
  3069. [.contract-item]
  3070. [[DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-]]
  3071. ==== `[.contract-item-name]#++length++#++(struct DoubleEndedQueue.Bytes32Deque deque) → uint256++` [.item-kind]#internal#
  3072. Returns the number of items in the queue.
  3073. [.contract-item]
  3074. [[DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-]]
  3075. ==== `[.contract-item-name]#++empty++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bool++` [.item-kind]#internal#
  3076. Returns true if the queue is empty.
  3077. :History: pass:normal[xref:#Checkpoints-History[`++History++`]]
  3078. :Checkpoint: pass:normal[xref:#Checkpoints-Checkpoint[`++Checkpoint++`]]
  3079. :getAtBlock: pass:normal[xref:#Checkpoints-getAtBlock-struct-Checkpoints-History-uint256-[`++getAtBlock++`]]
  3080. :getAtProbablyRecentBlock: pass:normal[xref:#Checkpoints-getAtProbablyRecentBlock-struct-Checkpoints-History-uint256-[`++getAtProbablyRecentBlock++`]]
  3081. :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-History-uint256-[`++push++`]]
  3082. :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-History-function--uint256-uint256--view-returns--uint256--uint256-[`++push++`]]
  3083. :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-History-[`++latest++`]]
  3084. :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-History-[`++latestCheckpoint++`]]
  3085. :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-History-[`++length++`]]
  3086. :Trace224: pass:normal[xref:#Checkpoints-Trace224[`++Trace224++`]]
  3087. :Checkpoint224: pass:normal[xref:#Checkpoints-Checkpoint224[`++Checkpoint224++`]]
  3088. :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-[`++push++`]]
  3089. :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-[`++lowerLookup++`]]
  3090. :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-[`++upperLookup++`]]
  3091. :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-[`++upperLookupRecent++`]]
  3092. :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace224-[`++latest++`]]
  3093. :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-[`++latestCheckpoint++`]]
  3094. :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace224-[`++length++`]]
  3095. :Trace160: pass:normal[xref:#Checkpoints-Trace160[`++Trace160++`]]
  3096. :Checkpoint160: pass:normal[xref:#Checkpoints-Checkpoint160[`++Checkpoint160++`]]
  3097. :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-[`++push++`]]
  3098. :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-[`++lowerLookup++`]]
  3099. :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-[`++upperLookup++`]]
  3100. :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-[`++upperLookupRecent++`]]
  3101. :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace160-[`++latest++`]]
  3102. :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-[`++latestCheckpoint++`]]
  3103. :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace160-[`++length++`]]
  3104. [.contract]
  3105. [[Checkpoints]]
  3106. === `++Checkpoints++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/Checkpoints.sol[{github-icon},role=heading-link]
  3107. [.hljs-theme-light.nopadding]
  3108. ```solidity
  3109. import "@openzeppelin/contracts/utils/Checkpoints.sol";
  3110. ```
  3111. This library defines the `History` struct, for checkpointing values as they change at different points in
  3112. time, and later looking up past values by block number. See {Votes} as an example.
  3113. To create a history of checkpoints define a variable type `Checkpoints.History` in your contract, and store a new
  3114. checkpoint for the current transaction block using the {push} function.
  3115. _Available since v4.5._
  3116. [.contract-index]
  3117. .Functions
  3118. --
  3119. * {xref-Checkpoints-getAtBlock-struct-Checkpoints-History-uint256-}[`++getAtBlock(self, blockNumber)++`]
  3120. * {xref-Checkpoints-getAtProbablyRecentBlock-struct-Checkpoints-History-uint256-}[`++getAtProbablyRecentBlock(self, blockNumber)++`]
  3121. * {xref-Checkpoints-push-struct-Checkpoints-History-uint256-}[`++push(self, value)++`]
  3122. * {xref-Checkpoints-push-struct-Checkpoints-History-function--uint256-uint256--view-returns--uint256--uint256-}[`++push(self, op, delta)++`]
  3123. * {xref-Checkpoints-latest-struct-Checkpoints-History-}[`++latest(self)++`]
  3124. * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-History-}[`++latestCheckpoint(self)++`]
  3125. * {xref-Checkpoints-length-struct-Checkpoints-History-}[`++length(self)++`]
  3126. * {xref-Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-}[`++push(self, key, value)++`]
  3127. * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-}[`++lowerLookup(self, key)++`]
  3128. * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-}[`++upperLookup(self, key)++`]
  3129. * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-}[`++upperLookupRecent(self, key)++`]
  3130. * {xref-Checkpoints-latest-struct-Checkpoints-Trace224-}[`++latest(self)++`]
  3131. * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-}[`++latestCheckpoint(self)++`]
  3132. * {xref-Checkpoints-length-struct-Checkpoints-Trace224-}[`++length(self)++`]
  3133. * {xref-Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-}[`++push(self, key, value)++`]
  3134. * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-}[`++lowerLookup(self, key)++`]
  3135. * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-}[`++upperLookup(self, key)++`]
  3136. * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-}[`++upperLookupRecent(self, key)++`]
  3137. * {xref-Checkpoints-latest-struct-Checkpoints-Trace160-}[`++latest(self)++`]
  3138. * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-}[`++latestCheckpoint(self)++`]
  3139. * {xref-Checkpoints-length-struct-Checkpoints-Trace160-}[`++length(self)++`]
  3140. --
  3141. [.contract-item]
  3142. [[Checkpoints-getAtBlock-struct-Checkpoints-History-uint256-]]
  3143. ==== `[.contract-item-name]#++getAtBlock++#++(struct Checkpoints.History self, uint256 blockNumber) → uint256++` [.item-kind]#internal#
  3144. Returns the value at a given block number. If a checkpoint is not available at that block, the closest one
  3145. before it is returned, or zero otherwise. Because the number returned corresponds to that at the end of the
  3146. block, the requested block number must be in the past, excluding the current block.
  3147. [.contract-item]
  3148. [[Checkpoints-getAtProbablyRecentBlock-struct-Checkpoints-History-uint256-]]
  3149. ==== `[.contract-item-name]#++getAtProbablyRecentBlock++#++(struct Checkpoints.History self, uint256 blockNumber) → uint256++` [.item-kind]#internal#
  3150. Returns the value at a given block number. If a checkpoint is not available at that block, the closest one
  3151. before it is returned, or zero otherwise. Similar to {upperLookup} but optimized for the case when the searched
  3152. checkpoint is probably "recent", defined as being among the last sqrt(N) checkpoints where N is the number of
  3153. checkpoints.
  3154. [.contract-item]
  3155. [[Checkpoints-push-struct-Checkpoints-History-uint256-]]
  3156. ==== `[.contract-item-name]#++push++#++(struct Checkpoints.History self, uint256 value) → uint256, uint256++` [.item-kind]#internal#
  3157. Pushes a value onto a History so that it is stored as the checkpoint for the current block.
  3158. Returns previous value and new value.
  3159. [.contract-item]
  3160. [[Checkpoints-push-struct-Checkpoints-History-function--uint256-uint256--view-returns--uint256--uint256-]]
  3161. ==== `[.contract-item-name]#++push++#++(struct Checkpoints.History self, function (uint256,uint256) view returns (uint256) op, uint256 delta) → uint256, uint256++` [.item-kind]#internal#
  3162. Pushes a value onto a History, by updating the latest value using binary operation `op`. The new value will
  3163. be set to `op(latest, delta)`.
  3164. Returns previous value and new value.
  3165. [.contract-item]
  3166. [[Checkpoints-latest-struct-Checkpoints-History-]]
  3167. ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.History self) → uint224++` [.item-kind]#internal#
  3168. Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
  3169. [.contract-item]
  3170. [[Checkpoints-latestCheckpoint-struct-Checkpoints-History-]]
  3171. ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.History self) → bool exists, uint32 _blockNumber, uint224 _value++` [.item-kind]#internal#
  3172. Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
  3173. in the most recent checkpoint.
  3174. [.contract-item]
  3175. [[Checkpoints-length-struct-Checkpoints-History-]]
  3176. ==== `[.contract-item-name]#++length++#++(struct Checkpoints.History self) → uint256++` [.item-kind]#internal#
  3177. Returns the number of checkpoint.
  3178. [.contract-item]
  3179. [[Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-]]
  3180. ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace224 self, uint32 key, uint224 value) → uint224, uint224++` [.item-kind]#internal#
  3181. Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint.
  3182. Returns previous value and new value.
  3183. [.contract-item]
  3184. [[Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-]]
  3185. ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace224 self, uint32 key) → uint224++` [.item-kind]#internal#
  3186. Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none.
  3187. [.contract-item]
  3188. [[Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-]]
  3189. ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace224 self, uint32 key) → uint224++` [.item-kind]#internal#
  3190. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.
  3191. [.contract-item]
  3192. [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-]]
  3193. ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace224 self, uint32 key) → uint224++` [.item-kind]#internal#
  3194. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.
  3195. NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys).
  3196. [.contract-item]
  3197. [[Checkpoints-latest-struct-Checkpoints-Trace224-]]
  3198. ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace224 self) → uint224++` [.item-kind]#internal#
  3199. Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
  3200. [.contract-item]
  3201. [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-]]
  3202. ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace224 self) → bool exists, uint32 _key, uint224 _value++` [.item-kind]#internal#
  3203. Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
  3204. in the most recent checkpoint.
  3205. [.contract-item]
  3206. [[Checkpoints-length-struct-Checkpoints-Trace224-]]
  3207. ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace224 self) → uint256++` [.item-kind]#internal#
  3208. Returns the number of checkpoint.
  3209. [.contract-item]
  3210. [[Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-]]
  3211. ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace160 self, uint96 key, uint160 value) → uint160, uint160++` [.item-kind]#internal#
  3212. Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint.
  3213. Returns previous value and new value.
  3214. [.contract-item]
  3215. [[Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-]]
  3216. ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace160 self, uint96 key) → uint160++` [.item-kind]#internal#
  3217. Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none.
  3218. [.contract-item]
  3219. [[Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-]]
  3220. ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace160 self, uint96 key) → uint160++` [.item-kind]#internal#
  3221. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.
  3222. [.contract-item]
  3223. [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-]]
  3224. ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace160 self, uint96 key) → uint160++` [.item-kind]#internal#
  3225. Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.
  3226. NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys).
  3227. [.contract-item]
  3228. [[Checkpoints-latest-struct-Checkpoints-Trace160-]]
  3229. ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace160 self) → uint160++` [.item-kind]#internal#
  3230. Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
  3231. [.contract-item]
  3232. [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-]]
  3233. ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace160 self) → bool exists, uint96 _key, uint160 _value++` [.item-kind]#internal#
  3234. Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
  3235. in the most recent checkpoint.
  3236. [.contract-item]
  3237. [[Checkpoints-length-struct-Checkpoints-Trace160-]]
  3238. ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace160 self) → uint256++` [.item-kind]#internal#
  3239. Returns the number of checkpoint.
  3240. == Libraries
  3241. :deploy: pass:normal[xref:#Create2-deploy-uint256-bytes32-bytes-[`++deploy++`]]
  3242. :computeAddress: pass:normal[xref:#Create2-computeAddress-bytes32-bytes32-[`++computeAddress++`]]
  3243. :computeAddress: pass:normal[xref:#Create2-computeAddress-bytes32-bytes32-address-[`++computeAddress++`]]
  3244. [.contract]
  3245. [[Create2]]
  3246. === `++Create2++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/Create2.sol[{github-icon},role=heading-link]
  3247. [.hljs-theme-light.nopadding]
  3248. ```solidity
  3249. import "@openzeppelin/contracts/utils/Create2.sol";
  3250. ```
  3251. Helper to make usage of the `CREATE2` EVM opcode easier and safer.
  3252. `CREATE2` can be used to compute in advance the address where a smart
  3253. contract will be deployed, which allows for interesting new mechanisms known
  3254. as 'counterfactual interactions'.
  3255. See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
  3256. information.
  3257. [.contract-index]
  3258. .Functions
  3259. --
  3260. * {xref-Create2-deploy-uint256-bytes32-bytes-}[`++deploy(amount, salt, bytecode)++`]
  3261. * {xref-Create2-computeAddress-bytes32-bytes32-}[`++computeAddress(salt, bytecodeHash)++`]
  3262. * {xref-Create2-computeAddress-bytes32-bytes32-address-}[`++computeAddress(salt, bytecodeHash, deployer)++`]
  3263. --
  3264. [.contract-item]
  3265. [[Create2-deploy-uint256-bytes32-bytes-]]
  3266. ==== `[.contract-item-name]#++deploy++#++(uint256 amount, bytes32 salt, bytes bytecode) → address addr++` [.item-kind]#internal#
  3267. Deploys a contract using `CREATE2`. The address where the contract
  3268. will be deployed can be known in advance via {computeAddress}.
  3269. The bytecode for a contract can be obtained from Solidity with
  3270. `type(contractName).creationCode`.
  3271. Requirements:
  3272. - `bytecode` must not be empty.
  3273. - `salt` must have not been used for `bytecode` already.
  3274. - the factory must have a balance of at least `amount`.
  3275. - if `amount` is non-zero, `bytecode` must have a `payable` constructor.
  3276. [.contract-item]
  3277. [[Create2-computeAddress-bytes32-bytes32-]]
  3278. ==== `[.contract-item-name]#++computeAddress++#++(bytes32 salt, bytes32 bytecodeHash) → address++` [.item-kind]#internal#
  3279. Returns the address where a contract will be stored if deployed via {deploy}. Any change in the
  3280. `bytecodeHash` or `salt` will result in a new destination address.
  3281. [.contract-item]
  3282. [[Create2-computeAddress-bytes32-bytes32-address-]]
  3283. ==== `[.contract-item-name]#++computeAddress++#++(bytes32 salt, bytes32 bytecodeHash, address deployer) → address addr++` [.item-kind]#internal#
  3284. Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
  3285. `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
  3286. :isContract: pass:normal[xref:#Address-isContract-address-[`++isContract++`]]
  3287. :sendValue: pass:normal[xref:#Address-sendValue-address-payable-uint256-[`++sendValue++`]]
  3288. :functionCall: pass:normal[xref:#Address-functionCall-address-bytes-[`++functionCall++`]]
  3289. :functionCall: pass:normal[xref:#Address-functionCall-address-bytes-string-[`++functionCall++`]]
  3290. :functionCallWithValue: pass:normal[xref:#Address-functionCallWithValue-address-bytes-uint256-[`++functionCallWithValue++`]]
  3291. :functionCallWithValue: pass:normal[xref:#Address-functionCallWithValue-address-bytes-uint256-string-[`++functionCallWithValue++`]]
  3292. :functionStaticCall: pass:normal[xref:#Address-functionStaticCall-address-bytes-[`++functionStaticCall++`]]
  3293. :functionStaticCall: pass:normal[xref:#Address-functionStaticCall-address-bytes-string-[`++functionStaticCall++`]]
  3294. :functionDelegateCall: pass:normal[xref:#Address-functionDelegateCall-address-bytes-[`++functionDelegateCall++`]]
  3295. :functionDelegateCall: pass:normal[xref:#Address-functionDelegateCall-address-bytes-string-[`++functionDelegateCall++`]]
  3296. :verifyCallResultFromTarget: pass:normal[xref:#Address-verifyCallResultFromTarget-address-bool-bytes-string-[`++verifyCallResultFromTarget++`]]
  3297. :verifyCallResult: pass:normal[xref:#Address-verifyCallResult-bool-bytes-string-[`++verifyCallResult++`]]
  3298. [.contract]
  3299. [[Address]]
  3300. === `++Address++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/Address.sol[{github-icon},role=heading-link]
  3301. [.hljs-theme-light.nopadding]
  3302. ```solidity
  3303. import "@openzeppelin/contracts/utils/Address.sol";
  3304. ```
  3305. Collection of functions related to the address type
  3306. [.contract-index]
  3307. .Functions
  3308. --
  3309. * {xref-Address-isContract-address-}[`++isContract(account)++`]
  3310. * {xref-Address-sendValue-address-payable-uint256-}[`++sendValue(recipient, amount)++`]
  3311. * {xref-Address-functionCall-address-bytes-}[`++functionCall(target, data)++`]
  3312. * {xref-Address-functionCall-address-bytes-string-}[`++functionCall(target, data, errorMessage)++`]
  3313. * {xref-Address-functionCallWithValue-address-bytes-uint256-}[`++functionCallWithValue(target, data, value)++`]
  3314. * {xref-Address-functionCallWithValue-address-bytes-uint256-string-}[`++functionCallWithValue(target, data, value, errorMessage)++`]
  3315. * {xref-Address-functionStaticCall-address-bytes-}[`++functionStaticCall(target, data)++`]
  3316. * {xref-Address-functionStaticCall-address-bytes-string-}[`++functionStaticCall(target, data, errorMessage)++`]
  3317. * {xref-Address-functionDelegateCall-address-bytes-}[`++functionDelegateCall(target, data)++`]
  3318. * {xref-Address-functionDelegateCall-address-bytes-string-}[`++functionDelegateCall(target, data, errorMessage)++`]
  3319. * {xref-Address-verifyCallResultFromTarget-address-bool-bytes-string-}[`++verifyCallResultFromTarget(target, success, returndata, errorMessage)++`]
  3320. * {xref-Address-verifyCallResult-bool-bytes-string-}[`++verifyCallResult(success, returndata, errorMessage)++`]
  3321. --
  3322. [.contract-item]
  3323. [[Address-isContract-address-]]
  3324. ==== `[.contract-item-name]#++isContract++#++(address account) → bool++` [.item-kind]#internal#
  3325. Returns true if `account` is a contract.
  3326. [IMPORTANT]
  3327. ====
  3328. It is unsafe to assume that an address for which this function returns
  3329. false is an externally-owned account (EOA) and not a contract.
  3330. Among others, `isContract` will return false for the following
  3331. types of addresses:
  3332. - an externally-owned account
  3333. - a contract in construction
  3334. - an address where a contract will be created
  3335. - an address where a contract lived, but was destroyed
  3336. Furthermore, `isContract` will also return true if the target contract within
  3337. the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
  3338. which only has an effect at the end of a transaction.
  3339. ====
  3340. [IMPORTANT]
  3341. ====
  3342. You shouldn't rely on `isContract` to protect against flash loan attacks!
  3343. Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
  3344. like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
  3345. constructor.
  3346. ====
  3347. [.contract-item]
  3348. [[Address-sendValue-address-payable-uint256-]]
  3349. ==== `[.contract-item-name]#++sendValue++#++(address payable recipient, uint256 amount)++` [.item-kind]#internal#
  3350. Replacement for Solidity's `transfer`: sends `amount` wei to
  3351. `recipient`, forwarding all available gas and reverting on errors.
  3352. https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
  3353. of certain opcodes, possibly making contracts go over the 2300 gas limit
  3354. imposed by `transfer`, making them unable to receive funds via
  3355. `transfer`. {sendValue} removes this limitation.
  3356. https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
  3357. IMPORTANT: because control is transferred to `recipient`, care must be
  3358. taken to not create reentrancy vulnerabilities. Consider using
  3359. {ReentrancyGuard} or the
  3360. https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
  3361. [.contract-item]
  3362. [[Address-functionCall-address-bytes-]]
  3363. ==== `[.contract-item-name]#++functionCall++#++(address target, bytes data) → bytes++` [.item-kind]#internal#
  3364. Performs a Solidity function call using a low level `call`. A
  3365. plain `call` is an unsafe replacement for a function call: use this
  3366. function instead.
  3367. If `target` reverts with a revert reason, it is bubbled up by this
  3368. function (like regular Solidity function calls).
  3369. Returns the raw returned data. To convert to the expected return value,
  3370. use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
  3371. Requirements:
  3372. - `target` must be a contract.
  3373. - calling `target` with `data` must not revert.
  3374. _Available since v3.1._
  3375. [.contract-item]
  3376. [[Address-functionCall-address-bytes-string-]]
  3377. ==== `[.contract-item-name]#++functionCall++#++(address target, bytes data, string errorMessage) → bytes++` [.item-kind]#internal#
  3378. Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
  3379. `errorMessage` as a fallback revert reason when `target` reverts.
  3380. _Available since v3.1._
  3381. [.contract-item]
  3382. [[Address-functionCallWithValue-address-bytes-uint256-]]
  3383. ==== `[.contract-item-name]#++functionCallWithValue++#++(address target, bytes data, uint256 value) → bytes++` [.item-kind]#internal#
  3384. Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
  3385. but also transferring `value` wei to `target`.
  3386. Requirements:
  3387. - the calling contract must have an ETH balance of at least `value`.
  3388. - the called Solidity function must be `payable`.
  3389. _Available since v3.1._
  3390. [.contract-item]
  3391. [[Address-functionCallWithValue-address-bytes-uint256-string-]]
  3392. ==== `[.contract-item-name]#++functionCallWithValue++#++(address target, bytes data, uint256 value, string errorMessage) → bytes++` [.item-kind]#internal#
  3393. Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
  3394. with `errorMessage` as a fallback revert reason when `target` reverts.
  3395. _Available since v3.1._
  3396. [.contract-item]
  3397. [[Address-functionStaticCall-address-bytes-]]
  3398. ==== `[.contract-item-name]#++functionStaticCall++#++(address target, bytes data) → bytes++` [.item-kind]#internal#
  3399. Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
  3400. but performing a static call.
  3401. _Available since v3.3._
  3402. [.contract-item]
  3403. [[Address-functionStaticCall-address-bytes-string-]]
  3404. ==== `[.contract-item-name]#++functionStaticCall++#++(address target, bytes data, string errorMessage) → bytes++` [.item-kind]#internal#
  3405. Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
  3406. but performing a static call.
  3407. _Available since v3.3._
  3408. [.contract-item]
  3409. [[Address-functionDelegateCall-address-bytes-]]
  3410. ==== `[.contract-item-name]#++functionDelegateCall++#++(address target, bytes data) → bytes++` [.item-kind]#internal#
  3411. Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
  3412. but performing a delegate call.
  3413. _Available since v3.4._
  3414. [.contract-item]
  3415. [[Address-functionDelegateCall-address-bytes-string-]]
  3416. ==== `[.contract-item-name]#++functionDelegateCall++#++(address target, bytes data, string errorMessage) → bytes++` [.item-kind]#internal#
  3417. Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
  3418. but performing a delegate call.
  3419. _Available since v3.4._
  3420. [.contract-item]
  3421. [[Address-verifyCallResultFromTarget-address-bool-bytes-string-]]
  3422. ==== `[.contract-item-name]#++verifyCallResultFromTarget++#++(address target, bool success, bytes returndata, string errorMessage) → bytes++` [.item-kind]#internal#
  3423. Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
  3424. the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
  3425. _Available since v4.8._
  3426. [.contract-item]
  3427. [[Address-verifyCallResult-bool-bytes-string-]]
  3428. ==== `[.contract-item-name]#++verifyCallResult++#++(bool success, bytes returndata, string errorMessage) → bytes++` [.item-kind]#internal#
  3429. Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
  3430. revert reason or using the provided one.
  3431. _Available since v4.3._
  3432. :findUpperBound: pass:normal[xref:#Arrays-findUpperBound-uint256---uint256-[`++findUpperBound++`]]
  3433. :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-address---uint256-[`++unsafeAccess++`]]
  3434. :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-bytes32---uint256-[`++unsafeAccess++`]]
  3435. :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-uint256---uint256-[`++unsafeAccess++`]]
  3436. [.contract]
  3437. [[Arrays]]
  3438. === `++Arrays++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/Arrays.sol[{github-icon},role=heading-link]
  3439. [.hljs-theme-light.nopadding]
  3440. ```solidity
  3441. import "@openzeppelin/contracts/utils/Arrays.sol";
  3442. ```
  3443. Collection of functions related to array types.
  3444. [.contract-index]
  3445. .Functions
  3446. --
  3447. * {xref-Arrays-findUpperBound-uint256---uint256-}[`++findUpperBound(array, element)++`]
  3448. * {xref-Arrays-unsafeAccess-address---uint256-}[`++unsafeAccess(arr, pos)++`]
  3449. * {xref-Arrays-unsafeAccess-bytes32---uint256-}[`++unsafeAccess(arr, pos)++`]
  3450. * {xref-Arrays-unsafeAccess-uint256---uint256-}[`++unsafeAccess(arr, pos)++`]
  3451. --
  3452. [.contract-item]
  3453. [[Arrays-findUpperBound-uint256---uint256-]]
  3454. ==== `[.contract-item-name]#++findUpperBound++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
  3455. Searches a sorted `array` and returns the first index that contains
  3456. a value greater or equal to `element`. If no such index exists (i.e. all
  3457. values in the array are strictly less than `element`), the array length is
  3458. returned. Time complexity O(log n).
  3459. `array` is expected to be sorted in ascending order, and to contain no
  3460. repeated elements.
  3461. [.contract-item]
  3462. [[Arrays-unsafeAccess-address---uint256-]]
  3463. ==== `[.contract-item-name]#++unsafeAccess++#++(address[] arr, uint256 pos) → struct StorageSlot.AddressSlot++` [.item-kind]#internal#
  3464. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  3465. WARNING: Only use if you are certain `pos` is lower than the array length.
  3466. [.contract-item]
  3467. [[Arrays-unsafeAccess-bytes32---uint256-]]
  3468. ==== `[.contract-item-name]#++unsafeAccess++#++(bytes32[] arr, uint256 pos) → struct StorageSlot.Bytes32Slot++` [.item-kind]#internal#
  3469. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  3470. WARNING: Only use if you are certain `pos` is lower than the array length.
  3471. [.contract-item]
  3472. [[Arrays-unsafeAccess-uint256---uint256-]]
  3473. ==== `[.contract-item-name]#++unsafeAccess++#++(uint256[] arr, uint256 pos) → struct StorageSlot.Uint256Slot++` [.item-kind]#internal#
  3474. Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
  3475. WARNING: Only use if you are certain `pos` is lower than the array length.
  3476. :_TABLE: pass:normal[xref:#Base64-_TABLE-string[`++_TABLE++`]]
  3477. :encode: pass:normal[xref:#Base64-encode-bytes-[`++encode++`]]
  3478. [.contract]
  3479. [[Base64]]
  3480. === `++Base64++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/Base64.sol[{github-icon},role=heading-link]
  3481. [.hljs-theme-light.nopadding]
  3482. ```solidity
  3483. import "@openzeppelin/contracts/utils/Base64.sol";
  3484. ```
  3485. Provides a set of functions to operate with Base64 strings.
  3486. _Available since v4.5._
  3487. [.contract-index]
  3488. .Functions
  3489. --
  3490. * {xref-Base64-encode-bytes-}[`++encode(data)++`]
  3491. --
  3492. [.contract-item]
  3493. [[Base64-encode-bytes-]]
  3494. ==== `[.contract-item-name]#++encode++#++(bytes data) → string++` [.item-kind]#internal#
  3495. Converts a `bytes` to its Bytes64 `string` representation.
  3496. :Counter: pass:normal[xref:#Counters-Counter[`++Counter++`]]
  3497. :current: pass:normal[xref:#Counters-current-struct-Counters-Counter-[`++current++`]]
  3498. :increment: pass:normal[xref:#Counters-increment-struct-Counters-Counter-[`++increment++`]]
  3499. :decrement: pass:normal[xref:#Counters-decrement-struct-Counters-Counter-[`++decrement++`]]
  3500. :reset: pass:normal[xref:#Counters-reset-struct-Counters-Counter-[`++reset++`]]
  3501. [.contract]
  3502. [[Counters]]
  3503. === `++Counters++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/Counters.sol[{github-icon},role=heading-link]
  3504. [.hljs-theme-light.nopadding]
  3505. ```solidity
  3506. import "@openzeppelin/contracts/utils/Counters.sol";
  3507. ```
  3508. Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
  3509. of elements in a mapping, issuing ERC721 ids, or counting request ids.
  3510. Include with `using Counters for Counters.Counter;`
  3511. [.contract-index]
  3512. .Functions
  3513. --
  3514. * {xref-Counters-current-struct-Counters-Counter-}[`++current(counter)++`]
  3515. * {xref-Counters-increment-struct-Counters-Counter-}[`++increment(counter)++`]
  3516. * {xref-Counters-decrement-struct-Counters-Counter-}[`++decrement(counter)++`]
  3517. * {xref-Counters-reset-struct-Counters-Counter-}[`++reset(counter)++`]
  3518. --
  3519. [.contract-item]
  3520. [[Counters-current-struct-Counters-Counter-]]
  3521. ==== `[.contract-item-name]#++current++#++(struct Counters.Counter counter) → uint256++` [.item-kind]#internal#
  3522. [.contract-item]
  3523. [[Counters-increment-struct-Counters-Counter-]]
  3524. ==== `[.contract-item-name]#++increment++#++(struct Counters.Counter counter)++` [.item-kind]#internal#
  3525. [.contract-item]
  3526. [[Counters-decrement-struct-Counters-Counter-]]
  3527. ==== `[.contract-item-name]#++decrement++#++(struct Counters.Counter counter)++` [.item-kind]#internal#
  3528. [.contract-item]
  3529. [[Counters-reset-struct-Counters-Counter-]]
  3530. ==== `[.contract-item-name]#++reset++#++(struct Counters.Counter counter)++` [.item-kind]#internal#
  3531. :toString: pass:normal[xref:#Strings-toString-uint256-[`++toString++`]]
  3532. :toString: pass:normal[xref:#Strings-toString-int256-[`++toString++`]]
  3533. :toHexString: pass:normal[xref:#Strings-toHexString-uint256-[`++toHexString++`]]
  3534. :toHexString: pass:normal[xref:#Strings-toHexString-uint256-uint256-[`++toHexString++`]]
  3535. :toHexString: pass:normal[xref:#Strings-toHexString-address-[`++toHexString++`]]
  3536. :equal: pass:normal[xref:#Strings-equal-string-string-[`++equal++`]]
  3537. [.contract]
  3538. [[Strings]]
  3539. === `++Strings++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/Strings.sol[{github-icon},role=heading-link]
  3540. [.hljs-theme-light.nopadding]
  3541. ```solidity
  3542. import "@openzeppelin/contracts/utils/Strings.sol";
  3543. ```
  3544. String operations.
  3545. [.contract-index]
  3546. .Functions
  3547. --
  3548. * {xref-Strings-toString-uint256-}[`++toString(value)++`]
  3549. * {xref-Strings-toString-int256-}[`++toString(value)++`]
  3550. * {xref-Strings-toHexString-uint256-}[`++toHexString(value)++`]
  3551. * {xref-Strings-toHexString-uint256-uint256-}[`++toHexString(value, length)++`]
  3552. * {xref-Strings-toHexString-address-}[`++toHexString(addr)++`]
  3553. * {xref-Strings-equal-string-string-}[`++equal(a, b)++`]
  3554. --
  3555. [.contract-item]
  3556. [[Strings-toString-uint256-]]
  3557. ==== `[.contract-item-name]#++toString++#++(uint256 value) → string++` [.item-kind]#internal#
  3558. Converts a `uint256` to its ASCII `string` decimal representation.
  3559. [.contract-item]
  3560. [[Strings-toString-int256-]]
  3561. ==== `[.contract-item-name]#++toString++#++(int256 value) → string++` [.item-kind]#internal#
  3562. Converts a `int256` to its ASCII `string` decimal representation.
  3563. [.contract-item]
  3564. [[Strings-toHexString-uint256-]]
  3565. ==== `[.contract-item-name]#++toHexString++#++(uint256 value) → string++` [.item-kind]#internal#
  3566. Converts a `uint256` to its ASCII `string` hexadecimal representation.
  3567. [.contract-item]
  3568. [[Strings-toHexString-uint256-uint256-]]
  3569. ==== `[.contract-item-name]#++toHexString++#++(uint256 value, uint256 length) → string++` [.item-kind]#internal#
  3570. Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
  3571. [.contract-item]
  3572. [[Strings-toHexString-address-]]
  3573. ==== `[.contract-item-name]#++toHexString++#++(address addr) → string++` [.item-kind]#internal#
  3574. Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
  3575. [.contract-item]
  3576. [[Strings-equal-string-string-]]
  3577. ==== `[.contract-item-name]#++equal++#++(string a, string b) → bool++` [.item-kind]#internal#
  3578. Returns true if the two strings are equal.
  3579. :StringTooLong: pass:normal[xref:#ShortStrings-StringTooLong-string-[`++StringTooLong++`]]
  3580. :InvalidShortString: pass:normal[xref:#ShortStrings-InvalidShortString--[`++InvalidShortString++`]]
  3581. :toShortString: pass:normal[xref:#ShortStrings-toShortString-string-[`++toShortString++`]]
  3582. :toString: pass:normal[xref:#ShortStrings-toString-ShortString-[`++toString++`]]
  3583. :byteLength: pass:normal[xref:#ShortStrings-byteLength-ShortString-[`++byteLength++`]]
  3584. :toShortStringWithFallback: pass:normal[xref:#ShortStrings-toShortStringWithFallback-string-string-[`++toShortStringWithFallback++`]]
  3585. :toStringWithFallback: pass:normal[xref:#ShortStrings-toStringWithFallback-ShortString-string-[`++toStringWithFallback++`]]
  3586. :byteLengthWithFallback: pass:normal[xref:#ShortStrings-byteLengthWithFallback-ShortString-string-[`++byteLengthWithFallback++`]]
  3587. [.contract]
  3588. [[ShortStrings]]
  3589. === `++ShortStrings++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/ShortStrings.sol[{github-icon},role=heading-link]
  3590. [.hljs-theme-light.nopadding]
  3591. ```solidity
  3592. import "@openzeppelin/contracts/utils/ShortStrings.sol";
  3593. ```
  3594. This library provides functions to convert short memory strings
  3595. into a `ShortString` type that can be used as an immutable variable.
  3596. Strings of arbitrary length can be optimized using this library if
  3597. they are short enough (up to 31 bytes) by packing them with their
  3598. length (1 byte) in a single EVM word (32 bytes). Additionally, a
  3599. fallback mechanism can be used for every other case.
  3600. Usage example:
  3601. ```solidity
  3602. contract Named {
  3603. using ShortStrings for *;
  3604. ShortString private immutable _name;
  3605. string private _nameFallback;
  3606. constructor(string memory contractName) {
  3607. _name = contractName.toShortStringWithFallback(_nameFallback);
  3608. }
  3609. function name() external view returns (string memory) {
  3610. return _name.toStringWithFallback(_nameFallback);
  3611. }
  3612. }
  3613. ```
  3614. [.contract-index]
  3615. .Functions
  3616. --
  3617. * {xref-ShortStrings-toShortString-string-}[`++toShortString(str)++`]
  3618. * {xref-ShortStrings-toString-ShortString-}[`++toString(sstr)++`]
  3619. * {xref-ShortStrings-byteLength-ShortString-}[`++byteLength(sstr)++`]
  3620. * {xref-ShortStrings-toShortStringWithFallback-string-string-}[`++toShortStringWithFallback(value, store)++`]
  3621. * {xref-ShortStrings-toStringWithFallback-ShortString-string-}[`++toStringWithFallback(value, store)++`]
  3622. * {xref-ShortStrings-byteLengthWithFallback-ShortString-string-}[`++byteLengthWithFallback(value, store)++`]
  3623. --
  3624. [.contract-item]
  3625. [[ShortStrings-toShortString-string-]]
  3626. ==== `[.contract-item-name]#++toShortString++#++(string str) → ShortString++` [.item-kind]#internal#
  3627. Encode a string of at most 31 chars into a `ShortString`.
  3628. This will trigger a `StringTooLong` error is the input string is too long.
  3629. [.contract-item]
  3630. [[ShortStrings-toString-ShortString-]]
  3631. ==== `[.contract-item-name]#++toString++#++(ShortString sstr) → string++` [.item-kind]#internal#
  3632. Decode a `ShortString` back to a "normal" string.
  3633. [.contract-item]
  3634. [[ShortStrings-byteLength-ShortString-]]
  3635. ==== `[.contract-item-name]#++byteLength++#++(ShortString sstr) → uint256++` [.item-kind]#internal#
  3636. Return the length of a `ShortString`.
  3637. [.contract-item]
  3638. [[ShortStrings-toShortStringWithFallback-string-string-]]
  3639. ==== `[.contract-item-name]#++toShortStringWithFallback++#++(string value, string store) → ShortString++` [.item-kind]#internal#
  3640. Encode a string into a `ShortString`, or write it to storage if it is too long.
  3641. [.contract-item]
  3642. [[ShortStrings-toStringWithFallback-ShortString-string-]]
  3643. ==== `[.contract-item-name]#++toStringWithFallback++#++(ShortString value, string store) → string++` [.item-kind]#internal#
  3644. Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
  3645. [.contract-item]
  3646. [[ShortStrings-byteLengthWithFallback-ShortString-string-]]
  3647. ==== `[.contract-item-name]#++byteLengthWithFallback++#++(ShortString value, string store) → uint256++` [.item-kind]#internal#
  3648. Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
  3649. WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
  3650. actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
  3651. :AddressSlot: pass:normal[xref:#StorageSlot-AddressSlot[`++AddressSlot++`]]
  3652. :BooleanSlot: pass:normal[xref:#StorageSlot-BooleanSlot[`++BooleanSlot++`]]
  3653. :Bytes32Slot: pass:normal[xref:#StorageSlot-Bytes32Slot[`++Bytes32Slot++`]]
  3654. :Uint256Slot: pass:normal[xref:#StorageSlot-Uint256Slot[`++Uint256Slot++`]]
  3655. :StringSlot: pass:normal[xref:#StorageSlot-StringSlot[`++StringSlot++`]]
  3656. :BytesSlot: pass:normal[xref:#StorageSlot-BytesSlot[`++BytesSlot++`]]
  3657. :getAddressSlot: pass:normal[xref:#StorageSlot-getAddressSlot-bytes32-[`++getAddressSlot++`]]
  3658. :getBooleanSlot: pass:normal[xref:#StorageSlot-getBooleanSlot-bytes32-[`++getBooleanSlot++`]]
  3659. :getBytes32Slot: pass:normal[xref:#StorageSlot-getBytes32Slot-bytes32-[`++getBytes32Slot++`]]
  3660. :getUint256Slot: pass:normal[xref:#StorageSlot-getUint256Slot-bytes32-[`++getUint256Slot++`]]
  3661. :getStringSlot: pass:normal[xref:#StorageSlot-getStringSlot-bytes32-[`++getStringSlot++`]]
  3662. :getStringSlot: pass:normal[xref:#StorageSlot-getStringSlot-string-[`++getStringSlot++`]]
  3663. :getBytesSlot: pass:normal[xref:#StorageSlot-getBytesSlot-bytes32-[`++getBytesSlot++`]]
  3664. :getBytesSlot: pass:normal[xref:#StorageSlot-getBytesSlot-bytes-[`++getBytesSlot++`]]
  3665. [.contract]
  3666. [[StorageSlot]]
  3667. === `++StorageSlot++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/StorageSlot.sol[{github-icon},role=heading-link]
  3668. [.hljs-theme-light.nopadding]
  3669. ```solidity
  3670. import "@openzeppelin/contracts/utils/StorageSlot.sol";
  3671. ```
  3672. Library for reading and writing primitive types to specific storage slots.
  3673. Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
  3674. This library helps with reading and writing to such slots without the need for inline assembly.
  3675. The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
  3676. Example usage to set ERC1967 implementation slot:
  3677. ```solidity
  3678. contract ERC1967 {
  3679. bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
  3680. function _getImplementation() internal view returns (address) {
  3681. return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
  3682. }
  3683. function _setImplementation(address newImplementation) internal {
  3684. require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
  3685. StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
  3686. }
  3687. }
  3688. ```
  3689. _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
  3690. _Available since v4.9 for `string`, `bytes`._
  3691. [.contract-index]
  3692. .Functions
  3693. --
  3694. * {xref-StorageSlot-getAddressSlot-bytes32-}[`++getAddressSlot(slot)++`]
  3695. * {xref-StorageSlot-getBooleanSlot-bytes32-}[`++getBooleanSlot(slot)++`]
  3696. * {xref-StorageSlot-getBytes32Slot-bytes32-}[`++getBytes32Slot(slot)++`]
  3697. * {xref-StorageSlot-getUint256Slot-bytes32-}[`++getUint256Slot(slot)++`]
  3698. * {xref-StorageSlot-getStringSlot-bytes32-}[`++getStringSlot(slot)++`]
  3699. * {xref-StorageSlot-getStringSlot-string-}[`++getStringSlot(store)++`]
  3700. * {xref-StorageSlot-getBytesSlot-bytes32-}[`++getBytesSlot(slot)++`]
  3701. * {xref-StorageSlot-getBytesSlot-bytes-}[`++getBytesSlot(store)++`]
  3702. --
  3703. [.contract-item]
  3704. [[StorageSlot-getAddressSlot-bytes32-]]
  3705. ==== `[.contract-item-name]#++getAddressSlot++#++(bytes32 slot) → struct StorageSlot.AddressSlot r++` [.item-kind]#internal#
  3706. Returns an `AddressSlot` with member `value` located at `slot`.
  3707. [.contract-item]
  3708. [[StorageSlot-getBooleanSlot-bytes32-]]
  3709. ==== `[.contract-item-name]#++getBooleanSlot++#++(bytes32 slot) → struct StorageSlot.BooleanSlot r++` [.item-kind]#internal#
  3710. Returns an `BooleanSlot` with member `value` located at `slot`.
  3711. [.contract-item]
  3712. [[StorageSlot-getBytes32Slot-bytes32-]]
  3713. ==== `[.contract-item-name]#++getBytes32Slot++#++(bytes32 slot) → struct StorageSlot.Bytes32Slot r++` [.item-kind]#internal#
  3714. Returns an `Bytes32Slot` with member `value` located at `slot`.
  3715. [.contract-item]
  3716. [[StorageSlot-getUint256Slot-bytes32-]]
  3717. ==== `[.contract-item-name]#++getUint256Slot++#++(bytes32 slot) → struct StorageSlot.Uint256Slot r++` [.item-kind]#internal#
  3718. Returns an `Uint256Slot` with member `value` located at `slot`.
  3719. [.contract-item]
  3720. [[StorageSlot-getStringSlot-bytes32-]]
  3721. ==== `[.contract-item-name]#++getStringSlot++#++(bytes32 slot) → struct StorageSlot.StringSlot r++` [.item-kind]#internal#
  3722. Returns an `StringSlot` with member `value` located at `slot`.
  3723. [.contract-item]
  3724. [[StorageSlot-getStringSlot-string-]]
  3725. ==== `[.contract-item-name]#++getStringSlot++#++(string store) → struct StorageSlot.StringSlot r++` [.item-kind]#internal#
  3726. Returns an `StringSlot` representation of the string storage pointer `store`.
  3727. [.contract-item]
  3728. [[StorageSlot-getBytesSlot-bytes32-]]
  3729. ==== `[.contract-item-name]#++getBytesSlot++#++(bytes32 slot) → struct StorageSlot.BytesSlot r++` [.item-kind]#internal#
  3730. Returns an `BytesSlot` with member `value` located at `slot`.
  3731. [.contract-item]
  3732. [[StorageSlot-getBytesSlot-bytes-]]
  3733. ==== `[.contract-item-name]#++getBytesSlot++#++(bytes store) → struct StorageSlot.BytesSlot r++` [.item-kind]#internal#
  3734. Returns an `BytesSlot` representation of the bytes storage pointer `store`.
  3735. :multicall: pass:normal[xref:#Multicall-multicall-bytes---[`++multicall++`]]
  3736. [.contract]
  3737. [[Multicall]]
  3738. === `++Multicall++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/Multicall.sol[{github-icon},role=heading-link]
  3739. [.hljs-theme-light.nopadding]
  3740. ```solidity
  3741. import "@openzeppelin/contracts/utils/Multicall.sol";
  3742. ```
  3743. Provides a function to batch together multiple calls in a single external call.
  3744. _Available since v4.1._
  3745. [.contract-index]
  3746. .Functions
  3747. --
  3748. * {xref-Multicall-multicall-bytes---}[`++multicall(data)++`]
  3749. --
  3750. [.contract-item]
  3751. [[Multicall-multicall-bytes---]]
  3752. ==== `[.contract-item-name]#++multicall++#++(bytes[] data) → bytes[] results++` [.item-kind]#external#
  3753. Receives and executes a batch of function calls on this contract.