UNPKG

@etherisc/depeg-contracts

Version:

Etherisc's smart contracts for a depeg insurance for stable coins.

1,492 lines (1,491 loc) 495 kB
{ "abi": [ { "inputs": [ { "internalType": "string", "name": "name_", "type": "string" }, { "internalType": "string", "name": "symbol_", "type": "string" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "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": "amount", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "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": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } ], "name": "decreaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "addedValue", "type": "uint256" } ], "name": "increaseAllowance", "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": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "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": "amount", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" } ], "allSourcePaths": { "11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol", "3": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/ERC20.sol", "4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol", "5": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/extensions/IERC20Metadata.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/ERC20.sol", "exportedSymbols": { "Context": [ 15648 ], "ERC20": [ 15626 ], "IERC20": [ 15820 ], "IERC20Metadata": [ 9510 ] }, "id": 15627, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 15042, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "105:23:3" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol", "file": "./IERC20.sol", "id": 15043, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 15627, "sourceUnit": 15821, "src": "130:22:3", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/extensions/IERC20Metadata.sol", "file": "./extensions/IERC20Metadata.sol", "id": 15044, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 15627, "sourceUnit": 9511, "src": "153:41:3", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol", "file": "../../utils/Context.sol", "id": 15045, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 15627, "sourceUnit": 15649, "src": "195:33:3", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 15047, "name": "Context", "nodeType": "IdentifierPath", "referencedDeclaration": 15648, "src": "1421:7:3" }, "id": 15048, "nodeType": "InheritanceSpecifier", "src": "1421:7:3" }, { "baseName": { "id": 15049, "name": "IERC20", "nodeType": "IdentifierPath", "referencedDeclaration": 15820, "src": "1430:6:3" }, "id": 15050, "nodeType": "InheritanceSpecifier", "src": "1430:6:3" }, { "baseName": { "id": 15051, "name": "IERC20Metadata", "nodeType": "IdentifierPath", "referencedDeclaration": 9510, "src": "1438:14:3" }, "id": 15052, "nodeType": "InheritanceSpecifier", "src": "1438:14:3" } ], "contractDependencies": [ 9510, 15648, 15820 ], "contractKind": "contract", "documentation": { "id": 15046, "nodeType": "StructuredDocumentation", "src": "230:1172:3", "text": " @dev Implementation of the {IERC20} interface.\n This implementation is agnostic to the way tokens are created. This means\n that a supply mechanism has to be added in a derived contract using {_mint}.\n For a generic mechanism see {ERC20PresetMinterPauser}.\n TIP: For a detailed writeup see our guide\n https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n to implement supply mechanisms].\n We have followed general OpenZeppelin Contracts guidelines: functions revert\n instead returning `false` on failure. This behavior is nonetheless\n conventional and does not conflict with the expectations of ERC20\n applications.\n Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n This allows applications to reconstruct the allowance for all accounts just\n by listening to said events. Other implementations of the EIP may not emit\n these events, as it isn't required by the specification.\n Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n functions have been added to mitigate the well-known issues around setting\n allowances. See {IERC20-approve}." }, "fullyImplemented": true, "id": 15626, "linearizedBaseContracts": [ 15626, 9510, 15820, 15648 ], "name": "ERC20", "nameLocation": "1412:5:3", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 15056, "mutability": "mutable", "name": "_balances", "nameLocation": "1495:9:3", "nodeType": "VariableDeclaration", "scope": 15626, "src": "1459:45:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 15055, "keyType": { "id": 15053, "name": "address", "nodeType": "ElementaryTypeName", "src": "1467:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "1459:27:3", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 15054, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1478:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "private" }, { "constant": false, "id": 15062, "mutability": "mutable", "name": "_allowances", "nameLocation": "1567:11:3", "nodeType": "VariableDeclaration", "scope": 15626, "src": "1511:67:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "typeName": { "id": 15061, "keyType": { "id": 15057, "name": "address", "nodeType": "ElementaryTypeName", "src": "1519:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "1511:47:3", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "valueType": { "id": 15060, "keyType": { "id": 15058, "name": "address", "nodeType": "ElementaryTypeName", "src": "1538:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "1530:27:3", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 15059, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1549:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } } }, "visibility": "private" }, { "constant": false, "id": 15064, "mutability": "mutable", "name": "_totalSupply", "nameLocation": "1601:12:3", "nodeType": "VariableDeclaration", "scope": 15626, "src": "1585:28:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15063, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1585:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "private" }, { "constant": false, "id": 15066, "mutability": "mutable", "name": "_name", "nameLocation": "1635:5:3", "nodeType": "VariableDeclaration", "scope": 15626, "src": "1620:20:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 15065, "name": "string", "nodeType": "ElementaryTypeName", "src": "1620:6:3", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "private" }, { "constant": false, "id": 15068, "mutability": "mutable", "name": "_symbol", "nameLocation": "1661:7:3", "nodeType": "VariableDeclaration", "scope": 15626, "src": "1646:22:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 15067, "name": "string", "nodeType": "ElementaryTypeName", "src": "1646:6:3", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "private" }, { "body": { "id": 15084, "nodeType": "Block", "src": "2034:57:3", "statements": [ { "expression": { "id": 15078, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 15076, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15066, "src": "2044:5:3", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 15077, "name": "name_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15071, "src": "2052:5:3", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "2044:13:3", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 15079, "nodeType": "ExpressionStatement", "src": "2044:13:3" }, { "expression": { "id": 15082, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 15080, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15068, "src": "2067:7:3", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 15081, "name": "symbol_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15073, "src": "2077:7:3", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "2067:17:3", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 15083, "nodeType": "ExpressionStatement", "src": "2067:17:3" } ] }, "documentation": { "id": 15069, "nodeType": "StructuredDocumentation", "src": "1675:298:3", "text": " @dev Sets the values for {name} and {symbol}.\n The default value of {decimals} is 18. To select a different value for\n {decimals} you should overload it.\n All two of these values are immutable: they can only be set once during\n construction." }, "id": 15085, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": { "id": 15074, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15071, "mutability": "mutable", "name": "name_", "nameLocation": "2004:5:3", "nodeType": "VariableDeclaration", "scope": 15085, "src": "1990:19:3", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 15070, "name": "string", "nodeType": "ElementaryTypeName", "src": "1990:6:3", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" }, { "constant": false, "id": 15073, "mutability": "mutable", "name": "symbol_", "nameLocation": "2025:7:3", "nodeType": "VariableDeclaration", "scope": 15085, "src": "2011:21:3", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 15072, "name": "string", "nodeType": "ElementaryTypeName", "src": "2011:6:3", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "1989:44:3" }, "returnParameters": { "id": 15075, "nodeType": "ParameterList", "parameters": [], "src": "2034:0:3" }, "scope": 15626, "src": "1978:113:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "baseFunctions": [ 9497 ], "body": { "id": 15094, "nodeType": "Block", "src": "2225:29:3", "statements": [ { "expression": { "id": 15092, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15066, "src": "2242:5:3", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 15091, "id": 15093, "nodeType": "Return", "src": "2235:12:3" } ] }, "documentation": { "id": 15086, "nodeType": "StructuredDocumentation", "src": "2097:54:3", "text": " @dev Returns the name of the token." }, "functionSelector": "06fdde03", "id": 15095, "implemented": true, "kind": "function", "modifiers": [], "name": "name", "nameLocation": "2165:4:3", "nodeType": "FunctionDefinition", "overrides": { "id": 15088, "nodeType": "OverrideSpecifier", "overrides": [], "src": "2192:8:3" }, "parameters": { "id": 15087, "nodeType": "ParameterList", "parameters": [], "src": "2169:2:3" }, "returnParameters": { "id": 15091, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15090, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 15095, "src": "2210:13:3", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 15089, "name": "string", "nodeType": "ElementaryTypeName", "src": "2210:6:3", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "2209:15:3" }, "scope": 15626, "src": "2156:98:3", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "baseFunctions": [ 9503 ], "body": { "id": 15104, "nodeType": "Block", "src": "2438:31:3", "statements": [ { "expression": { "id": 15102, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15068, "src": "2455:7:3", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 15101, "id": 15103, "nodeType": "Return", "src": "2448:14:3" } ] }, "documentation": { "id": 15096, "nodeType": "StructuredDocumentation", "src": "2260:102:3", "text": " @dev Returns the symbol of the token, usually a shorter version of the\n name." }, "functionSelector": "95d89b41", "id": 15105, "implemented": true, "kind": "function", "modifiers": [], "name": "symbol", "nameLocation": "2376:6:3", "nodeType": "FunctionDefinition", "overrides": { "id": 15098, "nodeType": "OverrideSpecifier", "overrides": [], "src": "2405:8:3" }, "parameters": { "id": 15097, "nodeType": "ParameterList", "parameters": [], "src": "2382:2:3" }, "returnParameters": { "id": 15101, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15100, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 15105, "src": "2423:13:3", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 15099, "name": "string", "nodeType": "ElementaryTypeName", "src": "2423:6:3", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "2422:15:3" }, "scope": 15626, "src": "2367:102:3", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "baseFunctions": [ 9509 ], "body": { "id": 15114, "nodeType": "Block", "src": "3158:26:3", "statements": [ { "expression": { "hexValue": "3138", "id": 15112, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3175:2:3", "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" }, "value": "18" }, "functionReturnParameters": 15111, "id": 15113, "nodeType": "Return", "src": "3168:9:3" } ] }, "documentation": { "id": 15106, "nodeType": "StructuredDocumentation", "src": "2475:613:3", "text": " @dev Returns the number of decimals used to get its user representation.\n For example, if `decimals` equals `2`, a balance of `505` tokens should\n be displayed to a user as `5.05` (`505 / 10 ** 2`).\n Tokens usually opt for a value of 18, imitating the relationship between\n Ether and Wei. This is the value {ERC20} uses, unless this function is\n overridden;\n NOTE: This information is only used for _display_ purposes: it in\n no way affects any of the arithmetic of the contract, including\n {IERC20-balanceOf} and {IERC20-transfer}." }, "functionSelector": "313ce567", "id": 15115, "implemented": true, "kind": "function", "modifiers": [], "name": "decimals", "nameLocation": "3102:8:3", "nodeType": "FunctionDefinition", "overrides": { "id": 15108, "nodeType": "OverrideSpecifier", "overrides": [], "src": "3133:8:3" }, "parameters": { "id": 15107, "nodeType": "ParameterList", "parameters": [], "src": "3110:2:3" }, "returnParameters": { "id": 15111, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15110, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 15115, "src": "3151:5:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 15109, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "3151:5:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "visibility": "internal" } ], "src": "3150:7:3" }, "scope": 15626, "src": "3093:91:3", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "baseFunctions": [ 15769 ], "body": { "id": 15124, "nodeType": "Block", "src": "3314:36:3", "statements": [ { "expression": { "id": 15122, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15064, "src": "3331:12:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 15121, "id": 15123, "nodeType": "Return", "src": "3324:19:3" } ] }, "documentation": { "id": 15116, "nodeType": "StructuredDocumentation", "src": "3190:49:3", "text": " @dev See {IERC20-totalSupply}." }, "functionSelector": "18160ddd", "id": 15125, "implemented": true, "kind": "function", "modifiers": [], "name": "totalSupply", "nameLocation": "3253:11:3", "nodeType": "FunctionDefinition", "overrides": { "id": 15118, "nodeType": "OverrideSpecifier", "overrides": [], "src": "3287:8:3" }, "parameters": { "id": 15117, "nodeType": "ParameterList", "parameters": [], "src": "3264:2:3" }, "returnParameters": { "id": 15121, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15120, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 15125, "src": "3305:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15119, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3305:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "3304:9:3" }, "scope": 15626, "src": "3244:106:3", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "baseFunctions": [ 15777 ], "body": { "id": 15138, "nodeType": "Block", "src": "3491:42:3", "statements": [ { "expression": { "baseExpression": { "id": 15134, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15056, "src": "3508:9:3", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 15136, "indexExpression": { "id": 15135, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15128, "src": "3518:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3508:18:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 15133, "id": 15137, "nodeType": "Return", "src": "3501:25:3" } ] }, "documentation": { "id": 15126, "nodeType": "StructuredDocumentation", "src": "3356:47:3", "text": " @dev See {IERC20-balanceOf}." }, "functionSelector": "70a08231", "id": 15139, "implemented": true, "kind": "function", "modifiers": [], "name": "balanceOf", "nameLocation": "3417:9:3", "nodeType": "FunctionDefinition", "overrides": { "id": 15130, "nodeType": "OverrideSpecifier", "overrides": [], "src": "3464:8:3" }, "parameters": { "id": 15129, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15128, "mutability": "mutable", "name": "account", "nameLocation": "3435:7:3", "nodeType": "VariableDeclaration", "scope": 15139, "src": "3427:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 15127, "name": "address", "nodeType": "ElementaryTypeName", "src": "3427:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "3426:17:3" }, "returnParameters": { "id": 15133, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15132, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 15139, "src": "3482:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15131, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3482:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "3481:9:3" }, "scope": 15626, "src": "3408:125:3", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "baseFunctions": [ 15787 ], "body": { "id": 15163, "nodeType": "Block", "src": "3814:104:3", "statements": [ { "assignments": [ 15151 ], "declarations": [ { "constant": false, "id": 15151, "mutability": "mutable", "name": "owner", "nameLocation": "3832:5:3", "nodeType": "VariableDeclaration", "scope": 15163, "src": "3824:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 15150, "name": "address", "nodeType": "ElementaryTypeName", "src": "3824:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "id": 15154, "initialValue": { "arguments": [], "expression": { "argumentTypes": [], "id": 15152, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15638, "src": "3840:10:3", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 15153, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3840:12:3", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "3824:28:3" }, { "expression": { "arguments": [ { "id": 15156, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15151, "src": "3872:5:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 15157, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15142, "src": "3879:2:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 15158, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15144, "src": "3883:6:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 15155, "name": "_transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15387, "src": "3862:9:3", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, "id": 15159, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3862:28:3", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 15160, "nodeType": "ExpressionStatement",