Files
openzeppelin-contracts/build/contracts/RBACMock.json
2018-08-23 11:45:35 -03:00

2960 lines
140 KiB
JSON

{
"contractName": "RBACMock",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "addr",
"type": "address"
},
{
"name": "roleName",
"type": "string"
}
],
"name": "checkRole",
"outputs": [],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "addr",
"type": "address"
},
{
"name": "roleName",
"type": "string"
}
],
"name": "hasRole",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "addr",
"type": "address"
},
{
"name": "roleName",
"type": "string"
}
],
"name": "adminRemoveRole",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "addr",
"type": "address"
},
{
"name": "roleName",
"type": "string"
}
],
"name": "adminAddRole",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "contractName",
"type": "string"
},
{
"name": "migrationId",
"type": "string"
}
],
"name": "isMigrated",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "initialAdmin",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "ROLE_ADMIN",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "_advisors",
"type": "address[]"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "contractName",
"type": "string"
},
{
"indexed": false,
"name": "migrationId",
"type": "string"
}
],
"name": "Migrated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "addr",
"type": "address"
},
{
"indexed": false,
"name": "roleName",
"type": "string"
}
],
"name": "RoleAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "addr",
"type": "address"
},
{
"indexed": false,
"name": "roleName",
"type": "string"
}
],
"name": "RoleRemoved",
"type": "event"
},
{
"constant": true,
"inputs": [],
"name": "onlyAdminsCanDoThis",
"outputs": [],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "onlyAdvisorsCanDoThis",
"outputs": [],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "eitherAdminOrAdvisorCanDoThis",
"outputs": [],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "nobodyCanDoThis",
"outputs": [],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_addr",
"type": "address"
}
],
"name": "removeAdvisor",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60806040523480156200001157600080fd5b50604051620017ab380380620017ab83398101806040528101908080518201929190505050600062000057336200013464010000000002620009db176401000000009004565b620000a7336040805190810160405280600781526020017f61647669736f72000000000000000000000000000000000000000000000000008152506200041c640100000000026401000000009004565b600090505b81518110156200012c576200011e8282815181101515620000c957fe5b906020019060200201516040805190810160405280600781526020017f61647669736f72000000000000000000000000000000000000000000000000008152506200041c640100000000026401000000009004565b8080600101915050620000ac565b5050620006d0565b6040805190810160405280600d81526020017f524241435769746841646d696e000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e30000000000000000000000000000000000000000000000000000000815250620001bb828262000582640100000000026401000000009004565b151515620001c857600080fd5b62000218836040805190810160405280600581526020017f61646d696e0000000000000000000000000000000000000000000000000000008152506200041c640100000000026401000000009004565b7fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b838110156200028157808201518184015260208101905062000264565b50505050905090810190601f168015620002af5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015620002ea578082015181840152602081019050620002cd565b50505050905090810190601f168015620003185780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1600180836040518082805190602001908083835b6020831015156200036257805182526020820191506020810190506020830392506200033b565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b602083101515620003cd5780518252602082019150602081019050602083039250620003a6565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff021916908315150217905550505050565b620004ab826000836040518082805190602001908083835b6020831015156200045b578051825260208201915060208101905060208303925062000434565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020620006726401000000000262001041179091906401000000009004565b7fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b7004898282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156200054257808201518184015260208101905062000525565b50505050905090810190601f168015620005705780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b60006001836040518082805190602001908083835b602083101515620005be578051825260208201915060208101905060208303925062000597565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b60208310151562000629578051825260208201915060208101905060208303925062000602565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6110cb80620006e06000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630988ca8c146100bf5780630eeccb841461014857806316aabcbd1461018b578063217fe6c6146101a2578063420d0ba4146102435780634fd3d1251461025a57806363a5bc711461027157806388cee87e14610288578063b25fa92c14610311578063c0bac1a81461039a578063c4d66de814610461578063d391014b146104a4575b600080fd5b3480156100cb57600080fd5b50610146600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610534565b005b34801561015457600080fd5b50610189600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105b5565b005b34801561019757600080fd5b506101a0610675565b005b3480156101ae57600080fd5b50610229600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506106b8565b604051808215151515815260200191505060405180910390f35b34801561024f57600080fd5b5061025861073f565b005b34801561026657600080fd5b5061026f610782565b005b34801561027d57600080fd5b506102866107c3565b005b34801561029457600080fd5b5061030f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610855565b005b34801561031d57600080fd5b50610398600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506108a2565b005b3480156103a657600080fd5b50610447600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506108ef565b604051808215151515815260200191505060405180910390f35b34801561046d57600080fd5b506104a2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109db565b005b3480156104b057600080fd5b506104b9610c96565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104f95780820151818401526020810190506104de565b50505050905090810190601f1680156105265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105b1826000836040518082805190602001908083835b602083101515610570578051825260208201915060208101905060208303925061054b565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020610ccf90919063ffffffff16565b5050565b6105f4336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610534565b610633816040805190810160405280600781526020017f61647669736f7200000000000000000000000000000000000000000000000000815250610534565b610672816040805190810160405280600781526020017f61647669736f7200000000000000000000000000000000000000000000000000815250610ce8565b50565b6040805190810160405280600781526020017f61647669736f72000000000000000000000000000000000000000000000000008152506106b53382610534565b50565b6000610737836000846040518082805190602001908083835b6020831015156106f657805182526020820191506020810190506020830392506106d1565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020610e3990919063ffffffff16565b905092915050565b6040805190810160405280600781526020017f756e6b6e6f776e0000000000000000000000000000000000000000000000000081525061077f3382610534565b50565b6107c1336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610534565b565b610802336040805190810160405280600581526020017f61646d696e0000000000000000000000000000000000000000000000000000008152506106b8565b806108485750610847336040805190810160405280600781526020017f61647669736f72000000000000000000000000000000000000000000000000008152506106b8565b5b151561085357600080fd5b565b610894336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610534565b61089e8282610ce8565b5050565b6108e1336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610534565b6108eb8282610e92565b5050565b60006001836040518082805190602001908083835b6020831015156109295780518252602082019150602081019050602083039250610904565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b602083101515610992578051825260208201915060208101905060208303925061096d565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b6040805190810160405280600d81526020017f524241435769746841646d696e000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e30000000000000000000000000000000000000000000000000000000815250610a5182826108ef565b151515610a5d57600080fd5b610a9c836040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610e92565b7fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610b03578082015181840152602081019050610ae8565b50505050905090810190601f168015610b305780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610b69578082015181840152602081019050610b4e565b50505050905090810190601f168015610b965780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1600180836040518082805190602001908083835b602083101515610bde5780518252602082019150602081019050602083039250610bb9565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b602083101515610c475780518252602082019150602081019050602083039250610c22565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff021916908315150217905550505050565b6040805190810160405280600581526020017f61646d696e00000000000000000000000000000000000000000000000000000081525081565b610cd98282610e39565b1515610ce457600080fd5b5050565b610d65826000836040518082805190602001908083835b602083101515610d245780518252602082019150602081019050602083039250610cff565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020610fe390919063ffffffff16565b7fd211483f91fc6eff862467f8de606587a30c8fc9981056f051b897a418df803a8282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610dfa578082015181840152602081019050610ddf565b50505050905090810190601f168015610e275780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b610f0f826000836040518082805190602001908083835b602083101515610ece5780518252602082019150602081019050602083039250610ea9565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902061104190919063ffffffff16565b7fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b7004898282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610fa4578082015181840152602081019050610f89565b50505050905090810190601f168015610fd15780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050505600a165627a7a72305820a6660616c75c1c3c51b09fc49eaab3cca7c55ebd2ef467853e5338fef525ad390029",
"deployedBytecode": "0x6080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630988ca8c146100bf5780630eeccb841461014857806316aabcbd1461018b578063217fe6c6146101a2578063420d0ba4146102435780634fd3d1251461025a57806363a5bc711461027157806388cee87e14610288578063b25fa92c14610311578063c0bac1a81461039a578063c4d66de814610461578063d391014b146104a4575b600080fd5b3480156100cb57600080fd5b50610146600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610534565b005b34801561015457600080fd5b50610189600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105b5565b005b34801561019757600080fd5b506101a0610675565b005b3480156101ae57600080fd5b50610229600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506106b8565b604051808215151515815260200191505060405180910390f35b34801561024f57600080fd5b5061025861073f565b005b34801561026657600080fd5b5061026f610782565b005b34801561027d57600080fd5b506102866107c3565b005b34801561029457600080fd5b5061030f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610855565b005b34801561031d57600080fd5b50610398600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506108a2565b005b3480156103a657600080fd5b50610447600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506108ef565b604051808215151515815260200191505060405180910390f35b34801561046d57600080fd5b506104a2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109db565b005b3480156104b057600080fd5b506104b9610c96565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104f95780820151818401526020810190506104de565b50505050905090810190601f1680156105265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105b1826000836040518082805190602001908083835b602083101515610570578051825260208201915060208101905060208303925061054b565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020610ccf90919063ffffffff16565b5050565b6105f4336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610534565b610633816040805190810160405280600781526020017f61647669736f7200000000000000000000000000000000000000000000000000815250610534565b610672816040805190810160405280600781526020017f61647669736f7200000000000000000000000000000000000000000000000000815250610ce8565b50565b6040805190810160405280600781526020017f61647669736f72000000000000000000000000000000000000000000000000008152506106b53382610534565b50565b6000610737836000846040518082805190602001908083835b6020831015156106f657805182526020820191506020810190506020830392506106d1565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020610e3990919063ffffffff16565b905092915050565b6040805190810160405280600781526020017f756e6b6e6f776e0000000000000000000000000000000000000000000000000081525061077f3382610534565b50565b6107c1336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610534565b565b610802336040805190810160405280600581526020017f61646d696e0000000000000000000000000000000000000000000000000000008152506106b8565b806108485750610847336040805190810160405280600781526020017f61647669736f72000000000000000000000000000000000000000000000000008152506106b8565b5b151561085357600080fd5b565b610894336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610534565b61089e8282610ce8565b5050565b6108e1336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610534565b6108eb8282610e92565b5050565b60006001836040518082805190602001908083835b6020831015156109295780518252602082019150602081019050602083039250610904565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b602083101515610992578051825260208201915060208101905060208303925061096d565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b6040805190810160405280600d81526020017f524241435769746841646d696e000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e30000000000000000000000000000000000000000000000000000000815250610a5182826108ef565b151515610a5d57600080fd5b610a9c836040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610e92565b7fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610b03578082015181840152602081019050610ae8565b50505050905090810190601f168015610b305780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610b69578082015181840152602081019050610b4e565b50505050905090810190601f168015610b965780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1600180836040518082805190602001908083835b602083101515610bde5780518252602082019150602081019050602083039250610bb9565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b602083101515610c475780518252602082019150602081019050602083039250610c22565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff021916908315150217905550505050565b6040805190810160405280600581526020017f61646d696e00000000000000000000000000000000000000000000000000000081525081565b610cd98282610e39565b1515610ce457600080fd5b5050565b610d65826000836040518082805190602001908083835b602083101515610d245780518252602082019150602081019050602083039250610cff565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020610fe390919063ffffffff16565b7fd211483f91fc6eff862467f8de606587a30c8fc9981056f051b897a418df803a8282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610dfa578082015181840152602081019050610ddf565b50505050905090810190601f168015610e275780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b610f0f826000836040518082805190602001908083835b602083101515610ece5780518252602082019150602081019050602083039250610ea9565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902061104190919063ffffffff16565b7fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b7004898282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610fa4578082015181840152602081019050610f89565b50505050905090810190601f168015610fd15780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050505600a165627a7a72305820a6660616c75c1c3c51b09fc49eaab3cca7c55ebd2ef467853e5338fef525ad390029",
"sourceMap": "74:1146:20:-;;;308:242;8:9:-1;5:2;;;30:1;27;20:12;5:2;308:242:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;454:9;366:36;391:10;366:24;;;;;:36;;;:::i;:::-;409:33;417:10;429:12;;;;;;;;;;;;;;;;;;409:7;;;:33;;;:::i;:::-;466:1;454:13;;449:97;473:9;:16;469:1;:20;449:97;;;504:35;512:9;522:1;512:12;;;;;;;;;;;;;;;;;;526;;;;;;;;;;;;;;;;;;504:7;;;:35;;;:::i;:::-;491:3;;;;;;;449:97;;;308:242;;74:1146;;653:143:27;1004:223:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:37;1094:12;1108:11;1083:10;;;:37;;;:::i;:::-;1082:38;1074:47;;;;;;;;758:33:27;766:12;780:10;;;;;;;;;;;;;;;;;;758:7;;;:33;;;:::i;:::-;1139:35:52;1148:12;1162:11;1139:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1139:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1139:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1218:4;1180:8;1189:12;1180:22;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1180:22:52;;;;;;;;;;;;;;;;;;;;;1203:11;1180:35;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1180:35:52;;;;;;;;;;;;;;;;;;;;;;:42;;;;;;;;;;;;;;;;;;653:143:27;;;:::o;1439:135:26:-;1508:25;1528:4;1508:5;1514:8;1508:15;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1508:15:26;;;;;;;;;;;;;;;;;;;;;:19;;;;;;:25;;;;;:::i;:::-;1544;1554:4;1560:8;1544:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1544:25:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1439:135;;:::o;1950:140:52:-;2031:4;2050:8;2059:12;2050:22;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2050:22:52;;;;;;;;;;;;;;;;;;;;;2073:11;2050:35;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2050:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2043:42;;1950:140;;;;:::o;326:96:28:-;413:4;393;:11;;:17;405:4;393:17;;;;;;;;;;;;;;;;:24;;;;;;;;;;;;;;;;;;326:96;;:::o;74:1146:20:-;;;;;;;",
"deployedSourceMap": "74:1146:20:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;941:110:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;941:110:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;944:274:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;944:274:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;632:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;632:89:20;;;;;;1189:132:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1189:132:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;822:80:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;822:80:20;;;;;;554:74;;8:9:-1;5:2;;;30:1;27;20:12;5:2;554:74:20;;;;;;725:93;;8:9:-1;5:2;;;30:1;27;20:12;5:2;725:93:20;;;;;;1151:120:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1151:120:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;914:114;;8:9:-1;5:2;;;30:1;27;20:12;5:2;914:114:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1950:140:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1950:140:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;653:143:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;653:143:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;391:43;;8:9:-1;5:2;;;30:1;27;20:12;5:2;391:43:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;391:43:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;941:110:26;1019:27;1041:4;1019:5;1025:8;1019:15;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1019:15:26;;;;;;;;;;;;;;;;;;;;;:21;;:27;;;;:::i;:::-;941:110;;:::o;944:274:20:-;541:33:27;551:10;563;;;;;;;;;;;;;;;;;;541:9;:33::i;:::-;1112:30:20;1122:5;1129:12;;;;;;;;;;;;;;;;;;1112:9;:30::i;:::-;1182:31;1193:5;1200:12;;;;;;;;;;;;;;;;;;1182:10;:31::i;:::-;944:274;:::o;632:89::-;678:12;;;;;;;;;;;;;;;;;;2035:31:26;2045:10;2057:8;2035:9;:31::i;:::-;632:89:20;:::o;1189:132:26:-;1270:4;1291:25;1311:4;1291:5;1297:8;1291:15;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1291:15:26;;;;;;;;;;;;;;;;;;;;;:19;;:25;;;;:::i;:::-;1284:32;;1189:132;;;;:::o;822:80:20:-;1992:86:26;;;;;;;;;;;;;;;;;;2035:31;2045:10;2057:8;2035:9;:31::i;:::-;822:80:20;:::o;554:74::-;541:33:27;551:10;563;;;;;;;;;;;;;;;;;;541:9;:33::i;:::-;554:74:20:o;725:93::-;212:31;220:10;232;;;;;;;;;;;;;;;;;;212:7;:31::i;:::-;:74;;;;253:33;261:10;273:12;;;;;;;;;;;;;;;;;;253:7;:33::i;:::-;212:74;197:95;;;;;;;;725:93::o;1151:120:27:-;541:33;551:10;563;;;;;;;;;;;;;;;;;;541:9;:33::i;:::-;1240:26;1251:4;1257:8;1240:10;:26::i;:::-;1151:120;;:::o;914:114::-;541:33;551:10;563;;;;;;;;;;;;;;;;;;541:9;:33::i;:::-;1000:23;1008:4;1014:8;1000:7;:23::i;:::-;914:114;;:::o;1950:140:52:-;2031:4;2050:8;2059:12;2050:22;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2050:22:52;;;;;;;;;;;;;;;;;;;;;2073:11;2050:35;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2050:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2043:42;;1950:140;;;;:::o;653:143:27:-;1004:223:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:37;1094:12;1108:11;1083:10;:37::i;:::-;1082:38;1074:47;;;;;;;;758:33:27;766:12;780:10;;;;;;;;;;;;;;;;;;758:7;:33::i;:::-;1139:35:52;1148:12;1162:11;1139:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1139:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1139:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1218:4;1180:8;1189:12;1180:22;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1180:22:52;;;;;;;;;;;;;;;;;;;;;1203:11;1180:35;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1180:35:52;;;;;;;;;;;;;;;;;;;;;;:42;;;;;;;;;;;;;;;;;;653:143:27;;;:::o;391:43::-;;;;;;;;;;;;;;;;;;;;:::o;663:107:28:-;749:15;753:4;759;749:3;:15::i;:::-;741:24;;;;;;;;663:107;;:::o;1697:143:26:-;1769:28;1792:4;1769:5;1775:8;1769:15;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1769:15:26;;;;;;;;;;;;;;;;;;;;;:22;;:28;;;;:::i;:::-;1808:27;1820:4;1826:8;1808:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1808:27:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1697:143;;:::o;848:124:28:-;929:4;950;:11;;:17;962:4;950:17;;;;;;;;;;;;;;;;;;;;;;;;;943:24;;848:124;;;;:::o;1439:135:26:-;1508:25;1528:4;1508:5;1514:8;1508:15;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1508:15:26;;;;;;;;;;;;;;;;;;;;;:19;;:25;;;;:::i;:::-;1544;1554:4;1560:8;1544:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1544:25:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1439:135;;:::o;487:100:28:-;577:5;557:4;:11;;:17;569:4;557:17;;;;;;;;;;;;;;;;:25;;;;;;;;;;;;;;;;;;487:100;;:::o;326:96::-;413:4;393;:11;;:17;405:4;393:17;;;;;;;;;;;;;;;;:24;;;;;;;;;;;;;;;;;;326:96;;:::o",
"source": "pragma solidity ^0.4.21;\n\nimport \"../ownership/rbac/RBACWithAdmin.sol\";\n\n\ncontract RBACMock is RBACWithAdmin {\n\n string constant ROLE_ADVISOR = \"advisor\";\n\n modifier onlyAdminOrAdvisor()\n {\n require(\n hasRole(msg.sender, ROLE_ADMIN) ||\n hasRole(msg.sender, ROLE_ADVISOR)\n );\n _;\n }\n\n function RBACMock(address[] _advisors)\n public\n {\n RBACWithAdmin.initialize(msg.sender);\n\n addRole(msg.sender, ROLE_ADVISOR);\n\n for (uint256 i = 0; i < _advisors.length; i++) {\n addRole(_advisors[i], ROLE_ADVISOR);\n }\n }\n\n function onlyAdminsCanDoThis()\n onlyAdmin\n view\n external\n {\n }\n\n function onlyAdvisorsCanDoThis()\n onlyRole(ROLE_ADVISOR)\n view\n external\n {\n }\n\n function eitherAdminOrAdvisorCanDoThis()\n onlyAdminOrAdvisor\n view\n external\n {\n }\n\n function nobodyCanDoThis()\n onlyRole(\"unknown\")\n view\n external\n {\n }\n\n // admins can remove advisor's role\n function removeAdvisor(address _addr)\n onlyAdmin\n public\n {\n // revert if the user isn't an advisor\n // (perhaps you want to soft-fail here instead?)\n checkRole(_addr, ROLE_ADVISOR);\n\n // remove the advisor's role\n removeRole(_addr, ROLE_ADVISOR);\n }\n}\n",
"sourcePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/RBACMock.sol",
"ast": {
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/RBACMock.sol",
"exportedSymbols": {
"RBACMock": [
1162
]
},
"id": 1163,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1053,
"literals": [
"solidity",
"^",
"0.4",
".21"
],
"nodeType": "PragmaDirective",
"src": "0:24:20"
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/ownership/rbac/RBACWithAdmin.sol",
"file": "../ownership/rbac/RBACWithAdmin.sol",
"id": 1054,
"nodeType": "ImportDirective",
"scope": 1163,
"sourceUnit": 1755,
"src": "26:45:20",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1055,
"name": "RBACWithAdmin",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1754,
"src": "95:13:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_RBACWithAdmin_$1754",
"typeString": "contract RBACWithAdmin"
}
},
"id": 1056,
"nodeType": "InheritanceSpecifier",
"src": "95:13:20"
}
],
"contractDependencies": [
1687,
1754,
4769
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1162,
"linearizedBaseContracts": [
1162,
1754,
4769,
1687
],
"name": "RBACMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 1059,
"name": "ROLE_ADVISOR",
"nodeType": "VariableDeclaration",
"scope": 1162,
"src": "114:40:20",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 1057,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "114:6:20",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "61647669736f72",
"id": 1058,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "145:9:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_bd088c99b1e7efe40c6cc6be0a2e3be210440eae7c30ad96be78208250e94186",
"typeString": "literal_string \"advisor\""
},
"value": "advisor"
},
"visibility": "internal"
},
{
"body": {
"id": 1076,
"nodeType": "Block",
"src": "191:113:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1072,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1063,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4784,
"src": "220:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1064,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "220:10:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1065,
"name": "ROLE_ADMIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1698,
"src": "232:10:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1062,
"name": "hasRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1634,
"src": "212:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_string_memory_ptr_$returns$_t_bool_$",
"typeString": "function (address,string memory) view returns (bool)"
}
},
"id": 1066,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "212:31:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1068,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4784,
"src": "261:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1069,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "261:10:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1070,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "273:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1067,
"name": "hasRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1634,
"src": "253:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_string_memory_ptr_$returns$_t_bool_$",
"typeString": "function (address,string memory) view returns (bool)"
}
},
"id": 1071,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "253:33:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "212:74:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1061,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "197:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1073,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "197:95:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1074,
"nodeType": "ExpressionStatement",
"src": "197:95:20"
},
{
"id": 1075,
"nodeType": "PlaceholderStatement",
"src": "298:1:20"
}
]
},
"documentation": null,
"id": 1077,
"name": "onlyAdminOrAdvisor",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1060,
"nodeType": "ParameterList",
"parameters": [],
"src": "186:2:20"
},
"src": "159:145:20",
"visibility": "internal"
},
{
"body": {
"id": 1116,
"nodeType": "Block",
"src": "360:190:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1086,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4784,
"src": "391:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1087,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "391:10:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 1083,
"name": "RBACWithAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1754,
"src": "366:13:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_RBACWithAdmin_$1754_$",
"typeString": "type(contract RBACWithAdmin)"
}
},
"id": 1085,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 1723,
"src": "366:24:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 1088,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "366:36:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1089,
"nodeType": "ExpressionStatement",
"src": "366:36:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1091,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4784,
"src": "417:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1092,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "417:10:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1093,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "429:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1090,
"name": "addRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1654,
"src": "409:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (address,string memory)"
}
},
"id": 1094,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "409:33:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1095,
"nodeType": "ExpressionStatement",
"src": "409:33:20"
},
{
"body": {
"id": 1114,
"nodeType": "Block",
"src": "496:50:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1108,
"name": "_advisors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1080,
"src": "512:9:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1110,
"indexExpression": {
"argumentTypes": null,
"id": 1109,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1097,
"src": "522:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "512:12:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1111,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "526:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1107,
"name": "addRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1654,
"src": "504:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (address,string memory)"
}
},
"id": 1112,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "504:35:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1113,
"nodeType": "ExpressionStatement",
"src": "504:35:20"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1103,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1100,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1097,
"src": "469:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1101,
"name": "_advisors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1080,
"src": "473:9:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "473:16:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "469:20:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1115,
"initializationExpression": {
"assignments": [
1097
],
"declarations": [
{
"constant": false,
"id": 1097,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1117,
"src": "454:9:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1096,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "454:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1099,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1098,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "466:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "454:13:20"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1105,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "491:3:20",
"subExpression": {
"argumentTypes": null,
"id": 1104,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1097,
"src": "491:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1106,
"nodeType": "ExpressionStatement",
"src": "491:3:20"
},
"nodeType": "ForStatement",
"src": "449:97:20"
}
]
},
"documentation": null,
"id": 1117,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "RBACMock",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1081,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1080,
"name": "_advisors",
"nodeType": "VariableDeclaration",
"scope": 1117,
"src": "326:19:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1078,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "326:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1079,
"length": null,
"nodeType": "ArrayTypeName",
"src": "326:9:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "325:21:20"
},
"payable": false,
"returnParameters": {
"id": 1082,
"nodeType": "ParameterList",
"parameters": [],
"src": "360:0:20"
},
"scope": 1162,
"src": "308:242:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1122,
"nodeType": "Block",
"src": "623:5:20",
"statements": []
},
"documentation": null,
"id": 1123,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [
{
"arguments": null,
"id": 1120,
"modifierName": {
"argumentTypes": null,
"id": 1119,
"name": "onlyAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1708,
"src": "589:9:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "589:9:20"
}
],
"name": "onlyAdminsCanDoThis",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1118,
"nodeType": "ParameterList",
"parameters": [],
"src": "582:2:20"
},
"payable": false,
"returnParameters": {
"id": 1121,
"nodeType": "ParameterList",
"parameters": [],
"src": "623:0:20"
},
"scope": 1162,
"src": "554:74:20",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1129,
"nodeType": "Block",
"src": "716:5:20",
"statements": []
},
"documentation": null,
"id": 1130,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 1126,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "678:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"id": 1127,
"modifierName": {
"argumentTypes": null,
"id": 1125,
"name": "onlyRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1686,
"src": "669:8:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_string_memory_ptr_$",
"typeString": "modifier (string memory)"
}
},
"nodeType": "ModifierInvocation",
"src": "669:22:20"
}
],
"name": "onlyAdvisorsCanDoThis",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1124,
"nodeType": "ParameterList",
"parameters": [],
"src": "662:2:20"
},
"payable": false,
"returnParameters": {
"id": 1128,
"nodeType": "ParameterList",
"parameters": [],
"src": "716:0:20"
},
"scope": 1162,
"src": "632:89:20",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1135,
"nodeType": "Block",
"src": "813:5:20",
"statements": []
},
"documentation": null,
"id": 1136,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [
{
"arguments": null,
"id": 1133,
"modifierName": {
"argumentTypes": null,
"id": 1132,
"name": "onlyAdminOrAdvisor",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1077,
"src": "770:18:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "770:18:20"
}
],
"name": "eitherAdminOrAdvisorCanDoThis",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1131,
"nodeType": "ParameterList",
"parameters": [],
"src": "763:2:20"
},
"payable": false,
"returnParameters": {
"id": 1134,
"nodeType": "ParameterList",
"parameters": [],
"src": "813:0:20"
},
"scope": 1162,
"src": "725:93:20",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1142,
"nodeType": "Block",
"src": "897:5:20",
"statements": []
},
"documentation": null,
"id": 1143,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"hexValue": "756e6b6e6f776e",
"id": 1139,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "862:9:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_24695ee963d29f0f52edfdea1e830d2fcfc9052d5ba70b194bddd0afbbc89765",
"typeString": "literal_string \"unknown\""
},
"value": "unknown"
}
],
"id": 1140,
"modifierName": {
"argumentTypes": null,
"id": 1138,
"name": "onlyRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1686,
"src": "853:8:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_string_memory_ptr_$",
"typeString": "modifier (string memory)"
}
},
"nodeType": "ModifierInvocation",
"src": "853:19:20"
}
],
"name": "nobodyCanDoThis",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1137,
"nodeType": "ParameterList",
"parameters": [],
"src": "846:2:20"
},
"payable": false,
"returnParameters": {
"id": 1141,
"nodeType": "ParameterList",
"parameters": [],
"src": "897:0:20"
},
"scope": 1162,
"src": "822:80:20",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1160,
"nodeType": "Block",
"src": "1009:209:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1151,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1145,
"src": "1122:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1152,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "1129:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1150,
"name": "checkRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1617,
"src": "1112:9:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (address,string memory) view"
}
},
"id": 1153,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1112:30:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1154,
"nodeType": "ExpressionStatement",
"src": "1112:30:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1156,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1145,
"src": "1193:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1157,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "1200:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1155,
"name": "removeRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "1182:10:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (address,string memory)"
}
},
"id": 1158,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1182:31:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1159,
"nodeType": "ExpressionStatement",
"src": "1182:31:20"
}
]
},
"documentation": null,
"id": 1161,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1148,
"modifierName": {
"argumentTypes": null,
"id": 1147,
"name": "onlyAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1708,
"src": "986:9:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "986:9:20"
}
],
"name": "removeAdvisor",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1146,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1145,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1161,
"src": "967:13:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1144,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "967:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "966:15:20"
},
"payable": false,
"returnParameters": {
"id": 1149,
"nodeType": "ParameterList",
"parameters": [],
"src": "1009:0:20"
},
"scope": 1162,
"src": "944:274:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1163,
"src": "74:1146:20"
}
],
"src": "0:1221:20"
},
"legacyAST": {
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/RBACMock.sol",
"exportedSymbols": {
"RBACMock": [
1162
]
},
"id": 1163,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1053,
"literals": [
"solidity",
"^",
"0.4",
".21"
],
"nodeType": "PragmaDirective",
"src": "0:24:20"
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/ownership/rbac/RBACWithAdmin.sol",
"file": "../ownership/rbac/RBACWithAdmin.sol",
"id": 1054,
"nodeType": "ImportDirective",
"scope": 1163,
"sourceUnit": 1755,
"src": "26:45:20",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1055,
"name": "RBACWithAdmin",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1754,
"src": "95:13:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_RBACWithAdmin_$1754",
"typeString": "contract RBACWithAdmin"
}
},
"id": 1056,
"nodeType": "InheritanceSpecifier",
"src": "95:13:20"
}
],
"contractDependencies": [
1687,
1754,
4769
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1162,
"linearizedBaseContracts": [
1162,
1754,
4769,
1687
],
"name": "RBACMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 1059,
"name": "ROLE_ADVISOR",
"nodeType": "VariableDeclaration",
"scope": 1162,
"src": "114:40:20",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 1057,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "114:6:20",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "61647669736f72",
"id": 1058,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "145:9:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_bd088c99b1e7efe40c6cc6be0a2e3be210440eae7c30ad96be78208250e94186",
"typeString": "literal_string \"advisor\""
},
"value": "advisor"
},
"visibility": "internal"
},
{
"body": {
"id": 1076,
"nodeType": "Block",
"src": "191:113:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1072,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1063,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4784,
"src": "220:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1064,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "220:10:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1065,
"name": "ROLE_ADMIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1698,
"src": "232:10:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1062,
"name": "hasRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1634,
"src": "212:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_string_memory_ptr_$returns$_t_bool_$",
"typeString": "function (address,string memory) view returns (bool)"
}
},
"id": 1066,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "212:31:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1068,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4784,
"src": "261:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1069,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "261:10:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1070,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "273:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1067,
"name": "hasRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1634,
"src": "253:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_string_memory_ptr_$returns$_t_bool_$",
"typeString": "function (address,string memory) view returns (bool)"
}
},
"id": 1071,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "253:33:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "212:74:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1061,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "197:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1073,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "197:95:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1074,
"nodeType": "ExpressionStatement",
"src": "197:95:20"
},
{
"id": 1075,
"nodeType": "PlaceholderStatement",
"src": "298:1:20"
}
]
},
"documentation": null,
"id": 1077,
"name": "onlyAdminOrAdvisor",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1060,
"nodeType": "ParameterList",
"parameters": [],
"src": "186:2:20"
},
"src": "159:145:20",
"visibility": "internal"
},
{
"body": {
"id": 1116,
"nodeType": "Block",
"src": "360:190:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1086,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4784,
"src": "391:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1087,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "391:10:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 1083,
"name": "RBACWithAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1754,
"src": "366:13:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_RBACWithAdmin_$1754_$",
"typeString": "type(contract RBACWithAdmin)"
}
},
"id": 1085,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 1723,
"src": "366:24:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 1088,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "366:36:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1089,
"nodeType": "ExpressionStatement",
"src": "366:36:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1091,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4784,
"src": "417:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1092,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "417:10:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1093,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "429:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1090,
"name": "addRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1654,
"src": "409:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (address,string memory)"
}
},
"id": 1094,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "409:33:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1095,
"nodeType": "ExpressionStatement",
"src": "409:33:20"
},
{
"body": {
"id": 1114,
"nodeType": "Block",
"src": "496:50:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1108,
"name": "_advisors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1080,
"src": "512:9:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1110,
"indexExpression": {
"argumentTypes": null,
"id": 1109,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1097,
"src": "522:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "512:12:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1111,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "526:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1107,
"name": "addRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1654,
"src": "504:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (address,string memory)"
}
},
"id": 1112,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "504:35:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1113,
"nodeType": "ExpressionStatement",
"src": "504:35:20"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1103,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1100,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1097,
"src": "469:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1101,
"name": "_advisors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1080,
"src": "473:9:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "473:16:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "469:20:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1115,
"initializationExpression": {
"assignments": [
1097
],
"declarations": [
{
"constant": false,
"id": 1097,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1117,
"src": "454:9:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1096,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "454:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1099,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1098,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "466:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "454:13:20"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1105,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "491:3:20",
"subExpression": {
"argumentTypes": null,
"id": 1104,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1097,
"src": "491:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1106,
"nodeType": "ExpressionStatement",
"src": "491:3:20"
},
"nodeType": "ForStatement",
"src": "449:97:20"
}
]
},
"documentation": null,
"id": 1117,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "RBACMock",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1081,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1080,
"name": "_advisors",
"nodeType": "VariableDeclaration",
"scope": 1117,
"src": "326:19:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1078,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "326:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1079,
"length": null,
"nodeType": "ArrayTypeName",
"src": "326:9:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "325:21:20"
},
"payable": false,
"returnParameters": {
"id": 1082,
"nodeType": "ParameterList",
"parameters": [],
"src": "360:0:20"
},
"scope": 1162,
"src": "308:242:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1122,
"nodeType": "Block",
"src": "623:5:20",
"statements": []
},
"documentation": null,
"id": 1123,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [
{
"arguments": null,
"id": 1120,
"modifierName": {
"argumentTypes": null,
"id": 1119,
"name": "onlyAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1708,
"src": "589:9:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "589:9:20"
}
],
"name": "onlyAdminsCanDoThis",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1118,
"nodeType": "ParameterList",
"parameters": [],
"src": "582:2:20"
},
"payable": false,
"returnParameters": {
"id": 1121,
"nodeType": "ParameterList",
"parameters": [],
"src": "623:0:20"
},
"scope": 1162,
"src": "554:74:20",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1129,
"nodeType": "Block",
"src": "716:5:20",
"statements": []
},
"documentation": null,
"id": 1130,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 1126,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "678:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"id": 1127,
"modifierName": {
"argumentTypes": null,
"id": 1125,
"name": "onlyRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1686,
"src": "669:8:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_string_memory_ptr_$",
"typeString": "modifier (string memory)"
}
},
"nodeType": "ModifierInvocation",
"src": "669:22:20"
}
],
"name": "onlyAdvisorsCanDoThis",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1124,
"nodeType": "ParameterList",
"parameters": [],
"src": "662:2:20"
},
"payable": false,
"returnParameters": {
"id": 1128,
"nodeType": "ParameterList",
"parameters": [],
"src": "716:0:20"
},
"scope": 1162,
"src": "632:89:20",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1135,
"nodeType": "Block",
"src": "813:5:20",
"statements": []
},
"documentation": null,
"id": 1136,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [
{
"arguments": null,
"id": 1133,
"modifierName": {
"argumentTypes": null,
"id": 1132,
"name": "onlyAdminOrAdvisor",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1077,
"src": "770:18:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "770:18:20"
}
],
"name": "eitherAdminOrAdvisorCanDoThis",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1131,
"nodeType": "ParameterList",
"parameters": [],
"src": "763:2:20"
},
"payable": false,
"returnParameters": {
"id": 1134,
"nodeType": "ParameterList",
"parameters": [],
"src": "813:0:20"
},
"scope": 1162,
"src": "725:93:20",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1142,
"nodeType": "Block",
"src": "897:5:20",
"statements": []
},
"documentation": null,
"id": 1143,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"hexValue": "756e6b6e6f776e",
"id": 1139,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "862:9:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_24695ee963d29f0f52edfdea1e830d2fcfc9052d5ba70b194bddd0afbbc89765",
"typeString": "literal_string \"unknown\""
},
"value": "unknown"
}
],
"id": 1140,
"modifierName": {
"argumentTypes": null,
"id": 1138,
"name": "onlyRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1686,
"src": "853:8:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_string_memory_ptr_$",
"typeString": "modifier (string memory)"
}
},
"nodeType": "ModifierInvocation",
"src": "853:19:20"
}
],
"name": "nobodyCanDoThis",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1137,
"nodeType": "ParameterList",
"parameters": [],
"src": "846:2:20"
},
"payable": false,
"returnParameters": {
"id": 1141,
"nodeType": "ParameterList",
"parameters": [],
"src": "897:0:20"
},
"scope": 1162,
"src": "822:80:20",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1160,
"nodeType": "Block",
"src": "1009:209:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1151,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1145,
"src": "1122:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1152,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "1129:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1150,
"name": "checkRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1617,
"src": "1112:9:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (address,string memory) view"
}
},
"id": 1153,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1112:30:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1154,
"nodeType": "ExpressionStatement",
"src": "1112:30:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1156,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1145,
"src": "1193:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1157,
"name": "ROLE_ADVISOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "1200:12:20",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 1155,
"name": "removeRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "1182:10:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (address,string memory)"
}
},
"id": 1158,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1182:31:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1159,
"nodeType": "ExpressionStatement",
"src": "1182:31:20"
}
]
},
"documentation": null,
"id": 1161,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1148,
"modifierName": {
"argumentTypes": null,
"id": 1147,
"name": "onlyAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1708,
"src": "986:9:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "986:9:20"
}
],
"name": "removeAdvisor",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1146,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1145,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1161,
"src": "967:13:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1144,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "967:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "966:15:20"
},
"payable": false,
"returnParameters": {
"id": 1149,
"nodeType": "ParameterList",
"parameters": [],
"src": "1009:0:20"
},
"scope": 1162,
"src": "944:274:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1163,
"src": "74:1146:20"
}
],
"src": "0:1221:20"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2018-08-23T14:35:50.623Z"
}