@gnosis.pm/util-contracts
Version:
Utility contracts for Gnosis
737 lines • 25 kB
JSON
{
"contractName": "HumanFriendlyToken",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"Abstract human-friendly token contract - Functions to be implemented by token contracts\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/bensniff/Projects/gnosis/util-contracts/contracts/HumanFriendlyToken.sol\":\"HumanFriendlyToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/bensniff/Projects/gnosis/util-contracts/contracts/HumanFriendlyToken.sol\":{\"keccak256\":\"0xb58bdf7278fcbcdd8bdbc3a947e3b01630d8ef72453e54c2a8c78fe46c9cc002\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://0f89bb80138490265355e178d44c9eef4e1710bcba64e3865d859766837c6253\",\"dweb:/ipfs/Qma5rtH6r1n1LyryQV7fGBjkiBmfKyMxT12xmyLWDRQrjY\"]},\"/Users/bensniff/Projects/gnosis/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x5328b269119ce2771bc332924519228fdef2d8a5237ffcbc5ce4b9c4680a9b79\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://5a40fd561e73ac545ebb64d358f69d5dfb78bede41159f1500a08202cf2e53a6\",\"dweb:/ipfs/QmVFni1zySZek7uTpqaig48H23dMuhaKULQvcD8HYvDnXX\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "",
"deployedSourceMap": "",
"source": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// Implements ERC 20 Token standard including extra accessors for human readability.\n/// See: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md\npragma solidity ^0.7.0;\nimport \"./Token.sol\";\n\n/// @title Abstract human-friendly token contract - Functions to be implemented by token contracts\nabstract contract HumanFriendlyToken is Token {\n /*\n * Public functions\n */\n function name() public virtual view returns (string memory);\n function symbol() public virtual view returns (string memory);\n function decimals() public virtual view returns (uint8);\n}\n",
"sourcePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/HumanFriendlyToken.sol",
"ast": {
"absolutePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/HumanFriendlyToken.sol",
"exportedSymbols": {
"HumanFriendlyToken": [
352
],
"Token": [
1903
]
},
"id": 353,
"license": "LGPL-3.0-only",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 332,
"literals": [
"solidity",
"^",
"0.7",
".0"
],
"nodeType": "PragmaDirective",
"src": "213:23:2"
},
{
"absolutePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/Token.sol",
"file": "./Token.sol",
"id": 333,
"nodeType": "ImportDirective",
"scope": 353,
"sourceUnit": 1904,
"src": "237:21:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [
{
"baseName": {
"id": 335,
"name": "Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1903,
"src": "399:5:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Token_$1903",
"typeString": "contract Token"
}
},
"id": 336,
"nodeType": "InheritanceSpecifier",
"src": "399:5:2"
}
],
"contractDependencies": [
1903
],
"contractKind": "contract",
"documentation": {
"id": 334,
"nodeType": "StructuredDocumentation",
"src": "260:99:2",
"text": "@title Abstract human-friendly token contract - Functions to be implemented by token contracts"
},
"fullyImplemented": false,
"id": 352,
"linearizedBaseContracts": [
352,
1903
],
"name": "HumanFriendlyToken",
"nodeType": "ContractDefinition",
"nodes": [
{
"functionSelector": "06fdde03",
"id": 341,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "name",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 337,
"nodeType": "ParameterList",
"parameters": [],
"src": "464:2:2"
},
"returnParameters": {
"id": 340,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 339,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"scope": 341,
"src": "496:13:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 338,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "496:6:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "495:15:2"
},
"scope": 352,
"src": "451:60:2",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"functionSelector": "95d89b41",
"id": 346,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "symbol",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 342,
"nodeType": "ParameterList",
"parameters": [],
"src": "531:2:2"
},
"returnParameters": {
"id": 345,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 344,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"scope": 346,
"src": "563:13:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 343,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "563:6:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "562:15:2"
},
"scope": 352,
"src": "516:62:2",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"functionSelector": "313ce567",
"id": 351,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "decimals",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 347,
"nodeType": "ParameterList",
"parameters": [],
"src": "600:2:2"
},
"returnParameters": {
"id": 350,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 349,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"scope": 351,
"src": "632:5:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 348,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "632:5:2",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"src": "631:7:2"
},
"scope": 352,
"src": "583:56:2",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
}
],
"scope": 353,
"src": "359:282:2"
}
],
"src": "213:429:2"
},
"legacyAST": {
"absolutePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/HumanFriendlyToken.sol",
"exportedSymbols": {
"HumanFriendlyToken": [
352
],
"Token": [
1903
]
},
"id": 353,
"license": "LGPL-3.0-only",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 332,
"literals": [
"solidity",
"^",
"0.7",
".0"
],
"nodeType": "PragmaDirective",
"src": "213:23:2"
},
{
"absolutePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/Token.sol",
"file": "./Token.sol",
"id": 333,
"nodeType": "ImportDirective",
"scope": 353,
"sourceUnit": 1904,
"src": "237:21:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [
{
"baseName": {
"id": 335,
"name": "Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1903,
"src": "399:5:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Token_$1903",
"typeString": "contract Token"
}
},
"id": 336,
"nodeType": "InheritanceSpecifier",
"src": "399:5:2"
}
],
"contractDependencies": [
1903
],
"contractKind": "contract",
"documentation": {
"id": 334,
"nodeType": "StructuredDocumentation",
"src": "260:99:2",
"text": "@title Abstract human-friendly token contract - Functions to be implemented by token contracts"
},
"fullyImplemented": false,
"id": 352,
"linearizedBaseContracts": [
352,
1903
],
"name": "HumanFriendlyToken",
"nodeType": "ContractDefinition",
"nodes": [
{
"functionSelector": "06fdde03",
"id": 341,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "name",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 337,
"nodeType": "ParameterList",
"parameters": [],
"src": "464:2:2"
},
"returnParameters": {
"id": 340,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 339,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"scope": 341,
"src": "496:13:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 338,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "496:6:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "495:15:2"
},
"scope": 352,
"src": "451:60:2",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"functionSelector": "95d89b41",
"id": 346,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "symbol",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 342,
"nodeType": "ParameterList",
"parameters": [],
"src": "531:2:2"
},
"returnParameters": {
"id": 345,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 344,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"scope": 346,
"src": "563:13:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 343,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "563:6:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "562:15:2"
},
"scope": 352,
"src": "516:62:2",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"functionSelector": "313ce567",
"id": 351,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "decimals",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 347,
"nodeType": "ParameterList",
"parameters": [],
"src": "600:2:2"
},
"returnParameters": {
"id": 350,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 349,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"scope": 351,
"src": "632:5:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 348,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "632:5:2",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"src": "631:7:2"
},
"scope": 352,
"src": "583:56:2",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
}
],
"scope": 353,
"src": "359:282:2"
}
],
"src": "213:429:2"
},
"compiler": {
"name": "solc",
"version": "0.7.5+commit.eb77ed08.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-08T09:43:37.063Z",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "Abstract human-friendly token contract - Functions to be implemented by token contracts",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}