UNPKG

@daostack/arc-hive

Version:

A dao's registry

843 lines (842 loc) 121 kB
{ "contractName": "DAORegistry", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "_avatar", "type": "address" } ], "name": "Propose", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "_avatar", "type": "address" }, { "indexed": false, "internalType": "string", "name": "_name", "type": "string" } ], "name": "Register", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "_avatar", "type": "address" }, { "indexed": false, "internalType": "string", "name": "_name", "type": "string" } ], "name": "UnRegister", "type": "event" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "sender", "type": "address" } ], "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "isOwner", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_avatar", "type": "address" } ], "name": "propose", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_avatar", "type": "address" }, { "internalType": "string", "name": "_name", "type": "string" } ], "name": "register", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_avatar", "type": "address" }, { "internalType": "string", "name": "_name", "type": "string" } ], "name": "unRegister", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "string", "name": "_name", "type": "string" } ], "name": "isRegister", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.15+commit.6a57276f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_avatar\",\"type\":\"address\"}],\"name\":\"Propose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_avatar\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"Register\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_avatar\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"UnRegister\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"isRegister\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_avatar\",\"type\":\"address\"}],\"name\":\"propose\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_avatar\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_avatar\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"unRegister\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"initialize(address)\":{\"details\":\"Initializes the contract setting the deployer as the initial owner.\"},\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/oren/daostack/arc-hive/contracts/DAORegistry.sol\":\"DAORegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/oren/daostack/arc-hive/contracts/DAORegistry.sol\":{\"keccak256\":\"0x4c593cb5af2c1e909b2ce5adc29212600154adda89980e14427d936f0a08a8df\",\"urls\":[\"bzz-raw://8db7e7a96a364ad23bfa0b7092ef32eecb13ffaec730fcc4638c504381f83a7c\",\"dweb:/ipfs/QmSsEPKY8abXmFKS2CPk6y2ysY7tNxe2yKAddbW5vjqPsZ\"]},\"@openzeppelin/contracts-ethereum-package/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0d4306da5305cb78f09c70c18ec86dbc66f22fa5ade90edc20e1ab88e16d4d10\",\"urls\":[\"bzz-raw://c89dee1b8e96cb83f529b8b5c93be6b420c1913363a3fed01241942f08cc968f\",\"dweb:/ipfs/QmfWWwzg9hah3YwZRFWvAwq91HLjCHkKnxXqP6uLGURUou\"]},\"@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xd7e8ab76fa35c4d8d35a06a6ed538cadab8b75a1aa00594ced1568b2c0cadde3\",\"urls\":[\"bzz-raw://a3f816aa3e6161b4cf882ad34755673848d835f7fb964db49bcef9df14570cef\",\"dweb:/ipfs/QmQACSH1W7pKQnqTAqpuEP8ychp3PvosfnyondLaLE1nVq\"]},\"@openzeppelin/upgrades/contracts/Initializable.sol\":{\"keccak256\":\"0xf79d9851c085aa8412e87d7a26d3485488fe12538ecb4e317ce41fc1f2c3a16a\",\"urls\":[\"bzz-raw://6af1a35ad6aed2169ce9f44095438b3192cd6066903908f769d5c49a06a0caf8\",\"dweb:/ipfs/QmaH41CwJ7WrMQwSnbfCKuL2pd8bxF7sbGSLPZb6JaHBFF\"]}},\"version\":1}", "bytecode": "0x6080604052610ab7806100136000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146102385780638f32d59b1461025c578063c4d66de814610264578063d68b25141461028a578063f2fde38b1461034057610093565b80630126795114610098578063178d680d146100c057806332434a2e1461017a578063715018a614610230575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b0316610366565b005b610166600480360360208110156100d657600080fd5b8101906020810181356401000000008111156100f157600080fd5b82018360208201111561010357600080fd5b8035906020019184600183028401116401000000008311171561012557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061039d945050505050565b604080519115158252519081900360200190f35b6100be6004803603604081101561019057600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156101bb57600080fd5b8201836020820111156101cd57600080fd5b803590602001918460018302840111640100000000831117156101ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610408945050505050565b6100be6105d1565b610240610662565b604080516001600160a01b039092168252519081900360200190f35b610166610671565b6100be6004803603602081101561027a57600080fd5b50356001600160a01b0316610697565b6100be600480360360408110156102a057600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156102cb57600080fd5b8201836020820111156102dd57600080fd5b803590602001918460018302840111640100000000831117156102ff57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610789945050505050565b6100be6004803603602081101561035657600080fd5b50356001600160a01b0316610910565b6040516001600160a01b038216907fd16d50d8d566a5c6f1f5d89ffcfa821adc9d9f4e780d153563abc82e943ff0e390600090a250565b60006066826040518082805190602001908083835b602083106103d15780518252601f1990920191602091820191016103b2565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16949350505050565b610410610671565b61044f576040805162461bcd60e51b81526020600482018190526024820152600080516020610a35833981519152604482015290519081900360640190fd5b6066816040518082805190602001908083835b602083106104815780518252601f199092019160209182019101610462565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506104be905057600080fd5b60016066826040518082805190602001908083835b602083106104f25780518252601f1990920191602091820191016104d3565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff19169615159690961790955580845285518482015285516001600160a01b038816957f6ba0831d2f62ae5cbf7214bcc1d79c5da1d705f12811efda0beaa840006f874e9588955093508392908301919085019080838360005b8381101561059357818101518382015260200161057b565b50505050905090810190601f1680156105c05780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050565b6105d9610671565b610618576040805162461bcd60e51b81526020600482018190526024820152600080516020610a35833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b6033546001600160a01b031690565b6033546000906001600160a01b0316610688610963565b6001600160a01b031614905090565b600054610100900460ff16806106b057506106b0610967565b806106be575060005460ff16155b6106f95760405162461bcd60e51b815260040180806020018281038252602e815260200180610a55602e913960400191505060405180910390fd5b600054610100900460ff16158015610724576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b0319166001600160a01b0384811691909117918290556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38015610785576000805461ff00191690555b5050565b610791610671565b6107d0576040805162461bcd60e51b81526020600482018190526024820152600080516020610a35833981519152604482015290519081900360640190fd5b6066816040518082805190602001908083835b602083106108025780518252601f1990920191602091820191016107e3565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16915061083e905057600080fd5b60006066826040518082805190602001908083835b602083106108725780518252601f199092019160209182019101610853565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff19169615159690961790955580845285518482015285516001600160a01b038816957feeecf8a6f9b0bc1054c6acb924ed55fc4deb8f139598934d00d3f5a0d31a3e8f958895509350839290830191908501908083836000831561059357818101518382015260200161057b565b610918610671565b610957576040805162461bcd60e51b81526020600482018190526024820152600080516020610a35833981519152604482015290519081900360640190fd5b6109608161096d565b50565b3390565b303b1590565b6001600160a01b0381166109b25760405162461bcd60e51b8152600401808060200182810382526026815260200180610a0f6026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a265627a7a72315820b15336e7be9f66bbf9777858db56682f33999b8d8b65ee9d15473e59a6bd5b4b64736f6c634300050f0032", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146102385780638f32d59b1461025c578063c4d66de814610264578063d68b25141461028a578063f2fde38b1461034057610093565b80630126795114610098578063178d680d146100c057806332434a2e1461017a578063715018a614610230575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b0316610366565b005b610166600480360360208110156100d657600080fd5b8101906020810181356401000000008111156100f157600080fd5b82018360208201111561010357600080fd5b8035906020019184600183028401116401000000008311171561012557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061039d945050505050565b604080519115158252519081900360200190f35b6100be6004803603604081101561019057600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156101bb57600080fd5b8201836020820111156101cd57600080fd5b803590602001918460018302840111640100000000831117156101ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610408945050505050565b6100be6105d1565b610240610662565b604080516001600160a01b039092168252519081900360200190f35b610166610671565b6100be6004803603602081101561027a57600080fd5b50356001600160a01b0316610697565b6100be600480360360408110156102a057600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156102cb57600080fd5b8201836020820111156102dd57600080fd5b803590602001918460018302840111640100000000831117156102ff57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610789945050505050565b6100be6004803603602081101561035657600080fd5b50356001600160a01b0316610910565b6040516001600160a01b038216907fd16d50d8d566a5c6f1f5d89ffcfa821adc9d9f4e780d153563abc82e943ff0e390600090a250565b60006066826040518082805190602001908083835b602083106103d15780518252601f1990920191602091820191016103b2565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16949350505050565b610410610671565b61044f576040805162461bcd60e51b81526020600482018190526024820152600080516020610a35833981519152604482015290519081900360640190fd5b6066816040518082805190602001908083835b602083106104815780518252601f199092019160209182019101610462565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506104be905057600080fd5b60016066826040518082805190602001908083835b602083106104f25780518252601f1990920191602091820191016104d3565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff19169615159690961790955580845285518482015285516001600160a01b038816957f6ba0831d2f62ae5cbf7214bcc1d79c5da1d705f12811efda0beaa840006f874e9588955093508392908301919085019080838360005b8381101561059357818101518382015260200161057b565b50505050905090810190601f1680156105c05780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050565b6105d9610671565b610618576040805162461bcd60e51b81526020600482018190526024820152600080516020610a35833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b6033546001600160a01b031690565b6033546000906001600160a01b0316610688610963565b6001600160a01b031614905090565b600054610100900460ff16806106b057506106b0610967565b806106be575060005460ff16155b6106f95760405162461bcd60e51b815260040180806020018281038252602e815260200180610a55602e913960400191505060405180910390fd5b600054610100900460ff16158015610724576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b0319166001600160a01b0384811691909117918290556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38015610785576000805461ff00191690555b5050565b610791610671565b6107d0576040805162461bcd60e51b81526020600482018190526024820152600080516020610a35833981519152604482015290519081900360640190fd5b6066816040518082805190602001908083835b602083106108025780518252601f1990920191602091820191016107e3565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16915061083e905057600080fd5b60006066826040518082805190602001908083835b602083106108725780518252601f199092019160209182019101610853565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff19169615159690961790955580845285518482015285516001600160a01b038816957feeecf8a6f9b0bc1054c6acb924ed55fc4deb8f139598934d00d3f5a0d31a3e8f958895509350839290830191908501908083836000831561059357818101518382015260200161057b565b610918610671565b610957576040805162461bcd60e51b81526020600482018190526024820152600080516020610a35833981519152604482015290519081900360640190fd5b6109608161096d565b50565b3390565b303b1590565b6001600160a01b0381166109b25760405162461bcd60e51b8152600401808060200182810382526026815260200180610a0f6026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a265627a7a72315820b15336e7be9f66bbf9777858db56682f33999b8d8b65ee9d15473e59a6bd5b4b64736f6c634300050f0032", "sourceMap": "110:929:0:-;;;;;;;;;", "deployedSourceMap": "110:929:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;110:929:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;359:79;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;359:79:0;-1:-1:-1;;;;;359:79:0;;:::i;:::-;;930:106;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;930:106:0;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;930:106:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;930:106:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;930:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;930:106:0;;-1:-1:-1;930:106:0;;-1:-1:-1;;;;;930:106:0:i;:::-;;;;;;;;;;;;;;;;;;444:186;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;444:186:0;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;444:186:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;444:186:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;444:186:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;444:186:0;;-1:-1:-1;444:186:0;;-1:-1:-1;;;;;444:186:0:i;1746:137:3:-;;;:::i;959:77::-;;;:::i;:::-;;;;-1:-1:-1;;;;;959:77:3;;;;;;;;;;;;;;1310:92;;;:::i;741:142::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;741:142:3;-1:-1:-1;;;;;741:142:3;;:::i;636:190:0:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;636:190:0;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;636:190:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;636:190:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;636:190:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;636:190:0;;-1:-1:-1;636:190:0;;-1:-1:-1;;;;;636:190:0:i;2032:107:3:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2032:107:3;-1:-1:-1;;;;;2032:107:3;;:::i;359:79:0:-;415:16;;-1:-1:-1;;;;;415:16:0;;;;;;;;359:79;:::o;930:106::-;991:4;1014:8;1023:5;1014:15;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;1014:15:0;;;;;-1:-1:-1;1014:15:0;;;;;;;;;;;;;;930:106;-1:-1:-1;;;;930:106:0:o;444:186::-;1163:9:3;:7;:9::i;:::-;1155:54;;;;;-1:-1:-1;;;1155:54:3;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1155:54:3;;;;;;;;;;;;;;;536:8:0;545:5;536:15;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;536:15:0;;;;;-1:-1:-1;536:15:0;;;;;;;;;;;;;535:16;;-1:-1:-1;527:25:0;;-1:-1:-1;527:25:0;;;;;580:4;562:8;571:5;562:15;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;562:15:0;;;;;-1:-1:-1;562:15:0;;;;;;;;;;;:22;;-1:-1:-1;;562:22:0;;;;;;;;;;;599:24;;;;;;;;;;;-1:-1:-1;;;;;599:24:0;;;;;;;-1:-1:-1;562:15:0;-1:-1:-1;562:15:0;;599:24;;;;;;;;;;;-1:-1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;599:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;444:186;;:::o;1746:137:3:-;1163:9;:7;:9::i;:::-;1155:54;;;;;-1:-1:-1;;;1155:54:3;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1155:54:3;;;;;;;;;;;;;;;1828:6;;1807:40;;1844:1;;-1:-1:-1;;;;;1828:6:3;;1807:40;;1844:1;;1807:40;1857:6;:19;;-1:-1:-1;;;;;;1857:19:3;;;1746:137::o;959:77::-;1023:6;;-1:-1:-1;;;;;1023:6:3;959:77;:::o;1310:92::-;1389:6;;1350:4;;-1:-1:-1;;;;;1389:6:3;1373:12;:10;:12::i;:::-;-1:-1:-1;;;;;1373:22:3;;1366:29;;1310:92;:::o;741:142::-;1024:12:4;;;;;;;;:31;;;1040:15;:13;:15::i;:::-;1024:47;;;-1:-1:-1;1060:11:4;;;;1059:12;1024:47;1016:106;;;;-1:-1:-1;;;1016:106:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;1151:13;1170:80;;;;1198:12;:19;;-1:-1:-1;;;;1198:19:4;;;;;1225:18;1213:4;1225:18;;;1170:80;806:6:3;:15;;-1:-1:-1;;;;;;806:15:3;-1:-1:-1;;;;;806:15:3;;;;;;;;;;;836:40;;869:6;;;-1:-1:-1;;836:40:3;;-1:-1:-1;;836:40:3;1268:14:4;1264:55;;;1307:5;1292:20;;-1:-1:-1;;1292:20:4;;;1264:55;741:142:3;;:::o;636:190:0:-;1163:9:3;:7;:9::i;:::-;1155:54;;;;;-1:-1:-1;;;1155:54:3;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1155:54:3;;;;;;;;;;;;;;;729:8:0;738:5;729:15;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;729:15:0;;;;;-1:-1:-1;729:15:0;;;;;;;;;;;;;;-1:-1:-1;721:24:0;;-1:-1:-1;721:24:0;;;;;773:5;755:8;764:5;755:15;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;755:15:0;;;;;-1:-1:-1;755:15:0;;;;;;;;;;;:23;;-1:-1:-1;;755:23:0;;;;;;;;;;;793:26;;;;;;;;;;;-1:-1:-1;;;;;793:26:0;;;;;;;-1:-1:-1;755:15:0;-1:-1:-1;755:15:0;;793:26;;;;;;;;;;;-1:-1:-1;27:10;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;2032:107:3;1163:9;:7;:9::i;:::-;1155:54;;;;;-1:-1:-1;;;1155:54:3;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1155:54:3;;;;;;;;;;;;;;;2104:28;2123:8;2104:18;:28::i;:::-;2032:107;:::o;791:88:2:-;862:10;791:88;:::o;1409:467:4:-;1842:7;1830:20;1864:7;1409:467;:::o;2240:225:3:-;-1:-1:-1;;;;;2313:22:3;;2305:73;;;;-1:-1:-1;;;2305:73:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2414:6;;2393:38;;-1:-1:-1;;;;;2393:38:3;;;;2414:6;;2393:38;;2414:6;;2393:38;2441:6;:17;;-1:-1:-1;;;;;;2441:17:3;-1:-1:-1;;;;;2441:17:3;;;;;;;;;;2240:225::o", "source": "pragma solidity ^0.5.15;\n\nimport \"@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol\";\n\ncontract DAORegistry is Ownable {\n\n event Propose(address indexed _avatar);\n event Register(address indexed _avatar, string _name);\n event UnRegister(address indexed _avatar, string _name);\n\n mapping(string=>bool) private registry;\n\n function propose(address _avatar) public {\n emit Propose(_avatar);\n }\n\n function register(address _avatar, string memory _name) public onlyOwner {\n require(!registry[_name]);\n registry[_name] = true;\n emit Register(_avatar, _name);\n }\n\n function unRegister(address _avatar, string memory _name) public onlyOwner {\n require(registry[_name]);\n registry[_name] = false;\n emit UnRegister(_avatar, _name);\n }\n\n //This getter is needed because Dynamically-sized keys for public mappings are not supported.\n function isRegister(string memory _name) public view returns(bool) {\n return registry[_name];\n }\n\n}\n", "sourcePath": "/Users/oren/daostack/arc-hive/contracts/DAORegistry.sol", "ast": { "absolutePath": "/Users/oren/daostack/arc-hive/contracts/DAORegistry.sol", "exportedSymbols": { "DAORegistry": [ 102 ] }, "id": 103, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.5", ".15" ], "nodeType": "PragmaDirective", "src": "0:24:0" }, { "absolutePath": "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol", "file": "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol", "id": 2, "nodeType": "ImportDirective", "scope": 103, "sourceUnit": 312, "src": "26:82:0", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 3, "name": "Ownable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 311, "src": "134:7:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Ownable_$311", "typeString": "contract Ownable" } }, "id": 4, "nodeType": "InheritanceSpecifier", "src": "134:7:0" } ], "contractDependencies": [ 187, 311, 374 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 102, "linearizedBaseContracts": [ 102, 311, 187, 374 ], "name": "DAORegistry", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 8, "name": "Propose", "nodeType": "EventDefinition", "parameters": { "id": 7, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6, "indexed": true, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 8, "src": "163:23:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5, "name": "address", "nodeType": "ElementaryTypeName", "src": "163:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "162:25:0" }, "src": "149:39:0" }, { "anonymous": false, "documentation": null, "id": 14, "name": "Register", "nodeType": "EventDefinition", "parameters": { "id": 13, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 10, "indexed": true, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 14, "src": "208:23:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 9, "name": "address", "nodeType": "ElementaryTypeName", "src": "208:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 12, "indexed": false, "name": "_name", "nodeType": "VariableDeclaration", "scope": 14, "src": "233:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 11, "name": "string", "nodeType": "ElementaryTypeName", "src": "233:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "207:39:0" }, "src": "193:54:0" }, { "anonymous": false, "documentation": null, "id": 20, "name": "UnRegister", "nodeType": "EventDefinition", "parameters": { "id": 19, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 16, "indexed": true, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 20, "src": "269:23:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 15, "name": "address", "nodeType": "ElementaryTypeName", "src": "269:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 18, "indexed": false, "name": "_name", "nodeType": "VariableDeclaration", "scope": 20, "src": "294:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 17, "name": "string", "nodeType": "ElementaryTypeName", "src": "294:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "268:39:0" }, "src": "252:56:0" }, { "constant": false, "id": 24, "name": "registry", "nodeType": "VariableDeclaration", "scope": 102, "src": "314:38:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string => bool)" }, "typeName": { "id": 23, "keyType": { "id": 21, "name": "string", "nodeType": "ElementaryTypeName", "src": "322:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "314:21:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string => bool)" }, "valueType": { "id": 22, "name": "bool", "nodeType": "ElementaryTypeName", "src": "330:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } }, "value": null, "visibility": "private" }, { "body": { "id": 33, "nodeType": "Block", "src": "400:38:0", "statements": [ { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 30, "name": "_avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 26, "src": "423:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 29, "name": "Propose", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8, "src": "415:7:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 31, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "415:16:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 32, "nodeType": "EmitStatement", "src": "410:21:0" } ] }, "documentation": null, "id": 34, "implemented": true, "kind": "function", "modifiers": [], "name": "propose", "nodeType": "FunctionDefinition", "parameters": { "id": 27, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 26, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 34, "src": "376:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25, "name": "address", "nodeType": "ElementaryTypeName", "src": "376:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "375:17:0" }, "returnParameters": { "id": 28, "nodeType": "ParameterList", "parameters": [], "src": "400:0:0" }, "scope": 102, "src": "359:79:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 61, "nodeType": "Block", "src": "517:113:0", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 47, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "535:16:0", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 44, "name": "registry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24, "src": "536:8:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string memory => bool)" } }, "id": 46, "indexExpression": { "argumentTypes": null, "id": 45, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38, "src": "545:5:0", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "536:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 43, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 392, 393 ], "referencedDeclaration": 392, "src": "527:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 48, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "527:25:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 49, "nodeType": "ExpressionStatement", "src": "527:25:0" }, { "expression": { "argumentTypes": null, "id": 54, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 50, "name": "registry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24, "src": "562:8:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string memory => bool)" } }, "id": 52, "indexExpression": { "argumentTypes": null, "id": 51, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38, "src": "571:5:0", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "562:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 53, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "580:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "562:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 55, "nodeType": "ExpressionStatement", "src": "562:22:0" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 57, "name": "_avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36, "src": "608:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, {