arc_dx
Version:
A platform for building DAOs
745 lines • 28.6 kB
JSON
{
"contractName": "Destructible",
"abi": [
{
"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": false,
"inputs": [
{
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"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": "destroy",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_recipient",
"type": "address"
}
],
"name": "destroyAndSend",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405260008054600160a060020a0319163317905561029f806100256000396000f30060806040526004361061006c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663715018a6811461007157806383197ef0146100885780638da5cb5b1461009d578063f2fde38b146100ce578063f5074f41146100ef575b600080fd5b34801561007d57600080fd5b50610086610110565b005b34801561009457600080fd5b5061008661017c565b3480156100a957600080fd5b506100b26101a1565b60408051600160a060020a039092168252519081900360200190f35b3480156100da57600080fd5b50610086600160a060020a03600435166101b0565b3480156100fb57600080fd5b50610086600160a060020a03600435166101d3565b600054600160a060020a0316331461012757600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a0316331461019357600080fd5b600054600160a060020a0316ff5b600054600160a060020a031681565b600054600160a060020a031633146101c757600080fd5b6101d0816101f6565b50565b600054600160a060020a031633146101ea57600080fd5b80600160a060020a0316ff5b600160a060020a038116151561020b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820e15eeeb1e601447c6b4d1981357dda146d85105c47cdb72991e02f14676e3dc00029",
"deployedBytecode": "0x60806040526004361061006c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663715018a6811461007157806383197ef0146100885780638da5cb5b1461009d578063f2fde38b146100ce578063f5074f41146100ef575b600080fd5b34801561007d57600080fd5b50610086610110565b005b34801561009457600080fd5b5061008661017c565b3480156100a957600080fd5b506100b26101a1565b60408051600160a060020a039092168252519081900360200190f35b3480156100da57600080fd5b50610086600160a060020a03600435166101b0565b3480156100fb57600080fd5b50610086600160a060020a03600435166101d3565b600054600160a060020a0316331461012757600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a0316331461019357600080fd5b600054600160a060020a0316ff5b600054600160a060020a031681565b600054600160a060020a031633146101c757600080fd5b6101d0816101f6565b50565b600054600160a060020a031633146101ea57600080fd5b80600160a060020a0316ff5b600160a060020a038116151561020b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820e15eeeb1e601447c6b4d1981357dda146d85105c47cdb72991e02f14676e3dc00029",
"sourceMap": "198:299:53:-;;;567:5:55;:18;;-1:-1:-1;;;;;;567:18:55;575:10;567:18;;;198:299:53;;;;;;",
"deployedSourceMap": "198:299:53:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1001:111:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1001:111:55;;;;;;329:66:53;;8:9:-1;5:2;;;30:1;27;20:12;5:2;329:66:53;;;;238:20:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:55;;;;;;;;-1:-1:-1;;;;;238:20:55;;;;;;;;;;;;;;1274:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1274:103:55;-1:-1:-1;;;;;1274:103:55;;;;;399:96:53;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;399:96:53;-1:-1:-1;;;;;399:96:53;;;;;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;329:66:53:-;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;384:5:53;;-1:-1:-1;;;;;384:5:53;371:19;238:20:55;;;-1:-1:-1;;;;;238:20:55;;:::o;1274:103::-;719:5;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1343:29;1362:9;1343:18;:29::i;:::-;1274:103;:::o;399:96:53:-;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;479:10:53;-1:-1:-1;;;;;466:24:53;;1512:171:55;-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.24;\n\n\nimport \"../ownership/Ownable.sol\";\n\n\n/**\n * @title Destructible\n * @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner.\n */\ncontract Destructible is Ownable {\n /**\n * @dev Transfers the current balance to the owner and terminates the contract.\n */\n function destroy() public onlyOwner {\n selfdestruct(owner);\n }\n\n function destroyAndSend(address _recipient) public onlyOwner {\n selfdestruct(_recipient);\n }\n}\n",
"sourcePath": "openzeppelin-solidity/contracts/lifecycle/Destructible.sol",
"ast": {
"absolutePath": "openzeppelin-solidity/contracts/lifecycle/Destructible.sol",
"exportedSymbols": {
"Destructible": [
20697
]
},
"id": 20698,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 20671,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:53"
},
{
"absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"file": "../ownership/Ownable.sol",
"id": 20672,
"nodeType": "ImportDirective",
"scope": 20698,
"sourceUnit": 20878,
"src": "27:34:53",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 20673,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 20877,
"src": "223:7:53",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$20877",
"typeString": "contract Ownable"
}
},
"id": 20674,
"nodeType": "InheritanceSpecifier",
"src": "223:7:53"
}
],
"contractDependencies": [
20877
],
"contractKind": "contract",
"documentation": "@title Destructible\n@dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner.",
"fullyImplemented": true,
"id": 20697,
"linearizedBaseContracts": [
20697,
20877
],
"name": "Destructible",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 20683,
"nodeType": "Block",
"src": "365:30:53",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20680,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20795,
"src": "384:5:53",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 20679,
"name": "selfdestruct",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21557,
"src": "371:12:53",
"typeDescriptions": {
"typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 20681,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "371:19:53",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20682,
"nodeType": "ExpressionStatement",
"src": "371:19:53"
}
]
},
"documentation": "@dev Transfers the current balance to the owner and terminates the contract.",
"id": 20684,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 20677,
"modifierName": {
"argumentTypes": null,
"id": 20676,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20825,
"src": "355:9:53",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "355:9:53"
}
],
"name": "destroy",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 20675,
"nodeType": "ParameterList",
"parameters": [],
"src": "345:2:53"
},
"payable": false,
"returnParameters": {
"id": 20678,
"nodeType": "ParameterList",
"parameters": [],
"src": "365:0:53"
},
"scope": 20697,
"src": "329:66:53",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 20695,
"nodeType": "Block",
"src": "460:35:53",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20692,
"name": "_recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20686,
"src": "479:10:53",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 20691,
"name": "selfdestruct",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21557,
"src": "466:12:53",
"typeDescriptions": {
"typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 20693,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "466:24:53",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20694,
"nodeType": "ExpressionStatement",
"src": "466:24:53"
}
]
},
"documentation": null,
"id": 20696,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 20689,
"modifierName": {
"argumentTypes": null,
"id": 20688,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20825,
"src": "450:9:53",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "450:9:53"
}
],
"name": "destroyAndSend",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 20687,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20686,
"name": "_recipient",
"nodeType": "VariableDeclaration",
"scope": 20696,
"src": "423:18:53",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20685,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "423:7:53",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "422:20:53"
},
"payable": false,
"returnParameters": {
"id": 20690,
"nodeType": "ParameterList",
"parameters": [],
"src": "460:0:53"
},
"scope": 20697,
"src": "399:96:53",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 20698,
"src": "198:299:53"
}
],
"src": "0:498:53"
},
"legacyAST": {
"absolutePath": "openzeppelin-solidity/contracts/lifecycle/Destructible.sol",
"exportedSymbols": {
"Destructible": [
20697
]
},
"id": 20698,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 20671,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:53"
},
{
"absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"file": "../ownership/Ownable.sol",
"id": 20672,
"nodeType": "ImportDirective",
"scope": 20698,
"sourceUnit": 20878,
"src": "27:34:53",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 20673,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 20877,
"src": "223:7:53",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$20877",
"typeString": "contract Ownable"
}
},
"id": 20674,
"nodeType": "InheritanceSpecifier",
"src": "223:7:53"
}
],
"contractDependencies": [
20877
],
"contractKind": "contract",
"documentation": "@title Destructible\n@dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner.",
"fullyImplemented": true,
"id": 20697,
"linearizedBaseContracts": [
20697,
20877
],
"name": "Destructible",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 20683,
"nodeType": "Block",
"src": "365:30:53",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20680,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20795,
"src": "384:5:53",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 20679,
"name": "selfdestruct",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21557,
"src": "371:12:53",
"typeDescriptions": {
"typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 20681,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "371:19:53",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20682,
"nodeType": "ExpressionStatement",
"src": "371:19:53"
}
]
},
"documentation": "@dev Transfers the current balance to the owner and terminates the contract.",
"id": 20684,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 20677,
"modifierName": {
"argumentTypes": null,
"id": 20676,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20825,
"src": "355:9:53",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "355:9:53"
}
],
"name": "destroy",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 20675,
"nodeType": "ParameterList",
"parameters": [],
"src": "345:2:53"
},
"payable": false,
"returnParameters": {
"id": 20678,
"nodeType": "ParameterList",
"parameters": [],
"src": "365:0:53"
},
"scope": 20697,
"src": "329:66:53",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 20695,
"nodeType": "Block",
"src": "460:35:53",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20692,
"name": "_recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20686,
"src": "479:10:53",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 20691,
"name": "selfdestruct",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21557,
"src": "466:12:53",
"typeDescriptions": {
"typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 20693,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "466:24:53",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20694,
"nodeType": "ExpressionStatement",
"src": "466:24:53"
}
]
},
"documentation": null,
"id": 20696,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 20689,
"modifierName": {
"argumentTypes": null,
"id": 20688,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20825,
"src": "450:9:53",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "450:9:53"
}
],
"name": "destroyAndSend",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 20687,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20686,
"name": "_recipient",
"nodeType": "VariableDeclaration",
"scope": 20696,
"src": "423:18:53",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20685,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "423:7:53",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "422:20:53"
},
"payable": false,
"returnParameters": {
"id": 20690,
"nodeType": "ParameterList",
"parameters": [],
"src": "460:0:53"
},
"scope": 20697,
"src": "399:96:53",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 20698,
"src": "198:299:53"
}
],
"src": "0:498:53"
},
"compiler": {
"name": "solc",
"version": "0.4.25+commit.59dbf8f1.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.0-beta.1",
"updatedAt": "2018-10-16T14:16:07.465Z"
}