cc-zos-vouching
Version:
Vouching logic for the EVM packages of the ZeppelinOS smart contract platform
893 lines • 32.2 kB
JSON
{
"contractName": "AttributeRegistryInterface",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
},
{
"name": "attributeTypeID",
"type": "uint256"
}
],
"name": "hasAttribute",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
},
{
"name": "attributeTypeID",
"type": "uint256"
}
],
"name": "getAttributeValue",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "countAttributeTypes",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "index",
"type": "uint256"
}
],
"name": "getAttributeTypeID",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title Attribute Registry interface. EIP-165 ID: 0x5f46473f\n */\ninterface AttributeRegistryInterface {\n /**\n * @notice Check if an attribute of the type with ID `attributeTypeID` has\n * been assigned to the account at `account` and is still valid.\n * @param account address The account to check for a valid attribute.\n * @param attributeTypeID uint256 The ID of the attribute type to check for.\n * @return True if the attribute is assigned and valid, false otherwise.\n */\n function hasAttribute(\n address account,\n uint256 attributeTypeID\n ) external view returns (bool);\n\n /**\n * @notice Retrieve the value of the attribute of the type with ID\n * `attributeTypeID` on the account at `account`, assuming it is valid.\n * @param account address The account to check for the given attribute value.\n * @param attributeTypeID uint256 The ID of the attribute type to check for.\n * @return The attribute value if the attribute is valid, reverts otherwise.\n */\n function getAttributeValue(\n address account,\n uint256 attributeTypeID\n ) external view returns (uint256);\n\n /**\n * @notice Count the number of attribute types defined by the registry.\n * @return The number of available attribute types.\n */\n function countAttributeTypes() external view returns (uint256);\n\n /**\n * @notice Get the ID of the attribute type at index `index`.\n * @param index uint256 The index of the attribute type in question.\n * @return The ID of the attribute type.\n */\n function getAttributeTypeID(uint256 index) external view returns (uint256);\n}",
"sourcePath": "tpl-contracts-eth/contracts/AttributeRegistryInterface.sol",
"ast": {
"absolutePath": "tpl-contracts-eth/contracts/AttributeRegistryInterface.sol",
"exportedSymbols": {
"AttributeRegistryInterface": [
1726
]
},
"id": 1727,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1695,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:13"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": "@title Attribute Registry interface. EIP-165 ID: 0x5f46473f",
"fullyImplemented": false,
"id": 1726,
"linearizedBaseContracts": [
1726
],
"name": "AttributeRegistryInterface",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": "@notice Check if an attribute of the type with ID `attributeTypeID` has\nbeen assigned to the account at `account` and is still valid.\n@param account address The account to check for a valid attribute.\n@param attributeTypeID uint256 The ID of the attribute type to check for.\n@return True if the attribute is assigned and valid, false otherwise.",
"id": 1704,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "hasAttribute",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1700,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1697,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 1704,
"src": "548:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1696,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "548:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1699,
"name": "attributeTypeID",
"nodeType": "VariableDeclaration",
"scope": 1704,
"src": "569:23:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1698,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "569:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "542:54:13"
},
"payable": false,
"returnParameters": {
"id": 1703,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1702,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1704,
"src": "620:4:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1701,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "620:4:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "619:6:13"
},
"scope": 1726,
"src": "521:105:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@notice Retrieve the value of the attribute of the type with ID\n`attributeTypeID` on the account at `account`, assuming it is valid.\n@param account address The account to check for the given attribute value.\n@param attributeTypeID uint256 The ID of the attribute type to check for.\n@return The attribute value if the attribute is valid, reverts otherwise.",
"id": 1713,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getAttributeValue",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1709,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1706,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 1713,
"src": "1055:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1705,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1055:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1708,
"name": "attributeTypeID",
"nodeType": "VariableDeclaration",
"scope": 1713,
"src": "1076:23:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1707,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1076:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1049:54:13"
},
"payable": false,
"returnParameters": {
"id": 1712,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1711,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1713,
"src": "1127:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1710,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1127:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1126:9:13"
},
"scope": 1726,
"src": "1023:113:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@notice Count the number of attribute types defined by the registry.\n@return The number of available attribute types.",
"id": 1718,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "countAttributeTypes",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1714,
"nodeType": "ParameterList",
"parameters": [],
"src": "1308:2:13"
},
"payable": false,
"returnParameters": {
"id": 1717,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1716,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1718,
"src": "1334:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1715,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1334:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1333:9:13"
},
"scope": 1726,
"src": "1280:63:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@notice Get the ID of the attribute type at index `index`.\n@param index uint256 The index of the attribute type in question.\n@return The ID of the attribute type.",
"id": 1725,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getAttributeTypeID",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1721,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1720,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 1725,
"src": "1565:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1719,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1565:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1564:15:13"
},
"payable": false,
"returnParameters": {
"id": 1724,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1723,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1725,
"src": "1603:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1722,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1603:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1602:9:13"
},
"scope": 1726,
"src": "1537:75:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
}
],
"scope": 1727,
"src": "98:1516:13"
}
],
"src": "0:1614:13"
},
"legacyAST": {
"absolutePath": "tpl-contracts-eth/contracts/AttributeRegistryInterface.sol",
"exportedSymbols": {
"AttributeRegistryInterface": [
1726
]
},
"id": 1727,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1695,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:13"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": "@title Attribute Registry interface. EIP-165 ID: 0x5f46473f",
"fullyImplemented": false,
"id": 1726,
"linearizedBaseContracts": [
1726
],
"name": "AttributeRegistryInterface",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": "@notice Check if an attribute of the type with ID `attributeTypeID` has\nbeen assigned to the account at `account` and is still valid.\n@param account address The account to check for a valid attribute.\n@param attributeTypeID uint256 The ID of the attribute type to check for.\n@return True if the attribute is assigned and valid, false otherwise.",
"id": 1704,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "hasAttribute",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1700,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1697,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 1704,
"src": "548:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1696,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "548:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1699,
"name": "attributeTypeID",
"nodeType": "VariableDeclaration",
"scope": 1704,
"src": "569:23:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1698,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "569:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "542:54:13"
},
"payable": false,
"returnParameters": {
"id": 1703,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1702,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1704,
"src": "620:4:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1701,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "620:4:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "619:6:13"
},
"scope": 1726,
"src": "521:105:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@notice Retrieve the value of the attribute of the type with ID\n`attributeTypeID` on the account at `account`, assuming it is valid.\n@param account address The account to check for the given attribute value.\n@param attributeTypeID uint256 The ID of the attribute type to check for.\n@return The attribute value if the attribute is valid, reverts otherwise.",
"id": 1713,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getAttributeValue",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1709,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1706,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 1713,
"src": "1055:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1705,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1055:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1708,
"name": "attributeTypeID",
"nodeType": "VariableDeclaration",
"scope": 1713,
"src": "1076:23:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1707,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1076:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1049:54:13"
},
"payable": false,
"returnParameters": {
"id": 1712,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1711,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1713,
"src": "1127:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1710,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1127:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1126:9:13"
},
"scope": 1726,
"src": "1023:113:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@notice Count the number of attribute types defined by the registry.\n@return The number of available attribute types.",
"id": 1718,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "countAttributeTypes",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1714,
"nodeType": "ParameterList",
"parameters": [],
"src": "1308:2:13"
},
"payable": false,
"returnParameters": {
"id": 1717,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1716,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1718,
"src": "1334:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1715,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1334:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1333:9:13"
},
"scope": 1726,
"src": "1280:63:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@notice Get the ID of the attribute type at index `index`.\n@param index uint256 The index of the attribute type in question.\n@return The ID of the attribute type.",
"id": 1725,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getAttributeTypeID",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1721,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1720,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 1725,
"src": "1565:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1719,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1565:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1564:15:13"
},
"payable": false,
"returnParameters": {
"id": 1724,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1723,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1725,
"src": "1603:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1722,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1603:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1602:9:13"
},
"scope": 1726,
"src": "1537:75:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
}
],
"scope": 1727,
"src": "98:1516:13"
}
],
"src": "0:1614:13"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2018-12-15T05:05:31.554Z"
}