arc_dx
Version:
A platform for building DAOs
1,003 lines (1,002 loc) • 124 kB
JSON
{
"contractName": "Forwarder",
"abi": [
{
"constant": true,
"inputs": [],
"name": "avatar",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "expirationTime",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"payable": false,
"stateMutability": "nonpayable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
}
],
"name": "OwnershipRenounced",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "_avatar",
"type": "address"
},
{
"name": "_expirationTime",
"type": "uint256"
}
],
"name": "initialize",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "unregisterSelf",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405260008054600160a060020a03191633179055610682806100256000396000f3006080604052600436106100695763ffffffff60e060020a6000350416635aef7de681146101b35780636bafaa59146101e4578063715018a61461020d5780638da5cb5b14610224578063cd6dc68714610239578063da284dcc1461025d578063f2fde38b14610284575b34801561007557600080fd5b5060008054600160a060020a0316331461008e57600080fd5b60025442106100e7576040805160e560020a62461bcd02815260206004820152601460248201527f65787069726174696f6e54696d65203e206e6f77000000000000000000000000604482015290519081900360640190fd5b600160009054906101000a9004600160a060020a0316600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561013a57600080fd5b505af115801561014e573d6000803e3d6000fd5b505050506040513d602081101561016457600080fd5b5051604051600160a060020a03909116906000903690808383808284378201915050925050506000604051808303816000865af191505090503d6000803e8080156101ae573d6000f35b3d6000fd5b3480156101bf57600080fd5b506101c86102a5565b60408051600160a060020a039092168252519081900360200190f35b3480156101f057600080fd5b506101f96102b4565b604080519115158252519081900360200190f35b34801561021957600080fd5b5061022261042a565b005b34801561023057600080fd5b506101c8610496565b34801561024557600080fd5b50610222600160a060020a03600435166024356104a5565b34801561026957600080fd5b506102726105b0565b60408051918252519081900360200190f35b34801561029057600080fd5b50610222600160a060020a03600435166105b6565b600154600160a060020a031681565b60004260025411151515610312576040805160e560020a62461bcd02815260206004820152601560248201527f65787069726174696f6e54696d65203c3d206e6f770000000000000000000000604482015290519081900360640190fd5b600160009054906101000a9004600160a060020a0316600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561036557600080fd5b505af1158015610379573d6000803e3d6000fd5b505050506040513d602081101561038f57600080fd5b5051600154604080517f6c525b13000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015290519190921691636c525b139160248083019260209291908290030181600087803b1580156103f957600080fd5b505af115801561040d573d6000803e3d6000fd5b505050506040513d602081101561042357600080fd5b5051905090565b600054600160a060020a0316331461044157600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600054600160a060020a031633146104bc57600080fd5b600154600160a060020a03161561051d576040805160e560020a62461bcd02815260206004820152601b60248201527f63616e2062652063616c6c6564206f6e6c79206f6e652074696d650000000000604482015290519081900360640190fd5b600160a060020a038216151561057d576040805160e560020a62461bcd02815260206004820152601560248201527f6176617461722063616e6e6f74206265207a65726f0000000000000000000000604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039390931692909217909155600255565b60025481565b600054600160a060020a031633146105cd57600080fd5b6105d6816105d9565b50565b600160a060020a03811615156105ee57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820c71b50f17f25e9bd121d1e41d7f27df95f5de80730ca851035a6e56418c7bb5a0029",
"deployedBytecode": "0x6080604052600436106100695763ffffffff60e060020a6000350416635aef7de681146101b35780636bafaa59146101e4578063715018a61461020d5780638da5cb5b14610224578063cd6dc68714610239578063da284dcc1461025d578063f2fde38b14610284575b34801561007557600080fd5b5060008054600160a060020a0316331461008e57600080fd5b60025442106100e7576040805160e560020a62461bcd02815260206004820152601460248201527f65787069726174696f6e54696d65203e206e6f77000000000000000000000000604482015290519081900360640190fd5b600160009054906101000a9004600160a060020a0316600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561013a57600080fd5b505af115801561014e573d6000803e3d6000fd5b505050506040513d602081101561016457600080fd5b5051604051600160a060020a03909116906000903690808383808284378201915050925050506000604051808303816000865af191505090503d6000803e8080156101ae573d6000f35b3d6000fd5b3480156101bf57600080fd5b506101c86102a5565b60408051600160a060020a039092168252519081900360200190f35b3480156101f057600080fd5b506101f96102b4565b604080519115158252519081900360200190f35b34801561021957600080fd5b5061022261042a565b005b34801561023057600080fd5b506101c8610496565b34801561024557600080fd5b50610222600160a060020a03600435166024356104a5565b34801561026957600080fd5b506102726105b0565b60408051918252519081900360200190f35b34801561029057600080fd5b50610222600160a060020a03600435166105b6565b600154600160a060020a031681565b60004260025411151515610312576040805160e560020a62461bcd02815260206004820152601560248201527f65787069726174696f6e54696d65203c3d206e6f770000000000000000000000604482015290519081900360640190fd5b600160009054906101000a9004600160a060020a0316600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561036557600080fd5b505af1158015610379573d6000803e3d6000fd5b505050506040513d602081101561038f57600080fd5b5051600154604080517f6c525b13000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015290519190921691636c525b139160248083019260209291908290030181600087803b1580156103f957600080fd5b505af115801561040d573d6000803e3d6000fd5b505050506040513d602081101561042357600080fd5b5051905090565b600054600160a060020a0316331461044157600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600054600160a060020a031633146104bc57600080fd5b600154600160a060020a03161561051d576040805160e560020a62461bcd02815260206004820152601b60248201527f63616e2062652063616c6c6564206f6e6c79206f6e652074696d650000000000604482015290519081900360640190fd5b600160a060020a038216151561057d576040805160e560020a62461bcd02815260206004820152601560248201527f6176617461722063616e6e6f74206265207a65726f0000000000000000000000604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039390931692909217909155600255565b60025481565b600054600160a060020a031633146105cd57600080fd5b6105d6816105d9565b50565b600160a060020a03811615156105ee57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820c71b50f17f25e9bd121d1e41d7f27df95f5de80730ca851035a6e56418c7bb5a0029",
"sourceMap": "272:1581:12:-;;;567:5:55;:18;;-1:-1:-1;;;;;;567:18:55;575:10;567:18;;;272:1581:12;;;;;;",
"deployedSourceMap": "272:1581:12:-;;;;;;;;;-1:-1:-1;;;272:1581:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;675:11:12;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;556:14:12;;573:3;-1:-1:-1;548:53:12;;;;;-1:-1:-1;;;;;548:53:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;689:6;;;;;;;;;-1:-1:-1;;;;;689:6:12;-1:-1:-1;;;;;689:12:12;;:14;;;;;-1:-1:-1;;;689:14:12;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;689:14:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;689:14:12;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;689:14:12;:29;;-1:-1:-1;;;;;689:19:12;;;;709:8;;;;689:29;709:8;;;;689:29;;;;;;;;;;;;;;;;;;;;;;;;;675:43;;867:14;864:1;861;846:36;899:6;950:36;;;;1015:14;1012:1;1005:25;950:36;969:14;966:1;959:25;309:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;309:20:12;;;;;;;;-1:-1:-1;;;;;309:20:12;;;;;;;;;;;;;;1587:264;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1587:264:12;;;;;;;;;;;;;;;;;;;;;;1001:111:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1001:111:55;;;;;;238:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:55;;;;1224:285:12;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1224:285:12;-1:-1:-1;;;;;1224:285:12;;;;;;;335:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;335:26:12;;;;;;;;;;;;;;;;;;;;1274:103:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1274:103:55;-1:-1:-1;;;;;1274:103:55;;;;;309:20:12;;;-1:-1:-1;;;;;309:20:12;;:::o;1587:264::-;1628:4;1731:3;1713:14;;:21;;1705:55;;;;;;;-1:-1:-1;;;;;1705:55:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;1797:6;;;;;;;;;-1:-1:-1;;;;;1797:6:12;-1:-1:-1;;;;;1797:12:12;;:14;;;;;-1:-1:-1;;;1797:14:12;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1797:14:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1797:14:12;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1797:14:12;1836:6;;1777:67;;;;;;-1:-1:-1;;;;;1836:6:12;;;1777:67;;;;;;:50;;;;;;;:67;;;;;1797:14;;1777:67;;;;;;;1836:6;1777:50;:67;;;5:2:-1;;;;30:1;27;20:12;5:2;1777:67:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1777:67:12;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1777:67:12;;-1:-1:-1;1587:264:12;:::o;1001:111:55:-;719:5;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1077:5;;;1058:25;;-1:-1:-1;;;;;1077:5:55;;;;1058:25;;;1105:1;1089:18;;-1:-1:-1;;1089:18:55;;;1001:111::o;238:20::-;;;-1:-1:-1;;;;;238:20:55;;:::o;1224:285:12:-;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1319:6:12;;-1:-1:-1;;;;;1319:6:12;:19;1311:59;;;;;-1:-1:-1;;;;;1311:59:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1388:20:12;;;;1380:54;;;;;-1:-1:-1;;;;;1380:54:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;1444:6;:16;;-1:-1:-1;;1444:16:12;-1:-1:-1;;;;;1444:16:12;;;;;;;;;;;1470:14;:32;1224:285::o;335:26::-;;;;:::o;1274:103:55:-;719:5;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1343:29;1362:9;1343:18;:29::i;:::-;1274:103;:::o;1512:171::-;-1:-1:-1;;;;;1582:23:55;;;;1574:32;;;;;;1638:5;;;1617:38;;-1:-1:-1;;;;;1617:38:55;;;;1638:5;;;1617:38;;;1661:5;:17;;-1:-1:-1;;1661:17:55;-1:-1:-1;;;;;1661:17:55;;;;;;;;;;1512:171::o",
"source": "pragma solidity ^0.4.25;\n\nimport \"../controller/ControllerInterface.sol\";\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\n\n/**\n * @title A scheme to forward a call to a dao.\n * The scheme can unregister itself when its expirationTime reached.\n */\n\n\ncontract Forwarder is Ownable {\n\n Avatar public avatar;\n uint public expirationTime;\n\n /**\n * @dev forwardCall forward a call to the dao controller\n */\n function () external onlyOwner {\n // solium-disable-next-line security/no-block-members\n require(expirationTime > now, \"expirationTime > now\");\n // solium-disable-next-line security/no-low-level-calls\n bool result = avatar.owner().call(msg.data);\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize)\n\n switch result\n // call returns 0 on error.\n case 0 { revert(0, returndatasize) }\n default { return(0, returndatasize) }\n }\n }\n\n /**\n * @dev initialize\n * @param _avatar the avatar of the dao to forward the call to\n * @param _expirationTime the expirationTime to forwardCall\n */\n function initialize(Avatar _avatar, uint _expirationTime) external onlyOwner {\n require(avatar == Avatar(0), \"can be called only one time\");\n require(_avatar != Avatar(0), \"avatar cannot be zero\");\n avatar = _avatar;\n expirationTime = _expirationTime;\n }\n\n /**\n * @dev unregisterSelf function\n * @return bool\n */\n function unregisterSelf() public returns(bool) {\n // solium-disable-next-line security/no-block-members\n require(expirationTime <= now, \"expirationTime <= now\");\n return ControllerInterface(avatar.owner()).unregisterSelf(address(avatar));\n }\n}\n",
"sourcePath": "/Users/oren/daostack/daostack2/daostack/contracts/schemes/Forwarder.sol",
"ast": {
"absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/schemes/Forwarder.sol",
"exportedSymbols": {
"Forwarder": [
5797
]
},
"id": 5798,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5704,
"literals": [
"solidity",
"^",
"0.4",
".25"
],
"nodeType": "PragmaDirective",
"src": "0:24:12"
},
{
"absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/controller/ControllerInterface.sol",
"file": "../controller/ControllerInterface.sol",
"id": 5705,
"nodeType": "ImportDirective",
"scope": 5798,
"sourceUnit": 2007,
"src": "26:47:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"id": 5706,
"nodeType": "ImportDirective",
"scope": 5798,
"sourceUnit": 20878,
"src": "74:63:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 5707,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 20877,
"src": "294:7:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$20877",
"typeString": "contract Ownable"
}
},
"id": 5708,
"nodeType": "InheritanceSpecifier",
"src": "294:7:12"
}
],
"contractDependencies": [
20877
],
"contractKind": "contract",
"documentation": "@title A scheme to forward a call to a dao.\n The scheme can unregister itself when its expirationTime reached.",
"fullyImplemented": true,
"id": 5797,
"linearizedBaseContracts": [
5797,
20877
],
"name": "Forwarder",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 5710,
"name": "avatar",
"nodeType": "VariableDeclaration",
"scope": 5797,
"src": "309:20:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
},
"typeName": {
"contractScope": null,
"id": 5709,
"name": "Avatar",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 333,
"src": "309:6:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 5712,
"name": "expirationTime",
"nodeType": "VariableDeclaration",
"scope": 5797,
"src": "335:26:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5711,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "335:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 5735,
"nodeType": "Block",
"src": "476:572:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5720,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5718,
"name": "expirationTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5712,
"src": "556:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"id": 5719,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21551,
"src": "573:3:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "556:20:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "65787069726174696f6e54696d65203e206e6f77",
"id": 5721,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "578:22:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e25a77ff7fc36f4c14dd6593b93632f3c32ce86ea5b3a5c1d8bcd7cf938cfc32",
"typeString": "literal_string \"expirationTime > now\""
},
"value": "expirationTime > now"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_e25a77ff7fc36f4c14dd6593b93632f3c32ce86ea5b3a5c1d8bcd7cf938cfc32",
"typeString": "literal_string \"expirationTime > now\""
}
],
"id": 5717,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
21552,
21553
],
"referencedDeclaration": 21553,
"src": "548:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 5722,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "548:53:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5723,
"nodeType": "ExpressionStatement",
"src": "548:53:12"
},
{
"assignments": [
5725
],
"declarations": [
{
"constant": false,
"id": 5725,
"name": "result",
"nodeType": "VariableDeclaration",
"scope": 5736,
"src": "675:11:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 5724,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "675:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5733,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5730,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21549,
"src": "709:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 5731,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "data",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "709:8:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 5726,
"name": "avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5710,
"src": "689:6:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"id": 5727,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "owner",
"nodeType": "MemberAccess",
"referencedDeclaration": 20795,
"src": "689:12:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
"typeString": "function () view external returns (address)"
}
},
"id": 5728,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "689:14:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 5729,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "689:19:12",
"typeDescriptions": {
"typeIdentifier": "t_function_barecall_payable$__$returns$_t_bool_$",
"typeString": "function () payable returns (bool)"
}
},
"id": 5732,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "689:29:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "675:43:12"
},
{
"externalReferences": [
{
"result": {
"declaration": 5725,
"isOffset": false,
"isSlot": false,
"src": "899:6:12",
"valueSize": 1
}
}
],
"id": 5734,
"nodeType": "InlineAssembly",
"operations": "{\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}",
"src": "792:256:12"
}
]
},
"documentation": "@dev forwardCall forward a call to the dao controller",
"id": 5736,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 5715,
"modifierName": {
"argumentTypes": null,
"id": 5714,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20825,
"src": "466:9:12",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "466:9:12"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5713,
"nodeType": "ParameterList",
"parameters": [],
"src": "454:2:12"
},
"payable": false,
"returnParameters": {
"id": 5716,
"nodeType": "ParameterList",
"parameters": [],
"src": "476:0:12"
},
"scope": 5797,
"src": "445:603:12",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 5771,
"nodeType": "Block",
"src": "1301:208:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
},
"id": 5750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5746,
"name": "avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5710,
"src": "1319:6:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 5748,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1336:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 5747,
"name": "Avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 333,
"src": "1329:6:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Avatar_$333_$",
"typeString": "type(contract Avatar)"
}
},
"id": 5749,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1329:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"src": "1319:19:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "63616e2062652063616c6c6564206f6e6c79206f6e652074696d65",
"id": 5751,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1340:29:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_61459d8c2e83c03ac4ccaf4013950b2282c585e1eb42ab84ceae1eecfe85edd8",
"typeString": "literal_string \"can be called only one time\""
},
"value": "can be called only one time"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_61459d8c2e83c03ac4ccaf4013950b2282c585e1eb42ab84ceae1eecfe85edd8",
"typeString": "literal_string \"can be called only one time\""
}
],
"id": 5745,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
21552,
21553
],
"referencedDeclaration": 21553,
"src": "1311:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 5752,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1311:59:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5753,
"nodeType": "ExpressionStatement",
"src": "1311:59:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
},
"id": 5759,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5755,
"name": "_avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5738,
"src": "1388:7:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 5757,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1406:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 5756,
"name": "Avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 333,
"src": "1399:6:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Avatar_$333_$",
"typeString": "type(contract Avatar)"
}
},
"id": 5758,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1399:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"src": "1388:20:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6176617461722063616e6e6f74206265207a65726f",
"id": 5760,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1410:23:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3338e04ce106ab83a89a6f78ac95362796c47f8acb99702d3b473607a80d58e0",
"typeString": "literal_string \"avatar cannot be zero\""
},
"value": "avatar cannot be zero"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3338e04ce106ab83a89a6f78ac95362796c47f8acb99702d3b473607a80d58e0",
"typeString": "literal_string \"avatar cannot be zero\""
}
],
"id": 5754,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
21552,
21553
],
"referencedDeclaration": 21553,
"src": "1380:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 5761,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1380:54:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5762,
"nodeType": "ExpressionStatement",
"src": "1380:54:12"
},
{
"expression": {
"argumentTypes": null,
"id": 5765,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 5763,
"name": "avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5710,
"src": "1444:6:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 5764,
"name": "_avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5738,
"src": "1453:7:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"src": "1444:16:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"id": 5766,
"nodeType": "ExpressionStatement",
"src": "1444:16:12"
},
{
"expression": {
"argumentTypes": null,
"id": 5769,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 5767,
"name": "expirationTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5712,
"src": "1470:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 5768,
"name": "_expirationTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5740,
"src": "1487:15:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1470:32:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"