1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795 |
- :github-icon: pass:[<svg class="icon"><use href="#github-icon"/></svg>]
- :Math: pass:normal[xref:utils.adoc#Math[`Math`]]
- :SignedMath: pass:normal[xref:utils.adoc#SignedMath[`SignedMath`]]
- :SafeCast: pass:normal[xref:utils.adoc#SafeCast[`SafeCast`]]
- :ECDSA: pass:normal[xref:utils.adoc#ECDSA[`ECDSA`]]
- :MessageHashUtils: pass:normal[xref:utils.adoc#MessageHashUtils[`MessageHashUtils`]]
- :P256: pass:normal[xref:utils.adoc#P256[`P256`]]
- :RSA: pass:normal[xref:utils.adoc#RSA[`RSA`]]
- :SignatureChecker: pass:normal[xref:utils.adoc#SignatureChecker[`SignatureChecker`]]
- :Hashes: pass:normal[xref:utils.adoc#Hashes[`Hashes`]]
- :MerkleProof: pass:normal[xref:utils.adoc#MerkleProof[`MerkleProof`]]
- :EIP712: pass:normal[xref:utils.adoc#EIP712[`EIP712`]]
- :ReentrancyGuard: pass:normal[xref:utils.adoc#ReentrancyGuard[`ReentrancyGuard`]]
- :ReentrancyGuardTransient: pass:normal[xref:utils.adoc#ReentrancyGuardTransient[`ReentrancyGuardTransient`]]
- :ReentrancyGuard: pass:normal[xref:utils.adoc#ReentrancyGuard[`ReentrancyGuard`]]
- :Pausable: pass:normal[xref:utils.adoc#Pausable[`Pausable`]]
- :Nonces: pass:normal[xref:utils.adoc#Nonces[`Nonces`]]
- :ERC165: pass:normal[xref:utils.adoc#ERC165[`ERC165`]]
- :ERC165Checker: pass:normal[xref:utils.adoc#ERC165Checker[`ERC165Checker`]]
- :BitMaps: pass:normal[xref:utils.adoc#BitMaps[`BitMaps`]]
- :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
- :EnumerableSet: pass:normal[xref:utils.adoc#EnumerableSet[`EnumerableSet`]]
- :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
- :DoubleEndedQueue: pass:normal[xref:utils.adoc#DoubleEndedQueue[`DoubleEndedQueue`]]
- :CircularBuffer: pass:normal[xref:utils.adoc#CircularBuffer[`CircularBuffer`]]
- :Checkpoints: pass:normal[xref:utils.adoc#Checkpoints[`Checkpoints`]]
- :Heap: pass:normal[xref:utils.adoc#Heap[`Heap`]]
- :MerkleTree: pass:normal[xref:utils.adoc#MerkleTree[`MerkleTree`]]
- :Create2: pass:normal[xref:utils.adoc#Create2[`Create2`]]
- :Address: pass:normal[xref:utils.adoc#Address[`Address`]]
- :Arrays: pass:normal[xref:utils.adoc#Arrays[`Arrays`]]
- :Base64: pass:normal[xref:utils.adoc#Base64[`Base64`]]
- :Strings: pass:normal[xref:utils.adoc#Strings[`Strings`]]
- :ShortString: pass:normal[xref:utils.adoc#ShortString[`ShortString`]]
- :SlotDerivation: pass:normal[xref:utils.adoc#SlotDerivation[`SlotDerivation`]]
- :StorageSlot: pass:normal[xref:utils.adoc#StorageSlot[`StorageSlot`]]
- :TransientSlot: pass:normal[xref:utils.adoc#TransientSlot[`TransientSlot`]]
- :Multicall: pass:normal[xref:utils.adoc#Multicall[`Multicall`]]
- :Context: pass:normal[xref:utils.adoc#Context[`Context`]]
- :Packing: pass:normal[xref:utils.adoc#Packing[`Packing`]]
- :Panic: pass:normal[xref:utils.adoc#Panic[`Panic`]]
- :Comparators: pass:normal[xref:utils.adoc#Comparators[`Comparators`]]
- :Heap: pass:normal[xref:utils.adoc#Heap[`Heap`]]
- :EnumerableMap: pass:normal[xref:utils.adoc#EnumerableMap[`EnumerableMap`]]
- :EnumerableSet: pass:normal[xref:utils.adoc#EnumerableSet[`EnumerableSet`]]
- :xref-Math-tryAdd-uint256-uint256-: xref:utils.adoc#Math-tryAdd-uint256-uint256-
- :xref-Math-trySub-uint256-uint256-: xref:utils.adoc#Math-trySub-uint256-uint256-
- :xref-Math-tryMul-uint256-uint256-: xref:utils.adoc#Math-tryMul-uint256-uint256-
- :xref-Math-tryDiv-uint256-uint256-: xref:utils.adoc#Math-tryDiv-uint256-uint256-
- :xref-Math-tryMod-uint256-uint256-: xref:utils.adoc#Math-tryMod-uint256-uint256-
- :xref-Math-ternary-bool-uint256-uint256-: xref:utils.adoc#Math-ternary-bool-uint256-uint256-
- :xref-Math-max-uint256-uint256-: xref:utils.adoc#Math-max-uint256-uint256-
- :xref-Math-min-uint256-uint256-: xref:utils.adoc#Math-min-uint256-uint256-
- :xref-Math-average-uint256-uint256-: xref:utils.adoc#Math-average-uint256-uint256-
- :xref-Math-ceilDiv-uint256-uint256-: xref:utils.adoc#Math-ceilDiv-uint256-uint256-
- :xref-Math-mulDiv-uint256-uint256-uint256-: xref:utils.adoc#Math-mulDiv-uint256-uint256-uint256-
- :xref-Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-
- :xref-Math-invMod-uint256-uint256-: xref:utils.adoc#Math-invMod-uint256-uint256-
- :xref-Math-invModPrime-uint256-uint256-: xref:utils.adoc#Math-invModPrime-uint256-uint256-
- :xref-Math-modExp-uint256-uint256-uint256-: xref:utils.adoc#Math-modExp-uint256-uint256-uint256-
- :xref-Math-tryModExp-uint256-uint256-uint256-: xref:utils.adoc#Math-tryModExp-uint256-uint256-uint256-
- :xref-Math-modExp-bytes-bytes-bytes-: xref:utils.adoc#Math-modExp-bytes-bytes-bytes-
- :xref-Math-tryModExp-bytes-bytes-bytes-: xref:utils.adoc#Math-tryModExp-bytes-bytes-bytes-
- :xref-Math-sqrt-uint256-: xref:utils.adoc#Math-sqrt-uint256-
- :xref-Math-sqrt-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-sqrt-uint256-enum-Math-Rounding-
- :xref-Math-log2-uint256-: xref:utils.adoc#Math-log2-uint256-
- :xref-Math-log2-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log2-uint256-enum-Math-Rounding-
- :xref-Math-log10-uint256-: xref:utils.adoc#Math-log10-uint256-
- :xref-Math-log10-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log10-uint256-enum-Math-Rounding-
- :xref-Math-log256-uint256-: xref:utils.adoc#Math-log256-uint256-
- :xref-Math-log256-uint256-enum-Math-Rounding-: xref:utils.adoc#Math-log256-uint256-enum-Math-Rounding-
- :xref-Math-unsignedRoundsUp-enum-Math-Rounding-: xref:utils.adoc#Math-unsignedRoundsUp-enum-Math-Rounding-
- :xref-SignedMath-ternary-bool-int256-int256-: xref:utils.adoc#SignedMath-ternary-bool-int256-int256-
- :xref-SignedMath-max-int256-int256-: xref:utils.adoc#SignedMath-max-int256-int256-
- :xref-SignedMath-min-int256-int256-: xref:utils.adoc#SignedMath-min-int256-int256-
- :xref-SignedMath-average-int256-int256-: xref:utils.adoc#SignedMath-average-int256-int256-
- :xref-SignedMath-abs-int256-: xref:utils.adoc#SignedMath-abs-int256-
- :xref-SafeCast-toUint248-uint256-: xref:utils.adoc#SafeCast-toUint248-uint256-
- :xref-SafeCast-toUint240-uint256-: xref:utils.adoc#SafeCast-toUint240-uint256-
- :xref-SafeCast-toUint232-uint256-: xref:utils.adoc#SafeCast-toUint232-uint256-
- :xref-SafeCast-toUint224-uint256-: xref:utils.adoc#SafeCast-toUint224-uint256-
- :xref-SafeCast-toUint216-uint256-: xref:utils.adoc#SafeCast-toUint216-uint256-
- :xref-SafeCast-toUint208-uint256-: xref:utils.adoc#SafeCast-toUint208-uint256-
- :xref-SafeCast-toUint200-uint256-: xref:utils.adoc#SafeCast-toUint200-uint256-
- :xref-SafeCast-toUint192-uint256-: xref:utils.adoc#SafeCast-toUint192-uint256-
- :xref-SafeCast-toUint184-uint256-: xref:utils.adoc#SafeCast-toUint184-uint256-
- :xref-SafeCast-toUint176-uint256-: xref:utils.adoc#SafeCast-toUint176-uint256-
- :xref-SafeCast-toUint168-uint256-: xref:utils.adoc#SafeCast-toUint168-uint256-
- :xref-SafeCast-toUint160-uint256-: xref:utils.adoc#SafeCast-toUint160-uint256-
- :xref-SafeCast-toUint152-uint256-: xref:utils.adoc#SafeCast-toUint152-uint256-
- :xref-SafeCast-toUint144-uint256-: xref:utils.adoc#SafeCast-toUint144-uint256-
- :xref-SafeCast-toUint136-uint256-: xref:utils.adoc#SafeCast-toUint136-uint256-
- :xref-SafeCast-toUint128-uint256-: xref:utils.adoc#SafeCast-toUint128-uint256-
- :xref-SafeCast-toUint120-uint256-: xref:utils.adoc#SafeCast-toUint120-uint256-
- :xref-SafeCast-toUint112-uint256-: xref:utils.adoc#SafeCast-toUint112-uint256-
- :xref-SafeCast-toUint104-uint256-: xref:utils.adoc#SafeCast-toUint104-uint256-
- :xref-SafeCast-toUint96-uint256-: xref:utils.adoc#SafeCast-toUint96-uint256-
- :xref-SafeCast-toUint88-uint256-: xref:utils.adoc#SafeCast-toUint88-uint256-
- :xref-SafeCast-toUint80-uint256-: xref:utils.adoc#SafeCast-toUint80-uint256-
- :xref-SafeCast-toUint72-uint256-: xref:utils.adoc#SafeCast-toUint72-uint256-
- :xref-SafeCast-toUint64-uint256-: xref:utils.adoc#SafeCast-toUint64-uint256-
- :xref-SafeCast-toUint56-uint256-: xref:utils.adoc#SafeCast-toUint56-uint256-
- :xref-SafeCast-toUint48-uint256-: xref:utils.adoc#SafeCast-toUint48-uint256-
- :xref-SafeCast-toUint40-uint256-: xref:utils.adoc#SafeCast-toUint40-uint256-
- :xref-SafeCast-toUint32-uint256-: xref:utils.adoc#SafeCast-toUint32-uint256-
- :xref-SafeCast-toUint24-uint256-: xref:utils.adoc#SafeCast-toUint24-uint256-
- :xref-SafeCast-toUint16-uint256-: xref:utils.adoc#SafeCast-toUint16-uint256-
- :xref-SafeCast-toUint8-uint256-: xref:utils.adoc#SafeCast-toUint8-uint256-
- :xref-SafeCast-toUint256-int256-: xref:utils.adoc#SafeCast-toUint256-int256-
- :xref-SafeCast-toInt248-int256-: xref:utils.adoc#SafeCast-toInt248-int256-
- :xref-SafeCast-toInt240-int256-: xref:utils.adoc#SafeCast-toInt240-int256-
- :xref-SafeCast-toInt232-int256-: xref:utils.adoc#SafeCast-toInt232-int256-
- :xref-SafeCast-toInt224-int256-: xref:utils.adoc#SafeCast-toInt224-int256-
- :xref-SafeCast-toInt216-int256-: xref:utils.adoc#SafeCast-toInt216-int256-
- :xref-SafeCast-toInt208-int256-: xref:utils.adoc#SafeCast-toInt208-int256-
- :xref-SafeCast-toInt200-int256-: xref:utils.adoc#SafeCast-toInt200-int256-
- :xref-SafeCast-toInt192-int256-: xref:utils.adoc#SafeCast-toInt192-int256-
- :xref-SafeCast-toInt184-int256-: xref:utils.adoc#SafeCast-toInt184-int256-
- :xref-SafeCast-toInt176-int256-: xref:utils.adoc#SafeCast-toInt176-int256-
- :xref-SafeCast-toInt168-int256-: xref:utils.adoc#SafeCast-toInt168-int256-
- :xref-SafeCast-toInt160-int256-: xref:utils.adoc#SafeCast-toInt160-int256-
- :xref-SafeCast-toInt152-int256-: xref:utils.adoc#SafeCast-toInt152-int256-
- :xref-SafeCast-toInt144-int256-: xref:utils.adoc#SafeCast-toInt144-int256-
- :xref-SafeCast-toInt136-int256-: xref:utils.adoc#SafeCast-toInt136-int256-
- :xref-SafeCast-toInt128-int256-: xref:utils.adoc#SafeCast-toInt128-int256-
- :xref-SafeCast-toInt120-int256-: xref:utils.adoc#SafeCast-toInt120-int256-
- :xref-SafeCast-toInt112-int256-: xref:utils.adoc#SafeCast-toInt112-int256-
- :xref-SafeCast-toInt104-int256-: xref:utils.adoc#SafeCast-toInt104-int256-
- :xref-SafeCast-toInt96-int256-: xref:utils.adoc#SafeCast-toInt96-int256-
- :xref-SafeCast-toInt88-int256-: xref:utils.adoc#SafeCast-toInt88-int256-
- :xref-SafeCast-toInt80-int256-: xref:utils.adoc#SafeCast-toInt80-int256-
- :xref-SafeCast-toInt72-int256-: xref:utils.adoc#SafeCast-toInt72-int256-
- :xref-SafeCast-toInt64-int256-: xref:utils.adoc#SafeCast-toInt64-int256-
- :xref-SafeCast-toInt56-int256-: xref:utils.adoc#SafeCast-toInt56-int256-
- :xref-SafeCast-toInt48-int256-: xref:utils.adoc#SafeCast-toInt48-int256-
- :xref-SafeCast-toInt40-int256-: xref:utils.adoc#SafeCast-toInt40-int256-
- :xref-SafeCast-toInt32-int256-: xref:utils.adoc#SafeCast-toInt32-int256-
- :xref-SafeCast-toInt24-int256-: xref:utils.adoc#SafeCast-toInt24-int256-
- :xref-SafeCast-toInt16-int256-: xref:utils.adoc#SafeCast-toInt16-int256-
- :xref-SafeCast-toInt8-int256-: xref:utils.adoc#SafeCast-toInt8-int256-
- :xref-SafeCast-toInt256-uint256-: xref:utils.adoc#SafeCast-toInt256-uint256-
- :xref-SafeCast-toUint-bool-: xref:utils.adoc#SafeCast-toUint-bool-
- :xref-SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-: xref:utils.adoc#SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-
- :xref-SafeCast-SafeCastOverflowedIntToUint-int256-: xref:utils.adoc#SafeCast-SafeCastOverflowedIntToUint-int256-
- :xref-SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-: xref:utils.adoc#SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-
- :xref-SafeCast-SafeCastOverflowedUintToInt-uint256-: xref:utils.adoc#SafeCast-SafeCastOverflowedUintToInt-uint256-
- :xref-ECDSA-tryRecover-bytes32-bytes-: xref:utils.adoc#ECDSA-tryRecover-bytes32-bytes-
- :xref-ECDSA-recover-bytes32-bytes-: xref:utils.adoc#ECDSA-recover-bytes32-bytes-
- :xref-ECDSA-tryRecover-bytes32-bytes32-bytes32-: xref:utils.adoc#ECDSA-tryRecover-bytes32-bytes32-bytes32-
- :xref-ECDSA-recover-bytes32-bytes32-bytes32-: xref:utils.adoc#ECDSA-recover-bytes32-bytes32-bytes32-
- :xref-ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-
- :xref-ECDSA-recover-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-
- :xref-ECDSA-ECDSAInvalidSignature--: xref:utils.adoc#ECDSA-ECDSAInvalidSignature--
- :xref-ECDSA-ECDSAInvalidSignatureLength-uint256-: xref:utils.adoc#ECDSA-ECDSAInvalidSignatureLength-uint256-
- :xref-ECDSA-ECDSAInvalidSignatureS-bytes32-: xref:utils.adoc#ECDSA-ECDSAInvalidSignatureS-bytes32-
- :MessageHashUtils-toEthSignedMessageHash: pass:normal[xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes-[`MessageHashUtils.toEthSignedMessageHash`]]
- :MessageHashUtils-toEthSignedMessageHash: pass:normal[xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes-[`MessageHashUtils.toEthSignedMessageHash`]]
- :ECDSA-tryRecover: pass:normal[xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`ECDSA.tryRecover`]]
- :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
- :ECDSA-tryRecover: pass:normal[xref:utils.adoc#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`ECDSA.tryRecover`]]
- :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
- :xref-P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-: xref:utils.adoc#P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-
- :xref-P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-: xref:utils.adoc#P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-
- :xref-P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-: xref:utils.adoc#P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-
- :xref-P256-recovery-bytes32-uint8-bytes32-bytes32-: xref:utils.adoc#P256-recovery-bytes32-uint8-bytes32-bytes32-
- :xref-P256-isValidPublicKey-bytes32-bytes32-: xref:utils.adoc#P256-isValidPublicKey-bytes32-bytes32-
- :xref-P256-GX-uint256: xref:utils.adoc#P256-GX-uint256
- :xref-P256-GY-uint256: xref:utils.adoc#P256-GY-uint256
- :xref-P256-P-uint256: xref:utils.adoc#P256-P-uint256
- :xref-P256-N-uint256: xref:utils.adoc#P256-N-uint256
- :xref-P256-A-uint256: xref:utils.adoc#P256-A-uint256
- :xref-P256-B-uint256: xref:utils.adoc#P256-B-uint256
- :xref-RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-: xref:utils.adoc#RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-
- :xref-RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-: xref:utils.adoc#RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-
- :xref-EIP712-constructor-string-string-: xref:utils.adoc#EIP712-constructor-string-string-
- :xref-EIP712-_domainSeparatorV4--: xref:utils.adoc#EIP712-_domainSeparatorV4--
- :xref-EIP712-_hashTypedDataV4-bytes32-: xref:utils.adoc#EIP712-_hashTypedDataV4-bytes32-
- :xref-EIP712-eip712Domain--: xref:utils.adoc#EIP712-eip712Domain--
- :xref-EIP712-_EIP712Name--: xref:utils.adoc#EIP712-_EIP712Name--
- :xref-EIP712-_EIP712Version--: xref:utils.adoc#EIP712-_EIP712Version--
- :xref-IERC5267-EIP712DomainChanged--: xref:interfaces.adoc#IERC5267-EIP712DomainChanged--
- :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
- :ECDSA: pass:normal[xref:utils.adoc#ECDSA[`ECDSA`]]
- :xref-MessageHashUtils-toEthSignedMessageHash-bytes32-: xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes32-
- :xref-MessageHashUtils-toEthSignedMessageHash-bytes-: xref:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes-
- :xref-MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-: xref:utils.adoc#MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-
- :xref-MessageHashUtils-toTypedDataHash-bytes32-bytes32-: xref:utils.adoc#MessageHashUtils-toTypedDataHash-bytes32-bytes32-
- :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
- :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
- :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
- :ECDSA-recover: pass:normal[xref:utils.adoc#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`ECDSA.recover`]]
- :xref-SignatureChecker-isValidSignatureNow-address-bytes32-bytes-: xref:utils.adoc#SignatureChecker-isValidSignatureNow-address-bytes32-bytes-
- :xref-SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-: xref:utils.adoc#SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-
- :xref-Hashes-commutativeKeccak256-bytes32-bytes32-: xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-
- :xref-MerkleProof-verify-bytes32---bytes32-bytes32-: xref:utils.adoc#MerkleProof-verify-bytes32---bytes32-bytes32-
- :xref-MerkleProof-processProof-bytes32---bytes32-: xref:utils.adoc#MerkleProof-processProof-bytes32---bytes32-
- :xref-MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--
- :xref-MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--
- :xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-: xref:utils.adoc#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-
- :xref-MerkleProof-processProofCalldata-bytes32---bytes32-: xref:utils.adoc#MerkleProof-processProofCalldata-bytes32---bytes32-
- :xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--
- :xref-MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--
- :xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---: xref:utils.adoc#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---
- :xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---: xref:utils.adoc#MerkleProof-processMultiProof-bytes32---bool---bytes32---
- :xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--
- :xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--
- :xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---: xref:utils.adoc#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---
- :xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---: xref:utils.adoc#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---
- :xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--
- :xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--
- :xref-MerkleProof-MerkleProofInvalidMultiproof--: xref:utils.adoc#MerkleProof-MerkleProofInvalidMultiproof--
- :ReentrancyGuardTransient: pass:normal[xref:utils.adoc#ReentrancyGuardTransient[`ReentrancyGuardTransient`]]
- :xref-ReentrancyGuard-nonReentrant--: xref:utils.adoc#ReentrancyGuard-nonReentrant--
- :xref-ReentrancyGuard-constructor--: xref:utils.adoc#ReentrancyGuard-constructor--
- :xref-ReentrancyGuard-_reentrancyGuardEntered--: xref:utils.adoc#ReentrancyGuard-_reentrancyGuardEntered--
- :xref-ReentrancyGuard-ReentrancyGuardReentrantCall--: xref:utils.adoc#ReentrancyGuard-ReentrancyGuardReentrantCall--
- :ReentrancyGuard: pass:normal[xref:utils.adoc#ReentrancyGuard[`ReentrancyGuard`]]
- :xref-ReentrancyGuardTransient-nonReentrant--: xref:utils.adoc#ReentrancyGuardTransient-nonReentrant--
- :xref-ReentrancyGuardTransient-_reentrancyGuardEntered--: xref:utils.adoc#ReentrancyGuardTransient-_reentrancyGuardEntered--
- :xref-ReentrancyGuardTransient-ReentrancyGuardReentrantCall--: xref:utils.adoc#ReentrancyGuardTransient-ReentrancyGuardReentrantCall--
- :xref-Pausable-whenNotPaused--: xref:utils.adoc#Pausable-whenNotPaused--
- :xref-Pausable-whenPaused--: xref:utils.adoc#Pausable-whenPaused--
- :xref-Pausable-constructor--: xref:utils.adoc#Pausable-constructor--
- :xref-Pausable-paused--: xref:utils.adoc#Pausable-paused--
- :xref-Pausable-_requireNotPaused--: xref:utils.adoc#Pausable-_requireNotPaused--
- :xref-Pausable-_requirePaused--: xref:utils.adoc#Pausable-_requirePaused--
- :xref-Pausable-_pause--: xref:utils.adoc#Pausable-_pause--
- :xref-Pausable-_unpause--: xref:utils.adoc#Pausable-_unpause--
- :xref-Pausable-Paused-address-: xref:utils.adoc#Pausable-Paused-address-
- :xref-Pausable-Unpaused-address-: xref:utils.adoc#Pausable-Unpaused-address-
- :xref-Pausable-EnforcedPause--: xref:utils.adoc#Pausable-EnforcedPause--
- :xref-Pausable-ExpectedPause--: xref:utils.adoc#Pausable-ExpectedPause--
- :xref-Nonces-nonces-address-: xref:utils.adoc#Nonces-nonces-address-
- :xref-Nonces-_useNonce-address-: xref:utils.adoc#Nonces-_useNonce-address-
- :xref-Nonces-_useCheckedNonce-address-uint256-: xref:utils.adoc#Nonces-_useCheckedNonce-address-uint256-
- :xref-Nonces-InvalidAccountNonce-address-uint256-: xref:utils.adoc#Nonces-InvalidAccountNonce-address-uint256-
- :ERC165Checker: pass:normal[xref:utils.adoc#ERC165Checker[`ERC165Checker`]]
- :ERC165: pass:normal[xref:utils.adoc#ERC165[`ERC165`]]
- :xref-IERC165-supportsInterface-bytes4-: xref:utils.adoc#IERC165-supportsInterface-bytes4-
- :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
- :xref-ERC165-supportsInterface-bytes4-: xref:utils.adoc#ERC165-supportsInterface-bytes4-
- :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
- :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
- :xref-ERC165Checker-supportsERC165-address-: xref:utils.adoc#ERC165Checker-supportsERC165-address-
- :xref-ERC165Checker-supportsInterface-address-bytes4-: xref:utils.adoc#ERC165Checker-supportsInterface-address-bytes4-
- :xref-ERC165Checker-getSupportedInterfaces-address-bytes4---: xref:utils.adoc#ERC165Checker-getSupportedInterfaces-address-bytes4---
- :xref-ERC165Checker-supportsAllInterfaces-address-bytes4---: xref:utils.adoc#ERC165Checker-supportsAllInterfaces-address-bytes4---
- :xref-ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-: xref:utils.adoc#ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-
- :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
- :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
- :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
- :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
- :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
- :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
- :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
- :xref-BitMaps-get-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-get-struct-BitMaps-BitMap-uint256-
- :xref-BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-: xref:utils.adoc#BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-
- :xref-BitMaps-set-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-set-struct-BitMaps-BitMap-uint256-
- :xref-BitMaps-unset-struct-BitMaps-BitMap-uint256-: xref:utils.adoc#BitMaps-unset-struct-BitMaps-BitMap-uint256-
- :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-
- :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
- :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
- :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-
- :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-
- :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
- :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-
- :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-
- :xref-EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-
- :xref-EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-
- :xref-EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-
- :xref-EnumerableMap-length-struct-EnumerableMap-UintToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToUintMap-
- :xref-EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-
- :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-
- :xref-EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-
- :xref-EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-
- :xref-EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-
- :xref-EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-
- :xref-EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-
- :xref-EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-
- :xref-EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-
- :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-
- :xref-EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-
- :xref-EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-
- :xref-EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-
- :xref-EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-
- :xref-EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-
- :xref-EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-
- :xref-EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-
- :xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-
- :xref-EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-
- :xref-EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-
- :xref-EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-
- :xref-EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-
- :xref-EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-
- :xref-EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-
- :xref-EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-
- :xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-
- :xref-EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-
- :xref-EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-
- :xref-EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-
- :xref-EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-
- :xref-EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-
- :xref-EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-
- :xref-EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-
- :xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-
- :xref-EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-
- :xref-EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-
- :xref-EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-
- :xref-EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-
- :xref-EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-
- :xref-EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-
- :xref-EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-
- :xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-
- :xref-EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-
- :xref-EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-
- :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-
- :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
- :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
- :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-
- :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-
- :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
- :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-
- :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-
- :xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-: xref:utils.adoc#EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-
- :xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
- :xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
- :xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-: xref:utils.adoc#EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-
- :xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-: xref:utils.adoc#EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-
- :xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
- :xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-: xref:utils.adoc#EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-
- :xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-: xref:utils.adoc#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-
- :xref-EnumerableMap-EnumerableMapNonexistentKey-bytes32-: xref:utils.adoc#EnumerableMap-EnumerableMapNonexistentKey-bytes32-
- :xref-EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-
- :xref-EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-
- :xref-EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-
- :xref-EnumerableSet-length-struct-EnumerableSet-Bytes32Set-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-Bytes32Set-
- :xref-EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-
- :xref-EnumerableSet-values-struct-EnumerableSet-Bytes32Set-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-Bytes32Set-
- :xref-EnumerableSet-add-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-AddressSet-address-
- :xref-EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-
- :xref-EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-
- :xref-EnumerableSet-length-struct-EnumerableSet-AddressSet-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-AddressSet-
- :xref-EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-
- :xref-EnumerableSet-values-struct-EnumerableSet-AddressSet-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-AddressSet-
- :xref-EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-
- :xref-EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-
- :xref-EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-
- :xref-EnumerableSet-length-struct-EnumerableSet-UintSet-: xref:utils.adoc#EnumerableSet-length-struct-EnumerableSet-UintSet-
- :xref-EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-: xref:utils.adoc#EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-
- :xref-EnumerableSet-values-struct-EnumerableSet-UintSet-: xref:utils.adoc#EnumerableSet-values-struct-EnumerableSet-UintSet-
- :xref-DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-: xref:utils.adoc#DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-
- :xref-DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-
- :xref-DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-: xref:utils.adoc#DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-
- :xref-DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-
- :xref-DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-
- :xref-DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-
- :xref-DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-: xref:utils.adoc#DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-
- :xref-DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-
- :xref-DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-
- :xref-DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-: xref:utils.adoc#DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-
- :Panic-RESOURCE_ERROR: pass:normal[xref:utils.adoc#Panic-RESOURCE_ERROR-uint256[`Panic.RESOURCE_ERROR`]]
- :Panic-EMPTY_ARRAY_POP: pass:normal[xref:utils.adoc#Panic-EMPTY_ARRAY_POP-uint256[`Panic.EMPTY_ARRAY_POP`]]
- :Panic-RESOURCE_ERROR: pass:normal[xref:utils.adoc#Panic-RESOURCE_ERROR-uint256[`Panic.RESOURCE_ERROR`]]
- :Panic-EMPTY_ARRAY_POP: pass:normal[xref:utils.adoc#Panic-EMPTY_ARRAY_POP-uint256[`Panic.EMPTY_ARRAY_POP`]]
- :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
- :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
- :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
- :xref-CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-: xref:utils.adoc#CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-
- :xref-CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-: xref:utils.adoc#CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-
- :xref-CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-: xref:utils.adoc#CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-
- :xref-CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-: xref:utils.adoc#CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-
- :xref-CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-: xref:utils.adoc#CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-
- :xref-CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-: xref:utils.adoc#CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-
- :xref-CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-: xref:utils.adoc#CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-
- :xref-CircularBuffer-InvalidBufferSize--: xref:utils.adoc#CircularBuffer-InvalidBufferSize--
- :Panic-ARRAY_OUT_OF_BOUNDS: pass:normal[xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`Panic.ARRAY_OUT_OF_BOUNDS`]]
- :Votes: pass:normal[xref:governance.adoc#Votes[`Votes`]]
- :xref-Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-
- :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-
- :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-
- :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-
- :xref-Checkpoints-latest-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace224-
- :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-
- :xref-Checkpoints-length-struct-Checkpoints-Trace224-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace224-
- :xref-Checkpoints-at-struct-Checkpoints-Trace224-uint32-: xref:utils.adoc#Checkpoints-at-struct-Checkpoints-Trace224-uint32-
- :xref-Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-
- :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-
- :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-
- :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-
- :xref-Checkpoints-latest-struct-Checkpoints-Trace208-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace208-
- :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-
- :xref-Checkpoints-length-struct-Checkpoints-Trace208-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace208-
- :xref-Checkpoints-at-struct-Checkpoints-Trace208-uint32-: xref:utils.adoc#Checkpoints-at-struct-Checkpoints-Trace208-uint32-
- :xref-Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-: xref:utils.adoc#Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-
- :xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-
- :xref-Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-
- :xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-: xref:utils.adoc#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-
- :xref-Checkpoints-latest-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-latest-struct-Checkpoints-Trace160-
- :xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-
- :xref-Checkpoints-length-struct-Checkpoints-Trace160-: xref:utils.adoc#Checkpoints-length-struct-Checkpoints-Trace160-
- :xref-Checkpoints-at-struct-Checkpoints-Trace160-uint32-: xref:utils.adoc#Checkpoints-at-struct-Checkpoints-Trace160-uint32-
- :xref-Checkpoints-CheckpointUnorderedInsertion--: xref:utils.adoc#Checkpoints-CheckpointUnorderedInsertion--
- :xref-Heap-peek-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-peek-struct-Heap-Uint256Heap-
- :xref-Heap-pop-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-pop-struct-Heap-Uint256Heap-
- :xref-Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--: xref:utils.adoc#Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--
- :xref-Heap-insert-struct-Heap-Uint256Heap-uint256-: xref:utils.adoc#Heap-insert-struct-Heap-Uint256Heap-uint256-
- :xref-Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--: xref:utils.adoc#Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--
- :xref-Heap-replace-struct-Heap-Uint256Heap-uint256-: xref:utils.adoc#Heap-replace-struct-Heap-Uint256Heap-uint256-
- :xref-Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--: xref:utils.adoc#Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--
- :xref-Heap-length-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-length-struct-Heap-Uint256Heap-
- :xref-Heap-clear-struct-Heap-Uint256Heap-: xref:utils.adoc#Heap-clear-struct-Heap-Uint256Heap-
- :MerkleProof: pass:normal[xref:utils.adoc#MerkleProof[`MerkleProof`]]
- :Hashes-commutativeKeccak256: pass:normal[xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-[`Hashes.commutativeKeccak256`]]
- :MerkleProof: pass:normal[xref:utils.adoc#MerkleProof[`MerkleProof`]]
- :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-
- :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--
- :xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-: xref:utils.adoc#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-
- :xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--: xref:utils.adoc#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--
- :xref-MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-: xref:utils.adoc#MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-
- :Hashes-commutativeKeccak256: pass:normal[xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-[`Hashes.commutativeKeccak256`]]
- :xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-: xref:utils.adoc#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-
- :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-
- :Hashes-commutativeKeccak256: pass:normal[xref:utils.adoc#Hashes-commutativeKeccak256-bytes32-bytes32-[`Hashes.commutativeKeccak256`]]
- :xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-: xref:utils.adoc#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-
- :xref-Create2-deploy-uint256-bytes32-bytes-: xref:utils.adoc#Create2-deploy-uint256-bytes32-bytes-
- :xref-Create2-computeAddress-bytes32-bytes32-: xref:utils.adoc#Create2-computeAddress-bytes32-bytes32-
- :xref-Create2-computeAddress-bytes32-bytes32-address-: xref:utils.adoc#Create2-computeAddress-bytes32-bytes32-address-
- :xref-Create2-Create2EmptyBytecode--: xref:utils.adoc#Create2-Create2EmptyBytecode--
- :xref-Address-sendValue-address-payable-uint256-: xref:utils.adoc#Address-sendValue-address-payable-uint256-
- :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
- :xref-Address-functionCallWithValue-address-bytes-uint256-: xref:utils.adoc#Address-functionCallWithValue-address-bytes-uint256-
- :xref-Address-functionStaticCall-address-bytes-: xref:utils.adoc#Address-functionStaticCall-address-bytes-
- :xref-Address-functionDelegateCall-address-bytes-: xref:utils.adoc#Address-functionDelegateCall-address-bytes-
- :xref-Address-verifyCallResultFromTarget-address-bool-bytes-: xref:utils.adoc#Address-verifyCallResultFromTarget-address-bool-bytes-
- :xref-Address-verifyCallResult-bool-bytes-: xref:utils.adoc#Address-verifyCallResult-bool-bytes-
- :xref-Address-AddressEmptyCode-address-: xref:utils.adoc#Address-AddressEmptyCode-address-
- :ReentrancyGuard: pass:normal[xref:utils.adoc#ReentrancyGuard[`ReentrancyGuard`]]
- :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
- :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
- :xref-Address-functionCall-address-bytes-: xref:utils.adoc#Address-functionCall-address-bytes-
- :xref-Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--: xref:utils.adoc#Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--
- :xref-Arrays-sort-uint256---: xref:utils.adoc#Arrays-sort-uint256---
- :xref-Arrays-sort-address---function--address-address--pure-returns--bool--: xref:utils.adoc#Arrays-sort-address---function--address-address--pure-returns--bool--
- :xref-Arrays-sort-address---: xref:utils.adoc#Arrays-sort-address---
- :xref-Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--: xref:utils.adoc#Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--
- :xref-Arrays-sort-bytes32---: xref:utils.adoc#Arrays-sort-bytes32---
- :xref-Arrays-findUpperBound-uint256---uint256-: xref:utils.adoc#Arrays-findUpperBound-uint256---uint256-
- :xref-Arrays-lowerBound-uint256---uint256-: xref:utils.adoc#Arrays-lowerBound-uint256---uint256-
- :xref-Arrays-upperBound-uint256---uint256-: xref:utils.adoc#Arrays-upperBound-uint256---uint256-
- :xref-Arrays-lowerBoundMemory-uint256---uint256-: xref:utils.adoc#Arrays-lowerBoundMemory-uint256---uint256-
- :xref-Arrays-upperBoundMemory-uint256---uint256-: xref:utils.adoc#Arrays-upperBoundMemory-uint256---uint256-
- :xref-Arrays-unsafeAccess-address---uint256-: xref:utils.adoc#Arrays-unsafeAccess-address---uint256-
- :xref-Arrays-unsafeAccess-bytes32---uint256-: xref:utils.adoc#Arrays-unsafeAccess-bytes32---uint256-
- :xref-Arrays-unsafeAccess-uint256---uint256-: xref:utils.adoc#Arrays-unsafeAccess-uint256---uint256-
- :xref-Arrays-unsafeMemoryAccess-address---uint256-: xref:utils.adoc#Arrays-unsafeMemoryAccess-address---uint256-
- :xref-Arrays-unsafeMemoryAccess-bytes32---uint256-: xref:utils.adoc#Arrays-unsafeMemoryAccess-bytes32---uint256-
- :xref-Arrays-unsafeMemoryAccess-uint256---uint256-: xref:utils.adoc#Arrays-unsafeMemoryAccess-uint256---uint256-
- :xref-Arrays-unsafeSetLength-address---uint256-: xref:utils.adoc#Arrays-unsafeSetLength-address---uint256-
- :xref-Arrays-unsafeSetLength-bytes32---uint256-: xref:utils.adoc#Arrays-unsafeSetLength-bytes32---uint256-
- :xref-Arrays-unsafeSetLength-uint256---uint256-: xref:utils.adoc#Arrays-unsafeSetLength-uint256---uint256-
- :xref-Base64-encode-bytes-: xref:utils.adoc#Base64-encode-bytes-
- :xref-Base64-encodeURL-bytes-: xref:utils.adoc#Base64-encodeURL-bytes-
- :xref-Base64-_TABLE-string: xref:utils.adoc#Base64-_TABLE-string
- :xref-Base64-_TABLE_URL-string: xref:utils.adoc#Base64-_TABLE_URL-string
- :xref-Strings-toString-uint256-: xref:utils.adoc#Strings-toString-uint256-
- :xref-Strings-toStringSigned-int256-: xref:utils.adoc#Strings-toStringSigned-int256-
- :xref-Strings-toHexString-uint256-: xref:utils.adoc#Strings-toHexString-uint256-
- :xref-Strings-toHexString-uint256-uint256-: xref:utils.adoc#Strings-toHexString-uint256-uint256-
- :xref-Strings-toHexString-address-: xref:utils.adoc#Strings-toHexString-address-
- :xref-Strings-toChecksumHexString-address-: xref:utils.adoc#Strings-toChecksumHexString-address-
- :xref-Strings-equal-string-string-: xref:utils.adoc#Strings-equal-string-string-
- :xref-Strings-StringsInsufficientHexLength-uint256-uint256-: xref:utils.adoc#Strings-StringsInsufficientHexLength-uint256-uint256-
- :xref-ShortStrings-toShortString-string-: xref:utils.adoc#ShortStrings-toShortString-string-
- :xref-ShortStrings-toString-ShortString-: xref:utils.adoc#ShortStrings-toString-ShortString-
- :xref-ShortStrings-byteLength-ShortString-: xref:utils.adoc#ShortStrings-byteLength-ShortString-
- :xref-ShortStrings-toShortStringWithFallback-string-string-: xref:utils.adoc#ShortStrings-toShortStringWithFallback-string-string-
- :xref-ShortStrings-toStringWithFallback-ShortString-string-: xref:utils.adoc#ShortStrings-toStringWithFallback-ShortString-string-
- :xref-ShortStrings-byteLengthWithFallback-ShortString-string-: xref:utils.adoc#ShortStrings-byteLengthWithFallback-ShortString-string-
- :xref-ShortStrings-StringTooLong-string-: xref:utils.adoc#ShortStrings-StringTooLong-string-
- :xref-ShortStrings-InvalidShortString--: xref:utils.adoc#ShortStrings-InvalidShortString--
- :StorageSlot: pass:normal[xref:utils.adoc#StorageSlot[`StorageSlot`]]
- :xref-SlotDerivation-erc7201Slot-string-: xref:utils.adoc#SlotDerivation-erc7201Slot-string-
- :xref-SlotDerivation-offset-bytes32-uint256-: xref:utils.adoc#SlotDerivation-offset-bytes32-uint256-
- :xref-SlotDerivation-deriveArray-bytes32-: xref:utils.adoc#SlotDerivation-deriveArray-bytes32-
- :xref-SlotDerivation-deriveMapping-bytes32-address-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-address-
- :xref-SlotDerivation-deriveMapping-bytes32-bool-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-bool-
- :xref-SlotDerivation-deriveMapping-bytes32-bytes32-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-bytes32-
- :xref-SlotDerivation-deriveMapping-bytes32-uint256-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-uint256-
- :xref-SlotDerivation-deriveMapping-bytes32-int256-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-int256-
- :xref-SlotDerivation-deriveMapping-bytes32-string-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-string-
- :xref-SlotDerivation-deriveMapping-bytes32-bytes-: xref:utils.adoc#SlotDerivation-deriveMapping-bytes32-bytes-
- :SlotDerivation: pass:normal[xref:utils.adoc#SlotDerivation[`SlotDerivation`]]
- :xref-StorageSlot-getAddressSlot-bytes32-: xref:utils.adoc#StorageSlot-getAddressSlot-bytes32-
- :xref-StorageSlot-getBooleanSlot-bytes32-: xref:utils.adoc#StorageSlot-getBooleanSlot-bytes32-
- :xref-StorageSlot-getBytes32Slot-bytes32-: xref:utils.adoc#StorageSlot-getBytes32Slot-bytes32-
- :xref-StorageSlot-getUint256Slot-bytes32-: xref:utils.adoc#StorageSlot-getUint256Slot-bytes32-
- :xref-StorageSlot-getInt256Slot-bytes32-: xref:utils.adoc#StorageSlot-getInt256Slot-bytes32-
- :xref-StorageSlot-getStringSlot-bytes32-: xref:utils.adoc#StorageSlot-getStringSlot-bytes32-
- :xref-StorageSlot-getStringSlot-string-: xref:utils.adoc#StorageSlot-getStringSlot-string-
- :xref-StorageSlot-getBytesSlot-bytes32-: xref:utils.adoc#StorageSlot-getBytesSlot-bytes32-
- :xref-StorageSlot-getBytesSlot-bytes-: xref:utils.adoc#StorageSlot-getBytesSlot-bytes-
- :SlotDerivation: pass:normal[xref:utils.adoc#SlotDerivation[`SlotDerivation`]]
- :xref-TransientSlot-asAddress-bytes32-: xref:utils.adoc#TransientSlot-asAddress-bytes32-
- :xref-TransientSlot-asBoolean-bytes32-: xref:utils.adoc#TransientSlot-asBoolean-bytes32-
- :xref-TransientSlot-asBytes32-bytes32-: xref:utils.adoc#TransientSlot-asBytes32-bytes32-
- :xref-TransientSlot-asUint256-bytes32-: xref:utils.adoc#TransientSlot-asUint256-bytes32-
- :xref-TransientSlot-asInt256-bytes32-: xref:utils.adoc#TransientSlot-asInt256-bytes32-
- :xref-TransientSlot-tload-TransientSlot-AddressSlot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-AddressSlot-
- :xref-TransientSlot-tstore-TransientSlot-AddressSlot-address-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-AddressSlot-address-
- :xref-TransientSlot-tload-TransientSlot-BooleanSlot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-BooleanSlot-
- :xref-TransientSlot-tstore-TransientSlot-BooleanSlot-bool-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-BooleanSlot-bool-
- :xref-TransientSlot-tload-TransientSlot-Bytes32Slot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-Bytes32Slot-
- :xref-TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-
- :xref-TransientSlot-tload-TransientSlot-Uint256Slot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-Uint256Slot-
- :xref-TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-
- :xref-TransientSlot-tload-TransientSlot-Int256Slot-: xref:utils.adoc#TransientSlot-tload-TransientSlot-Int256Slot-
- :xref-TransientSlot-tstore-TransientSlot-Int256Slot-int256-: xref:utils.adoc#TransientSlot-tstore-TransientSlot-Int256Slot-int256-
- :ERC2771Context: pass:normal[xref:metatx.adoc#ERC2771Context[`ERC2771Context`]]
- :xref-Multicall-multicall-bytes---: xref:utils.adoc#Multicall-multicall-bytes---
- :xref-Context-_msgSender--: xref:utils.adoc#Context-_msgSender--
- :xref-Context-_msgData--: xref:utils.adoc#Context-_msgData--
- :xref-Context-_contextSuffixLength--: xref:utils.adoc#Context-_contextSuffixLength--
- :xref-Packing-pack_1_1-bytes1-bytes1-: xref:utils.adoc#Packing-pack_1_1-bytes1-bytes1-
- :xref-Packing-pack_2_2-bytes2-bytes2-: xref:utils.adoc#Packing-pack_2_2-bytes2-bytes2-
- :xref-Packing-pack_2_4-bytes2-bytes4-: xref:utils.adoc#Packing-pack_2_4-bytes2-bytes4-
- :xref-Packing-pack_2_6-bytes2-bytes6-: xref:utils.adoc#Packing-pack_2_6-bytes2-bytes6-
- :xref-Packing-pack_4_2-bytes4-bytes2-: xref:utils.adoc#Packing-pack_4_2-bytes4-bytes2-
- :xref-Packing-pack_4_4-bytes4-bytes4-: xref:utils.adoc#Packing-pack_4_4-bytes4-bytes4-
- :xref-Packing-pack_4_8-bytes4-bytes8-: xref:utils.adoc#Packing-pack_4_8-bytes4-bytes8-
- :xref-Packing-pack_4_12-bytes4-bytes12-: xref:utils.adoc#Packing-pack_4_12-bytes4-bytes12-
- :xref-Packing-pack_4_16-bytes4-bytes16-: xref:utils.adoc#Packing-pack_4_16-bytes4-bytes16-
- :xref-Packing-pack_4_20-bytes4-bytes20-: xref:utils.adoc#Packing-pack_4_20-bytes4-bytes20-
- :xref-Packing-pack_4_24-bytes4-bytes24-: xref:utils.adoc#Packing-pack_4_24-bytes4-bytes24-
- :xref-Packing-pack_4_28-bytes4-bytes28-: xref:utils.adoc#Packing-pack_4_28-bytes4-bytes28-
- :xref-Packing-pack_6_2-bytes6-bytes2-: xref:utils.adoc#Packing-pack_6_2-bytes6-bytes2-
- :xref-Packing-pack_6_6-bytes6-bytes6-: xref:utils.adoc#Packing-pack_6_6-bytes6-bytes6-
- :xref-Packing-pack_8_4-bytes8-bytes4-: xref:utils.adoc#Packing-pack_8_4-bytes8-bytes4-
- :xref-Packing-pack_8_8-bytes8-bytes8-: xref:utils.adoc#Packing-pack_8_8-bytes8-bytes8-
- :xref-Packing-pack_8_12-bytes8-bytes12-: xref:utils.adoc#Packing-pack_8_12-bytes8-bytes12-
- :xref-Packing-pack_8_16-bytes8-bytes16-: xref:utils.adoc#Packing-pack_8_16-bytes8-bytes16-
- :xref-Packing-pack_8_20-bytes8-bytes20-: xref:utils.adoc#Packing-pack_8_20-bytes8-bytes20-
- :xref-Packing-pack_8_24-bytes8-bytes24-: xref:utils.adoc#Packing-pack_8_24-bytes8-bytes24-
- :xref-Packing-pack_12_4-bytes12-bytes4-: xref:utils.adoc#Packing-pack_12_4-bytes12-bytes4-
- :xref-Packing-pack_12_8-bytes12-bytes8-: xref:utils.adoc#Packing-pack_12_8-bytes12-bytes8-
- :xref-Packing-pack_12_12-bytes12-bytes12-: xref:utils.adoc#Packing-pack_12_12-bytes12-bytes12-
- :xref-Packing-pack_12_16-bytes12-bytes16-: xref:utils.adoc#Packing-pack_12_16-bytes12-bytes16-
- :xref-Packing-pack_12_20-bytes12-bytes20-: xref:utils.adoc#Packing-pack_12_20-bytes12-bytes20-
- :xref-Packing-pack_16_4-bytes16-bytes4-: xref:utils.adoc#Packing-pack_16_4-bytes16-bytes4-
- :xref-Packing-pack_16_8-bytes16-bytes8-: xref:utils.adoc#Packing-pack_16_8-bytes16-bytes8-
- :xref-Packing-pack_16_12-bytes16-bytes12-: xref:utils.adoc#Packing-pack_16_12-bytes16-bytes12-
- :xref-Packing-pack_16_16-bytes16-bytes16-: xref:utils.adoc#Packing-pack_16_16-bytes16-bytes16-
- :xref-Packing-pack_20_4-bytes20-bytes4-: xref:utils.adoc#Packing-pack_20_4-bytes20-bytes4-
- :xref-Packing-pack_20_8-bytes20-bytes8-: xref:utils.adoc#Packing-pack_20_8-bytes20-bytes8-
- :xref-Packing-pack_20_12-bytes20-bytes12-: xref:utils.adoc#Packing-pack_20_12-bytes20-bytes12-
- :xref-Packing-pack_24_4-bytes24-bytes4-: xref:utils.adoc#Packing-pack_24_4-bytes24-bytes4-
- :xref-Packing-pack_24_8-bytes24-bytes8-: xref:utils.adoc#Packing-pack_24_8-bytes24-bytes8-
- :xref-Packing-pack_28_4-bytes28-bytes4-: xref:utils.adoc#Packing-pack_28_4-bytes28-bytes4-
- :xref-Packing-extract_2_1-bytes2-uint8-: xref:utils.adoc#Packing-extract_2_1-bytes2-uint8-
- :xref-Packing-replace_2_1-bytes2-bytes1-uint8-: xref:utils.adoc#Packing-replace_2_1-bytes2-bytes1-uint8-
- :xref-Packing-extract_4_1-bytes4-uint8-: xref:utils.adoc#Packing-extract_4_1-bytes4-uint8-
- :xref-Packing-replace_4_1-bytes4-bytes1-uint8-: xref:utils.adoc#Packing-replace_4_1-bytes4-bytes1-uint8-
- :xref-Packing-extract_4_2-bytes4-uint8-: xref:utils.adoc#Packing-extract_4_2-bytes4-uint8-
- :xref-Packing-replace_4_2-bytes4-bytes2-uint8-: xref:utils.adoc#Packing-replace_4_2-bytes4-bytes2-uint8-
- :xref-Packing-extract_6_1-bytes6-uint8-: xref:utils.adoc#Packing-extract_6_1-bytes6-uint8-
- :xref-Packing-replace_6_1-bytes6-bytes1-uint8-: xref:utils.adoc#Packing-replace_6_1-bytes6-bytes1-uint8-
- :xref-Packing-extract_6_2-bytes6-uint8-: xref:utils.adoc#Packing-extract_6_2-bytes6-uint8-
- :xref-Packing-replace_6_2-bytes6-bytes2-uint8-: xref:utils.adoc#Packing-replace_6_2-bytes6-bytes2-uint8-
- :xref-Packing-extract_6_4-bytes6-uint8-: xref:utils.adoc#Packing-extract_6_4-bytes6-uint8-
- :xref-Packing-replace_6_4-bytes6-bytes4-uint8-: xref:utils.adoc#Packing-replace_6_4-bytes6-bytes4-uint8-
- :xref-Packing-extract_8_1-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_1-bytes8-uint8-
- :xref-Packing-replace_8_1-bytes8-bytes1-uint8-: xref:utils.adoc#Packing-replace_8_1-bytes8-bytes1-uint8-
- :xref-Packing-extract_8_2-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_2-bytes8-uint8-
- :xref-Packing-replace_8_2-bytes8-bytes2-uint8-: xref:utils.adoc#Packing-replace_8_2-bytes8-bytes2-uint8-
- :xref-Packing-extract_8_4-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_4-bytes8-uint8-
- :xref-Packing-replace_8_4-bytes8-bytes4-uint8-: xref:utils.adoc#Packing-replace_8_4-bytes8-bytes4-uint8-
- :xref-Packing-extract_8_6-bytes8-uint8-: xref:utils.adoc#Packing-extract_8_6-bytes8-uint8-
- :xref-Packing-replace_8_6-bytes8-bytes6-uint8-: xref:utils.adoc#Packing-replace_8_6-bytes8-bytes6-uint8-
- :xref-Packing-extract_12_1-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_1-bytes12-uint8-
- :xref-Packing-replace_12_1-bytes12-bytes1-uint8-: xref:utils.adoc#Packing-replace_12_1-bytes12-bytes1-uint8-
- :xref-Packing-extract_12_2-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_2-bytes12-uint8-
- :xref-Packing-replace_12_2-bytes12-bytes2-uint8-: xref:utils.adoc#Packing-replace_12_2-bytes12-bytes2-uint8-
- :xref-Packing-extract_12_4-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_4-bytes12-uint8-
- :xref-Packing-replace_12_4-bytes12-bytes4-uint8-: xref:utils.adoc#Packing-replace_12_4-bytes12-bytes4-uint8-
- :xref-Packing-extract_12_6-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_6-bytes12-uint8-
- :xref-Packing-replace_12_6-bytes12-bytes6-uint8-: xref:utils.adoc#Packing-replace_12_6-bytes12-bytes6-uint8-
- :xref-Packing-extract_12_8-bytes12-uint8-: xref:utils.adoc#Packing-extract_12_8-bytes12-uint8-
- :xref-Packing-replace_12_8-bytes12-bytes8-uint8-: xref:utils.adoc#Packing-replace_12_8-bytes12-bytes8-uint8-
- :xref-Packing-extract_16_1-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_1-bytes16-uint8-
- :xref-Packing-replace_16_1-bytes16-bytes1-uint8-: xref:utils.adoc#Packing-replace_16_1-bytes16-bytes1-uint8-
- :xref-Packing-extract_16_2-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_2-bytes16-uint8-
- :xref-Packing-replace_16_2-bytes16-bytes2-uint8-: xref:utils.adoc#Packing-replace_16_2-bytes16-bytes2-uint8-
- :xref-Packing-extract_16_4-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_4-bytes16-uint8-
- :xref-Packing-replace_16_4-bytes16-bytes4-uint8-: xref:utils.adoc#Packing-replace_16_4-bytes16-bytes4-uint8-
- :xref-Packing-extract_16_6-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_6-bytes16-uint8-
- :xref-Packing-replace_16_6-bytes16-bytes6-uint8-: xref:utils.adoc#Packing-replace_16_6-bytes16-bytes6-uint8-
- :xref-Packing-extract_16_8-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_8-bytes16-uint8-
- :xref-Packing-replace_16_8-bytes16-bytes8-uint8-: xref:utils.adoc#Packing-replace_16_8-bytes16-bytes8-uint8-
- :xref-Packing-extract_16_12-bytes16-uint8-: xref:utils.adoc#Packing-extract_16_12-bytes16-uint8-
- :xref-Packing-replace_16_12-bytes16-bytes12-uint8-: xref:utils.adoc#Packing-replace_16_12-bytes16-bytes12-uint8-
- :xref-Packing-extract_20_1-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_1-bytes20-uint8-
- :xref-Packing-replace_20_1-bytes20-bytes1-uint8-: xref:utils.adoc#Packing-replace_20_1-bytes20-bytes1-uint8-
- :xref-Packing-extract_20_2-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_2-bytes20-uint8-
- :xref-Packing-replace_20_2-bytes20-bytes2-uint8-: xref:utils.adoc#Packing-replace_20_2-bytes20-bytes2-uint8-
- :xref-Packing-extract_20_4-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_4-bytes20-uint8-
- :xref-Packing-replace_20_4-bytes20-bytes4-uint8-: xref:utils.adoc#Packing-replace_20_4-bytes20-bytes4-uint8-
- :xref-Packing-extract_20_6-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_6-bytes20-uint8-
- :xref-Packing-replace_20_6-bytes20-bytes6-uint8-: xref:utils.adoc#Packing-replace_20_6-bytes20-bytes6-uint8-
- :xref-Packing-extract_20_8-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_8-bytes20-uint8-
- :xref-Packing-replace_20_8-bytes20-bytes8-uint8-: xref:utils.adoc#Packing-replace_20_8-bytes20-bytes8-uint8-
- :xref-Packing-extract_20_12-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_12-bytes20-uint8-
- :xref-Packing-replace_20_12-bytes20-bytes12-uint8-: xref:utils.adoc#Packing-replace_20_12-bytes20-bytes12-uint8-
- :xref-Packing-extract_20_16-bytes20-uint8-: xref:utils.adoc#Packing-extract_20_16-bytes20-uint8-
- :xref-Packing-replace_20_16-bytes20-bytes16-uint8-: xref:utils.adoc#Packing-replace_20_16-bytes20-bytes16-uint8-
- :xref-Packing-extract_24_1-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_1-bytes24-uint8-
- :xref-Packing-replace_24_1-bytes24-bytes1-uint8-: xref:utils.adoc#Packing-replace_24_1-bytes24-bytes1-uint8-
- :xref-Packing-extract_24_2-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_2-bytes24-uint8-
- :xref-Packing-replace_24_2-bytes24-bytes2-uint8-: xref:utils.adoc#Packing-replace_24_2-bytes24-bytes2-uint8-
- :xref-Packing-extract_24_4-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_4-bytes24-uint8-
- :xref-Packing-replace_24_4-bytes24-bytes4-uint8-: xref:utils.adoc#Packing-replace_24_4-bytes24-bytes4-uint8-
- :xref-Packing-extract_24_6-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_6-bytes24-uint8-
- :xref-Packing-replace_24_6-bytes24-bytes6-uint8-: xref:utils.adoc#Packing-replace_24_6-bytes24-bytes6-uint8-
- :xref-Packing-extract_24_8-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_8-bytes24-uint8-
- :xref-Packing-replace_24_8-bytes24-bytes8-uint8-: xref:utils.adoc#Packing-replace_24_8-bytes24-bytes8-uint8-
- :xref-Packing-extract_24_12-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_12-bytes24-uint8-
- :xref-Packing-replace_24_12-bytes24-bytes12-uint8-: xref:utils.adoc#Packing-replace_24_12-bytes24-bytes12-uint8-
- :xref-Packing-extract_24_16-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_16-bytes24-uint8-
- :xref-Packing-replace_24_16-bytes24-bytes16-uint8-: xref:utils.adoc#Packing-replace_24_16-bytes24-bytes16-uint8-
- :xref-Packing-extract_24_20-bytes24-uint8-: xref:utils.adoc#Packing-extract_24_20-bytes24-uint8-
- :xref-Packing-replace_24_20-bytes24-bytes20-uint8-: xref:utils.adoc#Packing-replace_24_20-bytes24-bytes20-uint8-
- :xref-Packing-extract_28_1-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_1-bytes28-uint8-
- :xref-Packing-replace_28_1-bytes28-bytes1-uint8-: xref:utils.adoc#Packing-replace_28_1-bytes28-bytes1-uint8-
- :xref-Packing-extract_28_2-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_2-bytes28-uint8-
- :xref-Packing-replace_28_2-bytes28-bytes2-uint8-: xref:utils.adoc#Packing-replace_28_2-bytes28-bytes2-uint8-
- :xref-Packing-extract_28_4-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_4-bytes28-uint8-
- :xref-Packing-replace_28_4-bytes28-bytes4-uint8-: xref:utils.adoc#Packing-replace_28_4-bytes28-bytes4-uint8-
- :xref-Packing-extract_28_6-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_6-bytes28-uint8-
- :xref-Packing-replace_28_6-bytes28-bytes6-uint8-: xref:utils.adoc#Packing-replace_28_6-bytes28-bytes6-uint8-
- :xref-Packing-extract_28_8-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_8-bytes28-uint8-
- :xref-Packing-replace_28_8-bytes28-bytes8-uint8-: xref:utils.adoc#Packing-replace_28_8-bytes28-bytes8-uint8-
- :xref-Packing-extract_28_12-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_12-bytes28-uint8-
- :xref-Packing-replace_28_12-bytes28-bytes12-uint8-: xref:utils.adoc#Packing-replace_28_12-bytes28-bytes12-uint8-
- :xref-Packing-extract_28_16-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_16-bytes28-uint8-
- :xref-Packing-replace_28_16-bytes28-bytes16-uint8-: xref:utils.adoc#Packing-replace_28_16-bytes28-bytes16-uint8-
- :xref-Packing-extract_28_20-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_20-bytes28-uint8-
- :xref-Packing-replace_28_20-bytes28-bytes20-uint8-: xref:utils.adoc#Packing-replace_28_20-bytes28-bytes20-uint8-
- :xref-Packing-extract_28_24-bytes28-uint8-: xref:utils.adoc#Packing-extract_28_24-bytes28-uint8-
- :xref-Packing-replace_28_24-bytes28-bytes24-uint8-: xref:utils.adoc#Packing-replace_28_24-bytes28-bytes24-uint8-
- :xref-Packing-extract_32_1-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_1-bytes32-uint8-
- :xref-Packing-replace_32_1-bytes32-bytes1-uint8-: xref:utils.adoc#Packing-replace_32_1-bytes32-bytes1-uint8-
- :xref-Packing-extract_32_2-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_2-bytes32-uint8-
- :xref-Packing-replace_32_2-bytes32-bytes2-uint8-: xref:utils.adoc#Packing-replace_32_2-bytes32-bytes2-uint8-
- :xref-Packing-extract_32_4-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_4-bytes32-uint8-
- :xref-Packing-replace_32_4-bytes32-bytes4-uint8-: xref:utils.adoc#Packing-replace_32_4-bytes32-bytes4-uint8-
- :xref-Packing-extract_32_6-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_6-bytes32-uint8-
- :xref-Packing-replace_32_6-bytes32-bytes6-uint8-: xref:utils.adoc#Packing-replace_32_6-bytes32-bytes6-uint8-
- :xref-Packing-extract_32_8-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_8-bytes32-uint8-
- :xref-Packing-replace_32_8-bytes32-bytes8-uint8-: xref:utils.adoc#Packing-replace_32_8-bytes32-bytes8-uint8-
- :xref-Packing-extract_32_12-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_12-bytes32-uint8-
- :xref-Packing-replace_32_12-bytes32-bytes12-uint8-: xref:utils.adoc#Packing-replace_32_12-bytes32-bytes12-uint8-
- :xref-Packing-extract_32_16-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_16-bytes32-uint8-
- :xref-Packing-replace_32_16-bytes32-bytes16-uint8-: xref:utils.adoc#Packing-replace_32_16-bytes32-bytes16-uint8-
- :xref-Packing-extract_32_20-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_20-bytes32-uint8-
- :xref-Packing-replace_32_20-bytes32-bytes20-uint8-: xref:utils.adoc#Packing-replace_32_20-bytes32-bytes20-uint8-
- :xref-Packing-extract_32_24-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_24-bytes32-uint8-
- :xref-Packing-replace_32_24-bytes32-bytes24-uint8-: xref:utils.adoc#Packing-replace_32_24-bytes32-bytes24-uint8-
- :xref-Packing-extract_32_28-bytes32-uint8-: xref:utils.adoc#Packing-extract_32_28-bytes32-uint8-
- :xref-Packing-replace_32_28-bytes32-bytes28-uint8-: xref:utils.adoc#Packing-replace_32_28-bytes32-bytes28-uint8-
- :xref-Packing-OutOfRangeAccess--: xref:utils.adoc#Packing-OutOfRangeAccess--
- :xref-Panic-panic-uint256-: xref:utils.adoc#Panic-panic-uint256-
- :xref-Panic-GENERIC-uint256: xref:utils.adoc#Panic-GENERIC-uint256
- :xref-Panic-ASSERT-uint256: xref:utils.adoc#Panic-ASSERT-uint256
- :xref-Panic-UNDER_OVERFLOW-uint256: xref:utils.adoc#Panic-UNDER_OVERFLOW-uint256
- :xref-Panic-DIVISION_BY_ZERO-uint256: xref:utils.adoc#Panic-DIVISION_BY_ZERO-uint256
- :xref-Panic-ENUM_CONVERSION_ERROR-uint256: xref:utils.adoc#Panic-ENUM_CONVERSION_ERROR-uint256
- :xref-Panic-STORAGE_ENCODING_ERROR-uint256: xref:utils.adoc#Panic-STORAGE_ENCODING_ERROR-uint256
- :xref-Panic-EMPTY_ARRAY_POP-uint256: xref:utils.adoc#Panic-EMPTY_ARRAY_POP-uint256
- :xref-Panic-ARRAY_OUT_OF_BOUNDS-uint256: xref:utils.adoc#Panic-ARRAY_OUT_OF_BOUNDS-uint256
- :xref-Panic-RESOURCE_ERROR-uint256: xref:utils.adoc#Panic-RESOURCE_ERROR-uint256
- :xref-Panic-INVALID_INTERNAL_FUNCTION-uint256: xref:utils.adoc#Panic-INVALID_INTERNAL_FUNCTION-uint256
- :xref-Comparators-lt-uint256-uint256-: xref:utils.adoc#Comparators-lt-uint256-uint256-
- :xref-Comparators-gt-uint256-uint256-: xref:utils.adoc#Comparators-gt-uint256-uint256-
- = Utilities
- [.readme-notice]
- NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils
- Miscellaneous contracts and libraries containing utility functions you can use to improve security, work with new data types, or safely use low-level primitives.
- * {Math}, {SignedMath}: Implementation of various arithmetic functions.
- * {SafeCast}: Checked downcasting functions to avoid silent truncation.
- * {ECDSA}, {MessageHashUtils}: Libraries for interacting with ECDSA signatures.
- * {P256}: Library for verifying and recovering public keys from secp256r1 signatures.
- * {RSA}: Library with RSA PKCS#1 v1.5 signature verification utilities.
- * {SignatureChecker}: A library helper to support regular ECDSA from EOAs as well as ERC-1271 signatures for smart contracts.
- * {Hashes}: Commonly used hash functions.
- * {MerkleProof}: Functions for verifying https://en.wikipedia.org/wiki/Merkle_tree[Merkle Tree] proofs.
- * {EIP712}: Contract with functions to allow processing signed typed structure data according to https://eips.ethereum.org/EIPS/eip-712[EIP-712].
- * {ReentrancyGuard}: A modifier that can prevent reentrancy during certain functions.
- * {ReentrancyGuardTransient}: Variant of {ReentrancyGuard} that uses transient storage (https://eips.ethereum.org/EIPS/eip-1153[EIP-1153]).
- * {Pausable}: A common emergency response mechanism that can pause functionality while a remediation is pending.
- * {Nonces}: Utility for tracking and verifying address nonces that only increment.
- * {ERC165}, {ERC165Checker}: Utilities for inspecting interfaces supported by contracts.
- * {BitMaps}: A simple library to manage boolean value mapped to a numerical index in an efficient way.
- * {EnumerableMap}: A type like Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`], but with key-value _enumeration_: this will let you know how many entries a mapping has, and iterate over them (which is not possible with `mapping`).
- * {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.
- * {DoubleEndedQueue}: An implementation of a https://en.wikipedia.org/wiki/Double-ended_queue[double ended queue] whose values can be removed added or remove from both sides. Useful for FIFO and LIFO structures.
- * {CircularBuffer}: A data structure to store the last N values pushed to it.
- * {Checkpoints}: A data structure to store values mapped to a strictly increasing key. Can be used for storing and accessing values over time.
- * {Heap}: A library that implements a https://en.wikipedia.org/wiki/Binary_heap[binary heap] in storage.
- * {MerkleTree}: A library with https://wikipedia.org/wiki/Merkle_Tree[Merkle Tree] data structures and helper functions.
- * {Create2}: Wrapper around the https://blog.openzeppelin.com/getting-the-most-out-of-create2/[`CREATE2` EVM opcode] for safe use without having to deal with low-level assembly.
- * {Address}: Collection of functions for overloading Solidity's https://docs.soliditylang.org/en/latest/types.html#address[`address`] type.
- * {Arrays}: Collection of functions that operate on https://docs.soliditylang.org/en/latest/types.html#arrays[`arrays`].
- * {Base64}: On-chain base64 and base64URL encoding according to https://datatracker.ietf.org/doc/html/rfc4648[RFC-4648].
- * {Strings}: Common operations for strings formatting.
- * {ShortString}: Library to encode (and decode) short strings into (or from) a single bytes32 slot for optimizing costs. Short strings are limited to 31 characters.
- * {SlotDerivation}: Methods for deriving storage slot from ERC-7201 namespaces as well as from constructions such as mapping and arrays.
- * {StorageSlot}: Methods for accessing specific storage slots formatted as common primitive types.
- * {TransientSlot}: Primitives for reading from and writing to transient storage (only value types are currently supported).
- * {Multicall}: Abstract contract with a utility to allow batching together multiple calls in a single transaction. Useful for allowing EOAs to perform multiple operations at once.
- * {Context}: A utility for abstracting the sender and calldata in the current execution context.
- * {Packing}: A library for packing and unpacking multiple values into bytes32
- * {Panic}: A library to revert with https://docs.soliditylang.org/en/v0.8.20/control-structures.html#panic-via-assert-and-error-via-require[Solidity panic codes].
- * {Comparators}: A library that contains comparator functions to use with with the {Heap} library.
- [NOTE]
- ====
- Because Solidity does not support generic types, {EnumerableMap} and {EnumerableSet} are specialized to a limited number of key-value types.
- ====
- == Math
- :Rounding: pass:normal[xref:#Math-Rounding[`++Rounding++`]]
- :tryAdd: pass:normal[xref:#Math-tryAdd-uint256-uint256-[`++tryAdd++`]]
- :trySub: pass:normal[xref:#Math-trySub-uint256-uint256-[`++trySub++`]]
- :tryMul: pass:normal[xref:#Math-tryMul-uint256-uint256-[`++tryMul++`]]
- :tryDiv: pass:normal[xref:#Math-tryDiv-uint256-uint256-[`++tryDiv++`]]
- :tryMod: pass:normal[xref:#Math-tryMod-uint256-uint256-[`++tryMod++`]]
- :ternary: pass:normal[xref:#Math-ternary-bool-uint256-uint256-[`++ternary++`]]
- :max: pass:normal[xref:#Math-max-uint256-uint256-[`++max++`]]
- :min: pass:normal[xref:#Math-min-uint256-uint256-[`++min++`]]
- :average: pass:normal[xref:#Math-average-uint256-uint256-[`++average++`]]
- :ceilDiv: pass:normal[xref:#Math-ceilDiv-uint256-uint256-[`++ceilDiv++`]]
- :mulDiv: pass:normal[xref:#Math-mulDiv-uint256-uint256-uint256-[`++mulDiv++`]]
- :mulDiv: pass:normal[xref:#Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-[`++mulDiv++`]]
- :invMod: pass:normal[xref:#Math-invMod-uint256-uint256-[`++invMod++`]]
- :invModPrime: pass:normal[xref:#Math-invModPrime-uint256-uint256-[`++invModPrime++`]]
- :modExp: pass:normal[xref:#Math-modExp-uint256-uint256-uint256-[`++modExp++`]]
- :tryModExp: pass:normal[xref:#Math-tryModExp-uint256-uint256-uint256-[`++tryModExp++`]]
- :modExp: pass:normal[xref:#Math-modExp-bytes-bytes-bytes-[`++modExp++`]]
- :tryModExp: pass:normal[xref:#Math-tryModExp-bytes-bytes-bytes-[`++tryModExp++`]]
- :sqrt: pass:normal[xref:#Math-sqrt-uint256-[`++sqrt++`]]
- :sqrt: pass:normal[xref:#Math-sqrt-uint256-enum-Math-Rounding-[`++sqrt++`]]
- :log2: pass:normal[xref:#Math-log2-uint256-[`++log2++`]]
- :log2: pass:normal[xref:#Math-log2-uint256-enum-Math-Rounding-[`++log2++`]]
- :log10: pass:normal[xref:#Math-log10-uint256-[`++log10++`]]
- :log10: pass:normal[xref:#Math-log10-uint256-enum-Math-Rounding-[`++log10++`]]
- :log256: pass:normal[xref:#Math-log256-uint256-[`++log256++`]]
- :log256: pass:normal[xref:#Math-log256-uint256-enum-Math-Rounding-[`++log256++`]]
- :unsignedRoundsUp: pass:normal[xref:#Math-unsignedRoundsUp-enum-Math-Rounding-[`++unsignedRoundsUp++`]]
- [.contract]
- [[Math]]
- === `++Math++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/math/Math.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/math/Math.sol";
- ```
- Standard math utilities missing in the Solidity language.
- [.contract-index]
- .Functions
- --
- * {xref-Math-tryAdd-uint256-uint256-}[`++tryAdd(a, b)++`]
- * {xref-Math-trySub-uint256-uint256-}[`++trySub(a, b)++`]
- * {xref-Math-tryMul-uint256-uint256-}[`++tryMul(a, b)++`]
- * {xref-Math-tryDiv-uint256-uint256-}[`++tryDiv(a, b)++`]
- * {xref-Math-tryMod-uint256-uint256-}[`++tryMod(a, b)++`]
- * {xref-Math-ternary-bool-uint256-uint256-}[`++ternary(condition, a, b)++`]
- * {xref-Math-max-uint256-uint256-}[`++max(a, b)++`]
- * {xref-Math-min-uint256-uint256-}[`++min(a, b)++`]
- * {xref-Math-average-uint256-uint256-}[`++average(a, b)++`]
- * {xref-Math-ceilDiv-uint256-uint256-}[`++ceilDiv(a, b)++`]
- * {xref-Math-mulDiv-uint256-uint256-uint256-}[`++mulDiv(x, y, denominator)++`]
- * {xref-Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-}[`++mulDiv(x, y, denominator, rounding)++`]
- * {xref-Math-invMod-uint256-uint256-}[`++invMod(a, n)++`]
- * {xref-Math-invModPrime-uint256-uint256-}[`++invModPrime(a, p)++`]
- * {xref-Math-modExp-uint256-uint256-uint256-}[`++modExp(b, e, m)++`]
- * {xref-Math-tryModExp-uint256-uint256-uint256-}[`++tryModExp(b, e, m)++`]
- * {xref-Math-modExp-bytes-bytes-bytes-}[`++modExp(b, e, m)++`]
- * {xref-Math-tryModExp-bytes-bytes-bytes-}[`++tryModExp(b, e, m)++`]
- * {xref-Math-sqrt-uint256-}[`++sqrt(a)++`]
- * {xref-Math-sqrt-uint256-enum-Math-Rounding-}[`++sqrt(a, rounding)++`]
- * {xref-Math-log2-uint256-}[`++log2(value)++`]
- * {xref-Math-log2-uint256-enum-Math-Rounding-}[`++log2(value, rounding)++`]
- * {xref-Math-log10-uint256-}[`++log10(value)++`]
- * {xref-Math-log10-uint256-enum-Math-Rounding-}[`++log10(value, rounding)++`]
- * {xref-Math-log256-uint256-}[`++log256(value)++`]
- * {xref-Math-log256-uint256-enum-Math-Rounding-}[`++log256(value, rounding)++`]
- * {xref-Math-unsignedRoundsUp-enum-Math-Rounding-}[`++unsignedRoundsUp(rounding)++`]
- --
- [.contract-item]
- [[Math-tryAdd-uint256-uint256-]]
- ==== `[.contract-item-name]#++tryAdd++#++(uint256 a, uint256 b) → bool success, uint256 result++` [.item-kind]#internal#
- Returns the addition of two unsigned integers, with an success flag (no overflow).
- [.contract-item]
- [[Math-trySub-uint256-uint256-]]
- ==== `[.contract-item-name]#++trySub++#++(uint256 a, uint256 b) → bool success, uint256 result++` [.item-kind]#internal#
- Returns the subtraction of two unsigned integers, with an success flag (no overflow).
- [.contract-item]
- [[Math-tryMul-uint256-uint256-]]
- ==== `[.contract-item-name]#++tryMul++#++(uint256 a, uint256 b) → bool success, uint256 result++` [.item-kind]#internal#
- Returns the multiplication of two unsigned integers, with an success flag (no overflow).
- [.contract-item]
- [[Math-tryDiv-uint256-uint256-]]
- ==== `[.contract-item-name]#++tryDiv++#++(uint256 a, uint256 b) → bool success, uint256 result++` [.item-kind]#internal#
- Returns the division of two unsigned integers, with a success flag (no division by zero).
- [.contract-item]
- [[Math-tryMod-uint256-uint256-]]
- ==== `[.contract-item-name]#++tryMod++#++(uint256 a, uint256 b) → bool success, uint256 result++` [.item-kind]#internal#
- Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).
- [.contract-item]
- [[Math-ternary-bool-uint256-uint256-]]
- ==== `[.contract-item-name]#++ternary++#++(bool condition, uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
- Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
- IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
- However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
- one branch when needed, making this function more expensive.
- [.contract-item]
- [[Math-max-uint256-uint256-]]
- ==== `[.contract-item-name]#++max++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
- Returns the largest of two numbers.
- [.contract-item]
- [[Math-min-uint256-uint256-]]
- ==== `[.contract-item-name]#++min++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
- Returns the smallest of two numbers.
- [.contract-item]
- [[Math-average-uint256-uint256-]]
- ==== `[.contract-item-name]#++average++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
- Returns the average of two numbers. The result is rounded towards
- zero.
- [.contract-item]
- [[Math-ceilDiv-uint256-uint256-]]
- ==== `[.contract-item-name]#++ceilDiv++#++(uint256 a, uint256 b) → uint256++` [.item-kind]#internal#
- Returns the ceiling of the division of two numbers.
- This differs from standard division with `/` in that it rounds towards infinity instead
- of rounding towards zero.
- [.contract-item]
- [[Math-mulDiv-uint256-uint256-uint256-]]
- ==== `[.contract-item-name]#++mulDiv++#++(uint256 x, uint256 y, uint256 denominator) → uint256 result++` [.item-kind]#internal#
- Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
- denominator == 0.
- Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
- Uniswap Labs also under MIT license.
- [.contract-item]
- [[Math-mulDiv-uint256-uint256-uint256-enum-Math-Rounding-]]
- ==== `[.contract-item-name]#++mulDiv++#++(uint256 x, uint256 y, uint256 denominator, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
- Calculates x * y / denominator with full precision, following the selected rounding direction.
- [.contract-item]
- [[Math-invMod-uint256-uint256-]]
- ==== `[.contract-item-name]#++invMod++#++(uint256 a, uint256 n) → uint256++` [.item-kind]#internal#
- Calculate the modular multiplicative inverse of a number in Z/nZ.
- If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.
- If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.
- If the input value is not inversible, 0 is returned.
- NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the
- inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.
- [.contract-item]
- [[Math-invModPrime-uint256-uint256-]]
- ==== `[.contract-item-name]#++invModPrime++#++(uint256 a, uint256 p) → uint256++` [.item-kind]#internal#
- Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.
- From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is
- prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that
- `a**(p-2)` is the modular multiplicative inverse of a in Fp.
- NOTE: this function does NOT check that `p` is a prime greater than `2`.
- [.contract-item]
- [[Math-modExp-uint256-uint256-uint256-]]
- ==== `[.contract-item-name]#++modExp++#++(uint256 b, uint256 e, uint256 m) → uint256++` [.item-kind]#internal#
- Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)
- Requirements:
- - modulus can't be zero
- - underlying staticcall to precompile must succeed
- IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make
- sure the chain you're using it on supports the precompiled contract for modular exponentiation
- at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,
- the underlying function will succeed given the lack of a revert, but the result may be incorrectly
- interpreted as 0.
- [.contract-item]
- [[Math-tryModExp-uint256-uint256-uint256-]]
- ==== `[.contract-item-name]#++tryModExp++#++(uint256 b, uint256 e, uint256 m) → bool success, uint256 result++` [.item-kind]#internal#
- Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).
- It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying
- to operate modulo 0 or if the underlying precompile reverted.
- IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain
- you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in
- https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack
- of a revert, but the result may be incorrectly interpreted as 0.
- [.contract-item]
- [[Math-modExp-bytes-bytes-bytes-]]
- ==== `[.contract-item-name]#++modExp++#++(bytes b, bytes e, bytes m) → bytes++` [.item-kind]#internal#
- Variant of {modExp} that supports inputs of arbitrary length.
- [.contract-item]
- [[Math-tryModExp-bytes-bytes-bytes-]]
- ==== `[.contract-item-name]#++tryModExp++#++(bytes b, bytes e, bytes m) → bool success, bytes result++` [.item-kind]#internal#
- Variant of {tryModExp} that supports inputs of arbitrary length.
- [.contract-item]
- [[Math-sqrt-uint256-]]
- ==== `[.contract-item-name]#++sqrt++#++(uint256 a) → uint256++` [.item-kind]#internal#
- Returns the square root of a number. If the number is not a perfect square, the value is rounded
- towards zero.
- This method is based on Newton's method for computing square roots; the algorithm is restricted to only
- using integer operations.
- [.contract-item]
- [[Math-sqrt-uint256-enum-Math-Rounding-]]
- ==== `[.contract-item-name]#++sqrt++#++(uint256 a, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
- Calculates sqrt(a), following the selected rounding direction.
- [.contract-item]
- [[Math-log2-uint256-]]
- ==== `[.contract-item-name]#++log2++#++(uint256 value) → uint256++` [.item-kind]#internal#
- Return the log in base 2 of a positive value rounded towards zero.
- Returns 0 if given 0.
- [.contract-item]
- [[Math-log2-uint256-enum-Math-Rounding-]]
- ==== `[.contract-item-name]#++log2++#++(uint256 value, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
- Return the log in base 2, following the selected rounding direction, of a positive value.
- Returns 0 if given 0.
- [.contract-item]
- [[Math-log10-uint256-]]
- ==== `[.contract-item-name]#++log10++#++(uint256 value) → uint256++` [.item-kind]#internal#
- Return the log in base 10 of a positive value rounded towards zero.
- Returns 0 if given 0.
- [.contract-item]
- [[Math-log10-uint256-enum-Math-Rounding-]]
- ==== `[.contract-item-name]#++log10++#++(uint256 value, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
- Return the log in base 10, following the selected rounding direction, of a positive value.
- Returns 0 if given 0.
- [.contract-item]
- [[Math-log256-uint256-]]
- ==== `[.contract-item-name]#++log256++#++(uint256 value) → uint256++` [.item-kind]#internal#
- Return the log in base 256 of a positive value rounded towards zero.
- Returns 0 if given 0.
- Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
- [.contract-item]
- [[Math-log256-uint256-enum-Math-Rounding-]]
- ==== `[.contract-item-name]#++log256++#++(uint256 value, enum Math.Rounding rounding) → uint256++` [.item-kind]#internal#
- Return the log in base 256, following the selected rounding direction, of a positive value.
- Returns 0 if given 0.
- [.contract-item]
- [[Math-unsignedRoundsUp-enum-Math-Rounding-]]
- ==== `[.contract-item-name]#++unsignedRoundsUp++#++(enum Math.Rounding rounding) → bool++` [.item-kind]#internal#
- Returns whether a provided rounding mode is considered rounding up for unsigned integers.
- :ternary: pass:normal[xref:#SignedMath-ternary-bool-int256-int256-[`++ternary++`]]
- :max: pass:normal[xref:#SignedMath-max-int256-int256-[`++max++`]]
- :min: pass:normal[xref:#SignedMath-min-int256-int256-[`++min++`]]
- :average: pass:normal[xref:#SignedMath-average-int256-int256-[`++average++`]]
- :abs: pass:normal[xref:#SignedMath-abs-int256-[`++abs++`]]
- [.contract]
- [[SignedMath]]
- === `++SignedMath++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/math/SignedMath.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/math/SignedMath.sol";
- ```
- Standard signed math utilities missing in the Solidity language.
- [.contract-index]
- .Functions
- --
- * {xref-SignedMath-ternary-bool-int256-int256-}[`++ternary(condition, a, b)++`]
- * {xref-SignedMath-max-int256-int256-}[`++max(a, b)++`]
- * {xref-SignedMath-min-int256-int256-}[`++min(a, b)++`]
- * {xref-SignedMath-average-int256-int256-}[`++average(a, b)++`]
- * {xref-SignedMath-abs-int256-}[`++abs(n)++`]
- --
- [.contract-item]
- [[SignedMath-ternary-bool-int256-int256-]]
- ==== `[.contract-item-name]#++ternary++#++(bool condition, int256 a, int256 b) → int256++` [.item-kind]#internal#
- Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
- IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
- However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
- one branch when needed, making this function more expensive.
- [.contract-item]
- [[SignedMath-max-int256-int256-]]
- ==== `[.contract-item-name]#++max++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
- Returns the largest of two signed numbers.
- [.contract-item]
- [[SignedMath-min-int256-int256-]]
- ==== `[.contract-item-name]#++min++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
- Returns the smallest of two signed numbers.
- [.contract-item]
- [[SignedMath-average-int256-int256-]]
- ==== `[.contract-item-name]#++average++#++(int256 a, int256 b) → int256++` [.item-kind]#internal#
- Returns the average of two signed numbers without overflow.
- The result is rounded towards zero.
- [.contract-item]
- [[SignedMath-abs-int256-]]
- ==== `[.contract-item-name]#++abs++#++(int256 n) → uint256++` [.item-kind]#internal#
- Returns the absolute unsigned value of a signed value.
- :SafeCastOverflowedUintDowncast: pass:normal[xref:#SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-[`++SafeCastOverflowedUintDowncast++`]]
- :SafeCastOverflowedIntToUint: pass:normal[xref:#SafeCast-SafeCastOverflowedIntToUint-int256-[`++SafeCastOverflowedIntToUint++`]]
- :SafeCastOverflowedIntDowncast: pass:normal[xref:#SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-[`++SafeCastOverflowedIntDowncast++`]]
- :SafeCastOverflowedUintToInt: pass:normal[xref:#SafeCast-SafeCastOverflowedUintToInt-uint256-[`++SafeCastOverflowedUintToInt++`]]
- :toUint248: pass:normal[xref:#SafeCast-toUint248-uint256-[`++toUint248++`]]
- :toUint240: pass:normal[xref:#SafeCast-toUint240-uint256-[`++toUint240++`]]
- :toUint232: pass:normal[xref:#SafeCast-toUint232-uint256-[`++toUint232++`]]
- :toUint224: pass:normal[xref:#SafeCast-toUint224-uint256-[`++toUint224++`]]
- :toUint216: pass:normal[xref:#SafeCast-toUint216-uint256-[`++toUint216++`]]
- :toUint208: pass:normal[xref:#SafeCast-toUint208-uint256-[`++toUint208++`]]
- :toUint200: pass:normal[xref:#SafeCast-toUint200-uint256-[`++toUint200++`]]
- :toUint192: pass:normal[xref:#SafeCast-toUint192-uint256-[`++toUint192++`]]
- :toUint184: pass:normal[xref:#SafeCast-toUint184-uint256-[`++toUint184++`]]
- :toUint176: pass:normal[xref:#SafeCast-toUint176-uint256-[`++toUint176++`]]
- :toUint168: pass:normal[xref:#SafeCast-toUint168-uint256-[`++toUint168++`]]
- :toUint160: pass:normal[xref:#SafeCast-toUint160-uint256-[`++toUint160++`]]
- :toUint152: pass:normal[xref:#SafeCast-toUint152-uint256-[`++toUint152++`]]
- :toUint144: pass:normal[xref:#SafeCast-toUint144-uint256-[`++toUint144++`]]
- :toUint136: pass:normal[xref:#SafeCast-toUint136-uint256-[`++toUint136++`]]
- :toUint128: pass:normal[xref:#SafeCast-toUint128-uint256-[`++toUint128++`]]
- :toUint120: pass:normal[xref:#SafeCast-toUint120-uint256-[`++toUint120++`]]
- :toUint112: pass:normal[xref:#SafeCast-toUint112-uint256-[`++toUint112++`]]
- :toUint104: pass:normal[xref:#SafeCast-toUint104-uint256-[`++toUint104++`]]
- :toUint96: pass:normal[xref:#SafeCast-toUint96-uint256-[`++toUint96++`]]
- :toUint88: pass:normal[xref:#SafeCast-toUint88-uint256-[`++toUint88++`]]
- :toUint80: pass:normal[xref:#SafeCast-toUint80-uint256-[`++toUint80++`]]
- :toUint72: pass:normal[xref:#SafeCast-toUint72-uint256-[`++toUint72++`]]
- :toUint64: pass:normal[xref:#SafeCast-toUint64-uint256-[`++toUint64++`]]
- :toUint56: pass:normal[xref:#SafeCast-toUint56-uint256-[`++toUint56++`]]
- :toUint48: pass:normal[xref:#SafeCast-toUint48-uint256-[`++toUint48++`]]
- :toUint40: pass:normal[xref:#SafeCast-toUint40-uint256-[`++toUint40++`]]
- :toUint32: pass:normal[xref:#SafeCast-toUint32-uint256-[`++toUint32++`]]
- :toUint24: pass:normal[xref:#SafeCast-toUint24-uint256-[`++toUint24++`]]
- :toUint16: pass:normal[xref:#SafeCast-toUint16-uint256-[`++toUint16++`]]
- :toUint8: pass:normal[xref:#SafeCast-toUint8-uint256-[`++toUint8++`]]
- :toUint256: pass:normal[xref:#SafeCast-toUint256-int256-[`++toUint256++`]]
- :toInt248: pass:normal[xref:#SafeCast-toInt248-int256-[`++toInt248++`]]
- :toInt240: pass:normal[xref:#SafeCast-toInt240-int256-[`++toInt240++`]]
- :toInt232: pass:normal[xref:#SafeCast-toInt232-int256-[`++toInt232++`]]
- :toInt224: pass:normal[xref:#SafeCast-toInt224-int256-[`++toInt224++`]]
- :toInt216: pass:normal[xref:#SafeCast-toInt216-int256-[`++toInt216++`]]
- :toInt208: pass:normal[xref:#SafeCast-toInt208-int256-[`++toInt208++`]]
- :toInt200: pass:normal[xref:#SafeCast-toInt200-int256-[`++toInt200++`]]
- :toInt192: pass:normal[xref:#SafeCast-toInt192-int256-[`++toInt192++`]]
- :toInt184: pass:normal[xref:#SafeCast-toInt184-int256-[`++toInt184++`]]
- :toInt176: pass:normal[xref:#SafeCast-toInt176-int256-[`++toInt176++`]]
- :toInt168: pass:normal[xref:#SafeCast-toInt168-int256-[`++toInt168++`]]
- :toInt160: pass:normal[xref:#SafeCast-toInt160-int256-[`++toInt160++`]]
- :toInt152: pass:normal[xref:#SafeCast-toInt152-int256-[`++toInt152++`]]
- :toInt144: pass:normal[xref:#SafeCast-toInt144-int256-[`++toInt144++`]]
- :toInt136: pass:normal[xref:#SafeCast-toInt136-int256-[`++toInt136++`]]
- :toInt128: pass:normal[xref:#SafeCast-toInt128-int256-[`++toInt128++`]]
- :toInt120: pass:normal[xref:#SafeCast-toInt120-int256-[`++toInt120++`]]
- :toInt112: pass:normal[xref:#SafeCast-toInt112-int256-[`++toInt112++`]]
- :toInt104: pass:normal[xref:#SafeCast-toInt104-int256-[`++toInt104++`]]
- :toInt96: pass:normal[xref:#SafeCast-toInt96-int256-[`++toInt96++`]]
- :toInt88: pass:normal[xref:#SafeCast-toInt88-int256-[`++toInt88++`]]
- :toInt80: pass:normal[xref:#SafeCast-toInt80-int256-[`++toInt80++`]]
- :toInt72: pass:normal[xref:#SafeCast-toInt72-int256-[`++toInt72++`]]
- :toInt64: pass:normal[xref:#SafeCast-toInt64-int256-[`++toInt64++`]]
- :toInt56: pass:normal[xref:#SafeCast-toInt56-int256-[`++toInt56++`]]
- :toInt48: pass:normal[xref:#SafeCast-toInt48-int256-[`++toInt48++`]]
- :toInt40: pass:normal[xref:#SafeCast-toInt40-int256-[`++toInt40++`]]
- :toInt32: pass:normal[xref:#SafeCast-toInt32-int256-[`++toInt32++`]]
- :toInt24: pass:normal[xref:#SafeCast-toInt24-int256-[`++toInt24++`]]
- :toInt16: pass:normal[xref:#SafeCast-toInt16-int256-[`++toInt16++`]]
- :toInt8: pass:normal[xref:#SafeCast-toInt8-int256-[`++toInt8++`]]
- :toInt256: pass:normal[xref:#SafeCast-toInt256-uint256-[`++toInt256++`]]
- :toUint: pass:normal[xref:#SafeCast-toUint-bool-[`++toUint++`]]
- [.contract]
- [[SafeCast]]
- === `++SafeCast++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/math/SafeCast.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/math/SafeCast.sol";
- ```
- Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow
- checks.
- Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
- easily result in undesired exploitation or bugs, since developers usually
- assume that overflows raise errors. `SafeCast` restores this intuition by
- reverting the transaction when such an operation overflows.
- Using this library instead of the unchecked operations eliminates an entire
- class of bugs, so it's recommended to use it always.
- [.contract-index]
- .Functions
- --
- * {xref-SafeCast-toUint248-uint256-}[`++toUint248(value)++`]
- * {xref-SafeCast-toUint240-uint256-}[`++toUint240(value)++`]
- * {xref-SafeCast-toUint232-uint256-}[`++toUint232(value)++`]
- * {xref-SafeCast-toUint224-uint256-}[`++toUint224(value)++`]
- * {xref-SafeCast-toUint216-uint256-}[`++toUint216(value)++`]
- * {xref-SafeCast-toUint208-uint256-}[`++toUint208(value)++`]
- * {xref-SafeCast-toUint200-uint256-}[`++toUint200(value)++`]
- * {xref-SafeCast-toUint192-uint256-}[`++toUint192(value)++`]
- * {xref-SafeCast-toUint184-uint256-}[`++toUint184(value)++`]
- * {xref-SafeCast-toUint176-uint256-}[`++toUint176(value)++`]
- * {xref-SafeCast-toUint168-uint256-}[`++toUint168(value)++`]
- * {xref-SafeCast-toUint160-uint256-}[`++toUint160(value)++`]
- * {xref-SafeCast-toUint152-uint256-}[`++toUint152(value)++`]
- * {xref-SafeCast-toUint144-uint256-}[`++toUint144(value)++`]
- * {xref-SafeCast-toUint136-uint256-}[`++toUint136(value)++`]
- * {xref-SafeCast-toUint128-uint256-}[`++toUint128(value)++`]
- * {xref-SafeCast-toUint120-uint256-}[`++toUint120(value)++`]
- * {xref-SafeCast-toUint112-uint256-}[`++toUint112(value)++`]
- * {xref-SafeCast-toUint104-uint256-}[`++toUint104(value)++`]
- * {xref-SafeCast-toUint96-uint256-}[`++toUint96(value)++`]
- * {xref-SafeCast-toUint88-uint256-}[`++toUint88(value)++`]
- * {xref-SafeCast-toUint80-uint256-}[`++toUint80(value)++`]
- * {xref-SafeCast-toUint72-uint256-}[`++toUint72(value)++`]
- * {xref-SafeCast-toUint64-uint256-}[`++toUint64(value)++`]
- * {xref-SafeCast-toUint56-uint256-}[`++toUint56(value)++`]
- * {xref-SafeCast-toUint48-uint256-}[`++toUint48(value)++`]
- * {xref-SafeCast-toUint40-uint256-}[`++toUint40(value)++`]
- * {xref-SafeCast-toUint32-uint256-}[`++toUint32(value)++`]
- * {xref-SafeCast-toUint24-uint256-}[`++toUint24(value)++`]
- * {xref-SafeCast-toUint16-uint256-}[`++toUint16(value)++`]
- * {xref-SafeCast-toUint8-uint256-}[`++toUint8(value)++`]
- * {xref-SafeCast-toUint256-int256-}[`++toUint256(value)++`]
- * {xref-SafeCast-toInt248-int256-}[`++toInt248(value)++`]
- * {xref-SafeCast-toInt240-int256-}[`++toInt240(value)++`]
- * {xref-SafeCast-toInt232-int256-}[`++toInt232(value)++`]
- * {xref-SafeCast-toInt224-int256-}[`++toInt224(value)++`]
- * {xref-SafeCast-toInt216-int256-}[`++toInt216(value)++`]
- * {xref-SafeCast-toInt208-int256-}[`++toInt208(value)++`]
- * {xref-SafeCast-toInt200-int256-}[`++toInt200(value)++`]
- * {xref-SafeCast-toInt192-int256-}[`++toInt192(value)++`]
- * {xref-SafeCast-toInt184-int256-}[`++toInt184(value)++`]
- * {xref-SafeCast-toInt176-int256-}[`++toInt176(value)++`]
- * {xref-SafeCast-toInt168-int256-}[`++toInt168(value)++`]
- * {xref-SafeCast-toInt160-int256-}[`++toInt160(value)++`]
- * {xref-SafeCast-toInt152-int256-}[`++toInt152(value)++`]
- * {xref-SafeCast-toInt144-int256-}[`++toInt144(value)++`]
- * {xref-SafeCast-toInt136-int256-}[`++toInt136(value)++`]
- * {xref-SafeCast-toInt128-int256-}[`++toInt128(value)++`]
- * {xref-SafeCast-toInt120-int256-}[`++toInt120(value)++`]
- * {xref-SafeCast-toInt112-int256-}[`++toInt112(value)++`]
- * {xref-SafeCast-toInt104-int256-}[`++toInt104(value)++`]
- * {xref-SafeCast-toInt96-int256-}[`++toInt96(value)++`]
- * {xref-SafeCast-toInt88-int256-}[`++toInt88(value)++`]
- * {xref-SafeCast-toInt80-int256-}[`++toInt80(value)++`]
- * {xref-SafeCast-toInt72-int256-}[`++toInt72(value)++`]
- * {xref-SafeCast-toInt64-int256-}[`++toInt64(value)++`]
- * {xref-SafeCast-toInt56-int256-}[`++toInt56(value)++`]
- * {xref-SafeCast-toInt48-int256-}[`++toInt48(value)++`]
- * {xref-SafeCast-toInt40-int256-}[`++toInt40(value)++`]
- * {xref-SafeCast-toInt32-int256-}[`++toInt32(value)++`]
- * {xref-SafeCast-toInt24-int256-}[`++toInt24(value)++`]
- * {xref-SafeCast-toInt16-int256-}[`++toInt16(value)++`]
- * {xref-SafeCast-toInt8-int256-}[`++toInt8(value)++`]
- * {xref-SafeCast-toInt256-uint256-}[`++toInt256(value)++`]
- * {xref-SafeCast-toUint-bool-}[`++toUint(b)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-}[`++SafeCastOverflowedUintDowncast(bits, value)++`]
- * {xref-SafeCast-SafeCastOverflowedIntToUint-int256-}[`++SafeCastOverflowedIntToUint(value)++`]
- * {xref-SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-}[`++SafeCastOverflowedIntDowncast(bits, value)++`]
- * {xref-SafeCast-SafeCastOverflowedUintToInt-uint256-}[`++SafeCastOverflowedUintToInt(value)++`]
- --
- [.contract-item]
- [[SafeCast-toUint248-uint256-]]
- ==== `[.contract-item-name]#++toUint248++#++(uint256 value) → uint248++` [.item-kind]#internal#
- Returns the downcasted uint248 from uint256, reverting on
- overflow (when the input is greater than largest uint248).
- Counterpart to Solidity's `uint248` operator.
- Requirements:
- - input must fit into 248 bits
- [.contract-item]
- [[SafeCast-toUint240-uint256-]]
- ==== `[.contract-item-name]#++toUint240++#++(uint256 value) → uint240++` [.item-kind]#internal#
- Returns the downcasted uint240 from uint256, reverting on
- overflow (when the input is greater than largest uint240).
- Counterpart to Solidity's `uint240` operator.
- Requirements:
- - input must fit into 240 bits
- [.contract-item]
- [[SafeCast-toUint232-uint256-]]
- ==== `[.contract-item-name]#++toUint232++#++(uint256 value) → uint232++` [.item-kind]#internal#
- Returns the downcasted uint232 from uint256, reverting on
- overflow (when the input is greater than largest uint232).
- Counterpart to Solidity's `uint232` operator.
- Requirements:
- - input must fit into 232 bits
- [.contract-item]
- [[SafeCast-toUint224-uint256-]]
- ==== `[.contract-item-name]#++toUint224++#++(uint256 value) → uint224++` [.item-kind]#internal#
- Returns the downcasted uint224 from uint256, reverting on
- overflow (when the input is greater than largest uint224).
- Counterpart to Solidity's `uint224` operator.
- Requirements:
- - input must fit into 224 bits
- [.contract-item]
- [[SafeCast-toUint216-uint256-]]
- ==== `[.contract-item-name]#++toUint216++#++(uint256 value) → uint216++` [.item-kind]#internal#
- Returns the downcasted uint216 from uint256, reverting on
- overflow (when the input is greater than largest uint216).
- Counterpart to Solidity's `uint216` operator.
- Requirements:
- - input must fit into 216 bits
- [.contract-item]
- [[SafeCast-toUint208-uint256-]]
- ==== `[.contract-item-name]#++toUint208++#++(uint256 value) → uint208++` [.item-kind]#internal#
- Returns the downcasted uint208 from uint256, reverting on
- overflow (when the input is greater than largest uint208).
- Counterpart to Solidity's `uint208` operator.
- Requirements:
- - input must fit into 208 bits
- [.contract-item]
- [[SafeCast-toUint200-uint256-]]
- ==== `[.contract-item-name]#++toUint200++#++(uint256 value) → uint200++` [.item-kind]#internal#
- Returns the downcasted uint200 from uint256, reverting on
- overflow (when the input is greater than largest uint200).
- Counterpart to Solidity's `uint200` operator.
- Requirements:
- - input must fit into 200 bits
- [.contract-item]
- [[SafeCast-toUint192-uint256-]]
- ==== `[.contract-item-name]#++toUint192++#++(uint256 value) → uint192++` [.item-kind]#internal#
- Returns the downcasted uint192 from uint256, reverting on
- overflow (when the input is greater than largest uint192).
- Counterpart to Solidity's `uint192` operator.
- Requirements:
- - input must fit into 192 bits
- [.contract-item]
- [[SafeCast-toUint184-uint256-]]
- ==== `[.contract-item-name]#++toUint184++#++(uint256 value) → uint184++` [.item-kind]#internal#
- Returns the downcasted uint184 from uint256, reverting on
- overflow (when the input is greater than largest uint184).
- Counterpart to Solidity's `uint184` operator.
- Requirements:
- - input must fit into 184 bits
- [.contract-item]
- [[SafeCast-toUint176-uint256-]]
- ==== `[.contract-item-name]#++toUint176++#++(uint256 value) → uint176++` [.item-kind]#internal#
- Returns the downcasted uint176 from uint256, reverting on
- overflow (when the input is greater than largest uint176).
- Counterpart to Solidity's `uint176` operator.
- Requirements:
- - input must fit into 176 bits
- [.contract-item]
- [[SafeCast-toUint168-uint256-]]
- ==== `[.contract-item-name]#++toUint168++#++(uint256 value) → uint168++` [.item-kind]#internal#
- Returns the downcasted uint168 from uint256, reverting on
- overflow (when the input is greater than largest uint168).
- Counterpart to Solidity's `uint168` operator.
- Requirements:
- - input must fit into 168 bits
- [.contract-item]
- [[SafeCast-toUint160-uint256-]]
- ==== `[.contract-item-name]#++toUint160++#++(uint256 value) → uint160++` [.item-kind]#internal#
- Returns the downcasted uint160 from uint256, reverting on
- overflow (when the input is greater than largest uint160).
- Counterpart to Solidity's `uint160` operator.
- Requirements:
- - input must fit into 160 bits
- [.contract-item]
- [[SafeCast-toUint152-uint256-]]
- ==== `[.contract-item-name]#++toUint152++#++(uint256 value) → uint152++` [.item-kind]#internal#
- Returns the downcasted uint152 from uint256, reverting on
- overflow (when the input is greater than largest uint152).
- Counterpart to Solidity's `uint152` operator.
- Requirements:
- - input must fit into 152 bits
- [.contract-item]
- [[SafeCast-toUint144-uint256-]]
- ==== `[.contract-item-name]#++toUint144++#++(uint256 value) → uint144++` [.item-kind]#internal#
- Returns the downcasted uint144 from uint256, reverting on
- overflow (when the input is greater than largest uint144).
- Counterpart to Solidity's `uint144` operator.
- Requirements:
- - input must fit into 144 bits
- [.contract-item]
- [[SafeCast-toUint136-uint256-]]
- ==== `[.contract-item-name]#++toUint136++#++(uint256 value) → uint136++` [.item-kind]#internal#
- Returns the downcasted uint136 from uint256, reverting on
- overflow (when the input is greater than largest uint136).
- Counterpart to Solidity's `uint136` operator.
- Requirements:
- - input must fit into 136 bits
- [.contract-item]
- [[SafeCast-toUint128-uint256-]]
- ==== `[.contract-item-name]#++toUint128++#++(uint256 value) → uint128++` [.item-kind]#internal#
- Returns the downcasted uint128 from uint256, reverting on
- overflow (when the input is greater than largest uint128).
- Counterpart to Solidity's `uint128` operator.
- Requirements:
- - input must fit into 128 bits
- [.contract-item]
- [[SafeCast-toUint120-uint256-]]
- ==== `[.contract-item-name]#++toUint120++#++(uint256 value) → uint120++` [.item-kind]#internal#
- Returns the downcasted uint120 from uint256, reverting on
- overflow (when the input is greater than largest uint120).
- Counterpart to Solidity's `uint120` operator.
- Requirements:
- - input must fit into 120 bits
- [.contract-item]
- [[SafeCast-toUint112-uint256-]]
- ==== `[.contract-item-name]#++toUint112++#++(uint256 value) → uint112++` [.item-kind]#internal#
- Returns the downcasted uint112 from uint256, reverting on
- overflow (when the input is greater than largest uint112).
- Counterpart to Solidity's `uint112` operator.
- Requirements:
- - input must fit into 112 bits
- [.contract-item]
- [[SafeCast-toUint104-uint256-]]
- ==== `[.contract-item-name]#++toUint104++#++(uint256 value) → uint104++` [.item-kind]#internal#
- Returns the downcasted uint104 from uint256, reverting on
- overflow (when the input is greater than largest uint104).
- Counterpart to Solidity's `uint104` operator.
- Requirements:
- - input must fit into 104 bits
- [.contract-item]
- [[SafeCast-toUint96-uint256-]]
- ==== `[.contract-item-name]#++toUint96++#++(uint256 value) → uint96++` [.item-kind]#internal#
- Returns the downcasted uint96 from uint256, reverting on
- overflow (when the input is greater than largest uint96).
- Counterpart to Solidity's `uint96` operator.
- Requirements:
- - input must fit into 96 bits
- [.contract-item]
- [[SafeCast-toUint88-uint256-]]
- ==== `[.contract-item-name]#++toUint88++#++(uint256 value) → uint88++` [.item-kind]#internal#
- Returns the downcasted uint88 from uint256, reverting on
- overflow (when the input is greater than largest uint88).
- Counterpart to Solidity's `uint88` operator.
- Requirements:
- - input must fit into 88 bits
- [.contract-item]
- [[SafeCast-toUint80-uint256-]]
- ==== `[.contract-item-name]#++toUint80++#++(uint256 value) → uint80++` [.item-kind]#internal#
- Returns the downcasted uint80 from uint256, reverting on
- overflow (when the input is greater than largest uint80).
- Counterpart to Solidity's `uint80` operator.
- Requirements:
- - input must fit into 80 bits
- [.contract-item]
- [[SafeCast-toUint72-uint256-]]
- ==== `[.contract-item-name]#++toUint72++#++(uint256 value) → uint72++` [.item-kind]#internal#
- Returns the downcasted uint72 from uint256, reverting on
- overflow (when the input is greater than largest uint72).
- Counterpart to Solidity's `uint72` operator.
- Requirements:
- - input must fit into 72 bits
- [.contract-item]
- [[SafeCast-toUint64-uint256-]]
- ==== `[.contract-item-name]#++toUint64++#++(uint256 value) → uint64++` [.item-kind]#internal#
- Returns the downcasted uint64 from uint256, reverting on
- overflow (when the input is greater than largest uint64).
- Counterpart to Solidity's `uint64` operator.
- Requirements:
- - input must fit into 64 bits
- [.contract-item]
- [[SafeCast-toUint56-uint256-]]
- ==== `[.contract-item-name]#++toUint56++#++(uint256 value) → uint56++` [.item-kind]#internal#
- Returns the downcasted uint56 from uint256, reverting on
- overflow (when the input is greater than largest uint56).
- Counterpart to Solidity's `uint56` operator.
- Requirements:
- - input must fit into 56 bits
- [.contract-item]
- [[SafeCast-toUint48-uint256-]]
- ==== `[.contract-item-name]#++toUint48++#++(uint256 value) → uint48++` [.item-kind]#internal#
- Returns the downcasted uint48 from uint256, reverting on
- overflow (when the input is greater than largest uint48).
- Counterpart to Solidity's `uint48` operator.
- Requirements:
- - input must fit into 48 bits
- [.contract-item]
- [[SafeCast-toUint40-uint256-]]
- ==== `[.contract-item-name]#++toUint40++#++(uint256 value) → uint40++` [.item-kind]#internal#
- Returns the downcasted uint40 from uint256, reverting on
- overflow (when the input is greater than largest uint40).
- Counterpart to Solidity's `uint40` operator.
- Requirements:
- - input must fit into 40 bits
- [.contract-item]
- [[SafeCast-toUint32-uint256-]]
- ==== `[.contract-item-name]#++toUint32++#++(uint256 value) → uint32++` [.item-kind]#internal#
- Returns the downcasted uint32 from uint256, reverting on
- overflow (when the input is greater than largest uint32).
- Counterpart to Solidity's `uint32` operator.
- Requirements:
- - input must fit into 32 bits
- [.contract-item]
- [[SafeCast-toUint24-uint256-]]
- ==== `[.contract-item-name]#++toUint24++#++(uint256 value) → uint24++` [.item-kind]#internal#
- Returns the downcasted uint24 from uint256, reverting on
- overflow (when the input is greater than largest uint24).
- Counterpart to Solidity's `uint24` operator.
- Requirements:
- - input must fit into 24 bits
- [.contract-item]
- [[SafeCast-toUint16-uint256-]]
- ==== `[.contract-item-name]#++toUint16++#++(uint256 value) → uint16++` [.item-kind]#internal#
- Returns the downcasted uint16 from uint256, reverting on
- overflow (when the input is greater than largest uint16).
- Counterpart to Solidity's `uint16` operator.
- Requirements:
- - input must fit into 16 bits
- [.contract-item]
- [[SafeCast-toUint8-uint256-]]
- ==== `[.contract-item-name]#++toUint8++#++(uint256 value) → uint8++` [.item-kind]#internal#
- Returns the downcasted uint8 from uint256, reverting on
- overflow (when the input is greater than largest uint8).
- Counterpart to Solidity's `uint8` operator.
- Requirements:
- - input must fit into 8 bits
- [.contract-item]
- [[SafeCast-toUint256-int256-]]
- ==== `[.contract-item-name]#++toUint256++#++(int256 value) → uint256++` [.item-kind]#internal#
- Converts a signed int256 into an unsigned uint256.
- Requirements:
- - input must be greater than or equal to 0.
- [.contract-item]
- [[SafeCast-toInt248-int256-]]
- ==== `[.contract-item-name]#++toInt248++#++(int256 value) → int248 downcasted++` [.item-kind]#internal#
- Returns the downcasted int248 from int256, reverting on
- overflow (when the input is less than smallest int248 or
- greater than largest int248).
- Counterpart to Solidity's `int248` operator.
- Requirements:
- - input must fit into 248 bits
- [.contract-item]
- [[SafeCast-toInt240-int256-]]
- ==== `[.contract-item-name]#++toInt240++#++(int256 value) → int240 downcasted++` [.item-kind]#internal#
- Returns the downcasted int240 from int256, reverting on
- overflow (when the input is less than smallest int240 or
- greater than largest int240).
- Counterpart to Solidity's `int240` operator.
- Requirements:
- - input must fit into 240 bits
- [.contract-item]
- [[SafeCast-toInt232-int256-]]
- ==== `[.contract-item-name]#++toInt232++#++(int256 value) → int232 downcasted++` [.item-kind]#internal#
- Returns the downcasted int232 from int256, reverting on
- overflow (when the input is less than smallest int232 or
- greater than largest int232).
- Counterpart to Solidity's `int232` operator.
- Requirements:
- - input must fit into 232 bits
- [.contract-item]
- [[SafeCast-toInt224-int256-]]
- ==== `[.contract-item-name]#++toInt224++#++(int256 value) → int224 downcasted++` [.item-kind]#internal#
- Returns the downcasted int224 from int256, reverting on
- overflow (when the input is less than smallest int224 or
- greater than largest int224).
- Counterpart to Solidity's `int224` operator.
- Requirements:
- - input must fit into 224 bits
- [.contract-item]
- [[SafeCast-toInt216-int256-]]
- ==== `[.contract-item-name]#++toInt216++#++(int256 value) → int216 downcasted++` [.item-kind]#internal#
- Returns the downcasted int216 from int256, reverting on
- overflow (when the input is less than smallest int216 or
- greater than largest int216).
- Counterpart to Solidity's `int216` operator.
- Requirements:
- - input must fit into 216 bits
- [.contract-item]
- [[SafeCast-toInt208-int256-]]
- ==== `[.contract-item-name]#++toInt208++#++(int256 value) → int208 downcasted++` [.item-kind]#internal#
- Returns the downcasted int208 from int256, reverting on
- overflow (when the input is less than smallest int208 or
- greater than largest int208).
- Counterpart to Solidity's `int208` operator.
- Requirements:
- - input must fit into 208 bits
- [.contract-item]
- [[SafeCast-toInt200-int256-]]
- ==== `[.contract-item-name]#++toInt200++#++(int256 value) → int200 downcasted++` [.item-kind]#internal#
- Returns the downcasted int200 from int256, reverting on
- overflow (when the input is less than smallest int200 or
- greater than largest int200).
- Counterpart to Solidity's `int200` operator.
- Requirements:
- - input must fit into 200 bits
- [.contract-item]
- [[SafeCast-toInt192-int256-]]
- ==== `[.contract-item-name]#++toInt192++#++(int256 value) → int192 downcasted++` [.item-kind]#internal#
- Returns the downcasted int192 from int256, reverting on
- overflow (when the input is less than smallest int192 or
- greater than largest int192).
- Counterpart to Solidity's `int192` operator.
- Requirements:
- - input must fit into 192 bits
- [.contract-item]
- [[SafeCast-toInt184-int256-]]
- ==== `[.contract-item-name]#++toInt184++#++(int256 value) → int184 downcasted++` [.item-kind]#internal#
- Returns the downcasted int184 from int256, reverting on
- overflow (when the input is less than smallest int184 or
- greater than largest int184).
- Counterpart to Solidity's `int184` operator.
- Requirements:
- - input must fit into 184 bits
- [.contract-item]
- [[SafeCast-toInt176-int256-]]
- ==== `[.contract-item-name]#++toInt176++#++(int256 value) → int176 downcasted++` [.item-kind]#internal#
- Returns the downcasted int176 from int256, reverting on
- overflow (when the input is less than smallest int176 or
- greater than largest int176).
- Counterpart to Solidity's `int176` operator.
- Requirements:
- - input must fit into 176 bits
- [.contract-item]
- [[SafeCast-toInt168-int256-]]
- ==== `[.contract-item-name]#++toInt168++#++(int256 value) → int168 downcasted++` [.item-kind]#internal#
- Returns the downcasted int168 from int256, reverting on
- overflow (when the input is less than smallest int168 or
- greater than largest int168).
- Counterpart to Solidity's `int168` operator.
- Requirements:
- - input must fit into 168 bits
- [.contract-item]
- [[SafeCast-toInt160-int256-]]
- ==== `[.contract-item-name]#++toInt160++#++(int256 value) → int160 downcasted++` [.item-kind]#internal#
- Returns the downcasted int160 from int256, reverting on
- overflow (when the input is less than smallest int160 or
- greater than largest int160).
- Counterpart to Solidity's `int160` operator.
- Requirements:
- - input must fit into 160 bits
- [.contract-item]
- [[SafeCast-toInt152-int256-]]
- ==== `[.contract-item-name]#++toInt152++#++(int256 value) → int152 downcasted++` [.item-kind]#internal#
- Returns the downcasted int152 from int256, reverting on
- overflow (when the input is less than smallest int152 or
- greater than largest int152).
- Counterpart to Solidity's `int152` operator.
- Requirements:
- - input must fit into 152 bits
- [.contract-item]
- [[SafeCast-toInt144-int256-]]
- ==== `[.contract-item-name]#++toInt144++#++(int256 value) → int144 downcasted++` [.item-kind]#internal#
- Returns the downcasted int144 from int256, reverting on
- overflow (when the input is less than smallest int144 or
- greater than largest int144).
- Counterpart to Solidity's `int144` operator.
- Requirements:
- - input must fit into 144 bits
- [.contract-item]
- [[SafeCast-toInt136-int256-]]
- ==== `[.contract-item-name]#++toInt136++#++(int256 value) → int136 downcasted++` [.item-kind]#internal#
- Returns the downcasted int136 from int256, reverting on
- overflow (when the input is less than smallest int136 or
- greater than largest int136).
- Counterpart to Solidity's `int136` operator.
- Requirements:
- - input must fit into 136 bits
- [.contract-item]
- [[SafeCast-toInt128-int256-]]
- ==== `[.contract-item-name]#++toInt128++#++(int256 value) → int128 downcasted++` [.item-kind]#internal#
- Returns the downcasted int128 from int256, reverting on
- overflow (when the input is less than smallest int128 or
- greater than largest int128).
- Counterpart to Solidity's `int128` operator.
- Requirements:
- - input must fit into 128 bits
- [.contract-item]
- [[SafeCast-toInt120-int256-]]
- ==== `[.contract-item-name]#++toInt120++#++(int256 value) → int120 downcasted++` [.item-kind]#internal#
- Returns the downcasted int120 from int256, reverting on
- overflow (when the input is less than smallest int120 or
- greater than largest int120).
- Counterpart to Solidity's `int120` operator.
- Requirements:
- - input must fit into 120 bits
- [.contract-item]
- [[SafeCast-toInt112-int256-]]
- ==== `[.contract-item-name]#++toInt112++#++(int256 value) → int112 downcasted++` [.item-kind]#internal#
- Returns the downcasted int112 from int256, reverting on
- overflow (when the input is less than smallest int112 or
- greater than largest int112).
- Counterpart to Solidity's `int112` operator.
- Requirements:
- - input must fit into 112 bits
- [.contract-item]
- [[SafeCast-toInt104-int256-]]
- ==== `[.contract-item-name]#++toInt104++#++(int256 value) → int104 downcasted++` [.item-kind]#internal#
- Returns the downcasted int104 from int256, reverting on
- overflow (when the input is less than smallest int104 or
- greater than largest int104).
- Counterpart to Solidity's `int104` operator.
- Requirements:
- - input must fit into 104 bits
- [.contract-item]
- [[SafeCast-toInt96-int256-]]
- ==== `[.contract-item-name]#++toInt96++#++(int256 value) → int96 downcasted++` [.item-kind]#internal#
- Returns the downcasted int96 from int256, reverting on
- overflow (when the input is less than smallest int96 or
- greater than largest int96).
- Counterpart to Solidity's `int96` operator.
- Requirements:
- - input must fit into 96 bits
- [.contract-item]
- [[SafeCast-toInt88-int256-]]
- ==== `[.contract-item-name]#++toInt88++#++(int256 value) → int88 downcasted++` [.item-kind]#internal#
- Returns the downcasted int88 from int256, reverting on
- overflow (when the input is less than smallest int88 or
- greater than largest int88).
- Counterpart to Solidity's `int88` operator.
- Requirements:
- - input must fit into 88 bits
- [.contract-item]
- [[SafeCast-toInt80-int256-]]
- ==== `[.contract-item-name]#++toInt80++#++(int256 value) → int80 downcasted++` [.item-kind]#internal#
- Returns the downcasted int80 from int256, reverting on
- overflow (when the input is less than smallest int80 or
- greater than largest int80).
- Counterpart to Solidity's `int80` operator.
- Requirements:
- - input must fit into 80 bits
- [.contract-item]
- [[SafeCast-toInt72-int256-]]
- ==== `[.contract-item-name]#++toInt72++#++(int256 value) → int72 downcasted++` [.item-kind]#internal#
- Returns the downcasted int72 from int256, reverting on
- overflow (when the input is less than smallest int72 or
- greater than largest int72).
- Counterpart to Solidity's `int72` operator.
- Requirements:
- - input must fit into 72 bits
- [.contract-item]
- [[SafeCast-toInt64-int256-]]
- ==== `[.contract-item-name]#++toInt64++#++(int256 value) → int64 downcasted++` [.item-kind]#internal#
- Returns the downcasted int64 from int256, reverting on
- overflow (when the input is less than smallest int64 or
- greater than largest int64).
- Counterpart to Solidity's `int64` operator.
- Requirements:
- - input must fit into 64 bits
- [.contract-item]
- [[SafeCast-toInt56-int256-]]
- ==== `[.contract-item-name]#++toInt56++#++(int256 value) → int56 downcasted++` [.item-kind]#internal#
- Returns the downcasted int56 from int256, reverting on
- overflow (when the input is less than smallest int56 or
- greater than largest int56).
- Counterpart to Solidity's `int56` operator.
- Requirements:
- - input must fit into 56 bits
- [.contract-item]
- [[SafeCast-toInt48-int256-]]
- ==== `[.contract-item-name]#++toInt48++#++(int256 value) → int48 downcasted++` [.item-kind]#internal#
- Returns the downcasted int48 from int256, reverting on
- overflow (when the input is less than smallest int48 or
- greater than largest int48).
- Counterpart to Solidity's `int48` operator.
- Requirements:
- - input must fit into 48 bits
- [.contract-item]
- [[SafeCast-toInt40-int256-]]
- ==== `[.contract-item-name]#++toInt40++#++(int256 value) → int40 downcasted++` [.item-kind]#internal#
- Returns the downcasted int40 from int256, reverting on
- overflow (when the input is less than smallest int40 or
- greater than largest int40).
- Counterpart to Solidity's `int40` operator.
- Requirements:
- - input must fit into 40 bits
- [.contract-item]
- [[SafeCast-toInt32-int256-]]
- ==== `[.contract-item-name]#++toInt32++#++(int256 value) → int32 downcasted++` [.item-kind]#internal#
- Returns the downcasted int32 from int256, reverting on
- overflow (when the input is less than smallest int32 or
- greater than largest int32).
- Counterpart to Solidity's `int32` operator.
- Requirements:
- - input must fit into 32 bits
- [.contract-item]
- [[SafeCast-toInt24-int256-]]
- ==== `[.contract-item-name]#++toInt24++#++(int256 value) → int24 downcasted++` [.item-kind]#internal#
- Returns the downcasted int24 from int256, reverting on
- overflow (when the input is less than smallest int24 or
- greater than largest int24).
- Counterpart to Solidity's `int24` operator.
- Requirements:
- - input must fit into 24 bits
- [.contract-item]
- [[SafeCast-toInt16-int256-]]
- ==== `[.contract-item-name]#++toInt16++#++(int256 value) → int16 downcasted++` [.item-kind]#internal#
- Returns the downcasted int16 from int256, reverting on
- overflow (when the input is less than smallest int16 or
- greater than largest int16).
- Counterpart to Solidity's `int16` operator.
- Requirements:
- - input must fit into 16 bits
- [.contract-item]
- [[SafeCast-toInt8-int256-]]
- ==== `[.contract-item-name]#++toInt8++#++(int256 value) → int8 downcasted++` [.item-kind]#internal#
- Returns the downcasted int8 from int256, reverting on
- overflow (when the input is less than smallest int8 or
- greater than largest int8).
- Counterpart to Solidity's `int8` operator.
- Requirements:
- - input must fit into 8 bits
- [.contract-item]
- [[SafeCast-toInt256-uint256-]]
- ==== `[.contract-item-name]#++toInt256++#++(uint256 value) → int256++` [.item-kind]#internal#
- Converts an unsigned uint256 into a signed int256.
- Requirements:
- - input must be less than or equal to maxInt256.
- [.contract-item]
- [[SafeCast-toUint-bool-]]
- ==== `[.contract-item-name]#++toUint++#++(bool b) → uint256 u++` [.item-kind]#internal#
- Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.
- [.contract-item]
- [[SafeCast-SafeCastOverflowedUintDowncast-uint8-uint256-]]
- ==== `[.contract-item-name]#++SafeCastOverflowedUintDowncast++#++(uint8 bits, uint256 value)++` [.item-kind]#error#
- Value doesn't fit in an uint of `bits` size.
- [.contract-item]
- [[SafeCast-SafeCastOverflowedIntToUint-int256-]]
- ==== `[.contract-item-name]#++SafeCastOverflowedIntToUint++#++(int256 value)++` [.item-kind]#error#
- An int value doesn't fit in an uint of `bits` size.
- [.contract-item]
- [[SafeCast-SafeCastOverflowedIntDowncast-uint8-int256-]]
- ==== `[.contract-item-name]#++SafeCastOverflowedIntDowncast++#++(uint8 bits, int256 value)++` [.item-kind]#error#
- Value doesn't fit in an int of `bits` size.
- [.contract-item]
- [[SafeCast-SafeCastOverflowedUintToInt-uint256-]]
- ==== `[.contract-item-name]#++SafeCastOverflowedUintToInt++#++(uint256 value)++` [.item-kind]#error#
- An uint value doesn't fit in an int of `bits` size.
- == Cryptography
- :RecoverError: pass:normal[xref:#ECDSA-RecoverError[`++RecoverError++`]]
- :ECDSAInvalidSignature: pass:normal[xref:#ECDSA-ECDSAInvalidSignature--[`++ECDSAInvalidSignature++`]]
- :ECDSAInvalidSignatureLength: pass:normal[xref:#ECDSA-ECDSAInvalidSignatureLength-uint256-[`++ECDSAInvalidSignatureLength++`]]
- :ECDSAInvalidSignatureS: pass:normal[xref:#ECDSA-ECDSAInvalidSignatureS-bytes32-[`++ECDSAInvalidSignatureS++`]]
- :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-bytes-[`++tryRecover++`]]
- :recover: pass:normal[xref:#ECDSA-recover-bytes32-bytes-[`++recover++`]]
- :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-bytes32-bytes32-[`++tryRecover++`]]
- :recover: pass:normal[xref:#ECDSA-recover-bytes32-bytes32-bytes32-[`++recover++`]]
- :tryRecover: pass:normal[xref:#ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-[`++tryRecover++`]]
- :recover: pass:normal[xref:#ECDSA-recover-bytes32-uint8-bytes32-bytes32-[`++recover++`]]
- [.contract]
- [[ECDSA]]
- === `++ECDSA++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/ECDSA.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
- ```
- Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
- These functions can be used to verify that a message was signed by the holder
- of the private keys of a given address.
- [.contract-index]
- .Functions
- --
- * {xref-ECDSA-tryRecover-bytes32-bytes-}[`++tryRecover(hash, signature)++`]
- * {xref-ECDSA-recover-bytes32-bytes-}[`++recover(hash, signature)++`]
- * {xref-ECDSA-tryRecover-bytes32-bytes32-bytes32-}[`++tryRecover(hash, r, vs)++`]
- * {xref-ECDSA-recover-bytes32-bytes32-bytes32-}[`++recover(hash, r, vs)++`]
- * {xref-ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-}[`++tryRecover(hash, v, r, s)++`]
- * {xref-ECDSA-recover-bytes32-uint8-bytes32-bytes32-}[`++recover(hash, v, r, s)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-ECDSA-ECDSAInvalidSignature--}[`++ECDSAInvalidSignature()++`]
- * {xref-ECDSA-ECDSAInvalidSignatureLength-uint256-}[`++ECDSAInvalidSignatureLength(length)++`]
- * {xref-ECDSA-ECDSAInvalidSignatureS-bytes32-}[`++ECDSAInvalidSignatureS(s)++`]
- --
- [.contract-item]
- [[ECDSA-tryRecover-bytes32-bytes-]]
- ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, bytes signature) → address recovered, enum ECDSA.RecoverError err, bytes32 errArg++` [.item-kind]#internal#
- Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
- return address(0) without also returning an error description. Errors are documented using an enum (error type)
- and a bytes32 providing additional information about the error.
- If no error is returned, then the address can be used for verification purposes.
- The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
- this function rejects them by requiring the `s` value to be in the lower
- half order, and the `v` value to be either 27 or 28.
- IMPORTANT: `hash` _must_ be the result of a hash operation for the
- verification to be secure: it is possible to craft signatures that
- recover to arbitrary addresses for non-hashed data. A safe way to ensure
- this is by receiving a hash of the original message (which may otherwise
- be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
- Documentation for signature generation:
- - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
- - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
- [.contract-item]
- [[ECDSA-recover-bytes32-bytes-]]
- ==== `[.contract-item-name]#++recover++#++(bytes32 hash, bytes signature) → address++` [.item-kind]#internal#
- Returns the address that signed a hashed message (`hash`) with
- `signature`. This address can then be used for verification purposes.
- The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
- this function rejects them by requiring the `s` value to be in the lower
- half order, and the `v` value to be either 27 or 28.
- IMPORTANT: `hash` _must_ be the result of a hash operation for the
- verification to be secure: it is possible to craft signatures that
- recover to arbitrary addresses for non-hashed data. A safe way to ensure
- this is by receiving a hash of the original message (which may otherwise
- be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
- [.contract-item]
- [[ECDSA-tryRecover-bytes32-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, bytes32 r, bytes32 vs) → address recovered, enum ECDSA.RecoverError err, bytes32 errArg++` [.item-kind]#internal#
- Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
- See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]
- [.contract-item]
- [[ECDSA-recover-bytes32-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++recover++#++(bytes32 hash, bytes32 r, bytes32 vs) → address++` [.item-kind]#internal#
- Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
- [.contract-item]
- [[ECDSA-tryRecover-bytes32-uint8-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++tryRecover++#++(bytes32 hash, uint8 v, bytes32 r, bytes32 s) → address recovered, enum ECDSA.RecoverError err, bytes32 errArg++` [.item-kind]#internal#
- Overload of {ECDSA-tryRecover} that receives the `v`,
- `r` and `s` signature fields separately.
- [.contract-item]
- [[ECDSA-recover-bytes32-uint8-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++recover++#++(bytes32 hash, uint8 v, bytes32 r, bytes32 s) → address++` [.item-kind]#internal#
- Overload of {ECDSA-recover} that receives the `v`,
- `r` and `s` signature fields separately.
- [.contract-item]
- [[ECDSA-ECDSAInvalidSignature--]]
- ==== `[.contract-item-name]#++ECDSAInvalidSignature++#++()++` [.item-kind]#error#
- The signature derives the `address(0)`.
- [.contract-item]
- [[ECDSA-ECDSAInvalidSignatureLength-uint256-]]
- ==== `[.contract-item-name]#++ECDSAInvalidSignatureLength++#++(uint256 length)++` [.item-kind]#error#
- The signature has an invalid length.
- [.contract-item]
- [[ECDSA-ECDSAInvalidSignatureS-bytes32-]]
- ==== `[.contract-item-name]#++ECDSAInvalidSignatureS++#++(bytes32 s)++` [.item-kind]#error#
- The signature has an S value that is in the upper half order.
- :JPoint: pass:normal[xref:#P256-JPoint[`++JPoint++`]]
- :GX: pass:normal[xref:#P256-GX-uint256[`++GX++`]]
- :GY: pass:normal[xref:#P256-GY-uint256[`++GY++`]]
- :P: pass:normal[xref:#P256-P-uint256[`++P++`]]
- :N: pass:normal[xref:#P256-N-uint256[`++N++`]]
- :A: pass:normal[xref:#P256-A-uint256[`++A++`]]
- :B: pass:normal[xref:#P256-B-uint256[`++B++`]]
- :verify: pass:normal[xref:#P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-[`++verify++`]]
- :verifyNative: pass:normal[xref:#P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-[`++verifyNative++`]]
- :verifySolidity: pass:normal[xref:#P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-[`++verifySolidity++`]]
- :recovery: pass:normal[xref:#P256-recovery-bytes32-uint8-bytes32-bytes32-[`++recovery++`]]
- :isValidPublicKey: pass:normal[xref:#P256-isValidPublicKey-bytes32-bytes32-[`++isValidPublicKey++`]]
- [.contract]
- [[P256]]
- === `++P256++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/P256.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/cryptography/P256.sol";
- ```
- Implementation of secp256r1 verification and recovery functions.
- The secp256r1 curve (also known as P256) is a NIST standard curve with wide support in modern devices
- and cryptographic standards. Some notable examples include Apple's Secure Enclave and Android's Keystore
- as well as authentication protocols like FIDO2.
- Based on the original https://github.com/itsobvioustech/aa-passkeys-wallet/blob/d3d423f28a4d8dfcb203c7fa0c47f42592a7378e/src/Secp256r1.sol[implementation of itsobvioustech] (GNU General Public License v3.0).
- Heavily inspired in https://github.com/maxrobot/elliptic-solidity/blob/c4bb1b6e8ae89534d8db3a6b3a6b52219100520f/contracts/Secp256r1.sol[maxrobot] and
- https://github.com/tdrerup/elliptic-curve-solidity/blob/59a9c25957d4d190eff53b6610731d81a077a15e/contracts/curves/EllipticCurve.sol[tdrerup] implementations.
- _Available since v5.1._
- [.contract-index]
- .Functions
- --
- * {xref-P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-}[`++verify(h, r, s, qx, qy)++`]
- * {xref-P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-}[`++verifyNative(h, r, s, qx, qy)++`]
- * {xref-P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-}[`++verifySolidity(h, r, s, qx, qy)++`]
- * {xref-P256-recovery-bytes32-uint8-bytes32-bytes32-}[`++recovery(h, v, r, s)++`]
- * {xref-P256-isValidPublicKey-bytes32-bytes32-}[`++isValidPublicKey(x, y)++`]
- --
- [.contract-index]
- .Internal Variables
- --
- * {xref-P256-GX-uint256}[`++uint256 constant GX++`]
- * {xref-P256-GY-uint256}[`++uint256 constant GY++`]
- * {xref-P256-P-uint256}[`++uint256 constant P++`]
- * {xref-P256-N-uint256}[`++uint256 constant N++`]
- * {xref-P256-A-uint256}[`++uint256 constant A++`]
- * {xref-P256-B-uint256}[`++uint256 constant B++`]
- --
- [.contract-item]
- [[P256-verify-bytes32-bytes32-bytes32-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++verify++#++(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) → bool++` [.item-kind]#internal#
- Verifies a secp256r1 signature using the RIP-7212 precompile and falls back to the Solidity implementation
- if the precompile is not available. This version should work on all chains, but requires the deployment of more
- bytecode.
- [.contract-item]
- [[P256-verifyNative-bytes32-bytes32-bytes32-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++verifyNative++#++(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) → bool++` [.item-kind]#internal#
- Same as {verify}, but it will revert if the required precompile is not available.
- Make sure any logic (code or precompile) deployed at that address is the expected one,
- otherwise the returned value may be misinterpreted as a positive boolean.
- [.contract-item]
- [[P256-verifySolidity-bytes32-bytes32-bytes32-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++verifySolidity++#++(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) → bool++` [.item-kind]#internal#
- Same as {verify}, but only the Solidity implementation is used.
- [.contract-item]
- [[P256-recovery-bytes32-uint8-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++recovery++#++(bytes32 h, uint8 v, bytes32 r, bytes32 s) → bytes32 x, bytes32 y++` [.item-kind]#internal#
- Public key recovery
- [.contract-item]
- [[P256-isValidPublicKey-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++isValidPublicKey++#++(bytes32 x, bytes32 y) → bool result++` [.item-kind]#internal#
- Checks if (x, y) are valid coordinates of a point on the curve.
- In particular this function checks that x < P and y < P.
- [.contract-item]
- [[P256-GX-uint256]]
- ==== `uint256 [.contract-item-name]#++GX++#` [.item-kind]#internal constant#
- Generator (x component)
- [.contract-item]
- [[P256-GY-uint256]]
- ==== `uint256 [.contract-item-name]#++GY++#` [.item-kind]#internal constant#
- Generator (y component)
- [.contract-item]
- [[P256-P-uint256]]
- ==== `uint256 [.contract-item-name]#++P++#` [.item-kind]#internal constant#
- P (size of the field)
- [.contract-item]
- [[P256-N-uint256]]
- ==== `uint256 [.contract-item-name]#++N++#` [.item-kind]#internal constant#
- N (order of G)
- [.contract-item]
- [[P256-A-uint256]]
- ==== `uint256 [.contract-item-name]#++A++#` [.item-kind]#internal constant#
- A parameter of the weierstrass equation
- [.contract-item]
- [[P256-B-uint256]]
- ==== `uint256 [.contract-item-name]#++B++#` [.item-kind]#internal constant#
- B parameter of the weierstrass equation
- :pkcs1Sha256: pass:normal[xref:#RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-[`++pkcs1Sha256++`]]
- :pkcs1Sha256: pass:normal[xref:#RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-[`++pkcs1Sha256++`]]
- [.contract]
- [[RSA]]
- === `++RSA++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/RSA.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/cryptography/RSA.sol";
- ```
- RSA PKCS#1 v1.5 signature verification implementation according to https://datatracker.ietf.org/doc/html/rfc8017[RFC8017].
- This library supports PKCS#1 v1.5 padding to avoid malleability via chosen plaintext attacks in practical implementations.
- The padding follows the EMSA-PKCS1-v1_5-ENCODE encoding definition as per section 9.2 of the RFC. This padding makes
- RSA semantically secure for signing messages.
- Inspired by https://github.com/adria0/SolRsaVerify/blob/79c6182cabb9102ea69d4a2e996816091d5f1cd1[Adrià Massanet's work] (GNU General Public License v3.0).
- _Available since v5.1._
- [.contract-index]
- .Functions
- --
- * {xref-RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-}[`++pkcs1Sha256(data, s, e, n)++`]
- * {xref-RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-}[`++pkcs1Sha256(digest, s, e, n)++`]
- --
- [.contract-item]
- [[RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-]]
- ==== `[.contract-item-name]#++pkcs1Sha256++#++(bytes data, bytes s, bytes e, bytes n) → bool++` [.item-kind]#internal#
- Same as {pkcs1Sha256} but using SHA256 to calculate the digest of `data`.
- [.contract-item]
- [[RSA-pkcs1Sha256-bytes32-bytes-bytes-bytes-]]
- ==== `[.contract-item-name]#++pkcs1Sha256++#++(bytes32 digest, bytes s, bytes e, bytes n) → bool++` [.item-kind]#internal#
- Verifies a PKCSv1.5 signature given a digest according to the verification
- method described in https://datatracker.ietf.org/doc/html/rfc8017#section-8.2.2[section 8.2.2 of RFC8017] with
- support for explicit or implicit NULL parameters in the DigestInfo (no other optional parameters are supported).
- IMPORTANT: For security reason, this function requires the signature and modulus to have a length of at least
- 2048 bits. If you use a smaller key, consider replacing it with a larger, more secure, one.
- WARNING: This verification algorithm doesn't prevent replayability. If called multiple times with the same
- digest, public key and (valid signature), it will return true every time. Consider including an onchain nonce
- or unique identifier in the message to prevent replay attacks.
- WARNING: This verification algorithm supports any exponent. NIST recommends using `65537` (or higher).
- That is the default value many libraries use, such as OpenSSL. Developers may choose to reject public keys
- using a low exponent out of security concerns.
- :constructor: pass:normal[xref:#EIP712-constructor-string-string-[`++constructor++`]]
- :_domainSeparatorV4: pass:normal[xref:#EIP712-_domainSeparatorV4--[`++_domainSeparatorV4++`]]
- :_hashTypedDataV4: pass:normal[xref:#EIP712-_hashTypedDataV4-bytes32-[`++_hashTypedDataV4++`]]
- :eip712Domain: pass:normal[xref:#EIP712-eip712Domain--[`++eip712Domain++`]]
- :_EIP712Name: pass:normal[xref:#EIP712-_EIP712Name--[`++_EIP712Name++`]]
- :_EIP712Version: pass:normal[xref:#EIP712-_EIP712Version--[`++_EIP712Version++`]]
- [.contract]
- [[EIP712]]
- === `++EIP712++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/EIP712.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
- ```
- https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.
- The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
- encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
- does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
- produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
- This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
- scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
- ({_hashTypedDataV4}).
- The implementation of the domain separator was designed to be as efficient as possible while still properly updating
- the chain id to protect against replay attacks on an eventual fork of the chain.
- NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
- https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
- NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
- separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
- separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
- [.contract-index]
- .Functions
- --
- * {xref-EIP712-constructor-string-string-}[`++constructor(name, version)++`]
- * {xref-EIP712-_domainSeparatorV4--}[`++_domainSeparatorV4()++`]
- * {xref-EIP712-_hashTypedDataV4-bytes32-}[`++_hashTypedDataV4(structHash)++`]
- * {xref-EIP712-eip712Domain--}[`++eip712Domain()++`]
- * {xref-EIP712-_EIP712Name--}[`++_EIP712Name()++`]
- * {xref-EIP712-_EIP712Version--}[`++_EIP712Version()++`]
- [.contract-subindex-inherited]
- .IERC5267
- --
- [.contract-index]
- .Events
- --
- [.contract-subindex-inherited]
- .IERC5267
- * {xref-IERC5267-EIP712DomainChanged--}[`++EIP712DomainChanged()++`]
- --
- [.contract-item]
- [[EIP712-constructor-string-string-]]
- ==== `[.contract-item-name]#++constructor++#++(string name, string version)++` [.item-kind]#internal#
- Initializes the domain separator and parameter caches.
- The meaning of `name` and `version` is specified in
- https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:
- - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
- - `version`: the current major version of the signing domain.
- NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
- contract upgrade].
- [.contract-item]
- [[EIP712-_domainSeparatorV4--]]
- ==== `[.contract-item-name]#++_domainSeparatorV4++#++() → bytes32++` [.item-kind]#internal#
- Returns the domain separator for the current chain.
- [.contract-item]
- [[EIP712-_hashTypedDataV4-bytes32-]]
- ==== `[.contract-item-name]#++_hashTypedDataV4++#++(bytes32 structHash) → bytes32++` [.item-kind]#internal#
- Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
- function returns the hash of the fully encoded EIP712 message for this domain.
- This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
- ```solidity
- bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
- keccak256("Mail(address to,string contents)"),
- mailTo,
- keccak256(bytes(mailContents))
- )));
- address signer = ECDSA.recover(digest, signature);
- ```
- [.contract-item]
- [[EIP712-eip712Domain--]]
- ==== `[.contract-item-name]#++eip712Domain++#++() → bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions++` [.item-kind]#public#
- See {IERC-5267}.
- [.contract-item]
- [[EIP712-_EIP712Name--]]
- ==== `[.contract-item-name]#++_EIP712Name++#++() → string++` [.item-kind]#internal#
- The name parameter for the EIP712 domain.
- NOTE: By default this function reads _name which is an immutable value.
- It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
- [.contract-item]
- [[EIP712-_EIP712Version--]]
- ==== `[.contract-item-name]#++_EIP712Version++#++() → string++` [.item-kind]#internal#
- The version parameter for the EIP712 domain.
- NOTE: By default this function reads _version which is an immutable value.
- It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
- :toEthSignedMessageHash: pass:normal[xref:#MessageHashUtils-toEthSignedMessageHash-bytes32-[`++toEthSignedMessageHash++`]]
- :toEthSignedMessageHash: pass:normal[xref:#MessageHashUtils-toEthSignedMessageHash-bytes-[`++toEthSignedMessageHash++`]]
- :toDataWithIntendedValidatorHash: pass:normal[xref:#MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-[`++toDataWithIntendedValidatorHash++`]]
- :toTypedDataHash: pass:normal[xref:#MessageHashUtils-toTypedDataHash-bytes32-bytes32-[`++toTypedDataHash++`]]
- [.contract]
- [[MessageHashUtils]]
- === `++MessageHashUtils++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/MessageHashUtils.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
- ```
- Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
- The library provides methods for generating a hash of a message that conforms to the
- https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
- specifications.
- [.contract-index]
- .Functions
- --
- * {xref-MessageHashUtils-toEthSignedMessageHash-bytes32-}[`++toEthSignedMessageHash(messageHash)++`]
- * {xref-MessageHashUtils-toEthSignedMessageHash-bytes-}[`++toEthSignedMessageHash(message)++`]
- * {xref-MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-}[`++toDataWithIntendedValidatorHash(validator, data)++`]
- * {xref-MessageHashUtils-toTypedDataHash-bytes32-bytes32-}[`++toTypedDataHash(domainSeparator, structHash)++`]
- --
- [.contract-item]
- [[MessageHashUtils-toEthSignedMessageHash-bytes32-]]
- ==== `[.contract-item-name]#++toEthSignedMessageHash++#++(bytes32 messageHash) → bytes32 digest++` [.item-kind]#internal#
- Returns the keccak256 digest of an ERC-191 signed data with version
- `0x45` (`personal_sign` messages).
- The digest is calculated by prefixing a bytes32 `messageHash` with
- `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
- hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
- NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
- keccak256, although any bytes32 value can be safely used because the final digest will
- be re-hashed.
- See {ECDSA-recover}.
- [.contract-item]
- [[MessageHashUtils-toEthSignedMessageHash-bytes-]]
- ==== `[.contract-item-name]#++toEthSignedMessageHash++#++(bytes message) → bytes32++` [.item-kind]#internal#
- Returns the keccak256 digest of an ERC-191 signed data with version
- `0x45` (`personal_sign` messages).
- The digest is calculated by prefixing an arbitrary `message` with
- `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
- hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
- See {ECDSA-recover}.
- [.contract-item]
- [[MessageHashUtils-toDataWithIntendedValidatorHash-address-bytes-]]
- ==== `[.contract-item-name]#++toDataWithIntendedValidatorHash++#++(address validator, bytes data) → bytes32++` [.item-kind]#internal#
- Returns the keccak256 digest of an ERC-191 signed data with version
- `0x00` (data with intended validator).
- The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
- `validator` address. Then hashing the result.
- See {ECDSA-recover}.
- [.contract-item]
- [[MessageHashUtils-toTypedDataHash-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++toTypedDataHash++#++(bytes32 domainSeparator, bytes32 structHash) → bytes32 digest++` [.item-kind]#internal#
- Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).
- The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
- `\x19\x01` and hashing the result. It corresponds to the hash signed by the
- https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
- See {ECDSA-recover}.
- :isValidSignatureNow: pass:normal[xref:#SignatureChecker-isValidSignatureNow-address-bytes32-bytes-[`++isValidSignatureNow++`]]
- :isValidERC1271SignatureNow: pass:normal[xref:#SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-[`++isValidERC1271SignatureNow++`]]
- [.contract]
- [[SignatureChecker]]
- === `++SignatureChecker++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/SignatureChecker.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
- ```
- Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
- signatures from externally owned accounts (EOAs) as well as ERC-1271 signatures from smart contract wallets like
- Argent and Safe Wallet (previously Gnosis Safe).
- [.contract-index]
- .Functions
- --
- * {xref-SignatureChecker-isValidSignatureNow-address-bytes32-bytes-}[`++isValidSignatureNow(signer, hash, signature)++`]
- * {xref-SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-}[`++isValidERC1271SignatureNow(signer, hash, signature)++`]
- --
- [.contract-item]
- [[SignatureChecker-isValidSignatureNow-address-bytes32-bytes-]]
- ==== `[.contract-item-name]#++isValidSignatureNow++#++(address signer, bytes32 hash, bytes signature) → bool++` [.item-kind]#internal#
- Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
- signature is validated against that smart contract using ERC-1271, otherwise it's validated using `ECDSA.recover`.
- NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
- change through time. It could return true at block N and false at block N+1 (or the opposite).
- [.contract-item]
- [[SignatureChecker-isValidERC1271SignatureNow-address-bytes32-bytes-]]
- ==== `[.contract-item-name]#++isValidERC1271SignatureNow++#++(address signer, bytes32 hash, bytes signature) → bool++` [.item-kind]#internal#
- Checks if a signature is valid for a given signer and data hash. The signature is validated
- against the signer smart contract using ERC-1271.
- NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
- change through time. It could return true at block N and false at block N+1 (or the opposite).
- :commutativeKeccak256: pass:normal[xref:#Hashes-commutativeKeccak256-bytes32-bytes32-[`++commutativeKeccak256++`]]
- [.contract]
- [[Hashes]]
- === `++Hashes++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/Hashes.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/cryptography/Hashes.sol";
- ```
- Library of standard hash functions.
- _Available since v5.1._
- [.contract-index]
- .Functions
- --
- * {xref-Hashes-commutativeKeccak256-bytes32-bytes32-}[`++commutativeKeccak256(a, b)++`]
- --
- [.contract-item]
- [[Hashes-commutativeKeccak256-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++commutativeKeccak256++#++(bytes32 a, bytes32 b) → bytes32++` [.item-kind]#internal#
- Commutative Keccak256 hash of a sorted pair of bytes32. Frequently used when working with merkle proofs.
- NOTE: Equivalent to the `standardNodeHash` in our https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
- :MerkleProofInvalidMultiproof: pass:normal[xref:#MerkleProof-MerkleProofInvalidMultiproof--[`++MerkleProofInvalidMultiproof++`]]
- :verify: pass:normal[xref:#MerkleProof-verify-bytes32---bytes32-bytes32-[`++verify++`]]
- :processProof: pass:normal[xref:#MerkleProof-processProof-bytes32---bytes32-[`++processProof++`]]
- :verify: pass:normal[xref:#MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++verify++`]]
- :processProof: pass:normal[xref:#MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++processProof++`]]
- :verifyCalldata: pass:normal[xref:#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-[`++verifyCalldata++`]]
- :processProofCalldata: pass:normal[xref:#MerkleProof-processProofCalldata-bytes32---bytes32-[`++processProofCalldata++`]]
- :verifyCalldata: pass:normal[xref:#MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++verifyCalldata++`]]
- :processProofCalldata: pass:normal[xref:#MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++processProofCalldata++`]]
- :multiProofVerify: pass:normal[xref:#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---[`++multiProofVerify++`]]
- :processMultiProof: pass:normal[xref:#MerkleProof-processMultiProof-bytes32---bool---bytes32---[`++processMultiProof++`]]
- :multiProofVerify: pass:normal[xref:#MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++multiProofVerify++`]]
- :processMultiProof: pass:normal[xref:#MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++processMultiProof++`]]
- :multiProofVerifyCalldata: pass:normal[xref:#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---[`++multiProofVerifyCalldata++`]]
- :processMultiProofCalldata: pass:normal[xref:#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---[`++processMultiProofCalldata++`]]
- :multiProofVerifyCalldata: pass:normal[xref:#MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++multiProofVerifyCalldata++`]]
- :processMultiProofCalldata: pass:normal[xref:#MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--[`++processMultiProofCalldata++`]]
- [.contract]
- [[MerkleProof]]
- === `++MerkleProof++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/cryptography/MerkleProof.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
- ```
- These functions deal with verification of Merkle Tree proofs.
- The tree and the proofs can be generated using our
- https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
- You will find a quickstart guide in the readme.
- WARNING: You should avoid using leaf values that are 64 bytes long prior to
- hashing, or use a hash function other than keccak256 for hashing leaves.
- This is because the concatenation of a sorted pair of internal nodes in
- the Merkle tree could be reinterpreted as a leaf value.
- OpenZeppelin's JavaScript library generates Merkle trees that are safe
- against this attack out of the box.
- IMPORTANT: Consider memory side-effects when using custom hashing functions
- that access memory in an unsafe way.
- NOTE: This library supports proof verification for merkle trees built using
- custom _commutative_ hashing functions (i.e. `H(a, b) == H(b, a)`). Proving
- leaf inclusion in trees built using non-commutative hashing functions requires
- additional logic that is not supported by this library.
- [.contract-index]
- .Functions
- --
- * {xref-MerkleProof-verify-bytes32---bytes32-bytes32-}[`++verify(proof, root, leaf)++`]
- * {xref-MerkleProof-processProof-bytes32---bytes32-}[`++processProof(proof, leaf)++`]
- * {xref-MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++verify(proof, root, leaf, hasher)++`]
- * {xref-MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++processProof(proof, leaf, hasher)++`]
- * {xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-}[`++verifyCalldata(proof, root, leaf)++`]
- * {xref-MerkleProof-processProofCalldata-bytes32---bytes32-}[`++processProofCalldata(proof, leaf)++`]
- * {xref-MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++verifyCalldata(proof, root, leaf, hasher)++`]
- * {xref-MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++processProofCalldata(proof, leaf, hasher)++`]
- * {xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---}[`++multiProofVerify(proof, proofFlags, root, leaves)++`]
- * {xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---}[`++processMultiProof(proof, proofFlags, leaves)++`]
- * {xref-MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++multiProofVerify(proof, proofFlags, root, leaves, hasher)++`]
- * {xref-MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++processMultiProof(proof, proofFlags, leaves, hasher)++`]
- * {xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---}[`++multiProofVerifyCalldata(proof, proofFlags, root, leaves)++`]
- * {xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---}[`++processMultiProofCalldata(proof, proofFlags, leaves)++`]
- * {xref-MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++multiProofVerifyCalldata(proof, proofFlags, root, leaves, hasher)++`]
- * {xref-MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--}[`++processMultiProofCalldata(proof, proofFlags, leaves, hasher)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-MerkleProof-MerkleProofInvalidMultiproof--}[`++MerkleProofInvalidMultiproof()++`]
- --
- [.contract-item]
- [[MerkleProof-verify-bytes32---bytes32-bytes32-]]
- ==== `[.contract-item-name]#++verify++#++(bytes32[] proof, bytes32 root, bytes32 leaf) → bool++` [.item-kind]#internal#
- Returns true if a `leaf` can be proved to be a part of a Merkle tree
- defined by `root`. For this, a `proof` must be provided, containing
- sibling hashes on the branch from the leaf to the root of the tree. Each
- pair of leaves and each pair of pre-images are assumed to be sorted.
- This version handles proofs in memory with the default hashing function.
- [.contract-item]
- [[MerkleProof-processProof-bytes32---bytes32-]]
- ==== `[.contract-item-name]#++processProof++#++(bytes32[] proof, bytes32 leaf) → bytes32++` [.item-kind]#internal#
- Returns the rebuilt hash obtained by traversing a Merkle tree up
- from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
- hash matches the root of the tree. When processing the proof, the pairs
- of leaves & pre-images are assumed to be sorted.
- This version handles proofs in memory with the default hashing function.
- [.contract-item]
- [[MerkleProof-verify-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
- ==== `[.contract-item-name]#++verify++#++(bytes32[] proof, bytes32 root, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) → bool++` [.item-kind]#internal#
- Returns true if a `leaf` can be proved to be a part of a Merkle tree
- defined by `root`. For this, a `proof` must be provided, containing
- sibling hashes on the branch from the leaf to the root of the tree. Each
- pair of leaves and each pair of pre-images are assumed to be sorted.
- This version handles proofs in memory with a custom hashing function.
- [.contract-item]
- [[MerkleProof-processProof-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
- ==== `[.contract-item-name]#++processProof++#++(bytes32[] proof, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) → bytes32++` [.item-kind]#internal#
- Returns the rebuilt hash obtained by traversing a Merkle tree up
- from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
- hash matches the root of the tree. When processing the proof, the pairs
- of leaves & pre-images are assumed to be sorted.
- This version handles proofs in memory with a custom hashing function.
- [.contract-item]
- [[MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-]]
- ==== `[.contract-item-name]#++verifyCalldata++#++(bytes32[] proof, bytes32 root, bytes32 leaf) → bool++` [.item-kind]#internal#
- Returns true if a `leaf` can be proved to be a part of a Merkle tree
- defined by `root`. For this, a `proof` must be provided, containing
- sibling hashes on the branch from the leaf to the root of the tree. Each
- pair of leaves and each pair of pre-images are assumed to be sorted.
- This version handles proofs in calldata with the default hashing function.
- [.contract-item]
- [[MerkleProof-processProofCalldata-bytes32---bytes32-]]
- ==== `[.contract-item-name]#++processProofCalldata++#++(bytes32[] proof, bytes32 leaf) → bytes32++` [.item-kind]#internal#
- Returns the rebuilt hash obtained by traversing a Merkle tree up
- from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
- hash matches the root of the tree. When processing the proof, the pairs
- of leaves & pre-images are assumed to be sorted.
- This version handles proofs in calldata with the default hashing function.
- [.contract-item]
- [[MerkleProof-verifyCalldata-bytes32---bytes32-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
- ==== `[.contract-item-name]#++verifyCalldata++#++(bytes32[] proof, bytes32 root, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) → bool++` [.item-kind]#internal#
- Returns true if a `leaf` can be proved to be a part of a Merkle tree
- defined by `root`. For this, a `proof` must be provided, containing
- sibling hashes on the branch from the leaf to the root of the tree. Each
- pair of leaves and each pair of pre-images are assumed to be sorted.
- This version handles proofs in calldata with a custom hashing function.
- [.contract-item]
- [[MerkleProof-processProofCalldata-bytes32---bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
- ==== `[.contract-item-name]#++processProofCalldata++#++(bytes32[] proof, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) hasher) → bytes32++` [.item-kind]#internal#
- Returns the rebuilt hash obtained by traversing a Merkle tree up
- from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
- hash matches the root of the tree. When processing the proof, the pairs
- of leaves & pre-images are assumed to be sorted.
- This version handles proofs in calldata with a custom hashing function.
- [.contract-item]
- [[MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---]]
- ==== `[.contract-item-name]#++multiProofVerify++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves) → bool++` [.item-kind]#internal#
- Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
- `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
- This version handles multiproofs in memory with the default hashing function.
- CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
- NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
- The `leaves` must be validated independently. See {processMultiProof}.
- [.contract-item]
- [[MerkleProof-processMultiProof-bytes32---bool---bytes32---]]
- ==== `[.contract-item-name]#++processMultiProof++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves) → bytes32 merkleRoot++` [.item-kind]#internal#
- Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
- proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
- leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
- respectively.
- This version handles multiproofs in memory with the default hashing function.
- CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
- is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
- tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
- NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
- and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
- validating the leaves elsewhere.
- [.contract-item]
- [[MerkleProof-multiProofVerify-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
- ==== `[.contract-item-name]#++multiProofVerify++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) → bool++` [.item-kind]#internal#
- Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
- `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
- This version handles multiproofs in memory with a custom hashing function.
- CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
- NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
- The `leaves` must be validated independently. See {processMultiProof}.
- [.contract-item]
- [[MerkleProof-processMultiProof-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
- ==== `[.contract-item-name]#++processMultiProof++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) → bytes32 merkleRoot++` [.item-kind]#internal#
- Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
- proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
- leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
- respectively.
- This version handles multiproofs in memory with a custom hashing function.
- CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
- is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
- tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
- NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
- and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
- validating the leaves elsewhere.
- [.contract-item]
- [[MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---]]
- ==== `[.contract-item-name]#++multiProofVerifyCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves) → bool++` [.item-kind]#internal#
- Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
- `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
- This version handles multiproofs in calldata with the default hashing function.
- CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
- NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
- The `leaves` must be validated independently. See {processMultiProofCalldata}.
- [.contract-item]
- [[MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---]]
- ==== `[.contract-item-name]#++processMultiProofCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves) → bytes32 merkleRoot++` [.item-kind]#internal#
- Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
- proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
- leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
- respectively.
- This version handles multiproofs in calldata with the default hashing function.
- CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
- is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
- tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
- NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
- and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
- validating the leaves elsewhere.
- [.contract-item]
- [[MerkleProof-multiProofVerifyCalldata-bytes32---bool---bytes32-bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
- ==== `[.contract-item-name]#++multiProofVerifyCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32 root, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) → bool++` [.item-kind]#internal#
- Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
- `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
- This version handles multiproofs in calldata with a custom hashing function.
- CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
- NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
- The `leaves` must be validated independently. See {processMultiProofCalldata}.
- [.contract-item]
- [[MerkleProof-processMultiProofCalldata-bytes32---bool---bytes32---function--bytes32-bytes32--view-returns--bytes32--]]
- ==== `[.contract-item-name]#++processMultiProofCalldata++#++(bytes32[] proof, bool[] proofFlags, bytes32[] leaves, function (bytes32,bytes32) view returns (bytes32) hasher) → bytes32 merkleRoot++` [.item-kind]#internal#
- Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
- proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
- leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
- respectively.
- This version handles multiproofs in calldata with a custom hashing function.
- CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
- is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
- tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
- NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
- and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
- validating the leaves elsewhere.
- [.contract-item]
- [[MerkleProof-MerkleProofInvalidMultiproof--]]
- ==== `[.contract-item-name]#++MerkleProofInvalidMultiproof++#++()++` [.item-kind]#error#
- The multiproof provided is not valid.
- == Security
- :ReentrancyGuardReentrantCall: pass:normal[xref:#ReentrancyGuard-ReentrancyGuardReentrantCall--[`++ReentrancyGuardReentrantCall++`]]
- :constructor: pass:normal[xref:#ReentrancyGuard-constructor--[`++constructor++`]]
- :nonReentrant: pass:normal[xref:#ReentrancyGuard-nonReentrant--[`++nonReentrant++`]]
- :_reentrancyGuardEntered: pass:normal[xref:#ReentrancyGuard-_reentrancyGuardEntered--[`++_reentrancyGuardEntered++`]]
- [.contract]
- [[ReentrancyGuard]]
- === `++ReentrancyGuard++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/ReentrancyGuard.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
- ```
- Contract module that helps prevent reentrant calls to a function.
- Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
- available, which can be applied to functions to make sure there are no nested
- (reentrant) calls to them.
- Note that because there is a single `nonReentrant` guard, functions marked as
- `nonReentrant` may not call one another. This can be worked around by making
- those functions `private`, and then adding `external` `nonReentrant` entry
- points to them.
- TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
- consider using {ReentrancyGuardTransient} instead.
- TIP: If you would like to learn more about reentrancy and alternative ways
- to protect against it, check out our blog post
- https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
- [.contract-index]
- .Modifiers
- --
- * {xref-ReentrancyGuard-nonReentrant--}[`++nonReentrant()++`]
- --
- [.contract-index]
- .Functions
- --
- * {xref-ReentrancyGuard-constructor--}[`++constructor()++`]
- * {xref-ReentrancyGuard-_reentrancyGuardEntered--}[`++_reentrancyGuardEntered()++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-ReentrancyGuard-ReentrancyGuardReentrantCall--}[`++ReentrancyGuardReentrantCall()++`]
- --
- [.contract-item]
- [[ReentrancyGuard-nonReentrant--]]
- ==== `[.contract-item-name]#++nonReentrant++#++()++` [.item-kind]#modifier#
- Prevents a contract from calling itself, directly or indirectly.
- Calling a `nonReentrant` function from another `nonReentrant`
- function is not supported. It is possible to prevent this from happening
- by making the `nonReentrant` function external, and making it call a
- `private` function that does the actual work.
- [.contract-item]
- [[ReentrancyGuard-constructor--]]
- ==== `[.contract-item-name]#++constructor++#++()++` [.item-kind]#internal#
- [.contract-item]
- [[ReentrancyGuard-_reentrancyGuardEntered--]]
- ==== `[.contract-item-name]#++_reentrancyGuardEntered++#++() → bool++` [.item-kind]#internal#
- Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
- `nonReentrant` function in the call stack.
- [.contract-item]
- [[ReentrancyGuard-ReentrancyGuardReentrantCall--]]
- ==== `[.contract-item-name]#++ReentrancyGuardReentrantCall++#++()++` [.item-kind]#error#
- Unauthorized reentrant call.
- :ReentrancyGuardReentrantCall: pass:normal[xref:#ReentrancyGuardTransient-ReentrancyGuardReentrantCall--[`++ReentrancyGuardReentrantCall++`]]
- :nonReentrant: pass:normal[xref:#ReentrancyGuardTransient-nonReentrant--[`++nonReentrant++`]]
- :_reentrancyGuardEntered: pass:normal[xref:#ReentrancyGuardTransient-_reentrancyGuardEntered--[`++_reentrancyGuardEntered++`]]
- [.contract]
- [[ReentrancyGuardTransient]]
- === `++ReentrancyGuardTransient++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/ReentrancyGuardTransient.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol";
- ```
- Variant of {ReentrancyGuard} that uses transient storage.
- NOTE: This variant only works on networks where EIP-1153 is available.
- _Available since v5.1._
- [.contract-index]
- .Modifiers
- --
- * {xref-ReentrancyGuardTransient-nonReentrant--}[`++nonReentrant()++`]
- --
- [.contract-index]
- .Functions
- --
- * {xref-ReentrancyGuardTransient-_reentrancyGuardEntered--}[`++_reentrancyGuardEntered()++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-ReentrancyGuardTransient-ReentrancyGuardReentrantCall--}[`++ReentrancyGuardReentrantCall()++`]
- --
- [.contract-item]
- [[ReentrancyGuardTransient-nonReentrant--]]
- ==== `[.contract-item-name]#++nonReentrant++#++()++` [.item-kind]#modifier#
- Prevents a contract from calling itself, directly or indirectly.
- Calling a `nonReentrant` function from another `nonReentrant`
- function is not supported. It is possible to prevent this from happening
- by making the `nonReentrant` function external, and making it call a
- `private` function that does the actual work.
- [.contract-item]
- [[ReentrancyGuardTransient-_reentrancyGuardEntered--]]
- ==== `[.contract-item-name]#++_reentrancyGuardEntered++#++() → bool++` [.item-kind]#internal#
- Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
- `nonReentrant` function in the call stack.
- [.contract-item]
- [[ReentrancyGuardTransient-ReentrancyGuardReentrantCall--]]
- ==== `[.contract-item-name]#++ReentrancyGuardReentrantCall++#++()++` [.item-kind]#error#
- Unauthorized reentrant call.
- :Paused: pass:normal[xref:#Pausable-Paused-address-[`++Paused++`]]
- :Unpaused: pass:normal[xref:#Pausable-Unpaused-address-[`++Unpaused++`]]
- :EnforcedPause: pass:normal[xref:#Pausable-EnforcedPause--[`++EnforcedPause++`]]
- :ExpectedPause: pass:normal[xref:#Pausable-ExpectedPause--[`++ExpectedPause++`]]
- :constructor: pass:normal[xref:#Pausable-constructor--[`++constructor++`]]
- :whenNotPaused: pass:normal[xref:#Pausable-whenNotPaused--[`++whenNotPaused++`]]
- :whenPaused: pass:normal[xref:#Pausable-whenPaused--[`++whenPaused++`]]
- :paused: pass:normal[xref:#Pausable-paused--[`++paused++`]]
- :_requireNotPaused: pass:normal[xref:#Pausable-_requireNotPaused--[`++_requireNotPaused++`]]
- :_requirePaused: pass:normal[xref:#Pausable-_requirePaused--[`++_requirePaused++`]]
- :_pause: pass:normal[xref:#Pausable-_pause--[`++_pause++`]]
- :_unpause: pass:normal[xref:#Pausable-_unpause--[`++_unpause++`]]
- [.contract]
- [[Pausable]]
- === `++Pausable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Pausable.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Pausable.sol";
- ```
- Contract module which allows children to implement an emergency stop
- mechanism that can be triggered by an authorized account.
- This module is used through inheritance. It will make available the
- modifiers `whenNotPaused` and `whenPaused`, which can be applied to
- the functions of your contract. Note that they will not be pausable by
- simply including this module, only once the modifiers are put in place.
- [.contract-index]
- .Modifiers
- --
- * {xref-Pausable-whenNotPaused--}[`++whenNotPaused()++`]
- * {xref-Pausable-whenPaused--}[`++whenPaused()++`]
- --
- [.contract-index]
- .Functions
- --
- * {xref-Pausable-constructor--}[`++constructor()++`]
- * {xref-Pausable-paused--}[`++paused()++`]
- * {xref-Pausable-_requireNotPaused--}[`++_requireNotPaused()++`]
- * {xref-Pausable-_requirePaused--}[`++_requirePaused()++`]
- * {xref-Pausable-_pause--}[`++_pause()++`]
- * {xref-Pausable-_unpause--}[`++_unpause()++`]
- --
- [.contract-index]
- .Events
- --
- * {xref-Pausable-Paused-address-}[`++Paused(account)++`]
- * {xref-Pausable-Unpaused-address-}[`++Unpaused(account)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-Pausable-EnforcedPause--}[`++EnforcedPause()++`]
- * {xref-Pausable-ExpectedPause--}[`++ExpectedPause()++`]
- --
- [.contract-item]
- [[Pausable-whenNotPaused--]]
- ==== `[.contract-item-name]#++whenNotPaused++#++()++` [.item-kind]#modifier#
- Modifier to make a function callable only when the contract is not paused.
- Requirements:
- - The contract must not be paused.
- [.contract-item]
- [[Pausable-whenPaused--]]
- ==== `[.contract-item-name]#++whenPaused++#++()++` [.item-kind]#modifier#
- Modifier to make a function callable only when the contract is paused.
- Requirements:
- - The contract must be paused.
- [.contract-item]
- [[Pausable-constructor--]]
- ==== `[.contract-item-name]#++constructor++#++()++` [.item-kind]#internal#
- Initializes the contract in unpaused state.
- [.contract-item]
- [[Pausable-paused--]]
- ==== `[.contract-item-name]#++paused++#++() → bool++` [.item-kind]#public#
- Returns true if the contract is paused, and false otherwise.
- [.contract-item]
- [[Pausable-_requireNotPaused--]]
- ==== `[.contract-item-name]#++_requireNotPaused++#++()++` [.item-kind]#internal#
- Throws if the contract is paused.
- [.contract-item]
- [[Pausable-_requirePaused--]]
- ==== `[.contract-item-name]#++_requirePaused++#++()++` [.item-kind]#internal#
- Throws if the contract is not paused.
- [.contract-item]
- [[Pausable-_pause--]]
- ==== `[.contract-item-name]#++_pause++#++()++` [.item-kind]#internal#
- Triggers stopped state.
- Requirements:
- - The contract must not be paused.
- [.contract-item]
- [[Pausable-_unpause--]]
- ==== `[.contract-item-name]#++_unpause++#++()++` [.item-kind]#internal#
- Returns to normal state.
- Requirements:
- - The contract must be paused.
- [.contract-item]
- [[Pausable-Paused-address-]]
- ==== `[.contract-item-name]#++Paused++#++(address account)++` [.item-kind]#event#
- Emitted when the pause is triggered by `account`.
- [.contract-item]
- [[Pausable-Unpaused-address-]]
- ==== `[.contract-item-name]#++Unpaused++#++(address account)++` [.item-kind]#event#
- Emitted when the pause is lifted by `account`.
- [.contract-item]
- [[Pausable-EnforcedPause--]]
- ==== `[.contract-item-name]#++EnforcedPause++#++()++` [.item-kind]#error#
- The operation failed because the contract is paused.
- [.contract-item]
- [[Pausable-ExpectedPause--]]
- ==== `[.contract-item-name]#++ExpectedPause++#++()++` [.item-kind]#error#
- The operation failed because the contract is not paused.
- :InvalidAccountNonce: pass:normal[xref:#Nonces-InvalidAccountNonce-address-uint256-[`++InvalidAccountNonce++`]]
- :nonces: pass:normal[xref:#Nonces-nonces-address-[`++nonces++`]]
- :_useNonce: pass:normal[xref:#Nonces-_useNonce-address-[`++_useNonce++`]]
- :_useCheckedNonce: pass:normal[xref:#Nonces-_useCheckedNonce-address-uint256-[`++_useCheckedNonce++`]]
- [.contract]
- [[Nonces]]
- === `++Nonces++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Nonces.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Nonces.sol";
- ```
- Provides tracking nonces for addresses. Nonces will only increment.
- [.contract-index]
- .Functions
- --
- * {xref-Nonces-nonces-address-}[`++nonces(owner)++`]
- * {xref-Nonces-_useNonce-address-}[`++_useNonce(owner)++`]
- * {xref-Nonces-_useCheckedNonce-address-uint256-}[`++_useCheckedNonce(owner, nonce)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-Nonces-InvalidAccountNonce-address-uint256-}[`++InvalidAccountNonce(account, currentNonce)++`]
- --
- [.contract-item]
- [[Nonces-nonces-address-]]
- ==== `[.contract-item-name]#++nonces++#++(address owner) → uint256++` [.item-kind]#public#
- Returns the next unused nonce for an address.
- [.contract-item]
- [[Nonces-_useNonce-address-]]
- ==== `[.contract-item-name]#++_useNonce++#++(address owner) → uint256++` [.item-kind]#internal#
- Consumes a nonce.
- Returns the current value and increments nonce.
- [.contract-item]
- [[Nonces-_useCheckedNonce-address-uint256-]]
- ==== `[.contract-item-name]#++_useCheckedNonce++#++(address owner, uint256 nonce)++` [.item-kind]#internal#
- Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
- [.contract-item]
- [[Nonces-InvalidAccountNonce-address-uint256-]]
- ==== `[.contract-item-name]#++InvalidAccountNonce++#++(address account, uint256 currentNonce)++` [.item-kind]#error#
- The nonce used for an `account` is not the expected current nonce.
- == Introspection
- 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_.
- Ethereum contracts have no native concept of an interface, so applications must usually simply trust they are not making an incorrect call. For trusted setups this is a non-issue, but often unknown and untrusted third-party addresses need to be interacted with. There may even not be any direct calls to them! (e.g. ERC-20 tokens may be sent to a contract that lacks a way to transfer them out of it, locking them forever). In these cases, a contract _declaring_ its interface can be very helpful in preventing errors.
- :supportsInterface: pass:normal[xref:#IERC165-supportsInterface-bytes4-[`++supportsInterface++`]]
- [.contract]
- [[IERC165]]
- === `++IERC165++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/introspection/IERC165.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
- ```
- Interface of the ERC-165 standard, as defined in the
- https://eips.ethereum.org/EIPS/eip-165[ERC].
- Implementers can declare support of contract interfaces, which can then be
- queried by others ({ERC165Checker}).
- For an implementation, see {ERC165}.
- [.contract-index]
- .Functions
- --
- * {xref-IERC165-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
- --
- [.contract-item]
- [[IERC165-supportsInterface-bytes4-]]
- ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#external#
- Returns true if this contract implements the interface defined by
- `interfaceId`. See the corresponding
- https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
- to learn more about how these ids are created.
- This function call must use less than 30 000 gas.
- :supportsInterface: pass:normal[xref:#ERC165-supportsInterface-bytes4-[`++supportsInterface++`]]
- [.contract]
- [[ERC165]]
- === `++ERC165++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/introspection/ERC165.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
- ```
- Implementation of the {IERC165} interface.
- Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
- for the additional interface id that will be supported. For example:
- ```solidity
- function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
- return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
- }
- ```
- [.contract-index]
- .Functions
- --
- * {xref-ERC165-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
- [.contract-subindex-inherited]
- .IERC165
- --
- [.contract-item]
- [[ERC165-supportsInterface-bytes4-]]
- ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#public#
- See {IERC165-supportsInterface}.
- :supportsERC165: pass:normal[xref:#ERC165Checker-supportsERC165-address-[`++supportsERC165++`]]
- :supportsInterface: pass:normal[xref:#ERC165Checker-supportsInterface-address-bytes4-[`++supportsInterface++`]]
- :getSupportedInterfaces: pass:normal[xref:#ERC165Checker-getSupportedInterfaces-address-bytes4---[`++getSupportedInterfaces++`]]
- :supportsAllInterfaces: pass:normal[xref:#ERC165Checker-supportsAllInterfaces-address-bytes4---[`++supportsAllInterfaces++`]]
- :supportsERC165InterfaceUnchecked: pass:normal[xref:#ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-[`++supportsERC165InterfaceUnchecked++`]]
- [.contract]
- [[ERC165Checker]]
- === `++ERC165Checker++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/introspection/ERC165Checker.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
- ```
- Library used to query support of an interface declared via {IERC165}.
- Note that these functions return the actual result of the query: they do not
- `revert` if an interface is not supported. It is up to the caller to decide
- what to do in these cases.
- [.contract-index]
- .Functions
- --
- * {xref-ERC165Checker-supportsERC165-address-}[`++supportsERC165(account)++`]
- * {xref-ERC165Checker-supportsInterface-address-bytes4-}[`++supportsInterface(account, interfaceId)++`]
- * {xref-ERC165Checker-getSupportedInterfaces-address-bytes4---}[`++getSupportedInterfaces(account, interfaceIds)++`]
- * {xref-ERC165Checker-supportsAllInterfaces-address-bytes4---}[`++supportsAllInterfaces(account, interfaceIds)++`]
- * {xref-ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-}[`++supportsERC165InterfaceUnchecked(account, interfaceId)++`]
- --
- [.contract-item]
- [[ERC165Checker-supportsERC165-address-]]
- ==== `[.contract-item-name]#++supportsERC165++#++(address account) → bool++` [.item-kind]#internal#
- Returns true if `account` supports the {IERC165} interface.
- [.contract-item]
- [[ERC165Checker-supportsInterface-address-bytes4-]]
- ==== `[.contract-item-name]#++supportsInterface++#++(address account, bytes4 interfaceId) → bool++` [.item-kind]#internal#
- Returns true if `account` supports the interface defined by
- `interfaceId`. Support for {IERC165} itself is queried automatically.
- See {IERC165-supportsInterface}.
- [.contract-item]
- [[ERC165Checker-getSupportedInterfaces-address-bytes4---]]
- ==== `[.contract-item-name]#++getSupportedInterfaces++#++(address account, bytes4[] interfaceIds) → bool[]++` [.item-kind]#internal#
- Returns a boolean array where each value corresponds to the
- interfaces passed in and whether they're supported or not. This allows
- you to batch check interfaces for a contract where your expectation
- is that some interfaces may not be supported.
- See {IERC165-supportsInterface}.
- [.contract-item]
- [[ERC165Checker-supportsAllInterfaces-address-bytes4---]]
- ==== `[.contract-item-name]#++supportsAllInterfaces++#++(address account, bytes4[] interfaceIds) → bool++` [.item-kind]#internal#
- Returns true if `account` supports all the interfaces defined in
- `interfaceIds`. Support for {IERC165} itself is queried automatically.
- Batch-querying can lead to gas savings by skipping repeated checks for
- {IERC165} support.
- See {IERC165-supportsInterface}.
- [.contract-item]
- [[ERC165Checker-supportsERC165InterfaceUnchecked-address-bytes4-]]
- ==== `[.contract-item-name]#++supportsERC165InterfaceUnchecked++#++(address account, bytes4 interfaceId) → bool++` [.item-kind]#internal#
- Assumes that account contains a contract that supports ERC-165, otherwise
- the behavior of this method is undefined. This precondition can be checked
- with {supportsERC165}.
- Some precompiled contracts will falsely indicate support for a given interface, so caution
- should be exercised when using this function.
- Interface identification is specified in ERC-165.
- == Data Structures
- :BitMap: pass:normal[xref:#BitMaps-BitMap[`++BitMap++`]]
- :get: pass:normal[xref:#BitMaps-get-struct-BitMaps-BitMap-uint256-[`++get++`]]
- :setTo: pass:normal[xref:#BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-[`++setTo++`]]
- :set: pass:normal[xref:#BitMaps-set-struct-BitMaps-BitMap-uint256-[`++set++`]]
- :unset: pass:normal[xref:#BitMaps-unset-struct-BitMaps-BitMap-uint256-[`++unset++`]]
- [.contract]
- [[BitMaps]]
- === `++BitMaps++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/BitMaps.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/structs/BitMaps.sol";
- ```
- Library for managing uint256 to bool mapping in a compact and efficient way, provided the keys are sequential.
- Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].
- BitMaps pack 256 booleans across each bit of a single 256-bit slot of `uint256` type.
- Hence booleans corresponding to 256 _sequential_ indices would only consume a single slot,
- unlike the regular `bool` which would consume an entire slot for a single value.
- This results in gas savings in two ways:
- - Setting a zero value to non-zero only once every 256 times
- - Accessing the same warm slot for every 256 _sequential_ indices
- [.contract-index]
- .Functions
- --
- * {xref-BitMaps-get-struct-BitMaps-BitMap-uint256-}[`++get(bitmap, index)++`]
- * {xref-BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-}[`++setTo(bitmap, index, value)++`]
- * {xref-BitMaps-set-struct-BitMaps-BitMap-uint256-}[`++set(bitmap, index)++`]
- * {xref-BitMaps-unset-struct-BitMaps-BitMap-uint256-}[`++unset(bitmap, index)++`]
- --
- [.contract-item]
- [[BitMaps-get-struct-BitMaps-BitMap-uint256-]]
- ==== `[.contract-item-name]#++get++#++(struct BitMaps.BitMap bitmap, uint256 index) → bool++` [.item-kind]#internal#
- Returns whether the bit at `index` is set.
- [.contract-item]
- [[BitMaps-setTo-struct-BitMaps-BitMap-uint256-bool-]]
- ==== `[.contract-item-name]#++setTo++#++(struct BitMaps.BitMap bitmap, uint256 index, bool value)++` [.item-kind]#internal#
- Sets the bit at `index` to the boolean `value`.
- [.contract-item]
- [[BitMaps-set-struct-BitMaps-BitMap-uint256-]]
- ==== `[.contract-item-name]#++set++#++(struct BitMaps.BitMap bitmap, uint256 index)++` [.item-kind]#internal#
- Sets the bit at `index`.
- [.contract-item]
- [[BitMaps-unset-struct-BitMaps-BitMap-uint256-]]
- ==== `[.contract-item-name]#++unset++#++(struct BitMaps.BitMap bitmap, uint256 index)++` [.item-kind]#internal#
- Unsets the bit at `index`.
- :EnumerableMapNonexistentKey: pass:normal[xref:#EnumerableMap-EnumerableMapNonexistentKey-bytes32-[`++EnumerableMapNonexistentKey++`]]
- :Bytes32ToBytes32Map: pass:normal[xref:#EnumerableMap-Bytes32ToBytes32Map[`++Bytes32ToBytes32Map++`]]
- :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-[`++set++`]]
- :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-[`++length++`]]
- :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-[`++at++`]]
- :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++tryGet++`]]
- :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-[`++get++`]]
- :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-[`++keys++`]]
- :UintToUintMap: pass:normal[xref:#EnumerableMap-UintToUintMap[`++UintToUintMap++`]]
- :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-[`++set++`]]
- :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToUintMap-[`++length++`]]
- :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-[`++at++`]]
- :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-[`++tryGet++`]]
- :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-[`++get++`]]
- :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-[`++keys++`]]
- :UintToAddressMap: pass:normal[xref:#EnumerableMap-UintToAddressMap[`++UintToAddressMap++`]]
- :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-[`++set++`]]
- :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-[`++length++`]]
- :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-[`++at++`]]
- :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-[`++tryGet++`]]
- :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-[`++get++`]]
- :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-[`++keys++`]]
- :UintToBytes32Map: pass:normal[xref:#EnumerableMap-UintToBytes32Map[`++UintToBytes32Map++`]]
- :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-[`++set++`]]
- :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-[`++length++`]]
- :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-[`++at++`]]
- :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-[`++tryGet++`]]
- :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-[`++get++`]]
- :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-[`++keys++`]]
- :AddressToUintMap: pass:normal[xref:#EnumerableMap-AddressToUintMap[`++AddressToUintMap++`]]
- :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-[`++set++`]]
- :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-[`++length++`]]
- :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-[`++at++`]]
- :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-[`++tryGet++`]]
- :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-[`++get++`]]
- :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-[`++keys++`]]
- :AddressToAddressMap: pass:normal[xref:#EnumerableMap-AddressToAddressMap[`++AddressToAddressMap++`]]
- :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-[`++set++`]]
- :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-[`++length++`]]
- :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-[`++at++`]]
- :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-[`++tryGet++`]]
- :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-[`++get++`]]
- :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-[`++keys++`]]
- :AddressToBytes32Map: pass:normal[xref:#EnumerableMap-AddressToBytes32Map[`++AddressToBytes32Map++`]]
- :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-[`++set++`]]
- :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-[`++length++`]]
- :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-[`++at++`]]
- :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-[`++tryGet++`]]
- :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-[`++get++`]]
- :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-[`++keys++`]]
- :Bytes32ToUintMap: pass:normal[xref:#EnumerableMap-Bytes32ToUintMap[`++Bytes32ToUintMap++`]]
- :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-[`++set++`]]
- :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-[`++length++`]]
- :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-[`++at++`]]
- :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++tryGet++`]]
- :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-[`++get++`]]
- :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-[`++keys++`]]
- :Bytes32ToAddressMap: pass:normal[xref:#EnumerableMap-Bytes32ToAddressMap[`++Bytes32ToAddressMap++`]]
- :set: pass:normal[xref:#EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-[`++set++`]]
- :remove: pass:normal[xref:#EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-[`++length++`]]
- :at: pass:normal[xref:#EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-[`++at++`]]
- :tryGet: pass:normal[xref:#EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++tryGet++`]]
- :get: pass:normal[xref:#EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-[`++get++`]]
- :keys: pass:normal[xref:#EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-[`++keys++`]]
- [.contract]
- [[EnumerableMap]]
- === `++EnumerableMap++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/EnumerableMap.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol";
- ```
- Library for managing an enumerable variant of Solidity's
- https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
- type.
- Maps have the following properties:
- - Entries are added, removed, and checked for existence in constant time
- (O(1)).
- - Entries are enumerated in O(n). No guarantees are made on the ordering.
- ```solidity
- contract Example {
- // Add the library methods
- using EnumerableMap for EnumerableMap.UintToAddressMap;
- // Declare a set state variable
- EnumerableMap.UintToAddressMap private myMap;
- }
- ```
- The following map types are supported:
- - `uint256 -> address` (`UintToAddressMap`) since v3.0.0
- - `address -> uint256` (`AddressToUintMap`) since v4.6.0
- - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0
- - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0
- - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0
- - `uint256 -> bytes32` (`UintToBytes32Map`) since v5.1.0
- - `address -> address` (`AddressToAddressMap`) since v5.1.0
- - `address -> bytes32` (`AddressToBytes32Map`) since v5.1.0
- - `bytes32 -> address` (`Bytes32ToAddressMap`) since v5.1.0
- [WARNING]
- ====
- Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
- unusable.
- See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
- In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an
- array of EnumerableMap.
- ====
- [.contract-index]
- .Functions
- --
- * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-}[`++set(map, key, value)++`]
- * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++remove(map, key)++`]
- * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++contains(map, key)++`]
- * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-}[`++length(map)++`]
- * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-}[`++at(map, index)++`]
- * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++tryGet(map, key)++`]
- * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-}[`++get(map, key)++`]
- * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-}[`++keys(map)++`]
- * {xref-EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-}[`++set(map, key, value)++`]
- * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-}[`++remove(map, key)++`]
- * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-}[`++contains(map, key)++`]
- * {xref-EnumerableMap-length-struct-EnumerableMap-UintToUintMap-}[`++length(map)++`]
- * {xref-EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-}[`++at(map, index)++`]
- * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-}[`++tryGet(map, key)++`]
- * {xref-EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-}[`++get(map, key)++`]
- * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-}[`++keys(map)++`]
- * {xref-EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-}[`++set(map, key, value)++`]
- * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-}[`++remove(map, key)++`]
- * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-}[`++contains(map, key)++`]
- * {xref-EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-}[`++length(map)++`]
- * {xref-EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-}[`++at(map, index)++`]
- * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-}[`++tryGet(map, key)++`]
- * {xref-EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-}[`++get(map, key)++`]
- * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-}[`++keys(map)++`]
- * {xref-EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-}[`++set(map, key, value)++`]
- * {xref-EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++remove(map, key)++`]
- * {xref-EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++contains(map, key)++`]
- * {xref-EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-}[`++length(map)++`]
- * {xref-EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++at(map, index)++`]
- * {xref-EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++tryGet(map, key)++`]
- * {xref-EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-}[`++get(map, key)++`]
- * {xref-EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-}[`++keys(map)++`]
- * {xref-EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-}[`++set(map, key, value)++`]
- * {xref-EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-}[`++remove(map, key)++`]
- * {xref-EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-}[`++contains(map, key)++`]
- * {xref-EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-}[`++length(map)++`]
- * {xref-EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-}[`++at(map, index)++`]
- * {xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-}[`++tryGet(map, key)++`]
- * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-}[`++get(map, key)++`]
- * {xref-EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-}[`++keys(map)++`]
- * {xref-EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-}[`++set(map, key, value)++`]
- * {xref-EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-}[`++remove(map, key)++`]
- * {xref-EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-}[`++contains(map, key)++`]
- * {xref-EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-}[`++length(map)++`]
- * {xref-EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-}[`++at(map, index)++`]
- * {xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-}[`++tryGet(map, key)++`]
- * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-}[`++get(map, key)++`]
- * {xref-EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-}[`++keys(map)++`]
- * {xref-EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-}[`++set(map, key, value)++`]
- * {xref-EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-}[`++remove(map, key)++`]
- * {xref-EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-}[`++contains(map, key)++`]
- * {xref-EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-}[`++length(map)++`]
- * {xref-EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-}[`++at(map, index)++`]
- * {xref-EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-}[`++tryGet(map, key)++`]
- * {xref-EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-}[`++get(map, key)++`]
- * {xref-EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-}[`++keys(map)++`]
- * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-}[`++set(map, key, value)++`]
- * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++remove(map, key)++`]
- * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++contains(map, key)++`]
- * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-}[`++length(map)++`]
- * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-}[`++at(map, index)++`]
- * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++tryGet(map, key)++`]
- * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-}[`++get(map, key)++`]
- * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-}[`++keys(map)++`]
- * {xref-EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-}[`++set(map, key, value)++`]
- * {xref-EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++remove(map, key)++`]
- * {xref-EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++contains(map, key)++`]
- * {xref-EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-}[`++length(map)++`]
- * {xref-EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-}[`++at(map, index)++`]
- * {xref-EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++tryGet(map, key)++`]
- * {xref-EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-}[`++get(map, key)++`]
- * {xref-EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-}[`++keys(map)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-EnumerableMap-EnumerableMapNonexistentKey-bytes32-}[`++EnumerableMapNonexistentKey(key)++`]
- --
- [.contract-item]
- [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key, bytes32 value) → bool++` [.item-kind]#internal#
- Adds a key-value pair to a map, or updates the value for an existing
- key. O(1).
- Returns true if the key was added to the map, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bool++` [.item-kind]#internal#
- Removes a key-value pair from a map. O(1).
- Returns true if the key was removed from the map, that is if it was present.
- [.contract-item]
- [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bool++` [.item-kind]#internal#
- Returns true if the key is in the map. O(1).
- [.contract-item]
- [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToBytes32Map-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToBytes32Map map) → uint256++` [.item-kind]#internal#
- Returns the number of key-value pairs in the map. O(1).
- [.contract-item]
- [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToBytes32Map-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToBytes32Map map, uint256 index) → bytes32 key, bytes32 value++` [.item-kind]#internal#
- Returns the key-value pair stored at position `index` in the map. O(1).
- Note that there are no guarantees on the ordering of entries inside the
- array, and it may change when more entries are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
- ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bool exists, bytes32 value++` [.item-kind]#internal#
- Tries to returns the value associated with `key`. O(1).
- Does not revert if `key` is not in the map.
- [.contract-item]
- [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToBytes32Map-bytes32-]]
- ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToBytes32Map map, bytes32 key) → bytes32++` [.item-kind]#internal#
- Returns the value associated with `key`. O(1).
- Requirements:
- - `key` must be in the map.
- [.contract-item]
- [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToBytes32Map-]]
- ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToBytes32Map map) → bytes32[]++` [.item-kind]#internal#
- Return the an array containing all the keys
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableMap-set-struct-EnumerableMap-UintToUintMap-uint256-uint256-]]
- ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToUintMap map, uint256 key, uint256 value) → bool++` [.item-kind]#internal#
- Adds a key-value pair to a map, or updates the value for an existing
- key. O(1).
- Returns true if the key was added to the map, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableMap-remove-struct-EnumerableMap-UintToUintMap-uint256-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → bool++` [.item-kind]#internal#
- Removes a value from a map. O(1).
- Returns true if the key was removed from the map, that is if it was present.
- [.contract-item]
- [[EnumerableMap-contains-struct-EnumerableMap-UintToUintMap-uint256-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → bool++` [.item-kind]#internal#
- Returns true if the key is in the map. O(1).
- [.contract-item]
- [[EnumerableMap-length-struct-EnumerableMap-UintToUintMap-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToUintMap map) → uint256++` [.item-kind]#internal#
- Returns the number of elements in the map. O(1).
- [.contract-item]
- [[EnumerableMap-at-struct-EnumerableMap-UintToUintMap-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToUintMap map, uint256 index) → uint256 key, uint256 value++` [.item-kind]#internal#
- Returns the element stored at position `index` in the map. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableMap-tryGet-struct-EnumerableMap-UintToUintMap-uint256-]]
- ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → bool exists, uint256 value++` [.item-kind]#internal#
- Tries to returns the value associated with `key`. O(1).
- Does not revert if `key` is not in the map.
- [.contract-item]
- [[EnumerableMap-get-struct-EnumerableMap-UintToUintMap-uint256-]]
- ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToUintMap map, uint256 key) → uint256++` [.item-kind]#internal#
- Returns the value associated with `key`. O(1).
- Requirements:
- - `key` must be in the map.
- [.contract-item]
- [[EnumerableMap-keys-struct-EnumerableMap-UintToUintMap-]]
- ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToUintMap map) → uint256[]++` [.item-kind]#internal#
- Return the an array containing all the keys
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableMap-set-struct-EnumerableMap-UintToAddressMap-uint256-address-]]
- ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToAddressMap map, uint256 key, address value) → bool++` [.item-kind]#internal#
- Adds a key-value pair to a map, or updates the value for an existing
- key. O(1).
- Returns true if the key was added to the map, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableMap-remove-struct-EnumerableMap-UintToAddressMap-uint256-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → bool++` [.item-kind]#internal#
- Removes a value from a map. O(1).
- Returns true if the key was removed from the map, that is if it was present.
- [.contract-item]
- [[EnumerableMap-contains-struct-EnumerableMap-UintToAddressMap-uint256-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → bool++` [.item-kind]#internal#
- Returns true if the key is in the map. O(1).
- [.contract-item]
- [[EnumerableMap-length-struct-EnumerableMap-UintToAddressMap-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToAddressMap map) → uint256++` [.item-kind]#internal#
- Returns the number of elements in the map. O(1).
- [.contract-item]
- [[EnumerableMap-at-struct-EnumerableMap-UintToAddressMap-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToAddressMap map, uint256 index) → uint256 key, address value++` [.item-kind]#internal#
- Returns the element stored at position `index` in the map. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableMap-tryGet-struct-EnumerableMap-UintToAddressMap-uint256-]]
- ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → bool exists, address value++` [.item-kind]#internal#
- Tries to returns the value associated with `key`. O(1).
- Does not revert if `key` is not in the map.
- [.contract-item]
- [[EnumerableMap-get-struct-EnumerableMap-UintToAddressMap-uint256-]]
- ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToAddressMap map, uint256 key) → address++` [.item-kind]#internal#
- Returns the value associated with `key`. O(1).
- Requirements:
- - `key` must be in the map.
- [.contract-item]
- [[EnumerableMap-keys-struct-EnumerableMap-UintToAddressMap-]]
- ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToAddressMap map) → uint256[]++` [.item-kind]#internal#
- Return the an array containing all the keys
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableMap-set-struct-EnumerableMap-UintToBytes32Map-uint256-bytes32-]]
- ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key, bytes32 value) → bool++` [.item-kind]#internal#
- Adds a key-value pair to a map, or updates the value for an existing
- key. O(1).
- Returns true if the key was added to the map, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableMap-remove-struct-EnumerableMap-UintToBytes32Map-uint256-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) → bool++` [.item-kind]#internal#
- Removes a value from a map. O(1).
- Returns true if the key was removed from the map, that is if it was present.
- [.contract-item]
- [[EnumerableMap-contains-struct-EnumerableMap-UintToBytes32Map-uint256-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) → bool++` [.item-kind]#internal#
- Returns true if the key is in the map. O(1).
- [.contract-item]
- [[EnumerableMap-length-struct-EnumerableMap-UintToBytes32Map-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.UintToBytes32Map map) → uint256++` [.item-kind]#internal#
- Returns the number of elements in the map. O(1).
- [.contract-item]
- [[EnumerableMap-at-struct-EnumerableMap-UintToBytes32Map-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.UintToBytes32Map map, uint256 index) → uint256 key, bytes32 value++` [.item-kind]#internal#
- Returns the element stored at position `index` in the map. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableMap-tryGet-struct-EnumerableMap-UintToBytes32Map-uint256-]]
- ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) → bool exists, bytes32 value++` [.item-kind]#internal#
- Tries to returns the value associated with `key`. O(1).
- Does not revert if `key` is not in the map.
- [.contract-item]
- [[EnumerableMap-get-struct-EnumerableMap-UintToBytes32Map-uint256-]]
- ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.UintToBytes32Map map, uint256 key) → bytes32++` [.item-kind]#internal#
- Returns the value associated with `key`. O(1).
- Requirements:
- - `key` must be in the map.
- [.contract-item]
- [[EnumerableMap-keys-struct-EnumerableMap-UintToBytes32Map-]]
- ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.UintToBytes32Map map) → uint256[]++` [.item-kind]#internal#
- Return the an array containing all the keys
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableMap-set-struct-EnumerableMap-AddressToUintMap-address-uint256-]]
- ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.AddressToUintMap map, address key, uint256 value) → bool++` [.item-kind]#internal#
- Adds a key-value pair to a map, or updates the value for an existing
- key. O(1).
- Returns true if the key was added to the map, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableMap-remove-struct-EnumerableMap-AddressToUintMap-address-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.AddressToUintMap map, address key) → bool++` [.item-kind]#internal#
- Removes a value from a map. O(1).
- Returns true if the key was removed from the map, that is if it was present.
- [.contract-item]
- [[EnumerableMap-contains-struct-EnumerableMap-AddressToUintMap-address-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.AddressToUintMap map, address key) → bool++` [.item-kind]#internal#
- Returns true if the key is in the map. O(1).
- [.contract-item]
- [[EnumerableMap-length-struct-EnumerableMap-AddressToUintMap-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.AddressToUintMap map) → uint256++` [.item-kind]#internal#
- Returns the number of elements in the map. O(1).
- [.contract-item]
- [[EnumerableMap-at-struct-EnumerableMap-AddressToUintMap-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.AddressToUintMap map, uint256 index) → address key, uint256 value++` [.item-kind]#internal#
- Returns the element stored at position `index` in the map. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableMap-tryGet-struct-EnumerableMap-AddressToUintMap-address-]]
- ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.AddressToUintMap map, address key) → bool exists, uint256 value++` [.item-kind]#internal#
- Tries to returns the value associated with `key`. O(1).
- Does not revert if `key` is not in the map.
- [.contract-item]
- [[EnumerableMap-get-struct-EnumerableMap-AddressToUintMap-address-]]
- ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToUintMap map, address key) → uint256++` [.item-kind]#internal#
- Returns the value associated with `key`. O(1).
- Requirements:
- - `key` must be in the map.
- [.contract-item]
- [[EnumerableMap-keys-struct-EnumerableMap-AddressToUintMap-]]
- ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.AddressToUintMap map) → address[]++` [.item-kind]#internal#
- Return the an array containing all the keys
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableMap-set-struct-EnumerableMap-AddressToAddressMap-address-address-]]
- ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.AddressToAddressMap map, address key, address value) → bool++` [.item-kind]#internal#
- Adds a key-value pair to a map, or updates the value for an existing
- key. O(1).
- Returns true if the key was added to the map, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableMap-remove-struct-EnumerableMap-AddressToAddressMap-address-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.AddressToAddressMap map, address key) → bool++` [.item-kind]#internal#
- Removes a value from a map. O(1).
- Returns true if the key was removed from the map, that is if it was present.
- [.contract-item]
- [[EnumerableMap-contains-struct-EnumerableMap-AddressToAddressMap-address-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.AddressToAddressMap map, address key) → bool++` [.item-kind]#internal#
- Returns true if the key is in the map. O(1).
- [.contract-item]
- [[EnumerableMap-length-struct-EnumerableMap-AddressToAddressMap-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.AddressToAddressMap map) → uint256++` [.item-kind]#internal#
- Returns the number of elements in the map. O(1).
- [.contract-item]
- [[EnumerableMap-at-struct-EnumerableMap-AddressToAddressMap-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.AddressToAddressMap map, uint256 index) → address key, address value++` [.item-kind]#internal#
- Returns the element stored at position `index` in the map. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableMap-tryGet-struct-EnumerableMap-AddressToAddressMap-address-]]
- ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.AddressToAddressMap map, address key) → bool exists, address value++` [.item-kind]#internal#
- Tries to returns the value associated with `key`. O(1).
- Does not revert if `key` is not in the map.
- [.contract-item]
- [[EnumerableMap-get-struct-EnumerableMap-AddressToAddressMap-address-]]
- ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToAddressMap map, address key) → address++` [.item-kind]#internal#
- Returns the value associated with `key`. O(1).
- Requirements:
- - `key` must be in the map.
- [.contract-item]
- [[EnumerableMap-keys-struct-EnumerableMap-AddressToAddressMap-]]
- ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.AddressToAddressMap map) → address[]++` [.item-kind]#internal#
- Return the an array containing all the keys
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableMap-set-struct-EnumerableMap-AddressToBytes32Map-address-bytes32-]]
- ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.AddressToBytes32Map map, address key, bytes32 value) → bool++` [.item-kind]#internal#
- Adds a key-value pair to a map, or updates the value for an existing
- key. O(1).
- Returns true if the key was added to the map, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableMap-remove-struct-EnumerableMap-AddressToBytes32Map-address-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.AddressToBytes32Map map, address key) → bool++` [.item-kind]#internal#
- Removes a value from a map. O(1).
- Returns true if the key was removed from the map, that is if it was present.
- [.contract-item]
- [[EnumerableMap-contains-struct-EnumerableMap-AddressToBytes32Map-address-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.AddressToBytes32Map map, address key) → bool++` [.item-kind]#internal#
- Returns true if the key is in the map. O(1).
- [.contract-item]
- [[EnumerableMap-length-struct-EnumerableMap-AddressToBytes32Map-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.AddressToBytes32Map map) → uint256++` [.item-kind]#internal#
- Returns the number of elements in the map. O(1).
- [.contract-item]
- [[EnumerableMap-at-struct-EnumerableMap-AddressToBytes32Map-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.AddressToBytes32Map map, uint256 index) → address key, bytes32 value++` [.item-kind]#internal#
- Returns the element stored at position `index` in the map. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableMap-tryGet-struct-EnumerableMap-AddressToBytes32Map-address-]]
- ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.AddressToBytes32Map map, address key) → bool exists, bytes32 value++` [.item-kind]#internal#
- Tries to returns the value associated with `key`. O(1).
- Does not revert if `key` is not in the map.
- [.contract-item]
- [[EnumerableMap-get-struct-EnumerableMap-AddressToBytes32Map-address-]]
- ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.AddressToBytes32Map map, address key) → bytes32++` [.item-kind]#internal#
- Returns the value associated with `key`. O(1).
- Requirements:
- - `key` must be in the map.
- [.contract-item]
- [[EnumerableMap-keys-struct-EnumerableMap-AddressToBytes32Map-]]
- ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.AddressToBytes32Map map) → address[]++` [.item-kind]#internal#
- Return the an array containing all the keys
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToUintMap-bytes32-uint256-]]
- ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key, uint256 value) → bool++` [.item-kind]#internal#
- Adds a key-value pair to a map, or updates the value for an existing
- key. O(1).
- Returns true if the key was added to the map, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → bool++` [.item-kind]#internal#
- Removes a value from a map. O(1).
- Returns true if the key was removed from the map, that is if it was present.
- [.contract-item]
- [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → bool++` [.item-kind]#internal#
- Returns true if the key is in the map. O(1).
- [.contract-item]
- [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToUintMap-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToUintMap map) → uint256++` [.item-kind]#internal#
- Returns the number of elements in the map. O(1).
- [.contract-item]
- [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToUintMap-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToUintMap map, uint256 index) → bytes32 key, uint256 value++` [.item-kind]#internal#
- Returns the element stored at position `index` in the map. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
- ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → bool exists, uint256 value++` [.item-kind]#internal#
- Tries to returns the value associated with `key`. O(1).
- Does not revert if `key` is not in the map.
- [.contract-item]
- [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToUintMap-bytes32-]]
- ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToUintMap map, bytes32 key) → uint256++` [.item-kind]#internal#
- Returns the value associated with `key`. O(1).
- Requirements:
- - `key` must be in the map.
- [.contract-item]
- [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToUintMap-]]
- ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToUintMap map) → bytes32[]++` [.item-kind]#internal#
- Return the an array containing all the keys
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableMap-set-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-address-]]
- ==== `[.contract-item-name]#++set++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key, address value) → bool++` [.item-kind]#internal#
- Adds a key-value pair to a map, or updates the value for an existing
- key. O(1).
- Returns true if the key was added to the map, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableMap-remove-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) → bool++` [.item-kind]#internal#
- Removes a value from a map. O(1).
- Returns true if the key was removed from the map, that is if it was present.
- [.contract-item]
- [[EnumerableMap-contains-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) → bool++` [.item-kind]#internal#
- Returns true if the key is in the map. O(1).
- [.contract-item]
- [[EnumerableMap-length-struct-EnumerableMap-Bytes32ToAddressMap-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableMap.Bytes32ToAddressMap map) → uint256++` [.item-kind]#internal#
- Returns the number of elements in the map. O(1).
- [.contract-item]
- [[EnumerableMap-at-struct-EnumerableMap-Bytes32ToAddressMap-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableMap.Bytes32ToAddressMap map, uint256 index) → bytes32 key, address value++` [.item-kind]#internal#
- Returns the element stored at position `index` in the map. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableMap-tryGet-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
- ==== `[.contract-item-name]#++tryGet++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) → bool exists, address value++` [.item-kind]#internal#
- Tries to returns the value associated with `key`. O(1).
- Does not revert if `key` is not in the map.
- [.contract-item]
- [[EnumerableMap-get-struct-EnumerableMap-Bytes32ToAddressMap-bytes32-]]
- ==== `[.contract-item-name]#++get++#++(struct EnumerableMap.Bytes32ToAddressMap map, bytes32 key) → address++` [.item-kind]#internal#
- Returns the value associated with `key`. O(1).
- Requirements:
- - `key` must be in the map.
- [.contract-item]
- [[EnumerableMap-keys-struct-EnumerableMap-Bytes32ToAddressMap-]]
- ==== `[.contract-item-name]#++keys++#++(struct EnumerableMap.Bytes32ToAddressMap map) → bytes32[]++` [.item-kind]#internal#
- Return the an array containing all the keys
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableMap-EnumerableMapNonexistentKey-bytes32-]]
- ==== `[.contract-item-name]#++EnumerableMapNonexistentKey++#++(bytes32 key)++` [.item-kind]#error#
- Query for a nonexistent map key.
- :Set: pass:normal[xref:#EnumerableSet-Set[`++Set++`]]
- :Bytes32Set: pass:normal[xref:#EnumerableSet-Bytes32Set[`++Bytes32Set++`]]
- :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-[`++add++`]]
- :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-Bytes32Set-[`++length++`]]
- :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-[`++at++`]]
- :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-Bytes32Set-[`++values++`]]
- :AddressSet: pass:normal[xref:#EnumerableSet-AddressSet[`++AddressSet++`]]
- :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-AddressSet-address-[`++add++`]]
- :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-AddressSet-[`++length++`]]
- :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-[`++at++`]]
- :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-AddressSet-[`++values++`]]
- :UintSet: pass:normal[xref:#EnumerableSet-UintSet[`++UintSet++`]]
- :add: pass:normal[xref:#EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-[`++add++`]]
- :remove: pass:normal[xref:#EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-[`++remove++`]]
- :contains: pass:normal[xref:#EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-[`++contains++`]]
- :length: pass:normal[xref:#EnumerableSet-length-struct-EnumerableSet-UintSet-[`++length++`]]
- :at: pass:normal[xref:#EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-[`++at++`]]
- :values: pass:normal[xref:#EnumerableSet-values-struct-EnumerableSet-UintSet-[`++values++`]]
- [.contract]
- [[EnumerableSet]]
- === `++EnumerableSet++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/EnumerableSet.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
- ```
- Library for managing
- https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
- types.
- Sets have the following properties:
- - Elements are added, removed, and checked for existence in constant time
- (O(1)).
- - Elements are enumerated in O(n). No guarantees are made on the ordering.
- ```solidity
- contract Example {
- // Add the library methods
- using EnumerableSet for EnumerableSet.AddressSet;
- // Declare a set state variable
- EnumerableSet.AddressSet private mySet;
- }
- ```
- As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
- and `uint256` (`UintSet`) are supported.
- [WARNING]
- ====
- Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
- unusable.
- See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
- In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
- array of EnumerableSet.
- ====
- [.contract-index]
- .Functions
- --
- * {xref-EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-}[`++add(set, value)++`]
- * {xref-EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-}[`++remove(set, value)++`]
- * {xref-EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-}[`++contains(set, value)++`]
- * {xref-EnumerableSet-length-struct-EnumerableSet-Bytes32Set-}[`++length(set)++`]
- * {xref-EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-}[`++at(set, index)++`]
- * {xref-EnumerableSet-values-struct-EnumerableSet-Bytes32Set-}[`++values(set)++`]
- * {xref-EnumerableSet-add-struct-EnumerableSet-AddressSet-address-}[`++add(set, value)++`]
- * {xref-EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-}[`++remove(set, value)++`]
- * {xref-EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-}[`++contains(set, value)++`]
- * {xref-EnumerableSet-length-struct-EnumerableSet-AddressSet-}[`++length(set)++`]
- * {xref-EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-}[`++at(set, index)++`]
- * {xref-EnumerableSet-values-struct-EnumerableSet-AddressSet-}[`++values(set)++`]
- * {xref-EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-}[`++add(set, value)++`]
- * {xref-EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-}[`++remove(set, value)++`]
- * {xref-EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-}[`++contains(set, value)++`]
- * {xref-EnumerableSet-length-struct-EnumerableSet-UintSet-}[`++length(set)++`]
- * {xref-EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-}[`++at(set, index)++`]
- * {xref-EnumerableSet-values-struct-EnumerableSet-UintSet-}[`++values(set)++`]
- --
- [.contract-item]
- [[EnumerableSet-add-struct-EnumerableSet-Bytes32Set-bytes32-]]
- ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) → bool++` [.item-kind]#internal#
- Add a value to a set. O(1).
- Returns true if the value was added to the set, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableSet-remove-struct-EnumerableSet-Bytes32Set-bytes32-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) → bool++` [.item-kind]#internal#
- Removes a value from a set. O(1).
- Returns true if the value was removed from the set, that is if it was
- present.
- [.contract-item]
- [[EnumerableSet-contains-struct-EnumerableSet-Bytes32Set-bytes32-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.Bytes32Set set, bytes32 value) → bool++` [.item-kind]#internal#
- Returns true if the value is in the set. O(1).
- [.contract-item]
- [[EnumerableSet-length-struct-EnumerableSet-Bytes32Set-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.Bytes32Set set) → uint256++` [.item-kind]#internal#
- Returns the number of values in the set. O(1).
- [.contract-item]
- [[EnumerableSet-at-struct-EnumerableSet-Bytes32Set-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.Bytes32Set set, uint256 index) → bytes32++` [.item-kind]#internal#
- Returns the value stored at position `index` in the set. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableSet-values-struct-EnumerableSet-Bytes32Set-]]
- ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.Bytes32Set set) → bytes32[]++` [.item-kind]#internal#
- Return the entire set in an array
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableSet-add-struct-EnumerableSet-AddressSet-address-]]
- ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.AddressSet set, address value) → bool++` [.item-kind]#internal#
- Add a value to a set. O(1).
- Returns true if the value was added to the set, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableSet-remove-struct-EnumerableSet-AddressSet-address-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.AddressSet set, address value) → bool++` [.item-kind]#internal#
- Removes a value from a set. O(1).
- Returns true if the value was removed from the set, that is if it was
- present.
- [.contract-item]
- [[EnumerableSet-contains-struct-EnumerableSet-AddressSet-address-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.AddressSet set, address value) → bool++` [.item-kind]#internal#
- Returns true if the value is in the set. O(1).
- [.contract-item]
- [[EnumerableSet-length-struct-EnumerableSet-AddressSet-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.AddressSet set) → uint256++` [.item-kind]#internal#
- Returns the number of values in the set. O(1).
- [.contract-item]
- [[EnumerableSet-at-struct-EnumerableSet-AddressSet-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.AddressSet set, uint256 index) → address++` [.item-kind]#internal#
- Returns the value stored at position `index` in the set. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableSet-values-struct-EnumerableSet-AddressSet-]]
- ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.AddressSet set) → address[]++` [.item-kind]#internal#
- Return the entire set in an array
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
- [.contract-item]
- [[EnumerableSet-add-struct-EnumerableSet-UintSet-uint256-]]
- ==== `[.contract-item-name]#++add++#++(struct EnumerableSet.UintSet set, uint256 value) → bool++` [.item-kind]#internal#
- Add a value to a set. O(1).
- Returns true if the value was added to the set, that is if it was not
- already present.
- [.contract-item]
- [[EnumerableSet-remove-struct-EnumerableSet-UintSet-uint256-]]
- ==== `[.contract-item-name]#++remove++#++(struct EnumerableSet.UintSet set, uint256 value) → bool++` [.item-kind]#internal#
- Removes a value from a set. O(1).
- Returns true if the value was removed from the set, that is if it was
- present.
- [.contract-item]
- [[EnumerableSet-contains-struct-EnumerableSet-UintSet-uint256-]]
- ==== `[.contract-item-name]#++contains++#++(struct EnumerableSet.UintSet set, uint256 value) → bool++` [.item-kind]#internal#
- Returns true if the value is in the set. O(1).
- [.contract-item]
- [[EnumerableSet-length-struct-EnumerableSet-UintSet-]]
- ==== `[.contract-item-name]#++length++#++(struct EnumerableSet.UintSet set) → uint256++` [.item-kind]#internal#
- Returns the number of values in the set. O(1).
- [.contract-item]
- [[EnumerableSet-at-struct-EnumerableSet-UintSet-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct EnumerableSet.UintSet set, uint256 index) → uint256++` [.item-kind]#internal#
- Returns the value stored at position `index` in the set. O(1).
- Note that there are no guarantees on the ordering of values inside the
- array, and it may change when more values are added or removed.
- Requirements:
- - `index` must be strictly less than {length}.
- [.contract-item]
- [[EnumerableSet-values-struct-EnumerableSet-UintSet-]]
- ==== `[.contract-item-name]#++values++#++(struct EnumerableSet.UintSet set) → uint256[]++` [.item-kind]#internal#
- Return the entire set in an array
- WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
- to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
- this function has an unbounded cost, and using it as part of a state-changing function may render the function
- uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
- :Bytes32Deque: pass:normal[xref:#DoubleEndedQueue-Bytes32Deque[`++Bytes32Deque++`]]
- :pushBack: pass:normal[xref:#DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-[`++pushBack++`]]
- :popBack: pass:normal[xref:#DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-[`++popBack++`]]
- :pushFront: pass:normal[xref:#DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-[`++pushFront++`]]
- :popFront: pass:normal[xref:#DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-[`++popFront++`]]
- :front: pass:normal[xref:#DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-[`++front++`]]
- :back: pass:normal[xref:#DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-[`++back++`]]
- :at: pass:normal[xref:#DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-[`++at++`]]
- :clear: pass:normal[xref:#DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-[`++clear++`]]
- :length: pass:normal[xref:#DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-[`++length++`]]
- :empty: pass:normal[xref:#DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-[`++empty++`]]
- [.contract]
- [[DoubleEndedQueue]]
- === `++DoubleEndedQueue++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/DoubleEndedQueue.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/structs/DoubleEndedQueue.sol";
- ```
- A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of
- the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and
- FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that
- the existing queue contents are left in storage.
- The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be
- used in storage, and not in memory.
- ```solidity
- DoubleEndedQueue.Bytes32Deque queue;
- ```
- [.contract-index]
- .Functions
- --
- * {xref-DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-}[`++pushBack(deque, value)++`]
- * {xref-DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-}[`++popBack(deque)++`]
- * {xref-DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-}[`++pushFront(deque, value)++`]
- * {xref-DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-}[`++popFront(deque)++`]
- * {xref-DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-}[`++front(deque)++`]
- * {xref-DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-}[`++back(deque)++`]
- * {xref-DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-}[`++at(deque, index)++`]
- * {xref-DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-}[`++clear(deque)++`]
- * {xref-DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-}[`++length(deque)++`]
- * {xref-DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-}[`++empty(deque)++`]
- --
- [.contract-item]
- [[DoubleEndedQueue-pushBack-struct-DoubleEndedQueue-Bytes32Deque-bytes32-]]
- ==== `[.contract-item-name]#++pushBack++#++(struct DoubleEndedQueue.Bytes32Deque deque, bytes32 value)++` [.item-kind]#internal#
- Inserts an item at the end of the queue.
- Reverts with {Panic-RESOURCE_ERROR} if the queue is full.
- [.contract-item]
- [[DoubleEndedQueue-popBack-struct-DoubleEndedQueue-Bytes32Deque-]]
- ==== `[.contract-item-name]#++popBack++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
- Removes the item at the end of the queue and returns it.
- Reverts with {Panic-EMPTY_ARRAY_POP} if the queue is empty.
- [.contract-item]
- [[DoubleEndedQueue-pushFront-struct-DoubleEndedQueue-Bytes32Deque-bytes32-]]
- ==== `[.contract-item-name]#++pushFront++#++(struct DoubleEndedQueue.Bytes32Deque deque, bytes32 value)++` [.item-kind]#internal#
- Inserts an item at the beginning of the queue.
- Reverts with {Panic-RESOURCE_ERROR} if the queue is full.
- [.contract-item]
- [[DoubleEndedQueue-popFront-struct-DoubleEndedQueue-Bytes32Deque-]]
- ==== `[.contract-item-name]#++popFront++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
- Removes the item at the beginning of the queue and returns it.
- Reverts with {Panic-EMPTY_ARRAY_POP} if the queue is empty.
- [.contract-item]
- [[DoubleEndedQueue-front-struct-DoubleEndedQueue-Bytes32Deque-]]
- ==== `[.contract-item-name]#++front++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
- Returns the item at the beginning of the queue.
- Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the queue is empty.
- [.contract-item]
- [[DoubleEndedQueue-back-struct-DoubleEndedQueue-Bytes32Deque-]]
- ==== `[.contract-item-name]#++back++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bytes32 value++` [.item-kind]#internal#
- Returns the item at the end of the queue.
- Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the queue is empty.
- [.contract-item]
- [[DoubleEndedQueue-at-struct-DoubleEndedQueue-Bytes32Deque-uint256-]]
- ==== `[.contract-item-name]#++at++#++(struct DoubleEndedQueue.Bytes32Deque deque, uint256 index) → bytes32 value++` [.item-kind]#internal#
- Return the item at a position in the queue given by `index`, with the first item at 0 and last item at
- `length(deque) - 1`.
- Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the index is out of bounds.
- [.contract-item]
- [[DoubleEndedQueue-clear-struct-DoubleEndedQueue-Bytes32Deque-]]
- ==== `[.contract-item-name]#++clear++#++(struct DoubleEndedQueue.Bytes32Deque deque)++` [.item-kind]#internal#
- Resets the queue back to being empty.
- NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses
- out on potential gas refunds.
- [.contract-item]
- [[DoubleEndedQueue-length-struct-DoubleEndedQueue-Bytes32Deque-]]
- ==== `[.contract-item-name]#++length++#++(struct DoubleEndedQueue.Bytes32Deque deque) → uint256++` [.item-kind]#internal#
- Returns the number of items in the queue.
- [.contract-item]
- [[DoubleEndedQueue-empty-struct-DoubleEndedQueue-Bytes32Deque-]]
- ==== `[.contract-item-name]#++empty++#++(struct DoubleEndedQueue.Bytes32Deque deque) → bool++` [.item-kind]#internal#
- Returns true if the queue is empty.
- :InvalidBufferSize: pass:normal[xref:#CircularBuffer-InvalidBufferSize--[`++InvalidBufferSize++`]]
- :Bytes32CircularBuffer: pass:normal[xref:#CircularBuffer-Bytes32CircularBuffer[`++Bytes32CircularBuffer++`]]
- :setup: pass:normal[xref:#CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-[`++setup++`]]
- :clear: pass:normal[xref:#CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-[`++clear++`]]
- :push: pass:normal[xref:#CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-[`++push++`]]
- :count: pass:normal[xref:#CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-[`++count++`]]
- :length: pass:normal[xref:#CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-[`++length++`]]
- :last: pass:normal[xref:#CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-[`++last++`]]
- :includes: pass:normal[xref:#CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-[`++includes++`]]
- [.contract]
- [[CircularBuffer]]
- === `++CircularBuffer++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/CircularBuffer.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/structs/CircularBuffer.sol";
- ```
- A fixed-size buffer for keeping `bytes32` items in storage.
- This data structure allows for pushing elements to it, and when its length exceeds the specified fixed size,
- new items take the place of the oldest element in the buffer, keeping at most `N` elements in the
- structure.
- Elements can't be removed but the data structure can be cleared. See {clear}.
- Complexity:
- - insertion ({push}): O(1)
- - lookup ({last}): O(1)
- - inclusion ({includes}): O(N) (worst case)
- - reset ({clear}): O(1)
- * The struct is called `Bytes32CircularBuffer`. Other types can be cast to and from `bytes32`. This data structure
- can only be used in storage, and not in memory.
- Example usage:
- ```solidity
- contract Example {
- // Add the library methods
- using CircularBuffer for CircularBuffer.Bytes32CircularBuffer;
- // Declare a buffer storage variable
- CircularBuffer.Bytes32CircularBuffer private myBuffer;
- }
- ```
- _Available since v5.1._
- [.contract-index]
- .Functions
- --
- * {xref-CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-}[`++setup(self, size)++`]
- * {xref-CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-}[`++clear(self)++`]
- * {xref-CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-}[`++push(self, value)++`]
- * {xref-CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-}[`++count(self)++`]
- * {xref-CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-}[`++length(self)++`]
- * {xref-CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-}[`++last(self, i)++`]
- * {xref-CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-}[`++includes(self, value)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-CircularBuffer-InvalidBufferSize--}[`++InvalidBufferSize()++`]
- --
- [.contract-item]
- [[CircularBuffer-setup-struct-CircularBuffer-Bytes32CircularBuffer-uint256-]]
- ==== `[.contract-item-name]#++setup++#++(struct CircularBuffer.Bytes32CircularBuffer self, uint256 size)++` [.item-kind]#internal#
- Initialize a new CircularBuffer of given size.
- If the CircularBuffer was already setup and used, calling that function again will reset it to a blank state.
- NOTE: The size of the buffer will affect the execution of {includes} function, as it has a complexity of O(N).
- Consider a large buffer size may render the function unusable.
- [.contract-item]
- [[CircularBuffer-clear-struct-CircularBuffer-Bytes32CircularBuffer-]]
- ==== `[.contract-item-name]#++clear++#++(struct CircularBuffer.Bytes32CircularBuffer self)++` [.item-kind]#internal#
- Clear all data in the buffer without resetting memory, keeping the existing size.
- [.contract-item]
- [[CircularBuffer-push-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-]]
- ==== `[.contract-item-name]#++push++#++(struct CircularBuffer.Bytes32CircularBuffer self, bytes32 value)++` [.item-kind]#internal#
- Push a new value to the buffer. If the buffer is already full, the new value replaces the oldest value in
- the buffer.
- [.contract-item]
- [[CircularBuffer-count-struct-CircularBuffer-Bytes32CircularBuffer-]]
- ==== `[.contract-item-name]#++count++#++(struct CircularBuffer.Bytes32CircularBuffer self) → uint256++` [.item-kind]#internal#
- Number of values currently in the buffer. This value is 0 for an empty buffer, and cannot exceed the size of
- the buffer.
- [.contract-item]
- [[CircularBuffer-length-struct-CircularBuffer-Bytes32CircularBuffer-]]
- ==== `[.contract-item-name]#++length++#++(struct CircularBuffer.Bytes32CircularBuffer self) → uint256++` [.item-kind]#internal#
- Length of the buffer. This is the maximum number of elements kept in the buffer.
- [.contract-item]
- [[CircularBuffer-last-struct-CircularBuffer-Bytes32CircularBuffer-uint256-]]
- ==== `[.contract-item-name]#++last++#++(struct CircularBuffer.Bytes32CircularBuffer self, uint256 i) → bytes32++` [.item-kind]#internal#
- Getter for the i-th value in the buffer, from the end.
- Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if trying to access an element that was not pushed, or that was
- dropped to make room for newer elements.
- [.contract-item]
- [[CircularBuffer-includes-struct-CircularBuffer-Bytes32CircularBuffer-bytes32-]]
- ==== `[.contract-item-name]#++includes++#++(struct CircularBuffer.Bytes32CircularBuffer self, bytes32 value) → bool++` [.item-kind]#internal#
- Check if a given value is in the buffer.
- [.contract-item]
- [[CircularBuffer-InvalidBufferSize--]]
- ==== `[.contract-item-name]#++InvalidBufferSize++#++()++` [.item-kind]#error#
- Error emitted when trying to setup a buffer with a size of 0.
- :CheckpointUnorderedInsertion: pass:normal[xref:#Checkpoints-CheckpointUnorderedInsertion--[`++CheckpointUnorderedInsertion++`]]
- :Trace224: pass:normal[xref:#Checkpoints-Trace224[`++Trace224++`]]
- :Checkpoint224: pass:normal[xref:#Checkpoints-Checkpoint224[`++Checkpoint224++`]]
- :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-[`++push++`]]
- :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-[`++lowerLookup++`]]
- :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-[`++upperLookup++`]]
- :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-[`++upperLookupRecent++`]]
- :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace224-[`++latest++`]]
- :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-[`++latestCheckpoint++`]]
- :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace224-[`++length++`]]
- :at: pass:normal[xref:#Checkpoints-at-struct-Checkpoints-Trace224-uint32-[`++at++`]]
- :Trace208: pass:normal[xref:#Checkpoints-Trace208[`++Trace208++`]]
- :Checkpoint208: pass:normal[xref:#Checkpoints-Checkpoint208[`++Checkpoint208++`]]
- :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-[`++push++`]]
- :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-[`++lowerLookup++`]]
- :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-[`++upperLookup++`]]
- :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-[`++upperLookupRecent++`]]
- :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace208-[`++latest++`]]
- :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-[`++latestCheckpoint++`]]
- :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace208-[`++length++`]]
- :at: pass:normal[xref:#Checkpoints-at-struct-Checkpoints-Trace208-uint32-[`++at++`]]
- :Trace160: pass:normal[xref:#Checkpoints-Trace160[`++Trace160++`]]
- :Checkpoint160: pass:normal[xref:#Checkpoints-Checkpoint160[`++Checkpoint160++`]]
- :push: pass:normal[xref:#Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-[`++push++`]]
- :lowerLookup: pass:normal[xref:#Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-[`++lowerLookup++`]]
- :upperLookup: pass:normal[xref:#Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-[`++upperLookup++`]]
- :upperLookupRecent: pass:normal[xref:#Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-[`++upperLookupRecent++`]]
- :latest: pass:normal[xref:#Checkpoints-latest-struct-Checkpoints-Trace160-[`++latest++`]]
- :latestCheckpoint: pass:normal[xref:#Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-[`++latestCheckpoint++`]]
- :length: pass:normal[xref:#Checkpoints-length-struct-Checkpoints-Trace160-[`++length++`]]
- :at: pass:normal[xref:#Checkpoints-at-struct-Checkpoints-Trace160-uint32-[`++at++`]]
- [.contract]
- [[Checkpoints]]
- === `++Checkpoints++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/Checkpoints.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/structs/Checkpoints.sol";
- ```
- This library defines the `Trace*` struct, for checkpointing values as they change at different points in
- time, and later looking up past values by block number. See {Votes} as an example.
- To create a history of checkpoints define a variable type `Checkpoints.Trace*` in your contract, and store a new
- checkpoint for the current transaction block using the {push} function.
- [.contract-index]
- .Functions
- --
- * {xref-Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-}[`++push(self, key, value)++`]
- * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-}[`++lowerLookup(self, key)++`]
- * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-}[`++upperLookup(self, key)++`]
- * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-}[`++upperLookupRecent(self, key)++`]
- * {xref-Checkpoints-latest-struct-Checkpoints-Trace224-}[`++latest(self)++`]
- * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-}[`++latestCheckpoint(self)++`]
- * {xref-Checkpoints-length-struct-Checkpoints-Trace224-}[`++length(self)++`]
- * {xref-Checkpoints-at-struct-Checkpoints-Trace224-uint32-}[`++at(self, pos)++`]
- * {xref-Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-}[`++push(self, key, value)++`]
- * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-}[`++lowerLookup(self, key)++`]
- * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-}[`++upperLookup(self, key)++`]
- * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-}[`++upperLookupRecent(self, key)++`]
- * {xref-Checkpoints-latest-struct-Checkpoints-Trace208-}[`++latest(self)++`]
- * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-}[`++latestCheckpoint(self)++`]
- * {xref-Checkpoints-length-struct-Checkpoints-Trace208-}[`++length(self)++`]
- * {xref-Checkpoints-at-struct-Checkpoints-Trace208-uint32-}[`++at(self, pos)++`]
- * {xref-Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-}[`++push(self, key, value)++`]
- * {xref-Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-}[`++lowerLookup(self, key)++`]
- * {xref-Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-}[`++upperLookup(self, key)++`]
- * {xref-Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-}[`++upperLookupRecent(self, key)++`]
- * {xref-Checkpoints-latest-struct-Checkpoints-Trace160-}[`++latest(self)++`]
- * {xref-Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-}[`++latestCheckpoint(self)++`]
- * {xref-Checkpoints-length-struct-Checkpoints-Trace160-}[`++length(self)++`]
- * {xref-Checkpoints-at-struct-Checkpoints-Trace160-uint32-}[`++at(self, pos)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-Checkpoints-CheckpointUnorderedInsertion--}[`++CheckpointUnorderedInsertion()++`]
- --
- [.contract-item]
- [[Checkpoints-push-struct-Checkpoints-Trace224-uint32-uint224-]]
- ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace224 self, uint32 key, uint224 value) → uint224 oldValue, uint224 newValue++` [.item-kind]#internal#
- Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint.
- Returns previous value and new value.
- IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint32).max` key set will disable the
- library.
- [.contract-item]
- [[Checkpoints-lowerLookup-struct-Checkpoints-Trace224-uint32-]]
- ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace224 self, uint32 key) → uint224++` [.item-kind]#internal#
- Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
- there is none.
- [.contract-item]
- [[Checkpoints-upperLookup-struct-Checkpoints-Trace224-uint32-]]
- ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace224 self, uint32 key) → uint224++` [.item-kind]#internal#
- Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
- if there is none.
- [.contract-item]
- [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace224-uint32-]]
- ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace224 self, uint32 key) → uint224++` [.item-kind]#internal#
- Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
- if there is none.
- NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high
- keys).
- [.contract-item]
- [[Checkpoints-latest-struct-Checkpoints-Trace224-]]
- ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace224 self) → uint224++` [.item-kind]#internal#
- Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
- [.contract-item]
- [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace224-]]
- ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace224 self) → bool exists, uint32 _key, uint224 _value++` [.item-kind]#internal#
- Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
- in the most recent checkpoint.
- [.contract-item]
- [[Checkpoints-length-struct-Checkpoints-Trace224-]]
- ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace224 self) → uint256++` [.item-kind]#internal#
- Returns the number of checkpoint.
- [.contract-item]
- [[Checkpoints-at-struct-Checkpoints-Trace224-uint32-]]
- ==== `[.contract-item-name]#++at++#++(struct Checkpoints.Trace224 self, uint32 pos) → struct Checkpoints.Checkpoint224++` [.item-kind]#internal#
- Returns checkpoint at given position.
- [.contract-item]
- [[Checkpoints-push-struct-Checkpoints-Trace208-uint48-uint208-]]
- ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace208 self, uint48 key, uint208 value) → uint208 oldValue, uint208 newValue++` [.item-kind]#internal#
- Pushes a (`key`, `value`) pair into a Trace208 so that it is stored as the checkpoint.
- Returns previous value and new value.
- IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint48).max` key set will disable the
- library.
- [.contract-item]
- [[Checkpoints-lowerLookup-struct-Checkpoints-Trace208-uint48-]]
- ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace208 self, uint48 key) → uint208++` [.item-kind]#internal#
- Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
- there is none.
- [.contract-item]
- [[Checkpoints-upperLookup-struct-Checkpoints-Trace208-uint48-]]
- ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace208 self, uint48 key) → uint208++` [.item-kind]#internal#
- Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
- if there is none.
- [.contract-item]
- [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace208-uint48-]]
- ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace208 self, uint48 key) → uint208++` [.item-kind]#internal#
- Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
- if there is none.
- NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high
- keys).
- [.contract-item]
- [[Checkpoints-latest-struct-Checkpoints-Trace208-]]
- ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace208 self) → uint208++` [.item-kind]#internal#
- Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
- [.contract-item]
- [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace208-]]
- ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace208 self) → bool exists, uint48 _key, uint208 _value++` [.item-kind]#internal#
- Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
- in the most recent checkpoint.
- [.contract-item]
- [[Checkpoints-length-struct-Checkpoints-Trace208-]]
- ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace208 self) → uint256++` [.item-kind]#internal#
- Returns the number of checkpoint.
- [.contract-item]
- [[Checkpoints-at-struct-Checkpoints-Trace208-uint32-]]
- ==== `[.contract-item-name]#++at++#++(struct Checkpoints.Trace208 self, uint32 pos) → struct Checkpoints.Checkpoint208++` [.item-kind]#internal#
- Returns checkpoint at given position.
- [.contract-item]
- [[Checkpoints-push-struct-Checkpoints-Trace160-uint96-uint160-]]
- ==== `[.contract-item-name]#++push++#++(struct Checkpoints.Trace160 self, uint96 key, uint160 value) → uint160 oldValue, uint160 newValue++` [.item-kind]#internal#
- Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint.
- Returns previous value and new value.
- IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint96).max` key set will disable the
- library.
- [.contract-item]
- [[Checkpoints-lowerLookup-struct-Checkpoints-Trace160-uint96-]]
- ==== `[.contract-item-name]#++lowerLookup++#++(struct Checkpoints.Trace160 self, uint96 key) → uint160++` [.item-kind]#internal#
- Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
- there is none.
- [.contract-item]
- [[Checkpoints-upperLookup-struct-Checkpoints-Trace160-uint96-]]
- ==== `[.contract-item-name]#++upperLookup++#++(struct Checkpoints.Trace160 self, uint96 key) → uint160++` [.item-kind]#internal#
- Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
- if there is none.
- [.contract-item]
- [[Checkpoints-upperLookupRecent-struct-Checkpoints-Trace160-uint96-]]
- ==== `[.contract-item-name]#++upperLookupRecent++#++(struct Checkpoints.Trace160 self, uint96 key) → uint160++` [.item-kind]#internal#
- Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
- if there is none.
- NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high
- keys).
- [.contract-item]
- [[Checkpoints-latest-struct-Checkpoints-Trace160-]]
- ==== `[.contract-item-name]#++latest++#++(struct Checkpoints.Trace160 self) → uint160++` [.item-kind]#internal#
- Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
- [.contract-item]
- [[Checkpoints-latestCheckpoint-struct-Checkpoints-Trace160-]]
- ==== `[.contract-item-name]#++latestCheckpoint++#++(struct Checkpoints.Trace160 self) → bool exists, uint96 _key, uint160 _value++` [.item-kind]#internal#
- Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
- in the most recent checkpoint.
- [.contract-item]
- [[Checkpoints-length-struct-Checkpoints-Trace160-]]
- ==== `[.contract-item-name]#++length++#++(struct Checkpoints.Trace160 self) → uint256++` [.item-kind]#internal#
- Returns the number of checkpoint.
- [.contract-item]
- [[Checkpoints-at-struct-Checkpoints-Trace160-uint32-]]
- ==== `[.contract-item-name]#++at++#++(struct Checkpoints.Trace160 self, uint32 pos) → struct Checkpoints.Checkpoint160++` [.item-kind]#internal#
- Returns checkpoint at given position.
- [.contract-item]
- [[Checkpoints-CheckpointUnorderedInsertion--]]
- ==== `[.contract-item-name]#++CheckpointUnorderedInsertion++#++()++` [.item-kind]#error#
- A value was attempted to be inserted on a past checkpoint.
- :Uint256Heap: pass:normal[xref:#Heap-Uint256Heap[`++Uint256Heap++`]]
- :peek: pass:normal[xref:#Heap-peek-struct-Heap-Uint256Heap-[`++peek++`]]
- :pop: pass:normal[xref:#Heap-pop-struct-Heap-Uint256Heap-[`++pop++`]]
- :pop: pass:normal[xref:#Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--[`++pop++`]]
- :insert: pass:normal[xref:#Heap-insert-struct-Heap-Uint256Heap-uint256-[`++insert++`]]
- :insert: pass:normal[xref:#Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--[`++insert++`]]
- :replace: pass:normal[xref:#Heap-replace-struct-Heap-Uint256Heap-uint256-[`++replace++`]]
- :replace: pass:normal[xref:#Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--[`++replace++`]]
- :length: pass:normal[xref:#Heap-length-struct-Heap-Uint256Heap-[`++length++`]]
- :clear: pass:normal[xref:#Heap-clear-struct-Heap-Uint256Heap-[`++clear++`]]
- [.contract]
- [[Heap]]
- === `++Heap++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/Heap.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/structs/Heap.sol";
- ```
- Library for managing https://en.wikipedia.org/wiki/Binary_heap[binary heap] that can be used as
- https://en.wikipedia.org/wiki/Priority_queue[priority queue].
- Heaps are represented as a tree of values where the first element (index 0) is the root, and where the node at
- index i is the child of the node at index (i-1)/2 and the parent of nodes at index 2*i+1 and 2*i+2. Each node
- stores an element of the heap.
- The structure is ordered so that each node is bigger than its parent. An immediate consequence is that the
- highest priority value is the one at the root. This value can be looked up in constant time (O(1)) at
- `heap.tree[0]`
- The structure is designed to perform the following operations with the corresponding complexities:
- * peek (get the highest priority value): O(1)
- * insert (insert a value): O(log(n))
- * pop (remove the highest priority value): O(log(n))
- * replace (replace the highest priority value with a new value): O(log(n))
- * length (get the number of elements): O(1)
- * clear (remove all elements): O(1)
- IMPORTANT: This library allows for the use of custom comparator functions. Given that manipulating
- memory can lead to unexpected behavior. Consider verifying that the comparator does not manipulate
- the Heap's state directly and that it follows the Solidity memory safety rules.
- _Available since v5.1._
- [.contract-index]
- .Functions
- --
- * {xref-Heap-peek-struct-Heap-Uint256Heap-}[`++peek(self)++`]
- * {xref-Heap-pop-struct-Heap-Uint256Heap-}[`++pop(self)++`]
- * {xref-Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--}[`++pop(self, comp)++`]
- * {xref-Heap-insert-struct-Heap-Uint256Heap-uint256-}[`++insert(self, value)++`]
- * {xref-Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--}[`++insert(self, value, comp)++`]
- * {xref-Heap-replace-struct-Heap-Uint256Heap-uint256-}[`++replace(self, newValue)++`]
- * {xref-Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--}[`++replace(self, newValue, comp)++`]
- * {xref-Heap-length-struct-Heap-Uint256Heap-}[`++length(self)++`]
- * {xref-Heap-clear-struct-Heap-Uint256Heap-}[`++clear(self)++`]
- --
- [.contract-item]
- [[Heap-peek-struct-Heap-Uint256Heap-]]
- ==== `[.contract-item-name]#++peek++#++(struct Heap.Uint256Heap self) → uint256++` [.item-kind]#internal#
- Lookup the root element of the heap.
- [.contract-item]
- [[Heap-pop-struct-Heap-Uint256Heap-]]
- ==== `[.contract-item-name]#++pop++#++(struct Heap.Uint256Heap self) → uint256++` [.item-kind]#internal#
- Remove (and return) the root element for the heap using the default comparator.
- NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
- during the lifecycle of a heap will result in undefined behavior.
- [.contract-item]
- [[Heap-pop-struct-Heap-Uint256Heap-function--uint256-uint256--view-returns--bool--]]
- ==== `[.contract-item-name]#++pop++#++(struct Heap.Uint256Heap self, function (uint256,uint256) view returns (bool) comp) → uint256++` [.item-kind]#internal#
- Remove (and return) the root element for the heap using the provided comparator.
- NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
- during the lifecycle of a heap will result in undefined behavior.
- [.contract-item]
- [[Heap-insert-struct-Heap-Uint256Heap-uint256-]]
- ==== `[.contract-item-name]#++insert++#++(struct Heap.Uint256Heap self, uint256 value)++` [.item-kind]#internal#
- Insert a new element in the heap using the default comparator.
- NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
- during the lifecycle of a heap will result in undefined behavior.
- [.contract-item]
- [[Heap-insert-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--]]
- ==== `[.contract-item-name]#++insert++#++(struct Heap.Uint256Heap self, uint256 value, function (uint256,uint256) view returns (bool) comp)++` [.item-kind]#internal#
- Insert a new element in the heap using the provided comparator.
- NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
- during the lifecycle of a heap will result in undefined behavior.
- [.contract-item]
- [[Heap-replace-struct-Heap-Uint256Heap-uint256-]]
- ==== `[.contract-item-name]#++replace++#++(struct Heap.Uint256Heap self, uint256 newValue) → uint256++` [.item-kind]#internal#
- Return the root element for the heap, and replace it with a new value, using the default comparator.
- This is equivalent to using {pop} and {insert}, but requires only one rebalancing operation.
- NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
- during the lifecycle of a heap will result in undefined behavior.
- [.contract-item]
- [[Heap-replace-struct-Heap-Uint256Heap-uint256-function--uint256-uint256--view-returns--bool--]]
- ==== `[.contract-item-name]#++replace++#++(struct Heap.Uint256Heap self, uint256 newValue, function (uint256,uint256) view returns (bool) comp) → uint256++` [.item-kind]#internal#
- Return the root element for the heap, and replace it with a new value, using the provided comparator.
- This is equivalent to using {pop} and {insert}, but requires only one rebalancing operation.
- NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator
- during the lifecycle of a heap will result in undefined behavior.
- [.contract-item]
- [[Heap-length-struct-Heap-Uint256Heap-]]
- ==== `[.contract-item-name]#++length++#++(struct Heap.Uint256Heap self) → uint256++` [.item-kind]#internal#
- Returns the number of elements in the heap.
- [.contract-item]
- [[Heap-clear-struct-Heap-Uint256Heap-]]
- ==== `[.contract-item-name]#++clear++#++(struct Heap.Uint256Heap self)++` [.item-kind]#internal#
- Removes all elements in the heap.
- :Bytes32PushTree: pass:normal[xref:#MerkleTree-Bytes32PushTree[`++Bytes32PushTree++`]]
- :setup: pass:normal[xref:#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-[`++setup++`]]
- :setup: pass:normal[xref:#MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++setup++`]]
- :push: pass:normal[xref:#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-[`++push++`]]
- :push: pass:normal[xref:#MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--[`++push++`]]
- :depth: pass:normal[xref:#MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-[`++depth++`]]
- [.contract]
- [[MerkleTree]]
- === `++MerkleTree++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/structs/MerkleTree.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/structs/MerkleTree.sol";
- ```
- Library for managing https://wikipedia.org/wiki/Merkle_Tree[Merkle Tree] data structures.
- Each tree is a complete binary tree with the ability to sequentially insert leaves, changing them from a zero to a
- non-zero value and updating its root. This structure allows inserting commitments (or other entries) that are not
- stored, but can be proven to be part of the tree at a later time if the root is kept. See {MerkleProof}.
- A tree is defined by the following parameters:
- * Depth: The number of levels in the tree, it also defines the maximum number of leaves as 2**depth.
- * Zero value: The value that represents an empty leaf. Used to avoid regular zero values to be part of the tree.
- * Hashing function: A cryptographic hash function used to produce internal nodes. Defaults to {Hashes-commutativeKeccak256}.
- NOTE: Building trees using non-commutative hashing functions (i.e. `H(a, b) != H(b, a)`) is supported. However,
- proving the inclusion of a leaf in such trees is not possible with the {MerkleProof} library since it only supports
- _commutative_ hashing functions.
- _Available since v5.1._
- [.contract-index]
- .Functions
- --
- * {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[`++setup(self, treeDepth, zero)++`]
- * {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++setup(self, treeDepth, zero, fnHash)++`]
- * {xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-}[`++push(self, leaf)++`]
- * {xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--}[`++push(self, leaf, fnHash)++`]
- * {xref-MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-}[`++depth(self)++`]
- --
- [.contract-item]
- [[MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-]]
- ==== `[.contract-item-name]#++setup++#++(struct MerkleTree.Bytes32PushTree self, uint8 treeDepth, bytes32 zero) → bytes32 initialRoot++` [.item-kind]#internal#
- Initialize a {Bytes32PushTree} using {Hashes-commutativeKeccak256} to hash internal nodes.
- The capacity of the tree (i.e. number of leaves) is set to `2**treeDepth`.
- Calling this function on MerkleTree that was already setup and used will reset it to a blank state.
- Once a tree is setup, any push to it must use the same hashing function. This means that values
- should be pushed to it using the default {xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-}[push] function.
- IMPORTANT: The zero value should be carefully chosen since it will be stored in the tree representing
- empty leaves. It should be a value that is not expected to be part of the tree.
- [.contract-item]
- [[MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
- ==== `[.contract-item-name]#++setup++#++(struct MerkleTree.Bytes32PushTree self, uint8 treeDepth, bytes32 zero, function (bytes32,bytes32) view returns (bytes32) fnHash) → bytes32 initialRoot++` [.item-kind]#internal#
- Same as {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[setup], but allows to specify a custom hashing function.
- Once a tree is setup, any push to it must use the same hashing function. This means that values
- should be pushed to it using the custom push function, which should be the same one as used during the setup.
- IMPORTANT: Providing a custom hashing function is a security-sensitive operation since it may
- compromise the soundness of the tree.
- NOTE: Consider verifying that the hashing function does not manipulate the memory state directly and that it
- follows the Solidity memory safety rules. Otherwise, it may lead to unexpected behavior.
- [.contract-item]
- [[MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-]]
- ==== `[.contract-item-name]#++push++#++(struct MerkleTree.Bytes32PushTree self, bytes32 leaf) → uint256 index, bytes32 newRoot++` [.item-kind]#internal#
- Insert a new leaf in the tree, and compute the new root. Returns the position of the inserted leaf in the
- tree, and the resulting root.
- Hashing the leaf before calling this function is recommended as a protection against
- second pre-image attacks.
- This variant uses {Hashes-commutativeKeccak256} to hash internal nodes. It should only be used on merkle trees
- that were setup using the same (default) hashing function (i.e. by calling
- {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[the default setup] function).
- [.contract-item]
- [[MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-function--bytes32-bytes32--view-returns--bytes32--]]
- ==== `[.contract-item-name]#++push++#++(struct MerkleTree.Bytes32PushTree self, bytes32 leaf, function (bytes32,bytes32) view returns (bytes32) fnHash) → uint256 index, bytes32 newRoot++` [.item-kind]#internal#
- Insert a new leaf in the tree, and compute the new root. Returns the position of the inserted leaf in the
- tree, and the resulting root.
- Hashing the leaf before calling this function is recommended as a protection against
- second pre-image attacks.
- This variant uses a custom hashing function to hash internal nodes. It should only be called with the same
- function as the one used during the initial setup of the merkle tree.
- [.contract-item]
- [[MerkleTree-depth-struct-MerkleTree-Bytes32PushTree-]]
- ==== `[.contract-item-name]#++depth++#++(struct MerkleTree.Bytes32PushTree self) → uint256++` [.item-kind]#internal#
- Tree's depth (set at initialization)
- == Libraries
- :Create2EmptyBytecode: pass:normal[xref:#Create2-Create2EmptyBytecode--[`++Create2EmptyBytecode++`]]
- :deploy: pass:normal[xref:#Create2-deploy-uint256-bytes32-bytes-[`++deploy++`]]
- :computeAddress: pass:normal[xref:#Create2-computeAddress-bytes32-bytes32-[`++computeAddress++`]]
- :computeAddress: pass:normal[xref:#Create2-computeAddress-bytes32-bytes32-address-[`++computeAddress++`]]
- [.contract]
- [[Create2]]
- === `++Create2++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Create2.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Create2.sol";
- ```
- Helper to make usage of the `CREATE2` EVM opcode easier and safer.
- `CREATE2` can be used to compute in advance the address where a smart
- contract will be deployed, which allows for interesting new mechanisms known
- as 'counterfactual interactions'.
- See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
- information.
- [.contract-index]
- .Functions
- --
- * {xref-Create2-deploy-uint256-bytes32-bytes-}[`++deploy(amount, salt, bytecode)++`]
- * {xref-Create2-computeAddress-bytes32-bytes32-}[`++computeAddress(salt, bytecodeHash)++`]
- * {xref-Create2-computeAddress-bytes32-bytes32-address-}[`++computeAddress(salt, bytecodeHash, deployer)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-Create2-Create2EmptyBytecode--}[`++Create2EmptyBytecode()++`]
- --
- [.contract-item]
- [[Create2-deploy-uint256-bytes32-bytes-]]
- ==== `[.contract-item-name]#++deploy++#++(uint256 amount, bytes32 salt, bytes bytecode) → address addr++` [.item-kind]#internal#
- Deploys a contract using `CREATE2`. The address where the contract
- will be deployed can be known in advance via {computeAddress}.
- The bytecode for a contract can be obtained from Solidity with
- `type(contractName).creationCode`.
- Requirements:
- - `bytecode` must not be empty.
- - `salt` must have not been used for `bytecode` already.
- - the factory must have a balance of at least `amount`.
- - if `amount` is non-zero, `bytecode` must have a `payable` constructor.
- [.contract-item]
- [[Create2-computeAddress-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++computeAddress++#++(bytes32 salt, bytes32 bytecodeHash) → address++` [.item-kind]#internal#
- Returns the address where a contract will be stored if deployed via {deploy}. Any change in the
- `bytecodeHash` or `salt` will result in a new destination address.
- [.contract-item]
- [[Create2-computeAddress-bytes32-bytes32-address-]]
- ==== `[.contract-item-name]#++computeAddress++#++(bytes32 salt, bytes32 bytecodeHash, address deployer) → address addr++` [.item-kind]#internal#
- Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
- `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
- [.contract-item]
- [[Create2-Create2EmptyBytecode--]]
- ==== `[.contract-item-name]#++Create2EmptyBytecode++#++()++` [.item-kind]#error#
- There's no code to deploy.
- :AddressEmptyCode: pass:normal[xref:#Address-AddressEmptyCode-address-[`++AddressEmptyCode++`]]
- :sendValue: pass:normal[xref:#Address-sendValue-address-payable-uint256-[`++sendValue++`]]
- :functionCall: pass:normal[xref:#Address-functionCall-address-bytes-[`++functionCall++`]]
- :functionCallWithValue: pass:normal[xref:#Address-functionCallWithValue-address-bytes-uint256-[`++functionCallWithValue++`]]
- :functionStaticCall: pass:normal[xref:#Address-functionStaticCall-address-bytes-[`++functionStaticCall++`]]
- :functionDelegateCall: pass:normal[xref:#Address-functionDelegateCall-address-bytes-[`++functionDelegateCall++`]]
- :verifyCallResultFromTarget: pass:normal[xref:#Address-verifyCallResultFromTarget-address-bool-bytes-[`++verifyCallResultFromTarget++`]]
- :verifyCallResult: pass:normal[xref:#Address-verifyCallResult-bool-bytes-[`++verifyCallResult++`]]
- [.contract]
- [[Address]]
- === `++Address++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Address.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Address.sol";
- ```
- Collection of functions related to the address type
- [.contract-index]
- .Functions
- --
- * {xref-Address-sendValue-address-payable-uint256-}[`++sendValue(recipient, amount)++`]
- * {xref-Address-functionCall-address-bytes-}[`++functionCall(target, data)++`]
- * {xref-Address-functionCallWithValue-address-bytes-uint256-}[`++functionCallWithValue(target, data, value)++`]
- * {xref-Address-functionStaticCall-address-bytes-}[`++functionStaticCall(target, data)++`]
- * {xref-Address-functionDelegateCall-address-bytes-}[`++functionDelegateCall(target, data)++`]
- * {xref-Address-verifyCallResultFromTarget-address-bool-bytes-}[`++verifyCallResultFromTarget(target, success, returndata)++`]
- * {xref-Address-verifyCallResult-bool-bytes-}[`++verifyCallResult(success, returndata)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-Address-AddressEmptyCode-address-}[`++AddressEmptyCode(target)++`]
- --
- [.contract-item]
- [[Address-sendValue-address-payable-uint256-]]
- ==== `[.contract-item-name]#++sendValue++#++(address payable recipient, uint256 amount)++` [.item-kind]#internal#
- Replacement for Solidity's `transfer`: sends `amount` wei to
- `recipient`, forwarding all available gas and reverting on errors.
- https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
- of certain opcodes, possibly making contracts go over the 2300 gas limit
- imposed by `transfer`, making them unable to receive funds via
- `transfer`. {sendValue} removes this limitation.
- https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
- IMPORTANT: because control is transferred to `recipient`, care must be
- taken to not create reentrancy vulnerabilities. Consider using
- {ReentrancyGuard} or the
- https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
- [.contract-item]
- [[Address-functionCall-address-bytes-]]
- ==== `[.contract-item-name]#++functionCall++#++(address target, bytes data) → bytes++` [.item-kind]#internal#
- Performs a Solidity function call using a low level `call`. A
- plain `call` is an unsafe replacement for a function call: use this
- function instead.
- If `target` reverts with a revert reason or custom error, it is bubbled
- up by this function (like regular Solidity function calls). However, if
- the call reverted with no returned reason, this function reverts with a
- {Errors.FailedCall} error.
- Returns the raw returned data. To convert to the expected return value,
- use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
- Requirements:
- - `target` must be a contract.
- - calling `target` with `data` must not revert.
- [.contract-item]
- [[Address-functionCallWithValue-address-bytes-uint256-]]
- ==== `[.contract-item-name]#++functionCallWithValue++#++(address target, bytes data, uint256 value) → bytes++` [.item-kind]#internal#
- Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
- but also transferring `value` wei to `target`.
- Requirements:
- - the calling contract must have an ETH balance of at least `value`.
- - the called Solidity function must be `payable`.
- [.contract-item]
- [[Address-functionStaticCall-address-bytes-]]
- ==== `[.contract-item-name]#++functionStaticCall++#++(address target, bytes data) → bytes++` [.item-kind]#internal#
- Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
- but performing a static call.
- [.contract-item]
- [[Address-functionDelegateCall-address-bytes-]]
- ==== `[.contract-item-name]#++functionDelegateCall++#++(address target, bytes data) → bytes++` [.item-kind]#internal#
- Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
- but performing a delegate call.
- [.contract-item]
- [[Address-verifyCallResultFromTarget-address-bool-bytes-]]
- ==== `[.contract-item-name]#++verifyCallResultFromTarget++#++(address target, bool success, bytes returndata) → bytes++` [.item-kind]#internal#
- Tool to verify that a low level call to smart-contract was successful, and reverts if the target
- was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
- of an unsuccessful call.
- [.contract-item]
- [[Address-verifyCallResult-bool-bytes-]]
- ==== `[.contract-item-name]#++verifyCallResult++#++(bool success, bytes returndata) → bytes++` [.item-kind]#internal#
- Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
- revert reason or with a default {Errors.FailedCall} error.
- [.contract-item]
- [[Address-AddressEmptyCode-address-]]
- ==== `[.contract-item-name]#++AddressEmptyCode++#++(address target)++` [.item-kind]#error#
- There's no code at `target` (it is not a contract).
- :sort: pass:normal[xref:#Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--[`++sort++`]]
- :sort: pass:normal[xref:#Arrays-sort-uint256---[`++sort++`]]
- :sort: pass:normal[xref:#Arrays-sort-address---function--address-address--pure-returns--bool--[`++sort++`]]
- :sort: pass:normal[xref:#Arrays-sort-address---[`++sort++`]]
- :sort: pass:normal[xref:#Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--[`++sort++`]]
- :sort: pass:normal[xref:#Arrays-sort-bytes32---[`++sort++`]]
- :findUpperBound: pass:normal[xref:#Arrays-findUpperBound-uint256---uint256-[`++findUpperBound++`]]
- :lowerBound: pass:normal[xref:#Arrays-lowerBound-uint256---uint256-[`++lowerBound++`]]
- :upperBound: pass:normal[xref:#Arrays-upperBound-uint256---uint256-[`++upperBound++`]]
- :lowerBoundMemory: pass:normal[xref:#Arrays-lowerBoundMemory-uint256---uint256-[`++lowerBoundMemory++`]]
- :upperBoundMemory: pass:normal[xref:#Arrays-upperBoundMemory-uint256---uint256-[`++upperBoundMemory++`]]
- :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-address---uint256-[`++unsafeAccess++`]]
- :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-bytes32---uint256-[`++unsafeAccess++`]]
- :unsafeAccess: pass:normal[xref:#Arrays-unsafeAccess-uint256---uint256-[`++unsafeAccess++`]]
- :unsafeMemoryAccess: pass:normal[xref:#Arrays-unsafeMemoryAccess-address---uint256-[`++unsafeMemoryAccess++`]]
- :unsafeMemoryAccess: pass:normal[xref:#Arrays-unsafeMemoryAccess-bytes32---uint256-[`++unsafeMemoryAccess++`]]
- :unsafeMemoryAccess: pass:normal[xref:#Arrays-unsafeMemoryAccess-uint256---uint256-[`++unsafeMemoryAccess++`]]
- :unsafeSetLength: pass:normal[xref:#Arrays-unsafeSetLength-address---uint256-[`++unsafeSetLength++`]]
- :unsafeSetLength: pass:normal[xref:#Arrays-unsafeSetLength-bytes32---uint256-[`++unsafeSetLength++`]]
- :unsafeSetLength: pass:normal[xref:#Arrays-unsafeSetLength-uint256---uint256-[`++unsafeSetLength++`]]
- [.contract]
- [[Arrays]]
- === `++Arrays++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Arrays.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Arrays.sol";
- ```
- Collection of functions related to array types.
- [.contract-index]
- .Functions
- --
- * {xref-Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--}[`++sort(array, comp)++`]
- * {xref-Arrays-sort-uint256---}[`++sort(array)++`]
- * {xref-Arrays-sort-address---function--address-address--pure-returns--bool--}[`++sort(array, comp)++`]
- * {xref-Arrays-sort-address---}[`++sort(array)++`]
- * {xref-Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--}[`++sort(array, comp)++`]
- * {xref-Arrays-sort-bytes32---}[`++sort(array)++`]
- * {xref-Arrays-findUpperBound-uint256---uint256-}[`++findUpperBound(array, element)++`]
- * {xref-Arrays-lowerBound-uint256---uint256-}[`++lowerBound(array, element)++`]
- * {xref-Arrays-upperBound-uint256---uint256-}[`++upperBound(array, element)++`]
- * {xref-Arrays-lowerBoundMemory-uint256---uint256-}[`++lowerBoundMemory(array, element)++`]
- * {xref-Arrays-upperBoundMemory-uint256---uint256-}[`++upperBoundMemory(array, element)++`]
- * {xref-Arrays-unsafeAccess-address---uint256-}[`++unsafeAccess(arr, pos)++`]
- * {xref-Arrays-unsafeAccess-bytes32---uint256-}[`++unsafeAccess(arr, pos)++`]
- * {xref-Arrays-unsafeAccess-uint256---uint256-}[`++unsafeAccess(arr, pos)++`]
- * {xref-Arrays-unsafeMemoryAccess-address---uint256-}[`++unsafeMemoryAccess(arr, pos)++`]
- * {xref-Arrays-unsafeMemoryAccess-bytes32---uint256-}[`++unsafeMemoryAccess(arr, pos)++`]
- * {xref-Arrays-unsafeMemoryAccess-uint256---uint256-}[`++unsafeMemoryAccess(arr, pos)++`]
- * {xref-Arrays-unsafeSetLength-address---uint256-}[`++unsafeSetLength(array, len)++`]
- * {xref-Arrays-unsafeSetLength-bytes32---uint256-}[`++unsafeSetLength(array, len)++`]
- * {xref-Arrays-unsafeSetLength-uint256---uint256-}[`++unsafeSetLength(array, len)++`]
- --
- [.contract-item]
- [[Arrays-sort-uint256---function--uint256-uint256--pure-returns--bool--]]
- ==== `[.contract-item-name]#++sort++#++(uint256[] array, function (uint256,uint256) pure returns (bool) comp) → uint256[]++` [.item-kind]#internal#
- Sort an array of uint256 (in memory) following the provided comparator function.
- This function does the sorting "in place", meaning that it overrides the input. The object is returned for
- convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array.
- NOTE: this function's cost is `O(n · log(n))` in average and `O(n²)` in the worst case, with n the length of the
- array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
- when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
- consume more gas than is available in a block, leading to potential DoS.
- IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
- [.contract-item]
- [[Arrays-sort-uint256---]]
- ==== `[.contract-item-name]#++sort++#++(uint256[] array) → uint256[]++` [.item-kind]#internal#
- Variant of {sort} that sorts an array of uint256 in increasing order.
- [.contract-item]
- [[Arrays-sort-address---function--address-address--pure-returns--bool--]]
- ==== `[.contract-item-name]#++sort++#++(address[] array, function (address,address) pure returns (bool) comp) → address[]++` [.item-kind]#internal#
- Sort an array of address (in memory) following the provided comparator function.
- This function does the sorting "in place", meaning that it overrides the input. The object is returned for
- convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array.
- NOTE: this function's cost is `O(n · log(n))` in average and `O(n²)` in the worst case, with n the length of the
- array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
- when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
- consume more gas than is available in a block, leading to potential DoS.
- IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
- [.contract-item]
- [[Arrays-sort-address---]]
- ==== `[.contract-item-name]#++sort++#++(address[] array) → address[]++` [.item-kind]#internal#
- Variant of {sort} that sorts an array of address in increasing order.
- [.contract-item]
- [[Arrays-sort-bytes32---function--bytes32-bytes32--pure-returns--bool--]]
- ==== `[.contract-item-name]#++sort++#++(bytes32[] array, function (bytes32,bytes32) pure returns (bool) comp) → bytes32[]++` [.item-kind]#internal#
- Sort an array of bytes32 (in memory) following the provided comparator function.
- This function does the sorting "in place", meaning that it overrides the input. The object is returned for
- convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array.
- NOTE: this function's cost is `O(n · log(n))` in average and `O(n²)` in the worst case, with n the length of the
- array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
- when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
- consume more gas than is available in a block, leading to potential DoS.
- IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
- [.contract-item]
- [[Arrays-sort-bytes32---]]
- ==== `[.contract-item-name]#++sort++#++(bytes32[] array) → bytes32[]++` [.item-kind]#internal#
- Variant of {sort} that sorts an array of bytes32 in increasing order.
- [.contract-item]
- [[Arrays-findUpperBound-uint256---uint256-]]
- ==== `[.contract-item-name]#++findUpperBound++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
- Searches a sorted `array` and returns the first index that contains
- a value greater or equal to `element`. If no such index exists (i.e. all
- values in the array are strictly less than `element`), the array length is
- returned. Time complexity O(log n).
- NOTE: The `array` is expected to be sorted in ascending order, and to
- contain no repeated elements.
- IMPORTANT: Deprecated. This implementation behaves as {lowerBound} but lacks
- support for repeated elements in the array. The {lowerBound} function should
- be used instead.
- [.contract-item]
- [[Arrays-lowerBound-uint256---uint256-]]
- ==== `[.contract-item-name]#++lowerBound++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
- Searches an `array` sorted in ascending order and returns the first
- index that contains a value greater or equal than `element`. If no such index
- exists (i.e. all values in the array are strictly less than `element`), the array
- length is returned. Time complexity O(log n).
- See C++'s https://en.cppreference.com/w/cpp/algorithm/lower_bound[lower_bound].
- [.contract-item]
- [[Arrays-upperBound-uint256---uint256-]]
- ==== `[.contract-item-name]#++upperBound++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
- Searches an `array` sorted in ascending order and returns the first
- index that contains a value strictly greater than `element`. If no such index
- exists (i.e. all values in the array are strictly less than `element`), the array
- length is returned. Time complexity O(log n).
- See C++'s https://en.cppreference.com/w/cpp/algorithm/upper_bound[upper_bound].
- [.contract-item]
- [[Arrays-lowerBoundMemory-uint256---uint256-]]
- ==== `[.contract-item-name]#++lowerBoundMemory++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
- Same as {lowerBound}, but with an array in memory.
- [.contract-item]
- [[Arrays-upperBoundMemory-uint256---uint256-]]
- ==== `[.contract-item-name]#++upperBoundMemory++#++(uint256[] array, uint256 element) → uint256++` [.item-kind]#internal#
- Same as {upperBound}, but with an array in memory.
- [.contract-item]
- [[Arrays-unsafeAccess-address---uint256-]]
- ==== `[.contract-item-name]#++unsafeAccess++#++(address[] arr, uint256 pos) → struct StorageSlot.AddressSlot++` [.item-kind]#internal#
- Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
- WARNING: Only use if you are certain `pos` is lower than the array length.
- [.contract-item]
- [[Arrays-unsafeAccess-bytes32---uint256-]]
- ==== `[.contract-item-name]#++unsafeAccess++#++(bytes32[] arr, uint256 pos) → struct StorageSlot.Bytes32Slot++` [.item-kind]#internal#
- Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
- WARNING: Only use if you are certain `pos` is lower than the array length.
- [.contract-item]
- [[Arrays-unsafeAccess-uint256---uint256-]]
- ==== `[.contract-item-name]#++unsafeAccess++#++(uint256[] arr, uint256 pos) → struct StorageSlot.Uint256Slot++` [.item-kind]#internal#
- Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
- WARNING: Only use if you are certain `pos` is lower than the array length.
- [.contract-item]
- [[Arrays-unsafeMemoryAccess-address---uint256-]]
- ==== `[.contract-item-name]#++unsafeMemoryAccess++#++(address[] arr, uint256 pos) → address res++` [.item-kind]#internal#
- Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
- WARNING: Only use if you are certain `pos` is lower than the array length.
- [.contract-item]
- [[Arrays-unsafeMemoryAccess-bytes32---uint256-]]
- ==== `[.contract-item-name]#++unsafeMemoryAccess++#++(bytes32[] arr, uint256 pos) → bytes32 res++` [.item-kind]#internal#
- Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
- WARNING: Only use if you are certain `pos` is lower than the array length.
- [.contract-item]
- [[Arrays-unsafeMemoryAccess-uint256---uint256-]]
- ==== `[.contract-item-name]#++unsafeMemoryAccess++#++(uint256[] arr, uint256 pos) → uint256 res++` [.item-kind]#internal#
- Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
- WARNING: Only use if you are certain `pos` is lower than the array length.
- [.contract-item]
- [[Arrays-unsafeSetLength-address---uint256-]]
- ==== `[.contract-item-name]#++unsafeSetLength++#++(address[] array, uint256 len)++` [.item-kind]#internal#
- Helper to set the length of an dynamic array. Directly writing to `.length` is forbidden.
- WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
- [.contract-item]
- [[Arrays-unsafeSetLength-bytes32---uint256-]]
- ==== `[.contract-item-name]#++unsafeSetLength++#++(bytes32[] array, uint256 len)++` [.item-kind]#internal#
- Helper to set the length of an dynamic array. Directly writing to `.length` is forbidden.
- WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
- [.contract-item]
- [[Arrays-unsafeSetLength-uint256---uint256-]]
- ==== `[.contract-item-name]#++unsafeSetLength++#++(uint256[] array, uint256 len)++` [.item-kind]#internal#
- Helper to set the length of an dynamic array. Directly writing to `.length` is forbidden.
- WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
- :_TABLE: pass:normal[xref:#Base64-_TABLE-string[`++_TABLE++`]]
- :_TABLE_URL: pass:normal[xref:#Base64-_TABLE_URL-string[`++_TABLE_URL++`]]
- :encode: pass:normal[xref:#Base64-encode-bytes-[`++encode++`]]
- :encodeURL: pass:normal[xref:#Base64-encodeURL-bytes-[`++encodeURL++`]]
- [.contract]
- [[Base64]]
- === `++Base64++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Base64.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Base64.sol";
- ```
- Provides a set of functions to operate with Base64 strings.
- [.contract-index]
- .Functions
- --
- * {xref-Base64-encode-bytes-}[`++encode(data)++`]
- * {xref-Base64-encodeURL-bytes-}[`++encodeURL(data)++`]
- --
- [.contract-index]
- .Internal Variables
- --
- * {xref-Base64-_TABLE-string}[`++string constant _TABLE++`]
- * {xref-Base64-_TABLE_URL-string}[`++string constant _TABLE_URL++`]
- --
- [.contract-item]
- [[Base64-encode-bytes-]]
- ==== `[.contract-item-name]#++encode++#++(bytes data) → string++` [.item-kind]#internal#
- Converts a `bytes` to its Bytes64 `string` representation.
- [.contract-item]
- [[Base64-encodeURL-bytes-]]
- ==== `[.contract-item-name]#++encodeURL++#++(bytes data) → string++` [.item-kind]#internal#
- Converts a `bytes` to its Bytes64Url `string` representation.
- Output is not padded with `=` as specified in https://www.rfc-editor.org/rfc/rfc4648[rfc4648].
- [.contract-item]
- [[Base64-_TABLE-string]]
- ==== `string [.contract-item-name]#++_TABLE++#` [.item-kind]#internal constant#
- Base64 Encoding/Decoding Table
- See sections 4 and 5 of https://datatracker.ietf.org/doc/html/rfc4648
- [.contract-item]
- [[Base64-_TABLE_URL-string]]
- ==== `string [.contract-item-name]#++_TABLE_URL++#` [.item-kind]#internal constant#
- :StringsInsufficientHexLength: pass:normal[xref:#Strings-StringsInsufficientHexLength-uint256-uint256-[`++StringsInsufficientHexLength++`]]
- :toString: pass:normal[xref:#Strings-toString-uint256-[`++toString++`]]
- :toStringSigned: pass:normal[xref:#Strings-toStringSigned-int256-[`++toStringSigned++`]]
- :toHexString: pass:normal[xref:#Strings-toHexString-uint256-[`++toHexString++`]]
- :toHexString: pass:normal[xref:#Strings-toHexString-uint256-uint256-[`++toHexString++`]]
- :toHexString: pass:normal[xref:#Strings-toHexString-address-[`++toHexString++`]]
- :toChecksumHexString: pass:normal[xref:#Strings-toChecksumHexString-address-[`++toChecksumHexString++`]]
- :equal: pass:normal[xref:#Strings-equal-string-string-[`++equal++`]]
- [.contract]
- [[Strings]]
- === `++Strings++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Strings.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Strings.sol";
- ```
- String operations.
- [.contract-index]
- .Functions
- --
- * {xref-Strings-toString-uint256-}[`++toString(value)++`]
- * {xref-Strings-toStringSigned-int256-}[`++toStringSigned(value)++`]
- * {xref-Strings-toHexString-uint256-}[`++toHexString(value)++`]
- * {xref-Strings-toHexString-uint256-uint256-}[`++toHexString(value, length)++`]
- * {xref-Strings-toHexString-address-}[`++toHexString(addr)++`]
- * {xref-Strings-toChecksumHexString-address-}[`++toChecksumHexString(addr)++`]
- * {xref-Strings-equal-string-string-}[`++equal(a, b)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-Strings-StringsInsufficientHexLength-uint256-uint256-}[`++StringsInsufficientHexLength(value, length)++`]
- --
- [.contract-item]
- [[Strings-toString-uint256-]]
- ==== `[.contract-item-name]#++toString++#++(uint256 value) → string++` [.item-kind]#internal#
- Converts a `uint256` to its ASCII `string` decimal representation.
- [.contract-item]
- [[Strings-toStringSigned-int256-]]
- ==== `[.contract-item-name]#++toStringSigned++#++(int256 value) → string++` [.item-kind]#internal#
- Converts a `int256` to its ASCII `string` decimal representation.
- [.contract-item]
- [[Strings-toHexString-uint256-]]
- ==== `[.contract-item-name]#++toHexString++#++(uint256 value) → string++` [.item-kind]#internal#
- Converts a `uint256` to its ASCII `string` hexadecimal representation.
- [.contract-item]
- [[Strings-toHexString-uint256-uint256-]]
- ==== `[.contract-item-name]#++toHexString++#++(uint256 value, uint256 length) → string++` [.item-kind]#internal#
- Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
- [.contract-item]
- [[Strings-toHexString-address-]]
- ==== `[.contract-item-name]#++toHexString++#++(address addr) → string++` [.item-kind]#internal#
- Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
- representation.
- [.contract-item]
- [[Strings-toChecksumHexString-address-]]
- ==== `[.contract-item-name]#++toChecksumHexString++#++(address addr) → string++` [.item-kind]#internal#
- Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal
- representation, according to EIP-55.
- [.contract-item]
- [[Strings-equal-string-string-]]
- ==== `[.contract-item-name]#++equal++#++(string a, string b) → bool++` [.item-kind]#internal#
- Returns true if the two strings are equal.
- [.contract-item]
- [[Strings-StringsInsufficientHexLength-uint256-uint256-]]
- ==== `[.contract-item-name]#++StringsInsufficientHexLength++#++(uint256 value, uint256 length)++` [.item-kind]#error#
- The `value` string doesn't fit in the specified `length`.
- :StringTooLong: pass:normal[xref:#ShortStrings-StringTooLong-string-[`++StringTooLong++`]]
- :InvalidShortString: pass:normal[xref:#ShortStrings-InvalidShortString--[`++InvalidShortString++`]]
- :toShortString: pass:normal[xref:#ShortStrings-toShortString-string-[`++toShortString++`]]
- :toString: pass:normal[xref:#ShortStrings-toString-ShortString-[`++toString++`]]
- :byteLength: pass:normal[xref:#ShortStrings-byteLength-ShortString-[`++byteLength++`]]
- :toShortStringWithFallback: pass:normal[xref:#ShortStrings-toShortStringWithFallback-string-string-[`++toShortStringWithFallback++`]]
- :toStringWithFallback: pass:normal[xref:#ShortStrings-toStringWithFallback-ShortString-string-[`++toStringWithFallback++`]]
- :byteLengthWithFallback: pass:normal[xref:#ShortStrings-byteLengthWithFallback-ShortString-string-[`++byteLengthWithFallback++`]]
- [.contract]
- [[ShortStrings]]
- === `++ShortStrings++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/ShortStrings.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/ShortStrings.sol";
- ```
- This library provides functions to convert short memory strings
- into a `ShortString` type that can be used as an immutable variable.
- Strings of arbitrary length can be optimized using this library if
- they are short enough (up to 31 bytes) by packing them with their
- length (1 byte) in a single EVM word (32 bytes). Additionally, a
- fallback mechanism can be used for every other case.
- Usage example:
- ```solidity
- contract Named {
- using ShortStrings for *;
- ShortString private immutable _name;
- string private _nameFallback;
- constructor(string memory contractName) {
- _name = contractName.toShortStringWithFallback(_nameFallback);
- }
- function name() external view returns (string memory) {
- return _name.toStringWithFallback(_nameFallback);
- }
- }
- ```
- [.contract-index]
- .Functions
- --
- * {xref-ShortStrings-toShortString-string-}[`++toShortString(str)++`]
- * {xref-ShortStrings-toString-ShortString-}[`++toString(sstr)++`]
- * {xref-ShortStrings-byteLength-ShortString-}[`++byteLength(sstr)++`]
- * {xref-ShortStrings-toShortStringWithFallback-string-string-}[`++toShortStringWithFallback(value, store)++`]
- * {xref-ShortStrings-toStringWithFallback-ShortString-string-}[`++toStringWithFallback(value, store)++`]
- * {xref-ShortStrings-byteLengthWithFallback-ShortString-string-}[`++byteLengthWithFallback(value, store)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-ShortStrings-StringTooLong-string-}[`++StringTooLong(str)++`]
- * {xref-ShortStrings-InvalidShortString--}[`++InvalidShortString()++`]
- --
- [.contract-item]
- [[ShortStrings-toShortString-string-]]
- ==== `[.contract-item-name]#++toShortString++#++(string str) → ShortString++` [.item-kind]#internal#
- Encode a string of at most 31 chars into a `ShortString`.
- This will trigger a `StringTooLong` error is the input string is too long.
- [.contract-item]
- [[ShortStrings-toString-ShortString-]]
- ==== `[.contract-item-name]#++toString++#++(ShortString sstr) → string++` [.item-kind]#internal#
- Decode a `ShortString` back to a "normal" string.
- [.contract-item]
- [[ShortStrings-byteLength-ShortString-]]
- ==== `[.contract-item-name]#++byteLength++#++(ShortString sstr) → uint256++` [.item-kind]#internal#
- Return the length of a `ShortString`.
- [.contract-item]
- [[ShortStrings-toShortStringWithFallback-string-string-]]
- ==== `[.contract-item-name]#++toShortStringWithFallback++#++(string value, string store) → ShortString++` [.item-kind]#internal#
- Encode a string into a `ShortString`, or write it to storage if it is too long.
- [.contract-item]
- [[ShortStrings-toStringWithFallback-ShortString-string-]]
- ==== `[.contract-item-name]#++toStringWithFallback++#++(ShortString value, string store) → string++` [.item-kind]#internal#
- Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
- [.contract-item]
- [[ShortStrings-byteLengthWithFallback-ShortString-string-]]
- ==== `[.contract-item-name]#++byteLengthWithFallback++#++(ShortString value, string store) → uint256++` [.item-kind]#internal#
- Return the length of a string that was encoded to `ShortString` or written to storage using
- {setWithFallback}.
- WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
- actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
- [.contract-item]
- [[ShortStrings-StringTooLong-string-]]
- ==== `[.contract-item-name]#++StringTooLong++#++(string str)++` [.item-kind]#error#
- [.contract-item]
- [[ShortStrings-InvalidShortString--]]
- ==== `[.contract-item-name]#++InvalidShortString++#++()++` [.item-kind]#error#
- :erc7201Slot: pass:normal[xref:#SlotDerivation-erc7201Slot-string-[`++erc7201Slot++`]]
- :offset: pass:normal[xref:#SlotDerivation-offset-bytes32-uint256-[`++offset++`]]
- :deriveArray: pass:normal[xref:#SlotDerivation-deriveArray-bytes32-[`++deriveArray++`]]
- :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-address-[`++deriveMapping++`]]
- :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-bool-[`++deriveMapping++`]]
- :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-bytes32-[`++deriveMapping++`]]
- :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-uint256-[`++deriveMapping++`]]
- :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-int256-[`++deriveMapping++`]]
- :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-string-[`++deriveMapping++`]]
- :deriveMapping: pass:normal[xref:#SlotDerivation-deriveMapping-bytes32-bytes-[`++deriveMapping++`]]
- [.contract]
- [[SlotDerivation]]
- === `++SlotDerivation++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/SlotDerivation.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/SlotDerivation.sol";
- ```
- Library for computing storage (and transient storage) locations from namespaces and deriving slots
- corresponding to standard patterns. The derivation method for array and mapping matches the storage layout used by
- the solidity language / compiler.
- See https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays[Solidity docs for mappings and dynamic arrays.].
- Example usage:
- ```solidity
- contract Example {
- // Add the library methods
- using StorageSlot for bytes32;
- using SlotDerivation for bytes32;
- // Declare a namespace
- string private constant _NAMESPACE = "<namespace>" // eg. OpenZeppelin.Slot
- function setValueInNamespace(uint256 key, address newValue) internal {
- _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value = newValue;
- }
- function getValueInNamespace(uint256 key) internal view returns (address) {
- return _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value;
- }
- }
- ```
- TIP: Consider using this library along with {StorageSlot}.
- NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking
- upgrade safety will ignore the slots accessed through this library.
- _Available since v5.1._
- [.contract-index]
- .Functions
- --
- * {xref-SlotDerivation-erc7201Slot-string-}[`++erc7201Slot(namespace)++`]
- * {xref-SlotDerivation-offset-bytes32-uint256-}[`++offset(slot, pos)++`]
- * {xref-SlotDerivation-deriveArray-bytes32-}[`++deriveArray(slot)++`]
- * {xref-SlotDerivation-deriveMapping-bytes32-address-}[`++deriveMapping(slot, key)++`]
- * {xref-SlotDerivation-deriveMapping-bytes32-bool-}[`++deriveMapping(slot, key)++`]
- * {xref-SlotDerivation-deriveMapping-bytes32-bytes32-}[`++deriveMapping(slot, key)++`]
- * {xref-SlotDerivation-deriveMapping-bytes32-uint256-}[`++deriveMapping(slot, key)++`]
- * {xref-SlotDerivation-deriveMapping-bytes32-int256-}[`++deriveMapping(slot, key)++`]
- * {xref-SlotDerivation-deriveMapping-bytes32-string-}[`++deriveMapping(slot, key)++`]
- * {xref-SlotDerivation-deriveMapping-bytes32-bytes-}[`++deriveMapping(slot, key)++`]
- --
- [.contract-item]
- [[SlotDerivation-erc7201Slot-string-]]
- ==== `[.contract-item-name]#++erc7201Slot++#++(string namespace) → bytes32 slot++` [.item-kind]#internal#
- Derive an ERC-7201 slot from a string (namespace).
- [.contract-item]
- [[SlotDerivation-offset-bytes32-uint256-]]
- ==== `[.contract-item-name]#++offset++#++(bytes32 slot, uint256 pos) → bytes32 result++` [.item-kind]#internal#
- Add an offset to a slot to get the n-th element of a structure or an array.
- [.contract-item]
- [[SlotDerivation-deriveArray-bytes32-]]
- ==== `[.contract-item-name]#++deriveArray++#++(bytes32 slot) → bytes32 result++` [.item-kind]#internal#
- Derive the location of the first element in an array from the slot where the length is stored.
- [.contract-item]
- [[SlotDerivation-deriveMapping-bytes32-address-]]
- ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, address key) → bytes32 result++` [.item-kind]#internal#
- Derive the location of a mapping element from the key.
- [.contract-item]
- [[SlotDerivation-deriveMapping-bytes32-bool-]]
- ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, bool key) → bytes32 result++` [.item-kind]#internal#
- Derive the location of a mapping element from the key.
- [.contract-item]
- [[SlotDerivation-deriveMapping-bytes32-bytes32-]]
- ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, bytes32 key) → bytes32 result++` [.item-kind]#internal#
- Derive the location of a mapping element from the key.
- [.contract-item]
- [[SlotDerivation-deriveMapping-bytes32-uint256-]]
- ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, uint256 key) → bytes32 result++` [.item-kind]#internal#
- Derive the location of a mapping element from the key.
- [.contract-item]
- [[SlotDerivation-deriveMapping-bytes32-int256-]]
- ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, int256 key) → bytes32 result++` [.item-kind]#internal#
- Derive the location of a mapping element from the key.
- [.contract-item]
- [[SlotDerivation-deriveMapping-bytes32-string-]]
- ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, string key) → bytes32 result++` [.item-kind]#internal#
- Derive the location of a mapping element from the key.
- [.contract-item]
- [[SlotDerivation-deriveMapping-bytes32-bytes-]]
- ==== `[.contract-item-name]#++deriveMapping++#++(bytes32 slot, bytes key) → bytes32 result++` [.item-kind]#internal#
- Derive the location of a mapping element from the key.
- :AddressSlot: pass:normal[xref:#StorageSlot-AddressSlot[`++AddressSlot++`]]
- :BooleanSlot: pass:normal[xref:#StorageSlot-BooleanSlot[`++BooleanSlot++`]]
- :Bytes32Slot: pass:normal[xref:#StorageSlot-Bytes32Slot[`++Bytes32Slot++`]]
- :Uint256Slot: pass:normal[xref:#StorageSlot-Uint256Slot[`++Uint256Slot++`]]
- :Int256Slot: pass:normal[xref:#StorageSlot-Int256Slot[`++Int256Slot++`]]
- :StringSlot: pass:normal[xref:#StorageSlot-StringSlot[`++StringSlot++`]]
- :BytesSlot: pass:normal[xref:#StorageSlot-BytesSlot[`++BytesSlot++`]]
- :getAddressSlot: pass:normal[xref:#StorageSlot-getAddressSlot-bytes32-[`++getAddressSlot++`]]
- :getBooleanSlot: pass:normal[xref:#StorageSlot-getBooleanSlot-bytes32-[`++getBooleanSlot++`]]
- :getBytes32Slot: pass:normal[xref:#StorageSlot-getBytes32Slot-bytes32-[`++getBytes32Slot++`]]
- :getUint256Slot: pass:normal[xref:#StorageSlot-getUint256Slot-bytes32-[`++getUint256Slot++`]]
- :getInt256Slot: pass:normal[xref:#StorageSlot-getInt256Slot-bytes32-[`++getInt256Slot++`]]
- :getStringSlot: pass:normal[xref:#StorageSlot-getStringSlot-bytes32-[`++getStringSlot++`]]
- :getStringSlot: pass:normal[xref:#StorageSlot-getStringSlot-string-[`++getStringSlot++`]]
- :getBytesSlot: pass:normal[xref:#StorageSlot-getBytesSlot-bytes32-[`++getBytesSlot++`]]
- :getBytesSlot: pass:normal[xref:#StorageSlot-getBytesSlot-bytes-[`++getBytesSlot++`]]
- [.contract]
- [[StorageSlot]]
- === `++StorageSlot++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/StorageSlot.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/StorageSlot.sol";
- ```
- Library for reading and writing primitive types to specific storage slots.
- Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
- This library helps with reading and writing to such slots without the need for inline assembly.
- The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
- Example usage to set ERC-1967 implementation slot:
- ```solidity
- contract ERC1967 {
- // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
- bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
- function _getImplementation() internal view returns (address) {
- return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
- }
- function _setImplementation(address newImplementation) internal {
- require(newImplementation.code.length > 0);
- StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
- }
- }
- ```
- TIP: Consider using this library along with {SlotDerivation}.
- [.contract-index]
- .Functions
- --
- * {xref-StorageSlot-getAddressSlot-bytes32-}[`++getAddressSlot(slot)++`]
- * {xref-StorageSlot-getBooleanSlot-bytes32-}[`++getBooleanSlot(slot)++`]
- * {xref-StorageSlot-getBytes32Slot-bytes32-}[`++getBytes32Slot(slot)++`]
- * {xref-StorageSlot-getUint256Slot-bytes32-}[`++getUint256Slot(slot)++`]
- * {xref-StorageSlot-getInt256Slot-bytes32-}[`++getInt256Slot(slot)++`]
- * {xref-StorageSlot-getStringSlot-bytes32-}[`++getStringSlot(slot)++`]
- * {xref-StorageSlot-getStringSlot-string-}[`++getStringSlot(store)++`]
- * {xref-StorageSlot-getBytesSlot-bytes32-}[`++getBytesSlot(slot)++`]
- * {xref-StorageSlot-getBytesSlot-bytes-}[`++getBytesSlot(store)++`]
- --
- [.contract-item]
- [[StorageSlot-getAddressSlot-bytes32-]]
- ==== `[.contract-item-name]#++getAddressSlot++#++(bytes32 slot) → struct StorageSlot.AddressSlot r++` [.item-kind]#internal#
- Returns an `AddressSlot` with member `value` located at `slot`.
- [.contract-item]
- [[StorageSlot-getBooleanSlot-bytes32-]]
- ==== `[.contract-item-name]#++getBooleanSlot++#++(bytes32 slot) → struct StorageSlot.BooleanSlot r++` [.item-kind]#internal#
- Returns a `BooleanSlot` with member `value` located at `slot`.
- [.contract-item]
- [[StorageSlot-getBytes32Slot-bytes32-]]
- ==== `[.contract-item-name]#++getBytes32Slot++#++(bytes32 slot) → struct StorageSlot.Bytes32Slot r++` [.item-kind]#internal#
- Returns a `Bytes32Slot` with member `value` located at `slot`.
- [.contract-item]
- [[StorageSlot-getUint256Slot-bytes32-]]
- ==== `[.contract-item-name]#++getUint256Slot++#++(bytes32 slot) → struct StorageSlot.Uint256Slot r++` [.item-kind]#internal#
- Returns a `Uint256Slot` with member `value` located at `slot`.
- [.contract-item]
- [[StorageSlot-getInt256Slot-bytes32-]]
- ==== `[.contract-item-name]#++getInt256Slot++#++(bytes32 slot) → struct StorageSlot.Int256Slot r++` [.item-kind]#internal#
- Returns a `Int256Slot` with member `value` located at `slot`.
- [.contract-item]
- [[StorageSlot-getStringSlot-bytes32-]]
- ==== `[.contract-item-name]#++getStringSlot++#++(bytes32 slot) → struct StorageSlot.StringSlot r++` [.item-kind]#internal#
- Returns a `StringSlot` with member `value` located at `slot`.
- [.contract-item]
- [[StorageSlot-getStringSlot-string-]]
- ==== `[.contract-item-name]#++getStringSlot++#++(string store) → struct StorageSlot.StringSlot r++` [.item-kind]#internal#
- Returns an `StringSlot` representation of the string storage pointer `store`.
- [.contract-item]
- [[StorageSlot-getBytesSlot-bytes32-]]
- ==== `[.contract-item-name]#++getBytesSlot++#++(bytes32 slot) → struct StorageSlot.BytesSlot r++` [.item-kind]#internal#
- Returns a `BytesSlot` with member `value` located at `slot`.
- [.contract-item]
- [[StorageSlot-getBytesSlot-bytes-]]
- ==== `[.contract-item-name]#++getBytesSlot++#++(bytes store) → struct StorageSlot.BytesSlot r++` [.item-kind]#internal#
- Returns an `BytesSlot` representation of the bytes storage pointer `store`.
- :AddressSlot: pass:normal[xref:#TransientSlot-AddressSlot[`++AddressSlot++`]]
- :asAddress: pass:normal[xref:#TransientSlot-asAddress-bytes32-[`++asAddress++`]]
- :BooleanSlot: pass:normal[xref:#TransientSlot-BooleanSlot[`++BooleanSlot++`]]
- :asBoolean: pass:normal[xref:#TransientSlot-asBoolean-bytes32-[`++asBoolean++`]]
- :Bytes32Slot: pass:normal[xref:#TransientSlot-Bytes32Slot[`++Bytes32Slot++`]]
- :asBytes32: pass:normal[xref:#TransientSlot-asBytes32-bytes32-[`++asBytes32++`]]
- :Uint256Slot: pass:normal[xref:#TransientSlot-Uint256Slot[`++Uint256Slot++`]]
- :asUint256: pass:normal[xref:#TransientSlot-asUint256-bytes32-[`++asUint256++`]]
- :Int256Slot: pass:normal[xref:#TransientSlot-Int256Slot[`++Int256Slot++`]]
- :asInt256: pass:normal[xref:#TransientSlot-asInt256-bytes32-[`++asInt256++`]]
- :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-AddressSlot-[`++tload++`]]
- :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-AddressSlot-address-[`++tstore++`]]
- :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-BooleanSlot-[`++tload++`]]
- :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-BooleanSlot-bool-[`++tstore++`]]
- :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-Bytes32Slot-[`++tload++`]]
- :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-[`++tstore++`]]
- :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-Uint256Slot-[`++tload++`]]
- :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-[`++tstore++`]]
- :tload: pass:normal[xref:#TransientSlot-tload-TransientSlot-Int256Slot-[`++tload++`]]
- :tstore: pass:normal[xref:#TransientSlot-tstore-TransientSlot-Int256Slot-int256-[`++tstore++`]]
- [.contract]
- [[TransientSlot]]
- === `++TransientSlot++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/TransientSlot.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/TransientSlot.sol";
- ```
- Library for reading and writing value-types to specific transient storage slots.
- Transient slots are often used to store temporary values that are removed after the current transaction.
- This library helps with reading and writing to such slots without the need for inline assembly.
- * Example reading and writing values using transient storage:
- ```solidity
- contract Lock {
- using TransientSlot for *;
- // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
- bytes32 internal constant _LOCK_SLOT = 0xf4678858b2b588224636b8522b729e7722d32fc491da849ed75b3fdf3c84f542;
- modifier locked() {
- require(!_LOCK_SLOT.asBoolean().tload());
- _LOCK_SLOT.asBoolean().tstore(true);
- _;
- _LOCK_SLOT.asBoolean().tstore(false);
- }
- }
- ```
- TIP: Consider using this library along with {SlotDerivation}.
- [.contract-index]
- .Functions
- --
- * {xref-TransientSlot-asAddress-bytes32-}[`++asAddress(slot)++`]
- * {xref-TransientSlot-asBoolean-bytes32-}[`++asBoolean(slot)++`]
- * {xref-TransientSlot-asBytes32-bytes32-}[`++asBytes32(slot)++`]
- * {xref-TransientSlot-asUint256-bytes32-}[`++asUint256(slot)++`]
- * {xref-TransientSlot-asInt256-bytes32-}[`++asInt256(slot)++`]
- * {xref-TransientSlot-tload-TransientSlot-AddressSlot-}[`++tload(slot)++`]
- * {xref-TransientSlot-tstore-TransientSlot-AddressSlot-address-}[`++tstore(slot, value)++`]
- * {xref-TransientSlot-tload-TransientSlot-BooleanSlot-}[`++tload(slot)++`]
- * {xref-TransientSlot-tstore-TransientSlot-BooleanSlot-bool-}[`++tstore(slot, value)++`]
- * {xref-TransientSlot-tload-TransientSlot-Bytes32Slot-}[`++tload(slot)++`]
- * {xref-TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-}[`++tstore(slot, value)++`]
- * {xref-TransientSlot-tload-TransientSlot-Uint256Slot-}[`++tload(slot)++`]
- * {xref-TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-}[`++tstore(slot, value)++`]
- * {xref-TransientSlot-tload-TransientSlot-Int256Slot-}[`++tload(slot)++`]
- * {xref-TransientSlot-tstore-TransientSlot-Int256Slot-int256-}[`++tstore(slot, value)++`]
- --
- [.contract-item]
- [[TransientSlot-asAddress-bytes32-]]
- ==== `[.contract-item-name]#++asAddress++#++(bytes32 slot) → TransientSlot.AddressSlot++` [.item-kind]#internal#
- Cast an arbitrary slot to a AddressSlot.
- [.contract-item]
- [[TransientSlot-asBoolean-bytes32-]]
- ==== `[.contract-item-name]#++asBoolean++#++(bytes32 slot) → TransientSlot.BooleanSlot++` [.item-kind]#internal#
- Cast an arbitrary slot to a BooleanSlot.
- [.contract-item]
- [[TransientSlot-asBytes32-bytes32-]]
- ==== `[.contract-item-name]#++asBytes32++#++(bytes32 slot) → TransientSlot.Bytes32Slot++` [.item-kind]#internal#
- Cast an arbitrary slot to a Bytes32Slot.
- [.contract-item]
- [[TransientSlot-asUint256-bytes32-]]
- ==== `[.contract-item-name]#++asUint256++#++(bytes32 slot) → TransientSlot.Uint256Slot++` [.item-kind]#internal#
- Cast an arbitrary slot to a Uint256Slot.
- [.contract-item]
- [[TransientSlot-asInt256-bytes32-]]
- ==== `[.contract-item-name]#++asInt256++#++(bytes32 slot) → TransientSlot.Int256Slot++` [.item-kind]#internal#
- Cast an arbitrary slot to a Int256Slot.
- [.contract-item]
- [[TransientSlot-tload-TransientSlot-AddressSlot-]]
- ==== `[.contract-item-name]#++tload++#++(TransientSlot.AddressSlot slot) → address value++` [.item-kind]#internal#
- Load the value held at location `slot` in transient storage.
- [.contract-item]
- [[TransientSlot-tstore-TransientSlot-AddressSlot-address-]]
- ==== `[.contract-item-name]#++tstore++#++(TransientSlot.AddressSlot slot, address value)++` [.item-kind]#internal#
- Store `value` at location `slot` in transient storage.
- [.contract-item]
- [[TransientSlot-tload-TransientSlot-BooleanSlot-]]
- ==== `[.contract-item-name]#++tload++#++(TransientSlot.BooleanSlot slot) → bool value++` [.item-kind]#internal#
- Load the value held at location `slot` in transient storage.
- [.contract-item]
- [[TransientSlot-tstore-TransientSlot-BooleanSlot-bool-]]
- ==== `[.contract-item-name]#++tstore++#++(TransientSlot.BooleanSlot slot, bool value)++` [.item-kind]#internal#
- Store `value` at location `slot` in transient storage.
- [.contract-item]
- [[TransientSlot-tload-TransientSlot-Bytes32Slot-]]
- ==== `[.contract-item-name]#++tload++#++(TransientSlot.Bytes32Slot slot) → bytes32 value++` [.item-kind]#internal#
- Load the value held at location `slot` in transient storage.
- [.contract-item]
- [[TransientSlot-tstore-TransientSlot-Bytes32Slot-bytes32-]]
- ==== `[.contract-item-name]#++tstore++#++(TransientSlot.Bytes32Slot slot, bytes32 value)++` [.item-kind]#internal#
- Store `value` at location `slot` in transient storage.
- [.contract-item]
- [[TransientSlot-tload-TransientSlot-Uint256Slot-]]
- ==== `[.contract-item-name]#++tload++#++(TransientSlot.Uint256Slot slot) → uint256 value++` [.item-kind]#internal#
- Load the value held at location `slot` in transient storage.
- [.contract-item]
- [[TransientSlot-tstore-TransientSlot-Uint256Slot-uint256-]]
- ==== `[.contract-item-name]#++tstore++#++(TransientSlot.Uint256Slot slot, uint256 value)++` [.item-kind]#internal#
- Store `value` at location `slot` in transient storage.
- [.contract-item]
- [[TransientSlot-tload-TransientSlot-Int256Slot-]]
- ==== `[.contract-item-name]#++tload++#++(TransientSlot.Int256Slot slot) → int256 value++` [.item-kind]#internal#
- Load the value held at location `slot` in transient storage.
- [.contract-item]
- [[TransientSlot-tstore-TransientSlot-Int256Slot-int256-]]
- ==== `[.contract-item-name]#++tstore++#++(TransientSlot.Int256Slot slot, int256 value)++` [.item-kind]#internal#
- Store `value` at location `slot` in transient storage.
- :multicall: pass:normal[xref:#Multicall-multicall-bytes---[`++multicall++`]]
- [.contract]
- [[Multicall]]
- === `++Multicall++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Multicall.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Multicall.sol";
- ```
- Provides a function to batch together multiple calls in a single external call.
- Consider any assumption about calldata validation performed by the sender may be violated if it's not especially
- careful about sending transactions invoking {multicall}. For example, a relay address that filters function
- selectors won't filter calls nested within a {multicall} operation.
- NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}).
- If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data`
- to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of
- {_msgSender} are not propagated to subcalls.
- [.contract-index]
- .Functions
- --
- * {xref-Multicall-multicall-bytes---}[`++multicall(data)++`]
- --
- [.contract-item]
- [[Multicall-multicall-bytes---]]
- ==== `[.contract-item-name]#++multicall++#++(bytes[] data) → bytes[] results++` [.item-kind]#external#
- Receives and executes a batch of function calls on this contract.
- :_msgSender: pass:normal[xref:#Context-_msgSender--[`++_msgSender++`]]
- :_msgData: pass:normal[xref:#Context-_msgData--[`++_msgData++`]]
- :_contextSuffixLength: pass:normal[xref:#Context-_contextSuffixLength--[`++_contextSuffixLength++`]]
- [.contract]
- [[Context]]
- === `++Context++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Context.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Context.sol";
- ```
- Provides information about the current execution context, including the
- sender of the transaction and its data. While these are generally available
- via msg.sender and msg.data, they should not be accessed in such a direct
- manner, since when dealing with meta-transactions the account sending and
- paying for execution may not be the actual sender (as far as an application
- is concerned).
- This contract is only required for intermediate, library-like contracts.
- [.contract-index]
- .Functions
- --
- * {xref-Context-_msgSender--}[`++_msgSender()++`]
- * {xref-Context-_msgData--}[`++_msgData()++`]
- * {xref-Context-_contextSuffixLength--}[`++_contextSuffixLength()++`]
- --
- [.contract-item]
- [[Context-_msgSender--]]
- ==== `[.contract-item-name]#++_msgSender++#++() → address++` [.item-kind]#internal#
- [.contract-item]
- [[Context-_msgData--]]
- ==== `[.contract-item-name]#++_msgData++#++() → bytes++` [.item-kind]#internal#
- [.contract-item]
- [[Context-_contextSuffixLength--]]
- ==== `[.contract-item-name]#++_contextSuffixLength++#++() → uint256++` [.item-kind]#internal#
- :OutOfRangeAccess: pass:normal[xref:#Packing-OutOfRangeAccess--[`++OutOfRangeAccess++`]]
- :pack_1_1: pass:normal[xref:#Packing-pack_1_1-bytes1-bytes1-[`++pack_1_1++`]]
- :pack_2_2: pass:normal[xref:#Packing-pack_2_2-bytes2-bytes2-[`++pack_2_2++`]]
- :pack_2_4: pass:normal[xref:#Packing-pack_2_4-bytes2-bytes4-[`++pack_2_4++`]]
- :pack_2_6: pass:normal[xref:#Packing-pack_2_6-bytes2-bytes6-[`++pack_2_6++`]]
- :pack_4_2: pass:normal[xref:#Packing-pack_4_2-bytes4-bytes2-[`++pack_4_2++`]]
- :pack_4_4: pass:normal[xref:#Packing-pack_4_4-bytes4-bytes4-[`++pack_4_4++`]]
- :pack_4_8: pass:normal[xref:#Packing-pack_4_8-bytes4-bytes8-[`++pack_4_8++`]]
- :pack_4_12: pass:normal[xref:#Packing-pack_4_12-bytes4-bytes12-[`++pack_4_12++`]]
- :pack_4_16: pass:normal[xref:#Packing-pack_4_16-bytes4-bytes16-[`++pack_4_16++`]]
- :pack_4_20: pass:normal[xref:#Packing-pack_4_20-bytes4-bytes20-[`++pack_4_20++`]]
- :pack_4_24: pass:normal[xref:#Packing-pack_4_24-bytes4-bytes24-[`++pack_4_24++`]]
- :pack_4_28: pass:normal[xref:#Packing-pack_4_28-bytes4-bytes28-[`++pack_4_28++`]]
- :pack_6_2: pass:normal[xref:#Packing-pack_6_2-bytes6-bytes2-[`++pack_6_2++`]]
- :pack_6_6: pass:normal[xref:#Packing-pack_6_6-bytes6-bytes6-[`++pack_6_6++`]]
- :pack_8_4: pass:normal[xref:#Packing-pack_8_4-bytes8-bytes4-[`++pack_8_4++`]]
- :pack_8_8: pass:normal[xref:#Packing-pack_8_8-bytes8-bytes8-[`++pack_8_8++`]]
- :pack_8_12: pass:normal[xref:#Packing-pack_8_12-bytes8-bytes12-[`++pack_8_12++`]]
- :pack_8_16: pass:normal[xref:#Packing-pack_8_16-bytes8-bytes16-[`++pack_8_16++`]]
- :pack_8_20: pass:normal[xref:#Packing-pack_8_20-bytes8-bytes20-[`++pack_8_20++`]]
- :pack_8_24: pass:normal[xref:#Packing-pack_8_24-bytes8-bytes24-[`++pack_8_24++`]]
- :pack_12_4: pass:normal[xref:#Packing-pack_12_4-bytes12-bytes4-[`++pack_12_4++`]]
- :pack_12_8: pass:normal[xref:#Packing-pack_12_8-bytes12-bytes8-[`++pack_12_8++`]]
- :pack_12_12: pass:normal[xref:#Packing-pack_12_12-bytes12-bytes12-[`++pack_12_12++`]]
- :pack_12_16: pass:normal[xref:#Packing-pack_12_16-bytes12-bytes16-[`++pack_12_16++`]]
- :pack_12_20: pass:normal[xref:#Packing-pack_12_20-bytes12-bytes20-[`++pack_12_20++`]]
- :pack_16_4: pass:normal[xref:#Packing-pack_16_4-bytes16-bytes4-[`++pack_16_4++`]]
- :pack_16_8: pass:normal[xref:#Packing-pack_16_8-bytes16-bytes8-[`++pack_16_8++`]]
- :pack_16_12: pass:normal[xref:#Packing-pack_16_12-bytes16-bytes12-[`++pack_16_12++`]]
- :pack_16_16: pass:normal[xref:#Packing-pack_16_16-bytes16-bytes16-[`++pack_16_16++`]]
- :pack_20_4: pass:normal[xref:#Packing-pack_20_4-bytes20-bytes4-[`++pack_20_4++`]]
- :pack_20_8: pass:normal[xref:#Packing-pack_20_8-bytes20-bytes8-[`++pack_20_8++`]]
- :pack_20_12: pass:normal[xref:#Packing-pack_20_12-bytes20-bytes12-[`++pack_20_12++`]]
- :pack_24_4: pass:normal[xref:#Packing-pack_24_4-bytes24-bytes4-[`++pack_24_4++`]]
- :pack_24_8: pass:normal[xref:#Packing-pack_24_8-bytes24-bytes8-[`++pack_24_8++`]]
- :pack_28_4: pass:normal[xref:#Packing-pack_28_4-bytes28-bytes4-[`++pack_28_4++`]]
- :extract_2_1: pass:normal[xref:#Packing-extract_2_1-bytes2-uint8-[`++extract_2_1++`]]
- :replace_2_1: pass:normal[xref:#Packing-replace_2_1-bytes2-bytes1-uint8-[`++replace_2_1++`]]
- :extract_4_1: pass:normal[xref:#Packing-extract_4_1-bytes4-uint8-[`++extract_4_1++`]]
- :replace_4_1: pass:normal[xref:#Packing-replace_4_1-bytes4-bytes1-uint8-[`++replace_4_1++`]]
- :extract_4_2: pass:normal[xref:#Packing-extract_4_2-bytes4-uint8-[`++extract_4_2++`]]
- :replace_4_2: pass:normal[xref:#Packing-replace_4_2-bytes4-bytes2-uint8-[`++replace_4_2++`]]
- :extract_6_1: pass:normal[xref:#Packing-extract_6_1-bytes6-uint8-[`++extract_6_1++`]]
- :replace_6_1: pass:normal[xref:#Packing-replace_6_1-bytes6-bytes1-uint8-[`++replace_6_1++`]]
- :extract_6_2: pass:normal[xref:#Packing-extract_6_2-bytes6-uint8-[`++extract_6_2++`]]
- :replace_6_2: pass:normal[xref:#Packing-replace_6_2-bytes6-bytes2-uint8-[`++replace_6_2++`]]
- :extract_6_4: pass:normal[xref:#Packing-extract_6_4-bytes6-uint8-[`++extract_6_4++`]]
- :replace_6_4: pass:normal[xref:#Packing-replace_6_4-bytes6-bytes4-uint8-[`++replace_6_4++`]]
- :extract_8_1: pass:normal[xref:#Packing-extract_8_1-bytes8-uint8-[`++extract_8_1++`]]
- :replace_8_1: pass:normal[xref:#Packing-replace_8_1-bytes8-bytes1-uint8-[`++replace_8_1++`]]
- :extract_8_2: pass:normal[xref:#Packing-extract_8_2-bytes8-uint8-[`++extract_8_2++`]]
- :replace_8_2: pass:normal[xref:#Packing-replace_8_2-bytes8-bytes2-uint8-[`++replace_8_2++`]]
- :extract_8_4: pass:normal[xref:#Packing-extract_8_4-bytes8-uint8-[`++extract_8_4++`]]
- :replace_8_4: pass:normal[xref:#Packing-replace_8_4-bytes8-bytes4-uint8-[`++replace_8_4++`]]
- :extract_8_6: pass:normal[xref:#Packing-extract_8_6-bytes8-uint8-[`++extract_8_6++`]]
- :replace_8_6: pass:normal[xref:#Packing-replace_8_6-bytes8-bytes6-uint8-[`++replace_8_6++`]]
- :extract_12_1: pass:normal[xref:#Packing-extract_12_1-bytes12-uint8-[`++extract_12_1++`]]
- :replace_12_1: pass:normal[xref:#Packing-replace_12_1-bytes12-bytes1-uint8-[`++replace_12_1++`]]
- :extract_12_2: pass:normal[xref:#Packing-extract_12_2-bytes12-uint8-[`++extract_12_2++`]]
- :replace_12_2: pass:normal[xref:#Packing-replace_12_2-bytes12-bytes2-uint8-[`++replace_12_2++`]]
- :extract_12_4: pass:normal[xref:#Packing-extract_12_4-bytes12-uint8-[`++extract_12_4++`]]
- :replace_12_4: pass:normal[xref:#Packing-replace_12_4-bytes12-bytes4-uint8-[`++replace_12_4++`]]
- :extract_12_6: pass:normal[xref:#Packing-extract_12_6-bytes12-uint8-[`++extract_12_6++`]]
- :replace_12_6: pass:normal[xref:#Packing-replace_12_6-bytes12-bytes6-uint8-[`++replace_12_6++`]]
- :extract_12_8: pass:normal[xref:#Packing-extract_12_8-bytes12-uint8-[`++extract_12_8++`]]
- :replace_12_8: pass:normal[xref:#Packing-replace_12_8-bytes12-bytes8-uint8-[`++replace_12_8++`]]
- :extract_16_1: pass:normal[xref:#Packing-extract_16_1-bytes16-uint8-[`++extract_16_1++`]]
- :replace_16_1: pass:normal[xref:#Packing-replace_16_1-bytes16-bytes1-uint8-[`++replace_16_1++`]]
- :extract_16_2: pass:normal[xref:#Packing-extract_16_2-bytes16-uint8-[`++extract_16_2++`]]
- :replace_16_2: pass:normal[xref:#Packing-replace_16_2-bytes16-bytes2-uint8-[`++replace_16_2++`]]
- :extract_16_4: pass:normal[xref:#Packing-extract_16_4-bytes16-uint8-[`++extract_16_4++`]]
- :replace_16_4: pass:normal[xref:#Packing-replace_16_4-bytes16-bytes4-uint8-[`++replace_16_4++`]]
- :extract_16_6: pass:normal[xref:#Packing-extract_16_6-bytes16-uint8-[`++extract_16_6++`]]
- :replace_16_6: pass:normal[xref:#Packing-replace_16_6-bytes16-bytes6-uint8-[`++replace_16_6++`]]
- :extract_16_8: pass:normal[xref:#Packing-extract_16_8-bytes16-uint8-[`++extract_16_8++`]]
- :replace_16_8: pass:normal[xref:#Packing-replace_16_8-bytes16-bytes8-uint8-[`++replace_16_8++`]]
- :extract_16_12: pass:normal[xref:#Packing-extract_16_12-bytes16-uint8-[`++extract_16_12++`]]
- :replace_16_12: pass:normal[xref:#Packing-replace_16_12-bytes16-bytes12-uint8-[`++replace_16_12++`]]
- :extract_20_1: pass:normal[xref:#Packing-extract_20_1-bytes20-uint8-[`++extract_20_1++`]]
- :replace_20_1: pass:normal[xref:#Packing-replace_20_1-bytes20-bytes1-uint8-[`++replace_20_1++`]]
- :extract_20_2: pass:normal[xref:#Packing-extract_20_2-bytes20-uint8-[`++extract_20_2++`]]
- :replace_20_2: pass:normal[xref:#Packing-replace_20_2-bytes20-bytes2-uint8-[`++replace_20_2++`]]
- :extract_20_4: pass:normal[xref:#Packing-extract_20_4-bytes20-uint8-[`++extract_20_4++`]]
- :replace_20_4: pass:normal[xref:#Packing-replace_20_4-bytes20-bytes4-uint8-[`++replace_20_4++`]]
- :extract_20_6: pass:normal[xref:#Packing-extract_20_6-bytes20-uint8-[`++extract_20_6++`]]
- :replace_20_6: pass:normal[xref:#Packing-replace_20_6-bytes20-bytes6-uint8-[`++replace_20_6++`]]
- :extract_20_8: pass:normal[xref:#Packing-extract_20_8-bytes20-uint8-[`++extract_20_8++`]]
- :replace_20_8: pass:normal[xref:#Packing-replace_20_8-bytes20-bytes8-uint8-[`++replace_20_8++`]]
- :extract_20_12: pass:normal[xref:#Packing-extract_20_12-bytes20-uint8-[`++extract_20_12++`]]
- :replace_20_12: pass:normal[xref:#Packing-replace_20_12-bytes20-bytes12-uint8-[`++replace_20_12++`]]
- :extract_20_16: pass:normal[xref:#Packing-extract_20_16-bytes20-uint8-[`++extract_20_16++`]]
- :replace_20_16: pass:normal[xref:#Packing-replace_20_16-bytes20-bytes16-uint8-[`++replace_20_16++`]]
- :extract_24_1: pass:normal[xref:#Packing-extract_24_1-bytes24-uint8-[`++extract_24_1++`]]
- :replace_24_1: pass:normal[xref:#Packing-replace_24_1-bytes24-bytes1-uint8-[`++replace_24_1++`]]
- :extract_24_2: pass:normal[xref:#Packing-extract_24_2-bytes24-uint8-[`++extract_24_2++`]]
- :replace_24_2: pass:normal[xref:#Packing-replace_24_2-bytes24-bytes2-uint8-[`++replace_24_2++`]]
- :extract_24_4: pass:normal[xref:#Packing-extract_24_4-bytes24-uint8-[`++extract_24_4++`]]
- :replace_24_4: pass:normal[xref:#Packing-replace_24_4-bytes24-bytes4-uint8-[`++replace_24_4++`]]
- :extract_24_6: pass:normal[xref:#Packing-extract_24_6-bytes24-uint8-[`++extract_24_6++`]]
- :replace_24_6: pass:normal[xref:#Packing-replace_24_6-bytes24-bytes6-uint8-[`++replace_24_6++`]]
- :extract_24_8: pass:normal[xref:#Packing-extract_24_8-bytes24-uint8-[`++extract_24_8++`]]
- :replace_24_8: pass:normal[xref:#Packing-replace_24_8-bytes24-bytes8-uint8-[`++replace_24_8++`]]
- :extract_24_12: pass:normal[xref:#Packing-extract_24_12-bytes24-uint8-[`++extract_24_12++`]]
- :replace_24_12: pass:normal[xref:#Packing-replace_24_12-bytes24-bytes12-uint8-[`++replace_24_12++`]]
- :extract_24_16: pass:normal[xref:#Packing-extract_24_16-bytes24-uint8-[`++extract_24_16++`]]
- :replace_24_16: pass:normal[xref:#Packing-replace_24_16-bytes24-bytes16-uint8-[`++replace_24_16++`]]
- :extract_24_20: pass:normal[xref:#Packing-extract_24_20-bytes24-uint8-[`++extract_24_20++`]]
- :replace_24_20: pass:normal[xref:#Packing-replace_24_20-bytes24-bytes20-uint8-[`++replace_24_20++`]]
- :extract_28_1: pass:normal[xref:#Packing-extract_28_1-bytes28-uint8-[`++extract_28_1++`]]
- :replace_28_1: pass:normal[xref:#Packing-replace_28_1-bytes28-bytes1-uint8-[`++replace_28_1++`]]
- :extract_28_2: pass:normal[xref:#Packing-extract_28_2-bytes28-uint8-[`++extract_28_2++`]]
- :replace_28_2: pass:normal[xref:#Packing-replace_28_2-bytes28-bytes2-uint8-[`++replace_28_2++`]]
- :extract_28_4: pass:normal[xref:#Packing-extract_28_4-bytes28-uint8-[`++extract_28_4++`]]
- :replace_28_4: pass:normal[xref:#Packing-replace_28_4-bytes28-bytes4-uint8-[`++replace_28_4++`]]
- :extract_28_6: pass:normal[xref:#Packing-extract_28_6-bytes28-uint8-[`++extract_28_6++`]]
- :replace_28_6: pass:normal[xref:#Packing-replace_28_6-bytes28-bytes6-uint8-[`++replace_28_6++`]]
- :extract_28_8: pass:normal[xref:#Packing-extract_28_8-bytes28-uint8-[`++extract_28_8++`]]
- :replace_28_8: pass:normal[xref:#Packing-replace_28_8-bytes28-bytes8-uint8-[`++replace_28_8++`]]
- :extract_28_12: pass:normal[xref:#Packing-extract_28_12-bytes28-uint8-[`++extract_28_12++`]]
- :replace_28_12: pass:normal[xref:#Packing-replace_28_12-bytes28-bytes12-uint8-[`++replace_28_12++`]]
- :extract_28_16: pass:normal[xref:#Packing-extract_28_16-bytes28-uint8-[`++extract_28_16++`]]
- :replace_28_16: pass:normal[xref:#Packing-replace_28_16-bytes28-bytes16-uint8-[`++replace_28_16++`]]
- :extract_28_20: pass:normal[xref:#Packing-extract_28_20-bytes28-uint8-[`++extract_28_20++`]]
- :replace_28_20: pass:normal[xref:#Packing-replace_28_20-bytes28-bytes20-uint8-[`++replace_28_20++`]]
- :extract_28_24: pass:normal[xref:#Packing-extract_28_24-bytes28-uint8-[`++extract_28_24++`]]
- :replace_28_24: pass:normal[xref:#Packing-replace_28_24-bytes28-bytes24-uint8-[`++replace_28_24++`]]
- :extract_32_1: pass:normal[xref:#Packing-extract_32_1-bytes32-uint8-[`++extract_32_1++`]]
- :replace_32_1: pass:normal[xref:#Packing-replace_32_1-bytes32-bytes1-uint8-[`++replace_32_1++`]]
- :extract_32_2: pass:normal[xref:#Packing-extract_32_2-bytes32-uint8-[`++extract_32_2++`]]
- :replace_32_2: pass:normal[xref:#Packing-replace_32_2-bytes32-bytes2-uint8-[`++replace_32_2++`]]
- :extract_32_4: pass:normal[xref:#Packing-extract_32_4-bytes32-uint8-[`++extract_32_4++`]]
- :replace_32_4: pass:normal[xref:#Packing-replace_32_4-bytes32-bytes4-uint8-[`++replace_32_4++`]]
- :extract_32_6: pass:normal[xref:#Packing-extract_32_6-bytes32-uint8-[`++extract_32_6++`]]
- :replace_32_6: pass:normal[xref:#Packing-replace_32_6-bytes32-bytes6-uint8-[`++replace_32_6++`]]
- :extract_32_8: pass:normal[xref:#Packing-extract_32_8-bytes32-uint8-[`++extract_32_8++`]]
- :replace_32_8: pass:normal[xref:#Packing-replace_32_8-bytes32-bytes8-uint8-[`++replace_32_8++`]]
- :extract_32_12: pass:normal[xref:#Packing-extract_32_12-bytes32-uint8-[`++extract_32_12++`]]
- :replace_32_12: pass:normal[xref:#Packing-replace_32_12-bytes32-bytes12-uint8-[`++replace_32_12++`]]
- :extract_32_16: pass:normal[xref:#Packing-extract_32_16-bytes32-uint8-[`++extract_32_16++`]]
- :replace_32_16: pass:normal[xref:#Packing-replace_32_16-bytes32-bytes16-uint8-[`++replace_32_16++`]]
- :extract_32_20: pass:normal[xref:#Packing-extract_32_20-bytes32-uint8-[`++extract_32_20++`]]
- :replace_32_20: pass:normal[xref:#Packing-replace_32_20-bytes32-bytes20-uint8-[`++replace_32_20++`]]
- :extract_32_24: pass:normal[xref:#Packing-extract_32_24-bytes32-uint8-[`++extract_32_24++`]]
- :replace_32_24: pass:normal[xref:#Packing-replace_32_24-bytes32-bytes24-uint8-[`++replace_32_24++`]]
- :extract_32_28: pass:normal[xref:#Packing-extract_32_28-bytes32-uint8-[`++extract_32_28++`]]
- :replace_32_28: pass:normal[xref:#Packing-replace_32_28-bytes32-bytes28-uint8-[`++replace_32_28++`]]
- [.contract]
- [[Packing]]
- === `++Packing++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Packing.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Packing.sol";
- ```
- Helper library packing and unpacking multiple values into bytesXX.
- Example usage:
- ```solidity
- library MyPacker {
- type MyType is bytes32;
- function _pack(address account, bytes4 selector, uint64 period) external pure returns (MyType) {
- bytes12 subpack = Packing.pack_4_8(selector, bytes8(period));
- bytes32 pack = Packing.pack_20_12(bytes20(account), subpack);
- return MyType.wrap(pack);
- }
- function _unpack(MyType self) external pure returns (address, bytes4, uint64) {
- bytes32 pack = MyType.unwrap(self);
- return (
- address(Packing.extract_32_20(pack, 0)),
- Packing.extract_32_4(pack, 20),
- uint64(Packing.extract_32_8(pack, 24))
- );
- }
- }
- ```
- _Available since v5.1._
- [.contract-index]
- .Functions
- --
- * {xref-Packing-pack_1_1-bytes1-bytes1-}[`++pack_1_1(left, right)++`]
- * {xref-Packing-pack_2_2-bytes2-bytes2-}[`++pack_2_2(left, right)++`]
- * {xref-Packing-pack_2_4-bytes2-bytes4-}[`++pack_2_4(left, right)++`]
- * {xref-Packing-pack_2_6-bytes2-bytes6-}[`++pack_2_6(left, right)++`]
- * {xref-Packing-pack_4_2-bytes4-bytes2-}[`++pack_4_2(left, right)++`]
- * {xref-Packing-pack_4_4-bytes4-bytes4-}[`++pack_4_4(left, right)++`]
- * {xref-Packing-pack_4_8-bytes4-bytes8-}[`++pack_4_8(left, right)++`]
- * {xref-Packing-pack_4_12-bytes4-bytes12-}[`++pack_4_12(left, right)++`]
- * {xref-Packing-pack_4_16-bytes4-bytes16-}[`++pack_4_16(left, right)++`]
- * {xref-Packing-pack_4_20-bytes4-bytes20-}[`++pack_4_20(left, right)++`]
- * {xref-Packing-pack_4_24-bytes4-bytes24-}[`++pack_4_24(left, right)++`]
- * {xref-Packing-pack_4_28-bytes4-bytes28-}[`++pack_4_28(left, right)++`]
- * {xref-Packing-pack_6_2-bytes6-bytes2-}[`++pack_6_2(left, right)++`]
- * {xref-Packing-pack_6_6-bytes6-bytes6-}[`++pack_6_6(left, right)++`]
- * {xref-Packing-pack_8_4-bytes8-bytes4-}[`++pack_8_4(left, right)++`]
- * {xref-Packing-pack_8_8-bytes8-bytes8-}[`++pack_8_8(left, right)++`]
- * {xref-Packing-pack_8_12-bytes8-bytes12-}[`++pack_8_12(left, right)++`]
- * {xref-Packing-pack_8_16-bytes8-bytes16-}[`++pack_8_16(left, right)++`]
- * {xref-Packing-pack_8_20-bytes8-bytes20-}[`++pack_8_20(left, right)++`]
- * {xref-Packing-pack_8_24-bytes8-bytes24-}[`++pack_8_24(left, right)++`]
- * {xref-Packing-pack_12_4-bytes12-bytes4-}[`++pack_12_4(left, right)++`]
- * {xref-Packing-pack_12_8-bytes12-bytes8-}[`++pack_12_8(left, right)++`]
- * {xref-Packing-pack_12_12-bytes12-bytes12-}[`++pack_12_12(left, right)++`]
- * {xref-Packing-pack_12_16-bytes12-bytes16-}[`++pack_12_16(left, right)++`]
- * {xref-Packing-pack_12_20-bytes12-bytes20-}[`++pack_12_20(left, right)++`]
- * {xref-Packing-pack_16_4-bytes16-bytes4-}[`++pack_16_4(left, right)++`]
- * {xref-Packing-pack_16_8-bytes16-bytes8-}[`++pack_16_8(left, right)++`]
- * {xref-Packing-pack_16_12-bytes16-bytes12-}[`++pack_16_12(left, right)++`]
- * {xref-Packing-pack_16_16-bytes16-bytes16-}[`++pack_16_16(left, right)++`]
- * {xref-Packing-pack_20_4-bytes20-bytes4-}[`++pack_20_4(left, right)++`]
- * {xref-Packing-pack_20_8-bytes20-bytes8-}[`++pack_20_8(left, right)++`]
- * {xref-Packing-pack_20_12-bytes20-bytes12-}[`++pack_20_12(left, right)++`]
- * {xref-Packing-pack_24_4-bytes24-bytes4-}[`++pack_24_4(left, right)++`]
- * {xref-Packing-pack_24_8-bytes24-bytes8-}[`++pack_24_8(left, right)++`]
- * {xref-Packing-pack_28_4-bytes28-bytes4-}[`++pack_28_4(left, right)++`]
- * {xref-Packing-extract_2_1-bytes2-uint8-}[`++extract_2_1(self, offset)++`]
- * {xref-Packing-replace_2_1-bytes2-bytes1-uint8-}[`++replace_2_1(self, value, offset)++`]
- * {xref-Packing-extract_4_1-bytes4-uint8-}[`++extract_4_1(self, offset)++`]
- * {xref-Packing-replace_4_1-bytes4-bytes1-uint8-}[`++replace_4_1(self, value, offset)++`]
- * {xref-Packing-extract_4_2-bytes4-uint8-}[`++extract_4_2(self, offset)++`]
- * {xref-Packing-replace_4_2-bytes4-bytes2-uint8-}[`++replace_4_2(self, value, offset)++`]
- * {xref-Packing-extract_6_1-bytes6-uint8-}[`++extract_6_1(self, offset)++`]
- * {xref-Packing-replace_6_1-bytes6-bytes1-uint8-}[`++replace_6_1(self, value, offset)++`]
- * {xref-Packing-extract_6_2-bytes6-uint8-}[`++extract_6_2(self, offset)++`]
- * {xref-Packing-replace_6_2-bytes6-bytes2-uint8-}[`++replace_6_2(self, value, offset)++`]
- * {xref-Packing-extract_6_4-bytes6-uint8-}[`++extract_6_4(self, offset)++`]
- * {xref-Packing-replace_6_4-bytes6-bytes4-uint8-}[`++replace_6_4(self, value, offset)++`]
- * {xref-Packing-extract_8_1-bytes8-uint8-}[`++extract_8_1(self, offset)++`]
- * {xref-Packing-replace_8_1-bytes8-bytes1-uint8-}[`++replace_8_1(self, value, offset)++`]
- * {xref-Packing-extract_8_2-bytes8-uint8-}[`++extract_8_2(self, offset)++`]
- * {xref-Packing-replace_8_2-bytes8-bytes2-uint8-}[`++replace_8_2(self, value, offset)++`]
- * {xref-Packing-extract_8_4-bytes8-uint8-}[`++extract_8_4(self, offset)++`]
- * {xref-Packing-replace_8_4-bytes8-bytes4-uint8-}[`++replace_8_4(self, value, offset)++`]
- * {xref-Packing-extract_8_6-bytes8-uint8-}[`++extract_8_6(self, offset)++`]
- * {xref-Packing-replace_8_6-bytes8-bytes6-uint8-}[`++replace_8_6(self, value, offset)++`]
- * {xref-Packing-extract_12_1-bytes12-uint8-}[`++extract_12_1(self, offset)++`]
- * {xref-Packing-replace_12_1-bytes12-bytes1-uint8-}[`++replace_12_1(self, value, offset)++`]
- * {xref-Packing-extract_12_2-bytes12-uint8-}[`++extract_12_2(self, offset)++`]
- * {xref-Packing-replace_12_2-bytes12-bytes2-uint8-}[`++replace_12_2(self, value, offset)++`]
- * {xref-Packing-extract_12_4-bytes12-uint8-}[`++extract_12_4(self, offset)++`]
- * {xref-Packing-replace_12_4-bytes12-bytes4-uint8-}[`++replace_12_4(self, value, offset)++`]
- * {xref-Packing-extract_12_6-bytes12-uint8-}[`++extract_12_6(self, offset)++`]
- * {xref-Packing-replace_12_6-bytes12-bytes6-uint8-}[`++replace_12_6(self, value, offset)++`]
- * {xref-Packing-extract_12_8-bytes12-uint8-}[`++extract_12_8(self, offset)++`]
- * {xref-Packing-replace_12_8-bytes12-bytes8-uint8-}[`++replace_12_8(self, value, offset)++`]
- * {xref-Packing-extract_16_1-bytes16-uint8-}[`++extract_16_1(self, offset)++`]
- * {xref-Packing-replace_16_1-bytes16-bytes1-uint8-}[`++replace_16_1(self, value, offset)++`]
- * {xref-Packing-extract_16_2-bytes16-uint8-}[`++extract_16_2(self, offset)++`]
- * {xref-Packing-replace_16_2-bytes16-bytes2-uint8-}[`++replace_16_2(self, value, offset)++`]
- * {xref-Packing-extract_16_4-bytes16-uint8-}[`++extract_16_4(self, offset)++`]
- * {xref-Packing-replace_16_4-bytes16-bytes4-uint8-}[`++replace_16_4(self, value, offset)++`]
- * {xref-Packing-extract_16_6-bytes16-uint8-}[`++extract_16_6(self, offset)++`]
- * {xref-Packing-replace_16_6-bytes16-bytes6-uint8-}[`++replace_16_6(self, value, offset)++`]
- * {xref-Packing-extract_16_8-bytes16-uint8-}[`++extract_16_8(self, offset)++`]
- * {xref-Packing-replace_16_8-bytes16-bytes8-uint8-}[`++replace_16_8(self, value, offset)++`]
- * {xref-Packing-extract_16_12-bytes16-uint8-}[`++extract_16_12(self, offset)++`]
- * {xref-Packing-replace_16_12-bytes16-bytes12-uint8-}[`++replace_16_12(self, value, offset)++`]
- * {xref-Packing-extract_20_1-bytes20-uint8-}[`++extract_20_1(self, offset)++`]
- * {xref-Packing-replace_20_1-bytes20-bytes1-uint8-}[`++replace_20_1(self, value, offset)++`]
- * {xref-Packing-extract_20_2-bytes20-uint8-}[`++extract_20_2(self, offset)++`]
- * {xref-Packing-replace_20_2-bytes20-bytes2-uint8-}[`++replace_20_2(self, value, offset)++`]
- * {xref-Packing-extract_20_4-bytes20-uint8-}[`++extract_20_4(self, offset)++`]
- * {xref-Packing-replace_20_4-bytes20-bytes4-uint8-}[`++replace_20_4(self, value, offset)++`]
- * {xref-Packing-extract_20_6-bytes20-uint8-}[`++extract_20_6(self, offset)++`]
- * {xref-Packing-replace_20_6-bytes20-bytes6-uint8-}[`++replace_20_6(self, value, offset)++`]
- * {xref-Packing-extract_20_8-bytes20-uint8-}[`++extract_20_8(self, offset)++`]
- * {xref-Packing-replace_20_8-bytes20-bytes8-uint8-}[`++replace_20_8(self, value, offset)++`]
- * {xref-Packing-extract_20_12-bytes20-uint8-}[`++extract_20_12(self, offset)++`]
- * {xref-Packing-replace_20_12-bytes20-bytes12-uint8-}[`++replace_20_12(self, value, offset)++`]
- * {xref-Packing-extract_20_16-bytes20-uint8-}[`++extract_20_16(self, offset)++`]
- * {xref-Packing-replace_20_16-bytes20-bytes16-uint8-}[`++replace_20_16(self, value, offset)++`]
- * {xref-Packing-extract_24_1-bytes24-uint8-}[`++extract_24_1(self, offset)++`]
- * {xref-Packing-replace_24_1-bytes24-bytes1-uint8-}[`++replace_24_1(self, value, offset)++`]
- * {xref-Packing-extract_24_2-bytes24-uint8-}[`++extract_24_2(self, offset)++`]
- * {xref-Packing-replace_24_2-bytes24-bytes2-uint8-}[`++replace_24_2(self, value, offset)++`]
- * {xref-Packing-extract_24_4-bytes24-uint8-}[`++extract_24_4(self, offset)++`]
- * {xref-Packing-replace_24_4-bytes24-bytes4-uint8-}[`++replace_24_4(self, value, offset)++`]
- * {xref-Packing-extract_24_6-bytes24-uint8-}[`++extract_24_6(self, offset)++`]
- * {xref-Packing-replace_24_6-bytes24-bytes6-uint8-}[`++replace_24_6(self, value, offset)++`]
- * {xref-Packing-extract_24_8-bytes24-uint8-}[`++extract_24_8(self, offset)++`]
- * {xref-Packing-replace_24_8-bytes24-bytes8-uint8-}[`++replace_24_8(self, value, offset)++`]
- * {xref-Packing-extract_24_12-bytes24-uint8-}[`++extract_24_12(self, offset)++`]
- * {xref-Packing-replace_24_12-bytes24-bytes12-uint8-}[`++replace_24_12(self, value, offset)++`]
- * {xref-Packing-extract_24_16-bytes24-uint8-}[`++extract_24_16(self, offset)++`]
- * {xref-Packing-replace_24_16-bytes24-bytes16-uint8-}[`++replace_24_16(self, value, offset)++`]
- * {xref-Packing-extract_24_20-bytes24-uint8-}[`++extract_24_20(self, offset)++`]
- * {xref-Packing-replace_24_20-bytes24-bytes20-uint8-}[`++replace_24_20(self, value, offset)++`]
- * {xref-Packing-extract_28_1-bytes28-uint8-}[`++extract_28_1(self, offset)++`]
- * {xref-Packing-replace_28_1-bytes28-bytes1-uint8-}[`++replace_28_1(self, value, offset)++`]
- * {xref-Packing-extract_28_2-bytes28-uint8-}[`++extract_28_2(self, offset)++`]
- * {xref-Packing-replace_28_2-bytes28-bytes2-uint8-}[`++replace_28_2(self, value, offset)++`]
- * {xref-Packing-extract_28_4-bytes28-uint8-}[`++extract_28_4(self, offset)++`]
- * {xref-Packing-replace_28_4-bytes28-bytes4-uint8-}[`++replace_28_4(self, value, offset)++`]
- * {xref-Packing-extract_28_6-bytes28-uint8-}[`++extract_28_6(self, offset)++`]
- * {xref-Packing-replace_28_6-bytes28-bytes6-uint8-}[`++replace_28_6(self, value, offset)++`]
- * {xref-Packing-extract_28_8-bytes28-uint8-}[`++extract_28_8(self, offset)++`]
- * {xref-Packing-replace_28_8-bytes28-bytes8-uint8-}[`++replace_28_8(self, value, offset)++`]
- * {xref-Packing-extract_28_12-bytes28-uint8-}[`++extract_28_12(self, offset)++`]
- * {xref-Packing-replace_28_12-bytes28-bytes12-uint8-}[`++replace_28_12(self, value, offset)++`]
- * {xref-Packing-extract_28_16-bytes28-uint8-}[`++extract_28_16(self, offset)++`]
- * {xref-Packing-replace_28_16-bytes28-bytes16-uint8-}[`++replace_28_16(self, value, offset)++`]
- * {xref-Packing-extract_28_20-bytes28-uint8-}[`++extract_28_20(self, offset)++`]
- * {xref-Packing-replace_28_20-bytes28-bytes20-uint8-}[`++replace_28_20(self, value, offset)++`]
- * {xref-Packing-extract_28_24-bytes28-uint8-}[`++extract_28_24(self, offset)++`]
- * {xref-Packing-replace_28_24-bytes28-bytes24-uint8-}[`++replace_28_24(self, value, offset)++`]
- * {xref-Packing-extract_32_1-bytes32-uint8-}[`++extract_32_1(self, offset)++`]
- * {xref-Packing-replace_32_1-bytes32-bytes1-uint8-}[`++replace_32_1(self, value, offset)++`]
- * {xref-Packing-extract_32_2-bytes32-uint8-}[`++extract_32_2(self, offset)++`]
- * {xref-Packing-replace_32_2-bytes32-bytes2-uint8-}[`++replace_32_2(self, value, offset)++`]
- * {xref-Packing-extract_32_4-bytes32-uint8-}[`++extract_32_4(self, offset)++`]
- * {xref-Packing-replace_32_4-bytes32-bytes4-uint8-}[`++replace_32_4(self, value, offset)++`]
- * {xref-Packing-extract_32_6-bytes32-uint8-}[`++extract_32_6(self, offset)++`]
- * {xref-Packing-replace_32_6-bytes32-bytes6-uint8-}[`++replace_32_6(self, value, offset)++`]
- * {xref-Packing-extract_32_8-bytes32-uint8-}[`++extract_32_8(self, offset)++`]
- * {xref-Packing-replace_32_8-bytes32-bytes8-uint8-}[`++replace_32_8(self, value, offset)++`]
- * {xref-Packing-extract_32_12-bytes32-uint8-}[`++extract_32_12(self, offset)++`]
- * {xref-Packing-replace_32_12-bytes32-bytes12-uint8-}[`++replace_32_12(self, value, offset)++`]
- * {xref-Packing-extract_32_16-bytes32-uint8-}[`++extract_32_16(self, offset)++`]
- * {xref-Packing-replace_32_16-bytes32-bytes16-uint8-}[`++replace_32_16(self, value, offset)++`]
- * {xref-Packing-extract_32_20-bytes32-uint8-}[`++extract_32_20(self, offset)++`]
- * {xref-Packing-replace_32_20-bytes32-bytes20-uint8-}[`++replace_32_20(self, value, offset)++`]
- * {xref-Packing-extract_32_24-bytes32-uint8-}[`++extract_32_24(self, offset)++`]
- * {xref-Packing-replace_32_24-bytes32-bytes24-uint8-}[`++replace_32_24(self, value, offset)++`]
- * {xref-Packing-extract_32_28-bytes32-uint8-}[`++extract_32_28(self, offset)++`]
- * {xref-Packing-replace_32_28-bytes32-bytes28-uint8-}[`++replace_32_28(self, value, offset)++`]
- --
- [.contract-index]
- .Errors
- --
- * {xref-Packing-OutOfRangeAccess--}[`++OutOfRangeAccess()++`]
- --
- [.contract-item]
- [[Packing-pack_1_1-bytes1-bytes1-]]
- ==== `[.contract-item-name]#++pack_1_1++#++(bytes1 left, bytes1 right) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_2_2-bytes2-bytes2-]]
- ==== `[.contract-item-name]#++pack_2_2++#++(bytes2 left, bytes2 right) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_2_4-bytes2-bytes4-]]
- ==== `[.contract-item-name]#++pack_2_4++#++(bytes2 left, bytes4 right) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_2_6-bytes2-bytes6-]]
- ==== `[.contract-item-name]#++pack_2_6++#++(bytes2 left, bytes6 right) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_4_2-bytes4-bytes2-]]
- ==== `[.contract-item-name]#++pack_4_2++#++(bytes4 left, bytes2 right) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_4_4-bytes4-bytes4-]]
- ==== `[.contract-item-name]#++pack_4_4++#++(bytes4 left, bytes4 right) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_4_8-bytes4-bytes8-]]
- ==== `[.contract-item-name]#++pack_4_8++#++(bytes4 left, bytes8 right) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_4_12-bytes4-bytes12-]]
- ==== `[.contract-item-name]#++pack_4_12++#++(bytes4 left, bytes12 right) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_4_16-bytes4-bytes16-]]
- ==== `[.contract-item-name]#++pack_4_16++#++(bytes4 left, bytes16 right) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_4_20-bytes4-bytes20-]]
- ==== `[.contract-item-name]#++pack_4_20++#++(bytes4 left, bytes20 right) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_4_24-bytes4-bytes24-]]
- ==== `[.contract-item-name]#++pack_4_24++#++(bytes4 left, bytes24 right) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_4_28-bytes4-bytes28-]]
- ==== `[.contract-item-name]#++pack_4_28++#++(bytes4 left, bytes28 right) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_6_2-bytes6-bytes2-]]
- ==== `[.contract-item-name]#++pack_6_2++#++(bytes6 left, bytes2 right) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_6_6-bytes6-bytes6-]]
- ==== `[.contract-item-name]#++pack_6_6++#++(bytes6 left, bytes6 right) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_8_4-bytes8-bytes4-]]
- ==== `[.contract-item-name]#++pack_8_4++#++(bytes8 left, bytes4 right) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_8_8-bytes8-bytes8-]]
- ==== `[.contract-item-name]#++pack_8_8++#++(bytes8 left, bytes8 right) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_8_12-bytes8-bytes12-]]
- ==== `[.contract-item-name]#++pack_8_12++#++(bytes8 left, bytes12 right) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_8_16-bytes8-bytes16-]]
- ==== `[.contract-item-name]#++pack_8_16++#++(bytes8 left, bytes16 right) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_8_20-bytes8-bytes20-]]
- ==== `[.contract-item-name]#++pack_8_20++#++(bytes8 left, bytes20 right) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_8_24-bytes8-bytes24-]]
- ==== `[.contract-item-name]#++pack_8_24++#++(bytes8 left, bytes24 right) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_12_4-bytes12-bytes4-]]
- ==== `[.contract-item-name]#++pack_12_4++#++(bytes12 left, bytes4 right) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_12_8-bytes12-bytes8-]]
- ==== `[.contract-item-name]#++pack_12_8++#++(bytes12 left, bytes8 right) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_12_12-bytes12-bytes12-]]
- ==== `[.contract-item-name]#++pack_12_12++#++(bytes12 left, bytes12 right) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_12_16-bytes12-bytes16-]]
- ==== `[.contract-item-name]#++pack_12_16++#++(bytes12 left, bytes16 right) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_12_20-bytes12-bytes20-]]
- ==== `[.contract-item-name]#++pack_12_20++#++(bytes12 left, bytes20 right) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_16_4-bytes16-bytes4-]]
- ==== `[.contract-item-name]#++pack_16_4++#++(bytes16 left, bytes4 right) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_16_8-bytes16-bytes8-]]
- ==== `[.contract-item-name]#++pack_16_8++#++(bytes16 left, bytes8 right) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_16_12-bytes16-bytes12-]]
- ==== `[.contract-item-name]#++pack_16_12++#++(bytes16 left, bytes12 right) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_16_16-bytes16-bytes16-]]
- ==== `[.contract-item-name]#++pack_16_16++#++(bytes16 left, bytes16 right) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_20_4-bytes20-bytes4-]]
- ==== `[.contract-item-name]#++pack_20_4++#++(bytes20 left, bytes4 right) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_20_8-bytes20-bytes8-]]
- ==== `[.contract-item-name]#++pack_20_8++#++(bytes20 left, bytes8 right) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_20_12-bytes20-bytes12-]]
- ==== `[.contract-item-name]#++pack_20_12++#++(bytes20 left, bytes12 right) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_24_4-bytes24-bytes4-]]
- ==== `[.contract-item-name]#++pack_24_4++#++(bytes24 left, bytes4 right) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_24_8-bytes24-bytes8-]]
- ==== `[.contract-item-name]#++pack_24_8++#++(bytes24 left, bytes8 right) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-pack_28_4-bytes28-bytes4-]]
- ==== `[.contract-item-name]#++pack_28_4++#++(bytes28 left, bytes4 right) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_2_1-bytes2-uint8-]]
- ==== `[.contract-item-name]#++extract_2_1++#++(bytes2 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_2_1-bytes2-bytes1-uint8-]]
- ==== `[.contract-item-name]#++replace_2_1++#++(bytes2 self, bytes1 value, uint8 offset) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_4_1-bytes4-uint8-]]
- ==== `[.contract-item-name]#++extract_4_1++#++(bytes4 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_4_1-bytes4-bytes1-uint8-]]
- ==== `[.contract-item-name]#++replace_4_1++#++(bytes4 self, bytes1 value, uint8 offset) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_4_2-bytes4-uint8-]]
- ==== `[.contract-item-name]#++extract_4_2++#++(bytes4 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_4_2-bytes4-bytes2-uint8-]]
- ==== `[.contract-item-name]#++replace_4_2++#++(bytes4 self, bytes2 value, uint8 offset) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_6_1-bytes6-uint8-]]
- ==== `[.contract-item-name]#++extract_6_1++#++(bytes6 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_6_1-bytes6-bytes1-uint8-]]
- ==== `[.contract-item-name]#++replace_6_1++#++(bytes6 self, bytes1 value, uint8 offset) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_6_2-bytes6-uint8-]]
- ==== `[.contract-item-name]#++extract_6_2++#++(bytes6 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_6_2-bytes6-bytes2-uint8-]]
- ==== `[.contract-item-name]#++replace_6_2++#++(bytes6 self, bytes2 value, uint8 offset) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_6_4-bytes6-uint8-]]
- ==== `[.contract-item-name]#++extract_6_4++#++(bytes6 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_6_4-bytes6-bytes4-uint8-]]
- ==== `[.contract-item-name]#++replace_6_4++#++(bytes6 self, bytes4 value, uint8 offset) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_8_1-bytes8-uint8-]]
- ==== `[.contract-item-name]#++extract_8_1++#++(bytes8 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_8_1-bytes8-bytes1-uint8-]]
- ==== `[.contract-item-name]#++replace_8_1++#++(bytes8 self, bytes1 value, uint8 offset) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_8_2-bytes8-uint8-]]
- ==== `[.contract-item-name]#++extract_8_2++#++(bytes8 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_8_2-bytes8-bytes2-uint8-]]
- ==== `[.contract-item-name]#++replace_8_2++#++(bytes8 self, bytes2 value, uint8 offset) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_8_4-bytes8-uint8-]]
- ==== `[.contract-item-name]#++extract_8_4++#++(bytes8 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_8_4-bytes8-bytes4-uint8-]]
- ==== `[.contract-item-name]#++replace_8_4++#++(bytes8 self, bytes4 value, uint8 offset) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_8_6-bytes8-uint8-]]
- ==== `[.contract-item-name]#++extract_8_6++#++(bytes8 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_8_6-bytes8-bytes6-uint8-]]
- ==== `[.contract-item-name]#++replace_8_6++#++(bytes8 self, bytes6 value, uint8 offset) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_12_1-bytes12-uint8-]]
- ==== `[.contract-item-name]#++extract_12_1++#++(bytes12 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_12_1-bytes12-bytes1-uint8-]]
- ==== `[.contract-item-name]#++replace_12_1++#++(bytes12 self, bytes1 value, uint8 offset) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_12_2-bytes12-uint8-]]
- ==== `[.contract-item-name]#++extract_12_2++#++(bytes12 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_12_2-bytes12-bytes2-uint8-]]
- ==== `[.contract-item-name]#++replace_12_2++#++(bytes12 self, bytes2 value, uint8 offset) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_12_4-bytes12-uint8-]]
- ==== `[.contract-item-name]#++extract_12_4++#++(bytes12 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_12_4-bytes12-bytes4-uint8-]]
- ==== `[.contract-item-name]#++replace_12_4++#++(bytes12 self, bytes4 value, uint8 offset) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_12_6-bytes12-uint8-]]
- ==== `[.contract-item-name]#++extract_12_6++#++(bytes12 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_12_6-bytes12-bytes6-uint8-]]
- ==== `[.contract-item-name]#++replace_12_6++#++(bytes12 self, bytes6 value, uint8 offset) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_12_8-bytes12-uint8-]]
- ==== `[.contract-item-name]#++extract_12_8++#++(bytes12 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_12_8-bytes12-bytes8-uint8-]]
- ==== `[.contract-item-name]#++replace_12_8++#++(bytes12 self, bytes8 value, uint8 offset) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_16_1-bytes16-uint8-]]
- ==== `[.contract-item-name]#++extract_16_1++#++(bytes16 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_16_1-bytes16-bytes1-uint8-]]
- ==== `[.contract-item-name]#++replace_16_1++#++(bytes16 self, bytes1 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_16_2-bytes16-uint8-]]
- ==== `[.contract-item-name]#++extract_16_2++#++(bytes16 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_16_2-bytes16-bytes2-uint8-]]
- ==== `[.contract-item-name]#++replace_16_2++#++(bytes16 self, bytes2 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_16_4-bytes16-uint8-]]
- ==== `[.contract-item-name]#++extract_16_4++#++(bytes16 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_16_4-bytes16-bytes4-uint8-]]
- ==== `[.contract-item-name]#++replace_16_4++#++(bytes16 self, bytes4 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_16_6-bytes16-uint8-]]
- ==== `[.contract-item-name]#++extract_16_6++#++(bytes16 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_16_6-bytes16-bytes6-uint8-]]
- ==== `[.contract-item-name]#++replace_16_6++#++(bytes16 self, bytes6 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_16_8-bytes16-uint8-]]
- ==== `[.contract-item-name]#++extract_16_8++#++(bytes16 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_16_8-bytes16-bytes8-uint8-]]
- ==== `[.contract-item-name]#++replace_16_8++#++(bytes16 self, bytes8 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_16_12-bytes16-uint8-]]
- ==== `[.contract-item-name]#++extract_16_12++#++(bytes16 self, uint8 offset) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_16_12-bytes16-bytes12-uint8-]]
- ==== `[.contract-item-name]#++replace_16_12++#++(bytes16 self, bytes12 value, uint8 offset) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_20_1-bytes20-uint8-]]
- ==== `[.contract-item-name]#++extract_20_1++#++(bytes20 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_20_1-bytes20-bytes1-uint8-]]
- ==== `[.contract-item-name]#++replace_20_1++#++(bytes20 self, bytes1 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_20_2-bytes20-uint8-]]
- ==== `[.contract-item-name]#++extract_20_2++#++(bytes20 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_20_2-bytes20-bytes2-uint8-]]
- ==== `[.contract-item-name]#++replace_20_2++#++(bytes20 self, bytes2 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_20_4-bytes20-uint8-]]
- ==== `[.contract-item-name]#++extract_20_4++#++(bytes20 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_20_4-bytes20-bytes4-uint8-]]
- ==== `[.contract-item-name]#++replace_20_4++#++(bytes20 self, bytes4 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_20_6-bytes20-uint8-]]
- ==== `[.contract-item-name]#++extract_20_6++#++(bytes20 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_20_6-bytes20-bytes6-uint8-]]
- ==== `[.contract-item-name]#++replace_20_6++#++(bytes20 self, bytes6 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_20_8-bytes20-uint8-]]
- ==== `[.contract-item-name]#++extract_20_8++#++(bytes20 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_20_8-bytes20-bytes8-uint8-]]
- ==== `[.contract-item-name]#++replace_20_8++#++(bytes20 self, bytes8 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_20_12-bytes20-uint8-]]
- ==== `[.contract-item-name]#++extract_20_12++#++(bytes20 self, uint8 offset) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_20_12-bytes20-bytes12-uint8-]]
- ==== `[.contract-item-name]#++replace_20_12++#++(bytes20 self, bytes12 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_20_16-bytes20-uint8-]]
- ==== `[.contract-item-name]#++extract_20_16++#++(bytes20 self, uint8 offset) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_20_16-bytes20-bytes16-uint8-]]
- ==== `[.contract-item-name]#++replace_20_16++#++(bytes20 self, bytes16 value, uint8 offset) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_24_1-bytes24-uint8-]]
- ==== `[.contract-item-name]#++extract_24_1++#++(bytes24 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_24_1-bytes24-bytes1-uint8-]]
- ==== `[.contract-item-name]#++replace_24_1++#++(bytes24 self, bytes1 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_24_2-bytes24-uint8-]]
- ==== `[.contract-item-name]#++extract_24_2++#++(bytes24 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_24_2-bytes24-bytes2-uint8-]]
- ==== `[.contract-item-name]#++replace_24_2++#++(bytes24 self, bytes2 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_24_4-bytes24-uint8-]]
- ==== `[.contract-item-name]#++extract_24_4++#++(bytes24 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_24_4-bytes24-bytes4-uint8-]]
- ==== `[.contract-item-name]#++replace_24_4++#++(bytes24 self, bytes4 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_24_6-bytes24-uint8-]]
- ==== `[.contract-item-name]#++extract_24_6++#++(bytes24 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_24_6-bytes24-bytes6-uint8-]]
- ==== `[.contract-item-name]#++replace_24_6++#++(bytes24 self, bytes6 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_24_8-bytes24-uint8-]]
- ==== `[.contract-item-name]#++extract_24_8++#++(bytes24 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_24_8-bytes24-bytes8-uint8-]]
- ==== `[.contract-item-name]#++replace_24_8++#++(bytes24 self, bytes8 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_24_12-bytes24-uint8-]]
- ==== `[.contract-item-name]#++extract_24_12++#++(bytes24 self, uint8 offset) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_24_12-bytes24-bytes12-uint8-]]
- ==== `[.contract-item-name]#++replace_24_12++#++(bytes24 self, bytes12 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_24_16-bytes24-uint8-]]
- ==== `[.contract-item-name]#++extract_24_16++#++(bytes24 self, uint8 offset) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_24_16-bytes24-bytes16-uint8-]]
- ==== `[.contract-item-name]#++replace_24_16++#++(bytes24 self, bytes16 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_24_20-bytes24-uint8-]]
- ==== `[.contract-item-name]#++extract_24_20++#++(bytes24 self, uint8 offset) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_24_20-bytes24-bytes20-uint8-]]
- ==== `[.contract-item-name]#++replace_24_20++#++(bytes24 self, bytes20 value, uint8 offset) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_28_1-bytes28-uint8-]]
- ==== `[.contract-item-name]#++extract_28_1++#++(bytes28 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_28_1-bytes28-bytes1-uint8-]]
- ==== `[.contract-item-name]#++replace_28_1++#++(bytes28 self, bytes1 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_28_2-bytes28-uint8-]]
- ==== `[.contract-item-name]#++extract_28_2++#++(bytes28 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_28_2-bytes28-bytes2-uint8-]]
- ==== `[.contract-item-name]#++replace_28_2++#++(bytes28 self, bytes2 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_28_4-bytes28-uint8-]]
- ==== `[.contract-item-name]#++extract_28_4++#++(bytes28 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_28_4-bytes28-bytes4-uint8-]]
- ==== `[.contract-item-name]#++replace_28_4++#++(bytes28 self, bytes4 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_28_6-bytes28-uint8-]]
- ==== `[.contract-item-name]#++extract_28_6++#++(bytes28 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_28_6-bytes28-bytes6-uint8-]]
- ==== `[.contract-item-name]#++replace_28_6++#++(bytes28 self, bytes6 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_28_8-bytes28-uint8-]]
- ==== `[.contract-item-name]#++extract_28_8++#++(bytes28 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_28_8-bytes28-bytes8-uint8-]]
- ==== `[.contract-item-name]#++replace_28_8++#++(bytes28 self, bytes8 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_28_12-bytes28-uint8-]]
- ==== `[.contract-item-name]#++extract_28_12++#++(bytes28 self, uint8 offset) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_28_12-bytes28-bytes12-uint8-]]
- ==== `[.contract-item-name]#++replace_28_12++#++(bytes28 self, bytes12 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_28_16-bytes28-uint8-]]
- ==== `[.contract-item-name]#++extract_28_16++#++(bytes28 self, uint8 offset) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_28_16-bytes28-bytes16-uint8-]]
- ==== `[.contract-item-name]#++replace_28_16++#++(bytes28 self, bytes16 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_28_20-bytes28-uint8-]]
- ==== `[.contract-item-name]#++extract_28_20++#++(bytes28 self, uint8 offset) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_28_20-bytes28-bytes20-uint8-]]
- ==== `[.contract-item-name]#++replace_28_20++#++(bytes28 self, bytes20 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_28_24-bytes28-uint8-]]
- ==== `[.contract-item-name]#++extract_28_24++#++(bytes28 self, uint8 offset) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_28_24-bytes28-bytes24-uint8-]]
- ==== `[.contract-item-name]#++replace_28_24++#++(bytes28 self, bytes24 value, uint8 offset) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_32_1-bytes32-uint8-]]
- ==== `[.contract-item-name]#++extract_32_1++#++(bytes32 self, uint8 offset) → bytes1 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_32_1-bytes32-bytes1-uint8-]]
- ==== `[.contract-item-name]#++replace_32_1++#++(bytes32 self, bytes1 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_32_2-bytes32-uint8-]]
- ==== `[.contract-item-name]#++extract_32_2++#++(bytes32 self, uint8 offset) → bytes2 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_32_2-bytes32-bytes2-uint8-]]
- ==== `[.contract-item-name]#++replace_32_2++#++(bytes32 self, bytes2 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_32_4-bytes32-uint8-]]
- ==== `[.contract-item-name]#++extract_32_4++#++(bytes32 self, uint8 offset) → bytes4 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_32_4-bytes32-bytes4-uint8-]]
- ==== `[.contract-item-name]#++replace_32_4++#++(bytes32 self, bytes4 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_32_6-bytes32-uint8-]]
- ==== `[.contract-item-name]#++extract_32_6++#++(bytes32 self, uint8 offset) → bytes6 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_32_6-bytes32-bytes6-uint8-]]
- ==== `[.contract-item-name]#++replace_32_6++#++(bytes32 self, bytes6 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_32_8-bytes32-uint8-]]
- ==== `[.contract-item-name]#++extract_32_8++#++(bytes32 self, uint8 offset) → bytes8 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_32_8-bytes32-bytes8-uint8-]]
- ==== `[.contract-item-name]#++replace_32_8++#++(bytes32 self, bytes8 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_32_12-bytes32-uint8-]]
- ==== `[.contract-item-name]#++extract_32_12++#++(bytes32 self, uint8 offset) → bytes12 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_32_12-bytes32-bytes12-uint8-]]
- ==== `[.contract-item-name]#++replace_32_12++#++(bytes32 self, bytes12 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_32_16-bytes32-uint8-]]
- ==== `[.contract-item-name]#++extract_32_16++#++(bytes32 self, uint8 offset) → bytes16 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_32_16-bytes32-bytes16-uint8-]]
- ==== `[.contract-item-name]#++replace_32_16++#++(bytes32 self, bytes16 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_32_20-bytes32-uint8-]]
- ==== `[.contract-item-name]#++extract_32_20++#++(bytes32 self, uint8 offset) → bytes20 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_32_20-bytes32-bytes20-uint8-]]
- ==== `[.contract-item-name]#++replace_32_20++#++(bytes32 self, bytes20 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_32_24-bytes32-uint8-]]
- ==== `[.contract-item-name]#++extract_32_24++#++(bytes32 self, uint8 offset) → bytes24 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_32_24-bytes32-bytes24-uint8-]]
- ==== `[.contract-item-name]#++replace_32_24++#++(bytes32 self, bytes24 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-extract_32_28-bytes32-uint8-]]
- ==== `[.contract-item-name]#++extract_32_28++#++(bytes32 self, uint8 offset) → bytes28 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-replace_32_28-bytes32-bytes28-uint8-]]
- ==== `[.contract-item-name]#++replace_32_28++#++(bytes32 self, bytes28 value, uint8 offset) → bytes32 result++` [.item-kind]#internal#
- [.contract-item]
- [[Packing-OutOfRangeAccess--]]
- ==== `[.contract-item-name]#++OutOfRangeAccess++#++()++` [.item-kind]#error#
- :GENERIC: pass:normal[xref:#Panic-GENERIC-uint256[`++GENERIC++`]]
- :ASSERT: pass:normal[xref:#Panic-ASSERT-uint256[`++ASSERT++`]]
- :UNDER_OVERFLOW: pass:normal[xref:#Panic-UNDER_OVERFLOW-uint256[`++UNDER_OVERFLOW++`]]
- :DIVISION_BY_ZERO: pass:normal[xref:#Panic-DIVISION_BY_ZERO-uint256[`++DIVISION_BY_ZERO++`]]
- :ENUM_CONVERSION_ERROR: pass:normal[xref:#Panic-ENUM_CONVERSION_ERROR-uint256[`++ENUM_CONVERSION_ERROR++`]]
- :STORAGE_ENCODING_ERROR: pass:normal[xref:#Panic-STORAGE_ENCODING_ERROR-uint256[`++STORAGE_ENCODING_ERROR++`]]
- :EMPTY_ARRAY_POP: pass:normal[xref:#Panic-EMPTY_ARRAY_POP-uint256[`++EMPTY_ARRAY_POP++`]]
- :ARRAY_OUT_OF_BOUNDS: pass:normal[xref:#Panic-ARRAY_OUT_OF_BOUNDS-uint256[`++ARRAY_OUT_OF_BOUNDS++`]]
- :RESOURCE_ERROR: pass:normal[xref:#Panic-RESOURCE_ERROR-uint256[`++RESOURCE_ERROR++`]]
- :INVALID_INTERNAL_FUNCTION: pass:normal[xref:#Panic-INVALID_INTERNAL_FUNCTION-uint256[`++INVALID_INTERNAL_FUNCTION++`]]
- :panic: pass:normal[xref:#Panic-panic-uint256-[`++panic++`]]
- [.contract]
- [[Panic]]
- === `++Panic++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Panic.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Panic.sol";
- ```
- Helper library for emitting standardized panic codes.
- ```solidity
- contract Example {
- using Panic for uint256;
- // Use any of the declared internal constants
- function foo() { Panic.GENERIC.panic(); }
- // Alternatively
- function foo() { Panic.panic(Panic.GENERIC); }
- }
- ```
- Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
- _Available since v5.1._
- [.contract-index]
- .Functions
- --
- * {xref-Panic-panic-uint256-}[`++panic(code)++`]
- --
- [.contract-index]
- .Internal Variables
- --
- * {xref-Panic-GENERIC-uint256}[`++uint256 constant GENERIC++`]
- * {xref-Panic-ASSERT-uint256}[`++uint256 constant ASSERT++`]
- * {xref-Panic-UNDER_OVERFLOW-uint256}[`++uint256 constant UNDER_OVERFLOW++`]
- * {xref-Panic-DIVISION_BY_ZERO-uint256}[`++uint256 constant DIVISION_BY_ZERO++`]
- * {xref-Panic-ENUM_CONVERSION_ERROR-uint256}[`++uint256 constant ENUM_CONVERSION_ERROR++`]
- * {xref-Panic-STORAGE_ENCODING_ERROR-uint256}[`++uint256 constant STORAGE_ENCODING_ERROR++`]
- * {xref-Panic-EMPTY_ARRAY_POP-uint256}[`++uint256 constant EMPTY_ARRAY_POP++`]
- * {xref-Panic-ARRAY_OUT_OF_BOUNDS-uint256}[`++uint256 constant ARRAY_OUT_OF_BOUNDS++`]
- * {xref-Panic-RESOURCE_ERROR-uint256}[`++uint256 constant RESOURCE_ERROR++`]
- * {xref-Panic-INVALID_INTERNAL_FUNCTION-uint256}[`++uint256 constant INVALID_INTERNAL_FUNCTION++`]
- --
- [.contract-item]
- [[Panic-panic-uint256-]]
- ==== `[.contract-item-name]#++panic++#++(uint256 code)++` [.item-kind]#internal#
- Reverts with a panic code. Recommended to use with
- the internal constants with predefined codes.
- [.contract-item]
- [[Panic-GENERIC-uint256]]
- ==== `uint256 [.contract-item-name]#++GENERIC++#` [.item-kind]#internal constant#
- generic / unspecified error
- [.contract-item]
- [[Panic-ASSERT-uint256]]
- ==== `uint256 [.contract-item-name]#++ASSERT++#` [.item-kind]#internal constant#
- used by the assert() builtin
- [.contract-item]
- [[Panic-UNDER_OVERFLOW-uint256]]
- ==== `uint256 [.contract-item-name]#++UNDER_OVERFLOW++#` [.item-kind]#internal constant#
- arithmetic underflow or overflow
- [.contract-item]
- [[Panic-DIVISION_BY_ZERO-uint256]]
- ==== `uint256 [.contract-item-name]#++DIVISION_BY_ZERO++#` [.item-kind]#internal constant#
- division or modulo by zero
- [.contract-item]
- [[Panic-ENUM_CONVERSION_ERROR-uint256]]
- ==== `uint256 [.contract-item-name]#++ENUM_CONVERSION_ERROR++#` [.item-kind]#internal constant#
- enum conversion error
- [.contract-item]
- [[Panic-STORAGE_ENCODING_ERROR-uint256]]
- ==== `uint256 [.contract-item-name]#++STORAGE_ENCODING_ERROR++#` [.item-kind]#internal constant#
- invalid encoding in storage
- [.contract-item]
- [[Panic-EMPTY_ARRAY_POP-uint256]]
- ==== `uint256 [.contract-item-name]#++EMPTY_ARRAY_POP++#` [.item-kind]#internal constant#
- empty array pop
- [.contract-item]
- [[Panic-ARRAY_OUT_OF_BOUNDS-uint256]]
- ==== `uint256 [.contract-item-name]#++ARRAY_OUT_OF_BOUNDS++#` [.item-kind]#internal constant#
- array out of bounds access
- [.contract-item]
- [[Panic-RESOURCE_ERROR-uint256]]
- ==== `uint256 [.contract-item-name]#++RESOURCE_ERROR++#` [.item-kind]#internal constant#
- resource error (too large allocation or too large array)
- [.contract-item]
- [[Panic-INVALID_INTERNAL_FUNCTION-uint256]]
- ==== `uint256 [.contract-item-name]#++INVALID_INTERNAL_FUNCTION++#` [.item-kind]#internal constant#
- calling invalid internal function
- :lt: pass:normal[xref:#Comparators-lt-uint256-uint256-[`++lt++`]]
- :gt: pass:normal[xref:#Comparators-gt-uint256-uint256-[`++gt++`]]
- [.contract]
- [[Comparators]]
- === `++Comparators++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.1.0/contracts/utils/Comparators.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/utils/Comparators.sol";
- ```
- Provides a set of functions to compare values.
- _Available since v5.1._
- [.contract-index]
- .Functions
- --
- * {xref-Comparators-lt-uint256-uint256-}[`++lt(a, b)++`]
- * {xref-Comparators-gt-uint256-uint256-}[`++gt(a, b)++`]
- --
- [.contract-item]
- [[Comparators-lt-uint256-uint256-]]
- ==== `[.contract-item-name]#++lt++#++(uint256 a, uint256 b) → bool++` [.item-kind]#internal#
- [.contract-item]
- [[Comparators-gt-uint256-uint256-]]
- ==== `[.contract-item-name]#++gt++#++(uint256 a, uint256 b) → bool++` [.item-kind]#internal#
|