access.adoc 180 KB

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