access.adoc 136 KB

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