access.adoc 177 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383
  1. :github-icon: pass:[<svg class="icon"><use href="#github-icon"/></svg>]
  2. :AccessControl: pass:normal[xref:access.adoc#AccessControl[`AccessControl`]]
  3. :Ownable: pass:normal[xref:access.adoc#Ownable[`Ownable`]]
  4. :xref-Ownable-onlyOwner--: xref:access.adoc#Ownable-onlyOwner--
  5. :xref-Ownable-constructor-address-: xref:access.adoc#Ownable-constructor-address-
  6. :xref-Ownable-owner--: xref:access.adoc#Ownable-owner--
  7. :xref-Ownable-_checkOwner--: xref:access.adoc#Ownable-_checkOwner--
  8. :xref-Ownable-renounceOwnership--: xref:access.adoc#Ownable-renounceOwnership--
  9. :xref-Ownable-transferOwnership-address-: xref:access.adoc#Ownable-transferOwnership-address-
  10. :xref-Ownable-_transferOwnership-address-: xref:access.adoc#Ownable-_transferOwnership-address-
  11. :xref-Ownable-OwnershipTransferred-address-address-: xref:access.adoc#Ownable-OwnershipTransferred-address-address-
  12. :xref-Ownable-OwnableUnauthorizedAccount-address-: xref:access.adoc#Ownable-OwnableUnauthorizedAccount-address-
  13. :xref-Ownable-OwnableInvalidOwner-address-: xref:access.adoc#Ownable-OwnableInvalidOwner-address-
  14. :xref-Ownable2Step-pendingOwner--: xref:access.adoc#Ownable2Step-pendingOwner--
  15. :xref-Ownable2Step-transferOwnership-address-: xref:access.adoc#Ownable2Step-transferOwnership-address-
  16. :xref-Ownable2Step-_transferOwnership-address-: xref:access.adoc#Ownable2Step-_transferOwnership-address-
  17. :xref-Ownable2Step-acceptOwnership--: xref:access.adoc#Ownable2Step-acceptOwnership--
  18. :xref-Ownable-owner--: xref:access.adoc#Ownable-owner--
  19. :xref-Ownable-_checkOwner--: xref:access.adoc#Ownable-_checkOwner--
  20. :xref-Ownable-renounceOwnership--: xref:access.adoc#Ownable-renounceOwnership--
  21. :xref-Ownable2Step-OwnershipTransferStarted-address-address-: xref:access.adoc#Ownable2Step-OwnershipTransferStarted-address-address-
  22. :xref-Ownable-OwnershipTransferred-address-address-: xref:access.adoc#Ownable-OwnershipTransferred-address-address-
  23. :xref-Ownable-OwnableUnauthorizedAccount-address-: xref:access.adoc#Ownable-OwnableUnauthorizedAccount-address-
  24. :xref-Ownable-OwnableInvalidOwner-address-: xref:access.adoc#Ownable-OwnableInvalidOwner-address-
  25. :xref-IAccessControl-hasRole-bytes32-address-: xref:access.adoc#IAccessControl-hasRole-bytes32-address-
  26. :xref-IAccessControl-getRoleAdmin-bytes32-: xref:access.adoc#IAccessControl-getRoleAdmin-bytes32-
  27. :xref-IAccessControl-grantRole-bytes32-address-: xref:access.adoc#IAccessControl-grantRole-bytes32-address-
  28. :xref-IAccessControl-revokeRole-bytes32-address-: xref:access.adoc#IAccessControl-revokeRole-bytes32-address-
  29. :xref-IAccessControl-renounceRole-bytes32-address-: xref:access.adoc#IAccessControl-renounceRole-bytes32-address-
  30. :xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-: xref:access.adoc#IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-
  31. :xref-IAccessControl-RoleGranted-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleGranted-bytes32-address-address-
  32. :xref-IAccessControl-RoleRevoked-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleRevoked-bytes32-address-address-
  33. :xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-: xref:access.adoc#IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-
  34. :xref-IAccessControl-AccessControlBadConfirmation--: xref:access.adoc#IAccessControl-AccessControlBadConfirmation--
  35. :AccessControl-_setRoleAdmin: pass:normal[xref:access.adoc#AccessControl-_setRoleAdmin-bytes32-bytes32-[`AccessControl._setRoleAdmin`]]
  36. :AccessControlEnumerable: pass:normal[xref:access.adoc#AccessControlEnumerable[`AccessControlEnumerable`]]
  37. :AccessControlDefaultAdminRules: pass:normal[xref:access.adoc#AccessControlDefaultAdminRules[`AccessControlDefaultAdminRules`]]
  38. :xref-AccessControl-onlyRole-bytes32-: xref:access.adoc#AccessControl-onlyRole-bytes32-
  39. :xref-AccessControl-supportsInterface-bytes4-: xref:access.adoc#AccessControl-supportsInterface-bytes4-
  40. :xref-AccessControl-hasRole-bytes32-address-: xref:access.adoc#AccessControl-hasRole-bytes32-address-
  41. :xref-AccessControl-_checkRole-bytes32-: xref:access.adoc#AccessControl-_checkRole-bytes32-
  42. :xref-AccessControl-_checkRole-bytes32-address-: xref:access.adoc#AccessControl-_checkRole-bytes32-address-
  43. :xref-AccessControl-getRoleAdmin-bytes32-: xref:access.adoc#AccessControl-getRoleAdmin-bytes32-
  44. :xref-AccessControl-grantRole-bytes32-address-: xref:access.adoc#AccessControl-grantRole-bytes32-address-
  45. :xref-AccessControl-revokeRole-bytes32-address-: xref:access.adoc#AccessControl-revokeRole-bytes32-address-
  46. :xref-AccessControl-renounceRole-bytes32-address-: xref:access.adoc#AccessControl-renounceRole-bytes32-address-
  47. :xref-AccessControl-_setRoleAdmin-bytes32-bytes32-: xref:access.adoc#AccessControl-_setRoleAdmin-bytes32-bytes32-
  48. :xref-AccessControl-_grantRole-bytes32-address-: xref:access.adoc#AccessControl-_grantRole-bytes32-address-
  49. :xref-AccessControl-_revokeRole-bytes32-address-: xref:access.adoc#AccessControl-_revokeRole-bytes32-address-
  50. :xref-AccessControl-DEFAULT_ADMIN_ROLE-bytes32: xref:access.adoc#AccessControl-DEFAULT_ADMIN_ROLE-bytes32
  51. :xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-: xref:access.adoc#IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-
  52. :xref-IAccessControl-RoleGranted-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleGranted-bytes32-address-address-
  53. :xref-IAccessControl-RoleRevoked-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleRevoked-bytes32-address-address-
  54. :xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-: xref:access.adoc#IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-
  55. :xref-IAccessControl-AccessControlBadConfirmation--: xref:access.adoc#IAccessControl-AccessControlBadConfirmation--
  56. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  57. :xref-IAccessControlEnumerable-getRoleMember-bytes32-uint256-: xref:access.adoc#IAccessControlEnumerable-getRoleMember-bytes32-uint256-
  58. :xref-IAccessControlEnumerable-getRoleMemberCount-bytes32-: xref:access.adoc#IAccessControlEnumerable-getRoleMemberCount-bytes32-
  59. :xref-IAccessControl-hasRole-bytes32-address-: xref:access.adoc#IAccessControl-hasRole-bytes32-address-
  60. :xref-IAccessControl-getRoleAdmin-bytes32-: xref:access.adoc#IAccessControl-getRoleAdmin-bytes32-
  61. :xref-IAccessControl-grantRole-bytes32-address-: xref:access.adoc#IAccessControl-grantRole-bytes32-address-
  62. :xref-IAccessControl-revokeRole-bytes32-address-: xref:access.adoc#IAccessControl-revokeRole-bytes32-address-
  63. :xref-IAccessControl-renounceRole-bytes32-address-: xref:access.adoc#IAccessControl-renounceRole-bytes32-address-
  64. :xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-: xref:access.adoc#IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-
  65. :xref-IAccessControl-RoleGranted-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleGranted-bytes32-address-address-
  66. :xref-IAccessControl-RoleRevoked-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleRevoked-bytes32-address-address-
  67. :xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-: xref:access.adoc#IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-
  68. :xref-IAccessControl-AccessControlBadConfirmation--: xref:access.adoc#IAccessControl-AccessControlBadConfirmation--
  69. :AccessControl: pass:normal[xref:access.adoc#AccessControl[`AccessControl`]]
  70. :xref-AccessControlEnumerable-supportsInterface-bytes4-: xref:access.adoc#AccessControlEnumerable-supportsInterface-bytes4-
  71. :xref-AccessControlEnumerable-getRoleMember-bytes32-uint256-: xref:access.adoc#AccessControlEnumerable-getRoleMember-bytes32-uint256-
  72. :xref-AccessControlEnumerable-getRoleMemberCount-bytes32-: xref:access.adoc#AccessControlEnumerable-getRoleMemberCount-bytes32-
  73. :xref-AccessControlEnumerable-_grantRole-bytes32-address-: xref:access.adoc#AccessControlEnumerable-_grantRole-bytes32-address-
  74. :xref-AccessControlEnumerable-_revokeRole-bytes32-address-: xref:access.adoc#AccessControlEnumerable-_revokeRole-bytes32-address-
  75. :xref-AccessControl-hasRole-bytes32-address-: xref:access.adoc#AccessControl-hasRole-bytes32-address-
  76. :xref-AccessControl-_checkRole-bytes32-: xref:access.adoc#AccessControl-_checkRole-bytes32-
  77. :xref-AccessControl-_checkRole-bytes32-address-: xref:access.adoc#AccessControl-_checkRole-bytes32-address-
  78. :xref-AccessControl-getRoleAdmin-bytes32-: xref:access.adoc#AccessControl-getRoleAdmin-bytes32-
  79. :xref-AccessControl-grantRole-bytes32-address-: xref:access.adoc#AccessControl-grantRole-bytes32-address-
  80. :xref-AccessControl-revokeRole-bytes32-address-: xref:access.adoc#AccessControl-revokeRole-bytes32-address-
  81. :xref-AccessControl-renounceRole-bytes32-address-: xref:access.adoc#AccessControl-renounceRole-bytes32-address-
  82. :xref-AccessControl-_setRoleAdmin-bytes32-bytes32-: xref:access.adoc#AccessControl-_setRoleAdmin-bytes32-bytes32-
  83. :xref-AccessControl-DEFAULT_ADMIN_ROLE-bytes32: xref:access.adoc#AccessControl-DEFAULT_ADMIN_ROLE-bytes32
  84. :xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-: xref:access.adoc#IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-
  85. :xref-IAccessControl-RoleGranted-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleGranted-bytes32-address-address-
  86. :xref-IAccessControl-RoleRevoked-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleRevoked-bytes32-address-address-
  87. :xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-: xref:access.adoc#IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-
  88. :xref-IAccessControl-AccessControlBadConfirmation--: xref:access.adoc#IAccessControl-AccessControlBadConfirmation--
  89. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  90. :AccessControl-_grantRole: pass:normal[xref:access.adoc#AccessControl-_grantRole-bytes32-address-[`AccessControl._grantRole`]]
  91. :AccessControl-_revokeRole: pass:normal[xref:access.adoc#AccessControl-_revokeRole-bytes32-address-[`AccessControl._revokeRole`]]
  92. :xref-IAccessControlDefaultAdminRules-defaultAdmin--: xref:access.adoc#IAccessControlDefaultAdminRules-defaultAdmin--
  93. :xref-IAccessControlDefaultAdminRules-pendingDefaultAdmin--: xref:access.adoc#IAccessControlDefaultAdminRules-pendingDefaultAdmin--
  94. :xref-IAccessControlDefaultAdminRules-defaultAdminDelay--: xref:access.adoc#IAccessControlDefaultAdminRules-defaultAdminDelay--
  95. :xref-IAccessControlDefaultAdminRules-pendingDefaultAdminDelay--: xref:access.adoc#IAccessControlDefaultAdminRules-pendingDefaultAdminDelay--
  96. :xref-IAccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-: xref:access.adoc#IAccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-
  97. :xref-IAccessControlDefaultAdminRules-cancelDefaultAdminTransfer--: xref:access.adoc#IAccessControlDefaultAdminRules-cancelDefaultAdminTransfer--
  98. :xref-IAccessControlDefaultAdminRules-acceptDefaultAdminTransfer--: xref:access.adoc#IAccessControlDefaultAdminRules-acceptDefaultAdminTransfer--
  99. :xref-IAccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-: xref:access.adoc#IAccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-
  100. :xref-IAccessControlDefaultAdminRules-rollbackDefaultAdminDelay--: xref:access.adoc#IAccessControlDefaultAdminRules-rollbackDefaultAdminDelay--
  101. :xref-IAccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--: xref:access.adoc#IAccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--
  102. :xref-IAccessControl-hasRole-bytes32-address-: xref:access.adoc#IAccessControl-hasRole-bytes32-address-
  103. :xref-IAccessControl-getRoleAdmin-bytes32-: xref:access.adoc#IAccessControl-getRoleAdmin-bytes32-
  104. :xref-IAccessControl-grantRole-bytes32-address-: xref:access.adoc#IAccessControl-grantRole-bytes32-address-
  105. :xref-IAccessControl-revokeRole-bytes32-address-: xref:access.adoc#IAccessControl-revokeRole-bytes32-address-
  106. :xref-IAccessControl-renounceRole-bytes32-address-: xref:access.adoc#IAccessControl-renounceRole-bytes32-address-
  107. :xref-IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-: xref:access.adoc#IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-
  108. :xref-IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--: xref:access.adoc#IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--
  109. :xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-: xref:access.adoc#IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-
  110. :xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--: xref:access.adoc#IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--
  111. :xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-: xref:access.adoc#IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-
  112. :xref-IAccessControl-RoleGranted-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleGranted-bytes32-address-address-
  113. :xref-IAccessControl-RoleRevoked-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleRevoked-bytes32-address-address-
  114. :xref-IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-: xref:access.adoc#IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-
  115. :xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--: xref:access.adoc#IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--
  116. :xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-: xref:access.adoc#IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-
  117. :xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-: xref:access.adoc#IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-
  118. :xref-IAccessControl-AccessControlBadConfirmation--: xref:access.adoc#IAccessControl-AccessControlBadConfirmation--
  119. :AccessControl: pass:normal[xref:access.adoc#AccessControl[`AccessControl`]]
  120. :AccessControl: pass:normal[xref:access.adoc#AccessControl[`AccessControl`]]
  121. :xref-AccessControlDefaultAdminRules-constructor-uint48-address-: xref:access.adoc#AccessControlDefaultAdminRules-constructor-uint48-address-
  122. :xref-AccessControlDefaultAdminRules-supportsInterface-bytes4-: xref:access.adoc#AccessControlDefaultAdminRules-supportsInterface-bytes4-
  123. :xref-AccessControlDefaultAdminRules-owner--: xref:access.adoc#AccessControlDefaultAdminRules-owner--
  124. :xref-AccessControlDefaultAdminRules-grantRole-bytes32-address-: xref:access.adoc#AccessControlDefaultAdminRules-grantRole-bytes32-address-
  125. :xref-AccessControlDefaultAdminRules-revokeRole-bytes32-address-: xref:access.adoc#AccessControlDefaultAdminRules-revokeRole-bytes32-address-
  126. :xref-AccessControlDefaultAdminRules-renounceRole-bytes32-address-: xref:access.adoc#AccessControlDefaultAdminRules-renounceRole-bytes32-address-
  127. :xref-AccessControlDefaultAdminRules-_grantRole-bytes32-address-: xref:access.adoc#AccessControlDefaultAdminRules-_grantRole-bytes32-address-
  128. :xref-AccessControlDefaultAdminRules-_revokeRole-bytes32-address-: xref:access.adoc#AccessControlDefaultAdminRules-_revokeRole-bytes32-address-
  129. :xref-AccessControlDefaultAdminRules-_setRoleAdmin-bytes32-bytes32-: xref:access.adoc#AccessControlDefaultAdminRules-_setRoleAdmin-bytes32-bytes32-
  130. :xref-AccessControlDefaultAdminRules-defaultAdmin--: xref:access.adoc#AccessControlDefaultAdminRules-defaultAdmin--
  131. :xref-AccessControlDefaultAdminRules-pendingDefaultAdmin--: xref:access.adoc#AccessControlDefaultAdminRules-pendingDefaultAdmin--
  132. :xref-AccessControlDefaultAdminRules-defaultAdminDelay--: xref:access.adoc#AccessControlDefaultAdminRules-defaultAdminDelay--
  133. :xref-AccessControlDefaultAdminRules-pendingDefaultAdminDelay--: xref:access.adoc#AccessControlDefaultAdminRules-pendingDefaultAdminDelay--
  134. :xref-AccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--: xref:access.adoc#AccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--
  135. :xref-AccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-: xref:access.adoc#AccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-
  136. :xref-AccessControlDefaultAdminRules-_beginDefaultAdminTransfer-address-: xref:access.adoc#AccessControlDefaultAdminRules-_beginDefaultAdminTransfer-address-
  137. :xref-AccessControlDefaultAdminRules-cancelDefaultAdminTransfer--: xref:access.adoc#AccessControlDefaultAdminRules-cancelDefaultAdminTransfer--
  138. :xref-AccessControlDefaultAdminRules-_cancelDefaultAdminTransfer--: xref:access.adoc#AccessControlDefaultAdminRules-_cancelDefaultAdminTransfer--
  139. :xref-AccessControlDefaultAdminRules-acceptDefaultAdminTransfer--: xref:access.adoc#AccessControlDefaultAdminRules-acceptDefaultAdminTransfer--
  140. :xref-AccessControlDefaultAdminRules-_acceptDefaultAdminTransfer--: xref:access.adoc#AccessControlDefaultAdminRules-_acceptDefaultAdminTransfer--
  141. :xref-AccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-: xref:access.adoc#AccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-
  142. :xref-AccessControlDefaultAdminRules-_changeDefaultAdminDelay-uint48-: xref:access.adoc#AccessControlDefaultAdminRules-_changeDefaultAdminDelay-uint48-
  143. :xref-AccessControlDefaultAdminRules-rollbackDefaultAdminDelay--: xref:access.adoc#AccessControlDefaultAdminRules-rollbackDefaultAdminDelay--
  144. :xref-AccessControlDefaultAdminRules-_rollbackDefaultAdminDelay--: xref:access.adoc#AccessControlDefaultAdminRules-_rollbackDefaultAdminDelay--
  145. :xref-AccessControlDefaultAdminRules-_delayChangeWait-uint48-: xref:access.adoc#AccessControlDefaultAdminRules-_delayChangeWait-uint48-
  146. :xref-AccessControl-hasRole-bytes32-address-: xref:access.adoc#AccessControl-hasRole-bytes32-address-
  147. :xref-AccessControl-_checkRole-bytes32-: xref:access.adoc#AccessControl-_checkRole-bytes32-
  148. :xref-AccessControl-_checkRole-bytes32-address-: xref:access.adoc#AccessControl-_checkRole-bytes32-address-
  149. :xref-AccessControl-getRoleAdmin-bytes32-: xref:access.adoc#AccessControl-getRoleAdmin-bytes32-
  150. :xref-AccessControl-DEFAULT_ADMIN_ROLE-bytes32: xref:access.adoc#AccessControl-DEFAULT_ADMIN_ROLE-bytes32
  151. :xref-IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-: xref:access.adoc#IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-
  152. :xref-IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--: xref:access.adoc#IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--
  153. :xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-: xref:access.adoc#IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-
  154. :xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--: xref:access.adoc#IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--
  155. :xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-: xref:access.adoc#IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-
  156. :xref-IAccessControl-RoleGranted-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleGranted-bytes32-address-address-
  157. :xref-IAccessControl-RoleRevoked-bytes32-address-address-: xref:access.adoc#IAccessControl-RoleRevoked-bytes32-address-address-
  158. :xref-IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-: xref:access.adoc#IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-
  159. :xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--: xref:access.adoc#IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--
  160. :xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-: xref:access.adoc#IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-
  161. :xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-: xref:access.adoc#IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-
  162. :xref-IAccessControl-AccessControlBadConfirmation--: xref:access.adoc#IAccessControl-AccessControlBadConfirmation--
  163. :IERC165-supportsInterface: pass:normal[xref:utils.adoc#IERC165-supportsInterface-bytes4-[`IERC165.supportsInterface`]]
  164. :IERC5313-owner: pass:normal[xref:interfaces.adoc#IERC5313-owner--[`IERC5313.owner`]]
  165. :AccessControl-grantRole: pass:normal[xref:access.adoc#AccessControl-grantRole-bytes32-address-[`AccessControl.grantRole`]]
  166. :AccessControl-revokeRole: pass:normal[xref:access.adoc#AccessControl-revokeRole-bytes32-address-[`AccessControl.revokeRole`]]
  167. :AccessControl-renounceRole: pass:normal[xref:access.adoc#AccessControl-renounceRole-bytes32-address-[`AccessControl.renounceRole`]]
  168. :AccessControl-_grantRole: pass:normal[xref:access.adoc#AccessControl-_grantRole-bytes32-address-[`AccessControl._grantRole`]]
  169. :AccessControl-_revokeRole: pass:normal[xref:access.adoc#AccessControl-_revokeRole-bytes32-address-[`AccessControl._revokeRole`]]
  170. :AccessControl-_setRoleAdmin: pass:normal[xref:access.adoc#AccessControl-_setRoleAdmin-bytes32-bytes32-[`AccessControl._setRoleAdmin`]]
  171. :xref-IAuthority-canCall-address-address-bytes4-: xref:access.adoc#IAuthority-canCall-address-address-bytes4-
  172. :xref-IAccessManager-canCall-address-address-bytes4-: xref:access.adoc#IAccessManager-canCall-address-address-bytes4-
  173. :xref-IAccessManager-expiration--: xref:access.adoc#IAccessManager-expiration--
  174. :xref-IAccessManager-minSetback--: xref:access.adoc#IAccessManager-minSetback--
  175. :xref-IAccessManager-isTargetClosed-address-: xref:access.adoc#IAccessManager-isTargetClosed-address-
  176. :xref-IAccessManager-getTargetFunctionRole-address-bytes4-: xref:access.adoc#IAccessManager-getTargetFunctionRole-address-bytes4-
  177. :xref-IAccessManager-getTargetAdminDelay-address-: xref:access.adoc#IAccessManager-getTargetAdminDelay-address-
  178. :xref-IAccessManager-getRoleAdmin-uint64-: xref:access.adoc#IAccessManager-getRoleAdmin-uint64-
  179. :xref-IAccessManager-getRoleGuardian-uint64-: xref:access.adoc#IAccessManager-getRoleGuardian-uint64-
  180. :xref-IAccessManager-getRoleGrantDelay-uint64-: xref:access.adoc#IAccessManager-getRoleGrantDelay-uint64-
  181. :xref-IAccessManager-getAccess-uint64-address-: xref:access.adoc#IAccessManager-getAccess-uint64-address-
  182. :xref-IAccessManager-hasRole-uint64-address-: xref:access.adoc#IAccessManager-hasRole-uint64-address-
  183. :xref-IAccessManager-labelRole-uint64-string-: xref:access.adoc#IAccessManager-labelRole-uint64-string-
  184. :xref-IAccessManager-grantRole-uint64-address-uint32-: xref:access.adoc#IAccessManager-grantRole-uint64-address-uint32-
  185. :xref-IAccessManager-revokeRole-uint64-address-: xref:access.adoc#IAccessManager-revokeRole-uint64-address-
  186. :xref-IAccessManager-renounceRole-uint64-address-: xref:access.adoc#IAccessManager-renounceRole-uint64-address-
  187. :xref-IAccessManager-setRoleAdmin-uint64-uint64-: xref:access.adoc#IAccessManager-setRoleAdmin-uint64-uint64-
  188. :xref-IAccessManager-setRoleGuardian-uint64-uint64-: xref:access.adoc#IAccessManager-setRoleGuardian-uint64-uint64-
  189. :xref-IAccessManager-setGrantDelay-uint64-uint32-: xref:access.adoc#IAccessManager-setGrantDelay-uint64-uint32-
  190. :xref-IAccessManager-setTargetFunctionRole-address-bytes4---uint64-: xref:access.adoc#IAccessManager-setTargetFunctionRole-address-bytes4---uint64-
  191. :xref-IAccessManager-setTargetAdminDelay-address-uint32-: xref:access.adoc#IAccessManager-setTargetAdminDelay-address-uint32-
  192. :xref-IAccessManager-setTargetClosed-address-bool-: xref:access.adoc#IAccessManager-setTargetClosed-address-bool-
  193. :xref-IAccessManager-getSchedule-bytes32-: xref:access.adoc#IAccessManager-getSchedule-bytes32-
  194. :xref-IAccessManager-getNonce-bytes32-: xref:access.adoc#IAccessManager-getNonce-bytes32-
  195. :xref-IAccessManager-schedule-address-bytes-uint48-: xref:access.adoc#IAccessManager-schedule-address-bytes-uint48-
  196. :xref-IAccessManager-execute-address-bytes-: xref:access.adoc#IAccessManager-execute-address-bytes-
  197. :xref-IAccessManager-cancel-address-address-bytes-: xref:access.adoc#IAccessManager-cancel-address-address-bytes-
  198. :xref-IAccessManager-consumeScheduledOp-address-bytes-: xref:access.adoc#IAccessManager-consumeScheduledOp-address-bytes-
  199. :xref-IAccessManager-hashOperation-address-address-bytes-: xref:access.adoc#IAccessManager-hashOperation-address-address-bytes-
  200. :xref-IAccessManager-updateAuthority-address-address-: xref:access.adoc#IAccessManager-updateAuthority-address-address-
  201. :xref-IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-: xref:access.adoc#IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-
  202. :xref-IAccessManager-OperationExecuted-bytes32-uint32-: xref:access.adoc#IAccessManager-OperationExecuted-bytes32-uint32-
  203. :xref-IAccessManager-OperationCanceled-bytes32-uint32-: xref:access.adoc#IAccessManager-OperationCanceled-bytes32-uint32-
  204. :xref-IAccessManager-RoleLabel-uint64-string-: xref:access.adoc#IAccessManager-RoleLabel-uint64-string-
  205. :xref-IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-: xref:access.adoc#IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-
  206. :xref-IAccessManager-RoleRevoked-uint64-address-: xref:access.adoc#IAccessManager-RoleRevoked-uint64-address-
  207. :xref-IAccessManager-RoleAdminChanged-uint64-uint64-: xref:access.adoc#IAccessManager-RoleAdminChanged-uint64-uint64-
  208. :xref-IAccessManager-RoleGuardianChanged-uint64-uint64-: xref:access.adoc#IAccessManager-RoleGuardianChanged-uint64-uint64-
  209. :xref-IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-: xref:access.adoc#IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-
  210. :xref-IAccessManager-TargetClosed-address-bool-: xref:access.adoc#IAccessManager-TargetClosed-address-bool-
  211. :xref-IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-: xref:access.adoc#IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-
  212. :xref-IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-: xref:access.adoc#IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-
  213. :xref-IAccessManager-AccessManagerAlreadyScheduled-bytes32-: xref:access.adoc#IAccessManager-AccessManagerAlreadyScheduled-bytes32-
  214. :xref-IAccessManager-AccessManagerNotScheduled-bytes32-: xref:access.adoc#IAccessManager-AccessManagerNotScheduled-bytes32-
  215. :xref-IAccessManager-AccessManagerNotReady-bytes32-: xref:access.adoc#IAccessManager-AccessManagerNotReady-bytes32-
  216. :xref-IAccessManager-AccessManagerExpired-bytes32-: xref:access.adoc#IAccessManager-AccessManagerExpired-bytes32-
  217. :xref-IAccessManager-AccessManagerLockedAccount-address-: xref:access.adoc#IAccessManager-AccessManagerLockedAccount-address-
  218. :xref-IAccessManager-AccessManagerLockedRole-uint64-: xref:access.adoc#IAccessManager-AccessManagerLockedRole-uint64-
  219. :xref-IAccessManager-AccessManagerBadConfirmation--: xref:access.adoc#IAccessManager-AccessManagerBadConfirmation--
  220. :xref-IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-
  221. :xref-IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-
  222. :xref-IAccessManager-AccessManagerUnauthorizedConsume-address-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedConsume-address-
  223. :xref-IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-
  224. :xref-IAccessManager-AccessManagerInvalidInitialAdmin-address-: xref:access.adoc#IAccessManager-AccessManagerInvalidInitialAdmin-address-
  225. :AccessManaged: pass:normal[xref:access.adoc#AccessManaged[`AccessManaged`]]
  226. :AccessManaged-restricted: pass:normal[xref:access.adoc#AccessManaged-restricted--[`AccessManaged.restricted`]]
  227. :AccessManaged-authority: pass:normal[xref:access.adoc#AccessManaged-authority--[`AccessManaged.authority`]]
  228. :IAuthority: pass:normal[xref:access.adoc#IAuthority[`IAuthority`]]
  229. :Ownable: pass:normal[xref:access.adoc#Ownable[`Ownable`]]
  230. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  231. :Ownable: pass:normal[xref:access.adoc#Ownable[`Ownable`]]
  232. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  233. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  234. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  235. :Ownable: pass:normal[xref:access.adoc#Ownable[`Ownable`]]
  236. :AccessControl: pass:normal[xref:access.adoc#AccessControl[`AccessControl`]]
  237. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  238. :Ownable-renounceOwnership: pass:normal[xref:access.adoc#Ownable-renounceOwnership--[`Ownable.renounceOwnership`]]
  239. :AccessControl-renounceRole: pass:normal[xref:access.adoc#AccessControl-renounceRole-bytes32-address-[`AccessControl.renounceRole`]]
  240. :xref-AccessManager-onlyAuthorized--: xref:access.adoc#AccessManager-onlyAuthorized--
  241. :xref-AccessManager-constructor-address-: xref:access.adoc#AccessManager-constructor-address-
  242. :xref-AccessManager-canCall-address-address-bytes4-: xref:access.adoc#AccessManager-canCall-address-address-bytes4-
  243. :xref-AccessManager-expiration--: xref:access.adoc#AccessManager-expiration--
  244. :xref-AccessManager-minSetback--: xref:access.adoc#AccessManager-minSetback--
  245. :xref-AccessManager-isTargetClosed-address-: xref:access.adoc#AccessManager-isTargetClosed-address-
  246. :xref-AccessManager-getTargetFunctionRole-address-bytes4-: xref:access.adoc#AccessManager-getTargetFunctionRole-address-bytes4-
  247. :xref-AccessManager-getTargetAdminDelay-address-: xref:access.adoc#AccessManager-getTargetAdminDelay-address-
  248. :xref-AccessManager-getRoleAdmin-uint64-: xref:access.adoc#AccessManager-getRoleAdmin-uint64-
  249. :xref-AccessManager-getRoleGuardian-uint64-: xref:access.adoc#AccessManager-getRoleGuardian-uint64-
  250. :xref-AccessManager-getRoleGrantDelay-uint64-: xref:access.adoc#AccessManager-getRoleGrantDelay-uint64-
  251. :xref-AccessManager-getAccess-uint64-address-: xref:access.adoc#AccessManager-getAccess-uint64-address-
  252. :xref-AccessManager-hasRole-uint64-address-: xref:access.adoc#AccessManager-hasRole-uint64-address-
  253. :xref-AccessManager-labelRole-uint64-string-: xref:access.adoc#AccessManager-labelRole-uint64-string-
  254. :xref-AccessManager-grantRole-uint64-address-uint32-: xref:access.adoc#AccessManager-grantRole-uint64-address-uint32-
  255. :xref-AccessManager-revokeRole-uint64-address-: xref:access.adoc#AccessManager-revokeRole-uint64-address-
  256. :xref-AccessManager-renounceRole-uint64-address-: xref:access.adoc#AccessManager-renounceRole-uint64-address-
  257. :xref-AccessManager-setRoleAdmin-uint64-uint64-: xref:access.adoc#AccessManager-setRoleAdmin-uint64-uint64-
  258. :xref-AccessManager-setRoleGuardian-uint64-uint64-: xref:access.adoc#AccessManager-setRoleGuardian-uint64-uint64-
  259. :xref-AccessManager-setGrantDelay-uint64-uint32-: xref:access.adoc#AccessManager-setGrantDelay-uint64-uint32-
  260. :xref-AccessManager-_grantRole-uint64-address-uint32-uint32-: xref:access.adoc#AccessManager-_grantRole-uint64-address-uint32-uint32-
  261. :xref-AccessManager-_revokeRole-uint64-address-: xref:access.adoc#AccessManager-_revokeRole-uint64-address-
  262. :xref-AccessManager-_setRoleAdmin-uint64-uint64-: xref:access.adoc#AccessManager-_setRoleAdmin-uint64-uint64-
  263. :xref-AccessManager-_setRoleGuardian-uint64-uint64-: xref:access.adoc#AccessManager-_setRoleGuardian-uint64-uint64-
  264. :xref-AccessManager-_setGrantDelay-uint64-uint32-: xref:access.adoc#AccessManager-_setGrantDelay-uint64-uint32-
  265. :xref-AccessManager-setTargetFunctionRole-address-bytes4---uint64-: xref:access.adoc#AccessManager-setTargetFunctionRole-address-bytes4---uint64-
  266. :xref-AccessManager-_setTargetFunctionRole-address-bytes4-uint64-: xref:access.adoc#AccessManager-_setTargetFunctionRole-address-bytes4-uint64-
  267. :xref-AccessManager-setTargetAdminDelay-address-uint32-: xref:access.adoc#AccessManager-setTargetAdminDelay-address-uint32-
  268. :xref-AccessManager-_setTargetAdminDelay-address-uint32-: xref:access.adoc#AccessManager-_setTargetAdminDelay-address-uint32-
  269. :xref-AccessManager-setTargetClosed-address-bool-: xref:access.adoc#AccessManager-setTargetClosed-address-bool-
  270. :xref-AccessManager-_setTargetClosed-address-bool-: xref:access.adoc#AccessManager-_setTargetClosed-address-bool-
  271. :xref-AccessManager-getSchedule-bytes32-: xref:access.adoc#AccessManager-getSchedule-bytes32-
  272. :xref-AccessManager-getNonce-bytes32-: xref:access.adoc#AccessManager-getNonce-bytes32-
  273. :xref-AccessManager-schedule-address-bytes-uint48-: xref:access.adoc#AccessManager-schedule-address-bytes-uint48-
  274. :xref-AccessManager-execute-address-bytes-: xref:access.adoc#AccessManager-execute-address-bytes-
  275. :xref-AccessManager-cancel-address-address-bytes-: xref:access.adoc#AccessManager-cancel-address-address-bytes-
  276. :xref-AccessManager-consumeScheduledOp-address-bytes-: xref:access.adoc#AccessManager-consumeScheduledOp-address-bytes-
  277. :xref-AccessManager-_consumeScheduledOp-bytes32-: xref:access.adoc#AccessManager-_consumeScheduledOp-bytes32-
  278. :xref-AccessManager-hashOperation-address-address-bytes-: xref:access.adoc#AccessManager-hashOperation-address-address-bytes-
  279. :xref-AccessManager-updateAuthority-address-address-: xref:access.adoc#AccessManager-updateAuthority-address-address-
  280. :xref-AccessManager-ADMIN_ROLE-uint64: xref:access.adoc#AccessManager-ADMIN_ROLE-uint64
  281. :xref-AccessManager-PUBLIC_ROLE-uint64: xref:access.adoc#AccessManager-PUBLIC_ROLE-uint64
  282. :xref-Multicall-multicall-bytes---: xref:utils.adoc#Multicall-multicall-bytes---
  283. :xref-IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-: xref:access.adoc#IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-
  284. :xref-IAccessManager-OperationExecuted-bytes32-uint32-: xref:access.adoc#IAccessManager-OperationExecuted-bytes32-uint32-
  285. :xref-IAccessManager-OperationCanceled-bytes32-uint32-: xref:access.adoc#IAccessManager-OperationCanceled-bytes32-uint32-
  286. :xref-IAccessManager-RoleLabel-uint64-string-: xref:access.adoc#IAccessManager-RoleLabel-uint64-string-
  287. :xref-IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-: xref:access.adoc#IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-
  288. :xref-IAccessManager-RoleRevoked-uint64-address-: xref:access.adoc#IAccessManager-RoleRevoked-uint64-address-
  289. :xref-IAccessManager-RoleAdminChanged-uint64-uint64-: xref:access.adoc#IAccessManager-RoleAdminChanged-uint64-uint64-
  290. :xref-IAccessManager-RoleGuardianChanged-uint64-uint64-: xref:access.adoc#IAccessManager-RoleGuardianChanged-uint64-uint64-
  291. :xref-IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-: xref:access.adoc#IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-
  292. :xref-IAccessManager-TargetClosed-address-bool-: xref:access.adoc#IAccessManager-TargetClosed-address-bool-
  293. :xref-IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-: xref:access.adoc#IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-
  294. :xref-IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-: xref:access.adoc#IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-
  295. :xref-IAccessManager-AccessManagerAlreadyScheduled-bytes32-: xref:access.adoc#IAccessManager-AccessManagerAlreadyScheduled-bytes32-
  296. :xref-IAccessManager-AccessManagerNotScheduled-bytes32-: xref:access.adoc#IAccessManager-AccessManagerNotScheduled-bytes32-
  297. :xref-IAccessManager-AccessManagerNotReady-bytes32-: xref:access.adoc#IAccessManager-AccessManagerNotReady-bytes32-
  298. :xref-IAccessManager-AccessManagerExpired-bytes32-: xref:access.adoc#IAccessManager-AccessManagerExpired-bytes32-
  299. :xref-IAccessManager-AccessManagerLockedAccount-address-: xref:access.adoc#IAccessManager-AccessManagerLockedAccount-address-
  300. :xref-IAccessManager-AccessManagerLockedRole-uint64-: xref:access.adoc#IAccessManager-AccessManagerLockedRole-uint64-
  301. :xref-IAccessManager-AccessManagerBadConfirmation--: xref:access.adoc#IAccessManager-AccessManagerBadConfirmation--
  302. :xref-IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-
  303. :xref-IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-
  304. :xref-IAccessManager-AccessManagerUnauthorizedConsume-address-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedConsume-address-
  305. :xref-IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-
  306. :xref-IAccessManager-AccessManagerInvalidInitialAdmin-address-: xref:access.adoc#IAccessManager-AccessManagerInvalidInitialAdmin-address-
  307. :xref-IAccessManaged-authority--: xref:access.adoc#IAccessManaged-authority--
  308. :xref-IAccessManaged-setAuthority-address-: xref:access.adoc#IAccessManaged-setAuthority-address-
  309. :xref-IAccessManaged-isConsumingScheduledOp--: xref:access.adoc#IAccessManaged-isConsumingScheduledOp--
  310. :xref-IAccessManaged-AuthorityUpdated-address-: xref:access.adoc#IAccessManaged-AuthorityUpdated-address-
  311. :xref-IAccessManaged-AccessManagedUnauthorized-address-: xref:access.adoc#IAccessManaged-AccessManagedUnauthorized-address-
  312. :xref-IAccessManaged-AccessManagedRequiredDelay-address-uint32-: xref:access.adoc#IAccessManaged-AccessManagedRequiredDelay-address-uint32-
  313. :xref-IAccessManaged-AccessManagedInvalidAuthority-address-: xref:access.adoc#IAccessManaged-AccessManagedInvalidAuthority-address-
  314. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  315. :IAuthority: pass:normal[xref:access.adoc#IAuthority[`IAuthority`]]
  316. :xref-AccessManaged-restricted--: xref:access.adoc#AccessManaged-restricted--
  317. :xref-AccessManaged-constructor-address-: xref:access.adoc#AccessManaged-constructor-address-
  318. :xref-AccessManaged-authority--: xref:access.adoc#AccessManaged-authority--
  319. :xref-AccessManaged-setAuthority-address-: xref:access.adoc#AccessManaged-setAuthority-address-
  320. :xref-AccessManaged-isConsumingScheduledOp--: xref:access.adoc#AccessManaged-isConsumingScheduledOp--
  321. :xref-AccessManaged-_setAuthority-address-: xref:access.adoc#AccessManaged-_setAuthority-address-
  322. :xref-AccessManaged-_checkCanCall-address-bytes-: xref:access.adoc#AccessManaged-_checkCanCall-address-bytes-
  323. :xref-IAccessManaged-AuthorityUpdated-address-: xref:access.adoc#IAccessManaged-AuthorityUpdated-address-
  324. :xref-IAccessManaged-AccessManagedUnauthorized-address-: xref:access.adoc#IAccessManaged-AccessManagedUnauthorized-address-
  325. :xref-IAccessManaged-AccessManagedRequiredDelay-address-uint32-: xref:access.adoc#IAccessManaged-AccessManagedRequiredDelay-address-uint32-
  326. :xref-IAccessManaged-AccessManagedInvalidAuthority-address-: xref:access.adoc#IAccessManaged-AccessManagedInvalidAuthority-address-
  327. :xref-AuthorityUtils-canCallWithDelay-address-address-address-bytes4-: xref:access.adoc#AuthorityUtils-canCallWithDelay-address-address-address-bytes4-
  328. = Access Control
  329. [.readme-notice]
  330. NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/access
  331. This directory provides ways to restrict who can access the functions of a contract or when they can do it.
  332. - {AccessControl} provides a general role based access control mechanism. Multiple hierarchical roles can be created and assigned each to multiple accounts.
  333. - {Ownable} is a simpler mechanism with a single owner "role" that can be assigned to a single account. This simpler mechanism can be useful for quick tests but projects with production concerns are likely to outgrow it.
  334. == Core
  335. :OwnableUnauthorizedAccount: pass:normal[xref:#Ownable-OwnableUnauthorizedAccount-address-[`++OwnableUnauthorizedAccount++`]]
  336. :OwnableInvalidOwner: pass:normal[xref:#Ownable-OwnableInvalidOwner-address-[`++OwnableInvalidOwner++`]]
  337. :OwnershipTransferred: pass:normal[xref:#Ownable-OwnershipTransferred-address-address-[`++OwnershipTransferred++`]]
  338. :constructor: pass:normal[xref:#Ownable-constructor-address-[`++constructor++`]]
  339. :onlyOwner: pass:normal[xref:#Ownable-onlyOwner--[`++onlyOwner++`]]
  340. :owner: pass:normal[xref:#Ownable-owner--[`++owner++`]]
  341. :_checkOwner: pass:normal[xref:#Ownable-_checkOwner--[`++_checkOwner++`]]
  342. :renounceOwnership: pass:normal[xref:#Ownable-renounceOwnership--[`++renounceOwnership++`]]
  343. :transferOwnership: pass:normal[xref:#Ownable-transferOwnership-address-[`++transferOwnership++`]]
  344. :_transferOwnership: pass:normal[xref:#Ownable-_transferOwnership-address-[`++_transferOwnership++`]]
  345. [.contract]
  346. [[Ownable]]
  347. === `++Ownable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/Ownable.sol[{github-icon},role=heading-link]
  348. [.hljs-theme-light.nopadding]
  349. ```solidity
  350. import "@openzeppelin/contracts/access/Ownable.sol";
  351. ```
  352. Contract module which provides a basic access control mechanism, where
  353. there is an account (an owner) that can be granted exclusive access to
  354. specific functions.
  355. The initial owner is set to the address provided by the deployer. This can
  356. later be changed with {transferOwnership}.
  357. This module is used through inheritance. It will make available the modifier
  358. `onlyOwner`, which can be applied to your functions to restrict their use to
  359. the owner.
  360. [.contract-index]
  361. .Modifiers
  362. --
  363. * {xref-Ownable-onlyOwner--}[`++onlyOwner()++`]
  364. --
  365. [.contract-index]
  366. .Functions
  367. --
  368. * {xref-Ownable-constructor-address-}[`++constructor(initialOwner)++`]
  369. * {xref-Ownable-owner--}[`++owner()++`]
  370. * {xref-Ownable-_checkOwner--}[`++_checkOwner()++`]
  371. * {xref-Ownable-renounceOwnership--}[`++renounceOwnership()++`]
  372. * {xref-Ownable-transferOwnership-address-}[`++transferOwnership(newOwner)++`]
  373. * {xref-Ownable-_transferOwnership-address-}[`++_transferOwnership(newOwner)++`]
  374. --
  375. [.contract-index]
  376. .Events
  377. --
  378. * {xref-Ownable-OwnershipTransferred-address-address-}[`++OwnershipTransferred(previousOwner, newOwner)++`]
  379. --
  380. [.contract-index]
  381. .Errors
  382. --
  383. * {xref-Ownable-OwnableUnauthorizedAccount-address-}[`++OwnableUnauthorizedAccount(account)++`]
  384. * {xref-Ownable-OwnableInvalidOwner-address-}[`++OwnableInvalidOwner(owner)++`]
  385. --
  386. [.contract-item]
  387. [[Ownable-onlyOwner--]]
  388. ==== `[.contract-item-name]#++onlyOwner++#++()++` [.item-kind]#modifier#
  389. Throws if called by any account other than the owner.
  390. [.contract-item]
  391. [[Ownable-constructor-address-]]
  392. ==== `[.contract-item-name]#++constructor++#++(address initialOwner)++` [.item-kind]#internal#
  393. Initializes the contract setting the address provided by the deployer as the initial owner.
  394. [.contract-item]
  395. [[Ownable-owner--]]
  396. ==== `[.contract-item-name]#++owner++#++() → address++` [.item-kind]#public#
  397. Returns the address of the current owner.
  398. [.contract-item]
  399. [[Ownable-_checkOwner--]]
  400. ==== `[.contract-item-name]#++_checkOwner++#++()++` [.item-kind]#internal#
  401. Throws if the sender is not the owner.
  402. [.contract-item]
  403. [[Ownable-renounceOwnership--]]
  404. ==== `[.contract-item-name]#++renounceOwnership++#++()++` [.item-kind]#public#
  405. Leaves the contract without owner. It will not be possible to call
  406. `onlyOwner` functions. Can only be called by the current owner.
  407. NOTE: Renouncing ownership will leave the contract without an owner,
  408. thereby disabling any functionality that is only available to the owner.
  409. [.contract-item]
  410. [[Ownable-transferOwnership-address-]]
  411. ==== `[.contract-item-name]#++transferOwnership++#++(address newOwner)++` [.item-kind]#public#
  412. Transfers ownership of the contract to a new account (`newOwner`).
  413. Can only be called by the current owner.
  414. [.contract-item]
  415. [[Ownable-_transferOwnership-address-]]
  416. ==== `[.contract-item-name]#++_transferOwnership++#++(address newOwner)++` [.item-kind]#internal#
  417. Transfers ownership of the contract to a new account (`newOwner`).
  418. Internal function without access restriction.
  419. [.contract-item]
  420. [[Ownable-OwnershipTransferred-address-address-]]
  421. ==== `[.contract-item-name]#++OwnershipTransferred++#++(address indexed previousOwner, address indexed newOwner)++` [.item-kind]#event#
  422. [.contract-item]
  423. [[Ownable-OwnableUnauthorizedAccount-address-]]
  424. ==== `[.contract-item-name]#++OwnableUnauthorizedAccount++#++(address account)++` [.item-kind]#error#
  425. The caller account is not authorized to perform an operation.
  426. [.contract-item]
  427. [[Ownable-OwnableInvalidOwner-address-]]
  428. ==== `[.contract-item-name]#++OwnableInvalidOwner++#++(address owner)++` [.item-kind]#error#
  429. The owner is not a valid owner account. (eg. `address(0)`)
  430. :OwnershipTransferStarted: pass:normal[xref:#Ownable2Step-OwnershipTransferStarted-address-address-[`++OwnershipTransferStarted++`]]
  431. :pendingOwner: pass:normal[xref:#Ownable2Step-pendingOwner--[`++pendingOwner++`]]
  432. :transferOwnership: pass:normal[xref:#Ownable2Step-transferOwnership-address-[`++transferOwnership++`]]
  433. :_transferOwnership: pass:normal[xref:#Ownable2Step-_transferOwnership-address-[`++_transferOwnership++`]]
  434. :acceptOwnership: pass:normal[xref:#Ownable2Step-acceptOwnership--[`++acceptOwnership++`]]
  435. [.contract]
  436. [[Ownable2Step]]
  437. === `++Ownable2Step++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/Ownable2Step.sol[{github-icon},role=heading-link]
  438. [.hljs-theme-light.nopadding]
  439. ```solidity
  440. import "@openzeppelin/contracts/access/Ownable2Step.sol";
  441. ```
  442. Contract module which provides access control mechanism, where
  443. there is an account (an owner) that can be granted exclusive access to
  444. specific functions.
  445. The initial owner is specified at deployment time in the constructor for `Ownable`. This
  446. can later be changed with {transferOwnership} and {acceptOwnership}.
  447. This module is used through inheritance. It will make available all functions
  448. from parent (Ownable).
  449. [.contract-index]
  450. .Functions
  451. --
  452. * {xref-Ownable2Step-pendingOwner--}[`++pendingOwner()++`]
  453. * {xref-Ownable2Step-transferOwnership-address-}[`++transferOwnership(newOwner)++`]
  454. * {xref-Ownable2Step-_transferOwnership-address-}[`++_transferOwnership(newOwner)++`]
  455. * {xref-Ownable2Step-acceptOwnership--}[`++acceptOwnership()++`]
  456. [.contract-subindex-inherited]
  457. .Ownable
  458. * {xref-Ownable-owner--}[`++owner()++`]
  459. * {xref-Ownable-_checkOwner--}[`++_checkOwner()++`]
  460. * {xref-Ownable-renounceOwnership--}[`++renounceOwnership()++`]
  461. --
  462. [.contract-index]
  463. .Events
  464. --
  465. * {xref-Ownable2Step-OwnershipTransferStarted-address-address-}[`++OwnershipTransferStarted(previousOwner, newOwner)++`]
  466. [.contract-subindex-inherited]
  467. .Ownable
  468. * {xref-Ownable-OwnershipTransferred-address-address-}[`++OwnershipTransferred(previousOwner, newOwner)++`]
  469. --
  470. [.contract-index]
  471. .Errors
  472. --
  473. [.contract-subindex-inherited]
  474. .Ownable
  475. * {xref-Ownable-OwnableUnauthorizedAccount-address-}[`++OwnableUnauthorizedAccount(account)++`]
  476. * {xref-Ownable-OwnableInvalidOwner-address-}[`++OwnableInvalidOwner(owner)++`]
  477. --
  478. [.contract-item]
  479. [[Ownable2Step-pendingOwner--]]
  480. ==== `[.contract-item-name]#++pendingOwner++#++() → address++` [.item-kind]#public#
  481. Returns the address of the pending owner.
  482. [.contract-item]
  483. [[Ownable2Step-transferOwnership-address-]]
  484. ==== `[.contract-item-name]#++transferOwnership++#++(address newOwner)++` [.item-kind]#public#
  485. Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
  486. Can only be called by the current owner.
  487. [.contract-item]
  488. [[Ownable2Step-_transferOwnership-address-]]
  489. ==== `[.contract-item-name]#++_transferOwnership++#++(address newOwner)++` [.item-kind]#internal#
  490. Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
  491. Internal function without access restriction.
  492. [.contract-item]
  493. [[Ownable2Step-acceptOwnership--]]
  494. ==== `[.contract-item-name]#++acceptOwnership++#++()++` [.item-kind]#public#
  495. The new owner accepts the ownership transfer.
  496. [.contract-item]
  497. [[Ownable2Step-OwnershipTransferStarted-address-address-]]
  498. ==== `[.contract-item-name]#++OwnershipTransferStarted++#++(address indexed previousOwner, address indexed newOwner)++` [.item-kind]#event#
  499. :AccessControlUnauthorizedAccount: pass:normal[xref:#IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-[`++AccessControlUnauthorizedAccount++`]]
  500. :AccessControlBadConfirmation: pass:normal[xref:#IAccessControl-AccessControlBadConfirmation--[`++AccessControlBadConfirmation++`]]
  501. :RoleAdminChanged: pass:normal[xref:#IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-[`++RoleAdminChanged++`]]
  502. :RoleGranted: pass:normal[xref:#IAccessControl-RoleGranted-bytes32-address-address-[`++RoleGranted++`]]
  503. :RoleRevoked: pass:normal[xref:#IAccessControl-RoleRevoked-bytes32-address-address-[`++RoleRevoked++`]]
  504. :hasRole: pass:normal[xref:#IAccessControl-hasRole-bytes32-address-[`++hasRole++`]]
  505. :getRoleAdmin: pass:normal[xref:#IAccessControl-getRoleAdmin-bytes32-[`++getRoleAdmin++`]]
  506. :grantRole: pass:normal[xref:#IAccessControl-grantRole-bytes32-address-[`++grantRole++`]]
  507. :revokeRole: pass:normal[xref:#IAccessControl-revokeRole-bytes32-address-[`++revokeRole++`]]
  508. :renounceRole: pass:normal[xref:#IAccessControl-renounceRole-bytes32-address-[`++renounceRole++`]]
  509. [.contract]
  510. [[IAccessControl]]
  511. === `++IAccessControl++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/IAccessControl.sol[{github-icon},role=heading-link]
  512. [.hljs-theme-light.nopadding]
  513. ```solidity
  514. import "@openzeppelin/contracts/access/IAccessControl.sol";
  515. ```
  516. External interface of AccessControl declared to support ERC165 detection.
  517. [.contract-index]
  518. .Functions
  519. --
  520. * {xref-IAccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  521. * {xref-IAccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  522. * {xref-IAccessControl-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  523. * {xref-IAccessControl-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  524. * {xref-IAccessControl-renounceRole-bytes32-address-}[`++renounceRole(role, callerConfirmation)++`]
  525. --
  526. [.contract-index]
  527. .Events
  528. --
  529. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  530. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  531. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  532. --
  533. [.contract-index]
  534. .Errors
  535. --
  536. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  537. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  538. --
  539. [.contract-item]
  540. [[IAccessControl-hasRole-bytes32-address-]]
  541. ==== `[.contract-item-name]#++hasRole++#++(bytes32 role, address account) → bool++` [.item-kind]#external#
  542. Returns `true` if `account` has been granted `role`.
  543. [.contract-item]
  544. [[IAccessControl-getRoleAdmin-bytes32-]]
  545. ==== `[.contract-item-name]#++getRoleAdmin++#++(bytes32 role) → bytes32++` [.item-kind]#external#
  546. Returns the admin role that controls `role`. See {grantRole} and
  547. {revokeRole}.
  548. To change a role's admin, use {AccessControl-_setRoleAdmin}.
  549. [.contract-item]
  550. [[IAccessControl-grantRole-bytes32-address-]]
  551. ==== `[.contract-item-name]#++grantRole++#++(bytes32 role, address account)++` [.item-kind]#external#
  552. Grants `role` to `account`.
  553. If `account` had not been already granted `role`, emits a {RoleGranted}
  554. event.
  555. Requirements:
  556. - the caller must have ``role``'s admin role.
  557. [.contract-item]
  558. [[IAccessControl-revokeRole-bytes32-address-]]
  559. ==== `[.contract-item-name]#++revokeRole++#++(bytes32 role, address account)++` [.item-kind]#external#
  560. Revokes `role` from `account`.
  561. If `account` had been granted `role`, emits a {RoleRevoked} event.
  562. Requirements:
  563. - the caller must have ``role``'s admin role.
  564. [.contract-item]
  565. [[IAccessControl-renounceRole-bytes32-address-]]
  566. ==== `[.contract-item-name]#++renounceRole++#++(bytes32 role, address callerConfirmation)++` [.item-kind]#external#
  567. Revokes `role` from the calling account.
  568. Roles are often managed via {grantRole} and {revokeRole}: this function's
  569. purpose is to provide a mechanism for accounts to lose their privileges
  570. if they are compromised (such as when a trusted device is misplaced).
  571. If the calling account had been granted `role`, emits a {RoleRevoked}
  572. event.
  573. Requirements:
  574. - the caller must be `callerConfirmation`.
  575. [.contract-item]
  576. [[IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-]]
  577. ==== `[.contract-item-name]#++RoleAdminChanged++#++(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)++` [.item-kind]#event#
  578. Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
  579. `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
  580. {RoleAdminChanged} not being emitted signaling this.
  581. [.contract-item]
  582. [[IAccessControl-RoleGranted-bytes32-address-address-]]
  583. ==== `[.contract-item-name]#++RoleGranted++#++(bytes32 indexed role, address indexed account, address indexed sender)++` [.item-kind]#event#
  584. Emitted when `account` is granted `role`.
  585. `sender` is the account that originated the contract call, an admin role
  586. bearer except when using {AccessControl-_setupRole}.
  587. [.contract-item]
  588. [[IAccessControl-RoleRevoked-bytes32-address-address-]]
  589. ==== `[.contract-item-name]#++RoleRevoked++#++(bytes32 indexed role, address indexed account, address indexed sender)++` [.item-kind]#event#
  590. Emitted when `account` is revoked `role`.
  591. `sender` is the account that originated the contract call:
  592. - if using `revokeRole`, it is the admin role bearer
  593. - if using `renounceRole`, it is the role bearer (i.e. `account`)
  594. [.contract-item]
  595. [[IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-]]
  596. ==== `[.contract-item-name]#++AccessControlUnauthorizedAccount++#++(address account, bytes32 neededRole)++` [.item-kind]#error#
  597. The `account` is missing a role.
  598. [.contract-item]
  599. [[IAccessControl-AccessControlBadConfirmation--]]
  600. ==== `[.contract-item-name]#++AccessControlBadConfirmation++#++()++` [.item-kind]#error#
  601. The caller of a function is not the expected one.
  602. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
  603. :RoleData: pass:normal[xref:#AccessControl-RoleData[`++RoleData++`]]
  604. :DEFAULT_ADMIN_ROLE: pass:normal[xref:#AccessControl-DEFAULT_ADMIN_ROLE-bytes32[`++DEFAULT_ADMIN_ROLE++`]]
  605. :onlyRole: pass:normal[xref:#AccessControl-onlyRole-bytes32-[`++onlyRole++`]]
  606. :supportsInterface: pass:normal[xref:#AccessControl-supportsInterface-bytes4-[`++supportsInterface++`]]
  607. :hasRole: pass:normal[xref:#AccessControl-hasRole-bytes32-address-[`++hasRole++`]]
  608. :_checkRole: pass:normal[xref:#AccessControl-_checkRole-bytes32-[`++_checkRole++`]]
  609. :_checkRole: pass:normal[xref:#AccessControl-_checkRole-bytes32-address-[`++_checkRole++`]]
  610. :getRoleAdmin: pass:normal[xref:#AccessControl-getRoleAdmin-bytes32-[`++getRoleAdmin++`]]
  611. :grantRole: pass:normal[xref:#AccessControl-grantRole-bytes32-address-[`++grantRole++`]]
  612. :revokeRole: pass:normal[xref:#AccessControl-revokeRole-bytes32-address-[`++revokeRole++`]]
  613. :renounceRole: pass:normal[xref:#AccessControl-renounceRole-bytes32-address-[`++renounceRole++`]]
  614. :_setRoleAdmin: pass:normal[xref:#AccessControl-_setRoleAdmin-bytes32-bytes32-[`++_setRoleAdmin++`]]
  615. :_grantRole: pass:normal[xref:#AccessControl-_grantRole-bytes32-address-[`++_grantRole++`]]
  616. :_revokeRole: pass:normal[xref:#AccessControl-_revokeRole-bytes32-address-[`++_revokeRole++`]]
  617. [.contract]
  618. [[AccessControl]]
  619. === `++AccessControl++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/AccessControl.sol[{github-icon},role=heading-link]
  620. [.hljs-theme-light.nopadding]
  621. ```solidity
  622. import "@openzeppelin/contracts/access/AccessControl.sol";
  623. ```
  624. Contract module that allows children to implement role-based access
  625. control mechanisms. This is a lightweight version that doesn't allow enumerating role
  626. members except through off-chain means by accessing the contract event logs. Some
  627. applications may benefit from on-chain enumerability, for those cases see
  628. {AccessControlEnumerable}.
  629. Roles are referred to by their `bytes32` identifier. These should be exposed
  630. in the external API and be unique. The best way to achieve this is by
  631. using `public constant` hash digests:
  632. ```solidity
  633. bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
  634. ```
  635. Roles can be used to represent a set of permissions. To restrict access to a
  636. function call, use {hasRole}:
  637. ```solidity
  638. function foo() public {
  639. require(hasRole(MY_ROLE, msg.sender));
  640. ...
  641. }
  642. ```
  643. Roles can be granted and revoked dynamically via the {grantRole} and
  644. {revokeRole} functions. Each role has an associated admin role, and only
  645. accounts that have a role's admin role can call {grantRole} and {revokeRole}.
  646. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
  647. that only accounts with this role will be able to grant or revoke other
  648. roles. More complex role relationships can be created by using
  649. {_setRoleAdmin}.
  650. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
  651. grant and revoke this role. Extra precautions should be taken to secure
  652. accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
  653. to enforce additional security measures for this role.
  654. [.contract-index]
  655. .Modifiers
  656. --
  657. * {xref-AccessControl-onlyRole-bytes32-}[`++onlyRole(role)++`]
  658. --
  659. [.contract-index]
  660. .Functions
  661. --
  662. * {xref-AccessControl-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  663. * {xref-AccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  664. * {xref-AccessControl-_checkRole-bytes32-}[`++_checkRole(role)++`]
  665. * {xref-AccessControl-_checkRole-bytes32-address-}[`++_checkRole(role, account)++`]
  666. * {xref-AccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  667. * {xref-AccessControl-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  668. * {xref-AccessControl-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  669. * {xref-AccessControl-renounceRole-bytes32-address-}[`++renounceRole(role, callerConfirmation)++`]
  670. * {xref-AccessControl-_setRoleAdmin-bytes32-bytes32-}[`++_setRoleAdmin(role, adminRole)++`]
  671. * {xref-AccessControl-_grantRole-bytes32-address-}[`++_grantRole(role, account)++`]
  672. * {xref-AccessControl-_revokeRole-bytes32-address-}[`++_revokeRole(role, account)++`]
  673. * {xref-AccessControl-DEFAULT_ADMIN_ROLE-bytes32}[`++DEFAULT_ADMIN_ROLE()++`]
  674. [.contract-subindex-inherited]
  675. .ERC165
  676. [.contract-subindex-inherited]
  677. .IERC165
  678. [.contract-subindex-inherited]
  679. .IAccessControl
  680. --
  681. [.contract-index]
  682. .Events
  683. --
  684. [.contract-subindex-inherited]
  685. .ERC165
  686. [.contract-subindex-inherited]
  687. .IERC165
  688. [.contract-subindex-inherited]
  689. .IAccessControl
  690. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  691. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  692. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  693. --
  694. [.contract-index]
  695. .Errors
  696. --
  697. [.contract-subindex-inherited]
  698. .ERC165
  699. [.contract-subindex-inherited]
  700. .IERC165
  701. [.contract-subindex-inherited]
  702. .IAccessControl
  703. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  704. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  705. --
  706. [.contract-item]
  707. [[AccessControl-onlyRole-bytes32-]]
  708. ==== `[.contract-item-name]#++onlyRole++#++(bytes32 role)++` [.item-kind]#modifier#
  709. Modifier that checks that an account has a specific role. Reverts
  710. with an {AccessControlUnauthorizedAccount} error including the required role.
  711. [.contract-item]
  712. [[AccessControl-supportsInterface-bytes4-]]
  713. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#public#
  714. See {IERC165-supportsInterface}.
  715. [.contract-item]
  716. [[AccessControl-hasRole-bytes32-address-]]
  717. ==== `[.contract-item-name]#++hasRole++#++(bytes32 role, address account) → bool++` [.item-kind]#public#
  718. Returns `true` if `account` has been granted `role`.
  719. [.contract-item]
  720. [[AccessControl-_checkRole-bytes32-]]
  721. ==== `[.contract-item-name]#++_checkRole++#++(bytes32 role)++` [.item-kind]#internal#
  722. Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
  723. is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
  724. [.contract-item]
  725. [[AccessControl-_checkRole-bytes32-address-]]
  726. ==== `[.contract-item-name]#++_checkRole++#++(bytes32 role, address account)++` [.item-kind]#internal#
  727. Reverts with an {AccessControlUnauthorizedAccount} error if `account`
  728. is missing `role`.
  729. [.contract-item]
  730. [[AccessControl-getRoleAdmin-bytes32-]]
  731. ==== `[.contract-item-name]#++getRoleAdmin++#++(bytes32 role) → bytes32++` [.item-kind]#public#
  732. Returns the admin role that controls `role`. See {grantRole} and
  733. {revokeRole}.
  734. To change a role's admin, use {_setRoleAdmin}.
  735. [.contract-item]
  736. [[AccessControl-grantRole-bytes32-address-]]
  737. ==== `[.contract-item-name]#++grantRole++#++(bytes32 role, address account)++` [.item-kind]#public#
  738. Grants `role` to `account`.
  739. If `account` had not been already granted `role`, emits a {RoleGranted}
  740. event.
  741. Requirements:
  742. - the caller must have ``role``'s admin role.
  743. May emit a {RoleGranted} event.
  744. [.contract-item]
  745. [[AccessControl-revokeRole-bytes32-address-]]
  746. ==== `[.contract-item-name]#++revokeRole++#++(bytes32 role, address account)++` [.item-kind]#public#
  747. Revokes `role` from `account`.
  748. If `account` had been granted `role`, emits a {RoleRevoked} event.
  749. Requirements:
  750. - the caller must have ``role``'s admin role.
  751. May emit a {RoleRevoked} event.
  752. [.contract-item]
  753. [[AccessControl-renounceRole-bytes32-address-]]
  754. ==== `[.contract-item-name]#++renounceRole++#++(bytes32 role, address callerConfirmation)++` [.item-kind]#public#
  755. Revokes `role` from the calling account.
  756. Roles are often managed via {grantRole} and {revokeRole}: this function's
  757. purpose is to provide a mechanism for accounts to lose their privileges
  758. if they are compromised (such as when a trusted device is misplaced).
  759. If the calling account had been revoked `role`, emits a {RoleRevoked}
  760. event.
  761. Requirements:
  762. - the caller must be `callerConfirmation`.
  763. May emit a {RoleRevoked} event.
  764. [.contract-item]
  765. [[AccessControl-_setRoleAdmin-bytes32-bytes32-]]
  766. ==== `[.contract-item-name]#++_setRoleAdmin++#++(bytes32 role, bytes32 adminRole)++` [.item-kind]#internal#
  767. Sets `adminRole` as ``role``'s admin role.
  768. Emits a {RoleAdminChanged} event.
  769. [.contract-item]
  770. [[AccessControl-_grantRole-bytes32-address-]]
  771. ==== `[.contract-item-name]#++_grantRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  772. Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
  773. Internal function without access restriction.
  774. May emit a {RoleGranted} event.
  775. [.contract-item]
  776. [[AccessControl-_revokeRole-bytes32-address-]]
  777. ==== `[.contract-item-name]#++_revokeRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  778. Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
  779. Internal function without access restriction.
  780. May emit a {RoleRevoked} event.
  781. [.contract-item]
  782. [[AccessControl-DEFAULT_ADMIN_ROLE-bytes32]]
  783. ==== `[.contract-item-name]#++DEFAULT_ADMIN_ROLE++#++() → bytes32++` [.item-kind]#public#
  784. == Extensions
  785. :getRoleMember: pass:normal[xref:#IAccessControlEnumerable-getRoleMember-bytes32-uint256-[`++getRoleMember++`]]
  786. :getRoleMemberCount: pass:normal[xref:#IAccessControlEnumerable-getRoleMemberCount-bytes32-[`++getRoleMemberCount++`]]
  787. [.contract]
  788. [[IAccessControlEnumerable]]
  789. === `++IAccessControlEnumerable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/extensions/IAccessControlEnumerable.sol[{github-icon},role=heading-link]
  790. [.hljs-theme-light.nopadding]
  791. ```solidity
  792. import "@openzeppelin/contracts/access/extensions/IAccessControlEnumerable.sol";
  793. ```
  794. External interface of AccessControlEnumerable declared to support ERC165 detection.
  795. [.contract-index]
  796. .Functions
  797. --
  798. * {xref-IAccessControlEnumerable-getRoleMember-bytes32-uint256-}[`++getRoleMember(role, index)++`]
  799. * {xref-IAccessControlEnumerable-getRoleMemberCount-bytes32-}[`++getRoleMemberCount(role)++`]
  800. [.contract-subindex-inherited]
  801. .IAccessControl
  802. * {xref-IAccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  803. * {xref-IAccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  804. * {xref-IAccessControl-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  805. * {xref-IAccessControl-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  806. * {xref-IAccessControl-renounceRole-bytes32-address-}[`++renounceRole(role, callerConfirmation)++`]
  807. --
  808. [.contract-index]
  809. .Events
  810. --
  811. [.contract-subindex-inherited]
  812. .IAccessControl
  813. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  814. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  815. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  816. --
  817. [.contract-index]
  818. .Errors
  819. --
  820. [.contract-subindex-inherited]
  821. .IAccessControl
  822. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  823. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  824. --
  825. [.contract-item]
  826. [[IAccessControlEnumerable-getRoleMember-bytes32-uint256-]]
  827. ==== `[.contract-item-name]#++getRoleMember++#++(bytes32 role, uint256 index) → address++` [.item-kind]#external#
  828. Returns one of the accounts that have `role`. `index` must be a
  829. value between 0 and {getRoleMemberCount}, non-inclusive.
  830. Role bearers are not sorted in any particular way, and their ordering may
  831. change at any point.
  832. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
  833. you perform all queries on the same block. See the following
  834. https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
  835. for more information.
  836. [.contract-item]
  837. [[IAccessControlEnumerable-getRoleMemberCount-bytes32-]]
  838. ==== `[.contract-item-name]#++getRoleMemberCount++#++(bytes32 role) → uint256++` [.item-kind]#external#
  839. Returns the number of accounts that have `role`. Can be used
  840. together with {getRoleMember} to enumerate all bearers of a role.
  841. :supportsInterface: pass:normal[xref:#AccessControlEnumerable-supportsInterface-bytes4-[`++supportsInterface++`]]
  842. :getRoleMember: pass:normal[xref:#AccessControlEnumerable-getRoleMember-bytes32-uint256-[`++getRoleMember++`]]
  843. :getRoleMemberCount: pass:normal[xref:#AccessControlEnumerable-getRoleMemberCount-bytes32-[`++getRoleMemberCount++`]]
  844. :_grantRole: pass:normal[xref:#AccessControlEnumerable-_grantRole-bytes32-address-[`++_grantRole++`]]
  845. :_revokeRole: pass:normal[xref:#AccessControlEnumerable-_revokeRole-bytes32-address-[`++_revokeRole++`]]
  846. [.contract]
  847. [[AccessControlEnumerable]]
  848. === `++AccessControlEnumerable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/extensions/AccessControlEnumerable.sol[{github-icon},role=heading-link]
  849. [.hljs-theme-light.nopadding]
  850. ```solidity
  851. import "@openzeppelin/contracts/access/extensions/AccessControlEnumerable.sol";
  852. ```
  853. Extension of {AccessControl} that allows enumerating the members of each role.
  854. [.contract-index]
  855. .Functions
  856. --
  857. * {xref-AccessControlEnumerable-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  858. * {xref-AccessControlEnumerable-getRoleMember-bytes32-uint256-}[`++getRoleMember(role, index)++`]
  859. * {xref-AccessControlEnumerable-getRoleMemberCount-bytes32-}[`++getRoleMemberCount(role)++`]
  860. * {xref-AccessControlEnumerable-_grantRole-bytes32-address-}[`++_grantRole(role, account)++`]
  861. * {xref-AccessControlEnumerable-_revokeRole-bytes32-address-}[`++_revokeRole(role, account)++`]
  862. [.contract-subindex-inherited]
  863. .AccessControl
  864. * {xref-AccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  865. * {xref-AccessControl-_checkRole-bytes32-}[`++_checkRole(role)++`]
  866. * {xref-AccessControl-_checkRole-bytes32-address-}[`++_checkRole(role, account)++`]
  867. * {xref-AccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  868. * {xref-AccessControl-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  869. * {xref-AccessControl-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  870. * {xref-AccessControl-renounceRole-bytes32-address-}[`++renounceRole(role, callerConfirmation)++`]
  871. * {xref-AccessControl-_setRoleAdmin-bytes32-bytes32-}[`++_setRoleAdmin(role, adminRole)++`]
  872. * {xref-AccessControl-DEFAULT_ADMIN_ROLE-bytes32}[`++DEFAULT_ADMIN_ROLE()++`]
  873. [.contract-subindex-inherited]
  874. .ERC165
  875. [.contract-subindex-inherited]
  876. .IERC165
  877. [.contract-subindex-inherited]
  878. .IAccessControlEnumerable
  879. [.contract-subindex-inherited]
  880. .IAccessControl
  881. --
  882. [.contract-index]
  883. .Events
  884. --
  885. [.contract-subindex-inherited]
  886. .AccessControl
  887. [.contract-subindex-inherited]
  888. .ERC165
  889. [.contract-subindex-inherited]
  890. .IERC165
  891. [.contract-subindex-inherited]
  892. .IAccessControlEnumerable
  893. [.contract-subindex-inherited]
  894. .IAccessControl
  895. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  896. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  897. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  898. --
  899. [.contract-index]
  900. .Errors
  901. --
  902. [.contract-subindex-inherited]
  903. .AccessControl
  904. [.contract-subindex-inherited]
  905. .ERC165
  906. [.contract-subindex-inherited]
  907. .IERC165
  908. [.contract-subindex-inherited]
  909. .IAccessControlEnumerable
  910. [.contract-subindex-inherited]
  911. .IAccessControl
  912. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  913. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  914. --
  915. [.contract-item]
  916. [[AccessControlEnumerable-supportsInterface-bytes4-]]
  917. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#public#
  918. See {IERC165-supportsInterface}.
  919. [.contract-item]
  920. [[AccessControlEnumerable-getRoleMember-bytes32-uint256-]]
  921. ==== `[.contract-item-name]#++getRoleMember++#++(bytes32 role, uint256 index) → address++` [.item-kind]#public#
  922. Returns one of the accounts that have `role`. `index` must be a
  923. value between 0 and {getRoleMemberCount}, non-inclusive.
  924. Role bearers are not sorted in any particular way, and their ordering may
  925. change at any point.
  926. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
  927. you perform all queries on the same block. See the following
  928. https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
  929. for more information.
  930. [.contract-item]
  931. [[AccessControlEnumerable-getRoleMemberCount-bytes32-]]
  932. ==== `[.contract-item-name]#++getRoleMemberCount++#++(bytes32 role) → uint256++` [.item-kind]#public#
  933. Returns the number of accounts that have `role`. Can be used
  934. together with {getRoleMember} to enumerate all bearers of a role.
  935. [.contract-item]
  936. [[AccessControlEnumerable-_grantRole-bytes32-address-]]
  937. ==== `[.contract-item-name]#++_grantRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  938. Overload {AccessControl-_grantRole} to track enumerable memberships
  939. [.contract-item]
  940. [[AccessControlEnumerable-_revokeRole-bytes32-address-]]
  941. ==== `[.contract-item-name]#++_revokeRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  942. Overload {AccessControl-_revokeRole} to track enumerable memberships
  943. :AccessControlInvalidDefaultAdmin: pass:normal[xref:#IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-[`++AccessControlInvalidDefaultAdmin++`]]
  944. :AccessControlEnforcedDefaultAdminRules: pass:normal[xref:#IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--[`++AccessControlEnforcedDefaultAdminRules++`]]
  945. :AccessControlEnforcedDefaultAdminDelay: pass:normal[xref:#IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-[`++AccessControlEnforcedDefaultAdminDelay++`]]
  946. :DefaultAdminTransferScheduled: pass:normal[xref:#IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-[`++DefaultAdminTransferScheduled++`]]
  947. :DefaultAdminTransferCanceled: pass:normal[xref:#IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--[`++DefaultAdminTransferCanceled++`]]
  948. :DefaultAdminDelayChangeScheduled: pass:normal[xref:#IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-[`++DefaultAdminDelayChangeScheduled++`]]
  949. :DefaultAdminDelayChangeCanceled: pass:normal[xref:#IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--[`++DefaultAdminDelayChangeCanceled++`]]
  950. :defaultAdmin: pass:normal[xref:#IAccessControlDefaultAdminRules-defaultAdmin--[`++defaultAdmin++`]]
  951. :pendingDefaultAdmin: pass:normal[xref:#IAccessControlDefaultAdminRules-pendingDefaultAdmin--[`++pendingDefaultAdmin++`]]
  952. :defaultAdminDelay: pass:normal[xref:#IAccessControlDefaultAdminRules-defaultAdminDelay--[`++defaultAdminDelay++`]]
  953. :pendingDefaultAdminDelay: pass:normal[xref:#IAccessControlDefaultAdminRules-pendingDefaultAdminDelay--[`++pendingDefaultAdminDelay++`]]
  954. :beginDefaultAdminTransfer: pass:normal[xref:#IAccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-[`++beginDefaultAdminTransfer++`]]
  955. :cancelDefaultAdminTransfer: pass:normal[xref:#IAccessControlDefaultAdminRules-cancelDefaultAdminTransfer--[`++cancelDefaultAdminTransfer++`]]
  956. :acceptDefaultAdminTransfer: pass:normal[xref:#IAccessControlDefaultAdminRules-acceptDefaultAdminTransfer--[`++acceptDefaultAdminTransfer++`]]
  957. :changeDefaultAdminDelay: pass:normal[xref:#IAccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-[`++changeDefaultAdminDelay++`]]
  958. :rollbackDefaultAdminDelay: pass:normal[xref:#IAccessControlDefaultAdminRules-rollbackDefaultAdminDelay--[`++rollbackDefaultAdminDelay++`]]
  959. :defaultAdminDelayIncreaseWait: pass:normal[xref:#IAccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--[`++defaultAdminDelayIncreaseWait++`]]
  960. [.contract]
  961. [[IAccessControlDefaultAdminRules]]
  962. === `++IAccessControlDefaultAdminRules++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/extensions/IAccessControlDefaultAdminRules.sol[{github-icon},role=heading-link]
  963. [.hljs-theme-light.nopadding]
  964. ```solidity
  965. import "@openzeppelin/contracts/access/extensions/IAccessControlDefaultAdminRules.sol";
  966. ```
  967. External interface of AccessControlDefaultAdminRules declared to support ERC165 detection.
  968. [.contract-index]
  969. .Functions
  970. --
  971. * {xref-IAccessControlDefaultAdminRules-defaultAdmin--}[`++defaultAdmin()++`]
  972. * {xref-IAccessControlDefaultAdminRules-pendingDefaultAdmin--}[`++pendingDefaultAdmin()++`]
  973. * {xref-IAccessControlDefaultAdminRules-defaultAdminDelay--}[`++defaultAdminDelay()++`]
  974. * {xref-IAccessControlDefaultAdminRules-pendingDefaultAdminDelay--}[`++pendingDefaultAdminDelay()++`]
  975. * {xref-IAccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-}[`++beginDefaultAdminTransfer(newAdmin)++`]
  976. * {xref-IAccessControlDefaultAdminRules-cancelDefaultAdminTransfer--}[`++cancelDefaultAdminTransfer()++`]
  977. * {xref-IAccessControlDefaultAdminRules-acceptDefaultAdminTransfer--}[`++acceptDefaultAdminTransfer()++`]
  978. * {xref-IAccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-}[`++changeDefaultAdminDelay(newDelay)++`]
  979. * {xref-IAccessControlDefaultAdminRules-rollbackDefaultAdminDelay--}[`++rollbackDefaultAdminDelay()++`]
  980. * {xref-IAccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--}[`++defaultAdminDelayIncreaseWait()++`]
  981. [.contract-subindex-inherited]
  982. .IAccessControl
  983. * {xref-IAccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  984. * {xref-IAccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  985. * {xref-IAccessControl-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  986. * {xref-IAccessControl-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  987. * {xref-IAccessControl-renounceRole-bytes32-address-}[`++renounceRole(role, callerConfirmation)++`]
  988. --
  989. [.contract-index]
  990. .Events
  991. --
  992. * {xref-IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-}[`++DefaultAdminTransferScheduled(newAdmin, acceptSchedule)++`]
  993. * {xref-IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--}[`++DefaultAdminTransferCanceled()++`]
  994. * {xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-}[`++DefaultAdminDelayChangeScheduled(newDelay, effectSchedule)++`]
  995. * {xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--}[`++DefaultAdminDelayChangeCanceled()++`]
  996. [.contract-subindex-inherited]
  997. .IAccessControl
  998. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  999. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  1000. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  1001. --
  1002. [.contract-index]
  1003. .Errors
  1004. --
  1005. * {xref-IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-}[`++AccessControlInvalidDefaultAdmin(defaultAdmin)++`]
  1006. * {xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--}[`++AccessControlEnforcedDefaultAdminRules()++`]
  1007. * {xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-}[`++AccessControlEnforcedDefaultAdminDelay(schedule)++`]
  1008. [.contract-subindex-inherited]
  1009. .IAccessControl
  1010. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  1011. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  1012. --
  1013. [.contract-item]
  1014. [[IAccessControlDefaultAdminRules-defaultAdmin--]]
  1015. ==== `[.contract-item-name]#++defaultAdmin++#++() → address++` [.item-kind]#external#
  1016. Returns the address of the current `DEFAULT_ADMIN_ROLE` holder.
  1017. [.contract-item]
  1018. [[IAccessControlDefaultAdminRules-pendingDefaultAdmin--]]
  1019. ==== `[.contract-item-name]#++pendingDefaultAdmin++#++() → address newAdmin, uint48 acceptSchedule++` [.item-kind]#external#
  1020. Returns a tuple of a `newAdmin` and an accept schedule.
  1021. After the `schedule` passes, the `newAdmin` will be able to accept the {defaultAdmin} role
  1022. by calling {acceptDefaultAdminTransfer}, completing the role transfer.
  1023. A zero value only in `acceptSchedule` indicates no pending admin transfer.
  1024. NOTE: A zero address `newAdmin` means that {defaultAdmin} is being renounced.
  1025. [.contract-item]
  1026. [[IAccessControlDefaultAdminRules-defaultAdminDelay--]]
  1027. ==== `[.contract-item-name]#++defaultAdminDelay++#++() → uint48++` [.item-kind]#external#
  1028. Returns the delay required to schedule the acceptance of a {defaultAdmin} transfer started.
  1029. This delay will be added to the current timestamp when calling {beginDefaultAdminTransfer} to set
  1030. the acceptance schedule.
  1031. NOTE: If a delay change has been scheduled, it will take effect as soon as the schedule passes, making this
  1032. function returns the new delay. See {changeDefaultAdminDelay}.
  1033. [.contract-item]
  1034. [[IAccessControlDefaultAdminRules-pendingDefaultAdminDelay--]]
  1035. ==== `[.contract-item-name]#++pendingDefaultAdminDelay++#++() → uint48 newDelay, uint48 effectSchedule++` [.item-kind]#external#
  1036. Returns a tuple of `newDelay` and an effect schedule.
  1037. After the `schedule` passes, the `newDelay` will get into effect immediately for every
  1038. new {defaultAdmin} transfer started with {beginDefaultAdminTransfer}.
  1039. A zero value only in `effectSchedule` indicates no pending delay change.
  1040. NOTE: A zero value only for `newDelay` means that the next {defaultAdminDelay}
  1041. will be zero after the effect schedule.
  1042. [.contract-item]
  1043. [[IAccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-]]
  1044. ==== `[.contract-item-name]#++beginDefaultAdminTransfer++#++(address newAdmin)++` [.item-kind]#external#
  1045. Starts a {defaultAdmin} transfer by setting a {pendingDefaultAdmin} scheduled for acceptance
  1046. after the current timestamp plus a {defaultAdminDelay}.
  1047. Requirements:
  1048. - Only can be called by the current {defaultAdmin}.
  1049. Emits a DefaultAdminRoleChangeStarted event.
  1050. [.contract-item]
  1051. [[IAccessControlDefaultAdminRules-cancelDefaultAdminTransfer--]]
  1052. ==== `[.contract-item-name]#++cancelDefaultAdminTransfer++#++()++` [.item-kind]#external#
  1053. Cancels a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}.
  1054. A {pendingDefaultAdmin} not yet accepted can also be cancelled with this function.
  1055. Requirements:
  1056. - Only can be called by the current {defaultAdmin}.
  1057. May emit a DefaultAdminTransferCanceled event.
  1058. [.contract-item]
  1059. [[IAccessControlDefaultAdminRules-acceptDefaultAdminTransfer--]]
  1060. ==== `[.contract-item-name]#++acceptDefaultAdminTransfer++#++()++` [.item-kind]#external#
  1061. Completes a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}.
  1062. After calling the function:
  1063. - `DEFAULT_ADMIN_ROLE` should be granted to the caller.
  1064. - `DEFAULT_ADMIN_ROLE` should be revoked from the previous holder.
  1065. - {pendingDefaultAdmin} should be reset to zero values.
  1066. Requirements:
  1067. - Only can be called by the {pendingDefaultAdmin}'s `newAdmin`.
  1068. - The {pendingDefaultAdmin}'s `acceptSchedule` should've passed.
  1069. [.contract-item]
  1070. [[IAccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-]]
  1071. ==== `[.contract-item-name]#++changeDefaultAdminDelay++#++(uint48 newDelay)++` [.item-kind]#external#
  1072. Initiates a {defaultAdminDelay} update by setting a {pendingDefaultAdminDelay} scheduled for getting
  1073. into effect after the current timestamp plus a {defaultAdminDelay}.
  1074. This function guarantees that any call to {beginDefaultAdminTransfer} done between the timestamp this
  1075. method is called and the {pendingDefaultAdminDelay} effect schedule will use the current {defaultAdminDelay}
  1076. set before calling.
  1077. The {pendingDefaultAdminDelay}'s effect schedule is defined in a way that waiting until the schedule and then
  1078. calling {beginDefaultAdminTransfer} with the new delay will take at least the same as another {defaultAdmin}
  1079. complete transfer (including acceptance).
  1080. The schedule is designed for two scenarios:
  1081. - When the delay is changed for a larger one the schedule is `block.timestamp + newDelay` capped by
  1082. {defaultAdminDelayIncreaseWait}.
  1083. - When the delay is changed for a shorter one, the schedule is `block.timestamp + (current delay - new delay)`.
  1084. A {pendingDefaultAdminDelay} that never got into effect will be canceled in favor of a new scheduled change.
  1085. Requirements:
  1086. - Only can be called by the current {defaultAdmin}.
  1087. Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event.
  1088. [.contract-item]
  1089. [[IAccessControlDefaultAdminRules-rollbackDefaultAdminDelay--]]
  1090. ==== `[.contract-item-name]#++rollbackDefaultAdminDelay++#++()++` [.item-kind]#external#
  1091. Cancels a scheduled {defaultAdminDelay} change.
  1092. Requirements:
  1093. - Only can be called by the current {defaultAdmin}.
  1094. May emit a DefaultAdminDelayChangeCanceled event.
  1095. [.contract-item]
  1096. [[IAccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--]]
  1097. ==== `[.contract-item-name]#++defaultAdminDelayIncreaseWait++#++() → uint48++` [.item-kind]#external#
  1098. Maximum time in seconds for an increase to {defaultAdminDelay} (that is scheduled using {changeDefaultAdminDelay})
  1099. to take effect. Default to 5 days.
  1100. When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with
  1101. the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds)
  1102. that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can
  1103. be overrode for a custom {defaultAdminDelay} increase scheduling.
  1104. IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise,
  1105. there's a risk of setting a high new delay that goes into effect almost immediately without the
  1106. possibility of human intervention in the case of an input error (eg. set milliseconds instead of seconds).
  1107. [.contract-item]
  1108. [[IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-]]
  1109. ==== `[.contract-item-name]#++DefaultAdminTransferScheduled++#++(address indexed newAdmin, uint48 acceptSchedule)++` [.item-kind]#event#
  1110. Emitted when a {defaultAdmin} transfer is started, setting `newAdmin` as the next
  1111. address to become the {defaultAdmin} by calling {acceptDefaultAdminTransfer} only after `acceptSchedule`
  1112. passes.
  1113. [.contract-item]
  1114. [[IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--]]
  1115. ==== `[.contract-item-name]#++DefaultAdminTransferCanceled++#++()++` [.item-kind]#event#
  1116. Emitted when a {pendingDefaultAdmin} is reset if it was never accepted, regardless of its schedule.
  1117. [.contract-item]
  1118. [[IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-]]
  1119. ==== `[.contract-item-name]#++DefaultAdminDelayChangeScheduled++#++(uint48 newDelay, uint48 effectSchedule)++` [.item-kind]#event#
  1120. Emitted when a {defaultAdminDelay} change is started, setting `newDelay` as the next
  1121. delay to be applied between default admin transfer after `effectSchedule` has passed.
  1122. [.contract-item]
  1123. [[IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--]]
  1124. ==== `[.contract-item-name]#++DefaultAdminDelayChangeCanceled++#++()++` [.item-kind]#event#
  1125. Emitted when a {pendingDefaultAdminDelay} is reset if its schedule didn't pass.
  1126. [.contract-item]
  1127. [[IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-]]
  1128. ==== `[.contract-item-name]#++AccessControlInvalidDefaultAdmin++#++(address defaultAdmin)++` [.item-kind]#error#
  1129. The new default admin is not a valid default admin.
  1130. [.contract-item]
  1131. [[IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--]]
  1132. ==== `[.contract-item-name]#++AccessControlEnforcedDefaultAdminRules++#++()++` [.item-kind]#error#
  1133. At least one of the following rules was violated:
  1134. - The `DEFAULT_ADMIN_ROLE` must only be managed by itself.
  1135. - The `DEFAULT_ADMIN_ROLE` must only be held by one account at the time.
  1136. - Any `DEFAULT_ADMIN_ROLE` transfer must be in two delayed steps.
  1137. [.contract-item]
  1138. [[IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-]]
  1139. ==== `[.contract-item-name]#++AccessControlEnforcedDefaultAdminDelay++#++(uint48 schedule)++` [.item-kind]#error#
  1140. The delay for transferring the default admin delay is enforced and
  1141. the operation must wait until `schedule`.
  1142. NOTE: `schedule` can be 0 indicating there's no transfer scheduled.
  1143. :constructor: pass:normal[xref:#AccessControlDefaultAdminRules-constructor-uint48-address-[`++constructor++`]]
  1144. :supportsInterface: pass:normal[xref:#AccessControlDefaultAdminRules-supportsInterface-bytes4-[`++supportsInterface++`]]
  1145. :owner: pass:normal[xref:#AccessControlDefaultAdminRules-owner--[`++owner++`]]
  1146. :grantRole: pass:normal[xref:#AccessControlDefaultAdminRules-grantRole-bytes32-address-[`++grantRole++`]]
  1147. :revokeRole: pass:normal[xref:#AccessControlDefaultAdminRules-revokeRole-bytes32-address-[`++revokeRole++`]]
  1148. :renounceRole: pass:normal[xref:#AccessControlDefaultAdminRules-renounceRole-bytes32-address-[`++renounceRole++`]]
  1149. :_grantRole: pass:normal[xref:#AccessControlDefaultAdminRules-_grantRole-bytes32-address-[`++_grantRole++`]]
  1150. :_revokeRole: pass:normal[xref:#AccessControlDefaultAdminRules-_revokeRole-bytes32-address-[`++_revokeRole++`]]
  1151. :_setRoleAdmin: pass:normal[xref:#AccessControlDefaultAdminRules-_setRoleAdmin-bytes32-bytes32-[`++_setRoleAdmin++`]]
  1152. :defaultAdmin: pass:normal[xref:#AccessControlDefaultAdminRules-defaultAdmin--[`++defaultAdmin++`]]
  1153. :pendingDefaultAdmin: pass:normal[xref:#AccessControlDefaultAdminRules-pendingDefaultAdmin--[`++pendingDefaultAdmin++`]]
  1154. :defaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-defaultAdminDelay--[`++defaultAdminDelay++`]]
  1155. :pendingDefaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-pendingDefaultAdminDelay--[`++pendingDefaultAdminDelay++`]]
  1156. :defaultAdminDelayIncreaseWait: pass:normal[xref:#AccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--[`++defaultAdminDelayIncreaseWait++`]]
  1157. :beginDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-[`++beginDefaultAdminTransfer++`]]
  1158. :_beginDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-_beginDefaultAdminTransfer-address-[`++_beginDefaultAdminTransfer++`]]
  1159. :cancelDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-cancelDefaultAdminTransfer--[`++cancelDefaultAdminTransfer++`]]
  1160. :_cancelDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-_cancelDefaultAdminTransfer--[`++_cancelDefaultAdminTransfer++`]]
  1161. :acceptDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-acceptDefaultAdminTransfer--[`++acceptDefaultAdminTransfer++`]]
  1162. :_acceptDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-_acceptDefaultAdminTransfer--[`++_acceptDefaultAdminTransfer++`]]
  1163. :changeDefaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-[`++changeDefaultAdminDelay++`]]
  1164. :_changeDefaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-_changeDefaultAdminDelay-uint48-[`++_changeDefaultAdminDelay++`]]
  1165. :rollbackDefaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-rollbackDefaultAdminDelay--[`++rollbackDefaultAdminDelay++`]]
  1166. :_rollbackDefaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-_rollbackDefaultAdminDelay--[`++_rollbackDefaultAdminDelay++`]]
  1167. :_delayChangeWait: pass:normal[xref:#AccessControlDefaultAdminRules-_delayChangeWait-uint48-[`++_delayChangeWait++`]]
  1168. [.contract]
  1169. [[AccessControlDefaultAdminRules]]
  1170. === `++AccessControlDefaultAdminRules++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/extensions/AccessControlDefaultAdminRules.sol[{github-icon},role=heading-link]
  1171. [.hljs-theme-light.nopadding]
  1172. ```solidity
  1173. import "@openzeppelin/contracts/access/extensions/AccessControlDefaultAdminRules.sol";
  1174. ```
  1175. Extension of {AccessControl} that allows specifying special rules to manage
  1176. the `DEFAULT_ADMIN_ROLE` holder, which is a sensitive role with special permissions
  1177. over other roles that may potentially have privileged rights in the system.
  1178. If a specific role doesn't have an admin role assigned, the holder of the
  1179. `DEFAULT_ADMIN_ROLE` will have the ability to grant it and revoke it.
  1180. This contract implements the following risk mitigations on top of {AccessControl}:
  1181. * Only one account holds the `DEFAULT_ADMIN_ROLE` since deployment until it's potentially renounced.
  1182. * Enforces a 2-step process to transfer the `DEFAULT_ADMIN_ROLE` to another account.
  1183. * Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted.
  1184. * The delay can be changed by scheduling, see {changeDefaultAdminDelay}.
  1185. * It is not possible to use another role to manage the `DEFAULT_ADMIN_ROLE`.
  1186. Example usage:
  1187. ```solidity
  1188. contract MyToken is AccessControlDefaultAdminRules {
  1189. constructor() AccessControlDefaultAdminRules(
  1190. 3 days,
  1191. msg.sender // Explicit initial `DEFAULT_ADMIN_ROLE` holder
  1192. ) {}
  1193. }
  1194. ```
  1195. [.contract-index]
  1196. .Functions
  1197. --
  1198. * {xref-AccessControlDefaultAdminRules-constructor-uint48-address-}[`++constructor(initialDelay, initialDefaultAdmin)++`]
  1199. * {xref-AccessControlDefaultAdminRules-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  1200. * {xref-AccessControlDefaultAdminRules-owner--}[`++owner()++`]
  1201. * {xref-AccessControlDefaultAdminRules-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  1202. * {xref-AccessControlDefaultAdminRules-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  1203. * {xref-AccessControlDefaultAdminRules-renounceRole-bytes32-address-}[`++renounceRole(role, account)++`]
  1204. * {xref-AccessControlDefaultAdminRules-_grantRole-bytes32-address-}[`++_grantRole(role, account)++`]
  1205. * {xref-AccessControlDefaultAdminRules-_revokeRole-bytes32-address-}[`++_revokeRole(role, account)++`]
  1206. * {xref-AccessControlDefaultAdminRules-_setRoleAdmin-bytes32-bytes32-}[`++_setRoleAdmin(role, adminRole)++`]
  1207. * {xref-AccessControlDefaultAdminRules-defaultAdmin--}[`++defaultAdmin()++`]
  1208. * {xref-AccessControlDefaultAdminRules-pendingDefaultAdmin--}[`++pendingDefaultAdmin()++`]
  1209. * {xref-AccessControlDefaultAdminRules-defaultAdminDelay--}[`++defaultAdminDelay()++`]
  1210. * {xref-AccessControlDefaultAdminRules-pendingDefaultAdminDelay--}[`++pendingDefaultAdminDelay()++`]
  1211. * {xref-AccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--}[`++defaultAdminDelayIncreaseWait()++`]
  1212. * {xref-AccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-}[`++beginDefaultAdminTransfer(newAdmin)++`]
  1213. * {xref-AccessControlDefaultAdminRules-_beginDefaultAdminTransfer-address-}[`++_beginDefaultAdminTransfer(newAdmin)++`]
  1214. * {xref-AccessControlDefaultAdminRules-cancelDefaultAdminTransfer--}[`++cancelDefaultAdminTransfer()++`]
  1215. * {xref-AccessControlDefaultAdminRules-_cancelDefaultAdminTransfer--}[`++_cancelDefaultAdminTransfer()++`]
  1216. * {xref-AccessControlDefaultAdminRules-acceptDefaultAdminTransfer--}[`++acceptDefaultAdminTransfer()++`]
  1217. * {xref-AccessControlDefaultAdminRules-_acceptDefaultAdminTransfer--}[`++_acceptDefaultAdminTransfer()++`]
  1218. * {xref-AccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-}[`++changeDefaultAdminDelay(newDelay)++`]
  1219. * {xref-AccessControlDefaultAdminRules-_changeDefaultAdminDelay-uint48-}[`++_changeDefaultAdminDelay(newDelay)++`]
  1220. * {xref-AccessControlDefaultAdminRules-rollbackDefaultAdminDelay--}[`++rollbackDefaultAdminDelay()++`]
  1221. * {xref-AccessControlDefaultAdminRules-_rollbackDefaultAdminDelay--}[`++_rollbackDefaultAdminDelay()++`]
  1222. * {xref-AccessControlDefaultAdminRules-_delayChangeWait-uint48-}[`++_delayChangeWait(newDelay)++`]
  1223. [.contract-subindex-inherited]
  1224. .AccessControl
  1225. * {xref-AccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  1226. * {xref-AccessControl-_checkRole-bytes32-}[`++_checkRole(role)++`]
  1227. * {xref-AccessControl-_checkRole-bytes32-address-}[`++_checkRole(role, account)++`]
  1228. * {xref-AccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  1229. * {xref-AccessControl-DEFAULT_ADMIN_ROLE-bytes32}[`++DEFAULT_ADMIN_ROLE()++`]
  1230. [.contract-subindex-inherited]
  1231. .ERC165
  1232. [.contract-subindex-inherited]
  1233. .IERC165
  1234. [.contract-subindex-inherited]
  1235. .IERC5313
  1236. [.contract-subindex-inherited]
  1237. .IAccessControlDefaultAdminRules
  1238. [.contract-subindex-inherited]
  1239. .IAccessControl
  1240. --
  1241. [.contract-index]
  1242. .Events
  1243. --
  1244. [.contract-subindex-inherited]
  1245. .AccessControl
  1246. [.contract-subindex-inherited]
  1247. .ERC165
  1248. [.contract-subindex-inherited]
  1249. .IERC165
  1250. [.contract-subindex-inherited]
  1251. .IERC5313
  1252. [.contract-subindex-inherited]
  1253. .IAccessControlDefaultAdminRules
  1254. * {xref-IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-}[`++DefaultAdminTransferScheduled(newAdmin, acceptSchedule)++`]
  1255. * {xref-IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--}[`++DefaultAdminTransferCanceled()++`]
  1256. * {xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-}[`++DefaultAdminDelayChangeScheduled(newDelay, effectSchedule)++`]
  1257. * {xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--}[`++DefaultAdminDelayChangeCanceled()++`]
  1258. [.contract-subindex-inherited]
  1259. .IAccessControl
  1260. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  1261. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  1262. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  1263. --
  1264. [.contract-index]
  1265. .Errors
  1266. --
  1267. [.contract-subindex-inherited]
  1268. .AccessControl
  1269. [.contract-subindex-inherited]
  1270. .ERC165
  1271. [.contract-subindex-inherited]
  1272. .IERC165
  1273. [.contract-subindex-inherited]
  1274. .IERC5313
  1275. [.contract-subindex-inherited]
  1276. .IAccessControlDefaultAdminRules
  1277. * {xref-IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-}[`++AccessControlInvalidDefaultAdmin(defaultAdmin)++`]
  1278. * {xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--}[`++AccessControlEnforcedDefaultAdminRules()++`]
  1279. * {xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-}[`++AccessControlEnforcedDefaultAdminDelay(schedule)++`]
  1280. [.contract-subindex-inherited]
  1281. .IAccessControl
  1282. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  1283. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  1284. --
  1285. [.contract-item]
  1286. [[AccessControlDefaultAdminRules-constructor-uint48-address-]]
  1287. ==== `[.contract-item-name]#++constructor++#++(uint48 initialDelay, address initialDefaultAdmin)++` [.item-kind]#internal#
  1288. Sets the initial values for {defaultAdminDelay} and {defaultAdmin} address.
  1289. [.contract-item]
  1290. [[AccessControlDefaultAdminRules-supportsInterface-bytes4-]]
  1291. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#public#
  1292. See {IERC165-supportsInterface}.
  1293. [.contract-item]
  1294. [[AccessControlDefaultAdminRules-owner--]]
  1295. ==== `[.contract-item-name]#++owner++#++() → address++` [.item-kind]#public#
  1296. See {IERC5313-owner}.
  1297. [.contract-item]
  1298. [[AccessControlDefaultAdminRules-grantRole-bytes32-address-]]
  1299. ==== `[.contract-item-name]#++grantRole++#++(bytes32 role, address account)++` [.item-kind]#public#
  1300. See {AccessControl-grantRole}. Reverts for `DEFAULT_ADMIN_ROLE`.
  1301. [.contract-item]
  1302. [[AccessControlDefaultAdminRules-revokeRole-bytes32-address-]]
  1303. ==== `[.contract-item-name]#++revokeRole++#++(bytes32 role, address account)++` [.item-kind]#public#
  1304. See {AccessControl-revokeRole}. Reverts for `DEFAULT_ADMIN_ROLE`.
  1305. [.contract-item]
  1306. [[AccessControlDefaultAdminRules-renounceRole-bytes32-address-]]
  1307. ==== `[.contract-item-name]#++renounceRole++#++(bytes32 role, address account)++` [.item-kind]#public#
  1308. See {AccessControl-renounceRole}.
  1309. For the `DEFAULT_ADMIN_ROLE`, it only allows renouncing in two steps by first calling
  1310. {beginDefaultAdminTransfer} to the `address(0)`, so it's required that the {pendingDefaultAdmin} schedule
  1311. has also passed when calling this function.
  1312. After its execution, it will not be possible to call `onlyRole(DEFAULT_ADMIN_ROLE)` functions.
  1313. NOTE: Renouncing `DEFAULT_ADMIN_ROLE` will leave the contract without a {defaultAdmin},
  1314. thereby disabling any functionality that is only available for it, and the possibility of reassigning a
  1315. non-administrated role.
  1316. [.contract-item]
  1317. [[AccessControlDefaultAdminRules-_grantRole-bytes32-address-]]
  1318. ==== `[.contract-item-name]#++_grantRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  1319. See {AccessControl-_grantRole}.
  1320. For `DEFAULT_ADMIN_ROLE`, it only allows granting if there isn't already a {defaultAdmin} or if the
  1321. role has been previously renounced.
  1322. NOTE: Exposing this function through another mechanism may make the `DEFAULT_ADMIN_ROLE`
  1323. assignable again. Make sure to guarantee this is the expected behavior in your implementation.
  1324. [.contract-item]
  1325. [[AccessControlDefaultAdminRules-_revokeRole-bytes32-address-]]
  1326. ==== `[.contract-item-name]#++_revokeRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  1327. See {AccessControl-_revokeRole}.
  1328. [.contract-item]
  1329. [[AccessControlDefaultAdminRules-_setRoleAdmin-bytes32-bytes32-]]
  1330. ==== `[.contract-item-name]#++_setRoleAdmin++#++(bytes32 role, bytes32 adminRole)++` [.item-kind]#internal#
  1331. See {AccessControl-_setRoleAdmin}. Reverts for `DEFAULT_ADMIN_ROLE`.
  1332. [.contract-item]
  1333. [[AccessControlDefaultAdminRules-defaultAdmin--]]
  1334. ==== `[.contract-item-name]#++defaultAdmin++#++() → address++` [.item-kind]#public#
  1335. Returns the address of the current `DEFAULT_ADMIN_ROLE` holder.
  1336. [.contract-item]
  1337. [[AccessControlDefaultAdminRules-pendingDefaultAdmin--]]
  1338. ==== `[.contract-item-name]#++pendingDefaultAdmin++#++() → address newAdmin, uint48 schedule++` [.item-kind]#public#
  1339. Returns a tuple of a `newAdmin` and an accept schedule.
  1340. After the `schedule` passes, the `newAdmin` will be able to accept the {defaultAdmin} role
  1341. by calling {acceptDefaultAdminTransfer}, completing the role transfer.
  1342. A zero value only in `acceptSchedule` indicates no pending admin transfer.
  1343. NOTE: A zero address `newAdmin` means that {defaultAdmin} is being renounced.
  1344. [.contract-item]
  1345. [[AccessControlDefaultAdminRules-defaultAdminDelay--]]
  1346. ==== `[.contract-item-name]#++defaultAdminDelay++#++() → uint48++` [.item-kind]#public#
  1347. Returns the delay required to schedule the acceptance of a {defaultAdmin} transfer started.
  1348. This delay will be added to the current timestamp when calling {beginDefaultAdminTransfer} to set
  1349. the acceptance schedule.
  1350. NOTE: If a delay change has been scheduled, it will take effect as soon as the schedule passes, making this
  1351. function returns the new delay. See {changeDefaultAdminDelay}.
  1352. [.contract-item]
  1353. [[AccessControlDefaultAdminRules-pendingDefaultAdminDelay--]]
  1354. ==== `[.contract-item-name]#++pendingDefaultAdminDelay++#++() → uint48 newDelay, uint48 schedule++` [.item-kind]#public#
  1355. Returns a tuple of `newDelay` and an effect schedule.
  1356. After the `schedule` passes, the `newDelay` will get into effect immediately for every
  1357. new {defaultAdmin} transfer started with {beginDefaultAdminTransfer}.
  1358. A zero value only in `effectSchedule` indicates no pending delay change.
  1359. NOTE: A zero value only for `newDelay` means that the next {defaultAdminDelay}
  1360. will be zero after the effect schedule.
  1361. [.contract-item]
  1362. [[AccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--]]
  1363. ==== `[.contract-item-name]#++defaultAdminDelayIncreaseWait++#++() → uint48++` [.item-kind]#public#
  1364. Maximum time in seconds for an increase to {defaultAdminDelay} (that is scheduled using {changeDefaultAdminDelay})
  1365. to take effect. Default to 5 days.
  1366. When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with
  1367. the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds)
  1368. that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can
  1369. be overrode for a custom {defaultAdminDelay} increase scheduling.
  1370. IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise,
  1371. there's a risk of setting a high new delay that goes into effect almost immediately without the
  1372. possibility of human intervention in the case of an input error (eg. set milliseconds instead of seconds).
  1373. [.contract-item]
  1374. [[AccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-]]
  1375. ==== `[.contract-item-name]#++beginDefaultAdminTransfer++#++(address newAdmin)++` [.item-kind]#public#
  1376. Starts a {defaultAdmin} transfer by setting a {pendingDefaultAdmin} scheduled for acceptance
  1377. after the current timestamp plus a {defaultAdminDelay}.
  1378. Requirements:
  1379. - Only can be called by the current {defaultAdmin}.
  1380. Emits a DefaultAdminRoleChangeStarted event.
  1381. [.contract-item]
  1382. [[AccessControlDefaultAdminRules-_beginDefaultAdminTransfer-address-]]
  1383. ==== `[.contract-item-name]#++_beginDefaultAdminTransfer++#++(address newAdmin)++` [.item-kind]#internal#
  1384. See {beginDefaultAdminTransfer}.
  1385. Internal function without access restriction.
  1386. [.contract-item]
  1387. [[AccessControlDefaultAdminRules-cancelDefaultAdminTransfer--]]
  1388. ==== `[.contract-item-name]#++cancelDefaultAdminTransfer++#++()++` [.item-kind]#public#
  1389. Cancels a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}.
  1390. A {pendingDefaultAdmin} not yet accepted can also be cancelled with this function.
  1391. Requirements:
  1392. - Only can be called by the current {defaultAdmin}.
  1393. May emit a DefaultAdminTransferCanceled event.
  1394. [.contract-item]
  1395. [[AccessControlDefaultAdminRules-_cancelDefaultAdminTransfer--]]
  1396. ==== `[.contract-item-name]#++_cancelDefaultAdminTransfer++#++()++` [.item-kind]#internal#
  1397. See {cancelDefaultAdminTransfer}.
  1398. Internal function without access restriction.
  1399. [.contract-item]
  1400. [[AccessControlDefaultAdminRules-acceptDefaultAdminTransfer--]]
  1401. ==== `[.contract-item-name]#++acceptDefaultAdminTransfer++#++()++` [.item-kind]#public#
  1402. Completes a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}.
  1403. After calling the function:
  1404. - `DEFAULT_ADMIN_ROLE` should be granted to the caller.
  1405. - `DEFAULT_ADMIN_ROLE` should be revoked from the previous holder.
  1406. - {pendingDefaultAdmin} should be reset to zero values.
  1407. Requirements:
  1408. - Only can be called by the {pendingDefaultAdmin}'s `newAdmin`.
  1409. - The {pendingDefaultAdmin}'s `acceptSchedule` should've passed.
  1410. [.contract-item]
  1411. [[AccessControlDefaultAdminRules-_acceptDefaultAdminTransfer--]]
  1412. ==== `[.contract-item-name]#++_acceptDefaultAdminTransfer++#++()++` [.item-kind]#internal#
  1413. See {acceptDefaultAdminTransfer}.
  1414. Internal function without access restriction.
  1415. [.contract-item]
  1416. [[AccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-]]
  1417. ==== `[.contract-item-name]#++changeDefaultAdminDelay++#++(uint48 newDelay)++` [.item-kind]#public#
  1418. Initiates a {defaultAdminDelay} update by setting a {pendingDefaultAdminDelay} scheduled for getting
  1419. into effect after the current timestamp plus a {defaultAdminDelay}.
  1420. This function guarantees that any call to {beginDefaultAdminTransfer} done between the timestamp this
  1421. method is called and the {pendingDefaultAdminDelay} effect schedule will use the current {defaultAdminDelay}
  1422. set before calling.
  1423. The {pendingDefaultAdminDelay}'s effect schedule is defined in a way that waiting until the schedule and then
  1424. calling {beginDefaultAdminTransfer} with the new delay will take at least the same as another {defaultAdmin}
  1425. complete transfer (including acceptance).
  1426. The schedule is designed for two scenarios:
  1427. - When the delay is changed for a larger one the schedule is `block.timestamp + newDelay` capped by
  1428. {defaultAdminDelayIncreaseWait}.
  1429. - When the delay is changed for a shorter one, the schedule is `block.timestamp + (current delay - new delay)`.
  1430. A {pendingDefaultAdminDelay} that never got into effect will be canceled in favor of a new scheduled change.
  1431. Requirements:
  1432. - Only can be called by the current {defaultAdmin}.
  1433. Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event.
  1434. [.contract-item]
  1435. [[AccessControlDefaultAdminRules-_changeDefaultAdminDelay-uint48-]]
  1436. ==== `[.contract-item-name]#++_changeDefaultAdminDelay++#++(uint48 newDelay)++` [.item-kind]#internal#
  1437. See {changeDefaultAdminDelay}.
  1438. Internal function without access restriction.
  1439. [.contract-item]
  1440. [[AccessControlDefaultAdminRules-rollbackDefaultAdminDelay--]]
  1441. ==== `[.contract-item-name]#++rollbackDefaultAdminDelay++#++()++` [.item-kind]#public#
  1442. Cancels a scheduled {defaultAdminDelay} change.
  1443. Requirements:
  1444. - Only can be called by the current {defaultAdmin}.
  1445. May emit a DefaultAdminDelayChangeCanceled event.
  1446. [.contract-item]
  1447. [[AccessControlDefaultAdminRules-_rollbackDefaultAdminDelay--]]
  1448. ==== `[.contract-item-name]#++_rollbackDefaultAdminDelay++#++()++` [.item-kind]#internal#
  1449. See {rollbackDefaultAdminDelay}.
  1450. Internal function without access restriction.
  1451. [.contract-item]
  1452. [[AccessControlDefaultAdminRules-_delayChangeWait-uint48-]]
  1453. ==== `[.contract-item-name]#++_delayChangeWait++#++(uint48 newDelay) → uint48++` [.item-kind]#internal#
  1454. Returns the amount of seconds to wait after the `newDelay` will
  1455. become the new {defaultAdminDelay}.
  1456. The value returned guarantees that if the delay is reduced, it will go into effect
  1457. after a wait that honors the previously set delay.
  1458. See {defaultAdminDelayIncreaseWait}.
  1459. == AccessManager
  1460. :canCall: pass:normal[xref:#IAuthority-canCall-address-address-bytes4-[`++canCall++`]]
  1461. [.contract]
  1462. [[IAuthority]]
  1463. === `++IAuthority++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/manager/IAuthority.sol[{github-icon},role=heading-link]
  1464. [.hljs-theme-light.nopadding]
  1465. ```solidity
  1466. import "@openzeppelin/contracts/access/manager/IAuthority.sol";
  1467. ```
  1468. Standard interface for permissioning originally defined in Dappsys.
  1469. [.contract-index]
  1470. .Functions
  1471. --
  1472. * {xref-IAuthority-canCall-address-address-bytes4-}[`++canCall(caller, target, selector)++`]
  1473. --
  1474. [.contract-item]
  1475. [[IAuthority-canCall-address-address-bytes4-]]
  1476. ==== `[.contract-item-name]#++canCall++#++(address caller, address target, bytes4 selector) → bool allowed++` [.item-kind]#external#
  1477. Returns true if the caller can invoke on a target the function identified by a function selector.
  1478. :OperationScheduled: pass:normal[xref:#IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-[`++OperationScheduled++`]]
  1479. :OperationExecuted: pass:normal[xref:#IAccessManager-OperationExecuted-bytes32-uint32-[`++OperationExecuted++`]]
  1480. :OperationCanceled: pass:normal[xref:#IAccessManager-OperationCanceled-bytes32-uint32-[`++OperationCanceled++`]]
  1481. :RoleLabel: pass:normal[xref:#IAccessManager-RoleLabel-uint64-string-[`++RoleLabel++`]]
  1482. :RoleGranted: pass:normal[xref:#IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-[`++RoleGranted++`]]
  1483. :RoleRevoked: pass:normal[xref:#IAccessManager-RoleRevoked-uint64-address-[`++RoleRevoked++`]]
  1484. :RoleAdminChanged: pass:normal[xref:#IAccessManager-RoleAdminChanged-uint64-uint64-[`++RoleAdminChanged++`]]
  1485. :RoleGuardianChanged: pass:normal[xref:#IAccessManager-RoleGuardianChanged-uint64-uint64-[`++RoleGuardianChanged++`]]
  1486. :RoleGrantDelayChanged: pass:normal[xref:#IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-[`++RoleGrantDelayChanged++`]]
  1487. :TargetClosed: pass:normal[xref:#IAccessManager-TargetClosed-address-bool-[`++TargetClosed++`]]
  1488. :TargetFunctionRoleUpdated: pass:normal[xref:#IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-[`++TargetFunctionRoleUpdated++`]]
  1489. :TargetAdminDelayUpdated: pass:normal[xref:#IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-[`++TargetAdminDelayUpdated++`]]
  1490. :AccessManagerAlreadyScheduled: pass:normal[xref:#IAccessManager-AccessManagerAlreadyScheduled-bytes32-[`++AccessManagerAlreadyScheduled++`]]
  1491. :AccessManagerNotScheduled: pass:normal[xref:#IAccessManager-AccessManagerNotScheduled-bytes32-[`++AccessManagerNotScheduled++`]]
  1492. :AccessManagerNotReady: pass:normal[xref:#IAccessManager-AccessManagerNotReady-bytes32-[`++AccessManagerNotReady++`]]
  1493. :AccessManagerExpired: pass:normal[xref:#IAccessManager-AccessManagerExpired-bytes32-[`++AccessManagerExpired++`]]
  1494. :AccessManagerLockedAccount: pass:normal[xref:#IAccessManager-AccessManagerLockedAccount-address-[`++AccessManagerLockedAccount++`]]
  1495. :AccessManagerLockedRole: pass:normal[xref:#IAccessManager-AccessManagerLockedRole-uint64-[`++AccessManagerLockedRole++`]]
  1496. :AccessManagerBadConfirmation: pass:normal[xref:#IAccessManager-AccessManagerBadConfirmation--[`++AccessManagerBadConfirmation++`]]
  1497. :AccessManagerUnauthorizedAccount: pass:normal[xref:#IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-[`++AccessManagerUnauthorizedAccount++`]]
  1498. :AccessManagerUnauthorizedCall: pass:normal[xref:#IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-[`++AccessManagerUnauthorizedCall++`]]
  1499. :AccessManagerUnauthorizedConsume: pass:normal[xref:#IAccessManager-AccessManagerUnauthorizedConsume-address-[`++AccessManagerUnauthorizedConsume++`]]
  1500. :AccessManagerUnauthorizedCancel: pass:normal[xref:#IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-[`++AccessManagerUnauthorizedCancel++`]]
  1501. :AccessManagerInvalidInitialAdmin: pass:normal[xref:#IAccessManager-AccessManagerInvalidInitialAdmin-address-[`++AccessManagerInvalidInitialAdmin++`]]
  1502. :canCall: pass:normal[xref:#IAccessManager-canCall-address-address-bytes4-[`++canCall++`]]
  1503. :expiration: pass:normal[xref:#IAccessManager-expiration--[`++expiration++`]]
  1504. :minSetback: pass:normal[xref:#IAccessManager-minSetback--[`++minSetback++`]]
  1505. :isTargetClosed: pass:normal[xref:#IAccessManager-isTargetClosed-address-[`++isTargetClosed++`]]
  1506. :getTargetFunctionRole: pass:normal[xref:#IAccessManager-getTargetFunctionRole-address-bytes4-[`++getTargetFunctionRole++`]]
  1507. :getTargetAdminDelay: pass:normal[xref:#IAccessManager-getTargetAdminDelay-address-[`++getTargetAdminDelay++`]]
  1508. :getRoleAdmin: pass:normal[xref:#IAccessManager-getRoleAdmin-uint64-[`++getRoleAdmin++`]]
  1509. :getRoleGuardian: pass:normal[xref:#IAccessManager-getRoleGuardian-uint64-[`++getRoleGuardian++`]]
  1510. :getRoleGrantDelay: pass:normal[xref:#IAccessManager-getRoleGrantDelay-uint64-[`++getRoleGrantDelay++`]]
  1511. :getAccess: pass:normal[xref:#IAccessManager-getAccess-uint64-address-[`++getAccess++`]]
  1512. :hasRole: pass:normal[xref:#IAccessManager-hasRole-uint64-address-[`++hasRole++`]]
  1513. :labelRole: pass:normal[xref:#IAccessManager-labelRole-uint64-string-[`++labelRole++`]]
  1514. :grantRole: pass:normal[xref:#IAccessManager-grantRole-uint64-address-uint32-[`++grantRole++`]]
  1515. :revokeRole: pass:normal[xref:#IAccessManager-revokeRole-uint64-address-[`++revokeRole++`]]
  1516. :renounceRole: pass:normal[xref:#IAccessManager-renounceRole-uint64-address-[`++renounceRole++`]]
  1517. :setRoleAdmin: pass:normal[xref:#IAccessManager-setRoleAdmin-uint64-uint64-[`++setRoleAdmin++`]]
  1518. :setRoleGuardian: pass:normal[xref:#IAccessManager-setRoleGuardian-uint64-uint64-[`++setRoleGuardian++`]]
  1519. :setGrantDelay: pass:normal[xref:#IAccessManager-setGrantDelay-uint64-uint32-[`++setGrantDelay++`]]
  1520. :setTargetFunctionRole: pass:normal[xref:#IAccessManager-setTargetFunctionRole-address-bytes4---uint64-[`++setTargetFunctionRole++`]]
  1521. :setTargetAdminDelay: pass:normal[xref:#IAccessManager-setTargetAdminDelay-address-uint32-[`++setTargetAdminDelay++`]]
  1522. :setTargetClosed: pass:normal[xref:#IAccessManager-setTargetClosed-address-bool-[`++setTargetClosed++`]]
  1523. :getSchedule: pass:normal[xref:#IAccessManager-getSchedule-bytes32-[`++getSchedule++`]]
  1524. :getNonce: pass:normal[xref:#IAccessManager-getNonce-bytes32-[`++getNonce++`]]
  1525. :schedule: pass:normal[xref:#IAccessManager-schedule-address-bytes-uint48-[`++schedule++`]]
  1526. :execute: pass:normal[xref:#IAccessManager-execute-address-bytes-[`++execute++`]]
  1527. :cancel: pass:normal[xref:#IAccessManager-cancel-address-address-bytes-[`++cancel++`]]
  1528. :consumeScheduledOp: pass:normal[xref:#IAccessManager-consumeScheduledOp-address-bytes-[`++consumeScheduledOp++`]]
  1529. :hashOperation: pass:normal[xref:#IAccessManager-hashOperation-address-address-bytes-[`++hashOperation++`]]
  1530. :updateAuthority: pass:normal[xref:#IAccessManager-updateAuthority-address-address-[`++updateAuthority++`]]
  1531. [.contract]
  1532. [[IAccessManager]]
  1533. === `++IAccessManager++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/manager/IAccessManager.sol[{github-icon},role=heading-link]
  1534. [.hljs-theme-light.nopadding]
  1535. ```solidity
  1536. import "@openzeppelin/contracts/access/manager/IAccessManager.sol";
  1537. ```
  1538. [.contract-index]
  1539. .Functions
  1540. --
  1541. * {xref-IAccessManager-canCall-address-address-bytes4-}[`++canCall(caller, target, selector)++`]
  1542. * {xref-IAccessManager-expiration--}[`++expiration()++`]
  1543. * {xref-IAccessManager-minSetback--}[`++minSetback()++`]
  1544. * {xref-IAccessManager-isTargetClosed-address-}[`++isTargetClosed(target)++`]
  1545. * {xref-IAccessManager-getTargetFunctionRole-address-bytes4-}[`++getTargetFunctionRole(target, selector)++`]
  1546. * {xref-IAccessManager-getTargetAdminDelay-address-}[`++getTargetAdminDelay(target)++`]
  1547. * {xref-IAccessManager-getRoleAdmin-uint64-}[`++getRoleAdmin(roleId)++`]
  1548. * {xref-IAccessManager-getRoleGuardian-uint64-}[`++getRoleGuardian(roleId)++`]
  1549. * {xref-IAccessManager-getRoleGrantDelay-uint64-}[`++getRoleGrantDelay(roleId)++`]
  1550. * {xref-IAccessManager-getAccess-uint64-address-}[`++getAccess(roleId, account)++`]
  1551. * {xref-IAccessManager-hasRole-uint64-address-}[`++hasRole(roleId, account)++`]
  1552. * {xref-IAccessManager-labelRole-uint64-string-}[`++labelRole(roleId, label)++`]
  1553. * {xref-IAccessManager-grantRole-uint64-address-uint32-}[`++grantRole(roleId, account, executionDelay)++`]
  1554. * {xref-IAccessManager-revokeRole-uint64-address-}[`++revokeRole(roleId, account)++`]
  1555. * {xref-IAccessManager-renounceRole-uint64-address-}[`++renounceRole(roleId, callerConfirmation)++`]
  1556. * {xref-IAccessManager-setRoleAdmin-uint64-uint64-}[`++setRoleAdmin(roleId, admin)++`]
  1557. * {xref-IAccessManager-setRoleGuardian-uint64-uint64-}[`++setRoleGuardian(roleId, guardian)++`]
  1558. * {xref-IAccessManager-setGrantDelay-uint64-uint32-}[`++setGrantDelay(roleId, newDelay)++`]
  1559. * {xref-IAccessManager-setTargetFunctionRole-address-bytes4---uint64-}[`++setTargetFunctionRole(target, selectors, roleId)++`]
  1560. * {xref-IAccessManager-setTargetAdminDelay-address-uint32-}[`++setTargetAdminDelay(target, newDelay)++`]
  1561. * {xref-IAccessManager-setTargetClosed-address-bool-}[`++setTargetClosed(target, closed)++`]
  1562. * {xref-IAccessManager-getSchedule-bytes32-}[`++getSchedule(id)++`]
  1563. * {xref-IAccessManager-getNonce-bytes32-}[`++getNonce(id)++`]
  1564. * {xref-IAccessManager-schedule-address-bytes-uint48-}[`++schedule(target, data, when)++`]
  1565. * {xref-IAccessManager-execute-address-bytes-}[`++execute(target, data)++`]
  1566. * {xref-IAccessManager-cancel-address-address-bytes-}[`++cancel(caller, target, data)++`]
  1567. * {xref-IAccessManager-consumeScheduledOp-address-bytes-}[`++consumeScheduledOp(caller, data)++`]
  1568. * {xref-IAccessManager-hashOperation-address-address-bytes-}[`++hashOperation(caller, target, data)++`]
  1569. * {xref-IAccessManager-updateAuthority-address-address-}[`++updateAuthority(target, newAuthority)++`]
  1570. --
  1571. [.contract-index]
  1572. .Events
  1573. --
  1574. * {xref-IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-}[`++OperationScheduled(operationId, nonce, schedule, caller, target, data)++`]
  1575. * {xref-IAccessManager-OperationExecuted-bytes32-uint32-}[`++OperationExecuted(operationId, nonce)++`]
  1576. * {xref-IAccessManager-OperationCanceled-bytes32-uint32-}[`++OperationCanceled(operationId, nonce)++`]
  1577. * {xref-IAccessManager-RoleLabel-uint64-string-}[`++RoleLabel(roleId, label)++`]
  1578. * {xref-IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-}[`++RoleGranted(roleId, account, delay, since, newMember)++`]
  1579. * {xref-IAccessManager-RoleRevoked-uint64-address-}[`++RoleRevoked(roleId, account)++`]
  1580. * {xref-IAccessManager-RoleAdminChanged-uint64-uint64-}[`++RoleAdminChanged(roleId, admin)++`]
  1581. * {xref-IAccessManager-RoleGuardianChanged-uint64-uint64-}[`++RoleGuardianChanged(roleId, guardian)++`]
  1582. * {xref-IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-}[`++RoleGrantDelayChanged(roleId, delay, since)++`]
  1583. * {xref-IAccessManager-TargetClosed-address-bool-}[`++TargetClosed(target, closed)++`]
  1584. * {xref-IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-}[`++TargetFunctionRoleUpdated(target, selector, roleId)++`]
  1585. * {xref-IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-}[`++TargetAdminDelayUpdated(target, delay, since)++`]
  1586. --
  1587. [.contract-index]
  1588. .Errors
  1589. --
  1590. * {xref-IAccessManager-AccessManagerAlreadyScheduled-bytes32-}[`++AccessManagerAlreadyScheduled(operationId)++`]
  1591. * {xref-IAccessManager-AccessManagerNotScheduled-bytes32-}[`++AccessManagerNotScheduled(operationId)++`]
  1592. * {xref-IAccessManager-AccessManagerNotReady-bytes32-}[`++AccessManagerNotReady(operationId)++`]
  1593. * {xref-IAccessManager-AccessManagerExpired-bytes32-}[`++AccessManagerExpired(operationId)++`]
  1594. * {xref-IAccessManager-AccessManagerLockedAccount-address-}[`++AccessManagerLockedAccount(account)++`]
  1595. * {xref-IAccessManager-AccessManagerLockedRole-uint64-}[`++AccessManagerLockedRole(roleId)++`]
  1596. * {xref-IAccessManager-AccessManagerBadConfirmation--}[`++AccessManagerBadConfirmation()++`]
  1597. * {xref-IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-}[`++AccessManagerUnauthorizedAccount(msgsender, roleId)++`]
  1598. * {xref-IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-}[`++AccessManagerUnauthorizedCall(caller, target, selector)++`]
  1599. * {xref-IAccessManager-AccessManagerUnauthorizedConsume-address-}[`++AccessManagerUnauthorizedConsume(target)++`]
  1600. * {xref-IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-}[`++AccessManagerUnauthorizedCancel(msgsender, caller, target, selector)++`]
  1601. * {xref-IAccessManager-AccessManagerInvalidInitialAdmin-address-}[`++AccessManagerInvalidInitialAdmin(initialAdmin)++`]
  1602. --
  1603. [.contract-item]
  1604. [[IAccessManager-canCall-address-address-bytes4-]]
  1605. ==== `[.contract-item-name]#++canCall++#++(address caller, address target, bytes4 selector) → bool allowed, uint32 delay++` [.item-kind]#external#
  1606. Check if an address (`caller`) is authorised to call a given function on a given contract directly (with
  1607. no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}
  1608. & {execute} workflow.
  1609. This function is usually called by the targeted contract to control immediate execution of restricted functions.
  1610. Therefore we only return true if the call can be performed without any delay. If the call is subject to a
  1611. previously set delay (not zero), then the function should return false and the caller should schedule the operation
  1612. for future execution.
  1613. If `immediate` is true, the delay can be disregarded and the operation can be immediately executed, otherwise
  1614. the operation can be executed if and only if delay is greater than 0.
  1615. NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that
  1616. is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail
  1617. to identify the indirect workflow, and will consider calls that require a delay to be forbidden.
  1618. NOTE: This function does not report the permissions of this manager itself. These are defined by the
  1619. {_canCallSelf} function instead.
  1620. [.contract-item]
  1621. [[IAccessManager-expiration--]]
  1622. ==== `[.contract-item-name]#++expiration++#++() → uint32++` [.item-kind]#external#
  1623. Expiration delay for scheduled proposals. Defaults to 1 week.
  1624. IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,
  1625. disabling any scheduling usage.
  1626. [.contract-item]
  1627. [[IAccessManager-minSetback--]]
  1628. ==== `[.contract-item-name]#++minSetback++#++() → uint32++` [.item-kind]#external#
  1629. Minimum setback for all delay updates, with the exception of execution delays. It
  1630. can be increased without setback (and reset via {revokeRole} in the case event of an
  1631. accidental increase). Defaults to 5 days.
  1632. [.contract-item]
  1633. [[IAccessManager-isTargetClosed-address-]]
  1634. ==== `[.contract-item-name]#++isTargetClosed++#++(address target) → bool++` [.item-kind]#external#
  1635. Get whether the contract is closed disabling any access. Otherwise role permissions are applied.
  1636. [.contract-item]
  1637. [[IAccessManager-getTargetFunctionRole-address-bytes4-]]
  1638. ==== `[.contract-item-name]#++getTargetFunctionRole++#++(address target, bytes4 selector) → uint64++` [.item-kind]#external#
  1639. Get the role required to call a function.
  1640. [.contract-item]
  1641. [[IAccessManager-getTargetAdminDelay-address-]]
  1642. ==== `[.contract-item-name]#++getTargetAdminDelay++#++(address target) → uint32++` [.item-kind]#external#
  1643. Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.
  1644. [.contract-item]
  1645. [[IAccessManager-getRoleAdmin-uint64-]]
  1646. ==== `[.contract-item-name]#++getRoleAdmin++#++(uint64 roleId) → uint64++` [.item-kind]#external#
  1647. Get the id of the role that acts as an admin for the given role.
  1648. The admin permission is required to grant the role, revoke the role and update the execution delay to execute
  1649. an operation that is restricted to this role.
  1650. [.contract-item]
  1651. [[IAccessManager-getRoleGuardian-uint64-]]
  1652. ==== `[.contract-item-name]#++getRoleGuardian++#++(uint64 roleId) → uint64++` [.item-kind]#external#
  1653. Get the role that acts as a guardian for a given role.
  1654. The guardian permission allows canceling operations that have been scheduled under the role.
  1655. [.contract-item]
  1656. [[IAccessManager-getRoleGrantDelay-uint64-]]
  1657. ==== `[.contract-item-name]#++getRoleGrantDelay++#++(uint64 roleId) → uint32++` [.item-kind]#external#
  1658. Get the role current grant delay.
  1659. Its value may change at any point without an event emitted following a call to {setGrantDelay}.
  1660. Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.
  1661. [.contract-item]
  1662. [[IAccessManager-getAccess-uint64-address-]]
  1663. ==== `[.contract-item-name]#++getAccess++#++(uint64 roleId, address account) → uint48, uint32, uint32, uint48++` [.item-kind]#external#
  1664. Get the access details for a given account for a given role. These details include the timepoint at which
  1665. membership becomes active, and the delay applied to all operation by this user that requires this permission
  1666. level.
  1667. Returns:
  1668. [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.
  1669. [1] Current execution delay for the account.
  1670. [2] Pending execution delay for the account.
  1671. [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.
  1672. [.contract-item]
  1673. [[IAccessManager-hasRole-uint64-address-]]
  1674. ==== `[.contract-item-name]#++hasRole++#++(uint64 roleId, address account) → bool, uint32++` [.item-kind]#external#
  1675. Check if a given account currently has the permission level corresponding to a given role. Note that this
  1676. permission might be associated with an execution delay. {getAccess} can provide more details.
  1677. [.contract-item]
  1678. [[IAccessManager-labelRole-uint64-string-]]
  1679. ==== `[.contract-item-name]#++labelRole++#++(uint64 roleId, string label)++` [.item-kind]#external#
  1680. Give a label to a role, for improved role discoverability by UIs.
  1681. Requirements:
  1682. - the caller must be a global admin
  1683. Emits a {RoleLabel} event.
  1684. [.contract-item]
  1685. [[IAccessManager-grantRole-uint64-address-uint32-]]
  1686. ==== `[.contract-item-name]#++grantRole++#++(uint64 roleId, address account, uint32 executionDelay)++` [.item-kind]#external#
  1687. Add `account` to `roleId`, or change its execution delay.
  1688. This gives the account the authorization to call any function that is restricted to this role. An optional
  1689. execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation
  1690. that is restricted to members of this role. The user will only be able to execute the operation after the delay has
  1691. passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).
  1692. If the account has already been granted this role, the execution delay will be updated. This update is not
  1693. immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is
  1694. called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any
  1695. operation executed in the 3 hours that follows this update was indeed scheduled before this update.
  1696. Requirements:
  1697. - the caller must be an admin for the role (see {getRoleAdmin})
  1698. - granted role must not be the `PUBLIC_ROLE`
  1699. Emits a {RoleGranted} event.
  1700. [.contract-item]
  1701. [[IAccessManager-revokeRole-uint64-address-]]
  1702. ==== `[.contract-item-name]#++revokeRole++#++(uint64 roleId, address account)++` [.item-kind]#external#
  1703. Remove an account from a role, with immediate effect. If the account does not have the role, this call has
  1704. no effect.
  1705. Requirements:
  1706. - the caller must be an admin for the role (see {getRoleAdmin})
  1707. - revoked role must not be the `PUBLIC_ROLE`
  1708. Emits a {RoleRevoked} event if the account had the role.
  1709. [.contract-item]
  1710. [[IAccessManager-renounceRole-uint64-address-]]
  1711. ==== `[.contract-item-name]#++renounceRole++#++(uint64 roleId, address callerConfirmation)++` [.item-kind]#external#
  1712. Renounce role permissions for the calling account with immediate effect. If the sender is not in
  1713. the role this call has no effect.
  1714. Requirements:
  1715. - the caller must be `callerConfirmation`.
  1716. Emits a {RoleRevoked} event if the account had the role.
  1717. [.contract-item]
  1718. [[IAccessManager-setRoleAdmin-uint64-uint64-]]
  1719. ==== `[.contract-item-name]#++setRoleAdmin++#++(uint64 roleId, uint64 admin)++` [.item-kind]#external#
  1720. Change admin role for a given role.
  1721. Requirements:
  1722. - the caller must be a global admin
  1723. Emits a {RoleAdminChanged} event
  1724. [.contract-item]
  1725. [[IAccessManager-setRoleGuardian-uint64-uint64-]]
  1726. ==== `[.contract-item-name]#++setRoleGuardian++#++(uint64 roleId, uint64 guardian)++` [.item-kind]#external#
  1727. Change guardian role for a given role.
  1728. Requirements:
  1729. - the caller must be a global admin
  1730. Emits a {RoleGuardianChanged} event
  1731. [.contract-item]
  1732. [[IAccessManager-setGrantDelay-uint64-uint32-]]
  1733. ==== `[.contract-item-name]#++setGrantDelay++#++(uint64 roleId, uint32 newDelay)++` [.item-kind]#external#
  1734. Update the delay for granting a `roleId`.
  1735. Requirements:
  1736. - the caller must be a global admin
  1737. Emits a {RoleGrantDelayChanged} event.
  1738. [.contract-item]
  1739. [[IAccessManager-setTargetFunctionRole-address-bytes4---uint64-]]
  1740. ==== `[.contract-item-name]#++setTargetFunctionRole++#++(address target, bytes4[] selectors, uint64 roleId)++` [.item-kind]#external#
  1741. Set the role required to call functions identified by the `selectors` in the `target` contract.
  1742. Requirements:
  1743. - the caller must be a global admin
  1744. Emits a {TargetFunctionRoleUpdated} event per selector.
  1745. [.contract-item]
  1746. [[IAccessManager-setTargetAdminDelay-address-uint32-]]
  1747. ==== `[.contract-item-name]#++setTargetAdminDelay++#++(address target, uint32 newDelay)++` [.item-kind]#external#
  1748. Set the delay for changing the configuration of a given target contract.
  1749. Requirements:
  1750. - the caller must be a global admin
  1751. Emits a {TargetAdminDelayUpdated} event.
  1752. [.contract-item]
  1753. [[IAccessManager-setTargetClosed-address-bool-]]
  1754. ==== `[.contract-item-name]#++setTargetClosed++#++(address target, bool closed)++` [.item-kind]#external#
  1755. Set the closed flag for a contract.
  1756. Requirements:
  1757. - the caller must be a global admin
  1758. Emits a {TargetClosed} event.
  1759. [.contract-item]
  1760. [[IAccessManager-getSchedule-bytes32-]]
  1761. ==== `[.contract-item-name]#++getSchedule++#++(bytes32 id) → uint48++` [.item-kind]#external#
  1762. Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the
  1763. operation is not yet scheduled, has expired, was executed, or was canceled.
  1764. [.contract-item]
  1765. [[IAccessManager-getNonce-bytes32-]]
  1766. ==== `[.contract-item-name]#++getNonce++#++(bytes32 id) → uint32++` [.item-kind]#external#
  1767. Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never
  1768. been scheduled.
  1769. [.contract-item]
  1770. [[IAccessManager-schedule-address-bytes-uint48-]]
  1771. ==== `[.contract-item-name]#++schedule++#++(address target, bytes data, uint48 when) → bytes32, uint32++` [.item-kind]#external#
  1772. Schedule a delayed operation for future execution, and return the operation identifier. It is possible to
  1773. choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays
  1774. required for the caller. The special value zero will automatically set the earliest possible time.
  1775. Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when
  1776. the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this
  1777. scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.
  1778. Emits a {OperationScheduled} event.
  1779. NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If
  1780. this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target
  1781. contract if it is using standard Solidity ABI encoding.
  1782. [.contract-item]
  1783. [[IAccessManager-execute-address-bytes-]]
  1784. ==== `[.contract-item-name]#++execute++#++(address target, bytes data) → uint32++` [.item-kind]#external#
  1785. Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the
  1786. execution delay is 0.
  1787. Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the
  1788. operation wasn't previously scheduled (if the caller doesn't have an execution delay).
  1789. Emits an {OperationExecuted} event only if the call was scheduled and delayed.
  1790. [.contract-item]
  1791. [[IAccessManager-cancel-address-address-bytes-]]
  1792. ==== `[.contract-item-name]#++cancel++#++(address caller, address target, bytes data) → uint32++` [.item-kind]#external#
  1793. Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled
  1794. operation that is cancelled.
  1795. Requirements:
  1796. - the caller must be the proposer, a guardian of the targeted function, or a global admin
  1797. Emits a {OperationCanceled} event.
  1798. [.contract-item]
  1799. [[IAccessManager-consumeScheduledOp-address-bytes-]]
  1800. ==== `[.contract-item-name]#++consumeScheduledOp++#++(address caller, bytes data)++` [.item-kind]#external#
  1801. Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed
  1802. (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.
  1803. This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,
  1804. with all the verifications that it implies.
  1805. Emit a {OperationExecuted} event.
  1806. [.contract-item]
  1807. [[IAccessManager-hashOperation-address-address-bytes-]]
  1808. ==== `[.contract-item-name]#++hashOperation++#++(address caller, address target, bytes data) → bytes32++` [.item-kind]#external#
  1809. Hashing function for delayed operations.
  1810. [.contract-item]
  1811. [[IAccessManager-updateAuthority-address-address-]]
  1812. ==== `[.contract-item-name]#++updateAuthority++#++(address target, address newAuthority)++` [.item-kind]#external#
  1813. Changes the authority of a target managed by this manager instance.
  1814. Requirements:
  1815. - the caller must be a global admin
  1816. [.contract-item]
  1817. [[IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-]]
  1818. ==== `[.contract-item-name]#++OperationScheduled++#++(bytes32 indexed operationId, uint32 indexed nonce, uint48 schedule, address caller, address target, bytes data)++` [.item-kind]#event#
  1819. A delayed operation was scheduled.
  1820. [.contract-item]
  1821. [[IAccessManager-OperationExecuted-bytes32-uint32-]]
  1822. ==== `[.contract-item-name]#++OperationExecuted++#++(bytes32 indexed operationId, uint32 indexed nonce)++` [.item-kind]#event#
  1823. A scheduled operation was executed.
  1824. [.contract-item]
  1825. [[IAccessManager-OperationCanceled-bytes32-uint32-]]
  1826. ==== `[.contract-item-name]#++OperationCanceled++#++(bytes32 indexed operationId, uint32 indexed nonce)++` [.item-kind]#event#
  1827. A scheduled operation was canceled.
  1828. [.contract-item]
  1829. [[IAccessManager-RoleLabel-uint64-string-]]
  1830. ==== `[.contract-item-name]#++RoleLabel++#++(uint64 indexed roleId, string label)++` [.item-kind]#event#
  1831. Informational labelling for a roleId.
  1832. [.contract-item]
  1833. [[IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-]]
  1834. ==== `[.contract-item-name]#++RoleGranted++#++(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember)++` [.item-kind]#event#
  1835. Emitted when `account` is granted `roleId`.
  1836. NOTE: The meaning of the `since` argument depends on the `newMember` argument.
  1837. If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,
  1838. otherwise it indicates the execution delay for this account and roleId is updated.
  1839. [.contract-item]
  1840. [[IAccessManager-RoleRevoked-uint64-address-]]
  1841. ==== `[.contract-item-name]#++RoleRevoked++#++(uint64 indexed roleId, address indexed account)++` [.item-kind]#event#
  1842. Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.
  1843. [.contract-item]
  1844. [[IAccessManager-RoleAdminChanged-uint64-uint64-]]
  1845. ==== `[.contract-item-name]#++RoleAdminChanged++#++(uint64 indexed roleId, uint64 indexed admin)++` [.item-kind]#event#
  1846. Role acting as admin over a given `roleId` is updated.
  1847. [.contract-item]
  1848. [[IAccessManager-RoleGuardianChanged-uint64-uint64-]]
  1849. ==== `[.contract-item-name]#++RoleGuardianChanged++#++(uint64 indexed roleId, uint64 indexed guardian)++` [.item-kind]#event#
  1850. Role acting as guardian over a given `roleId` is updated.
  1851. [.contract-item]
  1852. [[IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-]]
  1853. ==== `[.contract-item-name]#++RoleGrantDelayChanged++#++(uint64 indexed roleId, uint32 delay, uint48 since)++` [.item-kind]#event#
  1854. Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.
  1855. [.contract-item]
  1856. [[IAccessManager-TargetClosed-address-bool-]]
  1857. ==== `[.contract-item-name]#++TargetClosed++#++(address indexed target, bool closed)++` [.item-kind]#event#
  1858. Target mode is updated (true = closed, false = open).
  1859. [.contract-item]
  1860. [[IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-]]
  1861. ==== `[.contract-item-name]#++TargetFunctionRoleUpdated++#++(address indexed target, bytes4 selector, uint64 indexed roleId)++` [.item-kind]#event#
  1862. Role required to invoke `selector` on `target` is updated to `roleId`.
  1863. [.contract-item]
  1864. [[IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-]]
  1865. ==== `[.contract-item-name]#++TargetAdminDelayUpdated++#++(address indexed target, uint32 delay, uint48 since)++` [.item-kind]#event#
  1866. Admin delay for a given `target` will be updated to `delay` when `since` is reached.
  1867. [.contract-item]
  1868. [[IAccessManager-AccessManagerAlreadyScheduled-bytes32-]]
  1869. ==== `[.contract-item-name]#++AccessManagerAlreadyScheduled++#++(bytes32 operationId)++` [.item-kind]#error#
  1870. [.contract-item]
  1871. [[IAccessManager-AccessManagerNotScheduled-bytes32-]]
  1872. ==== `[.contract-item-name]#++AccessManagerNotScheduled++#++(bytes32 operationId)++` [.item-kind]#error#
  1873. [.contract-item]
  1874. [[IAccessManager-AccessManagerNotReady-bytes32-]]
  1875. ==== `[.contract-item-name]#++AccessManagerNotReady++#++(bytes32 operationId)++` [.item-kind]#error#
  1876. [.contract-item]
  1877. [[IAccessManager-AccessManagerExpired-bytes32-]]
  1878. ==== `[.contract-item-name]#++AccessManagerExpired++#++(bytes32 operationId)++` [.item-kind]#error#
  1879. [.contract-item]
  1880. [[IAccessManager-AccessManagerLockedAccount-address-]]
  1881. ==== `[.contract-item-name]#++AccessManagerLockedAccount++#++(address account)++` [.item-kind]#error#
  1882. [.contract-item]
  1883. [[IAccessManager-AccessManagerLockedRole-uint64-]]
  1884. ==== `[.contract-item-name]#++AccessManagerLockedRole++#++(uint64 roleId)++` [.item-kind]#error#
  1885. [.contract-item]
  1886. [[IAccessManager-AccessManagerBadConfirmation--]]
  1887. ==== `[.contract-item-name]#++AccessManagerBadConfirmation++#++()++` [.item-kind]#error#
  1888. [.contract-item]
  1889. [[IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-]]
  1890. ==== `[.contract-item-name]#++AccessManagerUnauthorizedAccount++#++(address msgsender, uint64 roleId)++` [.item-kind]#error#
  1891. [.contract-item]
  1892. [[IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-]]
  1893. ==== `[.contract-item-name]#++AccessManagerUnauthorizedCall++#++(address caller, address target, bytes4 selector)++` [.item-kind]#error#
  1894. [.contract-item]
  1895. [[IAccessManager-AccessManagerUnauthorizedConsume-address-]]
  1896. ==== `[.contract-item-name]#++AccessManagerUnauthorizedConsume++#++(address target)++` [.item-kind]#error#
  1897. [.contract-item]
  1898. [[IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-]]
  1899. ==== `[.contract-item-name]#++AccessManagerUnauthorizedCancel++#++(address msgsender, address caller, address target, bytes4 selector)++` [.item-kind]#error#
  1900. [.contract-item]
  1901. [[IAccessManager-AccessManagerInvalidInitialAdmin-address-]]
  1902. ==== `[.contract-item-name]#++AccessManagerInvalidInitialAdmin++#++(address initialAdmin)++` [.item-kind]#error#
  1903. :TargetConfig: pass:normal[xref:#AccessManager-TargetConfig[`++TargetConfig++`]]
  1904. :Access: pass:normal[xref:#AccessManager-Access[`++Access++`]]
  1905. :Role: pass:normal[xref:#AccessManager-Role[`++Role++`]]
  1906. :Schedule: pass:normal[xref:#AccessManager-Schedule[`++Schedule++`]]
  1907. :ADMIN_ROLE: pass:normal[xref:#AccessManager-ADMIN_ROLE-uint64[`++ADMIN_ROLE++`]]
  1908. :PUBLIC_ROLE: pass:normal[xref:#AccessManager-PUBLIC_ROLE-uint64[`++PUBLIC_ROLE++`]]
  1909. :onlyAuthorized: pass:normal[xref:#AccessManager-onlyAuthorized--[`++onlyAuthorized++`]]
  1910. :constructor: pass:normal[xref:#AccessManager-constructor-address-[`++constructor++`]]
  1911. :canCall: pass:normal[xref:#AccessManager-canCall-address-address-bytes4-[`++canCall++`]]
  1912. :expiration: pass:normal[xref:#AccessManager-expiration--[`++expiration++`]]
  1913. :minSetback: pass:normal[xref:#AccessManager-minSetback--[`++minSetback++`]]
  1914. :isTargetClosed: pass:normal[xref:#AccessManager-isTargetClosed-address-[`++isTargetClosed++`]]
  1915. :getTargetFunctionRole: pass:normal[xref:#AccessManager-getTargetFunctionRole-address-bytes4-[`++getTargetFunctionRole++`]]
  1916. :getTargetAdminDelay: pass:normal[xref:#AccessManager-getTargetAdminDelay-address-[`++getTargetAdminDelay++`]]
  1917. :getRoleAdmin: pass:normal[xref:#AccessManager-getRoleAdmin-uint64-[`++getRoleAdmin++`]]
  1918. :getRoleGuardian: pass:normal[xref:#AccessManager-getRoleGuardian-uint64-[`++getRoleGuardian++`]]
  1919. :getRoleGrantDelay: pass:normal[xref:#AccessManager-getRoleGrantDelay-uint64-[`++getRoleGrantDelay++`]]
  1920. :getAccess: pass:normal[xref:#AccessManager-getAccess-uint64-address-[`++getAccess++`]]
  1921. :hasRole: pass:normal[xref:#AccessManager-hasRole-uint64-address-[`++hasRole++`]]
  1922. :labelRole: pass:normal[xref:#AccessManager-labelRole-uint64-string-[`++labelRole++`]]
  1923. :grantRole: pass:normal[xref:#AccessManager-grantRole-uint64-address-uint32-[`++grantRole++`]]
  1924. :revokeRole: pass:normal[xref:#AccessManager-revokeRole-uint64-address-[`++revokeRole++`]]
  1925. :renounceRole: pass:normal[xref:#AccessManager-renounceRole-uint64-address-[`++renounceRole++`]]
  1926. :setRoleAdmin: pass:normal[xref:#AccessManager-setRoleAdmin-uint64-uint64-[`++setRoleAdmin++`]]
  1927. :setRoleGuardian: pass:normal[xref:#AccessManager-setRoleGuardian-uint64-uint64-[`++setRoleGuardian++`]]
  1928. :setGrantDelay: pass:normal[xref:#AccessManager-setGrantDelay-uint64-uint32-[`++setGrantDelay++`]]
  1929. :_grantRole: pass:normal[xref:#AccessManager-_grantRole-uint64-address-uint32-uint32-[`++_grantRole++`]]
  1930. :_revokeRole: pass:normal[xref:#AccessManager-_revokeRole-uint64-address-[`++_revokeRole++`]]
  1931. :_setRoleAdmin: pass:normal[xref:#AccessManager-_setRoleAdmin-uint64-uint64-[`++_setRoleAdmin++`]]
  1932. :_setRoleGuardian: pass:normal[xref:#AccessManager-_setRoleGuardian-uint64-uint64-[`++_setRoleGuardian++`]]
  1933. :_setGrantDelay: pass:normal[xref:#AccessManager-_setGrantDelay-uint64-uint32-[`++_setGrantDelay++`]]
  1934. :setTargetFunctionRole: pass:normal[xref:#AccessManager-setTargetFunctionRole-address-bytes4---uint64-[`++setTargetFunctionRole++`]]
  1935. :_setTargetFunctionRole: pass:normal[xref:#AccessManager-_setTargetFunctionRole-address-bytes4-uint64-[`++_setTargetFunctionRole++`]]
  1936. :setTargetAdminDelay: pass:normal[xref:#AccessManager-setTargetAdminDelay-address-uint32-[`++setTargetAdminDelay++`]]
  1937. :_setTargetAdminDelay: pass:normal[xref:#AccessManager-_setTargetAdminDelay-address-uint32-[`++_setTargetAdminDelay++`]]
  1938. :setTargetClosed: pass:normal[xref:#AccessManager-setTargetClosed-address-bool-[`++setTargetClosed++`]]
  1939. :_setTargetClosed: pass:normal[xref:#AccessManager-_setTargetClosed-address-bool-[`++_setTargetClosed++`]]
  1940. :getSchedule: pass:normal[xref:#AccessManager-getSchedule-bytes32-[`++getSchedule++`]]
  1941. :getNonce: pass:normal[xref:#AccessManager-getNonce-bytes32-[`++getNonce++`]]
  1942. :schedule: pass:normal[xref:#AccessManager-schedule-address-bytes-uint48-[`++schedule++`]]
  1943. :execute: pass:normal[xref:#AccessManager-execute-address-bytes-[`++execute++`]]
  1944. :cancel: pass:normal[xref:#AccessManager-cancel-address-address-bytes-[`++cancel++`]]
  1945. :consumeScheduledOp: pass:normal[xref:#AccessManager-consumeScheduledOp-address-bytes-[`++consumeScheduledOp++`]]
  1946. :_consumeScheduledOp: pass:normal[xref:#AccessManager-_consumeScheduledOp-bytes32-[`++_consumeScheduledOp++`]]
  1947. :hashOperation: pass:normal[xref:#AccessManager-hashOperation-address-address-bytes-[`++hashOperation++`]]
  1948. :updateAuthority: pass:normal[xref:#AccessManager-updateAuthority-address-address-[`++updateAuthority++`]]
  1949. [.contract]
  1950. [[AccessManager]]
  1951. === `++AccessManager++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/manager/AccessManager.sol[{github-icon},role=heading-link]
  1952. [.hljs-theme-light.nopadding]
  1953. ```solidity
  1954. import "@openzeppelin/contracts/access/manager/AccessManager.sol";
  1955. ```
  1956. AccessManager is a central contract to store the permissions of a system.
  1957. A smart contract under the control of an AccessManager instance is known as a target, and will inherit from the
  1958. {AccessManaged} contract, be connected to this contract as its manager and implement the {AccessManaged-restricted}
  1959. modifier on a set of functions selected to be permissioned. Note that any function without this setup won't be
  1960. effectively restricted.
  1961. The restriction rules for such functions are defined in terms of "roles" identified by an `uint64` and scoped
  1962. by target (`address`) and function selectors (`bytes4`). These roles are stored in this contract and can be
  1963. configured by admins (`ADMIN_ROLE` members) after a delay (see {getTargetAdminDelay}).
  1964. For each target contract, admins can configure the following without any delay:
  1965. * The target's {AccessManaged-authority} via {updateAuthority}.
  1966. * Close or open a target via {setTargetClosed} keeping the permissions intact.
  1967. * The roles that are allowed (or disallowed) to call a given function (identified by its selector) through {setTargetFunctionRole}.
  1968. By default every address is member of the `PUBLIC_ROLE` and every target function is restricted to the `ADMIN_ROLE` until configured otherwise.
  1969. Additionally, each role has the following configuration options restricted to this manager's admins:
  1970. * A role's admin role via {setRoleAdmin} who can grant or revoke roles.
  1971. * A role's guardian role via {setRoleGuardian} who's allowed to cancel operations.
  1972. * A delay in which a role takes effect after being granted through {setGrantDelay}.
  1973. * A delay of any target's admin action via {setTargetAdminDelay}.
  1974. * A role label for discoverability purposes with {labelRole}.
  1975. Any account can be added and removed into any number of these roles by using the {grantRole} and {revokeRole} functions
  1976. restricted to each role's admin (see {getRoleAdmin}).
  1977. Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that
  1978. they will be highly secured (e.g., a multisig or a well-configured DAO).
  1979. NOTE: This contract implements a form of the {IAuthority} interface, but {canCall} has additional return data so it
  1980. doesn't inherit `IAuthority`. It is however compatible with the `IAuthority` interface since the first 32 bytes of
  1981. the return data are a boolean as expected by that interface.
  1982. NOTE: Systems that implement other access control mechanisms (for example using {Ownable}) can be paired with an
  1983. {AccessManager} by transferring permissions (ownership in the case of {Ownable}) directly to the {AccessManager}.
  1984. Users will be able to interact with these contracts through the {execute} function, following the access rules
  1985. registered in the {AccessManager}. Keep in mind that in that context, the msg.sender seen by restricted functions
  1986. will be {AccessManager} itself.
  1987. WARNING: When granting permissions over an {Ownable} or {AccessControl} contract to an {AccessManager}, be very
  1988. mindful of the danger associated with functions such as {{Ownable-renounceOwnership}} or
  1989. {{AccessControl-renounceRole}}.
  1990. [.contract-index]
  1991. .Modifiers
  1992. --
  1993. * {xref-AccessManager-onlyAuthorized--}[`++onlyAuthorized()++`]
  1994. --
  1995. [.contract-index]
  1996. .Functions
  1997. --
  1998. * {xref-AccessManager-constructor-address-}[`++constructor(initialAdmin)++`]
  1999. * {xref-AccessManager-canCall-address-address-bytes4-}[`++canCall(caller, target, selector)++`]
  2000. * {xref-AccessManager-expiration--}[`++expiration()++`]
  2001. * {xref-AccessManager-minSetback--}[`++minSetback()++`]
  2002. * {xref-AccessManager-isTargetClosed-address-}[`++isTargetClosed(target)++`]
  2003. * {xref-AccessManager-getTargetFunctionRole-address-bytes4-}[`++getTargetFunctionRole(target, selector)++`]
  2004. * {xref-AccessManager-getTargetAdminDelay-address-}[`++getTargetAdminDelay(target)++`]
  2005. * {xref-AccessManager-getRoleAdmin-uint64-}[`++getRoleAdmin(roleId)++`]
  2006. * {xref-AccessManager-getRoleGuardian-uint64-}[`++getRoleGuardian(roleId)++`]
  2007. * {xref-AccessManager-getRoleGrantDelay-uint64-}[`++getRoleGrantDelay(roleId)++`]
  2008. * {xref-AccessManager-getAccess-uint64-address-}[`++getAccess(roleId, account)++`]
  2009. * {xref-AccessManager-hasRole-uint64-address-}[`++hasRole(roleId, account)++`]
  2010. * {xref-AccessManager-labelRole-uint64-string-}[`++labelRole(roleId, label)++`]
  2011. * {xref-AccessManager-grantRole-uint64-address-uint32-}[`++grantRole(roleId, account, executionDelay)++`]
  2012. * {xref-AccessManager-revokeRole-uint64-address-}[`++revokeRole(roleId, account)++`]
  2013. * {xref-AccessManager-renounceRole-uint64-address-}[`++renounceRole(roleId, callerConfirmation)++`]
  2014. * {xref-AccessManager-setRoleAdmin-uint64-uint64-}[`++setRoleAdmin(roleId, admin)++`]
  2015. * {xref-AccessManager-setRoleGuardian-uint64-uint64-}[`++setRoleGuardian(roleId, guardian)++`]
  2016. * {xref-AccessManager-setGrantDelay-uint64-uint32-}[`++setGrantDelay(roleId, newDelay)++`]
  2017. * {xref-AccessManager-_grantRole-uint64-address-uint32-uint32-}[`++_grantRole(roleId, account, grantDelay, executionDelay)++`]
  2018. * {xref-AccessManager-_revokeRole-uint64-address-}[`++_revokeRole(roleId, account)++`]
  2019. * {xref-AccessManager-_setRoleAdmin-uint64-uint64-}[`++_setRoleAdmin(roleId, admin)++`]
  2020. * {xref-AccessManager-_setRoleGuardian-uint64-uint64-}[`++_setRoleGuardian(roleId, guardian)++`]
  2021. * {xref-AccessManager-_setGrantDelay-uint64-uint32-}[`++_setGrantDelay(roleId, newDelay)++`]
  2022. * {xref-AccessManager-setTargetFunctionRole-address-bytes4---uint64-}[`++setTargetFunctionRole(target, selectors, roleId)++`]
  2023. * {xref-AccessManager-_setTargetFunctionRole-address-bytes4-uint64-}[`++_setTargetFunctionRole(target, selector, roleId)++`]
  2024. * {xref-AccessManager-setTargetAdminDelay-address-uint32-}[`++setTargetAdminDelay(target, newDelay)++`]
  2025. * {xref-AccessManager-_setTargetAdminDelay-address-uint32-}[`++_setTargetAdminDelay(target, newDelay)++`]
  2026. * {xref-AccessManager-setTargetClosed-address-bool-}[`++setTargetClosed(target, closed)++`]
  2027. * {xref-AccessManager-_setTargetClosed-address-bool-}[`++_setTargetClosed(target, closed)++`]
  2028. * {xref-AccessManager-getSchedule-bytes32-}[`++getSchedule(id)++`]
  2029. * {xref-AccessManager-getNonce-bytes32-}[`++getNonce(id)++`]
  2030. * {xref-AccessManager-schedule-address-bytes-uint48-}[`++schedule(target, data, when)++`]
  2031. * {xref-AccessManager-execute-address-bytes-}[`++execute(target, data)++`]
  2032. * {xref-AccessManager-cancel-address-address-bytes-}[`++cancel(caller, target, data)++`]
  2033. * {xref-AccessManager-consumeScheduledOp-address-bytes-}[`++consumeScheduledOp(caller, data)++`]
  2034. * {xref-AccessManager-_consumeScheduledOp-bytes32-}[`++_consumeScheduledOp(operationId)++`]
  2035. * {xref-AccessManager-hashOperation-address-address-bytes-}[`++hashOperation(caller, target, data)++`]
  2036. * {xref-AccessManager-updateAuthority-address-address-}[`++updateAuthority(target, newAuthority)++`]
  2037. * {xref-AccessManager-ADMIN_ROLE-uint64}[`++ADMIN_ROLE()++`]
  2038. * {xref-AccessManager-PUBLIC_ROLE-uint64}[`++PUBLIC_ROLE()++`]
  2039. [.contract-subindex-inherited]
  2040. .IAccessManager
  2041. [.contract-subindex-inherited]
  2042. .Multicall
  2043. * {xref-Multicall-multicall-bytes---}[`++multicall(data)++`]
  2044. --
  2045. [.contract-index]
  2046. .Events
  2047. --
  2048. [.contract-subindex-inherited]
  2049. .IAccessManager
  2050. * {xref-IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-}[`++OperationScheduled(operationId, nonce, schedule, caller, target, data)++`]
  2051. * {xref-IAccessManager-OperationExecuted-bytes32-uint32-}[`++OperationExecuted(operationId, nonce)++`]
  2052. * {xref-IAccessManager-OperationCanceled-bytes32-uint32-}[`++OperationCanceled(operationId, nonce)++`]
  2053. * {xref-IAccessManager-RoleLabel-uint64-string-}[`++RoleLabel(roleId, label)++`]
  2054. * {xref-IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-}[`++RoleGranted(roleId, account, delay, since, newMember)++`]
  2055. * {xref-IAccessManager-RoleRevoked-uint64-address-}[`++RoleRevoked(roleId, account)++`]
  2056. * {xref-IAccessManager-RoleAdminChanged-uint64-uint64-}[`++RoleAdminChanged(roleId, admin)++`]
  2057. * {xref-IAccessManager-RoleGuardianChanged-uint64-uint64-}[`++RoleGuardianChanged(roleId, guardian)++`]
  2058. * {xref-IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-}[`++RoleGrantDelayChanged(roleId, delay, since)++`]
  2059. * {xref-IAccessManager-TargetClosed-address-bool-}[`++TargetClosed(target, closed)++`]
  2060. * {xref-IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-}[`++TargetFunctionRoleUpdated(target, selector, roleId)++`]
  2061. * {xref-IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-}[`++TargetAdminDelayUpdated(target, delay, since)++`]
  2062. [.contract-subindex-inherited]
  2063. .Multicall
  2064. --
  2065. [.contract-index]
  2066. .Errors
  2067. --
  2068. [.contract-subindex-inherited]
  2069. .IAccessManager
  2070. * {xref-IAccessManager-AccessManagerAlreadyScheduled-bytes32-}[`++AccessManagerAlreadyScheduled(operationId)++`]
  2071. * {xref-IAccessManager-AccessManagerNotScheduled-bytes32-}[`++AccessManagerNotScheduled(operationId)++`]
  2072. * {xref-IAccessManager-AccessManagerNotReady-bytes32-}[`++AccessManagerNotReady(operationId)++`]
  2073. * {xref-IAccessManager-AccessManagerExpired-bytes32-}[`++AccessManagerExpired(operationId)++`]
  2074. * {xref-IAccessManager-AccessManagerLockedAccount-address-}[`++AccessManagerLockedAccount(account)++`]
  2075. * {xref-IAccessManager-AccessManagerLockedRole-uint64-}[`++AccessManagerLockedRole(roleId)++`]
  2076. * {xref-IAccessManager-AccessManagerBadConfirmation--}[`++AccessManagerBadConfirmation()++`]
  2077. * {xref-IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-}[`++AccessManagerUnauthorizedAccount(msgsender, roleId)++`]
  2078. * {xref-IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-}[`++AccessManagerUnauthorizedCall(caller, target, selector)++`]
  2079. * {xref-IAccessManager-AccessManagerUnauthorizedConsume-address-}[`++AccessManagerUnauthorizedConsume(target)++`]
  2080. * {xref-IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-}[`++AccessManagerUnauthorizedCancel(msgsender, caller, target, selector)++`]
  2081. * {xref-IAccessManager-AccessManagerInvalidInitialAdmin-address-}[`++AccessManagerInvalidInitialAdmin(initialAdmin)++`]
  2082. [.contract-subindex-inherited]
  2083. .Multicall
  2084. --
  2085. [.contract-item]
  2086. [[AccessManager-onlyAuthorized--]]
  2087. ==== `[.contract-item-name]#++onlyAuthorized++#++()++` [.item-kind]#modifier#
  2088. Check that the caller is authorized to perform the operation, following the restrictions encoded in
  2089. {_getAdminRestrictions}.
  2090. [.contract-item]
  2091. [[AccessManager-constructor-address-]]
  2092. ==== `[.contract-item-name]#++constructor++#++(address initialAdmin)++` [.item-kind]#public#
  2093. [.contract-item]
  2094. [[AccessManager-canCall-address-address-bytes4-]]
  2095. ==== `[.contract-item-name]#++canCall++#++(address caller, address target, bytes4 selector) → bool immediate, uint32 delay++` [.item-kind]#public#
  2096. Check if an address (`caller`) is authorised to call a given function on a given contract directly (with
  2097. no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}
  2098. & {execute} workflow.
  2099. This function is usually called by the targeted contract to control immediate execution of restricted functions.
  2100. Therefore we only return true if the call can be performed without any delay. If the call is subject to a
  2101. previously set delay (not zero), then the function should return false and the caller should schedule the operation
  2102. for future execution.
  2103. If `immediate` is true, the delay can be disregarded and the operation can be immediately executed, otherwise
  2104. the operation can be executed if and only if delay is greater than 0.
  2105. NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that
  2106. is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail
  2107. to identify the indirect workflow, and will consider calls that require a delay to be forbidden.
  2108. NOTE: This function does not report the permissions of this manager itself. These are defined by the
  2109. {_canCallSelf} function instead.
  2110. [.contract-item]
  2111. [[AccessManager-expiration--]]
  2112. ==== `[.contract-item-name]#++expiration++#++() → uint32++` [.item-kind]#public#
  2113. Expiration delay for scheduled proposals. Defaults to 1 week.
  2114. IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,
  2115. disabling any scheduling usage.
  2116. [.contract-item]
  2117. [[AccessManager-minSetback--]]
  2118. ==== `[.contract-item-name]#++minSetback++#++() → uint32++` [.item-kind]#public#
  2119. Minimum setback for all delay updates, with the exception of execution delays. It
  2120. can be increased without setback (and reset via {revokeRole} in the case event of an
  2121. accidental increase). Defaults to 5 days.
  2122. [.contract-item]
  2123. [[AccessManager-isTargetClosed-address-]]
  2124. ==== `[.contract-item-name]#++isTargetClosed++#++(address target) → bool++` [.item-kind]#public#
  2125. Get whether the contract is closed disabling any access. Otherwise role permissions are applied.
  2126. [.contract-item]
  2127. [[AccessManager-getTargetFunctionRole-address-bytes4-]]
  2128. ==== `[.contract-item-name]#++getTargetFunctionRole++#++(address target, bytes4 selector) → uint64++` [.item-kind]#public#
  2129. Get the role required to call a function.
  2130. [.contract-item]
  2131. [[AccessManager-getTargetAdminDelay-address-]]
  2132. ==== `[.contract-item-name]#++getTargetAdminDelay++#++(address target) → uint32++` [.item-kind]#public#
  2133. Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.
  2134. [.contract-item]
  2135. [[AccessManager-getRoleAdmin-uint64-]]
  2136. ==== `[.contract-item-name]#++getRoleAdmin++#++(uint64 roleId) → uint64++` [.item-kind]#public#
  2137. Get the id of the role that acts as an admin for the given role.
  2138. The admin permission is required to grant the role, revoke the role and update the execution delay to execute
  2139. an operation that is restricted to this role.
  2140. [.contract-item]
  2141. [[AccessManager-getRoleGuardian-uint64-]]
  2142. ==== `[.contract-item-name]#++getRoleGuardian++#++(uint64 roleId) → uint64++` [.item-kind]#public#
  2143. Get the role that acts as a guardian for a given role.
  2144. The guardian permission allows canceling operations that have been scheduled under the role.
  2145. [.contract-item]
  2146. [[AccessManager-getRoleGrantDelay-uint64-]]
  2147. ==== `[.contract-item-name]#++getRoleGrantDelay++#++(uint64 roleId) → uint32++` [.item-kind]#public#
  2148. Get the role current grant delay.
  2149. Its value may change at any point without an event emitted following a call to {setGrantDelay}.
  2150. Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.
  2151. [.contract-item]
  2152. [[AccessManager-getAccess-uint64-address-]]
  2153. ==== `[.contract-item-name]#++getAccess++#++(uint64 roleId, address account) → uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect++` [.item-kind]#public#
  2154. Get the access details for a given account for a given role. These details include the timepoint at which
  2155. membership becomes active, and the delay applied to all operation by this user that requires this permission
  2156. level.
  2157. Returns:
  2158. [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.
  2159. [1] Current execution delay for the account.
  2160. [2] Pending execution delay for the account.
  2161. [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.
  2162. [.contract-item]
  2163. [[AccessManager-hasRole-uint64-address-]]
  2164. ==== `[.contract-item-name]#++hasRole++#++(uint64 roleId, address account) → bool isMember, uint32 executionDelay++` [.item-kind]#public#
  2165. Check if a given account currently has the permission level corresponding to a given role. Note that this
  2166. permission might be associated with an execution delay. {getAccess} can provide more details.
  2167. [.contract-item]
  2168. [[AccessManager-labelRole-uint64-string-]]
  2169. ==== `[.contract-item-name]#++labelRole++#++(uint64 roleId, string label)++` [.item-kind]#public#
  2170. Give a label to a role, for improved role discoverability by UIs.
  2171. Requirements:
  2172. - the caller must be a global admin
  2173. Emits a {RoleLabel} event.
  2174. [.contract-item]
  2175. [[AccessManager-grantRole-uint64-address-uint32-]]
  2176. ==== `[.contract-item-name]#++grantRole++#++(uint64 roleId, address account, uint32 executionDelay)++` [.item-kind]#public#
  2177. Add `account` to `roleId`, or change its execution delay.
  2178. This gives the account the authorization to call any function that is restricted to this role. An optional
  2179. execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation
  2180. that is restricted to members of this role. The user will only be able to execute the operation after the delay has
  2181. passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).
  2182. If the account has already been granted this role, the execution delay will be updated. This update is not
  2183. immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is
  2184. called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any
  2185. operation executed in the 3 hours that follows this update was indeed scheduled before this update.
  2186. Requirements:
  2187. - the caller must be an admin for the role (see {getRoleAdmin})
  2188. - granted role must not be the `PUBLIC_ROLE`
  2189. Emits a {RoleGranted} event.
  2190. [.contract-item]
  2191. [[AccessManager-revokeRole-uint64-address-]]
  2192. ==== `[.contract-item-name]#++revokeRole++#++(uint64 roleId, address account)++` [.item-kind]#public#
  2193. Remove an account from a role, with immediate effect. If the account does not have the role, this call has
  2194. no effect.
  2195. Requirements:
  2196. - the caller must be an admin for the role (see {getRoleAdmin})
  2197. - revoked role must not be the `PUBLIC_ROLE`
  2198. Emits a {RoleRevoked} event if the account had the role.
  2199. [.contract-item]
  2200. [[AccessManager-renounceRole-uint64-address-]]
  2201. ==== `[.contract-item-name]#++renounceRole++#++(uint64 roleId, address callerConfirmation)++` [.item-kind]#public#
  2202. Renounce role permissions for the calling account with immediate effect. If the sender is not in
  2203. the role this call has no effect.
  2204. Requirements:
  2205. - the caller must be `callerConfirmation`.
  2206. Emits a {RoleRevoked} event if the account had the role.
  2207. [.contract-item]
  2208. [[AccessManager-setRoleAdmin-uint64-uint64-]]
  2209. ==== `[.contract-item-name]#++setRoleAdmin++#++(uint64 roleId, uint64 admin)++` [.item-kind]#public#
  2210. Change admin role for a given role.
  2211. Requirements:
  2212. - the caller must be a global admin
  2213. Emits a {RoleAdminChanged} event
  2214. [.contract-item]
  2215. [[AccessManager-setRoleGuardian-uint64-uint64-]]
  2216. ==== `[.contract-item-name]#++setRoleGuardian++#++(uint64 roleId, uint64 guardian)++` [.item-kind]#public#
  2217. Change guardian role for a given role.
  2218. Requirements:
  2219. - the caller must be a global admin
  2220. Emits a {RoleGuardianChanged} event
  2221. [.contract-item]
  2222. [[AccessManager-setGrantDelay-uint64-uint32-]]
  2223. ==== `[.contract-item-name]#++setGrantDelay++#++(uint64 roleId, uint32 newDelay)++` [.item-kind]#public#
  2224. Update the delay for granting a `roleId`.
  2225. Requirements:
  2226. - the caller must be a global admin
  2227. Emits a {RoleGrantDelayChanged} event.
  2228. [.contract-item]
  2229. [[AccessManager-_grantRole-uint64-address-uint32-uint32-]]
  2230. ==== `[.contract-item-name]#++_grantRole++#++(uint64 roleId, address account, uint32 grantDelay, uint32 executionDelay) → bool++` [.item-kind]#internal#
  2231. Internal version of {grantRole} without access control. Returns true if the role was newly granted.
  2232. Emits a {RoleGranted} event.
  2233. [.contract-item]
  2234. [[AccessManager-_revokeRole-uint64-address-]]
  2235. ==== `[.contract-item-name]#++_revokeRole++#++(uint64 roleId, address account) → bool++` [.item-kind]#internal#
  2236. Internal version of {revokeRole} without access control. This logic is also used by {renounceRole}.
  2237. Returns true if the role was previously granted.
  2238. Emits a {RoleRevoked} event if the account had the role.
  2239. [.contract-item]
  2240. [[AccessManager-_setRoleAdmin-uint64-uint64-]]
  2241. ==== `[.contract-item-name]#++_setRoleAdmin++#++(uint64 roleId, uint64 admin)++` [.item-kind]#internal#
  2242. Internal version of {setRoleAdmin} without access control.
  2243. Emits a {RoleAdminChanged} event.
  2244. NOTE: Setting the admin role as the `PUBLIC_ROLE` is allowed, but it will effectively allow
  2245. anyone to set grant or revoke such role.
  2246. [.contract-item]
  2247. [[AccessManager-_setRoleGuardian-uint64-uint64-]]
  2248. ==== `[.contract-item-name]#++_setRoleGuardian++#++(uint64 roleId, uint64 guardian)++` [.item-kind]#internal#
  2249. Internal version of {setRoleGuardian} without access control.
  2250. Emits a {RoleGuardianChanged} event.
  2251. NOTE: Setting the guardian role as the `PUBLIC_ROLE` is allowed, but it will effectively allow
  2252. anyone to cancel any scheduled operation for such role.
  2253. [.contract-item]
  2254. [[AccessManager-_setGrantDelay-uint64-uint32-]]
  2255. ==== `[.contract-item-name]#++_setGrantDelay++#++(uint64 roleId, uint32 newDelay)++` [.item-kind]#internal#
  2256. Internal version of {setGrantDelay} without access control.
  2257. Emits a {RoleGrantDelayChanged} event.
  2258. [.contract-item]
  2259. [[AccessManager-setTargetFunctionRole-address-bytes4---uint64-]]
  2260. ==== `[.contract-item-name]#++setTargetFunctionRole++#++(address target, bytes4[] selectors, uint64 roleId)++` [.item-kind]#public#
  2261. Set the role required to call functions identified by the `selectors` in the `target` contract.
  2262. Requirements:
  2263. - the caller must be a global admin
  2264. Emits a {TargetFunctionRoleUpdated} event per selector.
  2265. [.contract-item]
  2266. [[AccessManager-_setTargetFunctionRole-address-bytes4-uint64-]]
  2267. ==== `[.contract-item-name]#++_setTargetFunctionRole++#++(address target, bytes4 selector, uint64 roleId)++` [.item-kind]#internal#
  2268. Internal version of {setTargetFunctionRole} without access control.
  2269. Emits a {TargetFunctionRoleUpdated} event.
  2270. [.contract-item]
  2271. [[AccessManager-setTargetAdminDelay-address-uint32-]]
  2272. ==== `[.contract-item-name]#++setTargetAdminDelay++#++(address target, uint32 newDelay)++` [.item-kind]#public#
  2273. Set the delay for changing the configuration of a given target contract.
  2274. Requirements:
  2275. - the caller must be a global admin
  2276. Emits a {TargetAdminDelayUpdated} event.
  2277. [.contract-item]
  2278. [[AccessManager-_setTargetAdminDelay-address-uint32-]]
  2279. ==== `[.contract-item-name]#++_setTargetAdminDelay++#++(address target, uint32 newDelay)++` [.item-kind]#internal#
  2280. Internal version of {setTargetAdminDelay} without access control.
  2281. Emits a {TargetAdminDelayUpdated} event.
  2282. [.contract-item]
  2283. [[AccessManager-setTargetClosed-address-bool-]]
  2284. ==== `[.contract-item-name]#++setTargetClosed++#++(address target, bool closed)++` [.item-kind]#public#
  2285. Set the closed flag for a contract.
  2286. Requirements:
  2287. - the caller must be a global admin
  2288. Emits a {TargetClosed} event.
  2289. [.contract-item]
  2290. [[AccessManager-_setTargetClosed-address-bool-]]
  2291. ==== `[.contract-item-name]#++_setTargetClosed++#++(address target, bool closed)++` [.item-kind]#internal#
  2292. Set the closed flag for a contract. This is an internal setter with no access restrictions.
  2293. Emits a {TargetClosed} event.
  2294. [.contract-item]
  2295. [[AccessManager-getSchedule-bytes32-]]
  2296. ==== `[.contract-item-name]#++getSchedule++#++(bytes32 id) → uint48++` [.item-kind]#public#
  2297. Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the
  2298. operation is not yet scheduled, has expired, was executed, or was canceled.
  2299. [.contract-item]
  2300. [[AccessManager-getNonce-bytes32-]]
  2301. ==== `[.contract-item-name]#++getNonce++#++(bytes32 id) → uint32++` [.item-kind]#public#
  2302. Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never
  2303. been scheduled.
  2304. [.contract-item]
  2305. [[AccessManager-schedule-address-bytes-uint48-]]
  2306. ==== `[.contract-item-name]#++schedule++#++(address target, bytes data, uint48 when) → bytes32 operationId, uint32 nonce++` [.item-kind]#public#
  2307. Schedule a delayed operation for future execution, and return the operation identifier. It is possible to
  2308. choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays
  2309. required for the caller. The special value zero will automatically set the earliest possible time.
  2310. Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when
  2311. the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this
  2312. scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.
  2313. Emits a {OperationScheduled} event.
  2314. NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If
  2315. this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target
  2316. contract if it is using standard Solidity ABI encoding.
  2317. [.contract-item]
  2318. [[AccessManager-execute-address-bytes-]]
  2319. ==== `[.contract-item-name]#++execute++#++(address target, bytes data) → uint32++` [.item-kind]#public#
  2320. Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the
  2321. execution delay is 0.
  2322. Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the
  2323. operation wasn't previously scheduled (if the caller doesn't have an execution delay).
  2324. Emits an {OperationExecuted} event only if the call was scheduled and delayed.
  2325. [.contract-item]
  2326. [[AccessManager-cancel-address-address-bytes-]]
  2327. ==== `[.contract-item-name]#++cancel++#++(address caller, address target, bytes data) → uint32++` [.item-kind]#public#
  2328. Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled
  2329. operation that is cancelled.
  2330. Requirements:
  2331. - the caller must be the proposer, a guardian of the targeted function, or a global admin
  2332. Emits a {OperationCanceled} event.
  2333. [.contract-item]
  2334. [[AccessManager-consumeScheduledOp-address-bytes-]]
  2335. ==== `[.contract-item-name]#++consumeScheduledOp++#++(address caller, bytes data)++` [.item-kind]#public#
  2336. Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed
  2337. (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.
  2338. This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,
  2339. with all the verifications that it implies.
  2340. Emit a {OperationExecuted} event.
  2341. [.contract-item]
  2342. [[AccessManager-_consumeScheduledOp-bytes32-]]
  2343. ==== `[.contract-item-name]#++_consumeScheduledOp++#++(bytes32 operationId) → uint32++` [.item-kind]#internal#
  2344. Internal variant of {consumeScheduledOp} that operates on bytes32 operationId.
  2345. Returns the nonce of the scheduled operation that is consumed.
  2346. [.contract-item]
  2347. [[AccessManager-hashOperation-address-address-bytes-]]
  2348. ==== `[.contract-item-name]#++hashOperation++#++(address caller, address target, bytes data) → bytes32++` [.item-kind]#public#
  2349. Hashing function for delayed operations.
  2350. [.contract-item]
  2351. [[AccessManager-updateAuthority-address-address-]]
  2352. ==== `[.contract-item-name]#++updateAuthority++#++(address target, address newAuthority)++` [.item-kind]#public#
  2353. Changes the authority of a target managed by this manager instance.
  2354. Requirements:
  2355. - the caller must be a global admin
  2356. [.contract-item]
  2357. [[AccessManager-ADMIN_ROLE-uint64]]
  2358. ==== `[.contract-item-name]#++ADMIN_ROLE++#++() → uint64++` [.item-kind]#public#
  2359. [.contract-item]
  2360. [[AccessManager-PUBLIC_ROLE-uint64]]
  2361. ==== `[.contract-item-name]#++PUBLIC_ROLE++#++() → uint64++` [.item-kind]#public#
  2362. :AuthorityUpdated: pass:normal[xref:#IAccessManaged-AuthorityUpdated-address-[`++AuthorityUpdated++`]]
  2363. :AccessManagedUnauthorized: pass:normal[xref:#IAccessManaged-AccessManagedUnauthorized-address-[`++AccessManagedUnauthorized++`]]
  2364. :AccessManagedRequiredDelay: pass:normal[xref:#IAccessManaged-AccessManagedRequiredDelay-address-uint32-[`++AccessManagedRequiredDelay++`]]
  2365. :AccessManagedInvalidAuthority: pass:normal[xref:#IAccessManaged-AccessManagedInvalidAuthority-address-[`++AccessManagedInvalidAuthority++`]]
  2366. :authority: pass:normal[xref:#IAccessManaged-authority--[`++authority++`]]
  2367. :setAuthority: pass:normal[xref:#IAccessManaged-setAuthority-address-[`++setAuthority++`]]
  2368. :isConsumingScheduledOp: pass:normal[xref:#IAccessManaged-isConsumingScheduledOp--[`++isConsumingScheduledOp++`]]
  2369. [.contract]
  2370. [[IAccessManaged]]
  2371. === `++IAccessManaged++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/manager/IAccessManaged.sol[{github-icon},role=heading-link]
  2372. [.hljs-theme-light.nopadding]
  2373. ```solidity
  2374. import "@openzeppelin/contracts/access/manager/IAccessManaged.sol";
  2375. ```
  2376. [.contract-index]
  2377. .Functions
  2378. --
  2379. * {xref-IAccessManaged-authority--}[`++authority()++`]
  2380. * {xref-IAccessManaged-setAuthority-address-}[`++setAuthority()++`]
  2381. * {xref-IAccessManaged-isConsumingScheduledOp--}[`++isConsumingScheduledOp()++`]
  2382. --
  2383. [.contract-index]
  2384. .Events
  2385. --
  2386. * {xref-IAccessManaged-AuthorityUpdated-address-}[`++AuthorityUpdated(authority)++`]
  2387. --
  2388. [.contract-index]
  2389. .Errors
  2390. --
  2391. * {xref-IAccessManaged-AccessManagedUnauthorized-address-}[`++AccessManagedUnauthorized(caller)++`]
  2392. * {xref-IAccessManaged-AccessManagedRequiredDelay-address-uint32-}[`++AccessManagedRequiredDelay(caller, delay)++`]
  2393. * {xref-IAccessManaged-AccessManagedInvalidAuthority-address-}[`++AccessManagedInvalidAuthority(authority)++`]
  2394. --
  2395. [.contract-item]
  2396. [[IAccessManaged-authority--]]
  2397. ==== `[.contract-item-name]#++authority++#++() → address++` [.item-kind]#external#
  2398. Returns the current authority.
  2399. [.contract-item]
  2400. [[IAccessManaged-setAuthority-address-]]
  2401. ==== `[.contract-item-name]#++setAuthority++#++(address)++` [.item-kind]#external#
  2402. Transfers control to a new authority. The caller must be the current authority.
  2403. [.contract-item]
  2404. [[IAccessManaged-isConsumingScheduledOp--]]
  2405. ==== `[.contract-item-name]#++isConsumingScheduledOp++#++() → bytes4++` [.item-kind]#external#
  2406. Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is
  2407. being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs
  2408. attacker controlled calls.
  2409. [.contract-item]
  2410. [[IAccessManaged-AuthorityUpdated-address-]]
  2411. ==== `[.contract-item-name]#++AuthorityUpdated++#++(address authority)++` [.item-kind]#event#
  2412. Authority that manages this contract was updated.
  2413. [.contract-item]
  2414. [[IAccessManaged-AccessManagedUnauthorized-address-]]
  2415. ==== `[.contract-item-name]#++AccessManagedUnauthorized++#++(address caller)++` [.item-kind]#error#
  2416. [.contract-item]
  2417. [[IAccessManaged-AccessManagedRequiredDelay-address-uint32-]]
  2418. ==== `[.contract-item-name]#++AccessManagedRequiredDelay++#++(address caller, uint32 delay)++` [.item-kind]#error#
  2419. [.contract-item]
  2420. [[IAccessManaged-AccessManagedInvalidAuthority-address-]]
  2421. ==== `[.contract-item-name]#++AccessManagedInvalidAuthority++#++(address authority)++` [.item-kind]#error#
  2422. :constructor: pass:normal[xref:#AccessManaged-constructor-address-[`++constructor++`]]
  2423. :restricted: pass:normal[xref:#AccessManaged-restricted--[`++restricted++`]]
  2424. :authority: pass:normal[xref:#AccessManaged-authority--[`++authority++`]]
  2425. :setAuthority: pass:normal[xref:#AccessManaged-setAuthority-address-[`++setAuthority++`]]
  2426. :isConsumingScheduledOp: pass:normal[xref:#AccessManaged-isConsumingScheduledOp--[`++isConsumingScheduledOp++`]]
  2427. :_setAuthority: pass:normal[xref:#AccessManaged-_setAuthority-address-[`++_setAuthority++`]]
  2428. :_checkCanCall: pass:normal[xref:#AccessManaged-_checkCanCall-address-bytes-[`++_checkCanCall++`]]
  2429. [.contract]
  2430. [[AccessManaged]]
  2431. === `++AccessManaged++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/manager/AccessManaged.sol[{github-icon},role=heading-link]
  2432. [.hljs-theme-light.nopadding]
  2433. ```solidity
  2434. import "@openzeppelin/contracts/access/manager/AccessManaged.sol";
  2435. ```
  2436. This contract module makes available a {restricted} modifier. Functions decorated with this modifier will be
  2437. permissioned according to an "authority": a contract like {AccessManager} that follows the {IAuthority} interface,
  2438. implementing a policy that allows certain callers to access certain functions.
  2439. IMPORTANT: The `restricted` modifier should never be used on `internal` functions, judiciously used in `public`
  2440. functions, and ideally only used in `external` functions. See {restricted}.
  2441. [.contract-index]
  2442. .Modifiers
  2443. --
  2444. * {xref-AccessManaged-restricted--}[`++restricted()++`]
  2445. --
  2446. [.contract-index]
  2447. .Functions
  2448. --
  2449. * {xref-AccessManaged-constructor-address-}[`++constructor(initialAuthority)++`]
  2450. * {xref-AccessManaged-authority--}[`++authority()++`]
  2451. * {xref-AccessManaged-setAuthority-address-}[`++setAuthority(newAuthority)++`]
  2452. * {xref-AccessManaged-isConsumingScheduledOp--}[`++isConsumingScheduledOp()++`]
  2453. * {xref-AccessManaged-_setAuthority-address-}[`++_setAuthority(newAuthority)++`]
  2454. * {xref-AccessManaged-_checkCanCall-address-bytes-}[`++_checkCanCall(caller, data)++`]
  2455. [.contract-subindex-inherited]
  2456. .IAccessManaged
  2457. --
  2458. [.contract-index]
  2459. .Events
  2460. --
  2461. [.contract-subindex-inherited]
  2462. .IAccessManaged
  2463. * {xref-IAccessManaged-AuthorityUpdated-address-}[`++AuthorityUpdated(authority)++`]
  2464. --
  2465. [.contract-index]
  2466. .Errors
  2467. --
  2468. [.contract-subindex-inherited]
  2469. .IAccessManaged
  2470. * {xref-IAccessManaged-AccessManagedUnauthorized-address-}[`++AccessManagedUnauthorized(caller)++`]
  2471. * {xref-IAccessManaged-AccessManagedRequiredDelay-address-uint32-}[`++AccessManagedRequiredDelay(caller, delay)++`]
  2472. * {xref-IAccessManaged-AccessManagedInvalidAuthority-address-}[`++AccessManagedInvalidAuthority(authority)++`]
  2473. --
  2474. [.contract-item]
  2475. [[AccessManaged-restricted--]]
  2476. ==== `[.contract-item-name]#++restricted++#++()++` [.item-kind]#modifier#
  2477. Restricts access to a function as defined by the connected Authority for this contract and the
  2478. caller and selector of the function that entered the contract.
  2479. [IMPORTANT]
  2480. ====
  2481. In general, this modifier should only be used on `external` functions. It is okay to use it on `public`
  2482. functions that are used as external entry points and are not called internally. Unless you know what you're
  2483. doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security
  2484. implications! This is because the permissions are determined by the function that entered the contract, i.e. the
  2485. function at the bottom of the call stack, and not the function where the modifier is visible in the source code.
  2486. ====
  2487. [WARNING]
  2488. ====
  2489. Avoid adding this modifier to the https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`]
  2490. function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These
  2491. functions are the only execution paths where a function selector cannot be unambiguosly determined from the calldata
  2492. since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()` function
  2493. if no calldata is provided. (See {_checkCanCall}).
  2494. The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length.
  2495. ====
  2496. [.contract-item]
  2497. [[AccessManaged-constructor-address-]]
  2498. ==== `[.contract-item-name]#++constructor++#++(address initialAuthority)++` [.item-kind]#internal#
  2499. Initializes the contract connected to an initial authority.
  2500. [.contract-item]
  2501. [[AccessManaged-authority--]]
  2502. ==== `[.contract-item-name]#++authority++#++() → address++` [.item-kind]#public#
  2503. Returns the current authority.
  2504. [.contract-item]
  2505. [[AccessManaged-setAuthority-address-]]
  2506. ==== `[.contract-item-name]#++setAuthority++#++(address newAuthority)++` [.item-kind]#public#
  2507. Transfers control to a new authority. The caller must be the current authority.
  2508. [.contract-item]
  2509. [[AccessManaged-isConsumingScheduledOp--]]
  2510. ==== `[.contract-item-name]#++isConsumingScheduledOp++#++() → bytes4++` [.item-kind]#public#
  2511. Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is
  2512. being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs
  2513. attacker controlled calls.
  2514. [.contract-item]
  2515. [[AccessManaged-_setAuthority-address-]]
  2516. ==== `[.contract-item-name]#++_setAuthority++#++(address newAuthority)++` [.item-kind]#internal#
  2517. Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the
  2518. permissions set by the current authority.
  2519. [.contract-item]
  2520. [[AccessManaged-_checkCanCall-address-bytes-]]
  2521. ==== `[.contract-item-name]#++_checkCanCall++#++(address caller, bytes data)++` [.item-kind]#internal#
  2522. Reverts if the caller is not allowed to call the function identified by a selector. Panics if the calldata
  2523. is less than 4 bytes long.
  2524. :canCallWithDelay: pass:normal[xref:#AuthorityUtils-canCallWithDelay-address-address-address-bytes4-[`++canCallWithDelay++`]]
  2525. [.contract]
  2526. [[AuthorityUtils]]
  2527. === `++AuthorityUtils++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/access/manager/AuthorityUtils.sol[{github-icon},role=heading-link]
  2528. [.hljs-theme-light.nopadding]
  2529. ```solidity
  2530. import "@openzeppelin/contracts/access/manager/AuthorityUtils.sol";
  2531. ```
  2532. [.contract-index]
  2533. .Functions
  2534. --
  2535. * {xref-AuthorityUtils-canCallWithDelay-address-address-address-bytes4-}[`++canCallWithDelay(authority, caller, target, selector)++`]
  2536. --
  2537. [.contract-item]
  2538. [[AuthorityUtils-canCallWithDelay-address-address-address-bytes4-]]
  2539. ==== `[.contract-item-name]#++canCallWithDelay++#++(address authority, address caller, address target, bytes4 selector) → bool immediate, uint32 delay++` [.item-kind]#internal#
  2540. Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility
  2541. for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.
  2542. This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.