utils.adoc 235 KB

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