You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

XBRMaintained.json 95KB

5 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521
  1. {
  2. "contractName": "XBRMaintained",
  3. "abi": [
  4. {
  5. "inputs": [],
  6. "payable": false,
  7. "stateMutability": "nonpayable",
  8. "type": "constructor"
  9. },
  10. {
  11. "anonymous": false,
  12. "inputs": [
  13. {
  14. "indexed": true,
  15. "name": "account",
  16. "type": "address"
  17. }
  18. ],
  19. "name": "MaintainerAdded",
  20. "type": "event"
  21. },
  22. {
  23. "anonymous": false,
  24. "inputs": [
  25. {
  26. "indexed": true,
  27. "name": "account",
  28. "type": "address"
  29. }
  30. ],
  31. "name": "MaintainerRemoved",
  32. "type": "event"
  33. },
  34. {
  35. "constant": true,
  36. "inputs": [
  37. {
  38. "name": "account",
  39. "type": "address"
  40. }
  41. ],
  42. "name": "isMaintainer",
  43. "outputs": [
  44. {
  45. "name": "",
  46. "type": "bool"
  47. }
  48. ],
  49. "payable": false,
  50. "stateMutability": "view",
  51. "type": "function"
  52. },
  53. {
  54. "constant": false,
  55. "inputs": [
  56. {
  57. "name": "account",
  58. "type": "address"
  59. }
  60. ],
  61. "name": "addMaintainer",
  62. "outputs": [],
  63. "payable": false,
  64. "stateMutability": "nonpayable",
  65. "type": "function"
  66. },
  67. {
  68. "constant": false,
  69. "inputs": [],
  70. "name": "renounceMaintainer",
  71. "outputs": [],
  72. "payable": false,
  73. "stateMutability": "nonpayable",
  74. "type": "function"
  75. }
  76. ],
  77. "metadata": "",
  78. "bytecode": "0x",
  79. "deployedBytecode": "0x",
  80. "sourceMap": "",
  81. "deployedSourceMap": "",
  82. "source": "///////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (C) 2018-2019 Crossbar.io Technologies GmbH and contributors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n///////////////////////////////////////////////////////////////////////////////\n\npragma solidity ^0.5.2;\n\nimport \"openzeppelin-solidity/contracts/access/Roles.sol\";\n\n\n/**\n * XBR Network (and XBR Network Proxies) SCs inherit from this base contract\n * to manage network administration and maintenance via Role-based Access\n * Control (RBAC).\n * The implementation for management comes from the OpenZeppelin RBAC library.\n */\ncontract XBRMaintained {\n /// OpenZeppelin RBAC mixin.\n using Roles for Roles.Role;\n\n /**\n * Event fired when a maintainer was added.\n *\n * @param account The account that was added as a maintainer.\n */\n event MaintainerAdded(address indexed account);\n\n /**\n * Event fired when a maintainer was removed.\n *\n * @param account The account that was removed as a maintainer.\n */\n event MaintainerRemoved(address indexed account);\n\n /// Current list of XBR network maintainers.\n Roles.Role private maintainers;\n\n /// The constructor is internal (roles are managed by the OpenZeppelin base class).\n constructor () internal {\n _addMaintainer(msg.sender);\n }\n\n /**\n * Modifier to require maintainer-role for the sender when calling a SC.\n */\n modifier onlyMaintainer () {\n require(isMaintainer(msg.sender));\n _;\n }\n\n /**\n * Check if the given address is currently a maintainer.\n *\n * @param account The account to check.\n * @return `true` if the account is maintainer, otherwise `false`.\n */\n function isMaintainer (address account) public view returns (bool) {\n return maintainers.has(account);\n }\n\n /**\n * Add a new maintainer to the list of maintainers.\n *\n * @param account The account to grant maintainer rights to.\n */\n function addMaintainer (address account) public onlyMaintainer {\n _addMaintainer(account);\n }\n\n /**\n * Give away maintainer rights.\n */\n function renounceMaintainer () public {\n _removeMaintainer(msg.sender);\n }\n\n function _addMaintainer (address account) internal {\n maintainers.add(account);\n emit MaintainerAdded(account);\n }\n\n function _removeMaintainer (address account) internal {\n maintainers.remove(account);\n emit MaintainerRemoved(account);\n }\n}\n",
  83. "sourcePath": "/home/oberstet/scm/crossbario/xbr-protocol/contracts/XBRMaintained.sol",
  84. "ast": {
  85. "absolutePath": "/home/oberstet/scm/crossbario/xbr-protocol/contracts/XBRMaintained.sol",
  86. "exportedSymbols": {
  87. "XBRMaintained": [
  88. 762
  89. ]
  90. },
  91. "id": 763,
  92. "nodeType": "SourceUnit",
  93. "nodes": [
  94. {
  95. "id": 661,
  96. "literals": [
  97. "solidity",
  98. "^",
  99. "0.5",
  100. ".2"
  101. ],
  102. "nodeType": "PragmaDirective",
  103. "src": "810:23:2"
  104. },
  105. {
  106. "absolutePath": "openzeppelin-solidity/contracts/access/Roles.sol",
  107. "file": "openzeppelin-solidity/contracts/access/Roles.sol",
  108. "id": 662,
  109. "nodeType": "ImportDirective",
  110. "scope": 763,
  111. "sourceUnit": 2910,
  112. "src": "835:58:2",
  113. "symbolAliases": [],
  114. "unitAlias": ""
  115. },
  116. {
  117. "baseContracts": [],
  118. "contractDependencies": [],
  119. "contractKind": "contract",
  120. "documentation": "XBR Network (and XBR Network Proxies) SCs inherit from this base contract\nto manage network administration and maintenance via Role-based Access\nControl (RBAC).\nThe implementation for management comes from the OpenZeppelin RBAC library.",
  121. "fullyImplemented": true,
  122. "id": 762,
  123. "linearizedBaseContracts": [
  124. 762
  125. ],
  126. "name": "XBRMaintained",
  127. "nodeType": "ContractDefinition",
  128. "nodes": [
  129. {
  130. "id": 665,
  131. "libraryName": {
  132. "contractScope": null,
  133. "id": 663,
  134. "name": "Roles",
  135. "nodeType": "UserDefinedTypeName",
  136. "referencedDeclaration": 2909,
  137. "src": "1221:5:2",
  138. "typeDescriptions": {
  139. "typeIdentifier": "t_contract$_Roles_$2909",
  140. "typeString": "library Roles"
  141. }
  142. },
  143. "nodeType": "UsingForDirective",
  144. "src": "1215:27:2",
  145. "typeName": {
  146. "contractScope": null,
  147. "id": 664,
  148. "name": "Roles.Role",
  149. "nodeType": "UserDefinedTypeName",
  150. "referencedDeclaration": 2835,
  151. "src": "1231:10:2",
  152. "typeDescriptions": {
  153. "typeIdentifier": "t_struct$_Role_$2835_storage_ptr",
  154. "typeString": "struct Roles.Role"
  155. }
  156. }
  157. },
  158. {
  159. "anonymous": false,
  160. "documentation": "Event fired when a maintainer was added.\n * @param account The account that was added as a maintainer.",
  161. "id": 669,
  162. "name": "MaintainerAdded",
  163. "nodeType": "EventDefinition",
  164. "parameters": {
  165. "id": 668,
  166. "nodeType": "ParameterList",
  167. "parameters": [
  168. {
  169. "constant": false,
  170. "id": 667,
  171. "indexed": true,
  172. "name": "account",
  173. "nodeType": "VariableDeclaration",
  174. "scope": 669,
  175. "src": "1407:23:2",
  176. "stateVariable": false,
  177. "storageLocation": "default",
  178. "typeDescriptions": {
  179. "typeIdentifier": "t_address",
  180. "typeString": "address"
  181. },
  182. "typeName": {
  183. "id": 666,
  184. "name": "address",
  185. "nodeType": "ElementaryTypeName",
  186. "src": "1407:7:2",
  187. "stateMutability": "nonpayable",
  188. "typeDescriptions": {
  189. "typeIdentifier": "t_address",
  190. "typeString": "address"
  191. }
  192. },
  193. "value": null,
  194. "visibility": "internal"
  195. }
  196. ],
  197. "src": "1406:25:2"
  198. },
  199. "src": "1385:47:2"
  200. },
  201. {
  202. "anonymous": false,
  203. "documentation": "Event fired when a maintainer was removed.\n * @param account The account that was removed as a maintainer.",
  204. "id": 673,
  205. "name": "MaintainerRemoved",
  206. "nodeType": "EventDefinition",
  207. "parameters": {
  208. "id": 672,
  209. "nodeType": "ParameterList",
  210. "parameters": [
  211. {
  212. "constant": false,
  213. "id": 671,
  214. "indexed": true,
  215. "name": "account",
  216. "nodeType": "VariableDeclaration",
  217. "scope": 673,
  218. "src": "1603:23:2",
  219. "stateVariable": false,
  220. "storageLocation": "default",
  221. "typeDescriptions": {
  222. "typeIdentifier": "t_address",
  223. "typeString": "address"
  224. },
  225. "typeName": {
  226. "id": 670,
  227. "name": "address",
  228. "nodeType": "ElementaryTypeName",
  229. "src": "1603:7:2",
  230. "stateMutability": "nonpayable",
  231. "typeDescriptions": {
  232. "typeIdentifier": "t_address",
  233. "typeString": "address"
  234. }
  235. },
  236. "value": null,
  237. "visibility": "internal"
  238. }
  239. ],
  240. "src": "1602:25:2"
  241. },
  242. "src": "1579:49:2"
  243. },
  244. {
  245. "constant": false,
  246. "id": 675,
  247. "name": "maintainers",
  248. "nodeType": "VariableDeclaration",
  249. "scope": 762,
  250. "src": "1683:30:2",
  251. "stateVariable": true,
  252. "storageLocation": "default",
  253. "typeDescriptions": {
  254. "typeIdentifier": "t_struct$_Role_$2835_storage",
  255. "typeString": "struct Roles.Role"
  256. },
  257. "typeName": {
  258. "contractScope": null,
  259. "id": 674,
  260. "name": "Roles.Role",
  261. "nodeType": "UserDefinedTypeName",
  262. "referencedDeclaration": 2835,
  263. "src": "1683:10:2",
  264. "typeDescriptions": {
  265. "typeIdentifier": "t_struct$_Role_$2835_storage_ptr",
  266. "typeString": "struct Roles.Role"
  267. }
  268. },
  269. "value": null,
  270. "visibility": "private"
  271. },
  272. {
  273. "body": {
  274. "id": 683,
  275. "nodeType": "Block",
  276. "src": "1832:43:2",
  277. "statements": [
  278. {
  279. "expression": {
  280. "argumentTypes": null,
  281. "arguments": [
  282. {
  283. "argumentTypes": null,
  284. "expression": {
  285. "argumentTypes": null,
  286. "id": 679,
  287. "name": "msg",
  288. "nodeType": "Identifier",
  289. "overloadedDeclarations": [],
  290. "referencedDeclaration": 3662,
  291. "src": "1857:3:2",
  292. "typeDescriptions": {
  293. "typeIdentifier": "t_magic_message",
  294. "typeString": "msg"
  295. }
  296. },
  297. "id": 680,
  298. "isConstant": false,
  299. "isLValue": false,
  300. "isPure": false,
  301. "lValueRequested": false,
  302. "memberName": "sender",
  303. "nodeType": "MemberAccess",
  304. "referencedDeclaration": null,
  305. "src": "1857:10:2",
  306. "typeDescriptions": {
  307. "typeIdentifier": "t_address_payable",
  308. "typeString": "address payable"
  309. }
  310. }
  311. ],
  312. "expression": {
  313. "argumentTypes": [
  314. {
  315. "typeIdentifier": "t_address_payable",
  316. "typeString": "address payable"
  317. }
  318. ],
  319. "id": 678,
  320. "name": "_addMaintainer",
  321. "nodeType": "Identifier",
  322. "overloadedDeclarations": [],
  323. "referencedDeclaration": 745,
  324. "src": "1842:14:2",
  325. "typeDescriptions": {
  326. "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
  327. "typeString": "function (address)"
  328. }
  329. },
  330. "id": 681,
  331. "isConstant": false,
  332. "isLValue": false,
  333. "isPure": false,
  334. "kind": "functionCall",
  335. "lValueRequested": false,
  336. "names": [],
  337. "nodeType": "FunctionCall",
  338. "src": "1842:26:2",
  339. "typeDescriptions": {
  340. "typeIdentifier": "t_tuple$__$",
  341. "typeString": "tuple()"
  342. }
  343. },
  344. "id": 682,
  345. "nodeType": "ExpressionStatement",
  346. "src": "1842:26:2"
  347. }
  348. ]
  349. },
  350. "documentation": "The constructor is internal (roles are managed by the OpenZeppelin base class).",
  351. "id": 684,
  352. "implemented": true,
  353. "kind": "constructor",
  354. "modifiers": [],
  355. "name": "",
  356. "nodeType": "FunctionDefinition",
  357. "parameters": {
  358. "id": 676,
  359. "nodeType": "ParameterList",
  360. "parameters": [],
  361. "src": "1820:2:2"
  362. },
  363. "returnParameters": {
  364. "id": 677,
  365. "nodeType": "ParameterList",
  366. "parameters": [],
  367. "src": "1832:0:2"
  368. },
  369. "scope": 762,
  370. "src": "1808:67:2",
  371. "stateMutability": "nonpayable",
  372. "superFunction": null,
  373. "visibility": "internal"
  374. },
  375. {
  376. "body": {
  377. "id": 694,
  378. "nodeType": "Block",
  379. "src": "2001:61:2",
  380. "statements": [
  381. {
  382. "expression": {
  383. "argumentTypes": null,
  384. "arguments": [
  385. {
  386. "argumentTypes": null,
  387. "arguments": [
  388. {
  389. "argumentTypes": null,
  390. "expression": {
  391. "argumentTypes": null,
  392. "id": 688,
  393. "name": "msg",
  394. "nodeType": "Identifier",
  395. "overloadedDeclarations": [],
  396. "referencedDeclaration": 3662,
  397. "src": "2032:3:2",
  398. "typeDescriptions": {
  399. "typeIdentifier": "t_magic_message",
  400. "typeString": "msg"
  401. }
  402. },
  403. "id": 689,
  404. "isConstant": false,
  405. "isLValue": false,
  406. "isPure": false,
  407. "lValueRequested": false,
  408. "memberName": "sender",
  409. "nodeType": "MemberAccess",
  410. "referencedDeclaration": null,
  411. "src": "2032:10:2",
  412. "typeDescriptions": {
  413. "typeIdentifier": "t_address_payable",
  414. "typeString": "address payable"
  415. }
  416. }
  417. ],
  418. "expression": {
  419. "argumentTypes": [
  420. {
  421. "typeIdentifier": "t_address_payable",
  422. "typeString": "address payable"
  423. }
  424. ],
  425. "id": 687,
  426. "name": "isMaintainer",
  427. "nodeType": "Identifier",
  428. "overloadedDeclarations": [],
  429. "referencedDeclaration": 708,
  430. "src": "2019:12:2",
  431. "typeDescriptions": {
  432. "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
  433. "typeString": "function (address) view returns (bool)"
  434. }
  435. },
  436. "id": 690,
  437. "isConstant": false,
  438. "isLValue": false,
  439. "isPure": false,
  440. "kind": "functionCall",
  441. "lValueRequested": false,
  442. "names": [],
  443. "nodeType": "FunctionCall",
  444. "src": "2019:24:2",
  445. "typeDescriptions": {
  446. "typeIdentifier": "t_bool",
  447. "typeString": "bool"
  448. }
  449. }
  450. ],
  451. "expression": {
  452. "argumentTypes": [
  453. {
  454. "typeIdentifier": "t_bool",
  455. "typeString": "bool"
  456. }
  457. ],
  458. "id": 686,
  459. "name": "require",
  460. "nodeType": "Identifier",
  461. "overloadedDeclarations": [
  462. 3665,
  463. 3666
  464. ],
  465. "referencedDeclaration": 3665,
  466. "src": "2011:7:2",
  467. "typeDescriptions": {
  468. "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
  469. "typeString": "function (bool) pure"
  470. }
  471. },
  472. "id": 691,
  473. "isConstant": false,
  474. "isLValue": false,
  475. "isPure": false,
  476. "kind": "functionCall",
  477. "lValueRequested": false,
  478. "names": [],
  479. "nodeType": "FunctionCall",
  480. "src": "2011:33:2",
  481. "typeDescriptions": {
  482. "typeIdentifier": "t_tuple$__$",
  483. "typeString": "tuple()"
  484. }
  485. },
  486. "id": 692,
  487. "nodeType": "ExpressionStatement",
  488. "src": "2011:33:2"
  489. },
  490. {
  491. "id": 693,
  492. "nodeType": "PlaceholderStatement",
  493. "src": "2054:1:2"
  494. }
  495. ]
  496. },
  497. "documentation": "Modifier to require maintainer-role for the sender when calling a SC.",
  498. "id": 695,
  499. "name": "onlyMaintainer",
  500. "nodeType": "ModifierDefinition",
  501. "parameters": {
  502. "id": 685,
  503. "nodeType": "ParameterList",
  504. "parameters": [],
  505. "src": "1998:2:2"
  506. },
  507. "src": "1974:88:2",
  508. "visibility": "internal"
  509. },
  510. {
  511. "body": {
  512. "id": 707,
  513. "nodeType": "Block",
  514. "src": "2334:48:2",
  515. "statements": [
  516. {
  517. "expression": {
  518. "argumentTypes": null,
  519. "arguments": [
  520. {
  521. "argumentTypes": null,
  522. "id": 704,
  523. "name": "account",
  524. "nodeType": "Identifier",
  525. "overloadedDeclarations": [],
  526. "referencedDeclaration": 697,
  527. "src": "2367:7:2",
  528. "typeDescriptions": {
  529. "typeIdentifier": "t_address",
  530. "typeString": "address"
  531. }
  532. }
  533. ],
  534. "expression": {
  535. "argumentTypes": [
  536. {
  537. "typeIdentifier": "t_address",
  538. "typeString": "address"
  539. }
  540. ],
  541. "expression": {
  542. "argumentTypes": null,
  543. "id": 702,
  544. "name": "maintainers",
  545. "nodeType": "Identifier",
  546. "overloadedDeclarations": [],
  547. "referencedDeclaration": 675,
  548. "src": "2351:11:2",
  549. "typeDescriptions": {
  550. "typeIdentifier": "t_struct$_Role_$2835_storage",
  551. "typeString": "struct Roles.Role storage ref"
  552. }
  553. },
  554. "id": 703,
  555. "isConstant": false,
  556. "isLValue": true,
  557. "isPure": false,
  558. "lValueRequested": false,
  559. "memberName": "has",
  560. "nodeType": "MemberAccess",
  561. "referencedDeclaration": 2908,
  562. "src": "2351:15:2",
  563. "typeDescriptions": {
  564. "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$2835_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$2835_storage_ptr_$",
  565. "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)"
  566. }
  567. },
  568. "id": 705,
  569. "isConstant": false,
  570. "isLValue": false,
  571. "isPure": false,
  572. "kind": "functionCall",
  573. "lValueRequested": false,
  574. "names": [],
  575. "nodeType": "FunctionCall",
  576. "src": "2351:24:2",
  577. "typeDescriptions": {
  578. "typeIdentifier": "t_bool",
  579. "typeString": "bool"
  580. }
  581. },
  582. "functionReturnParameters": 701,
  583. "id": 706,
  584. "nodeType": "Return",
  585. "src": "2344:31:2"
  586. }
  587. ]
  588. },
  589. "documentation": "Check if the given address is currently a maintainer.\n * @param account The account to check.\n@return `true` if the account is maintainer, otherwise `false`.",
  590. "id": 708,
  591. "implemented": true,
  592. "kind": "function",
  593. "modifiers": [],
  594. "name": "isMaintainer",
  595. "nodeType": "FunctionDefinition",
  596. "parameters": {
  597. "id": 698,
  598. "nodeType": "ParameterList",
  599. "parameters": [
  600. {
  601. "constant": false,
  602. "id": 697,
  603. "name": "account",
  604. "nodeType": "VariableDeclaration",
  605. "scope": 708,
  606. "src": "2290:15:2",
  607. "stateVariable": false,
  608. "storageLocation": "default",
  609. "typeDescriptions": {
  610. "typeIdentifier": "t_address",
  611. "typeString": "address"
  612. },
  613. "typeName": {
  614. "id": 696,
  615. "name": "address",
  616. "nodeType": "ElementaryTypeName",
  617. "src": "2290:7:2",
  618. "stateMutability": "nonpayable",
  619. "typeDescriptions": {
  620. "typeIdentifier": "t_address",
  621. "typeString": "address"
  622. }
  623. },
  624. "value": null,
  625. "visibility": "internal"
  626. }
  627. ],
  628. "src": "2289:17:2"
  629. },
  630. "returnParameters": {
  631. "id": 701,
  632. "nodeType": "ParameterList",
  633. "parameters": [
  634. {
  635. "constant": false,
  636. "id": 700,
  637. "name": "",
  638. "nodeType": "VariableDeclaration",
  639. "scope": 708,
  640. "src": "2328:4:2",
  641. "stateVariable": false,
  642. "storageLocation": "default",
  643. "typeDescriptions": {
  644. "typeIdentifier": "t_bool",
  645. "typeString": "bool"
  646. },
  647. "typeName": {
  648. "id": 699,
  649. "name": "bool",
  650. "nodeType": "ElementaryTypeName",
  651. "src": "2328:4:2",
  652. "typeDescriptions": {
  653. "typeIdentifier": "t_bool",
  654. "typeString": "bool"
  655. }
  656. },
  657. "value": null,
  658. "visibility": "internal"
  659. }
  660. ],
  661. "src": "2327:6:2"
  662. },
  663. "scope": 762,
  664. "src": "2267:115:2",
  665. "stateMutability": "view",
  666. "superFunction": null,
  667. "visibility": "public"
  668. },
  669. {
  670. "body": {
  671. "id": 719,
  672. "nodeType": "Block",
  673. "src": "2595:40:2",
  674. "statements": [
  675. {
  676. "expression": {
  677. "argumentTypes": null,
  678. "arguments": [
  679. {
  680. "argumentTypes": null,
  681. "id": 716,
  682. "name": "account",
  683. "nodeType": "Identifier",
  684. "overloadedDeclarations": [],
  685. "referencedDeclaration": 710,
  686. "src": "2620:7:2",
  687. "typeDescriptions": {
  688. "typeIdentifier": "t_address",
  689. "typeString": "address"
  690. }
  691. }
  692. ],
  693. "expression": {
  694. "argumentTypes": [
  695. {
  696. "typeIdentifier": "t_address",
  697. "typeString": "address"
  698. }
  699. ],
  700. "id": 715,
  701. "name": "_addMaintainer",
  702. "nodeType": "Identifier",
  703. "overloadedDeclarations": [],
  704. "referencedDeclaration": 745,
  705. "src": "2605:14:2",
  706. "typeDescriptions": {
  707. "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
  708. "typeString": "function (address)"
  709. }
  710. },
  711. "id": 717,
  712. "isConstant": false,
  713. "isLValue": false,
  714. "isPure": false,
  715. "kind": "functionCall",
  716. "lValueRequested": false,
  717. "names": [],
  718. "nodeType": "FunctionCall",
  719. "src": "2605:23:2",
  720. "typeDescriptions": {
  721. "typeIdentifier": "t_tuple$__$",
  722. "typeString": "tuple()"
  723. }
  724. },
  725. "id": 718,
  726. "nodeType": "ExpressionStatement",
  727. "src": "2605:23:2"
  728. }
  729. ]
  730. },
  731. "documentation": "Add a new maintainer to the list of maintainers.\n * @param account The account to grant maintainer rights to.",
  732. "id": 720,
  733. "implemented": true,
  734. "kind": "function",
  735. "modifiers": [
  736. {
  737. "arguments": null,
  738. "id": 713,
  739. "modifierName": {
  740. "argumentTypes": null,
  741. "id": 712,
  742. "name": "onlyMaintainer",
  743. "nodeType": "Identifier",
  744. "overloadedDeclarations": [],
  745. "referencedDeclaration": 695,
  746. "src": "2580:14:2",
  747. "typeDescriptions": {
  748. "typeIdentifier": "t_modifier$__$",
  749. "typeString": "modifier ()"
  750. }
  751. },
  752. "nodeType": "ModifierInvocation",
  753. "src": "2580:14:2"
  754. }
  755. ],
  756. "name": "addMaintainer",
  757. "nodeType": "FunctionDefinition",
  758. "parameters": {
  759. "id": 711,
  760. "nodeType": "ParameterList",
  761. "parameters": [
  762. {
  763. "constant": false,
  764. "id": 710,
  765. "name": "account",
  766. "nodeType": "VariableDeclaration",
  767. "scope": 720,
  768. "src": "2556:15:2",
  769. "stateVariable": false,
  770. "storageLocation": "default",
  771. "typeDescriptions": {
  772. "typeIdentifier": "t_address",
  773. "typeString": "address"
  774. },
  775. "typeName": {
  776. "id": 709,
  777. "name": "address",
  778. "nodeType": "ElementaryTypeName",
  779. "src": "2556:7:2",
  780. "stateMutability": "nonpayable",
  781. "typeDescriptions": {
  782. "typeIdentifier": "t_address",
  783. "typeString": "address"
  784. }
  785. },
  786. "value": null,
  787. "visibility": "internal"
  788. }
  789. ],
  790. "src": "2555:17:2"
  791. },
  792. "returnParameters": {
  793. "id": 714,
  794. "nodeType": "ParameterList",
  795. "parameters": [],
  796. "src": "2595:0:2"
  797. },
  798. "scope": 762,
  799. "src": "2532:103:2",
  800. "stateMutability": "nonpayable",
  801. "superFunction": null,
  802. "visibility": "public"
  803. },
  804. {
  805. "body": {
  806. "id": 728,
  807. "nodeType": "Block",
  808. "src": "2731:46:2",
  809. "statements": [
  810. {
  811. "expression": {
  812. "argumentTypes": null,
  813. "arguments": [
  814. {
  815. "argumentTypes": null,
  816. "expression": {
  817. "argumentTypes": null,
  818. "id": 724,
  819. "name": "msg",
  820. "nodeType": "Identifier",
  821. "overloadedDeclarations": [],
  822. "referencedDeclaration": 3662,
  823. "src": "2759:3:2",
  824. "typeDescriptions": {
  825. "typeIdentifier": "t_magic_message",
  826. "typeString": "msg"
  827. }
  828. },
  829. "id": 725,
  830. "isConstant": false,
  831. "isLValue": false,
  832. "isPure": false,
  833. "lValueRequested": false,
  834. "memberName": "sender",
  835. "nodeType": "MemberAccess",
  836. "referencedDeclaration": null,
  837. "src": "2759:10:2",
  838. "typeDescriptions": {
  839. "typeIdentifier": "t_address_payable",
  840. "typeString": "address payable"
  841. }
  842. }
  843. ],
  844. "expression": {
  845. "argumentTypes": [
  846. {
  847. "typeIdentifier": "t_address_payable",
  848. "typeString": "address payable"
  849. }
  850. ],
  851. "id": 723,
  852. "name": "_removeMaintainer",
  853. "nodeType": "Identifier",
  854. "overloadedDeclarations": [],
  855. "referencedDeclaration": 761,
  856. "src": "2741:17:2",
  857. "typeDescriptions": {
  858. "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
  859. "typeString": "function (address)"
  860. }
  861. },
  862. "id": 726,
  863. "isConstant": false,
  864. "isLValue": false,
  865. "isPure": false,
  866. "kind": "functionCall",
  867. "lValueRequested": false,
  868. "names": [],
  869. "nodeType": "FunctionCall",
  870. "src": "2741:29:2",
  871. "typeDescriptions": {
  872. "typeIdentifier": "t_tuple$__$",
  873. "typeString": "tuple()"
  874. }
  875. },
  876. "id": 727,
  877. "nodeType": "ExpressionStatement",
  878. "src": "2741:29:2"
  879. }
  880. ]
  881. },
  882. "documentation": "Give away maintainer rights.",
  883. "id": 729,
  884. "implemented": true,
  885. "kind": "function",
  886. "modifiers": [],
  887. "name": "renounceMaintainer",
  888. "nodeType": "FunctionDefinition",
  889. "parameters": {
  890. "id": 721,
  891. "nodeType": "ParameterList",
  892. "parameters": [],
  893. "src": "2721:2:2"
  894. },
  895. "returnParameters": {
  896. "id": 722,
  897. "nodeType": "ParameterList",
  898. "parameters": [],
  899. "src": "2731:0:2"
  900. },
  901. "scope": 762,
  902. "src": "2693:84:2",
  903. "stateMutability": "nonpayable",
  904. "superFunction": null,
  905. "visibility": "public"
  906. },
  907. {
  908. "body": {
  909. "id": 744,
  910. "nodeType": "Block",
  911. "src": "2834:80:2",
  912. "statements": [
  913. {
  914. "expression": {
  915. "argumentTypes": null,
  916. "arguments": [
  917. {
  918. "argumentTypes": null,
  919. "id": 737,
  920. "name": "account",
  921. "nodeType": "Identifier",
  922. "overloadedDeclarations": [],
  923. "referencedDeclaration": 731,
  924. "src": "2860:7:2",
  925. "typeDescriptions": {
  926. "typeIdentifier": "t_address",
  927. "typeString": "address"
  928. }
  929. }
  930. ],
  931. "expression": {
  932. "argumentTypes": [
  933. {
  934. "typeIdentifier": "t_address",
  935. "typeString": "address"
  936. }
  937. ],
  938. "expression": {
  939. "argumentTypes": null,
  940. "id": 734,
  941. "name": "maintainers",
  942. "nodeType": "Identifier",
  943. "overloadedDeclarations": [],
  944. "referencedDeclaration": 675,
  945. "src": "2844:11:2",
  946. "typeDescriptions": {
  947. "typeIdentifier": "t_struct$_Role_$2835_storage",
  948. "typeString": "struct Roles.Role storage ref"
  949. }
  950. },
  951. "id": 736,
  952. "isConstant": false,
  953. "isLValue": true,
  954. "isPure": false,
  955. "lValueRequested": false,
  956. "memberName": "add",
  957. "nodeType": "MemberAccess",
  958. "referencedDeclaration": 2860,
  959. "src": "2844:15:2",
  960. "typeDescriptions": {
  961. "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$2835_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$2835_storage_ptr_$",
  962. "typeString": "function (struct Roles.Role storage pointer,address)"
  963. }
  964. },
  965. "id": 738,
  966. "isConstant": false,
  967. "isLValue": false,
  968. "isPure": false,
  969. "kind": "functionCall",
  970. "lValueRequested": false,
  971. "names": [],
  972. "nodeType": "FunctionCall",
  973. "src": "2844:24:2",
  974. "typeDescriptions": {
  975. "typeIdentifier": "t_tuple$__$",
  976. "typeString": "tuple()"
  977. }
  978. },
  979. "id": 739,
  980. "nodeType": "ExpressionStatement",
  981. "src": "2844:24:2"
  982. },
  983. {
  984. "eventCall": {
  985. "argumentTypes": null,
  986. "arguments": [
  987. {
  988. "argumentTypes": null,
  989. "id": 741,
  990. "name": "account",
  991. "nodeType": "Identifier",
  992. "overloadedDeclarations": [],
  993. "referencedDeclaration": 731,
  994. "src": "2899:7:2",
  995. "typeDescriptions": {
  996. "typeIdentifier": "t_address",
  997. "typeString": "address"
  998. }
  999. }
  1000. ],
  1001. "expression": {
  1002. "argumentTypes": [
  1003. {
  1004. "typeIdentifier": "t_address",
  1005. "typeString": "address"
  1006. }
  1007. ],
  1008. "id": 740,
  1009. "name": "MaintainerAdded",
  1010. "nodeType": "Identifier",
  1011. "overloadedDeclarations": [],
  1012. "referencedDeclaration": 669,
  1013. "src": "2883:15:2",
  1014. "typeDescriptions": {
  1015. "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
  1016. "typeString": "function (address)"
  1017. }
  1018. },
  1019. "id": 742,
  1020. "isConstant": false,
  1021. "isLValue": false,
  1022. "isPure": false,
  1023. "kind": "functionCall",
  1024. "lValueRequested": false,
  1025. "names": [],
  1026. "nodeType": "FunctionCall",
  1027. "src": "2883:24:2",
  1028. "typeDescriptions": {
  1029. "typeIdentifier": "t_tuple$__$",
  1030. "typeString": "tuple()"
  1031. }
  1032. },
  1033. "id": 743,
  1034. "nodeType": "EmitStatement",
  1035. "src": "2878:29:2"
  1036. }
  1037. ]
  1038. },
  1039. "documentation": null,
  1040. "id": 745,
  1041. "implemented": true,
  1042. "kind": "function",
  1043. "modifiers": [],
  1044. "name": "_addMaintainer",
  1045. "nodeType": "FunctionDefinition",
  1046. "parameters": {
  1047. "id": 732,
  1048. "nodeType": "ParameterList",
  1049. "parameters": [
  1050. {
  1051. "constant": false,
  1052. "id": 731,
  1053. "name": "account",
  1054. "nodeType": "VariableDeclaration",
  1055. "scope": 745,
  1056. "src": "2808:15:2",
  1057. "stateVariable": false,
  1058. "storageLocation": "default",
  1059. "typeDescriptions": {
  1060. "typeIdentifier": "t_address",
  1061. "typeString": "address"
  1062. },
  1063. "typeName": {
  1064. "id": 730,
  1065. "name": "address",
  1066. "nodeType": "ElementaryTypeName",
  1067. "src": "2808:7:2",
  1068. "stateMutability": "nonpayable",
  1069. "typeDescriptions": {
  1070. "typeIdentifier": "t_address",
  1071. "typeString": "address"
  1072. }
  1073. },
  1074. "value": null,
  1075. "visibility": "internal"
  1076. }
  1077. ],
  1078. "src": "2807:17:2"
  1079. },
  1080. "returnParameters": {
  1081. "id": 733,
  1082. "nodeType": "ParameterList",
  1083. "parameters": [],
  1084. "src": "2834:0:2"
  1085. },
  1086. "scope": 762,
  1087. "src": "2783:131:2",
  1088. "stateMutability": "nonpayable",
  1089. "superFunction": null,
  1090. "visibility": "internal"
  1091. },
  1092. {
  1093. "body": {
  1094. "id": 760,
  1095. "nodeType": "Block",
  1096. "src": "2974:85:2",
  1097. "statements": [
  1098. {
  1099. "expression": {
  1100. "argumentTypes": null,
  1101. "arguments": [
  1102. {
  1103. "argumentTypes": null,
  1104. "id": 753,
  1105. "name": "account",
  1106. "nodeType": "Identifier",
  1107. "overloadedDeclarations": [],
  1108. "referencedDeclaration": 747,
  1109. "src": "3003:7:2",
  1110. "typeDescriptions": {
  1111. "typeIdentifier": "t_address",
  1112. "typeString": "address"
  1113. }
  1114. }
  1115. ],
  1116. "expression": {
  1117. "argumentTypes": [
  1118. {
  1119. "typeIdentifier": "t_address",
  1120. "typeString": "address"
  1121. }
  1122. ],
  1123. "expression": {
  1124. "argumentTypes": null,
  1125. "id": 750,
  1126. "name": "maintainers",
  1127. "nodeType": "Identifier",
  1128. "overloadedDeclarations": [],
  1129. "referencedDeclaration": 675,
  1130. "src": "2984:11:2",
  1131. "typeDescriptions": {
  1132. "typeIdentifier": "t_struct$_Role_$2835_storage",
  1133. "typeString": "struct Roles.Role storage ref"
  1134. }
  1135. },
  1136. "id": 752,
  1137. "isConstant": false,
  1138. "isLValue": true,
  1139. "isPure": false,
  1140. "lValueRequested": false,
  1141. "memberName": "remove",
  1142. "nodeType": "MemberAccess",
  1143. "referencedDeclaration": 2884,
  1144. "src": "2984:18:2",
  1145. "typeDescriptions": {
  1146. "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$2835_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$2835_storage_ptr_$",
  1147. "typeString": "function (struct Roles.Role storage pointer,address)"
  1148. }
  1149. },
  1150. "id": 754,
  1151. "isConstant": false,
  1152. "isLValue": false,
  1153. "isPure": false,
  1154. "kind": "functionCall",
  1155. "lValueRequested": false,
  1156. "names": [],
  1157. "nodeType": "FunctionCall",
  1158. "src": "2984:27:2",
  1159. "typeDescriptions": {
  1160. "typeIdentifier": "t_tuple$__$",
  1161. "typeString": "tuple()"
  1162. }
  1163. },
  1164. "id": 755,
  1165. "nodeType": "ExpressionStatement",
  1166. "src": "2984:27:2"
  1167. },
  1168. {
  1169. "eventCall": {
  1170. "argumentTypes": null,
  1171. "arguments": [
  1172. {
  1173. "argumentTypes": null,
  1174. "id": 757,
  1175. "name": "account",
  1176. "nodeType": "Identifier",
  1177. "overloadedDeclarations": [],
  1178. "referencedDeclaration": 747,
  1179. "src": "3044:7:2",
  1180. "typeDescriptions": {
  1181. "typeIdentifier": "t_address",
  1182. "typeString": "address"
  1183. }
  1184. }
  1185. ],
  1186. "expression": {
  1187. "argumentTypes": [
  1188. {
  1189. "typeIdentifier": "t_address",
  1190. "typeString": "address"
  1191. }
  1192. ],
  1193. "id": 756,
  1194. "name": "MaintainerRemoved",
  1195. "nodeType": "Identifier",
  1196. "overloadedDeclarations": [],
  1197. "referencedDeclaration": 673,
  1198. "src": "3026:17:2",
  1199. "typeDescriptions": {
  1200. "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
  1201. "typeString": "function (address)"
  1202. }
  1203. },
  1204. "id": 758,
  1205. "isConstant": false,
  1206. "isLValue": false,
  1207. "isPure": false,
  1208. "kind": "functionCall",
  1209. "lValueRequested": false,
  1210. "names": [],
  1211. "nodeType": "FunctionCall",
  1212. "src": "3026:26:2",
  1213. "typeDescriptions": {
  1214. "typeIdentifier": "t_tuple$__$",
  1215. "typeString": "tuple()"
  1216. }
  1217. },
  1218. "id": 759,
  1219. "nodeType": "EmitStatement",
  1220. "src": "3021:31:2"
  1221. }
  1222. ]
  1223. },
  1224. "documentation": null,
  1225. "id": 761,
  1226. "implemented": true,
  1227. "kind": "function",
  1228. "modifiers": [],
  1229. "name": "_removeMaintainer",
  1230. "nodeType": "FunctionDefinition",
  1231. "parameters": {
  1232. "id": 748,
  1233. "nodeType": "ParameterList",
  1234. "parameters": [
  1235. {
  1236. "constant": false,
  1237. "id": 747,
  1238. "name": "account",
  1239. "nodeType": "VariableDeclaration",
  1240. "scope": 761,
  1241. "src": "2948:15:2",
  1242. "stateVariable": false,
  1243. "storageLocation": "default",
  1244. "typeDescriptions": {
  1245. "typeIdentifier": "t_address",
  1246. "typeString": "address"
  1247. },
  1248. "typeName": {
  1249. "id": 746,
  1250. "name": "address",
  1251. "nodeType": "ElementaryTypeName",
  1252. "src": "2948:7:2",
  1253. "stateMutability": "nonpayable",
  1254. "typeDescriptions": {
  1255. "typeIdentifier": "t_address",
  1256. "typeString": "address"
  1257. }
  1258. },
  1259. "value": null,
  1260. "visibility": "internal"
  1261. }
  1262. ],
  1263. "src": "2947:17:2"
  1264. },
  1265. "returnParameters": {
  1266. "id": 749,
  1267. "nodeType": "ParameterList",
  1268. "parameters": [],
  1269. "src": "2974:0:2"
  1270. },
  1271. "scope": 762,
  1272. "src": "2920:139:2",
  1273. "stateMutability": "nonpayable",
  1274. "superFunction": null,
  1275. "visibility": "internal"
  1276. }
  1277. ],
  1278. "scope": 763,
  1279. "src": "1153:1908:2"
  1280. }
  1281. ],
  1282. "src": "810:2252:2"
  1283. },
  1284. "legacyAST": {
  1285. "absolutePath": "/home/oberstet/scm/crossbario/xbr-protocol/contracts/XBRMaintained.sol",
  1286. "exportedSymbols": {
  1287. "XBRMaintained": [
  1288. 762
  1289. ]
  1290. },
  1291. "id": 763,
  1292. "nodeType": "SourceUnit",
  1293. "nodes": [
  1294. {
  1295. "id": 661,
  1296. "literals": [
  1297. "solidity",
  1298. "^",
  1299. "0.5",
  1300. ".2"
  1301. ],
  1302. "nodeType": "PragmaDirective",
  1303. "src": "810:23:2"
  1304. },
  1305. {
  1306. "absolutePath": "openzeppelin-solidity/contracts/access/Roles.sol",
  1307. "file": "openzeppelin-solidity/contracts/access/Roles.sol",
  1308. "id": 662,
  1309. "nodeType": "ImportDirective",
  1310. "scope": 763,
  1311. "sourceUnit": 2910,
  1312. "src": "835:58:2",
  1313. "symbolAliases": [],
  1314. "unitAlias": ""
  1315. },
  1316. {
  1317. "baseContracts": [],
  1318. "contractDependencies": [],
  1319. "contractKind": "contract",
  1320. "documentation": "XBR Network (and XBR Network Proxies) SCs inherit from this base contract\nto manage network administration and maintenance via Role-based Access\nControl (RBAC).\nThe implementation for management comes from the OpenZeppelin RBAC library.",
  1321. "fullyImplemented": true,
  1322. "id": 762,
  1323. "linearizedBaseContracts": [
  1324. 762
  1325. ],
  1326. "name": "XBRMaintained",
  1327. "nodeType": "ContractDefinition",
  1328. "nodes": [
  1329. {
  1330. "id": 665,
  1331. "libraryName": {
  1332. "contractScope": null,
  1333. "id": 663,
  1334. "name": "Roles",
  1335. "nodeType": "UserDefinedTypeName",
  1336. "referencedDeclaration": 2909,
  1337. "src": "1221:5:2",
  1338. "typeDescriptions": {
  1339. "typeIdentifier": "t_contract$_Roles_$2909",
  1340. "typeString": "library Roles"
  1341. }
  1342. },
  1343. "nodeType": "UsingForDirective",
  1344. "src": "1215:27:2",
  1345. "typeName": {
  1346. "contractScope": null,
  1347. "id": 664,
  1348. "name": "Roles.Role",
  1349. "nodeType": "UserDefinedTypeName",
  1350. "referencedDeclaration": 2835,
  1351. "src": "1231:10:2",
  1352. "typeDescriptions": {
  1353. "typeIdentifier": "t_struct$_Role_$2835_storage_ptr",
  1354. "typeString": "struct Roles.Role"
  1355. }
  1356. }
  1357. },
  1358. {
  1359. "anonymous": false,
  1360. "documentation": "Event fired when a maintainer was added.\n * @param account The account that was added as a maintainer.",
  1361. "id": 669,
  1362. "name": "MaintainerAdded",
  1363. "nodeType": "EventDefinition",
  1364. "parameters": {
  1365. "id": 668,
  1366. "nodeType": "ParameterList",
  1367. "parameters": [
  1368. {
  1369. "constant": false,
  1370. "id": 667,
  1371. "indexed": true,
  1372. "name": "account",
  1373. "nodeType": "VariableDeclaration",
  1374. "scope": 669,
  1375. "src": "1407:23:2",
  1376. "stateVariable": false,
  1377. "storageLocation": "default",
  1378. "typeDescriptions": {
  1379. "typeIdentifier": "t_address",
  1380. "typeString": "address"
  1381. },
  1382. "typeName": {
  1383. "id": 666,
  1384. "name": "address",
  1385. "nodeType": "ElementaryTypeName",
  1386. "src": "1407:7:2",
  1387. "stateMutability": "nonpayable",
  1388. "typeDescriptions": {
  1389. "typeIdentifier": "t_address",
  1390. "typeString": "address"
  1391. }
  1392. },
  1393. "value": null,
  1394. "visibility": "internal"
  1395. }
  1396. ],
  1397. "src": "1406:25:2"
  1398. },
  1399. "src": "1385:47:2"
  1400. },
  1401. {
  1402. "anonymous": false,
  1403. "documentation": "Event fired when a maintainer was removed.\n * @param account The account that was removed as a maintainer.",
  1404. "id": 673,
  1405. "name": "MaintainerRemoved",
  1406. "nodeType": "EventDefinition",
  1407. "parameters": {
  1408. "id": 672,
  1409. "nodeType": "ParameterList",
  1410. "parameters": [
  1411. {
  1412. "constant": false,
  1413. "id": 671,
  1414. "indexed": true,
  1415. "name": "account",
  1416. "nodeType": "VariableDeclaration",
  1417. "scope": 673,
  1418. "src": "1603:23:2",
  1419. "stateVariable": false,
  1420. "storageLocation": "default",
  1421. "typeDescriptions": {
  1422. "typeIdentifier": "t_address",
  1423. "typeString": "address"
  1424. },
  1425. "typeName": {
  1426. "id": 670,
  1427. "name": "address",
  1428. "nodeType": "ElementaryTypeName",
  1429. "src": "1603:7:2",
  1430. "stateMutability": "nonpayable",
  1431. "typeDescriptions": {
  1432. "typeIdentifier": "t_address",
  1433. "typeString": "address"
  1434. }
  1435. },
  1436. "value": null,
  1437. "visibility": "internal"
  1438. }
  1439. ],
  1440. "src": "1602:25:2"
  1441. },
  1442. "src": "1579:49:2"
  1443. },
  1444. {
  1445. "constant": false,
  1446. "id": 675,
  1447. "name": "maintainers",
  1448. "nodeType": "VariableDeclaration",
  1449. "scope": 762,
  1450. "src": "1683:30:2",
  1451. "stateVariable": true,
  1452. "storageLocation": "default",
  1453. "typeDescriptions": {
  1454. "typeIdentifier": "t_struct$_Role_$2835_storage",
  1455. "typeString": "struct Roles.Role"
  1456. },
  1457. "typeName": {
  1458. "contractScope": null,
  1459. "id": 674,
  1460. "name": "Roles.Role",
  1461. "nodeType": "UserDefinedTypeName",
  1462. "referencedDeclaration": 2835,
  1463. "src": "1683:10:2",
  1464. "typeDescriptions": {
  1465. "typeIdentifier": "t_struct$_Role_$2835_storage_ptr",
  1466. "typeString": "struct Roles.Role"
  1467. }
  1468. },
  1469. "value": null,
  1470. "visibility": "private"
  1471. },
  1472. {
  1473. "body": {
  1474. "id": 683,
  1475. "nodeType": "Block",
  1476. "src": "1832:43:2",
  1477. "statements": [
  1478. {
  1479. "expression": {
  1480. "argumentTypes": null,
  1481. "arguments": [
  1482. {
  1483. "argumentTypes": null,
  1484. "expression": {
  1485. "argumentTypes": null,
  1486. "id": 679,
  1487. "name": "msg",
  1488. "nodeType": "Identifier",
  1489. "overloadedDeclarations": [],
  1490. "referencedDeclaration": 3662,
  1491. "src": "1857:3:2",
  1492. "typeDescriptions": {
  1493. "typeIdentifier": "t_magic_message",
  1494. "typeString": "msg"
  1495. }
  1496. },
  1497. "id": 680,
  1498. "isConstant": false,
  1499. "isLValue": false,
  1500. "isPure": false,
  1501. "lValueRequested": false,
  1502. "memberName": "sender",
  1503. "nodeType": "MemberAccess",
  1504. "referencedDeclaration": null,
  1505. "src": "1857:10:2",
  1506. "typeDescriptions": {
  1507. "typeIdentifier": "t_address_payable",
  1508. "typeString": "address payable"
  1509. }
  1510. }
  1511. ],
  1512. "expression": {
  1513. "argumentTypes": [
  1514. {
  1515. "typeIdentifier": "t_address_payable",
  1516. "typeString": "address payable"
  1517. }
  1518. ],
  1519. "id": 678,
  1520. "name": "_addMaintainer",
  1521. "nodeType": "Identifier",
  1522. "overloadedDeclarations": [],
  1523. "referencedDeclaration": 745,
  1524. "src": "1842:14:2",
  1525. "typeDescriptions": {
  1526. "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
  1527. "typeString": "function (address)"
  1528. }
  1529. },
  1530. "id": 681,
  1531. "isConstant": false,
  1532. "isLValue": false,
  1533. "isPure": false,
  1534. "kind": "functionCall",
  1535. "lValueRequested": false,
  1536. "names": [],
  1537. "nodeType": "FunctionCall",
  1538. "src": "1842:26:2",
  1539. "typeDescriptions": {
  1540. "typeIdentifier": "t_tuple$__$",
  1541. "typeString": "tuple()"
  1542. }
  1543. },
  1544. "id": 682,
  1545. "nodeType": "ExpressionStatement",
  1546. "src": "1842:26:2"
  1547. }
  1548. ]
  1549. },
  1550. "documentation": "The constructor is internal (roles are managed by the OpenZeppelin base class).",
  1551. "id": 684,
  1552. "implemented": true,
  1553. "kind": "constructor",
  1554. "modifiers": [],
  1555. "name": "",
  1556. "nodeType": "FunctionDefinition",
  1557. "parameters": {
  1558. "id": 676,
  1559. "nodeType": "ParameterList",
  1560. "parameters": [],
  1561. "src": "1820:2:2"
  1562. },
  1563. "returnParameters": {
  1564. "id": 677,
  1565. "nodeType": "ParameterList",
  1566. "parameters": [],
  1567. "src": "1832:0:2"
  1568. },
  1569. "scope": 762,
  1570. "src": "1808:67:2",
  1571. "stateMutability": "nonpayable",
  1572. "superFunction": null,
  1573. "visibility": "internal"
  1574. },
  1575. {
  1576. "body": {
  1577. "id": 694,
  1578. "nodeType": "Block",
  1579. "src": "2001:61:2",
  1580. "statements": [
  1581. {
  1582. "expression": {
  1583. "argumentTypes": null,
  1584. "arguments": [
  1585. {
  1586. "argumentTypes": null,
  1587. "arguments": [
  1588. {
  1589. "argumentTypes": null,
  1590. "expression": {
  1591. "argumentTypes": null,
  1592. "id": 688,
  1593. "name": "msg",
  1594. "nodeType": "Identifier",
  1595. "overloadedDeclarations": [],
  1596. "referencedDeclaration": 3662,
  1597. "src": "2032:3:2",
  1598. "typeDescriptions": {
  1599. "typeIdentifier": "t_magic_message",
  1600. "typeString": "msg"
  1601. }
  1602. },
  1603. "id": 689,
  1604. "isConstant": false,
  1605. "isLValue": false,
  1606. "isPure": false,
  1607. "lValueRequested": false,
  1608. "memberName": "sender",
  1609. "nodeType": "MemberAccess",
  1610. "referencedDeclaration": null,
  1611. "src": "2032:10:2",
  1612. "typeDescriptions": {
  1613. "typeIdentifier": "t_address_payable",
  1614. "typeString": "address payable"
  1615. }
  1616. }
  1617. ],
  1618. "expression": {
  1619. "argumentTypes": [
  1620. {
  1621. "typeIdentifier": "t_address_payable",
  1622. "typeString": "address payable"
  1623. }
  1624. ],
  1625. "id": 687,
  1626. "name": "isMaintainer",
  1627. "nodeType": "Identifier",
  1628. "overloadedDeclarations": [],
  1629. "referencedDeclaration": 708,
  1630. "src": "2019:12:2",
  1631. "typeDescriptions": {
  1632. "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
  1633. "typeString": "function (address) view returns (bool)"
  1634. }
  1635. },
  1636. "id": 690,
  1637. "isConstant": false,
  1638. "isLValue": false,
  1639. "isPure": false,
  1640. "kind": "functionCall",
  1641. "lValueRequested": false,
  1642. "names": [],
  1643. "nodeType": "FunctionCall",
  1644. "src": "2019:24:2",
  1645. "typeDescriptions": {
  1646. "typeIdentifier": "t_bool",
  1647. "typeString": "bool"
  1648. }
  1649. }
  1650. ],
  1651. "expression": {
  1652. "argumentTypes": [
  1653. {
  1654. "typeIdentifier": "t_bool",
  1655. "typeString": "bool"
  1656. }
  1657. ],
  1658. "id": 686,
  1659. "name": "require",
  1660. "nodeType": "Identifier",
  1661. "overloadedDeclarations": [
  1662. 3665,
  1663. 3666
  1664. ],
  1665. "referencedDeclaration": 3665,
  1666. "src": "2011:7:2",
  1667. "typeDescriptions": {
  1668. "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
  1669. "typeString": "function (bool) pure"
  1670. }
  1671. },
  1672. "id": 691,
  1673. "isConstant": false,
  1674. "isLValue": false,
  1675. "isPure": false,
  1676. "kind": "functionCall",
  1677. "lValueRequested": false,
  1678. "names": [],
  1679. "nodeType": "FunctionCall",
  1680. "src": "2011:33:2",
  1681. "typeDescriptions": {
  1682. "typeIdentifier": "t_tuple$__$",
  1683. "typeString": "tuple()"
  1684. }
  1685. },
  1686. "id": 692,
  1687. "nodeType": "ExpressionStatement",
  1688. "src": "2011:33:2"
  1689. },
  1690. {
  1691. "id": 693,
  1692. "nodeType": "PlaceholderStatement",
  1693. "src": "2054:1:2"
  1694. }
  1695. ]
  1696. },
  1697. "documentation": "Modifier to require maintainer-role for the sender when calling a SC.",
  1698. "id": 695,
  1699. "name": "onlyMaintainer",
  1700. "nodeType": "ModifierDefinition",
  1701. "parameters": {
  1702. "id": 685,
  1703. "nodeType": "ParameterList",
  1704. "parameters": [],
  1705. "src": "1998:2:2"
  1706. },
  1707. "src": "1974:88:2",
  1708. "visibility": "internal"
  1709. },
  1710. {
  1711. "body": {
  1712. "id": 707,
  1713. "nodeType": "Block",
  1714. "src": "2334:48:2",
  1715. "statements": [
  1716. {
  1717. "expression": {
  1718. "argumentTypes": null,
  1719. "arguments": [
  1720. {
  1721. "argumentTypes": null,
  1722. "id": 704,
  1723. "name": "account",
  1724. "nodeType": "Identifier",
  1725. "overloadedDeclarations": [],
  1726. "referencedDeclaration": 697,
  1727. "src": "2367:7:2",
  1728. "typeDescriptions": {
  1729. "typeIdentifier": "t_address",
  1730. "typeString": "address"
  1731. }
  1732. }
  1733. ],
  1734. "expression": {
  1735. "argumentTypes": [
  1736. {
  1737. "typeIdentifier": "t_address",
  1738. "typeString": "address"
  1739. }
  1740. ],
  1741. "expression": {
  1742. "argumentTypes": null,
  1743. "id": 702,
  1744. "name": "maintainers",
  1745. "nodeType": "Identifier",
  1746. "overloadedDeclarations": [],
  1747. "referencedDeclaration": 675,
  1748. "src": "2351:11:2",
  1749. "typeDescriptions": {
  1750. "typeIdentifier": "t_struct$_Role_$2835_storage",
  1751. "typeString": "struct Roles.Role storage ref"
  1752. }
  1753. },
  1754. "id": 703,
  1755. "isConstant": false,
  1756. "isLValue": true,
  1757. "isPure": false,
  1758. "lValueRequested": false,
  1759. "memberName": "has",
  1760. "nodeType": "MemberAccess",
  1761. "referencedDeclaration": 2908,
  1762. "src": "2351:15:2",
  1763. "typeDescriptions": {
  1764. "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$2835_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$2835_storage_ptr_$",
  1765. "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)"
  1766. }
  1767. },
  1768. "id": 705,
  1769. "isConstant": false,
  1770. "isLValue": false,
  1771. "isPure": false,
  1772. "kind": "functionCall",
  1773. "lValueRequested": false,
  1774. "names": [],
  1775. "nodeType": "FunctionCall",
  1776. "src": "2351:24:2",
  1777. "typeDescriptions": {
  1778. "typeIdentifier": "t_bool",
  1779. "typeString": "bool"
  1780. }
  1781. },
  1782. "functionReturnParameters": 701,
  1783. "id": 706,
  1784. "nodeType": "Return",
  1785. "src": "2344:31:2"
  1786. }
  1787. ]
  1788. },
  1789. "documentation": "Check if the given address is currently a maintainer.\n * @param account The account to check.\n@return `true` if the account is maintainer, otherwise `false`.",
  1790. "id": 708,
  1791. "implemented": true,
  1792. "kind": "function",
  1793. "modifiers": [],
  1794. "name": "isMaintainer",
  1795. "nodeType": "FunctionDefinition",
  1796. "parameters": {
  1797. "id": 698,
  1798. "nodeType": "ParameterList",
  1799. "parameters": [
  1800. {
  1801. "constant": false,
  1802. "id": 697,
  1803. "name": "account",
  1804. "nodeType": "VariableDeclaration",
  1805. "scope": 708,
  1806. "src": "2290:15:2",
  1807. "stateVariable": false,
  1808. "storageLocation": "default",
  1809. "typeDescriptions": {
  1810. "typeIdentifier": "t_address",
  1811. "typeString": "address"
  1812. },
  1813. "typeName": {
  1814. "id": 696,
  1815. "name": "address",
  1816. "nodeType": "ElementaryTypeName",
  1817. "src": "2290:7:2",
  1818. "stateMutability": "nonpayable",
  1819. "typeDescriptions": {
  1820. "typeIdentifier": "t_address",
  1821. "typeString": "address"
  1822. }
  1823. },
  1824. "value": null,
  1825. "visibility": "internal"
  1826. }
  1827. ],
  1828. "src": "2289:17:2"
  1829. },
  1830. "returnParameters": {
  1831. "id": 701,
  1832. "nodeType": "ParameterList",
  1833. "parameters": [
  1834. {
  1835. "constant": false,
  1836. "id": 700,
  1837. "name": "",
  1838. "nodeType": "VariableDeclaration",
  1839. "scope": 708,
  1840. "src": "2328:4:2",
  1841. "stateVariable": false,
  1842. "storageLocation": "default",
  1843. "typeDescriptions": {
  1844. "typeIdentifier": "t_bool",
  1845. "typeString": "bool"
  1846. },
  1847. "typeName": {
  1848. "id": 699,
  1849. "name": "bool",
  1850. "nodeType": "ElementaryTypeName",
  1851. "src": "2328:4:2",
  1852. "typeDescriptions": {
  1853. "typeIdentifier": "t_bool",
  1854. "typeString": "bool"
  1855. }
  1856. },
  1857. "value": null,
  1858. "visibility": "internal"
  1859. }
  1860. ],
  1861. "src": "2327:6:2"
  1862. },
  1863. "scope": 762,
  1864. "src": "2267:115:2",
  1865. "stateMutability": "view",
  1866. "superFunction": null,
  1867. "visibility": "public"
  1868. },
  1869. {
  1870. "body": {
  1871. "id": 719,
  1872. "nodeType": "Block",
  1873. "src": "2595:40:2",
  1874. "statements": [
  1875. {
  1876. "expression": {
  1877. "argumentTypes": null,
  1878. "arguments": [
  1879. {
  1880. "argumentTypes": null,
  1881. "id": 716,
  1882. "name": "account",
  1883. "nodeType": "Identifier",
  1884. "overloadedDeclarations": [],
  1885. "referencedDeclaration": 710,
  1886. "src": "2620:7:2",
  1887. "typeDescriptions": {
  1888. "typeIdentifier": "t_address",
  1889. "typeString": "address"
  1890. }
  1891. }
  1892. ],
  1893. "expression": {
  1894. "argumentTypes": [
  1895. {
  1896. "typeIdentifier": "t_address",
  1897. "typeString": "address"
  1898. }
  1899. ],
  1900. "id": 715,
  1901. "name": "_addMaintainer",
  1902. "nodeType": "Identifier",
  1903. "overloadedDeclarations": [],
  1904. "referencedDeclaration": 745,
  1905. "src": "2605:14:2",
  1906. "typeDescriptions": {
  1907. "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
  1908. "typeString": "function (address)"
  1909. }
  1910. },
  1911. "id": 717,
  1912. "isConstant": false,
  1913. "isLValue": false,
  1914. "isPure": false,
  1915. "kind": "functionCall",
  1916. "lValueRequested": false,
  1917. "names": [],
  1918. "nodeType": "FunctionCall",
  1919. "src": "2605:23:2",
  1920. "typeDescriptions": {
  1921. "typeIdentifier": "t_tuple$__$",
  1922. "typeString": "tuple()"
  1923. }
  1924. },
  1925. "id": 718,
  1926. "nodeType": "ExpressionStatement",
  1927. "src": "2605:23:2"
  1928. }
  1929. ]
  1930. },
  1931. "documentation": "Add a new maintainer to the list of maintainers.\n * @param account The account to grant maintainer rights to.",
  1932. "id": 720,
  1933. "implemented": true,
  1934. "kind": "function",
  1935. "modifiers": [
  1936. {
  1937. "arguments": null,
  1938. "id": 713,
  1939. "modifierName": {
  1940. "argumentTypes": null,
  1941. "id": 712,
  1942. "name": "onlyMaintainer",
  1943. "nodeType": "Identifier",
  1944. "overloadedDeclarations": [],
  1945. "referencedDeclaration": 695,
  1946. "src": "2580:14:2",
  1947. "typeDescriptions": {
  1948. "typeIdentifier": "t_modifier$__$",
  1949. "typeString": "modifier ()"
  1950. }
  1951. },
  1952. "nodeType": "ModifierInvocation",
  1953. "src": "2580:14:2"
  1954. }
  1955. ],
  1956. "name": "addMaintainer",
  1957. "nodeType": "FunctionDefinition",
  1958. "parameters": {
  1959. "id": 711,
  1960. "nodeType": "ParameterList",
  1961. "parameters": [
  1962. {
  1963. "constant": false,
  1964. "id": 710,
  1965. "name": "account",
  1966. "nodeType": "VariableDeclaration",
  1967. "scope": 720,
  1968. "src": "2556:15:2",
  1969. "stateVariable": false,
  1970. "storageLocation": "default",
  1971. "typeDescriptions": {
  1972. "typeIdentifier": "t_address",
  1973. "typeString": "address"
  1974. },
  1975. "typeName": {
  1976. "id": 709,
  1977. "name": "address",
  1978. "nodeType": "ElementaryTypeName",
  1979. "src": "2556:7:2",
  1980. "stateMutability": "nonpayable",
  1981. "typeDescriptions": {
  1982. "typeIdentifier": "t_address",
  1983. "typeString": "address"
  1984. }
  1985. },
  1986. "value": null,
  1987. "visibility": "internal"
  1988. }
  1989. ],
  1990. "src": "2555:17:2"
  1991. },
  1992. "returnParameters": {
  1993. "id": 714,
  1994. "nodeType": "ParameterList",
  1995. "parameters": [],
  1996. "src": "2595:0:2"
  1997. },
  1998. "scope": 762,
  1999. "src": "2532:103:2",
  2000. "stateMutability": "nonpayable",
  2001. "superFunction": null,
  2002. "visibility": "public"
  2003. },
  2004. {
  2005. "body": {
  2006. "id": 728,
  2007. "nodeType": "Block",
  2008. "src": "2731:46:2",
  2009. "statements": [
  2010. {
  2011. "expression": {
  2012. "argumentTypes": null,
  2013. "arguments": [
  2014. {
  2015. "argumentTypes": null,
  2016. "expression": {
  2017. "argumentTypes": null,
  2018. "id": 724,
  2019. "name": "msg",
  2020. "nodeType": "Identifier",
  2021. "overloadedDeclarations": [],
  2022. "referencedDeclaration": 3662,
  2023. "src": "2759:3:2",
  2024. "typeDescriptions": {
  2025. "typeIdentifier": "t_magic_message",
  2026. "typeString": "msg"
  2027. }
  2028. },
  2029. "id": 725,
  2030. "isConstant": false,
  2031. "isLValue": false,
  2032. "isPure": false,
  2033. "lValueRequested": false,
  2034. "memberName": "sender",
  2035. "nodeType": "MemberAccess",
  2036. "referencedDeclaration": null,
  2037. "src": "2759:10:2",
  2038. "typeDescriptions": {
  2039. "typeIdentifier": "t_address_payable",
  2040. "typeString": "address payable"
  2041. }
  2042. }
  2043. ],
  2044. "expression": {
  2045. "argumentTypes": [
  2046. {
  2047. "typeIdentifier": "t_address_payable",
  2048. "typeString": "address payable"
  2049. }
  2050. ],
  2051. "id": 723,
  2052. "name": "_removeMaintainer",
  2053. "nodeType": "Identifier",
  2054. "overloadedDeclarations": [],
  2055. "referencedDeclaration": 761,
  2056. "src": "2741:17:2",
  2057. "typeDescriptions": {
  2058. "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
  2059. "typeString": "function (address)"
  2060. }
  2061. },
  2062. "id": 726,
  2063. "isConstant": false,
  2064. "isLValue": false,
  2065. "isPure": false,
  2066. "kind": "functionCall",
  2067. "lValueRequested": false,
  2068. "names": [],
  2069. "nodeType": "FunctionCall",
  2070. "src": "2741:29:2",
  2071. "typeDescriptions": {
  2072. "typeIdentifier": "t_tuple$__$",
  2073. "typeString": "tuple()"
  2074. }
  2075. },
  2076. "id": 727,
  2077. "nodeType": "ExpressionStatement",
  2078. "src": "2741:29:2"
  2079. }
  2080. ]
  2081. },
  2082. "documentation": "Give away maintainer rights.",
  2083. "id": 729,
  2084. "implemented": true,
  2085. "kind": "function",
  2086. "modifiers": [],
  2087. "name": "renounceMaintainer",
  2088. "nodeType": "FunctionDefinition",
  2089. "parameters": {
  2090. "id": 721,
  2091. "nodeType": "ParameterList",
  2092. "parameters": [],
  2093. "src": "2721:2:2"
  2094. },
  2095. "returnParameters": {
  2096. "id": 722,
  2097. "nodeType": "ParameterList",
  2098. "parameters": [],
  2099. "src": "2731:0:2"
  2100. },
  2101. "scope": 762,
  2102. "src": "2693:84:2",
  2103. "stateMutability": "nonpayable",
  2104. "superFunction": null,
  2105. "visibility": "public"
  2106. },
  2107. {
  2108. "body": {
  2109. "id": 744,
  2110. "nodeType": "Block",
  2111. "src": "2834:80:2",
  2112. "statements": [
  2113. {
  2114. "expression": {
  2115. "argumentTypes": null,
  2116. "arguments": [
  2117. {
  2118. "argumentTypes": null,
  2119. "id": 737,
  2120. "name": "account",
  2121. "nodeType": "Identifier",
  2122. "overloadedDeclarations": [],
  2123. "referencedDeclaration": 731,
  2124. "src": "2860:7:2",
  2125. "typeDescriptions": {
  2126. "typeIdentifier": "t_address",
  2127. "typeString": "address"
  2128. }
  2129. }
  2130. ],
  2131. "expression": {
  2132. "argumentTypes": [
  2133. {
  2134. "typeIdentifier": "t_address",
  2135. "typeString": "address"
  2136. }
  2137. ],
  2138. "expression": {
  2139. "argumentTypes": null,
  2140. "id": 734,
  2141. "name": "maintainers",
  2142. "nodeType": "Identifier",
  2143. "overloadedDeclarations": [],
  2144. "referencedDeclaration": 675,
  2145. "src": "2844:11:2",
  2146. "typeDescriptions": {
  2147. "typeIdentifier": "t_struct$_Role_$2835_storage",
  2148. "typeString": "struct Roles.Role storage ref"
  2149. }
  2150. },
  2151. "id": 736,
  2152. "isConstant": false,
  2153. "isLValue": true,
  2154. "isPure": false,
  2155. "lValueRequested": false,
  2156. "memberName": "add",
  2157. "nodeType": "MemberAccess",
  2158. "referencedDeclaration": 2860,
  2159. "src": "2844:15:2",
  2160. "typeDescriptions": {
  2161. "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$2835_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$2835_storage_ptr_$",
  2162. "typeString": "function (struct Roles.Role storage pointer,address)"
  2163. }
  2164. },
  2165. "id": 738,
  2166. "isConstant": false,
  2167. "isLValue": false,
  2168. "isPure": false,
  2169. "kind": "functionCall",
  2170. "lValueRequested": false,
  2171. "names": [],
  2172. "nodeType": "FunctionCall",
  2173. "src": "2844:24:2",
  2174. "typeDescriptions": {
  2175. "typeIdentifier": "t_tuple$__$",
  2176. "typeString": "tuple()"
  2177. }
  2178. },
  2179. "id": 739,
  2180. "nodeType": "ExpressionStatement",
  2181. "src": "2844:24:2"
  2182. },
  2183. {
  2184. "eventCall": {
  2185. "argumentTypes": null,
  2186. "arguments": [
  2187. {
  2188. "argumentTypes": null,
  2189. "id": 741,
  2190. "name": "account",
  2191. "nodeType": "Identifier",
  2192. "overloadedDeclarations": [],
  2193. "referencedDeclaration": 731,
  2194. "src": "2899:7:2",
  2195. "typeDescriptions": {
  2196. "typeIdentifier": "t_address",
  2197. "typeString": "address"
  2198. }
  2199. }
  2200. ],
  2201. "expression": {
  2202. "argumentTypes": [
  2203. {
  2204. "typeIdentifier": "t_address",
  2205. "typeString": "address"
  2206. }
  2207. ],
  2208. "id": 740,
  2209. "name": "MaintainerAdded",
  2210. "nodeType": "Identifier",
  2211. "overloadedDeclarations": [],
  2212. "referencedDeclaration": 669,
  2213. "src": "2883:15:2",
  2214. "typeDescriptions": {
  2215. "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
  2216. "typeString": "function (address)"
  2217. }
  2218. },
  2219. "id": 742,
  2220. "isConstant": false,
  2221. "isLValue": false,
  2222. "isPure": false,
  2223. "kind": "functionCall",
  2224. "lValueRequested": false,
  2225. "names": [],
  2226. "nodeType": "FunctionCall",
  2227. "src": "2883:24:2",
  2228. "typeDescriptions": {
  2229. "typeIdentifier": "t_tuple$__$",
  2230. "typeString": "tuple()"
  2231. }
  2232. },
  2233. "id": 743,
  2234. "nodeType": "EmitStatement",
  2235. "src": "2878:29:2"
  2236. }
  2237. ]
  2238. },
  2239. "documentation": null,
  2240. "id": 745,
  2241. "implemented": true,
  2242. "kind": "function",
  2243. "modifiers": [],
  2244. "name": "_addMaintainer",
  2245. "nodeType": "FunctionDefinition",
  2246. "parameters": {
  2247. "id": 732,
  2248. "nodeType": "ParameterList",
  2249. "parameters": [
  2250. {
  2251. "constant": false,
  2252. "id": 731,
  2253. "name": "account",
  2254. "nodeType": "VariableDeclaration",
  2255. "scope": 745,
  2256. "src": "2808:15:2",
  2257. "stateVariable": false,
  2258. "storageLocation": "default",
  2259. "typeDescriptions": {
  2260. "typeIdentifier": "t_address",
  2261. "typeString": "address"
  2262. },
  2263. "typeName": {
  2264. "id": 730,
  2265. "name": "address",
  2266. "nodeType": "ElementaryTypeName",
  2267. "src": "2808:7:2",
  2268. "stateMutability": "nonpayable",
  2269. "typeDescriptions": {
  2270. "typeIdentifier": "t_address",
  2271. "typeString": "address"
  2272. }
  2273. },
  2274. "value": null,
  2275. "visibility": "internal"
  2276. }
  2277. ],
  2278. "src": "2807:17:2"
  2279. },
  2280. "returnParameters": {
  2281. "id": 733,
  2282. "nodeType": "ParameterList",
  2283. "parameters": [],
  2284. "src": "2834:0:2"
  2285. },
  2286. "scope": 762,
  2287. "src": "2783:131:2",
  2288. "stateMutability": "nonpayable",
  2289. "superFunction": null,
  2290. "visibility": "internal"
  2291. },
  2292. {
  2293. "body": {
  2294. "id": 760,
  2295. "nodeType": "Block",
  2296. "src": "2974:85:2",
  2297. "statements": [
  2298. {
  2299. "expression": {
  2300. "argumentTypes": null,
  2301. "arguments": [
  2302. {
  2303. "argumentTypes": null,
  2304. "id": 753,
  2305. "name": "account",
  2306. "nodeType": "Identifier",
  2307. "overloadedDeclarations": [],
  2308. "referencedDeclaration": 747,
  2309. "src": "3003:7:2",
  2310. "typeDescriptions": {
  2311. "typeIdentifier": "t_address",
  2312. "typeString": "address"
  2313. }
  2314. }
  2315. ],
  2316. "expression": {
  2317. "argumentTypes": [
  2318. {
  2319. "typeIdentifier": "t_address",
  2320. "typeString": "address"
  2321. }
  2322. ],
  2323. "expression": {
  2324. "argumentTypes": null,
  2325. "id": 750,
  2326. "name": "maintainers",
  2327. "nodeType": "Identifier",
  2328. "overloadedDeclarations": [],
  2329. "referencedDeclaration": 675,
  2330. "src": "2984:11:2",
  2331. "typeDescriptions": {
  2332. "typeIdentifier": "t_struct$_Role_$2835_storage",
  2333. "typeString": "struct Roles.Role storage ref"
  2334. }
  2335. },
  2336. "id": 752,
  2337. "isConstant": false,
  2338. "isLValue": true,
  2339. "isPure": false,
  2340. "lValueRequested": false,
  2341. "memberName": "remove",
  2342. "nodeType": "MemberAccess",
  2343. "referencedDeclaration": 2884,
  2344. "src": "2984:18:2",
  2345. "typeDescriptions": {
  2346. "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$2835_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$2835_storage_ptr_$",
  2347. "typeString": "function (struct Roles.Role storage pointer,address)"
  2348. }
  2349. },
  2350. "id": 754,
  2351. "isConstant": false,
  2352. "isLValue": false,
  2353. "isPure": false,
  2354. "kind": "functionCall",
  2355. "lValueRequested": false,
  2356. "names": [],
  2357. "nodeType": "FunctionCall",
  2358. "src": "2984:27:2",
  2359. "typeDescriptions": {
  2360. "typeIdentifier": "t_tuple$__$",
  2361. "typeString": "tuple()"
  2362. }
  2363. },
  2364. "id": 755,
  2365. "nodeType": "ExpressionStatement",
  2366. "src": "2984:27:2"
  2367. },
  2368. {
  2369. "eventCall": {
  2370. "argumentTypes": null,
  2371. "arguments": [
  2372. {
  2373. "argumentTypes": null,
  2374. "id": 757,
  2375. "name": "account",
  2376. "nodeType": "Identifier",
  2377. "overloadedDeclarations": [],
  2378. "referencedDeclaration": 747,
  2379. "src": "3044:7:2",
  2380. "typeDescriptions": {
  2381. "typeIdentifier": "t_address",
  2382. "typeString": "address"
  2383. }
  2384. }
  2385. ],
  2386. "expression": {
  2387. "argumentTypes": [
  2388. {
  2389. "typeIdentifier": "t_address",
  2390. "typeString": "address"
  2391. }
  2392. ],
  2393. "id": 756,
  2394. "name": "MaintainerRemoved",
  2395. "nodeType": "Identifier",
  2396. "overloadedDeclarations": [],
  2397. "referencedDeclaration": 673,
  2398. "src": "3026:17:2",
  2399. "typeDescriptions": {
  2400. "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
  2401. "typeString": "function (address)"
  2402. }
  2403. },
  2404. "id": 758,
  2405. "isConstant": false,
  2406. "isLValue": false,
  2407. "isPure": false,
  2408. "kind": "functionCall",
  2409. "lValueRequested": false,
  2410. "names": [],
  2411. "nodeType": "FunctionCall",
  2412. "src": "3026:26:2",
  2413. "typeDescriptions": {
  2414. "typeIdentifier": "t_tuple$__$",
  2415. "typeString": "tuple()"
  2416. }
  2417. },
  2418. "id": 759,
  2419. "nodeType": "EmitStatement",
  2420. "src": "3021:31:2"
  2421. }
  2422. ]
  2423. },
  2424. "documentation": null,
  2425. "id": 761,
  2426. "implemented": true,
  2427. "kind": "function",
  2428. "modifiers": [],
  2429. "name": "_removeMaintainer",
  2430. "nodeType": "FunctionDefinition",
  2431. "parameters": {
  2432. "id": 748,
  2433. "nodeType": "ParameterList",
  2434. "parameters": [
  2435. {
  2436. "constant": false,
  2437. "id": 747,
  2438. "name": "account",
  2439. "nodeType": "VariableDeclaration",
  2440. "scope": 761,
  2441. "src": "2948:15:2",
  2442. "stateVariable": false,
  2443. "storageLocation": "default",
  2444. "typeDescriptions": {
  2445. "typeIdentifier": "t_address",
  2446. "typeString": "address"
  2447. },
  2448. "typeName": {
  2449. "id": 746,
  2450. "name": "address",
  2451. "nodeType": "ElementaryTypeName",
  2452. "src": "2948:7:2",
  2453. "stateMutability": "nonpayable",
  2454. "typeDescriptions": {
  2455. "typeIdentifier": "t_address",
  2456. "typeString": "address"
  2457. }
  2458. },
  2459. "value": null,
  2460. "visibility": "internal"
  2461. }
  2462. ],
  2463. "src": "2947:17:2"
  2464. },
  2465. "returnParameters": {
  2466. "id": 749,
  2467. "nodeType": "ParameterList",
  2468. "parameters": [],
  2469. "src": "2974:0:2"
  2470. },
  2471. "scope": 762,
  2472. "src": "2920:139:2",
  2473. "stateMutability": "nonpayable",
  2474. "superFunction": null,
  2475. "visibility": "internal"
  2476. }
  2477. ],
  2478. "scope": 763,
  2479. "src": "1153:1908:2"
  2480. }
  2481. ],
  2482. "src": "810:2252:2"
  2483. },
  2484. "compiler": {
  2485. "name": "solc",
  2486. "version": "0.5.2+commit.1df8f40c.Emscripten.clang"
  2487. },
  2488. "networks": {},
  2489. "schemaVersion": "3.0.16",
  2490. "updatedAt": "2019-10-23T07:58:23.254Z",
  2491. "devdoc": {
  2492. "methods": {
  2493. "addMaintainer(address)": {
  2494. "params": {
  2495. "account": "The account to grant maintainer rights to."
  2496. }
  2497. },
  2498. "isMaintainer(address)": {
  2499. "params": {
  2500. "account": "The account to check."
  2501. },
  2502. "return": "`true` if the account is maintainer, otherwise `false`."
  2503. }
  2504. }
  2505. },
  2506. "userdoc": {
  2507. "methods": {
  2508. "addMaintainer(address)": {
  2509. "notice": "Add a new maintainer to the list of maintainers."
  2510. },
  2511. "constructor": "The constructor is internal (roles are managed by the OpenZeppelin base class).",
  2512. "isMaintainer(address)": {
  2513. "notice": "Check if the given address is currently a maintainer."
  2514. },
  2515. "renounceMaintainer()": {
  2516. "notice": "Give away maintainer rights."
  2517. }
  2518. },
  2519. "notice": "XBR Network (and XBR Network Proxies) SCs inherit from this base contract to manage network administration and maintenance via Role-based Access Control (RBAC). The implementation for management comes from the OpenZeppelin RBAC library."
  2520. }
  2521. }