@investorid/identity-sdk
Version:
Interact with BlockChain Identities.
1,101 lines • 171 kB
JSON
{
"contractName": "ERC725",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "key",
"type": "bytes32"
},
{
"indexed": true,
"name": "purpose",
"type": "uint256"
},
{
"indexed": true,
"name": "keyType",
"type": "uint256"
}
],
"name": "KeyAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "key",
"type": "bytes32"
},
{
"indexed": true,
"name": "purpose",
"type": "uint256"
},
{
"indexed": true,
"name": "keyType",
"type": "uint256"
}
],
"name": "KeyRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "executionId",
"type": "uint256"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": true,
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"name": "data",
"type": "bytes"
}
],
"name": "ExecutionRequested",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "executionId",
"type": "uint256"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": true,
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"name": "data",
"type": "bytes"
}
],
"name": "Executed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "executionId",
"type": "uint256"
},
{
"indexed": false,
"name": "approved",
"type": "bool"
}
],
"name": "Approved",
"type": "event"
},
{
"constant": true,
"inputs": [
{
"name": "_key",
"type": "bytes32"
}
],
"name": "getKey",
"outputs": [
{
"name": "purpose",
"type": "uint256"
},
{
"name": "keyType",
"type": "uint256"
},
{
"name": "key",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_key",
"type": "bytes32"
}
],
"name": "getKeyPurpose",
"outputs": [
{
"name": "purpose",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_purpose",
"type": "uint256"
}
],
"name": "getKeysByPurpose",
"outputs": [
{
"name": "keys",
"type": "bytes32[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_key",
"type": "bytes32"
},
{
"name": "_purpose",
"type": "uint256"
},
{
"name": "_keyType",
"type": "uint256"
}
],
"name": "addKey",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_key",
"type": "bytes32"
}
],
"name": "removeKey",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
},
{
"name": "_data",
"type": "bytes"
}
],
"name": "execute",
"outputs": [
{
"name": "executionId",
"type": "uint256"
}
],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_id",
"type": "uint256"
},
{
"name": "_approve",
"type": "bool"
}
],
"name": "approve",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.4.24;\n\ncontract ERC725 {\n\n uint256 constant MANAGEMENT_KEY = 1;\n uint256 constant ACTION_KEY = 2;\n uint256 constant CLAIM_SIGNER_KEY = 3;\n uint256 constant ENCRYPTION_KEY = 4;\n\n event KeyAdded(bytes32 indexed key, uint256 indexed purpose, uint256 indexed keyType);\n event KeyRemoved(bytes32 indexed key, uint256 indexed purpose, uint256 indexed keyType);\n event ExecutionRequested(uint256 indexed executionId, address indexed to, uint256 indexed value, bytes data);\n event Executed(uint256 indexed executionId, address indexed to, uint256 indexed value, bytes data);\n event Approved(uint256 indexed executionId, bool approved);\n\n struct Key {\n uint256 purpose; //e.g., MANAGEMENT_KEY = 1, ACTION_KEY = 2, etc.\n uint256 keyType; // e.g. 1 = ECDSA, 2 = RSA, etc.\n bytes32 key;\n }\n\n function getKey(bytes32 _key) public constant returns(uint256 purpose, uint256 keyType, bytes32 key);\n function getKeyPurpose(bytes32 _key) public constant returns(uint256 purpose);\n function getKeysByPurpose(uint256 _purpose) public constant returns(bytes32[] keys);\n function addKey(bytes32 _key, uint256 _purpose, uint256 _keyType) public returns (bool success);\n function removeKey(bytes32 _key) public returns (bool success);\n function execute(address _to, uint256 _value, bytes _data) public payable returns (uint256 executionId);\n function approve(uint256 _id, bool _approve) public returns (bool success);\n}\n",
"sourcePath": "/Users/kevinthizy/Documents/DEV/TokenY/T-REX/contracts/identity/ERC725.sol",
"ast": {
"absolutePath": "/Users/kevinthizy/Documents/DEV/TokenY/T-REX/contracts/identity/ERC725.sol",
"exportedSymbols": {
"ERC725": [
582
]
},
"id": 583,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 456,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:5"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"id": 582,
"linearizedBaseContracts": [
582
],
"name": "ERC725",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 459,
"name": "MANAGEMENT_KEY",
"nodeType": "VariableDeclaration",
"scope": 582,
"src": "49:35:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 457,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "49:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"argumentTypes": null,
"hexValue": "31",
"id": 458,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "83:1:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"visibility": "internal"
},
{
"constant": true,
"id": 462,
"name": "ACTION_KEY",
"nodeType": "VariableDeclaration",
"scope": 582,
"src": "90:31:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 460,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "90:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"argumentTypes": null,
"hexValue": "32",
"id": 461,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "120:1:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"visibility": "internal"
},
{
"constant": true,
"id": 465,
"name": "CLAIM_SIGNER_KEY",
"nodeType": "VariableDeclaration",
"scope": 582,
"src": "127:37:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 463,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "127:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"argumentTypes": null,
"hexValue": "33",
"id": 464,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "163:1:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"visibility": "internal"
},
{
"constant": true,
"id": 468,
"name": "ENCRYPTION_KEY",
"nodeType": "VariableDeclaration",
"scope": 582,
"src": "170:35:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 466,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "170:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"argumentTypes": null,
"hexValue": "34",
"id": 467,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "204:1:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"visibility": "internal"
},
{
"anonymous": false,
"documentation": null,
"id": 476,
"name": "KeyAdded",
"nodeType": "EventDefinition",
"parameters": {
"id": 475,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 470,
"indexed": true,
"name": "key",
"nodeType": "VariableDeclaration",
"scope": 476,
"src": "227:19:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 469,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "227:7:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 472,
"indexed": true,
"name": "purpose",
"nodeType": "VariableDeclaration",
"scope": 476,
"src": "248:23:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 471,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "248:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 474,
"indexed": true,
"name": "keyType",
"nodeType": "VariableDeclaration",
"scope": 476,
"src": "273:23:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 473,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "273:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "226:71:5"
},
"src": "212:86:5"
},
{
"anonymous": false,
"documentation": null,
"id": 484,
"name": "KeyRemoved",
"nodeType": "EventDefinition",
"parameters": {
"id": 483,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 478,
"indexed": true,
"name": "key",
"nodeType": "VariableDeclaration",
"scope": 484,
"src": "320:19:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 477,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "320:7:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 480,
"indexed": true,
"name": "purpose",
"nodeType": "VariableDeclaration",
"scope": 484,
"src": "341:23:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 479,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "341:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 482,
"indexed": true,
"name": "keyType",
"nodeType": "VariableDeclaration",
"scope": 484,
"src": "366:23:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 481,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "366:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "319:71:5"
},
"src": "303:88:5"
},
{
"anonymous": false,
"documentation": null,
"id": 494,
"name": "ExecutionRequested",
"nodeType": "EventDefinition",
"parameters": {
"id": 493,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 486,
"indexed": true,
"name": "executionId",
"nodeType": "VariableDeclaration",
"scope": 494,
"src": "421:27:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 485,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "421:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 488,
"indexed": true,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 494,
"src": "450:18:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 487,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "450:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 490,
"indexed": true,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 494,
"src": "470:21:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 489,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "470:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 492,
"indexed": false,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 494,
"src": "493:10:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 491,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "493:5:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "420:84:5"
},
"src": "396:109:5"
},
{
"anonymous": false,
"documentation": null,
"id": 504,
"name": "Executed",
"nodeType": "EventDefinition",
"parameters": {
"id": 503,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 496,
"indexed": true,
"name": "executionId",
"nodeType": "VariableDeclaration",
"scope": 504,
"src": "525:27:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 495,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "525:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 498,
"indexed": true,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 504,
"src": "554:18:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 497,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "554:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 500,
"indexed": true,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 504,
"src": "574:21:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 499,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "574:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 502,
"indexed": false,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 504,
"src": "597:10:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 501,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "597:5:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "524:84:5"
},
"src": "510:99:5"
},
{
"anonymous": false,
"documentation": null,
"id": 510,
"name": "Approved",
"nodeType": "EventDefinition",
"parameters": {
"id": 509,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 506,
"indexed": true,
"name": "executionId",
"nodeType": "VariableDeclaration",
"scope": 510,
"src": "629:27:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 505,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "629:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 508,
"indexed": false,
"name": "approved",
"nodeType": "VariableDeclaration",
"scope": 510,
"src": "658:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 507,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "658:4:5",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "628:44:5"
},
"src": "614:59:5"
},
{
"canonicalName": "ERC725.Key",
"id": 517,
"members": [
{
"constant": false,
"id": 512,
"name": "purpose",
"nodeType": "VariableDeclaration",
"scope": 517,
"src": "700:15:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 511,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "700:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 514,
"name": "keyType",
"nodeType": "VariableDeclaration",
"scope": 517,
"src": "774:15:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 513,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "774:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 516,
"name": "key",
"nodeType": "VariableDeclaration",
"scope": 517,
"src": "832:11:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 515,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "832:7:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "Key",
"nodeType": "StructDefinition",
"scope": 582,
"src": "679:171:5",
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 528,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getKey",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 520,
"nodeType": "Pa