access.adoc 134 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603
  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. :AccessManaged: pass:normal[xref:access.adoc#AccessManaged[`AccessManaged`]]
  173. :IAuthority: pass:normal[xref:access.adoc#IAuthority[`IAuthority`]]
  174. :Ownable: pass:normal[xref:access.adoc#Ownable[`Ownable`]]
  175. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  176. :Ownable: pass:normal[xref:access.adoc#Ownable[`Ownable`]]
  177. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  178. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  179. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  180. :Ownable: pass:normal[xref:access.adoc#Ownable[`Ownable`]]
  181. :AccessControl: pass:normal[xref:access.adoc#AccessControl[`AccessControl`]]
  182. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  183. :Ownable-renounceOwnership: pass:normal[xref:access.adoc#Ownable-renounceOwnership--[`Ownable.renounceOwnership`]]
  184. :AccessControl-renounceRole: pass:normal[xref:access.adoc#AccessControl-renounceRole-bytes32-address-[`AccessControl.renounceRole`]]
  185. :xref-AccessManager-onlyAuthorized--: xref:access.adoc#AccessManager-onlyAuthorized--
  186. :xref-AccessManager-constructor-address-: xref:access.adoc#AccessManager-constructor-address-
  187. :xref-AccessManager-canCall-address-address-bytes4-: xref:access.adoc#AccessManager-canCall-address-address-bytes4-
  188. :xref-AccessManager-expiration--: xref:access.adoc#AccessManager-expiration--
  189. :xref-AccessManager-minSetback--: xref:access.adoc#AccessManager-minSetback--
  190. :xref-AccessManager-isTargetClosed-address-: xref:access.adoc#AccessManager-isTargetClosed-address-
  191. :xref-AccessManager-getTargetFunctionRole-address-bytes4-: xref:access.adoc#AccessManager-getTargetFunctionRole-address-bytes4-
  192. :xref-AccessManager-getTargetAdminDelay-address-: xref:access.adoc#AccessManager-getTargetAdminDelay-address-
  193. :xref-AccessManager-getRoleAdmin-uint64-: xref:access.adoc#AccessManager-getRoleAdmin-uint64-
  194. :xref-AccessManager-getRoleGuardian-uint64-: xref:access.adoc#AccessManager-getRoleGuardian-uint64-
  195. :xref-AccessManager-getRoleGrantDelay-uint64-: xref:access.adoc#AccessManager-getRoleGrantDelay-uint64-
  196. :xref-AccessManager-getAccess-uint64-address-: xref:access.adoc#AccessManager-getAccess-uint64-address-
  197. :xref-AccessManager-hasRole-uint64-address-: xref:access.adoc#AccessManager-hasRole-uint64-address-
  198. :xref-AccessManager-labelRole-uint64-string-: xref:access.adoc#AccessManager-labelRole-uint64-string-
  199. :xref-AccessManager-grantRole-uint64-address-uint32-: xref:access.adoc#AccessManager-grantRole-uint64-address-uint32-
  200. :xref-AccessManager-revokeRole-uint64-address-: xref:access.adoc#AccessManager-revokeRole-uint64-address-
  201. :xref-AccessManager-renounceRole-uint64-address-: xref:access.adoc#AccessManager-renounceRole-uint64-address-
  202. :xref-AccessManager-setRoleAdmin-uint64-uint64-: xref:access.adoc#AccessManager-setRoleAdmin-uint64-uint64-
  203. :xref-AccessManager-setRoleGuardian-uint64-uint64-: xref:access.adoc#AccessManager-setRoleGuardian-uint64-uint64-
  204. :xref-AccessManager-setGrantDelay-uint64-uint32-: xref:access.adoc#AccessManager-setGrantDelay-uint64-uint32-
  205. :xref-AccessManager-_grantRole-uint64-address-uint32-uint32-: xref:access.adoc#AccessManager-_grantRole-uint64-address-uint32-uint32-
  206. :xref-AccessManager-_revokeRole-uint64-address-: xref:access.adoc#AccessManager-_revokeRole-uint64-address-
  207. :xref-AccessManager-_setRoleAdmin-uint64-uint64-: xref:access.adoc#AccessManager-_setRoleAdmin-uint64-uint64-
  208. :xref-AccessManager-_setRoleGuardian-uint64-uint64-: xref:access.adoc#AccessManager-_setRoleGuardian-uint64-uint64-
  209. :xref-AccessManager-_setGrantDelay-uint64-uint32-: xref:access.adoc#AccessManager-_setGrantDelay-uint64-uint32-
  210. :xref-AccessManager-setTargetFunctionRole-address-bytes4---uint64-: xref:access.adoc#AccessManager-setTargetFunctionRole-address-bytes4---uint64-
  211. :xref-AccessManager-_setTargetFunctionRole-address-bytes4-uint64-: xref:access.adoc#AccessManager-_setTargetFunctionRole-address-bytes4-uint64-
  212. :xref-AccessManager-setTargetAdminDelay-address-uint32-: xref:access.adoc#AccessManager-setTargetAdminDelay-address-uint32-
  213. :xref-AccessManager-_setTargetAdminDelay-address-uint32-: xref:access.adoc#AccessManager-_setTargetAdminDelay-address-uint32-
  214. :xref-AccessManager-setTargetClosed-address-bool-: xref:access.adoc#AccessManager-setTargetClosed-address-bool-
  215. :xref-AccessManager-_setTargetClosed-address-bool-: xref:access.adoc#AccessManager-_setTargetClosed-address-bool-
  216. :xref-AccessManager-getSchedule-bytes32-: xref:access.adoc#AccessManager-getSchedule-bytes32-
  217. :xref-AccessManager-getNonce-bytes32-: xref:access.adoc#AccessManager-getNonce-bytes32-
  218. :xref-AccessManager-schedule-address-bytes-uint48-: xref:access.adoc#AccessManager-schedule-address-bytes-uint48-
  219. :xref-AccessManager-execute-address-bytes-: xref:access.adoc#AccessManager-execute-address-bytes-
  220. :xref-AccessManager-consumeScheduledOp-address-bytes-: xref:access.adoc#AccessManager-consumeScheduledOp-address-bytes-
  221. :xref-AccessManager-_consumeScheduledOp-bytes32-: xref:access.adoc#AccessManager-_consumeScheduledOp-bytes32-
  222. :xref-AccessManager-cancel-address-address-bytes-: xref:access.adoc#AccessManager-cancel-address-address-bytes-
  223. :xref-AccessManager-hashOperation-address-address-bytes-: xref:access.adoc#AccessManager-hashOperation-address-address-bytes-
  224. :xref-AccessManager-updateAuthority-address-address-: xref:access.adoc#AccessManager-updateAuthority-address-address-
  225. :xref-AccessManager-ADMIN_ROLE-uint64: xref:access.adoc#AccessManager-ADMIN_ROLE-uint64
  226. :xref-AccessManager-PUBLIC_ROLE-uint64: xref:access.adoc#AccessManager-PUBLIC_ROLE-uint64
  227. :xref-Multicall-multicall-bytes---: xref:utils.adoc#Multicall-multicall-bytes---
  228. :xref-IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-: xref:access.adoc#IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-
  229. :xref-IAccessManager-OperationExecuted-bytes32-uint32-: xref:access.adoc#IAccessManager-OperationExecuted-bytes32-uint32-
  230. :xref-IAccessManager-OperationCanceled-bytes32-uint32-: xref:access.adoc#IAccessManager-OperationCanceled-bytes32-uint32-
  231. :xref-IAccessManager-RoleLabel-uint64-string-: xref:access.adoc#IAccessManager-RoleLabel-uint64-string-
  232. :xref-IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-: xref:access.adoc#IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-
  233. :xref-IAccessManager-RoleRevoked-uint64-address-: xref:access.adoc#IAccessManager-RoleRevoked-uint64-address-
  234. :xref-IAccessManager-RoleAdminChanged-uint64-uint64-: xref:access.adoc#IAccessManager-RoleAdminChanged-uint64-uint64-
  235. :xref-IAccessManager-RoleGuardianChanged-uint64-uint64-: xref:access.adoc#IAccessManager-RoleGuardianChanged-uint64-uint64-
  236. :xref-IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-: xref:access.adoc#IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-
  237. :xref-IAccessManager-TargetClosed-address-bool-: xref:access.adoc#IAccessManager-TargetClosed-address-bool-
  238. :xref-IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-: xref:access.adoc#IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-
  239. :xref-IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-: xref:access.adoc#IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-
  240. :xref-IAccessManager-AccessManagerAlreadyScheduled-bytes32-: xref:access.adoc#IAccessManager-AccessManagerAlreadyScheduled-bytes32-
  241. :xref-IAccessManager-AccessManagerNotScheduled-bytes32-: xref:access.adoc#IAccessManager-AccessManagerNotScheduled-bytes32-
  242. :xref-IAccessManager-AccessManagerNotReady-bytes32-: xref:access.adoc#IAccessManager-AccessManagerNotReady-bytes32-
  243. :xref-IAccessManager-AccessManagerExpired-bytes32-: xref:access.adoc#IAccessManager-AccessManagerExpired-bytes32-
  244. :xref-IAccessManager-AccessManagerLockedAccount-address-: xref:access.adoc#IAccessManager-AccessManagerLockedAccount-address-
  245. :xref-IAccessManager-AccessManagerLockedRole-uint64-: xref:access.adoc#IAccessManager-AccessManagerLockedRole-uint64-
  246. :xref-IAccessManager-AccessManagerBadConfirmation--: xref:access.adoc#IAccessManager-AccessManagerBadConfirmation--
  247. :xref-IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-
  248. :xref-IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-
  249. :xref-IAccessManager-AccessManagerUnauthorizedConsume-address-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedConsume-address-
  250. :xref-IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-: xref:access.adoc#IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-
  251. :xref-IAccessManager-AccessManagerInvalidInitialAdmin-address-: xref:access.adoc#IAccessManager-AccessManagerInvalidInitialAdmin-address-
  252. :AccessManager: pass:normal[xref:access.adoc#AccessManager[`AccessManager`]]
  253. :IAuthority: pass:normal[xref:access.adoc#IAuthority[`IAuthority`]]
  254. :xref-AccessManaged-restricted--: xref:access.adoc#AccessManaged-restricted--
  255. :xref-AccessManaged-constructor-address-: xref:access.adoc#AccessManaged-constructor-address-
  256. :xref-AccessManaged-authority--: xref:access.adoc#AccessManaged-authority--
  257. :xref-AccessManaged-setAuthority-address-: xref:access.adoc#AccessManaged-setAuthority-address-
  258. :xref-AccessManaged-isConsumingScheduledOp--: xref:access.adoc#AccessManaged-isConsumingScheduledOp--
  259. :xref-AccessManaged-_setAuthority-address-: xref:access.adoc#AccessManaged-_setAuthority-address-
  260. :xref-AccessManaged-_checkCanCall-address-bytes-: xref:access.adoc#AccessManaged-_checkCanCall-address-bytes-
  261. :xref-IAccessManaged-AuthorityUpdated-address-: xref:access.adoc#IAccessManaged-AuthorityUpdated-address-
  262. :xref-IAccessManaged-AccessManagedUnauthorized-address-: xref:access.adoc#IAccessManaged-AccessManagedUnauthorized-address-
  263. :xref-IAccessManaged-AccessManagedRequiredDelay-address-uint32-: xref:access.adoc#IAccessManaged-AccessManagedRequiredDelay-address-uint32-
  264. :xref-IAccessManaged-AccessManagedInvalidAuthority-address-: xref:access.adoc#IAccessManaged-AccessManagedInvalidAuthority-address-
  265. = Access Control
  266. [.readme-notice]
  267. NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/access
  268. This directory provides ways to restrict who can access the functions of a contract or when they can do it.
  269. - {AccessControl} provides a general role based access control mechanism. Multiple hierarchical roles can be created and assigned each to multiple accounts.
  270. - {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.
  271. == Core
  272. :OwnableUnauthorizedAccount: pass:normal[xref:#Ownable-OwnableUnauthorizedAccount-address-[`++OwnableUnauthorizedAccount++`]]
  273. :OwnableInvalidOwner: pass:normal[xref:#Ownable-OwnableInvalidOwner-address-[`++OwnableInvalidOwner++`]]
  274. :OwnershipTransferred: pass:normal[xref:#Ownable-OwnershipTransferred-address-address-[`++OwnershipTransferred++`]]
  275. :constructor: pass:normal[xref:#Ownable-constructor-address-[`++constructor++`]]
  276. :onlyOwner: pass:normal[xref:#Ownable-onlyOwner--[`++onlyOwner++`]]
  277. :owner: pass:normal[xref:#Ownable-owner--[`++owner++`]]
  278. :_checkOwner: pass:normal[xref:#Ownable-_checkOwner--[`++_checkOwner++`]]
  279. :renounceOwnership: pass:normal[xref:#Ownable-renounceOwnership--[`++renounceOwnership++`]]
  280. :transferOwnership: pass:normal[xref:#Ownable-transferOwnership-address-[`++transferOwnership++`]]
  281. :_transferOwnership: pass:normal[xref:#Ownable-_transferOwnership-address-[`++_transferOwnership++`]]
  282. [.contract]
  283. [[Ownable]]
  284. === `++Ownable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/Ownable.sol[{github-icon},role=heading-link]
  285. [.hljs-theme-light.nopadding]
  286. ```solidity
  287. import "@openzeppelin/contracts/access/Ownable.sol";
  288. ```
  289. Contract module which provides a basic access control mechanism, where
  290. there is an account (an owner) that can be granted exclusive access to
  291. specific functions.
  292. The initial owner is set to the address provided by the deployer. This can
  293. later be changed with {transferOwnership}.
  294. This module is used through inheritance. It will make available the modifier
  295. `onlyOwner`, which can be applied to your functions to restrict their use to
  296. the owner.
  297. [.contract-index]
  298. .Modifiers
  299. --
  300. * {xref-Ownable-onlyOwner--}[`++onlyOwner()++`]
  301. --
  302. [.contract-index]
  303. .Functions
  304. --
  305. * {xref-Ownable-constructor-address-}[`++constructor(initialOwner)++`]
  306. * {xref-Ownable-owner--}[`++owner()++`]
  307. * {xref-Ownable-_checkOwner--}[`++_checkOwner()++`]
  308. * {xref-Ownable-renounceOwnership--}[`++renounceOwnership()++`]
  309. * {xref-Ownable-transferOwnership-address-}[`++transferOwnership(newOwner)++`]
  310. * {xref-Ownable-_transferOwnership-address-}[`++_transferOwnership(newOwner)++`]
  311. --
  312. [.contract-index]
  313. .Events
  314. --
  315. * {xref-Ownable-OwnershipTransferred-address-address-}[`++OwnershipTransferred(previousOwner, newOwner)++`]
  316. --
  317. [.contract-index]
  318. .Errors
  319. --
  320. * {xref-Ownable-OwnableUnauthorizedAccount-address-}[`++OwnableUnauthorizedAccount(account)++`]
  321. * {xref-Ownable-OwnableInvalidOwner-address-}[`++OwnableInvalidOwner(owner)++`]
  322. --
  323. [.contract-item]
  324. [[Ownable-onlyOwner--]]
  325. ==== `[.contract-item-name]#++onlyOwner++#++()++` [.item-kind]#modifier#
  326. Throws if called by any account other than the owner.
  327. [.contract-item]
  328. [[Ownable-constructor-address-]]
  329. ==== `[.contract-item-name]#++constructor++#++(address initialOwner)++` [.item-kind]#internal#
  330. Initializes the contract setting the address provided by the deployer as the initial owner.
  331. [.contract-item]
  332. [[Ownable-owner--]]
  333. ==== `[.contract-item-name]#++owner++#++() → address++` [.item-kind]#public#
  334. Returns the address of the current owner.
  335. [.contract-item]
  336. [[Ownable-_checkOwner--]]
  337. ==== `[.contract-item-name]#++_checkOwner++#++()++` [.item-kind]#internal#
  338. Throws if the sender is not the owner.
  339. [.contract-item]
  340. [[Ownable-renounceOwnership--]]
  341. ==== `[.contract-item-name]#++renounceOwnership++#++()++` [.item-kind]#public#
  342. Leaves the contract without owner. It will not be possible to call
  343. `onlyOwner` functions. Can only be called by the current owner.
  344. NOTE: Renouncing ownership will leave the contract without an owner,
  345. thereby disabling any functionality that is only available to the owner.
  346. [.contract-item]
  347. [[Ownable-transferOwnership-address-]]
  348. ==== `[.contract-item-name]#++transferOwnership++#++(address newOwner)++` [.item-kind]#public#
  349. Transfers ownership of the contract to a new account (`newOwner`).
  350. Can only be called by the current owner.
  351. [.contract-item]
  352. [[Ownable-_transferOwnership-address-]]
  353. ==== `[.contract-item-name]#++_transferOwnership++#++(address newOwner)++` [.item-kind]#internal#
  354. Transfers ownership of the contract to a new account (`newOwner`).
  355. Internal function without access restriction.
  356. [.contract-item]
  357. [[Ownable-OwnershipTransferred-address-address-]]
  358. ==== `[.contract-item-name]#++OwnershipTransferred++#++(address indexed previousOwner, address indexed newOwner)++` [.item-kind]#event#
  359. [.contract-item]
  360. [[Ownable-OwnableUnauthorizedAccount-address-]]
  361. ==== `[.contract-item-name]#++OwnableUnauthorizedAccount++#++(address account)++` [.item-kind]#error#
  362. The caller account is not authorized to perform an operation.
  363. [.contract-item]
  364. [[Ownable-OwnableInvalidOwner-address-]]
  365. ==== `[.contract-item-name]#++OwnableInvalidOwner++#++(address owner)++` [.item-kind]#error#
  366. The owner is not a valid owner account. (eg. `address(0)`)
  367. :OwnershipTransferStarted: pass:normal[xref:#Ownable2Step-OwnershipTransferStarted-address-address-[`++OwnershipTransferStarted++`]]
  368. :pendingOwner: pass:normal[xref:#Ownable2Step-pendingOwner--[`++pendingOwner++`]]
  369. :transferOwnership: pass:normal[xref:#Ownable2Step-transferOwnership-address-[`++transferOwnership++`]]
  370. :_transferOwnership: pass:normal[xref:#Ownable2Step-_transferOwnership-address-[`++_transferOwnership++`]]
  371. :acceptOwnership: pass:normal[xref:#Ownable2Step-acceptOwnership--[`++acceptOwnership++`]]
  372. [.contract]
  373. [[Ownable2Step]]
  374. === `++Ownable2Step++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/Ownable2Step.sol[{github-icon},role=heading-link]
  375. [.hljs-theme-light.nopadding]
  376. ```solidity
  377. import "@openzeppelin/contracts/access/Ownable2Step.sol";
  378. ```
  379. Contract module which provides access control mechanism, where
  380. there is an account (an owner) that can be granted exclusive access to
  381. specific functions.
  382. The initial owner is specified at deployment time in the constructor for `Ownable`. This
  383. can later be changed with {transferOwnership} and {acceptOwnership}.
  384. This module is used through inheritance. It will make available all functions
  385. from parent (Ownable).
  386. [.contract-index]
  387. .Functions
  388. --
  389. * {xref-Ownable2Step-pendingOwner--}[`++pendingOwner()++`]
  390. * {xref-Ownable2Step-transferOwnership-address-}[`++transferOwnership(newOwner)++`]
  391. * {xref-Ownable2Step-_transferOwnership-address-}[`++_transferOwnership(newOwner)++`]
  392. * {xref-Ownable2Step-acceptOwnership--}[`++acceptOwnership()++`]
  393. [.contract-subindex-inherited]
  394. .Ownable
  395. * {xref-Ownable-owner--}[`++owner()++`]
  396. * {xref-Ownable-_checkOwner--}[`++_checkOwner()++`]
  397. * {xref-Ownable-renounceOwnership--}[`++renounceOwnership()++`]
  398. --
  399. [.contract-index]
  400. .Events
  401. --
  402. * {xref-Ownable2Step-OwnershipTransferStarted-address-address-}[`++OwnershipTransferStarted(previousOwner, newOwner)++`]
  403. [.contract-subindex-inherited]
  404. .Ownable
  405. * {xref-Ownable-OwnershipTransferred-address-address-}[`++OwnershipTransferred(previousOwner, newOwner)++`]
  406. --
  407. [.contract-index]
  408. .Errors
  409. --
  410. [.contract-subindex-inherited]
  411. .Ownable
  412. * {xref-Ownable-OwnableUnauthorizedAccount-address-}[`++OwnableUnauthorizedAccount(account)++`]
  413. * {xref-Ownable-OwnableInvalidOwner-address-}[`++OwnableInvalidOwner(owner)++`]
  414. --
  415. [.contract-item]
  416. [[Ownable2Step-pendingOwner--]]
  417. ==== `[.contract-item-name]#++pendingOwner++#++() → address++` [.item-kind]#public#
  418. Returns the address of the pending owner.
  419. [.contract-item]
  420. [[Ownable2Step-transferOwnership-address-]]
  421. ==== `[.contract-item-name]#++transferOwnership++#++(address newOwner)++` [.item-kind]#public#
  422. Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
  423. Can only be called by the current owner.
  424. [.contract-item]
  425. [[Ownable2Step-_transferOwnership-address-]]
  426. ==== `[.contract-item-name]#++_transferOwnership++#++(address newOwner)++` [.item-kind]#internal#
  427. Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
  428. Internal function without access restriction.
  429. [.contract-item]
  430. [[Ownable2Step-acceptOwnership--]]
  431. ==== `[.contract-item-name]#++acceptOwnership++#++()++` [.item-kind]#public#
  432. The new owner accepts the ownership transfer.
  433. [.contract-item]
  434. [[Ownable2Step-OwnershipTransferStarted-address-address-]]
  435. ==== `[.contract-item-name]#++OwnershipTransferStarted++#++(address indexed previousOwner, address indexed newOwner)++` [.item-kind]#event#
  436. :AccessControlUnauthorizedAccount: pass:normal[xref:#IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-[`++AccessControlUnauthorizedAccount++`]]
  437. :AccessControlBadConfirmation: pass:normal[xref:#IAccessControl-AccessControlBadConfirmation--[`++AccessControlBadConfirmation++`]]
  438. :RoleAdminChanged: pass:normal[xref:#IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-[`++RoleAdminChanged++`]]
  439. :RoleGranted: pass:normal[xref:#IAccessControl-RoleGranted-bytes32-address-address-[`++RoleGranted++`]]
  440. :RoleRevoked: pass:normal[xref:#IAccessControl-RoleRevoked-bytes32-address-address-[`++RoleRevoked++`]]
  441. :hasRole: pass:normal[xref:#IAccessControl-hasRole-bytes32-address-[`++hasRole++`]]
  442. :getRoleAdmin: pass:normal[xref:#IAccessControl-getRoleAdmin-bytes32-[`++getRoleAdmin++`]]
  443. :grantRole: pass:normal[xref:#IAccessControl-grantRole-bytes32-address-[`++grantRole++`]]
  444. :revokeRole: pass:normal[xref:#IAccessControl-revokeRole-bytes32-address-[`++revokeRole++`]]
  445. :renounceRole: pass:normal[xref:#IAccessControl-renounceRole-bytes32-address-[`++renounceRole++`]]
  446. [.contract]
  447. [[IAccessControl]]
  448. === `++IAccessControl++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/IAccessControl.sol[{github-icon},role=heading-link]
  449. [.hljs-theme-light.nopadding]
  450. ```solidity
  451. import "@openzeppelin/contracts/access/IAccessControl.sol";
  452. ```
  453. External interface of AccessControl declared to support ERC165 detection.
  454. [.contract-index]
  455. .Functions
  456. --
  457. * {xref-IAccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  458. * {xref-IAccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  459. * {xref-IAccessControl-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  460. * {xref-IAccessControl-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  461. * {xref-IAccessControl-renounceRole-bytes32-address-}[`++renounceRole(role, callerConfirmation)++`]
  462. --
  463. [.contract-index]
  464. .Events
  465. --
  466. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  467. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  468. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  469. --
  470. [.contract-index]
  471. .Errors
  472. --
  473. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  474. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  475. --
  476. [.contract-item]
  477. [[IAccessControl-hasRole-bytes32-address-]]
  478. ==== `[.contract-item-name]#++hasRole++#++(bytes32 role, address account) → bool++` [.item-kind]#external#
  479. Returns `true` if `account` has been granted `role`.
  480. [.contract-item]
  481. [[IAccessControl-getRoleAdmin-bytes32-]]
  482. ==== `[.contract-item-name]#++getRoleAdmin++#++(bytes32 role) → bytes32++` [.item-kind]#external#
  483. Returns the admin role that controls `role`. See {grantRole} and
  484. {revokeRole}.
  485. To change a role's admin, use {AccessControl-_setRoleAdmin}.
  486. [.contract-item]
  487. [[IAccessControl-grantRole-bytes32-address-]]
  488. ==== `[.contract-item-name]#++grantRole++#++(bytes32 role, address account)++` [.item-kind]#external#
  489. Grants `role` to `account`.
  490. If `account` had not been already granted `role`, emits a {RoleGranted}
  491. event.
  492. Requirements:
  493. - the caller must have ``role``'s admin role.
  494. [.contract-item]
  495. [[IAccessControl-revokeRole-bytes32-address-]]
  496. ==== `[.contract-item-name]#++revokeRole++#++(bytes32 role, address account)++` [.item-kind]#external#
  497. Revokes `role` from `account`.
  498. If `account` had been granted `role`, emits a {RoleRevoked} event.
  499. Requirements:
  500. - the caller must have ``role``'s admin role.
  501. [.contract-item]
  502. [[IAccessControl-renounceRole-bytes32-address-]]
  503. ==== `[.contract-item-name]#++renounceRole++#++(bytes32 role, address callerConfirmation)++` [.item-kind]#external#
  504. Revokes `role` from the calling account.
  505. Roles are often managed via {grantRole} and {revokeRole}: this function's
  506. purpose is to provide a mechanism for accounts to lose their privileges
  507. if they are compromised (such as when a trusted device is misplaced).
  508. If the calling account had been granted `role`, emits a {RoleRevoked}
  509. event.
  510. Requirements:
  511. - the caller must be `callerConfirmation`.
  512. [.contract-item]
  513. [[IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-]]
  514. ==== `[.contract-item-name]#++RoleAdminChanged++#++(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)++` [.item-kind]#event#
  515. Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
  516. `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
  517. {RoleAdminChanged} not being emitted signaling this.
  518. [.contract-item]
  519. [[IAccessControl-RoleGranted-bytes32-address-address-]]
  520. ==== `[.contract-item-name]#++RoleGranted++#++(bytes32 indexed role, address indexed account, address indexed sender)++` [.item-kind]#event#
  521. Emitted when `account` is granted `role`.
  522. `sender` is the account that originated the contract call, an admin role
  523. bearer except when using {AccessControl-_setupRole}.
  524. [.contract-item]
  525. [[IAccessControl-RoleRevoked-bytes32-address-address-]]
  526. ==== `[.contract-item-name]#++RoleRevoked++#++(bytes32 indexed role, address indexed account, address indexed sender)++` [.item-kind]#event#
  527. Emitted when `account` is revoked `role`.
  528. `sender` is the account that originated the contract call:
  529. - if using `revokeRole`, it is the admin role bearer
  530. - if using `renounceRole`, it is the role bearer (i.e. `account`)
  531. [.contract-item]
  532. [[IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-]]
  533. ==== `[.contract-item-name]#++AccessControlUnauthorizedAccount++#++(address account, bytes32 neededRole)++` [.item-kind]#error#
  534. The `account` is missing a role.
  535. [.contract-item]
  536. [[IAccessControl-AccessControlBadConfirmation--]]
  537. ==== `[.contract-item-name]#++AccessControlBadConfirmation++#++()++` [.item-kind]#error#
  538. The caller of a function is not the expected one.
  539. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
  540. :RoleData: pass:normal[xref:#AccessControl-RoleData[`++RoleData++`]]
  541. :DEFAULT_ADMIN_ROLE: pass:normal[xref:#AccessControl-DEFAULT_ADMIN_ROLE-bytes32[`++DEFAULT_ADMIN_ROLE++`]]
  542. :onlyRole: pass:normal[xref:#AccessControl-onlyRole-bytes32-[`++onlyRole++`]]
  543. :supportsInterface: pass:normal[xref:#AccessControl-supportsInterface-bytes4-[`++supportsInterface++`]]
  544. :hasRole: pass:normal[xref:#AccessControl-hasRole-bytes32-address-[`++hasRole++`]]
  545. :_checkRole: pass:normal[xref:#AccessControl-_checkRole-bytes32-[`++_checkRole++`]]
  546. :_checkRole: pass:normal[xref:#AccessControl-_checkRole-bytes32-address-[`++_checkRole++`]]
  547. :getRoleAdmin: pass:normal[xref:#AccessControl-getRoleAdmin-bytes32-[`++getRoleAdmin++`]]
  548. :grantRole: pass:normal[xref:#AccessControl-grantRole-bytes32-address-[`++grantRole++`]]
  549. :revokeRole: pass:normal[xref:#AccessControl-revokeRole-bytes32-address-[`++revokeRole++`]]
  550. :renounceRole: pass:normal[xref:#AccessControl-renounceRole-bytes32-address-[`++renounceRole++`]]
  551. :_setRoleAdmin: pass:normal[xref:#AccessControl-_setRoleAdmin-bytes32-bytes32-[`++_setRoleAdmin++`]]
  552. :_grantRole: pass:normal[xref:#AccessControl-_grantRole-bytes32-address-[`++_grantRole++`]]
  553. :_revokeRole: pass:normal[xref:#AccessControl-_revokeRole-bytes32-address-[`++_revokeRole++`]]
  554. [.contract]
  555. [[AccessControl]]
  556. === `++AccessControl++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/AccessControl.sol[{github-icon},role=heading-link]
  557. [.hljs-theme-light.nopadding]
  558. ```solidity
  559. import "@openzeppelin/contracts/access/AccessControl.sol";
  560. ```
  561. Contract module that allows children to implement role-based access
  562. control mechanisms. This is a lightweight version that doesn't allow enumerating role
  563. members except through off-chain means by accessing the contract event logs. Some
  564. applications may benefit from on-chain enumerability, for those cases see
  565. {AccessControlEnumerable}.
  566. Roles are referred to by their `bytes32` identifier. These should be exposed
  567. in the external API and be unique. The best way to achieve this is by
  568. using `public constant` hash digests:
  569. ```solidity
  570. bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
  571. ```
  572. Roles can be used to represent a set of permissions. To restrict access to a
  573. function call, use {hasRole}:
  574. ```solidity
  575. function foo() public {
  576. require(hasRole(MY_ROLE, msg.sender));
  577. ...
  578. }
  579. ```
  580. Roles can be granted and revoked dynamically via the {grantRole} and
  581. {revokeRole} functions. Each role has an associated admin role, and only
  582. accounts that have a role's admin role can call {grantRole} and {revokeRole}.
  583. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
  584. that only accounts with this role will be able to grant or revoke other
  585. roles. More complex role relationships can be created by using
  586. {_setRoleAdmin}.
  587. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
  588. grant and revoke this role. Extra precautions should be taken to secure
  589. accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
  590. to enforce additional security measures for this role.
  591. [.contract-index]
  592. .Modifiers
  593. --
  594. * {xref-AccessControl-onlyRole-bytes32-}[`++onlyRole(role)++`]
  595. --
  596. [.contract-index]
  597. .Functions
  598. --
  599. * {xref-AccessControl-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  600. * {xref-AccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  601. * {xref-AccessControl-_checkRole-bytes32-}[`++_checkRole(role)++`]
  602. * {xref-AccessControl-_checkRole-bytes32-address-}[`++_checkRole(role, account)++`]
  603. * {xref-AccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  604. * {xref-AccessControl-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  605. * {xref-AccessControl-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  606. * {xref-AccessControl-renounceRole-bytes32-address-}[`++renounceRole(role, callerConfirmation)++`]
  607. * {xref-AccessControl-_setRoleAdmin-bytes32-bytes32-}[`++_setRoleAdmin(role, adminRole)++`]
  608. * {xref-AccessControl-_grantRole-bytes32-address-}[`++_grantRole(role, account)++`]
  609. * {xref-AccessControl-_revokeRole-bytes32-address-}[`++_revokeRole(role, account)++`]
  610. * {xref-AccessControl-DEFAULT_ADMIN_ROLE-bytes32}[`++DEFAULT_ADMIN_ROLE()++`]
  611. [.contract-subindex-inherited]
  612. .ERC165
  613. [.contract-subindex-inherited]
  614. .IERC165
  615. [.contract-subindex-inherited]
  616. .IAccessControl
  617. --
  618. [.contract-index]
  619. .Events
  620. --
  621. [.contract-subindex-inherited]
  622. .ERC165
  623. [.contract-subindex-inherited]
  624. .IERC165
  625. [.contract-subindex-inherited]
  626. .IAccessControl
  627. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  628. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  629. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  630. --
  631. [.contract-index]
  632. .Errors
  633. --
  634. [.contract-subindex-inherited]
  635. .ERC165
  636. [.contract-subindex-inherited]
  637. .IERC165
  638. [.contract-subindex-inherited]
  639. .IAccessControl
  640. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  641. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  642. --
  643. [.contract-item]
  644. [[AccessControl-onlyRole-bytes32-]]
  645. ==== `[.contract-item-name]#++onlyRole++#++(bytes32 role)++` [.item-kind]#modifier#
  646. Modifier that checks that an account has a specific role. Reverts
  647. with an {AccessControlUnauthorizedAccount} error including the required role.
  648. [.contract-item]
  649. [[AccessControl-supportsInterface-bytes4-]]
  650. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#public#
  651. See {IERC165-supportsInterface}.
  652. [.contract-item]
  653. [[AccessControl-hasRole-bytes32-address-]]
  654. ==== `[.contract-item-name]#++hasRole++#++(bytes32 role, address account) → bool++` [.item-kind]#public#
  655. Returns `true` if `account` has been granted `role`.
  656. [.contract-item]
  657. [[AccessControl-_checkRole-bytes32-]]
  658. ==== `[.contract-item-name]#++_checkRole++#++(bytes32 role)++` [.item-kind]#internal#
  659. Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
  660. is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
  661. [.contract-item]
  662. [[AccessControl-_checkRole-bytes32-address-]]
  663. ==== `[.contract-item-name]#++_checkRole++#++(bytes32 role, address account)++` [.item-kind]#internal#
  664. Reverts with an {AccessControlUnauthorizedAccount} error if `account`
  665. is missing `role`.
  666. [.contract-item]
  667. [[AccessControl-getRoleAdmin-bytes32-]]
  668. ==== `[.contract-item-name]#++getRoleAdmin++#++(bytes32 role) → bytes32++` [.item-kind]#public#
  669. Returns the admin role that controls `role`. See {grantRole} and
  670. {revokeRole}.
  671. To change a role's admin, use {_setRoleAdmin}.
  672. [.contract-item]
  673. [[AccessControl-grantRole-bytes32-address-]]
  674. ==== `[.contract-item-name]#++grantRole++#++(bytes32 role, address account)++` [.item-kind]#public#
  675. Grants `role` to `account`.
  676. If `account` had not been already granted `role`, emits a {RoleGranted}
  677. event.
  678. Requirements:
  679. - the caller must have ``role``'s admin role.
  680. May emit a {RoleGranted} event.
  681. [.contract-item]
  682. [[AccessControl-revokeRole-bytes32-address-]]
  683. ==== `[.contract-item-name]#++revokeRole++#++(bytes32 role, address account)++` [.item-kind]#public#
  684. Revokes `role` from `account`.
  685. If `account` had been granted `role`, emits a {RoleRevoked} event.
  686. Requirements:
  687. - the caller must have ``role``'s admin role.
  688. May emit a {RoleRevoked} event.
  689. [.contract-item]
  690. [[AccessControl-renounceRole-bytes32-address-]]
  691. ==== `[.contract-item-name]#++renounceRole++#++(bytes32 role, address callerConfirmation)++` [.item-kind]#public#
  692. Revokes `role` from the calling account.
  693. Roles are often managed via {grantRole} and {revokeRole}: this function's
  694. purpose is to provide a mechanism for accounts to lose their privileges
  695. if they are compromised (such as when a trusted device is misplaced).
  696. If the calling account had been revoked `role`, emits a {RoleRevoked}
  697. event.
  698. Requirements:
  699. - the caller must be `callerConfirmation`.
  700. May emit a {RoleRevoked} event.
  701. [.contract-item]
  702. [[AccessControl-_setRoleAdmin-bytes32-bytes32-]]
  703. ==== `[.contract-item-name]#++_setRoleAdmin++#++(bytes32 role, bytes32 adminRole)++` [.item-kind]#internal#
  704. Sets `adminRole` as ``role``'s admin role.
  705. Emits a {RoleAdminChanged} event.
  706. [.contract-item]
  707. [[AccessControl-_grantRole-bytes32-address-]]
  708. ==== `[.contract-item-name]#++_grantRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  709. Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
  710. Internal function without access restriction.
  711. May emit a {RoleGranted} event.
  712. [.contract-item]
  713. [[AccessControl-_revokeRole-bytes32-address-]]
  714. ==== `[.contract-item-name]#++_revokeRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  715. Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
  716. Internal function without access restriction.
  717. May emit a {RoleRevoked} event.
  718. [.contract-item]
  719. [[AccessControl-DEFAULT_ADMIN_ROLE-bytes32]]
  720. ==== `[.contract-item-name]#++DEFAULT_ADMIN_ROLE++#++() → bytes32++` [.item-kind]#public#
  721. == Extensions
  722. :getRoleMember: pass:normal[xref:#IAccessControlEnumerable-getRoleMember-bytes32-uint256-[`++getRoleMember++`]]
  723. :getRoleMemberCount: pass:normal[xref:#IAccessControlEnumerable-getRoleMemberCount-bytes32-[`++getRoleMemberCount++`]]
  724. [.contract]
  725. [[IAccessControlEnumerable]]
  726. === `++IAccessControlEnumerable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/extensions/IAccessControlEnumerable.sol[{github-icon},role=heading-link]
  727. [.hljs-theme-light.nopadding]
  728. ```solidity
  729. import "@openzeppelin/contracts/access/extensions/IAccessControlEnumerable.sol";
  730. ```
  731. External interface of AccessControlEnumerable declared to support ERC165 detection.
  732. [.contract-index]
  733. .Functions
  734. --
  735. * {xref-IAccessControlEnumerable-getRoleMember-bytes32-uint256-}[`++getRoleMember(role, index)++`]
  736. * {xref-IAccessControlEnumerable-getRoleMemberCount-bytes32-}[`++getRoleMemberCount(role)++`]
  737. [.contract-subindex-inherited]
  738. .IAccessControl
  739. * {xref-IAccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  740. * {xref-IAccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  741. * {xref-IAccessControl-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  742. * {xref-IAccessControl-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  743. * {xref-IAccessControl-renounceRole-bytes32-address-}[`++renounceRole(role, callerConfirmation)++`]
  744. --
  745. [.contract-index]
  746. .Events
  747. --
  748. [.contract-subindex-inherited]
  749. .IAccessControl
  750. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  751. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  752. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  753. --
  754. [.contract-index]
  755. .Errors
  756. --
  757. [.contract-subindex-inherited]
  758. .IAccessControl
  759. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  760. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  761. --
  762. [.contract-item]
  763. [[IAccessControlEnumerable-getRoleMember-bytes32-uint256-]]
  764. ==== `[.contract-item-name]#++getRoleMember++#++(bytes32 role, uint256 index) → address++` [.item-kind]#external#
  765. Returns one of the accounts that have `role`. `index` must be a
  766. value between 0 and {getRoleMemberCount}, non-inclusive.
  767. Role bearers are not sorted in any particular way, and their ordering may
  768. change at any point.
  769. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
  770. you perform all queries on the same block. See the following
  771. https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
  772. for more information.
  773. [.contract-item]
  774. [[IAccessControlEnumerable-getRoleMemberCount-bytes32-]]
  775. ==== `[.contract-item-name]#++getRoleMemberCount++#++(bytes32 role) → uint256++` [.item-kind]#external#
  776. Returns the number of accounts that have `role`. Can be used
  777. together with {getRoleMember} to enumerate all bearers of a role.
  778. :supportsInterface: pass:normal[xref:#AccessControlEnumerable-supportsInterface-bytes4-[`++supportsInterface++`]]
  779. :getRoleMember: pass:normal[xref:#AccessControlEnumerable-getRoleMember-bytes32-uint256-[`++getRoleMember++`]]
  780. :getRoleMemberCount: pass:normal[xref:#AccessControlEnumerable-getRoleMemberCount-bytes32-[`++getRoleMemberCount++`]]
  781. :_grantRole: pass:normal[xref:#AccessControlEnumerable-_grantRole-bytes32-address-[`++_grantRole++`]]
  782. :_revokeRole: pass:normal[xref:#AccessControlEnumerable-_revokeRole-bytes32-address-[`++_revokeRole++`]]
  783. [.contract]
  784. [[AccessControlEnumerable]]
  785. === `++AccessControlEnumerable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/extensions/AccessControlEnumerable.sol[{github-icon},role=heading-link]
  786. [.hljs-theme-light.nopadding]
  787. ```solidity
  788. import "@openzeppelin/contracts/access/extensions/AccessControlEnumerable.sol";
  789. ```
  790. Extension of {AccessControl} that allows enumerating the members of each role.
  791. [.contract-index]
  792. .Functions
  793. --
  794. * {xref-AccessControlEnumerable-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  795. * {xref-AccessControlEnumerable-getRoleMember-bytes32-uint256-}[`++getRoleMember(role, index)++`]
  796. * {xref-AccessControlEnumerable-getRoleMemberCount-bytes32-}[`++getRoleMemberCount(role)++`]
  797. * {xref-AccessControlEnumerable-_grantRole-bytes32-address-}[`++_grantRole(role, account)++`]
  798. * {xref-AccessControlEnumerable-_revokeRole-bytes32-address-}[`++_revokeRole(role, account)++`]
  799. [.contract-subindex-inherited]
  800. .AccessControl
  801. * {xref-AccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  802. * {xref-AccessControl-_checkRole-bytes32-}[`++_checkRole(role)++`]
  803. * {xref-AccessControl-_checkRole-bytes32-address-}[`++_checkRole(role, account)++`]
  804. * {xref-AccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  805. * {xref-AccessControl-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  806. * {xref-AccessControl-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  807. * {xref-AccessControl-renounceRole-bytes32-address-}[`++renounceRole(role, callerConfirmation)++`]
  808. * {xref-AccessControl-_setRoleAdmin-bytes32-bytes32-}[`++_setRoleAdmin(role, adminRole)++`]
  809. * {xref-AccessControl-DEFAULT_ADMIN_ROLE-bytes32}[`++DEFAULT_ADMIN_ROLE()++`]
  810. [.contract-subindex-inherited]
  811. .ERC165
  812. [.contract-subindex-inherited]
  813. .IERC165
  814. [.contract-subindex-inherited]
  815. .IAccessControlEnumerable
  816. [.contract-subindex-inherited]
  817. .IAccessControl
  818. --
  819. [.contract-index]
  820. .Events
  821. --
  822. [.contract-subindex-inherited]
  823. .AccessControl
  824. [.contract-subindex-inherited]
  825. .ERC165
  826. [.contract-subindex-inherited]
  827. .IERC165
  828. [.contract-subindex-inherited]
  829. .IAccessControlEnumerable
  830. [.contract-subindex-inherited]
  831. .IAccessControl
  832. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  833. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  834. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  835. --
  836. [.contract-index]
  837. .Errors
  838. --
  839. [.contract-subindex-inherited]
  840. .AccessControl
  841. [.contract-subindex-inherited]
  842. .ERC165
  843. [.contract-subindex-inherited]
  844. .IERC165
  845. [.contract-subindex-inherited]
  846. .IAccessControlEnumerable
  847. [.contract-subindex-inherited]
  848. .IAccessControl
  849. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  850. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  851. --
  852. [.contract-item]
  853. [[AccessControlEnumerable-supportsInterface-bytes4-]]
  854. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#public#
  855. See {IERC165-supportsInterface}.
  856. [.contract-item]
  857. [[AccessControlEnumerable-getRoleMember-bytes32-uint256-]]
  858. ==== `[.contract-item-name]#++getRoleMember++#++(bytes32 role, uint256 index) → address++` [.item-kind]#public#
  859. Returns one of the accounts that have `role`. `index` must be a
  860. value between 0 and {getRoleMemberCount}, non-inclusive.
  861. Role bearers are not sorted in any particular way, and their ordering may
  862. change at any point.
  863. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
  864. you perform all queries on the same block. See the following
  865. https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
  866. for more information.
  867. [.contract-item]
  868. [[AccessControlEnumerable-getRoleMemberCount-bytes32-]]
  869. ==== `[.contract-item-name]#++getRoleMemberCount++#++(bytes32 role) → uint256++` [.item-kind]#public#
  870. Returns the number of accounts that have `role`. Can be used
  871. together with {getRoleMember} to enumerate all bearers of a role.
  872. [.contract-item]
  873. [[AccessControlEnumerable-_grantRole-bytes32-address-]]
  874. ==== `[.contract-item-name]#++_grantRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  875. Overload {AccessControl-_grantRole} to track enumerable memberships
  876. [.contract-item]
  877. [[AccessControlEnumerable-_revokeRole-bytes32-address-]]
  878. ==== `[.contract-item-name]#++_revokeRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  879. Overload {AccessControl-_revokeRole} to track enumerable memberships
  880. :AccessControlInvalidDefaultAdmin: pass:normal[xref:#IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-[`++AccessControlInvalidDefaultAdmin++`]]
  881. :AccessControlEnforcedDefaultAdminRules: pass:normal[xref:#IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--[`++AccessControlEnforcedDefaultAdminRules++`]]
  882. :AccessControlEnforcedDefaultAdminDelay: pass:normal[xref:#IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-[`++AccessControlEnforcedDefaultAdminDelay++`]]
  883. :DefaultAdminTransferScheduled: pass:normal[xref:#IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-[`++DefaultAdminTransferScheduled++`]]
  884. :DefaultAdminTransferCanceled: pass:normal[xref:#IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--[`++DefaultAdminTransferCanceled++`]]
  885. :DefaultAdminDelayChangeScheduled: pass:normal[xref:#IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-[`++DefaultAdminDelayChangeScheduled++`]]
  886. :DefaultAdminDelayChangeCanceled: pass:normal[xref:#IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--[`++DefaultAdminDelayChangeCanceled++`]]
  887. :defaultAdmin: pass:normal[xref:#IAccessControlDefaultAdminRules-defaultAdmin--[`++defaultAdmin++`]]
  888. :pendingDefaultAdmin: pass:normal[xref:#IAccessControlDefaultAdminRules-pendingDefaultAdmin--[`++pendingDefaultAdmin++`]]
  889. :defaultAdminDelay: pass:normal[xref:#IAccessControlDefaultAdminRules-defaultAdminDelay--[`++defaultAdminDelay++`]]
  890. :pendingDefaultAdminDelay: pass:normal[xref:#IAccessControlDefaultAdminRules-pendingDefaultAdminDelay--[`++pendingDefaultAdminDelay++`]]
  891. :beginDefaultAdminTransfer: pass:normal[xref:#IAccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-[`++beginDefaultAdminTransfer++`]]
  892. :cancelDefaultAdminTransfer: pass:normal[xref:#IAccessControlDefaultAdminRules-cancelDefaultAdminTransfer--[`++cancelDefaultAdminTransfer++`]]
  893. :acceptDefaultAdminTransfer: pass:normal[xref:#IAccessControlDefaultAdminRules-acceptDefaultAdminTransfer--[`++acceptDefaultAdminTransfer++`]]
  894. :changeDefaultAdminDelay: pass:normal[xref:#IAccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-[`++changeDefaultAdminDelay++`]]
  895. :rollbackDefaultAdminDelay: pass:normal[xref:#IAccessControlDefaultAdminRules-rollbackDefaultAdminDelay--[`++rollbackDefaultAdminDelay++`]]
  896. :defaultAdminDelayIncreaseWait: pass:normal[xref:#IAccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--[`++defaultAdminDelayIncreaseWait++`]]
  897. [.contract]
  898. [[IAccessControlDefaultAdminRules]]
  899. === `++IAccessControlDefaultAdminRules++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/extensions/IAccessControlDefaultAdminRules.sol[{github-icon},role=heading-link]
  900. [.hljs-theme-light.nopadding]
  901. ```solidity
  902. import "@openzeppelin/contracts/access/extensions/IAccessControlDefaultAdminRules.sol";
  903. ```
  904. External interface of AccessControlDefaultAdminRules declared to support ERC165 detection.
  905. [.contract-index]
  906. .Functions
  907. --
  908. * {xref-IAccessControlDefaultAdminRules-defaultAdmin--}[`++defaultAdmin()++`]
  909. * {xref-IAccessControlDefaultAdminRules-pendingDefaultAdmin--}[`++pendingDefaultAdmin()++`]
  910. * {xref-IAccessControlDefaultAdminRules-defaultAdminDelay--}[`++defaultAdminDelay()++`]
  911. * {xref-IAccessControlDefaultAdminRules-pendingDefaultAdminDelay--}[`++pendingDefaultAdminDelay()++`]
  912. * {xref-IAccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-}[`++beginDefaultAdminTransfer(newAdmin)++`]
  913. * {xref-IAccessControlDefaultAdminRules-cancelDefaultAdminTransfer--}[`++cancelDefaultAdminTransfer()++`]
  914. * {xref-IAccessControlDefaultAdminRules-acceptDefaultAdminTransfer--}[`++acceptDefaultAdminTransfer()++`]
  915. * {xref-IAccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-}[`++changeDefaultAdminDelay(newDelay)++`]
  916. * {xref-IAccessControlDefaultAdminRules-rollbackDefaultAdminDelay--}[`++rollbackDefaultAdminDelay()++`]
  917. * {xref-IAccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--}[`++defaultAdminDelayIncreaseWait()++`]
  918. [.contract-subindex-inherited]
  919. .IAccessControl
  920. * {xref-IAccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  921. * {xref-IAccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  922. * {xref-IAccessControl-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  923. * {xref-IAccessControl-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  924. * {xref-IAccessControl-renounceRole-bytes32-address-}[`++renounceRole(role, callerConfirmation)++`]
  925. --
  926. [.contract-index]
  927. .Events
  928. --
  929. * {xref-IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-}[`++DefaultAdminTransferScheduled(newAdmin, acceptSchedule)++`]
  930. * {xref-IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--}[`++DefaultAdminTransferCanceled()++`]
  931. * {xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-}[`++DefaultAdminDelayChangeScheduled(newDelay, effectSchedule)++`]
  932. * {xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--}[`++DefaultAdminDelayChangeCanceled()++`]
  933. [.contract-subindex-inherited]
  934. .IAccessControl
  935. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  936. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  937. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  938. --
  939. [.contract-index]
  940. .Errors
  941. --
  942. * {xref-IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-}[`++AccessControlInvalidDefaultAdmin(defaultAdmin)++`]
  943. * {xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--}[`++AccessControlEnforcedDefaultAdminRules()++`]
  944. * {xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-}[`++AccessControlEnforcedDefaultAdminDelay(schedule)++`]
  945. [.contract-subindex-inherited]
  946. .IAccessControl
  947. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  948. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  949. --
  950. [.contract-item]
  951. [[IAccessControlDefaultAdminRules-defaultAdmin--]]
  952. ==== `[.contract-item-name]#++defaultAdmin++#++() → address++` [.item-kind]#external#
  953. Returns the address of the current `DEFAULT_ADMIN_ROLE` holder.
  954. [.contract-item]
  955. [[IAccessControlDefaultAdminRules-pendingDefaultAdmin--]]
  956. ==== `[.contract-item-name]#++pendingDefaultAdmin++#++() → address newAdmin, uint48 acceptSchedule++` [.item-kind]#external#
  957. Returns a tuple of a `newAdmin` and an accept schedule.
  958. After the `schedule` passes, the `newAdmin` will be able to accept the {defaultAdmin} role
  959. by calling {acceptDefaultAdminTransfer}, completing the role transfer.
  960. A zero value only in `acceptSchedule` indicates no pending admin transfer.
  961. NOTE: A zero address `newAdmin` means that {defaultAdmin} is being renounced.
  962. [.contract-item]
  963. [[IAccessControlDefaultAdminRules-defaultAdminDelay--]]
  964. ==== `[.contract-item-name]#++defaultAdminDelay++#++() → uint48++` [.item-kind]#external#
  965. Returns the delay required to schedule the acceptance of a {defaultAdmin} transfer started.
  966. This delay will be added to the current timestamp when calling {beginDefaultAdminTransfer} to set
  967. the acceptance schedule.
  968. NOTE: If a delay change has been scheduled, it will take effect as soon as the schedule passes, making this
  969. function returns the new delay. See {changeDefaultAdminDelay}.
  970. [.contract-item]
  971. [[IAccessControlDefaultAdminRules-pendingDefaultAdminDelay--]]
  972. ==== `[.contract-item-name]#++pendingDefaultAdminDelay++#++() → uint48 newDelay, uint48 effectSchedule++` [.item-kind]#external#
  973. Returns a tuple of `newDelay` and an effect schedule.
  974. After the `schedule` passes, the `newDelay` will get into effect immediately for every
  975. new {defaultAdmin} transfer started with {beginDefaultAdminTransfer}.
  976. A zero value only in `effectSchedule` indicates no pending delay change.
  977. NOTE: A zero value only for `newDelay` means that the next {defaultAdminDelay}
  978. will be zero after the effect schedule.
  979. [.contract-item]
  980. [[IAccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-]]
  981. ==== `[.contract-item-name]#++beginDefaultAdminTransfer++#++(address newAdmin)++` [.item-kind]#external#
  982. Starts a {defaultAdmin} transfer by setting a {pendingDefaultAdmin} scheduled for acceptance
  983. after the current timestamp plus a {defaultAdminDelay}.
  984. Requirements:
  985. - Only can be called by the current {defaultAdmin}.
  986. Emits a DefaultAdminRoleChangeStarted event.
  987. [.contract-item]
  988. [[IAccessControlDefaultAdminRules-cancelDefaultAdminTransfer--]]
  989. ==== `[.contract-item-name]#++cancelDefaultAdminTransfer++#++()++` [.item-kind]#external#
  990. Cancels a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}.
  991. A {pendingDefaultAdmin} not yet accepted can also be cancelled with this function.
  992. Requirements:
  993. - Only can be called by the current {defaultAdmin}.
  994. May emit a DefaultAdminTransferCanceled event.
  995. [.contract-item]
  996. [[IAccessControlDefaultAdminRules-acceptDefaultAdminTransfer--]]
  997. ==== `[.contract-item-name]#++acceptDefaultAdminTransfer++#++()++` [.item-kind]#external#
  998. Completes a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}.
  999. After calling the function:
  1000. - `DEFAULT_ADMIN_ROLE` should be granted to the caller.
  1001. - `DEFAULT_ADMIN_ROLE` should be revoked from the previous holder.
  1002. - {pendingDefaultAdmin} should be reset to zero values.
  1003. Requirements:
  1004. - Only can be called by the {pendingDefaultAdmin}'s `newAdmin`.
  1005. - The {pendingDefaultAdmin}'s `acceptSchedule` should've passed.
  1006. [.contract-item]
  1007. [[IAccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-]]
  1008. ==== `[.contract-item-name]#++changeDefaultAdminDelay++#++(uint48 newDelay)++` [.item-kind]#external#
  1009. Initiates a {defaultAdminDelay} update by setting a {pendingDefaultAdminDelay} scheduled for getting
  1010. into effect after the current timestamp plus a {defaultAdminDelay}.
  1011. This function guarantees that any call to {beginDefaultAdminTransfer} done between the timestamp this
  1012. method is called and the {pendingDefaultAdminDelay} effect schedule will use the current {defaultAdminDelay}
  1013. set before calling.
  1014. The {pendingDefaultAdminDelay}'s effect schedule is defined in a way that waiting until the schedule and then
  1015. calling {beginDefaultAdminTransfer} with the new delay will take at least the same as another {defaultAdmin}
  1016. complete transfer (including acceptance).
  1017. The schedule is designed for two scenarios:
  1018. - When the delay is changed for a larger one the schedule is `block.timestamp + newDelay` capped by
  1019. {defaultAdminDelayIncreaseWait}.
  1020. - When the delay is changed for a shorter one, the schedule is `block.timestamp + (current delay - new delay)`.
  1021. A {pendingDefaultAdminDelay} that never got into effect will be canceled in favor of a new scheduled change.
  1022. Requirements:
  1023. - Only can be called by the current {defaultAdmin}.
  1024. Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event.
  1025. [.contract-item]
  1026. [[IAccessControlDefaultAdminRules-rollbackDefaultAdminDelay--]]
  1027. ==== `[.contract-item-name]#++rollbackDefaultAdminDelay++#++()++` [.item-kind]#external#
  1028. Cancels a scheduled {defaultAdminDelay} change.
  1029. Requirements:
  1030. - Only can be called by the current {defaultAdmin}.
  1031. May emit a DefaultAdminDelayChangeCanceled event.
  1032. [.contract-item]
  1033. [[IAccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--]]
  1034. ==== `[.contract-item-name]#++defaultAdminDelayIncreaseWait++#++() → uint48++` [.item-kind]#external#
  1035. Maximum time in seconds for an increase to {defaultAdminDelay} (that is scheduled using {changeDefaultAdminDelay})
  1036. to take effect. Default to 5 days.
  1037. When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with
  1038. the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds)
  1039. that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can
  1040. be overrode for a custom {defaultAdminDelay} increase scheduling.
  1041. IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise,
  1042. there's a risk of setting a high new delay that goes into effect almost immediately without the
  1043. possibility of human intervention in the case of an input error (eg. set milliseconds instead of seconds).
  1044. [.contract-item]
  1045. [[IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-]]
  1046. ==== `[.contract-item-name]#++DefaultAdminTransferScheduled++#++(address indexed newAdmin, uint48 acceptSchedule)++` [.item-kind]#event#
  1047. Emitted when a {defaultAdmin} transfer is started, setting `newAdmin` as the next
  1048. address to become the {defaultAdmin} by calling {acceptDefaultAdminTransfer} only after `acceptSchedule`
  1049. passes.
  1050. [.contract-item]
  1051. [[IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--]]
  1052. ==== `[.contract-item-name]#++DefaultAdminTransferCanceled++#++()++` [.item-kind]#event#
  1053. Emitted when a {pendingDefaultAdmin} is reset if it was never accepted, regardless of its schedule.
  1054. [.contract-item]
  1055. [[IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-]]
  1056. ==== `[.contract-item-name]#++DefaultAdminDelayChangeScheduled++#++(uint48 newDelay, uint48 effectSchedule)++` [.item-kind]#event#
  1057. Emitted when a {defaultAdminDelay} change is started, setting `newDelay` as the next
  1058. delay to be applied between default admin transfer after `effectSchedule` has passed.
  1059. [.contract-item]
  1060. [[IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--]]
  1061. ==== `[.contract-item-name]#++DefaultAdminDelayChangeCanceled++#++()++` [.item-kind]#event#
  1062. Emitted when a {pendingDefaultAdminDelay} is reset if its schedule didn't pass.
  1063. [.contract-item]
  1064. [[IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-]]
  1065. ==== `[.contract-item-name]#++AccessControlInvalidDefaultAdmin++#++(address defaultAdmin)++` [.item-kind]#error#
  1066. The new default admin is not a valid default admin.
  1067. [.contract-item]
  1068. [[IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--]]
  1069. ==== `[.contract-item-name]#++AccessControlEnforcedDefaultAdminRules++#++()++` [.item-kind]#error#
  1070. At least one of the following rules was violated:
  1071. - The `DEFAULT_ADMIN_ROLE` must only be managed by itself.
  1072. - The `DEFAULT_ADMIN_ROLE` must only be held by one account at the time.
  1073. - Any `DEFAULT_ADMIN_ROLE` transfer must be in two delayed steps.
  1074. [.contract-item]
  1075. [[IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-]]
  1076. ==== `[.contract-item-name]#++AccessControlEnforcedDefaultAdminDelay++#++(uint48 schedule)++` [.item-kind]#error#
  1077. The delay for transferring the default admin delay is enforced and
  1078. the operation must wait until `schedule`.
  1079. NOTE: `schedule` can be 0 indicating there's no transfer scheduled.
  1080. :constructor: pass:normal[xref:#AccessControlDefaultAdminRules-constructor-uint48-address-[`++constructor++`]]
  1081. :supportsInterface: pass:normal[xref:#AccessControlDefaultAdminRules-supportsInterface-bytes4-[`++supportsInterface++`]]
  1082. :owner: pass:normal[xref:#AccessControlDefaultAdminRules-owner--[`++owner++`]]
  1083. :grantRole: pass:normal[xref:#AccessControlDefaultAdminRules-grantRole-bytes32-address-[`++grantRole++`]]
  1084. :revokeRole: pass:normal[xref:#AccessControlDefaultAdminRules-revokeRole-bytes32-address-[`++revokeRole++`]]
  1085. :renounceRole: pass:normal[xref:#AccessControlDefaultAdminRules-renounceRole-bytes32-address-[`++renounceRole++`]]
  1086. :_grantRole: pass:normal[xref:#AccessControlDefaultAdminRules-_grantRole-bytes32-address-[`++_grantRole++`]]
  1087. :_revokeRole: pass:normal[xref:#AccessControlDefaultAdminRules-_revokeRole-bytes32-address-[`++_revokeRole++`]]
  1088. :_setRoleAdmin: pass:normal[xref:#AccessControlDefaultAdminRules-_setRoleAdmin-bytes32-bytes32-[`++_setRoleAdmin++`]]
  1089. :defaultAdmin: pass:normal[xref:#AccessControlDefaultAdminRules-defaultAdmin--[`++defaultAdmin++`]]
  1090. :pendingDefaultAdmin: pass:normal[xref:#AccessControlDefaultAdminRules-pendingDefaultAdmin--[`++pendingDefaultAdmin++`]]
  1091. :defaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-defaultAdminDelay--[`++defaultAdminDelay++`]]
  1092. :pendingDefaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-pendingDefaultAdminDelay--[`++pendingDefaultAdminDelay++`]]
  1093. :defaultAdminDelayIncreaseWait: pass:normal[xref:#AccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--[`++defaultAdminDelayIncreaseWait++`]]
  1094. :beginDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-[`++beginDefaultAdminTransfer++`]]
  1095. :_beginDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-_beginDefaultAdminTransfer-address-[`++_beginDefaultAdminTransfer++`]]
  1096. :cancelDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-cancelDefaultAdminTransfer--[`++cancelDefaultAdminTransfer++`]]
  1097. :_cancelDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-_cancelDefaultAdminTransfer--[`++_cancelDefaultAdminTransfer++`]]
  1098. :acceptDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-acceptDefaultAdminTransfer--[`++acceptDefaultAdminTransfer++`]]
  1099. :_acceptDefaultAdminTransfer: pass:normal[xref:#AccessControlDefaultAdminRules-_acceptDefaultAdminTransfer--[`++_acceptDefaultAdminTransfer++`]]
  1100. :changeDefaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-[`++changeDefaultAdminDelay++`]]
  1101. :_changeDefaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-_changeDefaultAdminDelay-uint48-[`++_changeDefaultAdminDelay++`]]
  1102. :rollbackDefaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-rollbackDefaultAdminDelay--[`++rollbackDefaultAdminDelay++`]]
  1103. :_rollbackDefaultAdminDelay: pass:normal[xref:#AccessControlDefaultAdminRules-_rollbackDefaultAdminDelay--[`++_rollbackDefaultAdminDelay++`]]
  1104. :_delayChangeWait: pass:normal[xref:#AccessControlDefaultAdminRules-_delayChangeWait-uint48-[`++_delayChangeWait++`]]
  1105. [.contract]
  1106. [[AccessControlDefaultAdminRules]]
  1107. === `++AccessControlDefaultAdminRules++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/extensions/AccessControlDefaultAdminRules.sol[{github-icon},role=heading-link]
  1108. [.hljs-theme-light.nopadding]
  1109. ```solidity
  1110. import "@openzeppelin/contracts/access/extensions/AccessControlDefaultAdminRules.sol";
  1111. ```
  1112. Extension of {AccessControl} that allows specifying special rules to manage
  1113. the `DEFAULT_ADMIN_ROLE` holder, which is a sensitive role with special permissions
  1114. over other roles that may potentially have privileged rights in the system.
  1115. If a specific role doesn't have an admin role assigned, the holder of the
  1116. `DEFAULT_ADMIN_ROLE` will have the ability to grant it and revoke it.
  1117. This contract implements the following risk mitigations on top of {AccessControl}:
  1118. * Only one account holds the `DEFAULT_ADMIN_ROLE` since deployment until it's potentially renounced.
  1119. * Enforces a 2-step process to transfer the `DEFAULT_ADMIN_ROLE` to another account.
  1120. * Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted.
  1121. * The delay can be changed by scheduling, see {changeDefaultAdminDelay}.
  1122. * It is not possible to use another role to manage the `DEFAULT_ADMIN_ROLE`.
  1123. Example usage:
  1124. ```solidity
  1125. contract MyToken is AccessControlDefaultAdminRules {
  1126. constructor() AccessControlDefaultAdminRules(
  1127. 3 days,
  1128. msg.sender // Explicit initial `DEFAULT_ADMIN_ROLE` holder
  1129. ) {}
  1130. }
  1131. ```
  1132. [.contract-index]
  1133. .Functions
  1134. --
  1135. * {xref-AccessControlDefaultAdminRules-constructor-uint48-address-}[`++constructor(initialDelay, initialDefaultAdmin)++`]
  1136. * {xref-AccessControlDefaultAdminRules-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
  1137. * {xref-AccessControlDefaultAdminRules-owner--}[`++owner()++`]
  1138. * {xref-AccessControlDefaultAdminRules-grantRole-bytes32-address-}[`++grantRole(role, account)++`]
  1139. * {xref-AccessControlDefaultAdminRules-revokeRole-bytes32-address-}[`++revokeRole(role, account)++`]
  1140. * {xref-AccessControlDefaultAdminRules-renounceRole-bytes32-address-}[`++renounceRole(role, account)++`]
  1141. * {xref-AccessControlDefaultAdminRules-_grantRole-bytes32-address-}[`++_grantRole(role, account)++`]
  1142. * {xref-AccessControlDefaultAdminRules-_revokeRole-bytes32-address-}[`++_revokeRole(role, account)++`]
  1143. * {xref-AccessControlDefaultAdminRules-_setRoleAdmin-bytes32-bytes32-}[`++_setRoleAdmin(role, adminRole)++`]
  1144. * {xref-AccessControlDefaultAdminRules-defaultAdmin--}[`++defaultAdmin()++`]
  1145. * {xref-AccessControlDefaultAdminRules-pendingDefaultAdmin--}[`++pendingDefaultAdmin()++`]
  1146. * {xref-AccessControlDefaultAdminRules-defaultAdminDelay--}[`++defaultAdminDelay()++`]
  1147. * {xref-AccessControlDefaultAdminRules-pendingDefaultAdminDelay--}[`++pendingDefaultAdminDelay()++`]
  1148. * {xref-AccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--}[`++defaultAdminDelayIncreaseWait()++`]
  1149. * {xref-AccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-}[`++beginDefaultAdminTransfer(newAdmin)++`]
  1150. * {xref-AccessControlDefaultAdminRules-_beginDefaultAdminTransfer-address-}[`++_beginDefaultAdminTransfer(newAdmin)++`]
  1151. * {xref-AccessControlDefaultAdminRules-cancelDefaultAdminTransfer--}[`++cancelDefaultAdminTransfer()++`]
  1152. * {xref-AccessControlDefaultAdminRules-_cancelDefaultAdminTransfer--}[`++_cancelDefaultAdminTransfer()++`]
  1153. * {xref-AccessControlDefaultAdminRules-acceptDefaultAdminTransfer--}[`++acceptDefaultAdminTransfer()++`]
  1154. * {xref-AccessControlDefaultAdminRules-_acceptDefaultAdminTransfer--}[`++_acceptDefaultAdminTransfer()++`]
  1155. * {xref-AccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-}[`++changeDefaultAdminDelay(newDelay)++`]
  1156. * {xref-AccessControlDefaultAdminRules-_changeDefaultAdminDelay-uint48-}[`++_changeDefaultAdminDelay(newDelay)++`]
  1157. * {xref-AccessControlDefaultAdminRules-rollbackDefaultAdminDelay--}[`++rollbackDefaultAdminDelay()++`]
  1158. * {xref-AccessControlDefaultAdminRules-_rollbackDefaultAdminDelay--}[`++_rollbackDefaultAdminDelay()++`]
  1159. * {xref-AccessControlDefaultAdminRules-_delayChangeWait-uint48-}[`++_delayChangeWait(newDelay)++`]
  1160. [.contract-subindex-inherited]
  1161. .AccessControl
  1162. * {xref-AccessControl-hasRole-bytes32-address-}[`++hasRole(role, account)++`]
  1163. * {xref-AccessControl-_checkRole-bytes32-}[`++_checkRole(role)++`]
  1164. * {xref-AccessControl-_checkRole-bytes32-address-}[`++_checkRole(role, account)++`]
  1165. * {xref-AccessControl-getRoleAdmin-bytes32-}[`++getRoleAdmin(role)++`]
  1166. * {xref-AccessControl-DEFAULT_ADMIN_ROLE-bytes32}[`++DEFAULT_ADMIN_ROLE()++`]
  1167. [.contract-subindex-inherited]
  1168. .ERC165
  1169. [.contract-subindex-inherited]
  1170. .IERC165
  1171. [.contract-subindex-inherited]
  1172. .IERC5313
  1173. [.contract-subindex-inherited]
  1174. .IAccessControlDefaultAdminRules
  1175. [.contract-subindex-inherited]
  1176. .IAccessControl
  1177. --
  1178. [.contract-index]
  1179. .Events
  1180. --
  1181. [.contract-subindex-inherited]
  1182. .AccessControl
  1183. [.contract-subindex-inherited]
  1184. .ERC165
  1185. [.contract-subindex-inherited]
  1186. .IERC165
  1187. [.contract-subindex-inherited]
  1188. .IERC5313
  1189. [.contract-subindex-inherited]
  1190. .IAccessControlDefaultAdminRules
  1191. * {xref-IAccessControlDefaultAdminRules-DefaultAdminTransferScheduled-address-uint48-}[`++DefaultAdminTransferScheduled(newAdmin, acceptSchedule)++`]
  1192. * {xref-IAccessControlDefaultAdminRules-DefaultAdminTransferCanceled--}[`++DefaultAdminTransferCanceled()++`]
  1193. * {xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeScheduled-uint48-uint48-}[`++DefaultAdminDelayChangeScheduled(newDelay, effectSchedule)++`]
  1194. * {xref-IAccessControlDefaultAdminRules-DefaultAdminDelayChangeCanceled--}[`++DefaultAdminDelayChangeCanceled()++`]
  1195. [.contract-subindex-inherited]
  1196. .IAccessControl
  1197. * {xref-IAccessControl-RoleAdminChanged-bytes32-bytes32-bytes32-}[`++RoleAdminChanged(role, previousAdminRole, newAdminRole)++`]
  1198. * {xref-IAccessControl-RoleGranted-bytes32-address-address-}[`++RoleGranted(role, account, sender)++`]
  1199. * {xref-IAccessControl-RoleRevoked-bytes32-address-address-}[`++RoleRevoked(role, account, sender)++`]
  1200. --
  1201. [.contract-index]
  1202. .Errors
  1203. --
  1204. [.contract-subindex-inherited]
  1205. .AccessControl
  1206. [.contract-subindex-inherited]
  1207. .ERC165
  1208. [.contract-subindex-inherited]
  1209. .IERC165
  1210. [.contract-subindex-inherited]
  1211. .IERC5313
  1212. [.contract-subindex-inherited]
  1213. .IAccessControlDefaultAdminRules
  1214. * {xref-IAccessControlDefaultAdminRules-AccessControlInvalidDefaultAdmin-address-}[`++AccessControlInvalidDefaultAdmin(defaultAdmin)++`]
  1215. * {xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminRules--}[`++AccessControlEnforcedDefaultAdminRules()++`]
  1216. * {xref-IAccessControlDefaultAdminRules-AccessControlEnforcedDefaultAdminDelay-uint48-}[`++AccessControlEnforcedDefaultAdminDelay(schedule)++`]
  1217. [.contract-subindex-inherited]
  1218. .IAccessControl
  1219. * {xref-IAccessControl-AccessControlUnauthorizedAccount-address-bytes32-}[`++AccessControlUnauthorizedAccount(account, neededRole)++`]
  1220. * {xref-IAccessControl-AccessControlBadConfirmation--}[`++AccessControlBadConfirmation()++`]
  1221. --
  1222. [.contract-item]
  1223. [[AccessControlDefaultAdminRules-constructor-uint48-address-]]
  1224. ==== `[.contract-item-name]#++constructor++#++(uint48 initialDelay, address initialDefaultAdmin)++` [.item-kind]#internal#
  1225. Sets the initial values for {defaultAdminDelay} and {defaultAdmin} address.
  1226. [.contract-item]
  1227. [[AccessControlDefaultAdminRules-supportsInterface-bytes4-]]
  1228. ==== `[.contract-item-name]#++supportsInterface++#++(bytes4 interfaceId) → bool++` [.item-kind]#public#
  1229. See {IERC165-supportsInterface}.
  1230. [.contract-item]
  1231. [[AccessControlDefaultAdminRules-owner--]]
  1232. ==== `[.contract-item-name]#++owner++#++() → address++` [.item-kind]#public#
  1233. See {IERC5313-owner}.
  1234. [.contract-item]
  1235. [[AccessControlDefaultAdminRules-grantRole-bytes32-address-]]
  1236. ==== `[.contract-item-name]#++grantRole++#++(bytes32 role, address account)++` [.item-kind]#public#
  1237. See {AccessControl-grantRole}. Reverts for `DEFAULT_ADMIN_ROLE`.
  1238. [.contract-item]
  1239. [[AccessControlDefaultAdminRules-revokeRole-bytes32-address-]]
  1240. ==== `[.contract-item-name]#++revokeRole++#++(bytes32 role, address account)++` [.item-kind]#public#
  1241. See {AccessControl-revokeRole}. Reverts for `DEFAULT_ADMIN_ROLE`.
  1242. [.contract-item]
  1243. [[AccessControlDefaultAdminRules-renounceRole-bytes32-address-]]
  1244. ==== `[.contract-item-name]#++renounceRole++#++(bytes32 role, address account)++` [.item-kind]#public#
  1245. See {AccessControl-renounceRole}.
  1246. For the `DEFAULT_ADMIN_ROLE`, it only allows renouncing in two steps by first calling
  1247. {beginDefaultAdminTransfer} to the `address(0)`, so it's required that the {pendingDefaultAdmin} schedule
  1248. has also passed when calling this function.
  1249. After its execution, it will not be possible to call `onlyRole(DEFAULT_ADMIN_ROLE)` functions.
  1250. NOTE: Renouncing `DEFAULT_ADMIN_ROLE` will leave the contract without a {defaultAdmin},
  1251. thereby disabling any functionality that is only available for it, and the possibility of reassigning a
  1252. non-administrated role.
  1253. [.contract-item]
  1254. [[AccessControlDefaultAdminRules-_grantRole-bytes32-address-]]
  1255. ==== `[.contract-item-name]#++_grantRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  1256. See {AccessControl-_grantRole}.
  1257. For `DEFAULT_ADMIN_ROLE`, it only allows granting if there isn't already a {defaultAdmin} or if the
  1258. role has been previously renounced.
  1259. NOTE: Exposing this function through another mechanism may make the `DEFAULT_ADMIN_ROLE`
  1260. assignable again. Make sure to guarantee this is the expected behavior in your implementation.
  1261. [.contract-item]
  1262. [[AccessControlDefaultAdminRules-_revokeRole-bytes32-address-]]
  1263. ==== `[.contract-item-name]#++_revokeRole++#++(bytes32 role, address account) → bool++` [.item-kind]#internal#
  1264. See {AccessControl-_revokeRole}.
  1265. [.contract-item]
  1266. [[AccessControlDefaultAdminRules-_setRoleAdmin-bytes32-bytes32-]]
  1267. ==== `[.contract-item-name]#++_setRoleAdmin++#++(bytes32 role, bytes32 adminRole)++` [.item-kind]#internal#
  1268. See {AccessControl-_setRoleAdmin}. Reverts for `DEFAULT_ADMIN_ROLE`.
  1269. [.contract-item]
  1270. [[AccessControlDefaultAdminRules-defaultAdmin--]]
  1271. ==== `[.contract-item-name]#++defaultAdmin++#++() → address++` [.item-kind]#public#
  1272. Returns the address of the current `DEFAULT_ADMIN_ROLE` holder.
  1273. [.contract-item]
  1274. [[AccessControlDefaultAdminRules-pendingDefaultAdmin--]]
  1275. ==== `[.contract-item-name]#++pendingDefaultAdmin++#++() → address newAdmin, uint48 schedule++` [.item-kind]#public#
  1276. Returns a tuple of a `newAdmin` and an accept schedule.
  1277. After the `schedule` passes, the `newAdmin` will be able to accept the {defaultAdmin} role
  1278. by calling {acceptDefaultAdminTransfer}, completing the role transfer.
  1279. A zero value only in `acceptSchedule` indicates no pending admin transfer.
  1280. NOTE: A zero address `newAdmin` means that {defaultAdmin} is being renounced.
  1281. [.contract-item]
  1282. [[AccessControlDefaultAdminRules-defaultAdminDelay--]]
  1283. ==== `[.contract-item-name]#++defaultAdminDelay++#++() → uint48++` [.item-kind]#public#
  1284. Returns the delay required to schedule the acceptance of a {defaultAdmin} transfer started.
  1285. This delay will be added to the current timestamp when calling {beginDefaultAdminTransfer} to set
  1286. the acceptance schedule.
  1287. NOTE: If a delay change has been scheduled, it will take effect as soon as the schedule passes, making this
  1288. function returns the new delay. See {changeDefaultAdminDelay}.
  1289. [.contract-item]
  1290. [[AccessControlDefaultAdminRules-pendingDefaultAdminDelay--]]
  1291. ==== `[.contract-item-name]#++pendingDefaultAdminDelay++#++() → uint48 newDelay, uint48 schedule++` [.item-kind]#public#
  1292. Returns a tuple of `newDelay` and an effect schedule.
  1293. After the `schedule` passes, the `newDelay` will get into effect immediately for every
  1294. new {defaultAdmin} transfer started with {beginDefaultAdminTransfer}.
  1295. A zero value only in `effectSchedule` indicates no pending delay change.
  1296. NOTE: A zero value only for `newDelay` means that the next {defaultAdminDelay}
  1297. will be zero after the effect schedule.
  1298. [.contract-item]
  1299. [[AccessControlDefaultAdminRules-defaultAdminDelayIncreaseWait--]]
  1300. ==== `[.contract-item-name]#++defaultAdminDelayIncreaseWait++#++() → uint48++` [.item-kind]#public#
  1301. Maximum time in seconds for an increase to {defaultAdminDelay} (that is scheduled using {changeDefaultAdminDelay})
  1302. to take effect. Default to 5 days.
  1303. When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with
  1304. the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds)
  1305. that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can
  1306. be overrode for a custom {defaultAdminDelay} increase scheduling.
  1307. IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise,
  1308. there's a risk of setting a high new delay that goes into effect almost immediately without the
  1309. possibility of human intervention in the case of an input error (eg. set milliseconds instead of seconds).
  1310. [.contract-item]
  1311. [[AccessControlDefaultAdminRules-beginDefaultAdminTransfer-address-]]
  1312. ==== `[.contract-item-name]#++beginDefaultAdminTransfer++#++(address newAdmin)++` [.item-kind]#public#
  1313. Starts a {defaultAdmin} transfer by setting a {pendingDefaultAdmin} scheduled for acceptance
  1314. after the current timestamp plus a {defaultAdminDelay}.
  1315. Requirements:
  1316. - Only can be called by the current {defaultAdmin}.
  1317. Emits a DefaultAdminRoleChangeStarted event.
  1318. [.contract-item]
  1319. [[AccessControlDefaultAdminRules-_beginDefaultAdminTransfer-address-]]
  1320. ==== `[.contract-item-name]#++_beginDefaultAdminTransfer++#++(address newAdmin)++` [.item-kind]#internal#
  1321. See {beginDefaultAdminTransfer}.
  1322. Internal function without access restriction.
  1323. [.contract-item]
  1324. [[AccessControlDefaultAdminRules-cancelDefaultAdminTransfer--]]
  1325. ==== `[.contract-item-name]#++cancelDefaultAdminTransfer++#++()++` [.item-kind]#public#
  1326. Cancels a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}.
  1327. A {pendingDefaultAdmin} not yet accepted can also be cancelled with this function.
  1328. Requirements:
  1329. - Only can be called by the current {defaultAdmin}.
  1330. May emit a DefaultAdminTransferCanceled event.
  1331. [.contract-item]
  1332. [[AccessControlDefaultAdminRules-_cancelDefaultAdminTransfer--]]
  1333. ==== `[.contract-item-name]#++_cancelDefaultAdminTransfer++#++()++` [.item-kind]#internal#
  1334. See {cancelDefaultAdminTransfer}.
  1335. Internal function without access restriction.
  1336. [.contract-item]
  1337. [[AccessControlDefaultAdminRules-acceptDefaultAdminTransfer--]]
  1338. ==== `[.contract-item-name]#++acceptDefaultAdminTransfer++#++()++` [.item-kind]#public#
  1339. Completes a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}.
  1340. After calling the function:
  1341. - `DEFAULT_ADMIN_ROLE` should be granted to the caller.
  1342. - `DEFAULT_ADMIN_ROLE` should be revoked from the previous holder.
  1343. - {pendingDefaultAdmin} should be reset to zero values.
  1344. Requirements:
  1345. - Only can be called by the {pendingDefaultAdmin}'s `newAdmin`.
  1346. - The {pendingDefaultAdmin}'s `acceptSchedule` should've passed.
  1347. [.contract-item]
  1348. [[AccessControlDefaultAdminRules-_acceptDefaultAdminTransfer--]]
  1349. ==== `[.contract-item-name]#++_acceptDefaultAdminTransfer++#++()++` [.item-kind]#internal#
  1350. See {acceptDefaultAdminTransfer}.
  1351. Internal function without access restriction.
  1352. [.contract-item]
  1353. [[AccessControlDefaultAdminRules-changeDefaultAdminDelay-uint48-]]
  1354. ==== `[.contract-item-name]#++changeDefaultAdminDelay++#++(uint48 newDelay)++` [.item-kind]#public#
  1355. Initiates a {defaultAdminDelay} update by setting a {pendingDefaultAdminDelay} scheduled for getting
  1356. into effect after the current timestamp plus a {defaultAdminDelay}.
  1357. This function guarantees that any call to {beginDefaultAdminTransfer} done between the timestamp this
  1358. method is called and the {pendingDefaultAdminDelay} effect schedule will use the current {defaultAdminDelay}
  1359. set before calling.
  1360. The {pendingDefaultAdminDelay}'s effect schedule is defined in a way that waiting until the schedule and then
  1361. calling {beginDefaultAdminTransfer} with the new delay will take at least the same as another {defaultAdmin}
  1362. complete transfer (including acceptance).
  1363. The schedule is designed for two scenarios:
  1364. - When the delay is changed for a larger one the schedule is `block.timestamp + newDelay` capped by
  1365. {defaultAdminDelayIncreaseWait}.
  1366. - When the delay is changed for a shorter one, the schedule is `block.timestamp + (current delay - new delay)`.
  1367. A {pendingDefaultAdminDelay} that never got into effect will be canceled in favor of a new scheduled change.
  1368. Requirements:
  1369. - Only can be called by the current {defaultAdmin}.
  1370. Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event.
  1371. [.contract-item]
  1372. [[AccessControlDefaultAdminRules-_changeDefaultAdminDelay-uint48-]]
  1373. ==== `[.contract-item-name]#++_changeDefaultAdminDelay++#++(uint48 newDelay)++` [.item-kind]#internal#
  1374. See {changeDefaultAdminDelay}.
  1375. Internal function without access restriction.
  1376. [.contract-item]
  1377. [[AccessControlDefaultAdminRules-rollbackDefaultAdminDelay--]]
  1378. ==== `[.contract-item-name]#++rollbackDefaultAdminDelay++#++()++` [.item-kind]#public#
  1379. Cancels a scheduled {defaultAdminDelay} change.
  1380. Requirements:
  1381. - Only can be called by the current {defaultAdmin}.
  1382. May emit a DefaultAdminDelayChangeCanceled event.
  1383. [.contract-item]
  1384. [[AccessControlDefaultAdminRules-_rollbackDefaultAdminDelay--]]
  1385. ==== `[.contract-item-name]#++_rollbackDefaultAdminDelay++#++()++` [.item-kind]#internal#
  1386. See {rollbackDefaultAdminDelay}.
  1387. Internal function without access restriction.
  1388. [.contract-item]
  1389. [[AccessControlDefaultAdminRules-_delayChangeWait-uint48-]]
  1390. ==== `[.contract-item-name]#++_delayChangeWait++#++(uint48 newDelay) → uint48++` [.item-kind]#internal#
  1391. Returns the amount of seconds to wait after the `newDelay` will
  1392. become the new {defaultAdminDelay}.
  1393. The value returned guarantees that if the delay is reduced, it will go into effect
  1394. after a wait that honors the previously set delay.
  1395. See {defaultAdminDelayIncreaseWait}.
  1396. == AccessManager
  1397. :canCall: pass:normal[xref:#IAuthority-canCall-address-address-bytes4-[`++canCall++`]]
  1398. [.contract]
  1399. [[IAuthority]]
  1400. === `++IAuthority++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/manager/IAuthority.sol[{github-icon},role=heading-link]
  1401. [.hljs-theme-light.nopadding]
  1402. ```solidity
  1403. import "@openzeppelin/contracts/access/manager/IAuthority.sol";
  1404. ```
  1405. Standard interface for permissioning originally defined in Dappsys.
  1406. [.contract-index]
  1407. .Functions
  1408. --
  1409. * {xref-IAuthority-canCall-address-address-bytes4-}[`++canCall(caller, target, selector)++`]
  1410. --
  1411. [.contract-item]
  1412. [[IAuthority-canCall-address-address-bytes4-]]
  1413. ==== `[.contract-item-name]#++canCall++#++(address caller, address target, bytes4 selector) → bool allowed++` [.item-kind]#external#
  1414. Returns true if the caller can invoke on a target the function identified by a function selector.
  1415. :TargetConfig: pass:normal[xref:#AccessManager-TargetConfig[`++TargetConfig++`]]
  1416. :Access: pass:normal[xref:#AccessManager-Access[`++Access++`]]
  1417. :Role: pass:normal[xref:#AccessManager-Role[`++Role++`]]
  1418. :Schedule: pass:normal[xref:#AccessManager-Schedule[`++Schedule++`]]
  1419. :ADMIN_ROLE: pass:normal[xref:#AccessManager-ADMIN_ROLE-uint64[`++ADMIN_ROLE++`]]
  1420. :PUBLIC_ROLE: pass:normal[xref:#AccessManager-PUBLIC_ROLE-uint64[`++PUBLIC_ROLE++`]]
  1421. :onlyAuthorized: pass:normal[xref:#AccessManager-onlyAuthorized--[`++onlyAuthorized++`]]
  1422. :constructor: pass:normal[xref:#AccessManager-constructor-address-[`++constructor++`]]
  1423. :canCall: pass:normal[xref:#AccessManager-canCall-address-address-bytes4-[`++canCall++`]]
  1424. :expiration: pass:normal[xref:#AccessManager-expiration--[`++expiration++`]]
  1425. :minSetback: pass:normal[xref:#AccessManager-minSetback--[`++minSetback++`]]
  1426. :isTargetClosed: pass:normal[xref:#AccessManager-isTargetClosed-address-[`++isTargetClosed++`]]
  1427. :getTargetFunctionRole: pass:normal[xref:#AccessManager-getTargetFunctionRole-address-bytes4-[`++getTargetFunctionRole++`]]
  1428. :getTargetAdminDelay: pass:normal[xref:#AccessManager-getTargetAdminDelay-address-[`++getTargetAdminDelay++`]]
  1429. :getRoleAdmin: pass:normal[xref:#AccessManager-getRoleAdmin-uint64-[`++getRoleAdmin++`]]
  1430. :getRoleGuardian: pass:normal[xref:#AccessManager-getRoleGuardian-uint64-[`++getRoleGuardian++`]]
  1431. :getRoleGrantDelay: pass:normal[xref:#AccessManager-getRoleGrantDelay-uint64-[`++getRoleGrantDelay++`]]
  1432. :getAccess: pass:normal[xref:#AccessManager-getAccess-uint64-address-[`++getAccess++`]]
  1433. :hasRole: pass:normal[xref:#AccessManager-hasRole-uint64-address-[`++hasRole++`]]
  1434. :labelRole: pass:normal[xref:#AccessManager-labelRole-uint64-string-[`++labelRole++`]]
  1435. :grantRole: pass:normal[xref:#AccessManager-grantRole-uint64-address-uint32-[`++grantRole++`]]
  1436. :revokeRole: pass:normal[xref:#AccessManager-revokeRole-uint64-address-[`++revokeRole++`]]
  1437. :renounceRole: pass:normal[xref:#AccessManager-renounceRole-uint64-address-[`++renounceRole++`]]
  1438. :setRoleAdmin: pass:normal[xref:#AccessManager-setRoleAdmin-uint64-uint64-[`++setRoleAdmin++`]]
  1439. :setRoleGuardian: pass:normal[xref:#AccessManager-setRoleGuardian-uint64-uint64-[`++setRoleGuardian++`]]
  1440. :setGrantDelay: pass:normal[xref:#AccessManager-setGrantDelay-uint64-uint32-[`++setGrantDelay++`]]
  1441. :_grantRole: pass:normal[xref:#AccessManager-_grantRole-uint64-address-uint32-uint32-[`++_grantRole++`]]
  1442. :_revokeRole: pass:normal[xref:#AccessManager-_revokeRole-uint64-address-[`++_revokeRole++`]]
  1443. :_setRoleAdmin: pass:normal[xref:#AccessManager-_setRoleAdmin-uint64-uint64-[`++_setRoleAdmin++`]]
  1444. :_setRoleGuardian: pass:normal[xref:#AccessManager-_setRoleGuardian-uint64-uint64-[`++_setRoleGuardian++`]]
  1445. :_setGrantDelay: pass:normal[xref:#AccessManager-_setGrantDelay-uint64-uint32-[`++_setGrantDelay++`]]
  1446. :setTargetFunctionRole: pass:normal[xref:#AccessManager-setTargetFunctionRole-address-bytes4---uint64-[`++setTargetFunctionRole++`]]
  1447. :_setTargetFunctionRole: pass:normal[xref:#AccessManager-_setTargetFunctionRole-address-bytes4-uint64-[`++_setTargetFunctionRole++`]]
  1448. :setTargetAdminDelay: pass:normal[xref:#AccessManager-setTargetAdminDelay-address-uint32-[`++setTargetAdminDelay++`]]
  1449. :_setTargetAdminDelay: pass:normal[xref:#AccessManager-_setTargetAdminDelay-address-uint32-[`++_setTargetAdminDelay++`]]
  1450. :setTargetClosed: pass:normal[xref:#AccessManager-setTargetClosed-address-bool-[`++setTargetClosed++`]]
  1451. :_setTargetClosed: pass:normal[xref:#AccessManager-_setTargetClosed-address-bool-[`++_setTargetClosed++`]]
  1452. :getSchedule: pass:normal[xref:#AccessManager-getSchedule-bytes32-[`++getSchedule++`]]
  1453. :getNonce: pass:normal[xref:#AccessManager-getNonce-bytes32-[`++getNonce++`]]
  1454. :schedule: pass:normal[xref:#AccessManager-schedule-address-bytes-uint48-[`++schedule++`]]
  1455. :execute: pass:normal[xref:#AccessManager-execute-address-bytes-[`++execute++`]]
  1456. :consumeScheduledOp: pass:normal[xref:#AccessManager-consumeScheduledOp-address-bytes-[`++consumeScheduledOp++`]]
  1457. :_consumeScheduledOp: pass:normal[xref:#AccessManager-_consumeScheduledOp-bytes32-[`++_consumeScheduledOp++`]]
  1458. :cancel: pass:normal[xref:#AccessManager-cancel-address-address-bytes-[`++cancel++`]]
  1459. :hashOperation: pass:normal[xref:#AccessManager-hashOperation-address-address-bytes-[`++hashOperation++`]]
  1460. :updateAuthority: pass:normal[xref:#AccessManager-updateAuthority-address-address-[`++updateAuthority++`]]
  1461. [.contract]
  1462. [[AccessManager]]
  1463. === `++AccessManager++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/manager/AccessManager.sol[{github-icon},role=heading-link]
  1464. [.hljs-theme-light.nopadding]
  1465. ```solidity
  1466. import "@openzeppelin/contracts/access/manager/AccessManager.sol";
  1467. ```
  1468. AccessManager is a central contract to store the permissions of a system.
  1469. The smart contracts under the control of an AccessManager instance will have a set of "restricted" functions, and the
  1470. exact details of how access is restricted for each of those functions is configurable by the admins of the instance.
  1471. These restrictions are expressed in terms of "roles".
  1472. An AccessManager instance will define a set of roles. Accounts can be added into any number of these roles. Each of
  1473. them defines a role, and may confer access to some of the restricted functions in the system, as configured by admins
  1474. through the use of {setFunctionAllowedRoles}.
  1475. Note that a function in a target contract may become permissioned in this way only when: 1) said contract is
  1476. {AccessManaged} and is connected to this contract as its manager, and 2) said function is decorated with the
  1477. `restricted` modifier.
  1478. There is a special role defined by default named "public" which all accounts automatically have.
  1479. In addition to the access rules defined by each target's functions being assigned to roles, then entire target can
  1480. be "closed". This "closed" mode is set/unset by the admin using {setTargetClosed} and can be used to lock a contract
  1481. while permissions are being (re-)configured.
  1482. Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that
  1483. they will be highly secured (e.g., a multisig or a well-configured DAO).
  1484. NOTE: This contract implements a form of the {IAuthority} interface, but {canCall} has additional return data so it
  1485. doesn't inherit `IAuthority`. It is however compatible with the `IAuthority` interface since the first 32 bytes of
  1486. the return data are a boolean as expected by that interface.
  1487. NOTE: Systems that implement other access control mechanisms (for example using {Ownable}) can be paired with an
  1488. {AccessManager} by transferring permissions (ownership in the case of {Ownable}) directly to the {AccessManager}.
  1489. Users will be able to interact with these contracts through the {execute} function, following the access rules
  1490. registered in the {AccessManager}. Keep in mind that in that context, the msg.sender seen by restricted functions
  1491. will be {AccessManager} itself.
  1492. WARNING: When granting permissions over an {Ownable} or {AccessControl} contract to an {AccessManager}, be very
  1493. mindful of the danger associated with functions such as {{Ownable-renounceOwnership}} or
  1494. {{AccessControl-renounceRole}}.
  1495. [.contract-index]
  1496. .Modifiers
  1497. --
  1498. * {xref-AccessManager-onlyAuthorized--}[`++onlyAuthorized()++`]
  1499. --
  1500. [.contract-index]
  1501. .Functions
  1502. --
  1503. * {xref-AccessManager-constructor-address-}[`++constructor(initialAdmin)++`]
  1504. * {xref-AccessManager-canCall-address-address-bytes4-}[`++canCall(caller, target, selector)++`]
  1505. * {xref-AccessManager-expiration--}[`++expiration()++`]
  1506. * {xref-AccessManager-minSetback--}[`++minSetback()++`]
  1507. * {xref-AccessManager-isTargetClosed-address-}[`++isTargetClosed(target)++`]
  1508. * {xref-AccessManager-getTargetFunctionRole-address-bytes4-}[`++getTargetFunctionRole(target, selector)++`]
  1509. * {xref-AccessManager-getTargetAdminDelay-address-}[`++getTargetAdminDelay(target)++`]
  1510. * {xref-AccessManager-getRoleAdmin-uint64-}[`++getRoleAdmin(roleId)++`]
  1511. * {xref-AccessManager-getRoleGuardian-uint64-}[`++getRoleGuardian(roleId)++`]
  1512. * {xref-AccessManager-getRoleGrantDelay-uint64-}[`++getRoleGrantDelay(roleId)++`]
  1513. * {xref-AccessManager-getAccess-uint64-address-}[`++getAccess(roleId, account)++`]
  1514. * {xref-AccessManager-hasRole-uint64-address-}[`++hasRole(roleId, account)++`]
  1515. * {xref-AccessManager-labelRole-uint64-string-}[`++labelRole(roleId, label)++`]
  1516. * {xref-AccessManager-grantRole-uint64-address-uint32-}[`++grantRole(roleId, account, executionDelay)++`]
  1517. * {xref-AccessManager-revokeRole-uint64-address-}[`++revokeRole(roleId, account)++`]
  1518. * {xref-AccessManager-renounceRole-uint64-address-}[`++renounceRole(roleId, callerConfirmation)++`]
  1519. * {xref-AccessManager-setRoleAdmin-uint64-uint64-}[`++setRoleAdmin(roleId, admin)++`]
  1520. * {xref-AccessManager-setRoleGuardian-uint64-uint64-}[`++setRoleGuardian(roleId, guardian)++`]
  1521. * {xref-AccessManager-setGrantDelay-uint64-uint32-}[`++setGrantDelay(roleId, newDelay)++`]
  1522. * {xref-AccessManager-_grantRole-uint64-address-uint32-uint32-}[`++_grantRole(roleId, account, grantDelay, executionDelay)++`]
  1523. * {xref-AccessManager-_revokeRole-uint64-address-}[`++_revokeRole(roleId, account)++`]
  1524. * {xref-AccessManager-_setRoleAdmin-uint64-uint64-}[`++_setRoleAdmin(roleId, admin)++`]
  1525. * {xref-AccessManager-_setRoleGuardian-uint64-uint64-}[`++_setRoleGuardian(roleId, guardian)++`]
  1526. * {xref-AccessManager-_setGrantDelay-uint64-uint32-}[`++_setGrantDelay(roleId, newDelay)++`]
  1527. * {xref-AccessManager-setTargetFunctionRole-address-bytes4---uint64-}[`++setTargetFunctionRole(target, selectors, roleId)++`]
  1528. * {xref-AccessManager-_setTargetFunctionRole-address-bytes4-uint64-}[`++_setTargetFunctionRole(target, selector, roleId)++`]
  1529. * {xref-AccessManager-setTargetAdminDelay-address-uint32-}[`++setTargetAdminDelay(target, newDelay)++`]
  1530. * {xref-AccessManager-_setTargetAdminDelay-address-uint32-}[`++_setTargetAdminDelay(target, newDelay)++`]
  1531. * {xref-AccessManager-setTargetClosed-address-bool-}[`++setTargetClosed(target, closed)++`]
  1532. * {xref-AccessManager-_setTargetClosed-address-bool-}[`++_setTargetClosed(target, closed)++`]
  1533. * {xref-AccessManager-getSchedule-bytes32-}[`++getSchedule(id)++`]
  1534. * {xref-AccessManager-getNonce-bytes32-}[`++getNonce(id)++`]
  1535. * {xref-AccessManager-schedule-address-bytes-uint48-}[`++schedule(target, data, when)++`]
  1536. * {xref-AccessManager-execute-address-bytes-}[`++execute(target, data)++`]
  1537. * {xref-AccessManager-consumeScheduledOp-address-bytes-}[`++consumeScheduledOp(caller, data)++`]
  1538. * {xref-AccessManager-_consumeScheduledOp-bytes32-}[`++_consumeScheduledOp(operationId)++`]
  1539. * {xref-AccessManager-cancel-address-address-bytes-}[`++cancel(caller, target, data)++`]
  1540. * {xref-AccessManager-hashOperation-address-address-bytes-}[`++hashOperation(caller, target, data)++`]
  1541. * {xref-AccessManager-updateAuthority-address-address-}[`++updateAuthority(target, newAuthority)++`]
  1542. * {xref-AccessManager-ADMIN_ROLE-uint64}[`++ADMIN_ROLE()++`]
  1543. * {xref-AccessManager-PUBLIC_ROLE-uint64}[`++PUBLIC_ROLE()++`]
  1544. [.contract-subindex-inherited]
  1545. .IAccessManager
  1546. [.contract-subindex-inherited]
  1547. .Multicall
  1548. * {xref-Multicall-multicall-bytes---}[`++multicall(data)++`]
  1549. --
  1550. [.contract-index]
  1551. .Events
  1552. --
  1553. [.contract-subindex-inherited]
  1554. .IAccessManager
  1555. * {xref-IAccessManager-OperationScheduled-bytes32-uint32-uint48-address-address-bytes-}[`++OperationScheduled(operationId, nonce, schedule, caller, target, data)++`]
  1556. * {xref-IAccessManager-OperationExecuted-bytes32-uint32-}[`++OperationExecuted(operationId, nonce)++`]
  1557. * {xref-IAccessManager-OperationCanceled-bytes32-uint32-}[`++OperationCanceled(operationId, nonce)++`]
  1558. * {xref-IAccessManager-RoleLabel-uint64-string-}[`++RoleLabel(roleId, label)++`]
  1559. * {xref-IAccessManager-RoleGranted-uint64-address-uint32-uint48-bool-}[`++RoleGranted(roleId, account, delay, since, newMember)++`]
  1560. * {xref-IAccessManager-RoleRevoked-uint64-address-}[`++RoleRevoked(roleId, account)++`]
  1561. * {xref-IAccessManager-RoleAdminChanged-uint64-uint64-}[`++RoleAdminChanged(roleId, admin)++`]
  1562. * {xref-IAccessManager-RoleGuardianChanged-uint64-uint64-}[`++RoleGuardianChanged(roleId, guardian)++`]
  1563. * {xref-IAccessManager-RoleGrantDelayChanged-uint64-uint32-uint48-}[`++RoleGrantDelayChanged(roleId, delay, since)++`]
  1564. * {xref-IAccessManager-TargetClosed-address-bool-}[`++TargetClosed(target, closed)++`]
  1565. * {xref-IAccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-}[`++TargetFunctionRoleUpdated(target, selector, roleId)++`]
  1566. * {xref-IAccessManager-TargetAdminDelayUpdated-address-uint32-uint48-}[`++TargetAdminDelayUpdated(target, delay, since)++`]
  1567. [.contract-subindex-inherited]
  1568. .Multicall
  1569. --
  1570. [.contract-index]
  1571. .Errors
  1572. --
  1573. [.contract-subindex-inherited]
  1574. .IAccessManager
  1575. * {xref-IAccessManager-AccessManagerAlreadyScheduled-bytes32-}[`++AccessManagerAlreadyScheduled(operationId)++`]
  1576. * {xref-IAccessManager-AccessManagerNotScheduled-bytes32-}[`++AccessManagerNotScheduled(operationId)++`]
  1577. * {xref-IAccessManager-AccessManagerNotReady-bytes32-}[`++AccessManagerNotReady(operationId)++`]
  1578. * {xref-IAccessManager-AccessManagerExpired-bytes32-}[`++AccessManagerExpired(operationId)++`]
  1579. * {xref-IAccessManager-AccessManagerLockedAccount-address-}[`++AccessManagerLockedAccount(account)++`]
  1580. * {xref-IAccessManager-AccessManagerLockedRole-uint64-}[`++AccessManagerLockedRole(roleId)++`]
  1581. * {xref-IAccessManager-AccessManagerBadConfirmation--}[`++AccessManagerBadConfirmation()++`]
  1582. * {xref-IAccessManager-AccessManagerUnauthorizedAccount-address-uint64-}[`++AccessManagerUnauthorizedAccount(msgsender, roleId)++`]
  1583. * {xref-IAccessManager-AccessManagerUnauthorizedCall-address-address-bytes4-}[`++AccessManagerUnauthorizedCall(caller, target, selector)++`]
  1584. * {xref-IAccessManager-AccessManagerUnauthorizedConsume-address-}[`++AccessManagerUnauthorizedConsume(target)++`]
  1585. * {xref-IAccessManager-AccessManagerUnauthorizedCancel-address-address-address-bytes4-}[`++AccessManagerUnauthorizedCancel(msgsender, caller, target, selector)++`]
  1586. * {xref-IAccessManager-AccessManagerInvalidInitialAdmin-address-}[`++AccessManagerInvalidInitialAdmin(initialAdmin)++`]
  1587. [.contract-subindex-inherited]
  1588. .Multicall
  1589. --
  1590. [.contract-item]
  1591. [[AccessManager-onlyAuthorized--]]
  1592. ==== `[.contract-item-name]#++onlyAuthorized++#++()++` [.item-kind]#modifier#
  1593. Check that the caller is authorized to perform the operation, following the restrictions encoded in
  1594. {_getAdminRestrictions}.
  1595. [.contract-item]
  1596. [[AccessManager-constructor-address-]]
  1597. ==== `[.contract-item-name]#++constructor++#++(address initialAdmin)++` [.item-kind]#public#
  1598. [.contract-item]
  1599. [[AccessManager-canCall-address-address-bytes4-]]
  1600. ==== `[.contract-item-name]#++canCall++#++(address caller, address target, bytes4 selector) → bool immediate, uint32 delay++` [.item-kind]#public#
  1601. Check if an address (`caller`) is authorised to call a given function on a given contract directly (with
  1602. no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}
  1603. & {execute} workflow.
  1604. This function is usually called by the targeted contract to control immediate execution of restricted functions.
  1605. Therefore we only return true is the call can be performed without any delay. If the call is subject to a delay,
  1606. then the function should return false, and the caller should schedule the operation for future execution.
  1607. We may be able to hash the operation, and check if the call was scheduled, but we would not be able to cleanup
  1608. the schedule, leaving the possibility of multiple executions. Maybe this function should not be view?
  1609. NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that
  1610. is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail
  1611. to identify the indirect workflow, and will consider calls that require a delay to be forbidden.
  1612. [.contract-item]
  1613. [[AccessManager-expiration--]]
  1614. ==== `[.contract-item-name]#++expiration++#++() → uint32++` [.item-kind]#public#
  1615. Expiration delay for scheduled proposals. Defaults to 1 week.
  1616. [.contract-item]
  1617. [[AccessManager-minSetback--]]
  1618. ==== `[.contract-item-name]#++minSetback++#++() → uint32++` [.item-kind]#public#
  1619. Minimum setback for all delay updates, with the exception of execution delays, which
  1620. can be increased without setback (and in the event of an accidental increase can be reset
  1621. via {revokeRole}). Defaults to 5 days.
  1622. [.contract-item]
  1623. [[AccessManager-isTargetClosed-address-]]
  1624. ==== `[.contract-item-name]#++isTargetClosed++#++(address target) → bool++` [.item-kind]#public#
  1625. Get the mode under which a contract is operating.
  1626. [.contract-item]
  1627. [[AccessManager-getTargetFunctionRole-address-bytes4-]]
  1628. ==== `[.contract-item-name]#++getTargetFunctionRole++#++(address target, bytes4 selector) → uint64++` [.item-kind]#public#
  1629. Get the role required to call a function.
  1630. [.contract-item]
  1631. [[AccessManager-getTargetAdminDelay-address-]]
  1632. ==== `[.contract-item-name]#++getTargetAdminDelay++#++(address target) → uint32++` [.item-kind]#public#
  1633. Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.
  1634. [.contract-item]
  1635. [[AccessManager-getRoleAdmin-uint64-]]
  1636. ==== `[.contract-item-name]#++getRoleAdmin++#++(uint64 roleId) → uint64++` [.item-kind]#public#
  1637. Get the id of the role that acts as an admin for given role.
  1638. The admin permission is required to grant the role, revoke the role and update the execution delay to execute
  1639. an operation that is restricted to this role.
  1640. [.contract-item]
  1641. [[AccessManager-getRoleGuardian-uint64-]]
  1642. ==== `[.contract-item-name]#++getRoleGuardian++#++(uint64 roleId) → uint64++` [.item-kind]#public#
  1643. Get the role that acts as a guardian for a given role.
  1644. The guardian permission allows canceling operations that have been scheduled under the role.
  1645. [.contract-item]
  1646. [[AccessManager-getRoleGrantDelay-uint64-]]
  1647. ==== `[.contract-item-name]#++getRoleGrantDelay++#++(uint64 roleId) → uint32++` [.item-kind]#public#
  1648. Get the role current grant delay, that value may change at any point, without an event emitted, following
  1649. a call to {setGrantDelay}. Changes to this value, including effect timepoint are notified by the
  1650. {RoleGrantDelayChanged} event.
  1651. [.contract-item]
  1652. [[AccessManager-getAccess-uint64-address-]]
  1653. ==== `[.contract-item-name]#++getAccess++#++(uint64 roleId, address account) → uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect++` [.item-kind]#public#
  1654. Get the access details for a given account for a given role. These details include the timepoint at which
  1655. membership becomes active, and the delay applied to all operation by this user that requires this permission
  1656. level.
  1657. Returns:
  1658. [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.
  1659. [1] Current execution delay for the account.
  1660. [2] Pending execution delay for the account.
  1661. [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.
  1662. [.contract-item]
  1663. [[AccessManager-hasRole-uint64-address-]]
  1664. ==== `[.contract-item-name]#++hasRole++#++(uint64 roleId, address account) → bool isMember, uint32 executionDelay++` [.item-kind]#public#
  1665. Check if a given account currently had the permission level corresponding to a given role. Note that this
  1666. permission might be associated with a delay. {getAccess} can provide more details.
  1667. [.contract-item]
  1668. [[AccessManager-labelRole-uint64-string-]]
  1669. ==== `[.contract-item-name]#++labelRole++#++(uint64 roleId, string label)++` [.item-kind]#public#
  1670. Give a label to a role, for improved role discoverabily by UIs.
  1671. Emits a {RoleLabel} event.
  1672. [.contract-item]
  1673. [[AccessManager-grantRole-uint64-address-uint32-]]
  1674. ==== `[.contract-item-name]#++grantRole++#++(uint64 roleId, address account, uint32 executionDelay)++` [.item-kind]#public#
  1675. Add `account` to `roleId`, or change its execution delay.
  1676. This gives the account the authorization to call any function that is restricted to this role. An optional
  1677. execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation
  1678. that is restricted to members this role. The user will only be able to execute the operation after the delay has
  1679. passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).
  1680. If the account has already been granted this role, the execution delay will be updated. This update is not
  1681. immediate and follows the delay rules. For example, If a user currently has a delay of 3 hours, and this is
  1682. called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any
  1683. operation executed in the 3 hours that follows this update was indeed scheduled before this update.
  1684. Requirements:
  1685. - the caller must be an admin for the role (see {getRoleAdmin})
  1686. Emits a {RoleGranted} event
  1687. [.contract-item]
  1688. [[AccessManager-revokeRole-uint64-address-]]
  1689. ==== `[.contract-item-name]#++revokeRole++#++(uint64 roleId, address account)++` [.item-kind]#public#
  1690. Remove an account from a role, with immediate effect. If the account does not have the role, this call has
  1691. no effect.
  1692. Requirements:
  1693. - the caller must be an admin for the role (see {getRoleAdmin})
  1694. Emits a {RoleRevoked} event if the account had the role.
  1695. [.contract-item]
  1696. [[AccessManager-renounceRole-uint64-address-]]
  1697. ==== `[.contract-item-name]#++renounceRole++#++(uint64 roleId, address callerConfirmation)++` [.item-kind]#public#
  1698. Renounce role permissions for the calling account, with immediate effect. If the sender is not in
  1699. the role, this call has no effect.
  1700. Requirements:
  1701. - the caller must be `callerConfirmation`.
  1702. Emits a {RoleRevoked} event if the account had the role.
  1703. [.contract-item]
  1704. [[AccessManager-setRoleAdmin-uint64-uint64-]]
  1705. ==== `[.contract-item-name]#++setRoleAdmin++#++(uint64 roleId, uint64 admin)++` [.item-kind]#public#
  1706. Change admin role for a given role.
  1707. Requirements:
  1708. - the caller must be a global admin
  1709. Emits a {RoleAdminChanged} event
  1710. [.contract-item]
  1711. [[AccessManager-setRoleGuardian-uint64-uint64-]]
  1712. ==== `[.contract-item-name]#++setRoleGuardian++#++(uint64 roleId, uint64 guardian)++` [.item-kind]#public#
  1713. Change guardian role for a given role.
  1714. Requirements:
  1715. - the caller must be a global admin
  1716. Emits a {RoleGuardianChanged} event
  1717. [.contract-item]
  1718. [[AccessManager-setGrantDelay-uint64-uint32-]]
  1719. ==== `[.contract-item-name]#++setGrantDelay++#++(uint64 roleId, uint32 newDelay)++` [.item-kind]#public#
  1720. Update the delay for granting a `roleId`.
  1721. Requirements:
  1722. - the caller must be a global admin
  1723. Emits a {RoleGrantDelayChanged} event.
  1724. [.contract-item]
  1725. [[AccessManager-_grantRole-uint64-address-uint32-uint32-]]
  1726. ==== `[.contract-item-name]#++_grantRole++#++(uint64 roleId, address account, uint32 grantDelay, uint32 executionDelay) → bool++` [.item-kind]#internal#
  1727. Internal version of {grantRole} without access control. Returns true if the role was newly granted.
  1728. Emits a {RoleGranted} event.
  1729. [.contract-item]
  1730. [[AccessManager-_revokeRole-uint64-address-]]
  1731. ==== `[.contract-item-name]#++_revokeRole++#++(uint64 roleId, address account) → bool++` [.item-kind]#internal#
  1732. Internal version of {revokeRole} without access control. This logic is also used by {renounceRole}.
  1733. Returns true if the role was previously granted.
  1734. Emits a {RoleRevoked} event if the account had the role.
  1735. [.contract-item]
  1736. [[AccessManager-_setRoleAdmin-uint64-uint64-]]
  1737. ==== `[.contract-item-name]#++_setRoleAdmin++#++(uint64 roleId, uint64 admin)++` [.item-kind]#internal#
  1738. Internal version of {setRoleAdmin} without access control.
  1739. Emits a {RoleAdminChanged} event
  1740. [.contract-item]
  1741. [[AccessManager-_setRoleGuardian-uint64-uint64-]]
  1742. ==== `[.contract-item-name]#++_setRoleGuardian++#++(uint64 roleId, uint64 guardian)++` [.item-kind]#internal#
  1743. Internal version of {setRoleGuardian} without access control.
  1744. Emits a {RoleGuardianChanged} event
  1745. [.contract-item]
  1746. [[AccessManager-_setGrantDelay-uint64-uint32-]]
  1747. ==== `[.contract-item-name]#++_setGrantDelay++#++(uint64 roleId, uint32 newDelay)++` [.item-kind]#internal#
  1748. Internal version of {setGrantDelay} without access control.
  1749. Emits a {RoleGrantDelayChanged} event
  1750. [.contract-item]
  1751. [[AccessManager-setTargetFunctionRole-address-bytes4---uint64-]]
  1752. ==== `[.contract-item-name]#++setTargetFunctionRole++#++(address target, bytes4[] selectors, uint64 roleId)++` [.item-kind]#public#
  1753. Set the role required to call functions identified by the `selectors` in the `target` contract.
  1754. Requirements:
  1755. - the caller must be a global admin
  1756. Emits a {TargetFunctionRoleUpdated} event per selector.
  1757. [.contract-item]
  1758. [[AccessManager-_setTargetFunctionRole-address-bytes4-uint64-]]
  1759. ==== `[.contract-item-name]#++_setTargetFunctionRole++#++(address target, bytes4 selector, uint64 roleId)++` [.item-kind]#internal#
  1760. Internal version of {setFunctionAllowedRole} without access control.
  1761. Emits a {TargetFunctionRoleUpdated} event
  1762. [.contract-item]
  1763. [[AccessManager-setTargetAdminDelay-address-uint32-]]
  1764. ==== `[.contract-item-name]#++setTargetAdminDelay++#++(address target, uint32 newDelay)++` [.item-kind]#public#
  1765. Set the delay for changing the configuration of a given target contract.
  1766. Requirements:
  1767. - the caller must be a global admin
  1768. Emits a {TargetAdminDelayUpdated} event per selector
  1769. [.contract-item]
  1770. [[AccessManager-_setTargetAdminDelay-address-uint32-]]
  1771. ==== `[.contract-item-name]#++_setTargetAdminDelay++#++(address target, uint32 newDelay)++` [.item-kind]#internal#
  1772. Internal version of {setTargetAdminDelay} without access control.
  1773. Emits a {TargetAdminDelayUpdated} event
  1774. [.contract-item]
  1775. [[AccessManager-setTargetClosed-address-bool-]]
  1776. ==== `[.contract-item-name]#++setTargetClosed++#++(address target, bool closed)++` [.item-kind]#public#
  1777. Set the closed flag for a contract.
  1778. Requirements:
  1779. - the caller must be a global admin
  1780. Emits a {TargetClosed} event.
  1781. [.contract-item]
  1782. [[AccessManager-_setTargetClosed-address-bool-]]
  1783. ==== `[.contract-item-name]#++_setTargetClosed++#++(address target, bool closed)++` [.item-kind]#internal#
  1784. Set the closed flag for a contract. This is an internal setter with no access restrictions.
  1785. Emits a {TargetClosed} event.
  1786. [.contract-item]
  1787. [[AccessManager-getSchedule-bytes32-]]
  1788. ==== `[.contract-item-name]#++getSchedule++#++(bytes32 id) → uint48++` [.item-kind]#public#
  1789. Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the
  1790. operation is not yet scheduled, has expired, was executed, or was canceled.
  1791. [.contract-item]
  1792. [[AccessManager-getNonce-bytes32-]]
  1793. ==== `[.contract-item-name]#++getNonce++#++(bytes32 id) → uint32++` [.item-kind]#public#
  1794. Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never
  1795. been scheduled.
  1796. [.contract-item]
  1797. [[AccessManager-schedule-address-bytes-uint48-]]
  1798. ==== `[.contract-item-name]#++schedule++#++(address target, bytes data, uint48 when) → bytes32 operationId, uint32 nonce++` [.item-kind]#public#
  1799. Schedule a delayed operation for future execution, and return the operation identifier. It is possible to
  1800. choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays
  1801. required for the caller. The special value zero will automatically set the earliest possible time.
  1802. Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when
  1803. the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this
  1804. scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.
  1805. Emits a {OperationScheduled} event.
  1806. NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If
  1807. this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target
  1808. contract if it is using standard Solidity ABI encoding.
  1809. [.contract-item]
  1810. [[AccessManager-execute-address-bytes-]]
  1811. ==== `[.contract-item-name]#++execute++#++(address target, bytes data) → uint32++` [.item-kind]#public#
  1812. Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the
  1813. execution delay is 0.
  1814. Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the
  1815. operation wasn't previously scheduled (if the caller doesn't have an execution delay).
  1816. Emits an {OperationExecuted} event only if the call was scheduled and delayed.
  1817. [.contract-item]
  1818. [[AccessManager-consumeScheduledOp-address-bytes-]]
  1819. ==== `[.contract-item-name]#++consumeScheduledOp++#++(address caller, bytes data)++` [.item-kind]#public#
  1820. Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed
  1821. (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.
  1822. This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,
  1823. with all the verifications that it implies.
  1824. Emit a {OperationExecuted} event
  1825. [.contract-item]
  1826. [[AccessManager-_consumeScheduledOp-bytes32-]]
  1827. ==== `[.contract-item-name]#++_consumeScheduledOp++#++(bytes32 operationId) → uint32++` [.item-kind]#internal#
  1828. Internal variant of {consumeScheduledOp} that operates on bytes32 operationId.
  1829. Returns the nonce of the scheduled operation that is consumed.
  1830. [.contract-item]
  1831. [[AccessManager-cancel-address-address-bytes-]]
  1832. ==== `[.contract-item-name]#++cancel++#++(address caller, address target, bytes data) → uint32++` [.item-kind]#public#
  1833. Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled
  1834. operation that is cancelled.
  1835. Requirements:
  1836. - the caller must be the proposer, a guardian of the targeted function, or a global admin
  1837. Emits a {OperationCanceled} event.
  1838. [.contract-item]
  1839. [[AccessManager-hashOperation-address-address-bytes-]]
  1840. ==== `[.contract-item-name]#++hashOperation++#++(address caller, address target, bytes data) → bytes32++` [.item-kind]#public#
  1841. Hashing function for delayed operations
  1842. [.contract-item]
  1843. [[AccessManager-updateAuthority-address-address-]]
  1844. ==== `[.contract-item-name]#++updateAuthority++#++(address target, address newAuthority)++` [.item-kind]#public#
  1845. Change the AccessManager instance used by a contract that correctly uses this instance.
  1846. Requirements:
  1847. - the caller must be a global admin
  1848. [.contract-item]
  1849. [[AccessManager-ADMIN_ROLE-uint64]]
  1850. ==== `[.contract-item-name]#++ADMIN_ROLE++#++() → uint64++` [.item-kind]#public#
  1851. [.contract-item]
  1852. [[AccessManager-PUBLIC_ROLE-uint64]]
  1853. ==== `[.contract-item-name]#++PUBLIC_ROLE++#++() → uint64++` [.item-kind]#public#
  1854. :constructor: pass:normal[xref:#AccessManaged-constructor-address-[`++constructor++`]]
  1855. :restricted: pass:normal[xref:#AccessManaged-restricted--[`++restricted++`]]
  1856. :authority: pass:normal[xref:#AccessManaged-authority--[`++authority++`]]
  1857. :setAuthority: pass:normal[xref:#AccessManaged-setAuthority-address-[`++setAuthority++`]]
  1858. :isConsumingScheduledOp: pass:normal[xref:#AccessManaged-isConsumingScheduledOp--[`++isConsumingScheduledOp++`]]
  1859. :_setAuthority: pass:normal[xref:#AccessManaged-_setAuthority-address-[`++_setAuthority++`]]
  1860. :_checkCanCall: pass:normal[xref:#AccessManaged-_checkCanCall-address-bytes-[`++_checkCanCall++`]]
  1861. [.contract]
  1862. [[AccessManaged]]
  1863. === `++AccessManaged++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0-rc.2/contracts/access/manager/AccessManaged.sol[{github-icon},role=heading-link]
  1864. [.hljs-theme-light.nopadding]
  1865. ```solidity
  1866. import "@openzeppelin/contracts/access/manager/AccessManaged.sol";
  1867. ```
  1868. This contract module makes available a {restricted} modifier. Functions decorated with this modifier will be
  1869. permissioned according to an "authority": a contract like {AccessManager} that follows the {IAuthority} interface,
  1870. implementing a policy that allows certain callers to access certain functions.
  1871. IMPORTANT: The `restricted` modifier should never be used on `internal` functions, judiciously used in `public`
  1872. functions, and ideally only used in `external` functions. See {restricted}.
  1873. [.contract-index]
  1874. .Modifiers
  1875. --
  1876. * {xref-AccessManaged-restricted--}[`++restricted()++`]
  1877. --
  1878. [.contract-index]
  1879. .Functions
  1880. --
  1881. * {xref-AccessManaged-constructor-address-}[`++constructor(initialAuthority)++`]
  1882. * {xref-AccessManaged-authority--}[`++authority()++`]
  1883. * {xref-AccessManaged-setAuthority-address-}[`++setAuthority(newAuthority)++`]
  1884. * {xref-AccessManaged-isConsumingScheduledOp--}[`++isConsumingScheduledOp()++`]
  1885. * {xref-AccessManaged-_setAuthority-address-}[`++_setAuthority(newAuthority)++`]
  1886. * {xref-AccessManaged-_checkCanCall-address-bytes-}[`++_checkCanCall(caller, data)++`]
  1887. [.contract-subindex-inherited]
  1888. .IAccessManaged
  1889. --
  1890. [.contract-index]
  1891. .Events
  1892. --
  1893. [.contract-subindex-inherited]
  1894. .IAccessManaged
  1895. * {xref-IAccessManaged-AuthorityUpdated-address-}[`++AuthorityUpdated(authority)++`]
  1896. --
  1897. [.contract-index]
  1898. .Errors
  1899. --
  1900. [.contract-subindex-inherited]
  1901. .IAccessManaged
  1902. * {xref-IAccessManaged-AccessManagedUnauthorized-address-}[`++AccessManagedUnauthorized(caller)++`]
  1903. * {xref-IAccessManaged-AccessManagedRequiredDelay-address-uint32-}[`++AccessManagedRequiredDelay(caller, delay)++`]
  1904. * {xref-IAccessManaged-AccessManagedInvalidAuthority-address-}[`++AccessManagedInvalidAuthority(authority)++`]
  1905. --
  1906. [.contract-item]
  1907. [[AccessManaged-restricted--]]
  1908. ==== `[.contract-item-name]#++restricted++#++()++` [.item-kind]#modifier#
  1909. Restricts access to a function as defined by the connected Authority for this contract and the
  1910. caller and selector of the function that entered the contract.
  1911. [IMPORTANT]
  1912. ====
  1913. In general, this modifier should only be used on `external` functions. It is okay to use it on `public`
  1914. functions that are used as external entry points and are not called internally. Unless you know what you're
  1915. doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security
  1916. implications! This is because the permissions are determined by the function that entered the contract, i.e. the
  1917. function at the bottom of the call stack, and not the function where the modifier is visible in the source code.
  1918. ====
  1919. [WARNING]
  1920. ====
  1921. Avoid adding this modifier to the https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`]
  1922. function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These
  1923. functions are the only execution paths where a function selector cannot be unambiguosly determined from the calldata
  1924. since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()` function
  1925. if no calldata is provided. (See {_checkCanCall}).
  1926. The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length.
  1927. ====
  1928. [.contract-item]
  1929. [[AccessManaged-constructor-address-]]
  1930. ==== `[.contract-item-name]#++constructor++#++(address initialAuthority)++` [.item-kind]#internal#
  1931. Initializes the contract connected to an initial authority.
  1932. [.contract-item]
  1933. [[AccessManaged-authority--]]
  1934. ==== `[.contract-item-name]#++authority++#++() → address++` [.item-kind]#public#
  1935. Returns the current authority.
  1936. [.contract-item]
  1937. [[AccessManaged-setAuthority-address-]]
  1938. ==== `[.contract-item-name]#++setAuthority++#++(address newAuthority)++` [.item-kind]#public#
  1939. Transfers control to a new authority. The caller must be the current authority.
  1940. [.contract-item]
  1941. [[AccessManaged-isConsumingScheduledOp--]]
  1942. ==== `[.contract-item-name]#++isConsumingScheduledOp++#++() → bytes4++` [.item-kind]#public#
  1943. Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is
  1944. being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs
  1945. attacker controlled calls.
  1946. [.contract-item]
  1947. [[AccessManaged-_setAuthority-address-]]
  1948. ==== `[.contract-item-name]#++_setAuthority++#++(address newAuthority)++` [.item-kind]#internal#
  1949. Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the
  1950. permissions set by the current authority.
  1951. [.contract-item]
  1952. [[AccessManaged-_checkCanCall-address-bytes-]]
  1953. ==== `[.contract-item-name]#++_checkCanCall++#++(address caller, bytes data)++` [.item-kind]#internal#
  1954. Reverts if the caller is not allowed to call the function identified by a selector. Panics if the calldata
  1955. is less than 4 bytes long.