@etherisc/terraguard-poc-contracts
Version:
Etherisc's smart contracts for the terraguard poc
1,498 lines (1,497 loc) • 492 kB
JSON
{
"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": {
"1": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/ERC20.sol",
"2": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/IERC20.sol",
"3": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"5": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol"
},
"ast": {
"absolutePath": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/ERC20.sol",
"exportedSymbols": {
"Context": [
6682
],
"ERC20": [
4616
],
"IERC20": [
4694
],
"IERC20Metadata": [
3983
]
},
"id": 4617,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4031,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "105:23:1"
},
{
"absolutePath": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/IERC20.sol",
"file": "./IERC20.sol",
"id": 4032,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 4617,
"sourceUnit": 4695,
"src": "130:22:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"file": "./extensions/IERC20Metadata.sol",
"id": 4033,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 4617,
"sourceUnit": 3984,
"src": "153:41:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol",
"file": "../../utils/Context.sol",
"id": 4034,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 4617,
"sourceUnit": 6683,
"src": "195:33:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 4036,
"name": "Context",
"nodeType": "IdentifierPath",
"referencedDeclaration": 6682,
"src": "1419:7:1"
},
"id": 4037,
"nodeType": "InheritanceSpecifier",
"src": "1419:7:1"
},
{
"baseName": {
"id": 4038,
"name": "IERC20",
"nodeType": "IdentifierPath",
"referencedDeclaration": 4694,
"src": "1428:6:1"
},
"id": 4039,
"nodeType": "InheritanceSpecifier",
"src": "1428:6:1"
},
{
"baseName": {
"id": 4040,
"name": "IERC20Metadata",
"nodeType": "IdentifierPath",
"referencedDeclaration": 3983,
"src": "1436:14:1"
},
"id": 4041,
"nodeType": "InheritanceSpecifier",
"src": "1436:14:1"
}
],
"contractDependencies": [
3983,
4694,
6682
],
"contractKind": "contract",
"documentation": {
"id": 4035,
"nodeType": "StructuredDocumentation",
"src": "230:1170:1",
"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.openzeppelin.com/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": 4616,
"linearizedBaseContracts": [
4616,
3983,
4694,
6682
],
"name": "ERC20",
"nameLocation": "1410:5:1",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 4045,
"mutability": "mutable",
"name": "_balances",
"nameLocation": "1493:9:1",
"nodeType": "VariableDeclaration",
"scope": 4616,
"src": "1457:45:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 4044,
"keyType": {
"id": 4042,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1465:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "1457:27:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 4043,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1476:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 4051,
"mutability": "mutable",
"name": "_allowances",
"nameLocation": "1565:11:1",
"nodeType": "VariableDeclaration",
"scope": 4616,
"src": "1509:67:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"typeName": {
"id": 4050,
"keyType": {
"id": 4046,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1517:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "1509:47:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"valueType": {
"id": 4049,
"keyType": {
"id": 4047,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1536:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "1528:27:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 4048,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1547:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 4053,
"mutability": "mutable",
"name": "_totalSupply",
"nameLocation": "1599:12:1",
"nodeType": "VariableDeclaration",
"scope": 4616,
"src": "1583:28:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4052,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1583:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 4055,
"mutability": "mutable",
"name": "_name",
"nameLocation": "1633:5:1",
"nodeType": "VariableDeclaration",
"scope": 4616,
"src": "1618:20:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 4054,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1618:6:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 4057,
"mutability": "mutable",
"name": "_symbol",
"nameLocation": "1659:7:1",
"nodeType": "VariableDeclaration",
"scope": 4616,
"src": "1644:22:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 4056,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1644:6:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "private"
},
{
"body": {
"id": 4073,
"nodeType": "Block",
"src": "2032:57:1",
"statements": [
{
"expression": {
"id": 4067,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 4065,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4055,
"src": "2042:5:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 4066,
"name": "name_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4060,
"src": "2050:5:1",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "2042:13:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 4068,
"nodeType": "ExpressionStatement",
"src": "2042:13:1"
},
{
"expression": {
"id": 4071,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 4069,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4057,
"src": "2065:7:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 4070,
"name": "symbol_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4062,
"src": "2075:7:1",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "2065:17:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 4072,
"nodeType": "ExpressionStatement",
"src": "2065:17:1"
}
]
},
"documentation": {
"id": 4058,
"nodeType": "StructuredDocumentation",
"src": "1673:298:1",
"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": 4074,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4063,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4060,
"mutability": "mutable",
"name": "name_",
"nameLocation": "2002:5:1",
"nodeType": "VariableDeclaration",
"scope": 4074,
"src": "1988:19:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4059,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1988:6:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4062,
"mutability": "mutable",
"name": "symbol_",
"nameLocation": "2023:7:1",
"nodeType": "VariableDeclaration",
"scope": 4074,
"src": "2009:21:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4061,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2009:6:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "1987:44:1"
},
"returnParameters": {
"id": 4064,
"nodeType": "ParameterList",
"parameters": [],
"src": "2032:0:1"
},
"scope": 4616,
"src": "1976:113:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
3970
],
"body": {
"id": 4083,
"nodeType": "Block",
"src": "2223:29:1",
"statements": [
{
"expression": {
"id": 4081,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4055,
"src": "2240:5:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"functionReturnParameters": 4080,
"id": 4082,
"nodeType": "Return",
"src": "2233:12:1"
}
]
},
"documentation": {
"id": 4075,
"nodeType": "StructuredDocumentation",
"src": "2095:54:1",
"text": " @dev Returns the name of the token."
},
"functionSelector": "06fdde03",
"id": 4084,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "name",
"nameLocation": "2163:4:1",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 4077,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "2190:8:1"
},
"parameters": {
"id": 4076,
"nodeType": "ParameterList",
"parameters": [],
"src": "2167:2:1"
},
"returnParameters": {
"id": 4080,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4079,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4084,
"src": "2208:13:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4078,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2208:6:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "2207:15:1"
},
"scope": 4616,
"src": "2154:98:1",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
3976
],
"body": {
"id": 4093,
"nodeType": "Block",
"src": "2436:31:1",
"statements": [
{
"expression": {
"id": 4091,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4057,
"src": "2453:7:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"functionReturnParameters": 4090,
"id": 4092,
"nodeType": "Return",
"src": "2446:14:1"
}
]
},
"documentation": {
"id": 4085,
"nodeType": "StructuredDocumentation",
"src": "2258:102:1",
"text": " @dev Returns the symbol of the token, usually a shorter version of the\n name."
},
"functionSelector": "95d89b41",
"id": 4094,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "symbol",
"nameLocation": "2374:6:1",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 4087,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "2403:8:1"
},
"parameters": {
"id": 4086,
"nodeType": "ParameterList",
"parameters": [],
"src": "2380:2:1"
},
"returnParameters": {
"id": 4090,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4089,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4094,
"src": "2421:13:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4088,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2421:6:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "2420:15:1"
},
"scope": 4616,
"src": "2365:102:1",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
3982
],
"body": {
"id": 4103,
"nodeType": "Block",
"src": "3156:26:1",
"statements": [
{
"expression": {
"hexValue": "3138",
"id": 4101,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3173:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_18_by_1",
"typeString": "int_const 18"
},
"value": "18"
},
"functionReturnParameters": 4100,
"id": 4102,
"nodeType": "Return",
"src": "3166:9:1"
}
]
},
"documentation": {
"id": 4095,
"nodeType": "StructuredDocumentation",
"src": "2473:613:1",
"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": 4104,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "decimals",
"nameLocation": "3100:8:1",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 4097,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "3131:8:1"
},
"parameters": {
"id": 4096,
"nodeType": "ParameterList",
"parameters": [],
"src": "3108:2:1"
},
"returnParameters": {
"id": 4100,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4099,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4104,
"src": "3149:5:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 4098,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "3149:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"src": "3148:7:1"
},
"scope": 4616,
"src": "3091:91:1",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
4643
],
"body": {
"id": 4113,
"nodeType": "Block",
"src": "3312:36:1",
"statements": [
{
"expression": {
"id": 4111,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4053,
"src": "3329:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4110,
"id": 4112,
"nodeType": "Return",
"src": "3322:19:1"
}
]
},
"documentation": {
"id": 4105,
"nodeType": "StructuredDocumentation",
"src": "3188:49:1",
"text": " @dev See {IERC20-totalSupply}."
},
"functionSelector": "18160ddd",
"id": 4114,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "totalSupply",
"nameLocation": "3251:11:1",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 4107,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "3285:8:1"
},
"parameters": {
"id": 4106,
"nodeType": "ParameterList",
"parameters": [],
"src": "3262:2:1"
},
"returnParameters": {
"id": 4110,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4109,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4114,
"src": "3303:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4108,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3303:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3302:9:1"
},
"scope": 4616,
"src": "3242:106:1",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
4651
],
"body": {
"id": 4127,
"nodeType": "Block",
"src": "3489:42:1",
"statements": [
{
"expression": {
"baseExpression": {
"id": 4123,
"name": "_balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4045,
"src": "3506:9:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 4125,
"indexExpression": {
"id": 4124,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4117,
"src": "3516:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3506:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4122,
"id": 4126,
"nodeType": "Return",
"src": "3499:25:1"
}
]
},
"documentation": {
"id": 4115,
"nodeType": "StructuredDocumentation",
"src": "3354:47:1",
"text": " @dev See {IERC20-balanceOf}."
},
"functionSelector": "70a08231",
"id": 4128,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "balanceOf",
"nameLocation": "3415:9:1",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 4119,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "3462:8:1"
},
"parameters": {
"id": 4118,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4117,
"mutability": "mutable",
"name": "account",
"nameLocation": "3433:7:1",
"nodeType": "VariableDeclaration",
"scope": 4128,
"src": "3425:15:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4116,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3425:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "3424:17:1"
},
"returnParameters": {
"id": 4122,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4121,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4128,
"src": "3480:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4120,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3480:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3479:9:1"
},
"scope": 4616,
"src": "3406:125:1",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
4661
],
"body": {
"id": 4152,
"nodeType": "Block",
"src": "3812:104:1",
"statements": [
{
"assignments": [
4140
],
"declarations": [
{
"constant": false,
"id": 4140,
"mutability": "mutable",
"name": "owner",
"nameLocation": "3830:5:1",
"nodeType": "VariableDeclaration",
"scope": 4152,
"src": "3822:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4139,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3822:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 4143,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 4141,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6672,
"src": "3838:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 4142,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3838:12:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3822:28:1"
},
{
"expression": {
"arguments": [
{
"id": 4145,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4140,
"src": "3870:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 4146,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4131,
"src": "3877:2:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 4147,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4133,
"src": "3881:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 4144,
"name": "_transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4376,
"src": "3860:9:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 4148,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3860:28:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4149,
"nodeType": "ExpressionStatement",
"src": "3860:28:1"
},
{
"expression": {
"hexValue": "74727565",
"id": 4150,